diff --git a/app/components/app/doctor/list-cfg.ts b/app/components/app/doctor/list-cfg.ts
index 9d47c6d0..977e7427 100644
--- a/app/components/app/doctor/list-cfg.ts
+++ b/app/components/app/doctor/list-cfg.ts
@@ -4,11 +4,7 @@ import { defineAsyncComponent } from 'vue'
type SmallDetailDto = any
const action = defineAsyncComponent(() => import('~/components/pub/nav/dropdown-action-dud.vue'))
-
-const doctorStatus = {
- 0: 'Tidak Aktif',
- 1: 'Aktif',
-}
+const statusBadge = defineAsyncComponent(() => import('./status-badge.vue'))
export const cols: Col[] = [
{ width: 100 },
@@ -19,10 +15,10 @@ export const cols: Col[] = [
{},
{},
{},
+ { width: 120 },
{ width: 100 },
- { width: 100 },
- { width: 100 },
- { width: 50 },
+ {},
+ {},
]
export const header: Th[][] = [
@@ -59,7 +55,6 @@ export const delKeyNames: KeyLabel[] = [
export const funcParsed: RecStrFuncUnknown = {
name: (rec: unknown): unknown => {
- console.log(rec)
const recX = rec as SmallDetailDto
return `${recX.frontTitle} ${recX.name} ${recX.endTitle}`.trim()
},
@@ -78,10 +73,6 @@ export const funcParsed: RecStrFuncUnknown = {
const recX = rec as SmallDetailDto
return Number(recX.outPatient_itemPrice.price).toLocaleString('id-ID')
},
- status: (rec: unknown): unknown => {
- const recX = rec as SmallDetailDto
- return doctorStatus[recX.status_code as keyof typeof doctorStatus]
- },
}
export const funcComponent: RecStrFuncComponent = {
@@ -93,6 +84,14 @@ export const funcComponent: RecStrFuncComponent = {
}
return res
},
+ status(rec, idx) {
+ const res: RecComponent = {
+ idx,
+ rec: rec as object,
+ component: statusBadge,
+ }
+ return res
+ },
}
export const funcHtml: RecStrFuncUnknown = {
diff --git a/app/components/app/doctor/status-badge.vue b/app/components/app/doctor/status-badge.vue
new file mode 100644
index 00000000..32cdfbca
--- /dev/null
+++ b/app/components/app/doctor/status-badge.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+ {{ statusText }}
+
+
+