refactor: handle the value of being crushed

This commit is contained in:
Thanaphon Frappet 2024-11-13 11:46:43 +07:00
parent ece9827d04
commit 481d9d4e9e

View file

@ -60,8 +60,9 @@ function calculate90DayNext(currentDate: Date | null | string) {
if (currentDate === null) return null;
const date =
typeof currentDate === 'string' ? new Date(currentDate) : currentDate;
typeof currentDate === 'string'
? new Date(currentDate)
: new Date(currentDate.getTime());
date.setDate(date.getDate() + 90);
return date;
@ -122,8 +123,6 @@ watch(
</script>
<template>
{{ type }}
<div class="row col-12">
<div v-if="!hideTitle" class="col-12 q-pb-sm text-weight-bold text-body1">
<q-icon