Skip to content

Commit

Permalink
feat: support viewing CAS time in ViewActivityRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerzl committed Oct 14, 2024
1 parent 2cb0cf7 commit 23f5689
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-waves-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"enspire": minor
---

Support adding CAS time for activity record
54 changes: 43 additions & 11 deletions components/custom/CAS/Record/view-activity-records/DataTable.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
<script setup lang="ts" generic="TData, TValue">
import type { ActivityRecord, Club, ClubMembership } from '@prisma/client'
import type { ColumnDef, ColumnFiltersState, SortingState } from '@tanstack/vue-table'
import {
FlexRender,
getCoreRowModel,
getFilteredRowModel,
getPaginationRowModel,
getSortedRowModel,
useVueTable,
} from '@tanstack/vue-table'
import type { ActivityRecord, Club, ClubMembership } from '@prisma/client'
import { valueUpdater } from '@/lib/utils'
import { DonutChart } from '@/components/ui/chart-donut'
import {
Table,
TableBody,
Expand All @@ -21,6 +11,16 @@ import {
TableHeader,
TableRow,
} from '@/components/ui/table'
import { valueUpdater } from '@/lib/utils'
import {
FlexRender,
getCoreRowModel,
getFilteredRowModel,
getPaginationRowModel,
getSortedRowModel,
useVueTable,
} from '@tanstack/vue-table'
const props = defineProps<{
columns: ColumnDef<TData, TValue>[]
Expand Down Expand Up @@ -147,6 +147,38 @@ async function submitDeletion(id: string) {
</div>
</div>

<div>
<div class="font-medium">
CAS时间
</div>
<div class="text-sm rounded border p-2 mt-1 flex justify-between">
<div class="flex items-center space-x-0.5">
<p class="font-bold">
C:
</p>
<div>
{{ currentRequestInDialog?.cTime }}小时
</div>
</div>
<div class="flex items-center space-x-0.5">
<p class="font-bold">
A:
</p>
<div>
{{ currentRequestInDialog?.aTime }}小时
</div>
</div>
<div class="flex items-center space-x-0.5">
<p class="font-bold">
S:
</p>
<div>
{{ currentRequestInDialog?.sTime }}小时
</div>
</div>
</div>
</div>

<div>
<div class="font-medium">
活动概况
Expand Down

0 comments on commit 23f5689

Please sign in to comment.