From 5ad286a44e3f1fffb349d8ea2aaabb19c9615bc9 Mon Sep 17 00:00:00 2001 From: Khafid Prayoga Date: Wed, 26 Nov 2025 10:18:29 +0700 Subject: [PATCH] wip: add form data pelaksanaan operasi todo: blood input section * ui: patch focus ring state * layouts-pages: fix width layout calculation feat(treatment-report): add fill-notes component and validation messages - Add new FillNotes component for tissue notes input with dynamic fields - Update schema validation with required error messages for operation and specimen fields - Adjust form layout to include new FillNotes component and improve field organization cherry-pick arrangement procedure from feat/protokol-terapi-116 --- .../dropdown-action-p.vue | 64 ++++++ .../procedure-list-cfg.ts | 33 +++ .../arrangement-procedure/procedure-list.vue | 120 ++++++++++ .../procedure-picker.vue | 62 +++++ .../app/treatment-report/entry-form.vue | 215 +++++++++++++++++- .../treatment-report/fields/fill-notes.vue | 65 ++++++ .../app/treatment-report/fields/index.ts | 9 + .../fields/select-billing.vue | 68 ++++++ .../fields/select-birth-place.vue | 71 ++++++ .../fields/select-birth-type.vue | 67 ++++++ .../fields/select-operation-system.vue | 69 ++++++ .../fields/select-operation-type.vue | 69 ++++++ .../fields/select-specimen.vue | 69 ++++++ .../fields/select-surgery-counter.vue | 67 ++++++ .../fields/select-surgery-type.vue | 69 ++++++ app/components/pub/my-ui/form/input-base.vue | 9 +- .../pub/my-ui/form/text-area-input.vue | 17 +- app/components/pub/ui/input/Input.vue | 2 +- app/layouts/default.vue | 88 +++---- app/pages/(features)/treatment-report/add.vue | 2 +- app/schemas/treatment-report.schema.ts | 30 ++- 21 files changed, 1198 insertions(+), 67 deletions(-) create mode 100644 app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/dropdown-action-p.vue create mode 100644 app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-list-cfg.ts create mode 100644 app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-list.vue create mode 100644 app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-picker.vue create mode 100644 app/components/app/treatment-report/fields/fill-notes.vue create mode 100644 app/components/app/treatment-report/fields/index.ts create mode 100644 app/components/app/treatment-report/fields/select-billing.vue create mode 100644 app/components/app/treatment-report/fields/select-birth-place.vue create mode 100644 app/components/app/treatment-report/fields/select-birth-type.vue create mode 100644 app/components/app/treatment-report/fields/select-operation-system.vue create mode 100644 app/components/app/treatment-report/fields/select-operation-type.vue create mode 100644 app/components/app/treatment-report/fields/select-specimen.vue create mode 100644 app/components/app/treatment-report/fields/select-surgery-counter.vue create mode 100644 app/components/app/treatment-report/fields/select-surgery-type.vue diff --git a/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/dropdown-action-p.vue b/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/dropdown-action-p.vue new file mode 100644 index 00000000..91e9f72c --- /dev/null +++ b/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/dropdown-action-p.vue @@ -0,0 +1,64 @@ + + + diff --git a/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-list-cfg.ts b/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-list-cfg.ts new file mode 100644 index 00000000..cc02aa1d --- /dev/null +++ b/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-list-cfg.ts @@ -0,0 +1,33 @@ +import type { Config, RecComponent } from '~/components/pub/my-ui/data-table' +import { defineAsyncComponent } from 'vue' + +const action = defineAsyncComponent(() => import('./dropdown-action-p.vue')) + +export const config: Config = { + cols: [{}, {}, {}, { width: 50 }], + + headers: [[{ label: 'Kode' }, { label: 'Nama (FHIR)' }, { label: 'Nama (ID)' }, { label: '' }]], + + keys: ['code', 'name', 'indName', 'action'], + + delKeyNames: [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama (FHIR)' }, + { key: 'indName', label: 'Nama (ID)' }, + ], + + parses: {}, + + components: { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, + }, + + htmls: {}, +} diff --git a/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-list.vue b/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-list.vue new file mode 100644 index 00000000..e4836c7c --- /dev/null +++ b/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-list.vue @@ -0,0 +1,120 @@ + + + diff --git a/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-picker.vue b/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-picker.vue new file mode 100644 index 00000000..4a44a40f --- /dev/null +++ b/app/components/app/therapy-protocol/picker-dialog/arrangement-procedure/procedure-picker.vue @@ -0,0 +1,62 @@ + + + diff --git a/app/components/app/treatment-report/entry-form.vue b/app/components/app/treatment-report/entry-form.vue index 8e19cc64..994165bb 100644 --- a/app/components/app/treatment-report/entry-form.vue +++ b/app/components/app/treatment-report/entry-form.vue @@ -14,7 +14,18 @@ import * as DE from '~/components/pub/my-ui/doc-entry' import Separator from '~/components/pub/ui/separator/Separator.vue' // form field components -import { ButtonAction, Fragment, InputBase } from '~/components/pub/my-ui/form/' +import { + FillNotes, + SelectBilling, + SelectBirthPlace, + SelectBirthType, + SelectOperationSystem, + SelectOperationType, + SelectSpecimen, + SelectSurgeryCounter, + SelectSurgeryType, +} from './fields' +import { ButtonAction, Fragment, InputBase, TextAreaInput } from '~/components/pub/my-ui/form/' import { SelectDoctor } from '~/components/app/doctor/fields' // Helpers @@ -38,6 +49,7 @@ const emit = defineEmits<{ (e: 'error', errors: Error): void }>() +const tissueNotesLimit = 5 const { isLoading, mode = 'create' } = props const isReadonly = computed(() => { if (isLoading) { @@ -113,39 +125,45 @@ const onSubmit = handleSubmit( field-name="operatorTeam.operatorId" label="Operator" placeholder="Masukkan operator" + :is-disabled="isReadonly" /> - @@ -183,13 +201,194 @@ const onSubmit = handleSubmit( :col-count="3" :cell-flex="false" > - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bloods + + + + + + + + + + + + +