From 1492573fac978b0ecbddce051b4ec7028ed8c993 Mon Sep 17 00:00:00 2001 From: Ali <010109ali@gmail.com> Date: Mon, 18 May 2026 13:28:22 +0000 Subject: [PATCH] revert: drop adaptive workflow guide The 4-step workflow stepper added in 83a2cb6 was experimental and turned out to be visual noise on top of the form. Reverting back to the tab layout speaking for itself. --- .../bank_statement_importer.js | 73 ------------------- 1 file changed, 73 deletions(-) diff --git a/jey_erp/jey_erp/doctype/bank_statement_importer/bank_statement_importer.js b/jey_erp/jey_erp/doctype/bank_statement_importer/bank_statement_importer.js index 4b70d63..44741f2 100644 --- a/jey_erp/jey_erp/doctype/bank_statement_importer/bank_statement_importer.js +++ b/jey_erp/jey_erp/doctype/bank_statement_importer/bank_statement_importer.js @@ -17,7 +17,6 @@ frappe.ui.form.on('Bank Statement Importer', { refresh(frm) { BIFileFormat.applySampleHeaders(frm); - _bi_render_workflow_guide(frm); if (frm.is_new()) return; @@ -491,78 +490,6 @@ function _show_load_data_dialog(frm) { // DATA TAB — registry overviews (Accounts / Customers / Suppliers / Purposes) // ═══════════════════════════════════════════════════════════════════════════════ -// ═══════════════════════════════════════════════════════════════════════════════ -// WORKFLOW GUIDE — adaptive 4-step banner above the tabs. -// Highlights the next action based on the form's current state so users don't -// have to memorise the sequence (Setup → Load Data → Match/Create → Use). -// ═══════════════════════════════════════════════════════════════════════════════ - -function _bi_render_workflow_guide(frm) { - if (frm.is_new()) { - frm.set_intro( - __('Fill in Bank Name and Save to begin setup. Then configure the File Format tab.'), - 'blue' - ); - return; - } - - const hasFormat = (frm.doc.column_mappings || []).some(r => r.excel_column && r.standard_field); - const hasAccountMappings = (frm.doc.account_mappings || []).length > 0; - const hasCustomerMappings = (frm.doc.customer_mappings || []).length > 0; - const hasSupplierMappings = (frm.doc.supplier_mappings || []).length > 0; - const hasAnyMapping = hasAccountMappings || hasCustomerMappings || hasSupplierMappings; - - const step = (n, label, active) => { - const color = active ? 'var(--primary)' : 'var(--text-muted)'; - const weight = active ? '600' : '400'; - const bg = active ? 'var(--alert-bg-blue, #e7f1ff)' : 'transparent'; - return ` - ${n} - ${frappe.utils.escape_html(label)} - `; - }; - - let current, hint, color; - if (!hasFormat) { - current = 1; - hint = __("Open the File Format tab. Upload a sample statement — auto-detect fills the column mappings."); - color = 'orange'; - } else if (!hasAnyMapping) { - current = 2; - hint = __("Click Load Data (top-right) to register counterparties and purposes from a real statement."); - color = 'orange'; - } else { - // Heuristic: once any mapping table has rows, users still need to link - // each registry entry to an ERP record. We can't cheaply count registry - // rows here without an extra call, so we just point at the Data tab. - current = 3; - hint = __("Open the Data tab. Use the Match / Create buttons (top-right) to link each registry entry to an ERPNext record. When done, import statements via Bank Transaction list → Import From."); - color = 'blue'; - } - - const stepper = - '