سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 4, 00:30 UTC
Guard commerce navigation structure
davoodmehraban89 committed
Sep 29, 2026 at 12:18 UTC
37703615313f5ac4645608c4dc62e48a7068a03c
1 file changed
+5
scripts/quality-check.mjs
+5
@@ -76,3 +76,8 @@ for(const [file,needles] of Object.entries({
76
'operations.js':['jeGuardSourceMutation','jePostSourceRecord'],
77
'accounting-foundation.js':["journalLines||[]","سابقه دفتر"]
78
}))for(const needle of needles)if(!all[file]?.includes(needle))throw new Error('Phase 3 operational integration missing '+file+' '+needle);
79
+
80
+if(!all['ui.js'].includes("commerce:{title:'بازرگانی'"))throw new Error('Commerce module missing');
81
+for(const v of ["'view-invoices':'commerce'","'view-purchases':'commerce'","'view-contacts':'commerce'"])if(!all['ui.js'].includes(v))throw new Error('Commerce view mapping missing '+v);
82
+for(const legacy of ['data-module="sales"','data-module="purchases"','data-module="people"'])if(index.includes(legacy))throw new Error('Legacy top-level commerce rail remains '+legacy);
83
+if(!index.includes('data-module="commerce"')||!index.includes('<b>بازرگانی</b>'))throw new Error('Commerce rail button missing');