-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from hibiya-itchief/偽造防止
偽造防止
- Loading branch information
Showing
10 changed files
with
471 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
<template> | ||
<v-app> | ||
<v-row justify="center"> | ||
<v-col cols="10"> | ||
<h1 class="info-title" style="text-align: left; margin-bottom: 5%"> | ||
受付用整理券ID確認ページ | ||
</h1> | ||
<br /> | ||
<p> | ||
受付では観客の方に整理券ページ移ってもらいQRコードを表示してもらってください。 | ||
</p> | ||
<br /> | ||
<v-btn | ||
to="/tickets/intoScanner" | ||
color="theme_color" | ||
style="margin-bottom: 5%" | ||
><span style="color: white">QRコードスキャナー</span></v-btn | ||
><br /> | ||
<p> | ||
以下の機能は人力でお客さんの整理券のIDが正しいものかを照らし合わせるためのものです。お客さんの整理券のIDは整理券ページに表示されています。QRコードでの読み取りがうまくいかないときに使用してください。<br /> | ||
<br /> | ||
<span style="font-weight: bold"><使い方></span><br /> | ||
整理券のID一覧を取得したい公演の横に表示されている「取得」ボタンを押してください。その公演で取得されている整理券のID一覧がが下にある「結果」に表示されます。 | ||
</p> | ||
<v-card> | ||
<v-card-title>公演を選択してください</v-card-title> | ||
<ul> | ||
<li | ||
v-for="event in events" | ||
:key="event.id" | ||
style="margin-bottom: 5%" | ||
> | ||
<v-row> | ||
<v-col cols="8"> {{ event.eventname }}</v-col | ||
><v-col cols="4" style="text-align: center" | ||
><v-btn | ||
style="text-align: right" | ||
@click="getAllTickets(event)" | ||
>取得</v-btn | ||
></v-col | ||
> | ||
</v-row> | ||
</li> | ||
</ul> | ||
</v-card> | ||
<v-card> | ||
<v-card-title> 結果 </v-card-title> | ||
<v-card-text> | ||
{{ tickets_id }} | ||
</v-card-text> | ||
</v-card> | ||
</v-col> | ||
</v-row> | ||
</v-app> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue' | ||
import { Event } from '~/types/quaint' | ||
type Data = { | ||
events: Event[] | ||
tickets_id: string[] | ||
user_groups: { | ||
students: string | ||
} | ||
} | ||
export default Vue.extend({ | ||
data(): Data { | ||
return { | ||
events: [], | ||
tickets_id: [], | ||
user_groups: { | ||
students: process.env.AZURE_AD_GROUPS_QUAINT_STUDENTS as string, | ||
}, | ||
} | ||
}, | ||
async created() { | ||
if ( | ||
!(this.$auth.user?.groups as string[]).includes(this.user_groups.students) | ||
) { | ||
this.$nuxt.error({ statusCode: 403, message: 'Forbidden' }) | ||
} | ||
this.events = await this.$axios | ||
.$get('/groups/' + this.$route.params.groupId + '/events') | ||
.then((result) => { | ||
result.sort((x: Event, y: Event) => { | ||
return new Date(x.starts_at) > new Date(y.starts_at) ? 1 : -1 | ||
}) | ||
return result | ||
}) | ||
.catch(() => { | ||
this.$store.commit('ShowInternetErrorSnackbar', { | ||
message: '情報の取得に失敗しました。再読み込みしてください。', | ||
}) | ||
return [] | ||
}) | ||
}, | ||
methods: { | ||
async getAllTickets(event: Event) { | ||
await this.$axios | ||
.$get( | ||
'/groups/' + | ||
event.group_id + | ||
'/events/' + | ||
event.id + | ||
'/tickets/active' | ||
) | ||
.then((res) => { | ||
this.tickets_id = res | ||
this.$store.commit('ShowInternetSuccessSnackbar', { | ||
message: '情報の取得に成功しました。', | ||
}) | ||
}) | ||
.catch((err) => { | ||
this.$store.commit('ShowInternetErrorSnackbar', { | ||
message: | ||
'情報の取得に失敗しました。再読み込みしてください。エラー内容:' + | ||
err, | ||
}) | ||
}) | ||
}, | ||
}, | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<template> | ||
<v-app> | ||
<h1 class="info-title" style="margin-left: 5%; width: 80vw"> | ||
整理券スキャナーについて | ||
</h1> | ||
<v-row justify="center"> | ||
<v-col cols="11"> | ||
<p> | ||
スキャナーを利用するためにカメラへのアクセスを許可してください。<br /> | ||
Microsoft Edgeは対応していません。<br /> | ||
カメラがすでに使用中の場合やカメラに問題がある場合は動作しません。<br /> | ||
<br /> | ||
|
||
<span style="color: var(--theme-color)"><使い方></span><br /> | ||
お客さんに整理券ページに写ってもらいQRコードを表示してもらってください。スキャナーでQRコードを読み取ります。読み取りが終わると下から読み取り結果が表示されます。表示された指示に従って対応してください。 | ||
</p> | ||
</v-col> | ||
<v-col style="text-align: center" | ||
><v-btn color="theme_color" to="/tickets/scanner" | ||
><span style="color: white">スキャナーを起動</span></v-btn | ||
></v-col | ||
> | ||
</v-row> | ||
</v-app> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue' | ||
export default Vue.extend({ | ||
data() { | ||
return { | ||
user_groups: { | ||
students: process.env.AZURE_AD_GROUPS_QUAINT_STUDENTS as string, | ||
}, | ||
} | ||
}, | ||
created() { | ||
if ( | ||
!(this.$auth.user?.groups as string[]).includes(this.user_groups.students) | ||
) { | ||
this.$nuxt.error({ statusCode: 403, message: 'Forbidden' }) | ||
} | ||
}, | ||
}) | ||
</script> |
Oops, something went wrong.