fix: stop birth dates from saving one day early in Tehran time
This commit is contained in:
@@ -36,7 +36,7 @@ import {
|
||||
import { api } from '@/lib/api';
|
||||
import type { CompanyDto, CreatePersonRequest, PersonDto, PersonMood } from '@mento/shared';
|
||||
import { PERSON_MOOD_LABELS, PERSON_MOODS } from '@/lib/person-mood';
|
||||
import { formatLocalDateInput, parseLocalInput, toFaDigits } from '@/lib/jalali';
|
||||
import { formatLocalDateInput, toFaDigits } from '@/lib/jalali';
|
||||
import JalaliDateInput from '@/components/JalaliDateInput.vue';
|
||||
import {
|
||||
filterPhoneContacts,
|
||||
@@ -327,7 +327,7 @@ function payload(): CreatePersonRequest {
|
||||
position: position.value || undefined,
|
||||
website: website.value || undefined,
|
||||
instagram: instagram.value || undefined,
|
||||
birthDate: birthDate.value ? parseLocalInput(birthDate.value)?.toISOString() ?? null : null,
|
||||
birthDate: birthDate.value || null,
|
||||
referrer: referrer.value || undefined,
|
||||
addresses: addresses.value.map((a) => a.trim()).filter(Boolean),
|
||||
notes: notes.value || undefined,
|
||||
|
||||
Reference in New Issue
Block a user