From 7ba760d74b5047bd6b4dd075da3cfb40fcdf053e Mon Sep 17 00:00:00 2001 From: estifanos Date: Wed, 5 Aug 2026 10:14:03 +0000 Subject: [PATCH] feat(AmharicDatePicker): implement Amharic date picker component with calendar type switching and time input --- .../src/app/features/exam/pages/ExamPage.tsx | 10 +-- .../license-review/pages/LicenseQueuePage.tsx | 14 ++-- .../pages/LicenseReviewPage.tsx | 10 +-- apps/backoffice/src/app/i18n/locales/am.ts | 2 + apps/backoffice/src/app/i18n/locales/en.ts | 2 + .../profile/components/ProfileFormContent.tsx | 2 +- .../seafarer/pages/SeafarerProfilePage.tsx | 2 +- .../pages/SeafarerRegistrationPage.tsx | 10 ++- libs/ui/src/index.ts | 1 + .../ui/src/lib/input}/AmharicDatePicker.css | 0 .../ui/src/lib/input}/AmharicDatePicker.tsx | 73 +++++++++++++++---- 11 files changed, 89 insertions(+), 37 deletions(-) rename {apps/portal/src/app/components => libs/ui/src/lib/input}/AmharicDatePicker.css (100%) rename {apps/portal/src/app/components => libs/ui/src/lib/input}/AmharicDatePicker.tsx (75%) diff --git a/apps/backoffice/src/app/features/exam/pages/ExamPage.tsx b/apps/backoffice/src/app/features/exam/pages/ExamPage.tsx index f49686075..ed0a50c69 100644 --- a/apps/backoffice/src/app/features/exam/pages/ExamPage.tsx +++ b/apps/backoffice/src/app/features/exam/pages/ExamPage.tsx @@ -27,11 +27,10 @@ import { IconTrash, IconPlus, IconInfoCircle, - IconCalendar, IconClipboardList, IconDetails, } from "@tabler/icons-react"; -import { notify, useErrorHandler, AdvancedTable, useServerTable, ModalFooter, type AdvancedColumn } from "@ema-platform/ui"; +import { notify, useErrorHandler, AdvancedTable, useServerTable, ModalFooter, AmharicDatePicker, type AdvancedColumn } from "@ema-platform/ui"; import { useGetCertificationsQuery } from "../../certification/api/certification-api"; import { useGetExamsQuery, @@ -194,13 +193,12 @@ function ExamForm({ autosize minRows={2} /> - setDate(e.currentTarget.value)} + onChange={setDate} + dateFormat="date" size="sm" - leftSection={} required /> )} - setFacet({ submittedFrom: e.currentTarget.value || undefined })} + onChange={(v) => setFacet({ submittedFrom: v || undefined })} + dateFormat="date" /> - setFacet({ submittedTo: e.currentTarget.value || undefined })} + onChange={(v) => setFacet({ submittedTo: v || undefined })} + dateFormat="date" /> {hasFacets && (