feat: 03 => update expiration date handling to accept string format and improve validation
This commit is contained in:
parent
199a008095
commit
095f190f99
3 changed files with 9 additions and 9 deletions
|
|
@ -2,7 +2,7 @@
|
|||
import { calculateDaysUntilExpire } from 'stores/utils';
|
||||
|
||||
defineProps<{
|
||||
expirationDate: Date;
|
||||
expirationDate?: Date | string;
|
||||
showAllDay?: boolean;
|
||||
}>();
|
||||
</script>
|
||||
|
|
@ -10,7 +10,7 @@ defineProps<{
|
|||
<template>
|
||||
<template
|
||||
v-if="
|
||||
calculateDaysUntilExpire(expirationDate) <= 90 ||
|
||||
(expirationDate && calculateDaysUntilExpire(expirationDate) <= 90) ||
|
||||
(expirationDate !== undefined && !!showAllDay)
|
||||
"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue