From 376af79449a906cdc5cb9bb2bb4502b0c872137b Mon Sep 17 00:00:00 2001 From: Abizrh Date: Fri, 8 Aug 2025 20:38:16 +0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat=20(patient):=20add=20edit=20pa?= =?UTF-8?q?ge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/auth/{SignIn.vue => sign-in.vue} | 0 app/components/app/patient/entry-form.vue | 9 ++ app/components/app/patient/list.vue | 0 app/components/app/patient/picker.vue | 0 app/components/app/patient/search.vue | 0 app/components/flow/patient/add.vue | 5 ++ app/components/flow/patient/list.vue | 26 ++++++ app/components/layout/AppSidebar.vue | 4 +- app/components/pub/nav/footer/cs.vue | 12 +++ app/components/pub/nav/header/prep.vue | 39 +++++++++ app/components/pub/nav/types.ts | 84 +++++++++++++++++++ app/pages/(features)/patient/[id]/detail.vue | 3 + app/pages/(features)/patient/[id]/edit.vue | 3 + app/pages/(features)/patient/add.vue | 3 + app/pages/(features)/patient/index.vue | 7 ++ 15 files changed, 193 insertions(+), 2 deletions(-) rename app/components/app/auth/{SignIn.vue => sign-in.vue} (100%) create mode 100644 app/components/app/patient/entry-form.vue create mode 100644 app/components/app/patient/list.vue create mode 100644 app/components/app/patient/picker.vue create mode 100644 app/components/app/patient/search.vue create mode 100644 app/components/flow/patient/add.vue create mode 100644 app/components/flow/patient/list.vue create mode 100644 app/components/pub/nav/footer/cs.vue create mode 100644 app/components/pub/nav/header/prep.vue create mode 100644 app/components/pub/nav/types.ts create mode 100644 app/pages/(features)/patient/[id]/detail.vue create mode 100644 app/pages/(features)/patient/[id]/edit.vue create mode 100644 app/pages/(features)/patient/add.vue create mode 100644 app/pages/(features)/patient/index.vue diff --git a/app/components/app/auth/SignIn.vue b/app/components/app/auth/sign-in.vue similarity index 100% rename from app/components/app/auth/SignIn.vue rename to app/components/app/auth/sign-in.vue diff --git a/app/components/app/patient/entry-form.vue b/app/components/app/patient/entry-form.vue new file mode 100644 index 00000000..89d8b1bf --- /dev/null +++ b/app/components/app/patient/entry-form.vue @@ -0,0 +1,9 @@ + + + diff --git a/app/components/app/patient/list.vue b/app/components/app/patient/list.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/patient/picker.vue b/app/components/app/patient/picker.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/app/patient/search.vue b/app/components/app/patient/search.vue new file mode 100644 index 00000000..e69de29b diff --git a/app/components/flow/patient/add.vue b/app/components/flow/patient/add.vue new file mode 100644 index 00000000..fd48eeba --- /dev/null +++ b/app/components/flow/patient/add.vue @@ -0,0 +1,5 @@ + + + diff --git a/app/components/flow/patient/list.vue b/app/components/flow/patient/list.vue new file mode 100644 index 00000000..2f34f96d --- /dev/null +++ b/app/components/flow/patient/list.vue @@ -0,0 +1,26 @@ + + + diff --git a/app/components/layout/AppSidebar.vue b/app/components/layout/AppSidebar.vue index a5ac61fd..70a45eb9 100644 --- a/app/components/layout/AppSidebar.vue +++ b/app/components/layout/AppSidebar.vue @@ -9,9 +9,9 @@ const navMenu: any[] = [ link: '/', }, { - title: 'Home', + title: 'Pasien', icon: 'i-lucide-home', - link: '/', + link: '/patient', }, ], }, diff --git a/app/components/pub/nav/footer/cs.vue b/app/components/pub/nav/footer/cs.vue new file mode 100644 index 00000000..96725a05 --- /dev/null +++ b/app/components/pub/nav/footer/cs.vue @@ -0,0 +1,12 @@ + + + diff --git a/app/components/pub/nav/header/prep.vue b/app/components/pub/nav/header/prep.vue new file mode 100644 index 00000000..6f10cf97 --- /dev/null +++ b/app/components/pub/nav/header/prep.vue @@ -0,0 +1,39 @@ + + + diff --git a/app/components/pub/nav/types.ts b/app/components/pub/nav/types.ts new file mode 100644 index 00000000..91b53410 --- /dev/null +++ b/app/components/pub/nav/types.ts @@ -0,0 +1,84 @@ +import type { ComponentType } from '@unovis/ts' + +export interface ListItemDto { + id: number + name: string + code: string +} + +export interface RecComponent { + idx?: number + rec: object + props?: any + component: ComponentType +} + +export interface Col { + span?: number + classVal?: string + style?: string + width?: number // specific for width + widthUnit?: string // specific for width +} + +export interface Th { + label: string + colSpan?: number + rowSpan?: number + classVal?: string + childClassVal?: string + style?: string + childStyle?: string + hideOnSm?: boolean +} + +export interface ButtonNav { + variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'negative' | 'ghost' | 'link' + classVal?: string + classValExt?: string + icon?: string + label: string + onClick?: () => void +} + +export interface QuickSearchNav { + inputClass?: string + inputPlaceHolder?: string + btnClass?: string + btnIcon?: string + btnLabel?: string + mainField?: string + searchParams: object + onSubmit?: (searchParams: object) => void +} + +export interface RefSearchNav { + onInput: (val: string) => void + onClick: () => void + onClear: () => void +} + +// prepared header for relatively common usage +export interface HeaderPrep { + title?: string + icon?: string + refSearchNav?: RefSearchNav + quickSearchNav?: QuickSearchNav + filterNav?: ButtonNav + addNav?: ButtonNav + printNav?: ButtonNav +} + +export interface KeyLabel { + key: string + label: string +} +export type FuncRecUnknown = (rec: unknown, idx: number) => unknown +export type FuncComponent = (rec: unknown, idx: number) => RecComponent +export type RecStrFuncUnknown = Record +export type RecStrFuncComponent = Record + +export interface KeyNames { + key: string + label: string +} diff --git a/app/pages/(features)/patient/[id]/detail.vue b/app/pages/(features)/patient/[id]/detail.vue new file mode 100644 index 00000000..e01c4948 --- /dev/null +++ b/app/pages/(features)/patient/[id]/detail.vue @@ -0,0 +1,3 @@ + diff --git a/app/pages/(features)/patient/[id]/edit.vue b/app/pages/(features)/patient/[id]/edit.vue new file mode 100644 index 00000000..84e4fac5 --- /dev/null +++ b/app/pages/(features)/patient/[id]/edit.vue @@ -0,0 +1,3 @@ + diff --git a/app/pages/(features)/patient/add.vue b/app/pages/(features)/patient/add.vue new file mode 100644 index 00000000..56dd4be8 --- /dev/null +++ b/app/pages/(features)/patient/add.vue @@ -0,0 +1,3 @@ + diff --git a/app/pages/(features)/patient/index.vue b/app/pages/(features)/patient/index.vue new file mode 100644 index 00000000..e17b61a7 --- /dev/null +++ b/app/pages/(features)/patient/index.vue @@ -0,0 +1,7 @@ + + +