سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 20:45 UTC
fix: hydrate authoritative journal reversal statuses on login and tenant switch (#216)
davoodmehraban89 committed
Nov 19, 2026 at 14:38 UTC
cad9924646c64b4952ee75e851a55392db7933b6
1 file changed
+4
js/core.js
+4
@@ -391,6 +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
+ 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
+ }
398
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;
399
}catch(err){
400
currentUser=null;