⚠️ refactor (components): rename flow components to content

This commit is contained in:
Abizrh
2025-09-07 22:58:18 +07:00
parent cdebdb8995
commit 263f9dbc7f
35 changed files with 17 additions and 18 deletions

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
<script setup lang="ts">
const data = ref({
name: '',
password: '',
status: '',
type: '',
})
</script>
<template>
<div class="mb-5 border-b border-b-slate-300 pb-3 text-lg xl:text-xl">
<Icon name="i-lucide-user" class="me-2" />
<span class="font-semibold">Tambah</span> Obat
</div>
<AppMedicineEntryForm v-model="data" />
</template>
+63
View File
@@ -0,0 +1,63 @@
<script setup lang="ts">
import type { DataTableLoader } from '~/components/pub/base/data-table/type'
import type { HeaderPrep, RefSearchNav } from '~/components/pub/custom-ui/data/types'
import Header from '~/components/pub/custom-ui/nav-header/prep.vue'
const data = ref([])
const refSearchNav: RefSearchNav = {
onClick: () => {
// open filter modal
},
onInput: (_val: string) => {
// filter patient list
},
onClear: () => {
// clear url param
},
}
// Loading state management
const isLoading = reactive<DataTableLoader>({
summary: false,
isTableLoading: false,
})
const recId = ref<number>(0)
const recAction = ref<string>('')
const recItem = ref<any>(null)
const hreaderPrep: HeaderPrep = {
title: 'Obat',
icon: 'i-lucide-medicine-bottle',
addNav: {
label: 'Tambah',
onClick: () => navigateTo('/tools-equipment-src/medicine/add'),
},
}
async function getPatientList() {
isLoading.isTableLoading = true
const resp = await xfetch('/api/v1/medicine')
if (resp.success) {
data.value = (resp.body as Record<string, any>).data
}
isLoading.isTableLoading = false
}
onMounted(() => {
getPatientList()
})
provide('rec_id', recId)
provide('rec_action', recAction)
provide('rec_item', recItem)
provide('table_data_loader', isLoading)
</script>
<template>
<Header :prep="{ ...hreaderPrep }" :ref-search-nav="refSearchNav" />
<div class="my-4 flex flex-1 flex-col gap-4 md:gap-8">
<AppMedicineList :data="data" />
</div>
</template>