@davoodmehraban89 / Factor-easy / commits / 60b8909
Fork 0

سامانه صدور فاکتور و حسابداری

Add project and contracting navigation

davoodmehraban89 committed Sep 29, 2026 at 12:49 UTC 60b8909943cbc1def306da3009fe83d5e97d350a
1 file changed +4 -2
js/ui.js
+4 -2
@@ -17,7 +17,7 @@ function refreshAllSurfaces(){
17 if(invDate&&!invDate.value)invDate.value=getJalaliNumeric();
18 updateLicenseDisplay(currentUser);
19 renderCompanies();renderContacts();renderProducts();renderInvoices();
20 - renderDashboard();renderCheques();renderExpenses();if(typeof renderAccountingFoundation==='function')renderAccountingFoundation();
20 + renderDashboard();renderCheques();renderExpenses();if(typeof renderAccountingFoundation==='function')renderAccountingFoundation();if(typeof renderPhase4==='function')renderPhase4();
21 applyDefaultSettingsToForm();
22 handleContactEntityChange();
23 handleCurrencyModeChange();
@@ -61,6 +61,7 @@ function handleQuickCEntityChange(){const el=document.getElementById('quick-c-en
61 const FINORA_MODULES={
62 accounting:{title:'حسابداری',context:'اسناد، کدینگ و دفاتر',groups:[{title:'عملیات',items:[['اسناد حسابداری','view-journal','▤']]},{title:'داده‌های پایه',items:[['هسته حسابداری','view-accounting-foundation','▦']]}]},
63 home:{title:'خانه',context:'نمای یکپارچه عملیات مالی',groups:[{title:'نمای کلی',items:[['داشبورد','view-dashboard','⌂']]}]},
64 + projects:{title:'پروژه و پیمان',context:'پروژه‌ها، قراردادها، کسورات، تضمین‌ها و صورت‌وضعیت‌ها',groups:[{title:'عملیات پیمان',items:[['قراردادها و پیمان','view-contracting','▧']]},{title:'داده پایه',items:[['هسته حسابداری','view-accounting-foundation','▦']]}]},
65 commerce:{title:'بازرگانی',context:'فروش، خرید و مدیریت اشخاص',groups:[{title:'عملیات بازرگانی',items:[['فروش','view-invoices','▤'],['خرید','view-purchases','▣'],['اشخاص','view-contacts','◎']]},{title:'داده پایه',items:[['کالا و خدمات','view-products','◇']]},{title:'کنترل',items:[['هزینه‌ها و درآمد','view-expenses','◌']]}]},
66 treasury:{title:'خزانه‌داری',context:'دریافت، پرداخت و چک',groups:[{title:'عملیات روزانه',items:[['دریافت و پرداخت','view-payments','↔'],['چک‌ها و صیاد','view-cheques','◈']]},{title:'مرتبط',items:[['هزینه‌ها و درآمد','view-expenses','◌']]}]},
67 catalog:{title:'کالا و خدمات',context:'داده پایه کالا و خدمت',groups:[{title:'داده پایه',items:[['کالاها و خدمات','view-products','◇']]},{title:'گردش',items:[['فروش','view-invoices','▤'],['خرید','view-purchases','▣']]}]},
@@ -68,7 +69,7 @@ const FINORA_MODULES={
69 settings:{title:'تنظیمات',context:'شرکت، پیکربندی و دسترسی',groups:[{title:'مدیریت',items:[['تنظیمات و شرکت‌ها','view-settings','⚙'],['مدیریت کاربران و لایسنس','view-admin','♙','admin']]}]}
70 };
71 const FINORA_VIEW_HOME={
71 - 'view-journal':'accounting','view-accounting-foundation':'accounting','view-dashboard':'home','view-invoices':'commerce','view-purchases':'commerce','view-payments':'treasury',
72 + 'view-contracting':'projects','view-journal':'accounting','view-accounting-foundation':'accounting','view-dashboard':'home','view-invoices':'commerce','view-purchases':'commerce','view-payments':'treasury',
73 'view-cheques':'treasury','view-expenses':'treasury','view-contacts':'commerce','view-products':'catalog',
74 'view-reports':'reports','view-settings':'settings','view-admin':'settings'
75 };
@@ -114,6 +115,7 @@ function navigateShell(moduleKey,viewId,rerender=true){
115 switchView(viewId);
116 if(viewId==='view-payments'&&typeof renderPayments==='function')renderPayments();
117 if(viewId==='view-journal'&&typeof renderJournal==='function')renderJournal();
118 + if(viewId==='view-contracting'&&typeof renderPhase4==='function')renderPhase4();
119 if(rerender)renderModulePanel(moduleKey,viewId);
120 document.querySelectorAll('.module-tab').forEach(x=>x.classList.toggle('active',x.dataset.module===moduleKey));
121 updateShellContext(moduleKey,viewId);