From 64d432f75a3a94e26ce2f6995a98e43bf884c021 Mon Sep 17 00:00:00 2001 From: Abizrh Date: Thu, 11 Sep 2025 00:56:36 +0700 Subject: [PATCH 1/4] =?UTF-8?q?=E2=9A=A1=20enhance=20(lib):=20adjust=20lib?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/constants.ts | 14 ++++++++++++++ app/lib/utils.ts | 6 ++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/lib/constants.ts b/app/lib/constants.ts index d904a87e..866fc520 100644 --- a/app/lib/constants.ts +++ b/app/lib/constants.ts @@ -218,3 +218,17 @@ export const instructionCodes: Record = { medication: 'Obat', material: 'BMHP', } + +export const relationshipCodes: Record = { + mother: 'Ibu', + father: 'Ayah', + uncle: 'Paman', + aunt: 'Bibi', + sibling: 'Saudara', + 'gd-mother': 'Nenek', + 'gd-father': 'Kakek', + child: 'Anak', + nephew: 'Keponakan', + 'gd-child': 'Cucu', + other: 'Lainnya', +} diff --git a/app/lib/utils.ts b/app/lib/utils.ts index 59afb775..c6098e1b 100644 --- a/app/lib/utils.ts +++ b/app/lib/utils.ts @@ -3,15 +3,16 @@ import { clsx } from 'clsx' import { twMerge } from 'tailwind-merge' export interface SelectOptionType { + value: string label: string - value: T + code?: string } export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) } -export function mapToFlowbiteOptList(items: Record): SelectOptionType[] { +export function mapToComboboxOptList(items: Record): SelectOptionType[] { if (!items) { return [] } @@ -20,6 +21,7 @@ export function mapToFlowbiteOptList(items: Record): SelectOptio result.push({ label: items[item] as string, value: item, + code: item, }) }) return result From 053a540638e93249bb8ae071e1d094eaab1f57f9 Mon Sep 17 00:00:00 2001 From: Abizrh Date: Thu, 11 Sep 2025 00:57:12 +0700 Subject: [PATCH 2/4] =?UTF-8?q?=E2=9A=A1=20enhance=20(pub):=20adjust=20for?= =?UTF-8?q?m=20label?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/pub/custom-ui/form/label.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/pub/custom-ui/form/label.vue b/app/components/pub/custom-ui/form/label.vue index f04081ee..42274ee6 100644 --- a/app/components/pub/custom-ui/form/label.vue +++ b/app/components/pub/custom-ui/form/label.vue @@ -48,7 +48,7 @@ const labelClass = computed(() => [props.stacked ? 'block mb-1 text-sm font-medi