سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 3, 17:00 UTC
fix: hydrate authoritative journal reversal statuses on login and tenant switch (#216)
davoodmehraban89 committed
Nov 19, 2026 at 14:38 UTC
b48cb6a7087964fa513f009734e3be7bdea6b4d7
1 file changed
+3
-1
js/organization-rbac.js
+3
-1
@@ -128,7 +128,9 @@ window.switchFinoraOrganization=async function(orgId){
128
if(!currentUser?.organizations?.some(x=>x.organization.id===orgId))return false;
129
localStorage.setItem('finora_active_org_'+currentUser.id,orgId);
130
const {data}=await sb.auth.getUser();if(!data?.user)return false;
131
- currentUser=await fetchCurrentUser(data.user);await pullAll();refreshAllSurfaces();if(typeof showModuleLauncher==='function')showModuleLauncher(true);return true;
131
+ currentUser=await fetchCurrentUser(data.user);await pullAll();
132
+ if(typeof jeRpcRefreshEffectiveStatuses==='function')await jeRpcRefreshEffectiveStatuses();
133
+ refreshAllSurfaces();if(typeof showModuleLauncher==='function')showModuleLauncher(true);return true;
134
};
135
window.finoraOrganizationSwitcherHtml=function(){
136
const xs=currentUser?.organizations||[];if(xs.length<2)return '';