feat(sep): create constant of sep

This commit is contained in:
riefive
2025-10-21 13:24:51 +07:00
parent 0a62d95d3a
commit 25d44323f4
3 changed files with 53 additions and 15 deletions
+13 -13
View File
@@ -317,17 +317,17 @@ watch(props, (value) => {
>
<div class="flex items-center space-x-2">
<RadioGroupItem
value="Ya"
id="cob-ya"
value="yes"
id="cob-yes"
/>
<Label for="cob-ya">Ya</Label>
<Label for="cob-yes">Ya</Label>
</div>
<div class="flex items-center space-x-2">
<RadioGroupItem
value="Tidak"
id="cob-tidak"
value="no"
id="cob-no"
/>
<Label for="cob-tidak">Tidak</Label>
<Label for="cob-no">Tidak</Label>
</div>
</RadioGroup>
</Field>
@@ -403,17 +403,17 @@ watch(props, (value) => {
>
<div class="flex items-center space-x-2">
<RadioGroupItem
value="Ya"
id="cob-ya"
value="yes"
id="cob-yes"
/>
<Label for="cob-ya">Ya</Label>
<Label for="cob-yes">Ya</Label>
</div>
<div class="flex items-center space-x-2">
<RadioGroupItem
value="Tidak"
id="cob-tidak"
id="cob-no"
/>
<Label for="cob-tidak">Tidak</Label>
<Label for="cob-no">Tidak</Label>
</div>
</RadioGroup>
</Field>
@@ -432,14 +432,14 @@ watch(props, (value) => {
>
<div class="flex items-center space-x-2">
<RadioGroupItem
value="Ya"
value="yes"
id="cataract-yes"
/>
<Label for="cataract-yes">Ya</Label>
</div>
<div class="flex items-center space-x-2">
<RadioGroupItem
value="Tidak"
value="no"
id="cataract-no"
/>
<Label for="cataract-no">Tidak</Label>
+10 -2
View File
@@ -16,14 +16,15 @@ const props = defineProps<{
const emit = defineEmits<{
'update:modelValue': [value: string]
'update:searchText': [value: string]
}>()
const open = ref(false)
const searchText = ref('')
const debouncedSearchText = refDebounced(searchText, 500) // 500ms debounce
const selectedItem = computed(() => props.items.find((item) => item.value === props.modelValue))
const displayText = computed(() => {
console.log(selectedItem)
if (selectedItem.value?.label) {
return selectedItem.value.label
}
@@ -34,6 +35,12 @@ watch(props, () => {
console.log(props.modelValue)
})
watch(debouncedSearchText, (newValue) => {
if (newValue.length > 0) {
emit('update:searchText', newValue)
}
})
const searchableItems = computed(() => {
const itemsWithSearch = props.items.map((item) => ({
...item,
@@ -106,6 +113,7 @@ function onSelect(item: Item) {
class="h-9 border-0 border-b border-gray-200 bg-white text-black focus:ring-0 dark:border-gray-700 dark:bg-gray-800 dark:text-white"
:placeholder="searchPlaceholder || 'Cari...'"
:aria-label="`Cari ${displayText}`"
:v-model="searchText"
/>
<CommandEmpty class="py-6 text-center text-sm text-gray-500 dark:text-gray-400">
{{ emptyMessage || 'Item tidak ditemukan.' }}
+30
View File
@@ -366,3 +366,33 @@ export const medicalActionTypeCode: Record<string, string> = {
} as const
export type medicalActionTypeCodeKey = keyof typeof medicalActionTypeCode
export const lakaStatuses: Record<string, string> = {
'0': 'Bukan Kecelakaan lalu lintas [BKLL]',
'1': 'KLL dan Bukan Kecelakaan Kerja [BKK]',
'2': 'KLL',
'3': 'KK',
}
export const supportCodes: Record<string, string> = {
'1': 'Radioterapi',
'2': 'Kemoterapi',
'3': 'Rehabilitasi Medik',
'4': 'Rehabilitasi Psikososial',
'5': 'Transfusi Darah',
'6': 'Pelayanan Gigi',
'7': 'Laboratorium',
'8': 'USG',
'9': 'Farmasi',
'10': 'Lain-Lain',
'11': 'MRI',
'12': 'HEMODIALISA',
}
export const serviceAssessments: Record<string, string> = {
'1': 'Poli spesialis tidak tersedia pada hari sebelumnya',
'2': 'Jam Poli telah berakhir pada hari sebelumnya',
'3': 'Dokter Spesialis yang dimaksud tidak praktek pada hari sebelumnya',
'4': 'Atas Instruksi RS',
'5': 'Tujuan Kontrol',
}