fix: show Draft/Submitted/Cancelled instead of 0/1/2 in doc_status dropdown
This commit is contained in:
parent
277c5e16d2
commit
5b21db8d2a
3 changed files with 14 additions and 3 deletions
|
|
@ -192,7 +192,7 @@ onMounted(() => store.fetch());
|
|||
|
||||
<template>
|
||||
<div class="main">
|
||||
<div class="sidebar-container">
|
||||
<div class="sidebar-container" @click.stop>
|
||||
<Sidebar />
|
||||
</div>
|
||||
<div class="workflow-container" @drop="onDrop">
|
||||
|
|
|
|||
|
|
@ -25,7 +25,13 @@ let properties = computed(() => {
|
|||
});
|
||||
} else if (store.workflow.selected && "state" in store.workflow.selected.data) {
|
||||
title.value = "State Properties";
|
||||
return store.statefields;
|
||||
return store.statefields.filter(df => {
|
||||
if (df.fieldname == "doc_status") {
|
||||
df.options = ["Draft", "Submitted", "Cancelled"];
|
||||
df.description = "";
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
title.value = "Workflow Details";
|
||||
return store.workflowfields.filter(df => {
|
||||
|
|
|
|||
|
|
@ -41,10 +41,15 @@ export function get_workflow_elements(workflow) {
|
|||
|
||||
workflow.states.forEach((state, i) => {
|
||||
x += 400;
|
||||
let doc_status_map = {
|
||||
0: "Draft",
|
||||
1: "Submitted",
|
||||
2: "Cancelled",
|
||||
};
|
||||
elements.push(
|
||||
state_obj(i + 1, {
|
||||
state: state.state,
|
||||
doc_status: state.doc_status,
|
||||
doc_status: doc_status_map[state.doc_status],
|
||||
allow_edit: state.allow_edit,
|
||||
update_field: state.update_field,
|
||||
update_value: state.update_value,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue