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';
|
||||
|
||||
// NOTE: Import Components
|
||||
import { SaveButton, MainButton } from 'src/components/button';
|
||||
import { SaveButton } from 'src/components/button';
|
||||
import { StateButton } from 'components/button';
|
||||
import InfoMessengerExpansion from '../expansion/receive/InfoMessengerExpansion.vue';
|
||||
import InfoProductExpansion from '../expansion/receive/InfoProductExpansion.vue';
|
||||
|
|
@ -61,6 +61,7 @@ const statusTabForm = ref<
|
|||
},
|
||||
]);
|
||||
const failedDialog = ref(false);
|
||||
const failedDialogReadonly = ref(false);
|
||||
const taskStatusRecords = ref<
|
||||
{
|
||||
requestWorkId: string;
|
||||
|
|
@ -72,6 +73,7 @@ const taskStatusRecords = ref<
|
|||
>([]);
|
||||
const selectedEmployee = ref<
|
||||
(RequestWork & {
|
||||
taskStatus: TaskStatus;
|
||||
_template?: {
|
||||
id: string;
|
||||
templateName: string;
|
||||
|
|
@ -638,6 +640,15 @@ watch([currentFormData.value.taskStatus], () => {
|
|||
},
|
||||
];
|
||||
failedDialog = true;
|
||||
failedDialogReadonly =
|
||||
fullTaskOrder?.userTask.find(
|
||||
(l) =>
|
||||
l.userId ===
|
||||
fullTaskOrder?.taskList[0].requestWorkStep
|
||||
.responsibleUserId,
|
||||
)?.userTaskStatus === UserTaskStatus.Submit
|
||||
? true
|
||||
: false;
|
||||
}
|
||||
"
|
||||
@change-status="
|
||||
|
|
@ -659,6 +670,7 @@ watch([currentFormData.value.taskStatus], () => {
|
|||
</q-expansion-item>
|
||||
|
||||
<FailRemarkDialog
|
||||
:readonly="failedDialogReadonly"
|
||||
:fail-task-option="list"
|
||||
v-model:open="failedDialog"
|
||||
v-model:set-task-status-list="taskStatusRecords"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue