mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
47 lines
1.4 KiB
Vue
47 lines
1.4 KiB
Vue
<script setup lang="ts">
|
|
import {
|
|
AlertDialog,
|
|
AlertDialogAction,
|
|
AlertDialogCancel,
|
|
AlertDialogContent,
|
|
AlertDialogDescription,
|
|
AlertDialogFooter,
|
|
AlertDialogHeader,
|
|
AlertDialogTitle,
|
|
} from '@/Components/ui/alert-dialog';
|
|
|
|
defineProps<{
|
|
open: boolean;
|
|
entryCount: number;
|
|
projectName: string;
|
|
}>();
|
|
|
|
defineEmits<{
|
|
(e: 'update:open', value: boolean): void;
|
|
(e: 'confirm'): void;
|
|
}>();
|
|
</script>
|
|
|
|
<template>
|
|
<AlertDialog :open="open" @update:open="$emit('update:open', $event)">
|
|
<AlertDialogContent>
|
|
<AlertDialogHeader>
|
|
<AlertDialogTitle>Remove timesheet row?</AlertDialogTitle>
|
|
<AlertDialogDescription>
|
|
This will delete {{ entryCount }} time
|
|
{{ entryCount === 1 ? 'entry' : 'entries' }}
|
|
for "{{ projectName }}". This action cannot be undone.
|
|
</AlertDialogDescription>
|
|
</AlertDialogHeader>
|
|
<AlertDialogFooter>
|
|
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
<AlertDialogAction
|
|
class="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
@click="$emit('confirm')">
|
|
Delete
|
|
</AlertDialogAction>
|
|
</AlertDialogFooter>
|
|
</AlertDialogContent>
|
|
</AlertDialog>
|
|
</template>
|