سامانه صدور فاکتور و حسابداری
Mirrored from https://github.com/davoodmehraban89/Factor-easy.git
Synced Dec 4, 03:00 UTC
fix(login): enable password form immediately after core, before the 39 ERP scripts
davoodmehraban89 committed
Oct 12, 2026 at 19:52 UTC
793b0b5ffd8ee57f513d893b6b12ca30ca91cd94
1 file changed
+5
-2
js/core.js
+5
-2
@@ -288,8 +288,11 @@ async function handleLogout(){
288
window.location.reload();
289
}
290
291
-// Auth handlers are ready before the remaining deferred ERP modules finish.
292
-if(document.readyState==='loading'){
291
+// This classic core script sits AFTER the auth DOM, but BEFORE the heavy
292
+// ERP scripts. Enable sign-in now while the parser continues fetching modules.
293
+if(document.getElementById('auth-screen')){
294
+ void initAuthSystem();
295
+}else if(document.readyState==='loading'){
296
document.addEventListener('DOMContentLoaded',()=>{void initAuthSystem();},{once:true});
297
}else{
298
void initAuthSystem();