diff --git a/app/components/app/material/list-cfg.ts b/app/components/app/material/list-cfg.ts new file mode 100644 index 00000000..71ca97f6 --- /dev/null +++ b/app/components/app/material/list-cfg.ts @@ -0,0 +1,52 @@ +import type { + Col, + KeyLabel, + RecComponent, + RecStrFuncComponent, + RecStrFuncUnknown, + Th, +} from '~/components/pub/custom-ui/data/types' +import { defineAsyncComponent } from 'vue' + +type SmallDetailDto = any + +const action = defineAsyncComponent(() => import('~/components/pub/custom-ui/data/dropdown-action-dud.vue')) + +export const cols: Col[] = [{ width: 100 }, { width: 250 }, { width: 100 }, { width: 100 }, { width: 50 }] + +export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Item' }, { label: 'Satuan' }]] + +export const keys = ['code', 'name', 'item_id', 'uom_code', 'action'] + +export const delKeyNames: KeyLabel[] = [ + { key: 'code', label: 'Kode' }, + { key: 'name', label: 'Nama' }, +] + +export const funcParsed: Record any> = { + name: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return `${recX.name}`.trim() + }, + item_id: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.item_id + }, + uom_code: (rec: unknown): unknown => { + const recX = rec as SmallDetailDto + return recX.uom_code + }, +} + +export const funcComponent: RecStrFuncComponent = { + action(rec, idx) { + const res: RecComponent = { + idx, + rec: rec as object, + component: action, + } + return res + }, +} + +export const funcHtml: Record any> = {} diff --git a/app/components/app/material/list.vue b/app/components/app/material/list.vue new file mode 100644 index 00000000..5b8778d9 --- /dev/null +++ b/app/components/app/material/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/flow/material/list.vue b/app/components/flow/material/list.vue new file mode 100644 index 00000000..28fb6290 --- /dev/null +++ b/app/components/flow/material/list.vue @@ -0,0 +1,65 @@ + + + diff --git a/app/pages/(features)/tools-equipment-src/material/index.vue b/app/pages/(features)/tools-equipment-src/material/index.vue new file mode 100644 index 00000000..503056cb --- /dev/null +++ b/app/pages/(features)/tools-equipment-src/material/index.vue @@ -0,0 +1,40 @@ + + +