forked from pkp/ui-library
-
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.
pkp/pkp-lib#10598 Calculate days from last activity in submission lis…
…ting
- Loading branch information
1 parent
337d7ba
commit f0c5b26
Showing
1 changed file
with
11 additions
and
3 deletions.
There are no files selected for viewing
14 changes: 11 additions & 3 deletions
14
src/pages/dashboard/components/DashboardTable/CellSubmissionDays.vue
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 |
---|---|---|
@@ -1,11 +1,19 @@ | ||
<template> | ||
<TableCell>(todo)</TableCell> | ||
<TableCell>{{ days }}</TableCell> | ||
</template> | ||
<script setup> | ||
import {defineProps} from 'vue'; | ||
import {computed} from 'vue'; | ||
import {useDate} from '@/composables/useDate'; | ||
import TableCell from '@/components/Table/TableCell.vue'; | ||
defineProps({ | ||
const props = defineProps({ | ||
item: {type: Object, required: true}, | ||
}); | ||
const {calculateDaysBetweenDates} = useDate(); | ||
const days = computed(() => { | ||
return calculateDaysBetweenDates(props.item.dateLastActivity, new Date()); | ||
}); | ||
</script> |