finalized application acceptance system and started making types shared across front and backend
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import { getAllApplications, approveApplication, denyApplication, Status } from '@/api/application';
|
||||
import { getAllApplications, approveApplication, denyApplication, ApplicationStatus } from '@/api/application';
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
@@ -87,7 +87,7 @@ onMounted(async () => {
|
||||
<TableCell :title="formatExact(app.submitted_at)">
|
||||
{{ formatAgo(app.submitted_at) }}
|
||||
</TableCell>
|
||||
<TableCell v-if="app.app_status === Status.Pending" class="inline-flex items-end gap-2">
|
||||
<TableCell v-if="app.app_status === ApplicationStatus.Pending" class="inline-flex items-end gap-2">
|
||||
<Button variant="success" @click.stop="() => { handleApprove(app.id) }">
|
||||
<CheckIcon></CheckIcon>
|
||||
</Button>
|
||||
@@ -97,9 +97,9 @@ onMounted(async () => {
|
||||
</TableCell>
|
||||
<TableCell class="text-right font-semibold" :class="[
|
||||
,
|
||||
app.app_status === Status.Pending && 'text-yellow-500',
|
||||
app.app_status === Status.Accepted && 'text-green-500',
|
||||
app.app_status === Status.Denied && 'text-destructive'
|
||||
app.app_status === ApplicationStatus.Pending && 'text-yellow-500',
|
||||
app.app_status === ApplicationStatus.Accepted && 'text-green-500',
|
||||
app.app_status === ApplicationStatus.Denied && 'text-destructive'
|
||||
]">{{ app.app_status }}</TableCell>
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
|
||||
Reference in New Issue
Block a user