refactor: update prompt message

This commit is contained in:
Shubh Doshi 2026-02-27 10:30:37 +05:30
parent 9751b86837
commit 9c663fcdf0
2 changed files with 6 additions and 6 deletions

View file

@ -155,7 +155,7 @@ export const useStore = defineStore("workflow-builder-store", () => {
let affected_states = []; let affected_states = [];
workflow.value.elements.forEach((el) => { workflow.value.elements.forEach((el) => {
if (el.type === "state" && el.data.doc_status && el.data.doc_status !== "Draft") { if (el.type === "state" && el.data.doc_status && el.data.doc_status !== "Draft") {
affected_states.push(el.data.state || __("No Label State")); affected_states.push(el.data.state);
el.data.doc_status = "Draft"; el.data.doc_status = "Draft";
} }
}); });
@ -164,8 +164,8 @@ export const useStore = defineStore("workflow-builder-store", () => {
frappe.msgprint({ frappe.msgprint({
title: __("Doc Status Reset"), title: __("Doc Status Reset"),
message: __( message: __(
"The <b>Doc Status</b> for the following states has been reset to <b>Draft</b> because the <b>{0}</b> is not submittable: <b>{1}</b>", "The <strong>Doc Status</strong> for all states has been reset to <strong>Draft</strong> because <strong>{0}</strong> is not submittable",
[workflow_doc.value.document_type, affected_states.join(", ")] [workflow_doc.value.document_type]
), ),
indicator: "orange", indicator: "orange",
}); });

View file

@ -131,7 +131,7 @@ frappe.ui.form.on("Workflow", {
let affected_states = []; let affected_states = [];
frm.doc.states.forEach((row) => { frm.doc.states.forEach((row) => {
if (parseInt(row.doc_status || 0) !== 0) { if (parseInt(row.doc_status || 0) !== 0) {
affected_states.push(row.state || __("No Label State")); affected_states.push(row.state);
row.doc_status = "0"; row.doc_status = "0";
} }
}); });
@ -140,8 +140,8 @@ frappe.ui.form.on("Workflow", {
frappe.msgprint({ frappe.msgprint({
title: __("Doc Status Reset"), title: __("Doc Status Reset"),
message: __( message: __(
"The <b>Doc Status</b> for the following states has been reset to <b>Draft</b> because the <b>{0}</b> is not submittable: <b>{1}</b>", "The <strong>Doc Status</strong> for all states has been reset to <strong>0</strong> because <strong>{0}</strong> is not submittable",
[frm.doc.document_type, affected_states.join(", ")] [frm.doc.document_type]
), ),
indicator: "orange", indicator: "orange",
}); });