Skip to content

Commit 23f5689

Browse files
committed
feat: support viewing CAS time in ViewActivityRecord
1 parent 2cb0cf7 commit 23f5689

File tree

2 files changed

+48
-11
lines changed

2 files changed

+48
-11
lines changed

.changeset/wicked-waves-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"enspire": minor
3+
---
4+
5+
Support adding CAS time for activity record

components/custom/CAS/Record/view-activity-records/DataTable.vue

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
<script setup lang="ts" generic="TData, TValue">
2+
import type { ActivityRecord, Club, ClubMembership } from '@prisma/client'
23
import type { ColumnDef, ColumnFiltersState, SortingState } from '@tanstack/vue-table'
3-
import {
4-
FlexRender,
5-
getCoreRowModel,
6-
getFilteredRowModel,
7-
getPaginationRowModel,
8-
getSortedRowModel,
9-
useVueTable,
10-
} from '@tanstack/vue-table'
114
12-
import type { ActivityRecord, Club, ClubMembership } from '@prisma/client'
13-
import { valueUpdater } from '@/lib/utils'
145
import { DonutChart } from '@/components/ui/chart-donut'
15-
166
import {
177
Table,
188
TableBody,
@@ -21,6 +11,16 @@ import {
2111
TableHeader,
2212
TableRow,
2313
} from '@/components/ui/table'
14+
import { valueUpdater } from '@/lib/utils'
15+
16+
import {
17+
FlexRender,
18+
getCoreRowModel,
19+
getFilteredRowModel,
20+
getPaginationRowModel,
21+
getSortedRowModel,
22+
useVueTable,
23+
} from '@tanstack/vue-table'
2424
2525
const props = defineProps<{
2626
columns: ColumnDef<TData, TValue>[]
@@ -147,6 +147,38 @@ async function submitDeletion(id: string) {
147147
</div>
148148
</div>
149149

150+
<div>
151+
<div class="font-medium">
152+
CAS时间
153+
</div>
154+
<div class="text-sm rounded border p-2 mt-1 flex justify-between">
155+
<div class="flex items-center space-x-0.5">
156+
<p class="font-bold">
157+
C:
158+
</p>
159+
<div>
160+
{{ currentRequestInDialog?.cTime }}小时
161+
</div>
162+
</div>
163+
<div class="flex items-center space-x-0.5">
164+
<p class="font-bold">
165+
A:
166+
</p>
167+
<div>
168+
{{ currentRequestInDialog?.aTime }}小时
169+
</div>
170+
</div>
171+
<div class="flex items-center space-x-0.5">
172+
<p class="font-bold">
173+
S:
174+
</p>
175+
<div>
176+
{{ currentRequestInDialog?.sTime }}小时
177+
</div>
178+
</div>
179+
</div>
180+
</div>
181+
150182
<div>
151183
<div class="font-medium">
152184
活动概况

0 commit comments

Comments
 (0)