feat/procedure-room-order: wip #1

+ material-package
+ material-package-item
This commit is contained in:
Andrian Roshandy
2025-12-03 09:42:31 +07:00
parent 9a8ee9d90f
commit 4444e87cb3
9 changed files with 184 additions and 0 deletions

No files matched your search

@@ -0,0 +1,23 @@
import type { Config } from '~/components/pub/my-ui/data-table'
type SmallDetailDto = any
export const config: Config = {
cols: [ { width: 150 }, {}, { width: 150 }],
headers: [
[
{ label: 'No' },
{ label: 'Name' },
{ label: 'Jumlah' },
],
],
keys: ['number', 'material.name', 'count'],
parses: {
number: (rec: unknown): unknown => {
return (rec as SmallDetailDto).medicineGroup?.name || '-'
},
},
}
@@ -0,0 +1,23 @@
<script setup lang="ts">
//
import DataTable from '~/components/pub/my-ui/data-table/data-table.vue'
// Configs
import { config } from './quick-list.cfg'
import type { MaterialPackageItem } from '~/models/material-package-item';
interface Props {
data: MaterialPackageItem[]
}
defineProps<Props>()
</script>
<template>
<div>
<div class="font-semibold text-sm 2xl:text-base mb-2">
Daftar Item BMHP
</div>
<DataTable v-bind="config" :rows="data" />
</div>
</template>
@@ -0,0 +1,23 @@
<script setup lang="ts">
//
import * as CB from '~/components/pub/my-ui/combobox'
//
defineProps<{
items: CB.Item[]
}>()
const model = defineModel()
</script>
<template>
<div class="mb-4 2xl:mb-5">
<div class="font-semibold text-sm 2xl:text-base mb-2">
Paket BMHP
</div>
<div class="max-w-[600px]">
<CB.Combobox :items="items" v-model="model" />
</div>
</div>
</template>