Merge pull request #36 from dikstub-rssa/refactor/mv-flow-to-content

Refactor/mv flow to content
This commit is contained in:
Munawwirul Jamal
2025-09-08 14:31:44 +07:00
committed by GitHub
23 changed files with 36 additions and 42 deletions
+6 -6
View File
@@ -1,10 +1,10 @@
<script setup lang="ts">
// helpers
import { toTypedSchema } from '@vee-validate/zod'
import { useForm } from 'vee-validate'
// types
import type z from 'zod'
import type { MaterialFormData } from '~/schemas/material'
// helpers
import { toTypedSchema } from '@vee-validate/zod'
import { useForm } from 'vee-validate'
// components
import Label from '~/components/pub/custom-ui/form/label.vue'
@@ -79,9 +79,9 @@ const onSubmit = handleSubmit(async (values) => {
<Label for="uom">Satuan</Label>
<Select
id="uom"
v-model="uom"
icon-name="i-lucide-chevron-down"
placeholder="Pilih satuan"
v-model="uom"
v-bind="uomAttrs"
:items="uoms"
:disabled="isLoading"
@@ -95,9 +95,9 @@ const onSubmit = handleSubmit(async (values) => {
<Label for="item">Item</Label>
<Select
id="item"
v-model="item"
icon-name="i-lucide-chevron-down"
placeholder="Pilih item"
v-model="item"
v-bind="itemAttrs"
:items="items"
:disabled="isLoading"
@@ -111,8 +111,8 @@ const onSubmit = handleSubmit(async (values) => {
<Label for="stock">Stok</Label>
<Input
id="stock"
type="number"
v-model="stock"
type="number"
v-bind="stockAttrs"
:disabled="isLoading"
:class="{ 'border-red-500': errors.stock }"
-1
View File
@@ -3,7 +3,6 @@ import type {
KeyLabel,
RecComponent,
RecStrFuncComponent,
RecStrFuncUnknown,
Th,
} from '~/components/pub/custom-ui/data/types'
import { defineAsyncComponent } from 'vue'
@@ -1,6 +1,6 @@
<script setup lang="ts">
import Action from '~/components/pub/custom-ui/nav-footer/ba-dr-su.vue'
import { z, ZodError } from 'zod'
import Action from '~/components/pub/custom-ui/nav-footer/ba-dr-su.vue'
const errors = ref({})
const data = ref({
@@ -1,6 +1,7 @@
<script setup lang="ts">
// types
import { MaterialSchema, type MaterialFormData } from '~/schemas/material'
import type { MaterialFormData } from '~/schemas/material'
import { MaterialSchema } from '~/schemas/material'
const isLoading = ref(false)
const uoms = [
@@ -28,12 +29,6 @@ async function onSubmit(data: MaterialFormData) {
<Icon name="i-lucide-panel-bottom" class="me-2" />
<span class="font-semibold">Tambah</span> Perlengkapan (BMHP)
</div>
<AppMaterialEntryForm
:is-loading="isLoading"
:schema="MaterialSchema"
:uoms="uoms"
:items="items"
@back="onBack"
@submit="onSubmit"
/>
<AppMaterialEntryForm :is-loading="isLoading" :schema="MaterialSchema" :uoms="uoms" :items="items" @back="onBack"
@submit="onSubmit" />
</template>
@@ -1,9 +1,9 @@
<script setup lang="ts">
definePageMeta({
roles: ['sys', 'doc'],
})
</script>
<template>
<div>detail satusehat</div>
</template>
<script setup lang="ts">
definePageMeta({
roles: ['sys', 'doc'],
})
</script>
<template>
<div>detail satusehat</div>
</template>
@@ -1,9 +1,9 @@
<script setup lang="ts">
definePageMeta({
roles: ['sys', 'doc'],
})
</script>
<template>
<div>edit satusehat</div>
</template>
<script setup lang="ts">
definePageMeta({
roles: ['sys', 'doc'],
})
</script>
<template>
<div>edit satusehat</div>
</template>
@@ -34,7 +34,7 @@ const canRead = true
<template>
<div>
<div v-if="canRead">
<FlowDivisionList />
<ContentDivisionList />
</div>
<Error v-else :status-code="403" />
</div>
@@ -34,7 +34,7 @@ const canRead = true
<template>
<div>
<div v-if="canRead">
<FlowInstallationList />
<ContentInstallationList />
</div>
<Error v-else :status-code="403" />
</div>
+1 -1
View File
@@ -34,7 +34,7 @@ const canRead = true
<template>
<div>
<div v-if="canRead">
<FlowUnitList />
<ContentUnitList />
</div>
<Error v-else :status-code="403" />
</div>
@@ -35,7 +35,7 @@ const canCreate = hasCreateAccess(roleAccess)
<template>
<div v-if="canCreate">
<FlowDeviceEntry />
<ContentDeviceEntry />
</div>
<Error v-else :status-code="403" />
</template>
@@ -33,7 +33,7 @@ const canRead = hasReadAccess(roleAccess)
<template>
<div>
<div v-if="canRead">
<FlowDeviceList />
<ContentDeviceList />
</div>
<Error v-else :status-code="403" />
</div>
@@ -35,7 +35,7 @@ const canCreate = hasCreateAccess(roleAccess)
<template>
<div v-if="canCreate">
<FlowMaterialEntry />
<ContentMaterialEntry />
</div>
<Error v-else :status-code="403" />
</template>
@@ -33,7 +33,7 @@ const canRead = hasReadAccess(roleAccess)
<template>
<div>
<div v-if="canRead">
<FlowMaterialList />
<ContentMaterialList />
</div>
<Error v-else :status-code="403" />
</div>