fix: properties doc check & form/move item workflow step
This commit is contained in:
parent
5d5621882e
commit
ba64702287
4 changed files with 49 additions and 7 deletions
|
|
@ -863,7 +863,9 @@
|
|||
"label": "Recording By",
|
||||
"value": "recordBy",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{ "label": "Document Check", "value": "documentCheck", "type": "string" },
|
||||
{ "label": "Form", "value": "designForm", "type": "string" }
|
||||
],
|
||||
|
||||
"workPropertiesField": [
|
||||
|
|
@ -1936,7 +1938,9 @@
|
|||
"label": "ลงชื่อผู้บันทึกข้อมูล",
|
||||
"value": "recordBy",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{ "label": "ตรวจสอบเอกสาร", "value": "documentCheck", "type": "string" },
|
||||
{ "label": "ออกแบบฟอร์ม", "value": "designForm", "type": "string" }
|
||||
],
|
||||
|
||||
"workPropertiesField": [
|
||||
|
|
|
|||
|
|
@ -446,6 +446,7 @@ watch(
|
|||
>
|
||||
<NoData useField />
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="tempStep[stepIndex].attributes?.properties?.length > 0"
|
||||
class="q-py-sm"
|
||||
|
|
@ -470,7 +471,12 @@ watch(
|
|||
:disable="propIndex === 0"
|
||||
:size="$q.screen.xs ? 'xs' : ''"
|
||||
style="color: hsl(var(--text-mute-2))"
|
||||
@click="moveItemUp(tempStep, propIndex)"
|
||||
@click="
|
||||
moveItemUp(
|
||||
tempStep[stepIndex].attributes.properties,
|
||||
propIndex,
|
||||
)
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
id="btn-move-down-product"
|
||||
|
|
@ -479,9 +485,17 @@ watch(
|
|||
flat
|
||||
round
|
||||
:size="$q.screen.xs ? 'xs' : ''"
|
||||
:disable="propIndex === tempStep?.length - 1"
|
||||
:disable="
|
||||
propIndex ===
|
||||
tempStep[stepIndex].attributes.properties?.length - 1
|
||||
"
|
||||
style="color: hsl(var(--text-mute-2))"
|
||||
@click="moveItemDown(tempStep, propIndex)"
|
||||
@click="
|
||||
moveItemDown(
|
||||
tempStep[stepIndex].attributes.properties,
|
||||
propIndex,
|
||||
)
|
||||
"
|
||||
/>
|
||||
|
||||
<q-avatar
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ function assignToForm() {
|
|||
<q-expansion-item
|
||||
dense
|
||||
v-model="isExpand"
|
||||
class="overflow-hidden bordered q-my-sm full-width"
|
||||
class="overflow-hidden bordered full-width"
|
||||
switch-toggle-side
|
||||
style="border-radius: var(--radius-2)"
|
||||
expand-icon="mdi-chevron-down-circle"
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@ import {
|
|||
EmployeePassportPayload,
|
||||
EmployeeVisaPayload,
|
||||
} from 'stores/employee/types';
|
||||
import {
|
||||
PropDate,
|
||||
PropNumber,
|
||||
PropOptions,
|
||||
PropString,
|
||||
} from 'src/stores/product-service/types';
|
||||
|
||||
const { locale } = useI18n();
|
||||
|
||||
|
|
@ -483,8 +489,18 @@ async function triggerViewFile(opt: {
|
|||
"
|
||||
>
|
||||
<template v-slot="{ product }">
|
||||
<section class="column surface-1 q-pa-sm bordered-t">
|
||||
<section
|
||||
class="column surface-1 q-px-sm bordered-t q-pb-sm q-gutter-y-sm"
|
||||
>
|
||||
<DocumentExpansion
|
||||
v-if="
|
||||
value.productService.work?.attributes?.workflowStep[
|
||||
pageState.currentStep - 1
|
||||
].attributes?.properties.some(
|
||||
(v: PropString | PropNumber | PropDate | PropOptions) =>
|
||||
v.fieldName === 'documentCheck',
|
||||
)
|
||||
"
|
||||
ref="refDocumentExpansion"
|
||||
:attributes="value.attributes"
|
||||
@change-status="
|
||||
|
|
@ -534,6 +550,14 @@ async function triggerViewFile(opt: {
|
|||
:listDocument="product?.document"
|
||||
/>
|
||||
<FormExpansion
|
||||
v-if="
|
||||
value.productService.work?.attributes?.workflowStep[
|
||||
pageState.currentStep - 1
|
||||
].attributes?.properties.some(
|
||||
(v: PropString | PropNumber | PropDate | PropOptions) =>
|
||||
v.fieldName === 'designForm',
|
||||
)
|
||||
"
|
||||
:step="{
|
||||
step: pageState.currentStep,
|
||||
requestWorkId: value.id || '',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue