⚡ enhance (lib): adjust libs
This commit is contained in:
@@ -218,3 +218,17 @@ export const instructionCodes: Record<string, string> = {
|
||||
medication: 'Obat',
|
||||
material: 'BMHP',
|
||||
}
|
||||
|
||||
export const relationshipCodes: Record<string, string> = {
|
||||
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',
|
||||
}
|
||||
|
||||
+4
-2
@@ -3,15 +3,16 @@ import { clsx } from 'clsx'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
|
||||
export interface SelectOptionType<T> {
|
||||
value: string
|
||||
label: string
|
||||
value: T
|
||||
code?: string
|
||||
}
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
||||
|
||||
export function mapToFlowbiteOptList(items: Record<string, string>): SelectOptionType<string>[] {
|
||||
export function mapToComboboxOptList(items: Record<string, string>): SelectOptionType<string>[] {
|
||||
if (!items) {
|
||||
return []
|
||||
}
|
||||
@@ -20,6 +21,7 @@ export function mapToFlowbiteOptList(items: Record<string, string>): SelectOptio
|
||||
result.push({
|
||||
label: items[item] as string,
|
||||
value: item,
|
||||
code: item,
|
||||
})
|
||||
})
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user