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

fix: decouple optional journal reversal projection from account login barrier (#216)

davoodmehraban89 committed Nov 20, 2026 at 09:53 UTC bcd8d4eebd4f6852ecf8090670741d81dbc27332
1 file changed +3 -2
js/core.js
+3 -2
@@ -391,9 +391,10 @@ async function enterApp(authUser,{timeoutMs=25000}={}){
391 setAuthLoginStatus('در حال دریافت اطلاعات شرکت...','loading');
392 await finoraTrackLoginRead('TENANT_RECORDS',finoraAbortableRead(pullAll({signal:controller.signal}),controller.signal));
393 if(controller.signal.aborted)throw new Error('FINORA_LOGIN_READ_TIMEOUT');
394 + // Reversal status is an optional accounting projection, not a login barrier.
395 + // A stale or unavailable membership/view must not block unrelated modules.
396 if(typeof jeRpcRefreshEffectiveStatuses==='function'){
395 - await finoraTrackLoginRead('JOURNAL_REVERSAL_STATUS',finoraAbortableRead(jeRpcRefreshEffectiveStatuses(),controller.signal));
396 - if(controller.signal.aborted)throw new Error('FINORA_LOGIN_READ_TIMEOUT');
397 + Promise.resolve().then(()=>jeRpcRefreshEffectiveStatuses()).catch(err=>console.warn('journal status hydration unavailable',err));
398 }
399 const prefs=typeof getMySettings==='function'?getMySettings():null;if(prefs?.user_display_name&&!currentUser.fullName)currentUser.fullName=prefs.user_display_name;if(prefs?.professional_role)currentUser.professionalRole=prefs.professional_role;
400 }catch(err){