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