سامانه صدور فاکتور و حسابداری
fix(B03-R3): isolate recovery rendering in js/ux-hardening-r2.js
davoodmehraban89 committed
Nov 24, 2026 at 17:06 UTC
1d552314be40d0f718c683901bc27234adf1cc31
1 file changed
+8
-1
js/ux-hardening-r2.js
+8
-1
@@ -367,6 +367,13 @@ body.finora-theme-dark .form-group[style*="background"]{
367
const oldProductTpl=window.downloadProductsExcelTemplate,oldContactTpl=window.downloadContactsExcelTemplate;window.downloadProductsExcelTemplate=()=>finoraDownloadConfiguredTemplate('products');window.downloadContactsExcelTemplate=()=>finoraDownloadConfiguredTemplate('contacts');
368
window.downloadAccountsExcelTemplate=()=>finoraDownloadConfiguredTemplate('accounts');window.downloadInvoiceItemsExcelTemplate=()=>finoraDownloadConfiguredTemplate('saleItems');window.purDownloadExcelTemplate=()=>finoraDownloadConfiguredTemplate('purchaseItems');
369
function boot(){installSettings();renderExperienceSettings();renderExcelFields(false);enhanceAll();finoraApplyTheme();finoraRefreshDataStats()}
370
- const oldRefresh=window.refreshAllSurfaces;if(typeof oldRefresh==='function')window.refreshAllSurfaces=function(){const r=oldRefresh.apply(this,arguments);setTimeout(boot,0);return r};
370
+ const oldRefresh=window.refreshAllSurfaces;if(typeof oldRefresh==='function')window.refreshAllSurfaces=function(){
371
+ const readOnly=typeof finoraIsReadOnlyRefresh==='function'&&finoraIsReadOnlyRefresh();
372
+ const context=readOnly?finoraSyncContext():null;
373
+ const r=oldRefresh.apply(this,arguments);
374
+ if(readOnly)setTimeout(()=>{if(finoraSyncContextMatches(context))finoraWithReadOnlyRefresh(boot)},0);
375
+ else setTimeout(boot,0);
376
+ return r;
377
+ };
378
document.addEventListener('DOMContentLoaded',()=>setTimeout(boot,0));setInterval(()=>{if((getMySettings()?.ui_theme||'auto')==='auto')finoraApplyTheme()},15*60*1000);
379
})();