diff --git a/app/components/app/device/entry-form.vue b/app/components/app/device/entry-form.vue new file mode 100644 index 00000000..38b4aea0 --- /dev/null +++ b/app/components/app/device/entry-form.vue @@ -0,0 +1,64 @@ + + + diff --git a/app/components/app/device/list-cfg.ts b/app/components/app/device/list-cfg.ts new file mode 100644 index 00000000..71ca97f6 --- /dev/null +++ b/app/components/app/device/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/device/list.vue b/app/components/app/device/list.vue new file mode 100644 index 00000000..5b8778d9 --- /dev/null +++ b/app/components/app/device/list.vue @@ -0,0 +1,19 @@ + + + diff --git a/app/components/app/material/entry-form.vue b/app/components/app/material/entry-form.vue new file mode 100644 index 00000000..52214e3f --- /dev/null +++ b/app/components/app/material/entry-form.vue @@ -0,0 +1,70 @@ + + + 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/device/entry.vue b/app/components/flow/device/entry.vue new file mode 100644 index 00000000..d53afb5c --- /dev/null +++ b/app/components/flow/device/entry.vue @@ -0,0 +1,62 @@ + + + diff --git a/app/components/flow/device/list.vue b/app/components/flow/device/list.vue new file mode 100644 index 00000000..8c7bd672 --- /dev/null +++ b/app/components/flow/device/list.vue @@ -0,0 +1,65 @@ + + + diff --git a/app/components/flow/material/entry.vue b/app/components/flow/material/entry.vue new file mode 100644 index 00000000..17d2f7c0 --- /dev/null +++ b/app/components/flow/material/entry.vue @@ -0,0 +1,64 @@ + + + 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/device/add.vue b/app/pages/(features)/tools-equipment-src/device/add.vue new file mode 100644 index 00000000..54f4baff --- /dev/null +++ b/app/pages/(features)/tools-equipment-src/device/add.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/pages/(features)/tools-equipment-src/device/index.vue b/app/pages/(features)/tools-equipment-src/device/index.vue new file mode 100644 index 00000000..464e5558 --- /dev/null +++ b/app/pages/(features)/tools-equipment-src/device/index.vue @@ -0,0 +1,40 @@ + + + diff --git a/app/pages/(features)/tools-equipment-src/material/add.vue b/app/pages/(features)/tools-equipment-src/material/add.vue new file mode 100644 index 00000000..56803533 --- /dev/null +++ b/app/pages/(features)/tools-equipment-src/material/add.vue @@ -0,0 +1,41 @@ + + + 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 @@ + + + diff --git a/package.json b/package.json index 00158330..905dee25 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,6 @@ "vue-router": "^4.5.1", "vue-sonner": "^1.3.0", "vue-tsc": "^2.1.10", - "zod": "^3.24.2" + "zod": "^3.25.76" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7a3ef8de..bcbed231 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -161,7 +161,7 @@ devDependencies: specifier: ^2.1.10 version: 2.2.12(typescript@5.9.2) zod: - specifier: ^3.24.2 + specifier: ^3.25.76 version: 3.25.76 packages: