From 61b71f7e764aaeb74115a89e6b432b1914a9640d Mon Sep 17 00:00:00 2001 From: Abizrh Date: Mon, 25 Aug 2025 09:59:44 +0700 Subject: [PATCH] =?UTF-8?q?=E2=9A=A0=EF=B8=8F=20refactor=20(components):?= =?UTF-8?q?=20restructure=20components=20to=20custom-ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/app/doctor/entry-form.vue | 11 +++-- app/components/app/doctor/list-cfg.ts | 11 ++++- app/components/app/patient/entry-form.vue | 11 +++-- app/components/app/patient/list-cfg.ts | 11 ++++- app/components/flow/doctor/list.vue | 3 +- app/components/flow/patient/list.vue | 8 ++-- .../pub/base/{ => data-table}/data-table.vue | 0 app/components/pub/base/{ => error}/error.vue | 0 .../{ => summary-card}/summary-card.type.ts | 0 .../base/{ => summary-card}/summary-card.vue | 0 .../custom-ui/confirmation/confirmation.vue | 0 .../confirmation/record-confirmation.vue | 0 .../data}/dropdown-action-du.vue | 0 .../data}/dropdown-action-ducd.vue | 0 .../data}/dropdown-action-dud.vue | 0 .../data}/dropdown-action-ud.vue | 0 .../pub/{nav => custom-ui/data}/types.ts | 0 .../pub/{ => custom-ui}/form/block.vue | 0 .../pub/{ => custom-ui}/form/field-group.vue | 0 .../pub/{ => custom-ui}/form/field.vue | 0 .../pub/{ => custom-ui}/form/label.vue | 0 .../pub/custom-ui/nav-footer/ba-dr-su-pr.vue | 32 +++++++++++++ .../nav-footer/ba-dr-su.vue} | 6 +-- .../pub/custom-ui/nav-footer/ba-ed-de-pri.vue | 32 +++++++++++++ .../pub/custom-ui/nav-footer/ba-ed-de.vue | 28 +++++++++++ .../pub/custom-ui/nav-footer/ba-ed-pri.vue | 28 +++++++++++ .../pub/custom-ui/nav-footer/ba-ed.vue | 24 ++++++++++ .../cs.vue => custom-ui/nav-footer/ba-su.vue} | 4 +- .../pub/custom-ui/nav-header/header.vue | 19 ++++++++ .../header => custom-ui/nav-header}/prep.vue | 0 .../pub/custom-ui/nav-header/search.vue | 42 +++++++++++++++++ app/components/pub/nav/data-table.vue | 46 ------------------- app/pages/(features)/doctor/add.vue | 3 +- app/pages/(features)/doctor/index.vue | 3 +- app/pages/(features)/patient/add.vue | 3 +- app/pages/(features)/patient/index.vue | 3 +- 36 files changed, 255 insertions(+), 73 deletions(-) rename app/components/pub/base/{ => data-table}/data-table.vue (100%) rename app/components/pub/base/{ => error}/error.vue (100%) rename app/components/pub/base/{ => summary-card}/summary-card.type.ts (100%) rename app/components/pub/base/{ => summary-card}/summary-card.vue (100%) create mode 100644 app/components/pub/custom-ui/confirmation/confirmation.vue create mode 100644 app/components/pub/custom-ui/confirmation/record-confirmation.vue rename app/components/pub/{nav => custom-ui/data}/dropdown-action-du.vue (100%) rename app/components/pub/{nav => custom-ui/data}/dropdown-action-ducd.vue (100%) rename app/components/pub/{nav => custom-ui/data}/dropdown-action-dud.vue (100%) rename app/components/pub/{nav => custom-ui/data}/dropdown-action-ud.vue (100%) rename app/components/pub/{nav => custom-ui/data}/types.ts (100%) rename app/components/pub/{ => custom-ui}/form/block.vue (100%) rename app/components/pub/{ => custom-ui}/form/field-group.vue (100%) rename app/components/pub/{ => custom-ui}/form/field.vue (100%) rename app/components/pub/{ => custom-ui}/form/label.vue (100%) create mode 100644 app/components/pub/custom-ui/nav-footer/ba-dr-su-pr.vue rename app/components/pub/{nav/footer/csd.vue => custom-ui/nav-footer/ba-dr-su.vue} (95%) create mode 100644 app/components/pub/custom-ui/nav-footer/ba-ed-de-pri.vue create mode 100644 app/components/pub/custom-ui/nav-footer/ba-ed-de.vue create mode 100644 app/components/pub/custom-ui/nav-footer/ba-ed-pri.vue create mode 100644 app/components/pub/custom-ui/nav-footer/ba-ed.vue rename app/components/pub/{nav/footer/cs.vue => custom-ui/nav-footer/ba-su.vue} (95%) create mode 100644 app/components/pub/custom-ui/nav-header/header.vue rename app/components/pub/{nav/header => custom-ui/nav-header}/prep.vue (100%) create mode 100644 app/components/pub/custom-ui/nav-header/search.vue delete mode 100644 app/components/pub/nav/data-table.vue diff --git a/app/components/app/doctor/entry-form.vue b/app/components/app/doctor/entry-form.vue index bb638f94..2c7ecac2 100644 --- a/app/components/app/doctor/entry-form.vue +++ b/app/components/app/doctor/entry-form.vue @@ -1,8 +1,9 @@ diff --git a/app/components/app/patient/list-cfg.ts b/app/components/app/patient/list-cfg.ts index 0e1fe7f4..d9c9439f 100644 --- a/app/components/app/patient/list-cfg.ts +++ b/app/components/app/patient/list-cfg.ts @@ -1,9 +1,16 @@ -import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, RecStrFuncUnknown, Th } from '../../pub/nav/types' +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/custom-ui/data/types' import { defineAsyncComponent } from 'vue' type SmallDetailDto = any -const action = defineAsyncComponent(() => import('~/components/pub/nav/dropdown-action-dud.vue')) +const action = defineAsyncComponent(() => import('~/components/pub/custom-ui/data/dropdown-action-dud.vue')) export const cols: Col[] = [ {}, diff --git a/app/components/flow/doctor/list.vue b/app/components/flow/doctor/list.vue index c6007660..933eac5d 100644 --- a/app/components/flow/doctor/list.vue +++ b/app/components/flow/doctor/list.vue @@ -1,5 +1,6 @@ diff --git a/app/components/flow/patient/list.vue b/app/components/flow/patient/list.vue index 3131d81d..82081596 100644 --- a/app/components/flow/patient/list.vue +++ b/app/components/flow/patient/list.vue @@ -2,6 +2,8 @@ import type { Summary } from '~/components/pub/base/summary-card.type' import type { HeaderPrep, RefSearchNav } from '~/components/pub/nav/types' import { Calendar, Hospital, UserCheck, UsersRound } from 'lucide-vue-next' +import SummaryCard from '~/components/pub/base/summary-card/summary-card.vue' +import Header from '~/components/pub/custom-ui/nav-header/prep.vue' const data = ref([]) @@ -100,14 +102,14 @@ provide('rec_item', recItem) diff --git a/app/components/pub/custom-ui/nav-footer/ba-ed-de-pri.vue b/app/components/pub/custom-ui/nav-footer/ba-ed-de-pri.vue new file mode 100644 index 00000000..18e67b86 --- /dev/null +++ b/app/components/pub/custom-ui/nav-footer/ba-ed-de-pri.vue @@ -0,0 +1,32 @@ + + + diff --git a/app/components/pub/custom-ui/nav-footer/ba-ed-de.vue b/app/components/pub/custom-ui/nav-footer/ba-ed-de.vue new file mode 100644 index 00000000..9c79eba9 --- /dev/null +++ b/app/components/pub/custom-ui/nav-footer/ba-ed-de.vue @@ -0,0 +1,28 @@ + + + diff --git a/app/components/pub/custom-ui/nav-footer/ba-ed-pri.vue b/app/components/pub/custom-ui/nav-footer/ba-ed-pri.vue new file mode 100644 index 00000000..5190ec04 --- /dev/null +++ b/app/components/pub/custom-ui/nav-footer/ba-ed-pri.vue @@ -0,0 +1,28 @@ + + + diff --git a/app/components/pub/custom-ui/nav-footer/ba-ed.vue b/app/components/pub/custom-ui/nav-footer/ba-ed.vue new file mode 100644 index 00000000..e81ce917 --- /dev/null +++ b/app/components/pub/custom-ui/nav-footer/ba-ed.vue @@ -0,0 +1,24 @@ + + + diff --git a/app/components/pub/nav/footer/cs.vue b/app/components/pub/custom-ui/nav-footer/ba-su.vue similarity index 95% rename from app/components/pub/nav/footer/cs.vue rename to app/components/pub/custom-ui/nav-footer/ba-su.vue index d51bf74a..79e18d57 100644 --- a/app/components/pub/nav/footer/cs.vue +++ b/app/components/pub/custom-ui/nav-footer/ba-su.vue @@ -14,11 +14,11 @@ function onClick(type: ClickType) {
diff --git a/app/components/pub/custom-ui/nav-header/header.vue b/app/components/pub/custom-ui/nav-header/header.vue new file mode 100644 index 00000000..10f06af2 --- /dev/null +++ b/app/components/pub/custom-ui/nav-header/header.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/pub/nav/header/prep.vue b/app/components/pub/custom-ui/nav-header/prep.vue similarity index 100% rename from app/components/pub/nav/header/prep.vue rename to app/components/pub/custom-ui/nav-header/prep.vue diff --git a/app/components/pub/custom-ui/nav-header/search.vue b/app/components/pub/custom-ui/nav-header/search.vue new file mode 100644 index 00000000..dba29318 --- /dev/null +++ b/app/components/pub/custom-ui/nav-header/search.vue @@ -0,0 +1,42 @@ + + + diff --git a/app/components/pub/nav/data-table.vue b/app/components/pub/nav/data-table.vue deleted file mode 100644 index 9dc72099..00000000 --- a/app/components/pub/nav/data-table.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - diff --git a/app/pages/(features)/doctor/add.vue b/app/pages/(features)/doctor/add.vue index 3f23c8a5..987baa28 100644 --- a/app/pages/(features)/doctor/add.vue +++ b/app/pages/(features)/doctor/add.vue @@ -1,5 +1,6 @@