refactor: updated watch condition
This commit is contained in:
parent
26cb0c1622
commit
81bb823427
1 changed files with 3 additions and 2 deletions
|
|
@ -9,8 +9,9 @@ let title = ref("Workflow Details");
|
|||
watch(
|
||||
() => store.workflow_doc?.document_type,
|
||||
async (newDocType, oldDocType) => {
|
||||
if (newDocType && oldDocType && newDocType !== oldDocType) {
|
||||
await store.update_is_submittable();
|
||||
if (!newDocType) return;
|
||||
await store.update_is_submittable();
|
||||
if (newDocType !== oldDocType) {
|
||||
store.reset_non_submittable_states();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue