feat: add readonly state to FailRemarkDialog based on task status
This commit is contained in:
parent
5dc316e34c
commit
f1b07a527b
1 changed files with 13 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ import { computed, onMounted, ref, watch } from 'vue';
|
||||||
import { getUserId } from 'src/services/keycloak';
|
import { getUserId } from 'src/services/keycloak';
|
||||||
|
|
||||||
// NOTE: Import Components
|
// NOTE: Import Components
|
||||||
import { SaveButton, MainButton } from 'src/components/button';
|
import { SaveButton } from 'src/components/button';
|
||||||
import { StateButton } from 'components/button';
|
import { StateButton } from 'components/button';
|
||||||
import InfoMessengerExpansion from '../expansion/receive/InfoMessengerExpansion.vue';
|
import InfoMessengerExpansion from '../expansion/receive/InfoMessengerExpansion.vue';
|
||||||
import InfoProductExpansion from '../expansion/receive/InfoProductExpansion.vue';
|
import InfoProductExpansion from '../expansion/receive/InfoProductExpansion.vue';
|
||||||
|
|
@ -61,6 +61,7 @@ const statusTabForm = ref<
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const failedDialog = ref(false);
|
const failedDialog = ref(false);
|
||||||
|
const failedDialogReadonly = ref(false);
|
||||||
const taskStatusRecords = ref<
|
const taskStatusRecords = ref<
|
||||||
{
|
{
|
||||||
requestWorkId: string;
|
requestWorkId: string;
|
||||||
|
|
@ -72,6 +73,7 @@ const taskStatusRecords = ref<
|
||||||
>([]);
|
>([]);
|
||||||
const selectedEmployee = ref<
|
const selectedEmployee = ref<
|
||||||
(RequestWork & {
|
(RequestWork & {
|
||||||
|
taskStatus: TaskStatus;
|
||||||
_template?: {
|
_template?: {
|
||||||
id: string;
|
id: string;
|
||||||
templateName: string;
|
templateName: string;
|
||||||
|
|
@ -638,6 +640,15 @@ watch([currentFormData.value.taskStatus], () => {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
failedDialog = true;
|
failedDialog = true;
|
||||||
|
failedDialogReadonly =
|
||||||
|
fullTaskOrder?.userTask.find(
|
||||||
|
(l) =>
|
||||||
|
l.userId ===
|
||||||
|
fullTaskOrder?.taskList[0].requestWorkStep
|
||||||
|
.responsibleUserId,
|
||||||
|
)?.userTaskStatus === UserTaskStatus.Submit
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
@change-status="
|
@change-status="
|
||||||
|
|
@ -659,6 +670,7 @@ watch([currentFormData.value.taskStatus], () => {
|
||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
|
|
||||||
<FailRemarkDialog
|
<FailRemarkDialog
|
||||||
|
:readonly="failedDialogReadonly"
|
||||||
:fail-task-option="list"
|
:fail-task-option="list"
|
||||||
v-model:open="failedDialog"
|
v-model:open="failedDialog"
|
||||||
v-model:set-task-status-list="taskStatusRecords"
|
v-model:set-task-status-list="taskStatusRecords"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue