13
13
<div class =" py-12" >
14
14
<div class =" max-w-7xl mx-auto sm:px-6 lg:px-8" >
15
15
<div class =" flex justify-between mb-6" >
16
- <Pagination
17
- class =" hidden sm:block"
18
- :links =" transcriptions.links"
19
- />
16
+ <Pagination class =" hidden sm:block" :links =" transcriptions.links" />
20
17
21
18
<PrimaryButton @click =" showModal = true" >
22
19
<i class =" fas fa-plus mr-2" ></i > Create transcription
44
41
</tr >
45
42
</thead >
46
43
<tbody >
47
- <tr
48
- v-if ="
49
- !transcriptions ||
50
- !transcriptions.data ||
51
- transcriptions.data.length === 0
52
- "
53
- >
54
- <td
55
- colspan =" 5"
56
- class =" text-white px-4 py-8 text-center bg-gray-700 rounded-lg"
57
- >
44
+ <tr v-if =" !transcriptions || !transcriptions.data || transcriptions.data.length === 0" >
45
+ <td colspan =" 5" class =" text-white px-4 py-8 text-center bg-gray-700 rounded-lg" >
58
46
No transcriptions found.
59
47
</td >
60
48
</tr >
61
- <tr
62
- v-else
63
- v-for =" transcription in transcriptions.data"
64
- :key =" transcription.id"
65
- >
49
+ <tr v-else v-for =" transcription in transcriptions.data" :key =" transcription.id" >
66
50
<td class =" text-white px-4 py-2" >
67
51
{{ transcription.title }}
68
52
</td >
72
56
}}
73
57
</td >
74
58
<td class =" text-white px-4 py-2" >
75
- <span
76
- v-if ="
77
- transcription.language === 'en'
78
- "
79
- >
59
+ <span v-if =" transcription.language === 'en'" >
80
60
🇺🇸
81
61
</span >
82
- <span
83
- v-else-if ="
84
- transcription.language === 'es'
85
- "
86
- >
62
+ <span v-else-if =" transcription.language === 'es'" >
87
63
🇪🇸
88
64
</span >
89
65
{{ transcription.language }}
90
66
</td >
91
- <td
92
- class =" text-white px-4 py-2 space-x-2 text-center"
93
- >
94
- <div
95
- class =" flex space-x-2 justify-center"
96
- >
97
- <AudioPlayer
98
- :audioUrl ="
99
- transcription.audioUrl
100
- "
101
- v-model:isPlaying ="
102
- transcription.isPlaying
103
- "
104
- />
67
+ <td class =" text-white px-4 py-2 space-x-2 text-center" >
68
+ <div class =" flex space-x-2 justify-center" >
69
+ <AudioPlayer :audioUrl =" transcription.audioUrl" v-model:isPlaying =" transcription.isPlaying" />
105
70
<DropdownMenu >
106
- <PrimaryButton
107
- @click ="
108
- viewTranscription(
109
- transcription.slug
110
- )
111
- "
112
- class =" bg-blue-500 hover:bg-blue-700 text-white w-full text-left"
113
- >
114
- <i
115
- class =" fas fa-eye mr-2"
116
- ></i >
71
+ <PrimaryButton @click =" viewTranscription(transcription.slug)" class =" bg-blue-500 hover:bg-blue-700 text-white w-full text-left" >
72
+ <i class =" fas fa-eye mr-2" ></i >
117
73
View PDF
118
74
</PrimaryButton >
119
- <PrimaryButton
120
- @click ="
121
- downloadTranscription(
122
- transcription.slug
123
- )
124
- "
125
- class =" bg-green-500 hover:bg-green-700 text-white w-full text-left"
126
- >
127
- <i
128
- class =" fas fa-download mr-2"
129
- ></i >
75
+ <PrimaryButton @click =" downloadTranscription(transcription.slug)" class =" bg-green-500 hover:bg-green-700 text-white w-full text-left" >
76
+ <i class =" fas fa-download mr-2" ></i >
130
77
Download PDF
131
78
</PrimaryButton >
132
- <PrimaryButton
133
- @click ="
134
- deletetranscription(
135
- transcription.slug
136
- )
137
- "
138
- class =" bg-red-500 hover:bg-red-700 text-white w-full text-left"
139
- >
140
- <i
141
- class =" fas fa-trash mr-2"
142
- ></i >
79
+ <PrimaryButton @click =" deletetranscription(transcription.slug)" class =" bg-red-500 hover:bg-red-700 text-white w-full text-left" >
80
+ <i class =" fas fa-trash mr-2" ></i >
143
81
Delete
144
82
</PrimaryButton >
145
83
</DropdownMenu >
158
96
159
97
<!-- Modal for Form -->
160
98
<Modal :show =" showModal" @close =" showModal = false" >
161
- <Form
162
- :submitAction =" submitForm"
163
- buttonText =" Generate Transcription"
164
- :errors =" errors"
165
- />
99
+ <Form :submitAction =" submitForm" buttonText =" Generate Transcription" :errors =" errors" />
166
100
</Modal >
167
101
</AuthenticatedLayout >
168
102
</template >
@@ -178,7 +112,7 @@ import Form from "@/Pages/Transcriptions/Form.vue";
178
112
import { Head , router , usePage } from " @inertiajs/vue3" ;
179
113
import Swal from " sweetalert2" ;
180
114
import { ref , onMounted , watch } from " vue" ;
181
- import eventBus from " @/Components/eventBus.js" ; // Import the event bus
115
+ import eventBus from " @/Components/eventBus.js" ;
182
116
183
117
defineProps ({
184
118
transcriptions: {
0 commit comments