fix(FE) : add context cardlist antrean
This commit is contained in:
@@ -10,13 +10,15 @@ interface Props {
|
||||
hasMore?: boolean;
|
||||
totalItems?: number;
|
||||
getActions?: (item: any) => Array<{ icon: string; color: string; tooltip: string; event: string }>;
|
||||
context?: 'all' | 'kategori' | 'spesialis' | 'subspesialis';
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
loading: false,
|
||||
hasMore: false,
|
||||
totalItems: 0,
|
||||
getActions: () => []
|
||||
getActions: () => [],
|
||||
context: 'all'
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -194,12 +196,15 @@ onUnmounted(() => {
|
||||
</v-chip>
|
||||
</div>
|
||||
<div class="d-flex ga-2 mb-4">
|
||||
<v-chip size="small" color="primary" variant="outlined" label class="font-weight-medium">
|
||||
<!-- Show all numbers for 'all' and 'kategori' context -->
|
||||
<v-chip v-if="context === 'all' || context === 'kategori'" size="small" color="primary" variant="outlined" label class="font-weight-medium">
|
||||
No : {{ item.NoUrutKategori }}
|
||||
</v-chip>
|
||||
<v-chip size="small" color="primary" variant="outlined" label class="font-weight-medium">
|
||||
<!-- Show spesialis number for 'all', 'kategori', 'spesialis' context -->
|
||||
<v-chip v-if="context === 'all' || context === 'kategori' || context === 'spesialis'" size="small" color="primary" variant="outlined" label class="font-weight-medium">
|
||||
No Spesialis : {{ item.NoUrutSpesialis }}
|
||||
</v-chip>
|
||||
<!-- Show subspesialis number for all contexts -->
|
||||
<v-chip size="small" color="primary" variant="outlined" label class="font-weight-medium">
|
||||
No Sub Spesialis : {{ item.NoUrutSubSpesialis }}
|
||||
</v-chip>
|
||||
|
||||
@@ -296,6 +296,7 @@ const handleUpdateStatusSuccess = () => {
|
||||
:has-more="hasMore"
|
||||
:total-items="totalItems"
|
||||
:get-actions="getActionsForItem"
|
||||
context="all"
|
||||
@view="handleView"
|
||||
@edit="handleEdit"
|
||||
@updateStatus="handleUpdateStatus"
|
||||
|
||||
@@ -255,7 +255,7 @@ const handleUpdateStatusSuccess = () => {
|
||||
<v-col cols="12" class="pa-6">
|
||||
<div class="d-flex justify-space-between align-center mb-4">
|
||||
<div class="d-flex align-center ga-3 w-50">
|
||||
<v-text-field v-model="search" placeholder="Cari..." variant="outlined" density="compact"
|
||||
<v-text-field v-model="search" placeholder="Cari..." variant="outlined" density="compact" class="bg-white"
|
||||
hide-details prepend-inner-icon="mdi-magnify" style="max-width: 300px;"></v-text-field>
|
||||
|
||||
<FilterSortMenu v-model="filterValues" :filters="filterOptions" />
|
||||
@@ -268,7 +268,7 @@ const handleUpdateStatusSuccess = () => {
|
||||
</div>
|
||||
|
||||
<CardAntrianList :items="antreanList" :loading="loading" :has-more="hasMore" :total-items="totalItems"
|
||||
:get-actions="getActionsForItem" @view="handleView" @edit="handleEdit"
|
||||
:get-actions="getActionsForItem" context="kategori" @view="handleView" @edit="handleEdit"
|
||||
@updateStatus="handleUpdateStatus" @delete="handleDelete" @loadMore="handleLoadMore" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -257,7 +257,7 @@ const handleUpdateStatusSuccess = () => {
|
||||
<v-col cols="12" class="pa-6">
|
||||
<div class="d-flex justify-space-between align-center mb-4">
|
||||
<div class="d-flex align-center ga-3 w-50">
|
||||
<v-text-field v-model="search" placeholder="Cari..." variant="outlined" density="compact"
|
||||
<v-text-field v-model="search" placeholder="Cari..." variant="outlined" density="compact" class="bg-white"
|
||||
hide-details prepend-inner-icon="mdi-magnify" style="max-width: 300px;"></v-text-field>
|
||||
|
||||
<FilterSortMenu
|
||||
@@ -278,6 +278,7 @@ const handleUpdateStatusSuccess = () => {
|
||||
:has-more="hasMore"
|
||||
:total-items="totalItems"
|
||||
:get-actions="getActionsForItem"
|
||||
context="spesialis"
|
||||
@view="handleView"
|
||||
@edit="handleEdit"
|
||||
@updateStatus="handleUpdateStatus"
|
||||
|
||||
@@ -257,7 +257,7 @@ const handleUpdateStatusSuccess = () => {
|
||||
<v-col cols="12" class="pa-6">
|
||||
<div class="d-flex justify-space-between align-center mb-4">
|
||||
<div class="d-flex align-center ga-3 w-50">
|
||||
<v-text-field v-model="search" placeholder="Cari..." variant="outlined" clearable density="compact"
|
||||
<v-text-field v-model="search" placeholder="Cari..." variant="outlined" clearable density="compact" class="bg-white"
|
||||
hide-details prepend-inner-icon="mdi-magnify" style="max-width: 300px;"></v-text-field>
|
||||
|
||||
<FilterSortMenu
|
||||
@@ -278,6 +278,7 @@ const handleUpdateStatusSuccess = () => {
|
||||
:has-more="hasMore"
|
||||
:total-items="totalItems"
|
||||
:get-actions="getActionsForItem"
|
||||
context="subspesialis"
|
||||
@view="handleView"
|
||||
@edit="handleEdit"
|
||||
@updateStatus="handleUpdateStatus"
|
||||
|
||||
Reference in New Issue
Block a user