The "سفارش مشتریان" / "مشتریان من" entries are shown from session.isSalesExpert, which was fetched from /expert/whoami only once, at sign-in. A slow or failed request (silently swallowed) left the flag false until the next login, so an expert saw a customer-only menu. The dashboard now asks again on mount and on every re-activation, and keeps the current value when the request fails. Rebuilds user-app and user-app-v2 dist. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2 lines
1.6 KiB
JavaScript
2 lines
1.6 KiB
JavaScript
import{ah as d,i as f,aw as g,d as P,aj as p,R as C,Y as R,a5 as T,a1 as h,a as m,q as x,aU as y}from"./index-CW3p0GOu.js";var E=!1;try{var c=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("testPassive",null,c),window.removeEventListener("testPassive",null,c)}catch{}var j=Symbol("TriggerContextKey"),K=function(e){return e?d(j,{setPortal:function(){},popPortal:!1}):{setPortal:function(){},popPortal:!1}},v=Symbol("PortalContextKey"),w=function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};g(v,{inTriggerContext:i.inTriggerContext,shouldRender:f(function(){var n=e||{},u=n.sPopupVisible,t=n.popupRef,l=n.forceRender,r=n.autoDestroy,s=!1;return(u||t||l)&&(s=!0),!u&&r&&(s=!1),s})})},D=function(){w({},{inTriggerContext:!1});var e=d(v,{shouldRender:f(function(){return!1}),inTriggerContext:!1});return{shouldRender:f(function(){return e.shouldRender.value||e.inTriggerContext===!1})}};const N=P({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:p.func.isRequired,didUpdate:Function},setup:function(e,i){var n=i.slots,u=!0,t,l=D(),r=l.shouldRender;C(function(){u=!1,r.value&&(t=e.getContainer())});var s=R(r,function(){r.value&&!t&&(t=e.getContainer()),t&&s()});return T(function(){h(function(){if(r.value){var o;(o=e.didUpdate)===null||o===void 0||o.call(e,e)}})}),m(function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),function(){if(!r.value)return null;if(u){var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}return t?x(y,{to:t},n):null}}});var b={ESC:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};export{b as K,N as P,K as a,E as s,w as u};
|