From d7d984810e87cecaeccab54845757d27d024e3c7 Mon Sep 17 00:00:00 2001 From: riefive Date: Thu, 2 Oct 2025 11:00:05 +0700 Subject: [PATCH] remove previous list + form from any features --- .../app/installation/entry-form-prev.vue | 125 --------- .../app/specialist/entry-form-prev.vue | 181 ------------- .../app/subspecialist/entry-form-prev.vue | 213 ---------------- app/components/app/unit/entry-form-prev.vue | 125 --------- app/components/content/installation/entry.ts | 37 --- .../content/installation/list-prev.vue | 206 --------------- app/components/content/specialist/entry.ts | 95 ------- .../content/specialist/list-prev.vue | 240 ------------------ app/components/content/subspecialist/entry.ts | 98 ------- .../content/subspecialist/list-prev.vue | 239 ----------------- app/components/content/unit/entry.ts | 63 ----- app/components/content/unit/list-prev.vue | 207 --------------- 12 files changed, 1829 deletions(-) delete mode 100644 app/components/app/installation/entry-form-prev.vue delete mode 100644 app/components/app/specialist/entry-form-prev.vue delete mode 100644 app/components/app/subspecialist/entry-form-prev.vue delete mode 100644 app/components/app/unit/entry-form-prev.vue delete mode 100644 app/components/content/installation/entry.ts delete mode 100644 app/components/content/installation/list-prev.vue delete mode 100644 app/components/content/specialist/entry.ts delete mode 100644 app/components/content/specialist/list-prev.vue delete mode 100644 app/components/content/subspecialist/entry.ts delete mode 100644 app/components/content/subspecialist/list-prev.vue delete mode 100644 app/components/content/unit/entry.ts delete mode 100644 app/components/content/unit/list-prev.vue diff --git a/app/components/app/installation/entry-form-prev.vue b/app/components/app/installation/entry-form-prev.vue deleted file mode 100644 index 8272fc27..00000000 --- a/app/components/app/installation/entry-form-prev.vue +++ /dev/null @@ -1,125 +0,0 @@ - - - diff --git a/app/components/app/specialist/entry-form-prev.vue b/app/components/app/specialist/entry-form-prev.vue deleted file mode 100644 index 2dbfffc1..00000000 --- a/app/components/app/specialist/entry-form-prev.vue +++ /dev/null @@ -1,181 +0,0 @@ - - - diff --git a/app/components/app/subspecialist/entry-form-prev.vue b/app/components/app/subspecialist/entry-form-prev.vue deleted file mode 100644 index 9d31fd3f..00000000 --- a/app/components/app/subspecialist/entry-form-prev.vue +++ /dev/null @@ -1,213 +0,0 @@ - - - diff --git a/app/components/app/unit/entry-form-prev.vue b/app/components/app/unit/entry-form-prev.vue deleted file mode 100644 index 463a6683..00000000 --- a/app/components/app/unit/entry-form-prev.vue +++ /dev/null @@ -1,125 +0,0 @@ - - - diff --git a/app/components/content/installation/entry.ts b/app/components/content/installation/entry.ts deleted file mode 100644 index c003a029..00000000 --- a/app/components/content/installation/entry.ts +++ /dev/null @@ -1,37 +0,0 @@ -import * as z from 'zod' - -export const installationConf = { - msg: { - placeholder: '---pilih encounter class (fhir7)', - }, - items: [ - { value: '1', label: 'Ambulatory', code: 'AMB' }, - { value: '2', label: 'Inpatient', code: 'IMP' }, - { value: '3', label: 'Emergency', code: 'EMER' }, - { value: '4', label: 'Observation', code: 'OBSENC' }, - { value: '5', label: 'Pre-admission', code: 'PRENC' }, - { value: '6', label: 'Short Stay', code: 'SS' }, - { value: '7', label: 'Virtual', code: 'VR' }, - { value: '8', label: 'Home Health', code: 'HH' }, - ], -} - -export const schemaConf = z.object({ - name: z - .string({ - required_error: 'Nama instalasi harus diisi', - }) - .min(3, 'Nama instalasi minimal 3 karakter'), - - code: z - .string({ - required_error: 'Kode instalasi harus diisi', - }) - .min(3, 'Kode instalasi minimal 3 karakter'), - - encounterClassCode: z - .string({ - required_error: 'Kelompok encounter class harus dipilih', - }) - .min(1, 'Kelompok encounter class harus dipilih'), -}) diff --git a/app/components/content/installation/list-prev.vue b/app/components/content/installation/list-prev.vue deleted file mode 100644 index 59a96c00..00000000 --- a/app/components/content/installation/list-prev.vue +++ /dev/null @@ -1,206 +0,0 @@ - - - - - diff --git a/app/components/content/specialist/entry.ts b/app/components/content/specialist/entry.ts deleted file mode 100644 index c89302c2..00000000 --- a/app/components/content/specialist/entry.ts +++ /dev/null @@ -1,95 +0,0 @@ -import * as z from 'zod' - -export const schemaConf = z.object({ - name: z - .string({ - required_error: 'Nama spesialisasi harus diisi', - }) - .min(3, 'Nama spesialisasi minimal 3 karakter'), - - code: z - .string({ - required_error: 'Kode spesialisasi harus diisi', - }) - .min(3, 'Kode spesialisasi minimal 3 karakter'), - - installationId: z - .string({ - required_error: 'Instalasi harus dipilih', - }) - .min(1, 'Instalasi harus dipilih'), - - unitId: z - .string({ - required_error: 'Unit harus dipilih', - }) - .min(1, 'Unit harus dipilih'), -}) - -// Unit mapping berdasarkan installation -export const installationUnitMapping: Record = { - '1': ['1', '3', '5'], - '2': ['2', '4', '6'], - '3': ['7', '8', '9', '10', '11'], -} - -export const unitConf = { - msg: { - placeholder: '---pilih unit', - search: 'kode, nama unit', - empty: 'unit tidak ditemukan', - }, - items: [ - { value: '1', label: 'Instalasi Medis', code: 'MED' }, - { value: '2', label: 'Instalasi Keperawatan', code: 'NUR' }, - { value: '3', label: 'Instalasi Administrasi', code: 'ADM' }, - { value: '4', label: 'Instalasi Penunjang Non-Medis', code: 'SUP' }, - { value: '5', label: 'Instalasi Pendidikan & Pelatihan', code: 'EDU' }, - { value: '6', label: 'Instalasi Farmasi', code: 'PHA' }, - { value: '7', label: 'Instalasi Radiologi', code: 'RAD' }, - { value: '8', label: 'Instalasi Laboratorium', code: 'LAB' }, - { value: '9', label: 'Instalasi Keuangan', code: 'FIN' }, - { value: '10', label: 'Instalasi SDM', code: 'HR' }, - { value: '11', label: 'Instalasi Teknologi Informasi', code: 'ITS' }, - { value: '12', label: 'Instalasi Pemeliharaan & Sarana', code: 'MNT' }, - { value: '13', label: 'Instalasi Gizi / Catering', code: 'CAT' }, - { value: '14', label: 'Instalasi Keamanan', code: 'SEC' }, - { value: '15', label: 'Instalasi Gawat Darurat', code: 'EMR' }, - { value: '16', label: 'Instalasi Bedah Sentral', code: 'SUR' }, - { value: '17', label: 'Instalasi Rawat Jalan', code: 'OUT' }, - { value: '18', label: 'Instalasi Rawat Inap', code: 'INP' }, - { value: '19', label: 'Instalasi Rehabilitasi Medik', code: 'REB' }, - { value: '20', label: 'Instalasi Penelitian & Pengembangan', code: 'RSH' }, - ], -} - -export const installationConf = { - msg: { - placeholder: '---pilih instalasi', - search: 'kode, nama instalasi', - empty: 'instalasi tidak ditemukan', - }, - items: [ - { value: '1', label: 'Ambulatory', code: 'AMB' }, - { value: '2', label: 'Inpatient', code: 'IMP' }, - { value: '3', label: 'Emergency', code: 'EMER' }, - ], -} - -// Helper function untuk filter unit berdasarkan installation -export function getFilteredUnits(installationId: string) { - if (!installationId || !installationUnitMapping[installationId]) { - return [] - } - - const allowedUnitIds = installationUnitMapping[installationId] - return unitConf.items.filter((unit) => allowedUnitIds.includes(unit.value)) -} - -// Helper function untuk membuat unit config yang ter-filter -export function createFilteredUnitConf(installationId: string) { - return { - ...unitConf, - items: getFilteredUnits(installationId), - } -} diff --git a/app/components/content/specialist/list-prev.vue b/app/components/content/specialist/list-prev.vue deleted file mode 100644 index ee6d7f8b..00000000 --- a/app/components/content/specialist/list-prev.vue +++ /dev/null @@ -1,240 +0,0 @@ - - - - - diff --git a/app/components/content/subspecialist/entry.ts b/app/components/content/subspecialist/entry.ts deleted file mode 100644 index 5a93847d..00000000 --- a/app/components/content/subspecialist/entry.ts +++ /dev/null @@ -1,98 +0,0 @@ -import * as z from 'zod' - -export const schemaConf = z.object({ - name: z - .string({ - required_error: 'Nama spesialisasi harus diisi', - }) - .min(3, 'Nama spesialisasi minimal 3 karakter'), - - code: z - .string({ - required_error: 'Kode spesialisasi harus diisi', - }) - .min(3, 'Kode spesialisasi minimal 3 karakter'), - - installationId: z - .string({ - required_error: 'Instalasi harus dipilih', - }) - .min(1, 'Instalasi harus dipilih'), - - unitId: z - .string({ - required_error: 'Unit harus dipilih', - }) - .min(1, 'Unit harus dipilih'), - specialistId: z - .string({ - required_error: 'Specialist harus dipilih', - }) - .min(1, 'Specialist harus dipilih'), -}) - -// Unit mapping berdasarkan installation -export const installationUnitMapping: Record = { - '1': ['1', '3'], - '2': ['2', '3'], - '3': ['1', '2', '3'], -} - -export const unitConf = { - msg: { - placeholder: '---pilih unit', - search: 'kode, nama unit', - empty: 'unit tidak ditemukan', - }, - items: [ - { value: '1', label: 'Instalasi Medis', code: 'MED' }, - { value: '2', label: 'Instalasi Keperawatan', code: 'NUR' }, - { value: '3', label: 'Instalasi Administrasi', code: 'ADM' }, - ], -} - -export const specialistConf = { - msg: { - placeholder: '---pilih specialist', - search: 'kode, nama specialist', - empty: 'specialist tidak ditemukan', - }, - items: [ - { value: '1', label: 'Spesialis Jantung', code: 'CARD' }, - { value: '2', label: 'Spesialis Mata', code: 'OPHT' }, - { value: '3', label: 'Spesialis Bedah', code: 'SURG' }, - { value: '4', label: 'Spesialis Anak', code: 'PEDI' }, - { value: '5', label: 'Spesialis Kandungan', code: 'OBGY' }, - ], -} - -export const installationConf = { - msg: { - placeholder: '---pilih instalasi', - search: 'kode, nama instalasi', - empty: 'instalasi tidak ditemukan', - }, - items: [ - { value: '1', label: 'Ambulatory', code: 'AMB' }, - { value: '2', label: 'Inpatient', code: 'IMP' }, - { value: '3', label: 'Emergency', code: 'EMER' }, - ], -} - -// Helper function untuk filter unit berdasarkan installation -export function getFilteredUnits(installationId: string) { - if (!installationId || !installationUnitMapping[installationId]) { - return [] - } - - const allowedUnitIds = installationUnitMapping[installationId] - return unitConf.items.filter((unit) => allowedUnitIds.includes(unit.value)) -} - -// Helper function untuk membuat unit config yang ter-filter -export function createFilteredUnitConf(installationId: string) { - return { - ...unitConf, - items: getFilteredUnits(installationId), - } -} diff --git a/app/components/content/subspecialist/list-prev.vue b/app/components/content/subspecialist/list-prev.vue deleted file mode 100644 index a5496df6..00000000 --- a/app/components/content/subspecialist/list-prev.vue +++ /dev/null @@ -1,239 +0,0 @@ - - - diff --git a/app/components/content/unit/entry.ts b/app/components/content/unit/entry.ts deleted file mode 100644 index bf85a0ed..00000000 --- a/app/components/content/unit/entry.ts +++ /dev/null @@ -1,63 +0,0 @@ -import * as z from 'zod' - -export const unitConf = { - msg: { - placeholder: '--- pilih instalasi', - search: 'kode, nama instalasi', - empty: 'instalasi tidak ditemukan', - }, - items: [ - { value: '1', label: 'Instalasi Medis', code: 'MED' }, - { value: '2', label: 'Instalasi Keperawatan', code: 'NUR' }, - { value: '3', label: 'Instalasi Administrasi', code: 'ADM' }, - { value: '4', label: 'Instalasi Penunjang Non-Medis', code: 'SUP' }, - { value: '5', label: 'Instalasi Pendidikan & Pelatihan', code: 'EDU' }, - { value: '6', label: 'Instalasi Farmasi', code: 'PHA' }, - { value: '7', label: 'Instalasi Radiologi', code: 'RAD' }, - { value: '8', label: 'Instalasi Laboratorium', code: 'LAB' }, - { value: '9', label: 'Instalasi Keuangan', code: 'FIN' }, - { value: '10', label: 'Instalasi SDM', code: 'HR' }, - { value: '11', label: 'Instalasi Teknologi Informasi', code: 'ITS' }, - { value: '12', label: 'Instalasi Pemeliharaan & Sarana', code: 'MNT' }, - { value: '13', label: 'Instalasi Gizi / Catering', code: 'CAT' }, - { value: '14', label: 'Instalasi Keamanan', code: 'SEC' }, - { value: '15', label: 'Instalasi Gawat Darurat', code: 'EMR' }, - { value: '16', label: 'Instalasi Bedah Sentral', code: 'SUR' }, - { value: '17', label: 'Instalasi Rawat Jalan', code: 'OUT' }, - { value: '18', label: 'Instalasi Rawat Inap', code: 'INP' }, - { value: '19', label: 'Instalasi Rehabilitasi Medik', code: 'REB' }, - { value: '20', label: 'Instalasi Penelitian & Pengembangan', code: 'RSH' }, - ], -} - -export const schemaConf = z.object({ - name: z - .string({ - required_error: 'Nama unit harus diisi', - }) - .min(1, 'Nama unit harus diisi'), - - code: z - .string({ - required_error: 'Kode unit harus diisi', - }) - .min(1, 'Kode unit harus diisi'), - parentId: z.preprocess( - (input: unknown) => { - if (typeof input === 'string') { - // Handle empty string case - if (input.trim() === '') { - return 0 - } - return Number(input) - } - - return input - }, - z - .number({ - required_error: 'Instalasi induk harus dipilih', - }) - .refine((num) => num > 0, 'Instalasi induk harus dipilih'), - ), -}) diff --git a/app/components/content/unit/list-prev.vue b/app/components/content/unit/list-prev.vue deleted file mode 100644 index 9cee37a1..00000000 --- a/app/components/content/unit/list-prev.vue +++ /dev/null @@ -1,207 +0,0 @@ - - - - -