mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 17:23:21 +03:00
feat(web): clear person birthdate (#18330)
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
try {
|
||||
const updatedPerson = await updatePerson({
|
||||
id: person.id,
|
||||
personUpdateDto: { birthDate: birthDate.length > 0 ? birthDate : null },
|
||||
personUpdateDto: { birthDate },
|
||||
});
|
||||
|
||||
notificationController.show({ message: $t('date_of_birth_saved'), type: NotificationType.Info });
|
||||
@@ -53,6 +53,13 @@
|
||||
bind:value={birthDate}
|
||||
max={todayFormatted}
|
||||
/>
|
||||
{#if person.birthDate}
|
||||
<div class="flex justify-end">
|
||||
<Button shape="round" color="secondary" size="small" onclick={() => (birthDate = '')}>
|
||||
{$t('clear')}
|
||||
</Button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</form>
|
||||
</ModalBody>
|
||||
@@ -62,8 +69,8 @@
|
||||
<Button shape="round" color="secondary" fullWidth onclick={() => onClose()}>
|
||||
{$t('cancel')}
|
||||
</Button>
|
||||
<Button type="submit" shape="round" color="primary" fullWidth>
|
||||
{$t('set')}
|
||||
<Button type="submit" shape="round" color="primary" fullWidth form="set-birth-date-form">
|
||||
{$t('save')}
|
||||
</Button>
|
||||
</div>
|
||||
</ModalFooter>
|
||||
|
||||
Reference in New Issue
Block a user