feat(loading-state): add loading indicators and skeleton UI for data tables
- Implement loading state management across patient, doctor and satusehat lists - Add skeleton loading UI for data tables during data fetching - Refactor loading state variable naming for consistency - Make search nav optional in header component - Update icon sizing in header for better responsiveness - Implement url search params query state at satusehat
This commit is contained in:
@@ -3,19 +3,19 @@ import type { HeaderPrep, RefSearchNav } from '../types.ts'
|
||||
|
||||
const props = defineProps<{
|
||||
prep: HeaderPrep
|
||||
refSearchNav: RefSearchNav
|
||||
refSearchNav?: RefSearchNav
|
||||
}>()
|
||||
|
||||
function emitSearchNavClick() {
|
||||
props.refSearchNav.onClick()
|
||||
props.refSearchNav?.onClick()
|
||||
}
|
||||
|
||||
function onInput(event: Event) {
|
||||
props.refSearchNav.onInput((event.target as HTMLInputElement).value)
|
||||
props.refSearchNav?.onInput((event.target as HTMLInputElement).value)
|
||||
}
|
||||
|
||||
function btnClick() {
|
||||
props.prep.addNav?.onClick()
|
||||
props.prep?.addNav?.onClick()
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -24,12 +24,13 @@ function btnClick() {
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3 text-lg font-bold text-gray-900">
|
||||
<Icon :name="prep.icon" class="mr-2 h-4 w-4 align-middle" />
|
||||
<Icon :name="prep.icon" class="mr-2 size-4 md:size-6 align-middle" />
|
||||
{{ prep.title }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3 text-lg text-gray-900">
|
||||
<div v-if="props.refSearchNav"
|
||||
class="ml-3 text-lg text-gray-900">
|
||||
<Input
|
||||
type="text"
|
||||
placeholder="Search"
|
||||
|
||||
Reference in New Issue
Block a user