Files
tehran_taj/apps/user-app-v2/dist/assets/DashboardView-DXS31MEM.js
T
s.esmaeiliandCursor 066bfd2818 Build release artifacts for deploy.
Refresh API release bundle and admin/user app dist outputs for Dokploy copy-only deploys.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-25 22:46:21 +03:30

2 lines
8.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{d as M,S as U,y as O,h as m,K as $,A as q,o as G,z as H,c as u,p as a,C,m as i,s as k,T as N,D as K,O as Y,b as _,I as t,f as T,n as b,e as s,t as p,R as j,g as R,B as J,F as Q,i as I,E as W,v as P,_ as X}from"./index-CbxkvvkI.js";import{A as Z}from"./AppPullRefresh-C6gq5cvS.js";import{P as ss}from"./PageBar-BaL3tkja.js";import{R as es}from"./RateStrip-DIQwrfG1.js";import{p as as}from"./filters-D3RAgBI7.js";const os={class:"dash"},ts={key:1,class:"dash__exitSpacer","aria-hidden":"true"},ns={class:"dash__heroHead"},is={class:"dash__heroIdentity"},rs={class:"dash__heroName"},ls={class:"dash__heroMobile"},ds={class:"dash__heroBalance"},us={class:"dash__heroFigure"},_s={class:"dash__heroNum"},hs={class:"dash__heroDebt"},cs={class:"dash__heroHead"},ps={class:"dash__heroIdentity"},vs={class:"dash__heroMobile"},fs={class:"dash__heroPending"},ms=["alt"],bs={class:"dash__rowIcon","aria-hidden":"true"},ws={class:"dash__rowChevron","aria-hidden":"true"},gs={class:"dash__rowIcon","aria-hidden":"true"},ys={class:"dash__rowChevron","aria-hidden":"true"},xs={class:"dash__rowIcon","aria-hidden":"true"},Cs={class:"dash__rowChevron","aria-hidden":"true"},ks={class:"dash__rowIcon","aria-hidden":"true"},Is={class:"dash__rowChevron","aria-hidden":"true"},zs={class:"dash__rowIcon","aria-hidden":"true"},Ss={class:"dash__rowChevron","aria-hidden":"true"},Ds={class:"dash__rowIcon","aria-hidden":"true"},Ls={class:"dash__rowChevron","aria-hidden":"true"},$s={class:"dash__rowIcon","aria-hidden":"true"},Ns={class:"dash__rowChevron","aria-hidden":"true"},Ts={class:"dash__rowIcon","aria-hidden":"true"},Rs={class:"dash__rowChevron","aria-hidden":"true"},Ps=70,Vs=M({__name:"DashboardView",setup(Es){const r=K(),l=U(),w=O(),d=m(w.peek($.profile)??null),z=m(w.peek($.goldPrice)??null),y=m(!1),v=m(!1),S=I(()=>d.value?parseFloat(d.value.goldDebtGrams)>0:!1),V=I(()=>d.value?Math.abs(parseFloat(d.value.goldDebtGrams)):0),E=I(()=>{const o=V.value;return Number.isFinite(o)?o.toLocaleString("fa-IR",{maximumFractionDigits:3}):"۰"}),h=Y({notify:!1,loginNotify:!1});function c(o){if(!l.isLoggedIn){h.loginNotify=!0;return}o===0&&r.push({name:"ordersList"}),o===1&&r.push({name:"transactionsList"}),o===2&&r.push({name:"profileData"}),o===3&&r.push({name:"favoritesList"}),o===4&&r.push({name:"ChildOrder"}),o===5&&r.push({name:"customerChoice"}),o===6&&r.push({name:"report"})}async function F(){h.notify=!1;try{await P.endSharedSession()}catch{}let o=null;try{o=(await P.ssoLogoutUrl()).logout_url}catch{o=null}if(l.logout(),sessionStorage.removeItem("gb_iam_sso_checked"),o){window.location.assign(o);return}r.push({name:"home"})}async function g(){v.value=!1;const[o,e]=await Promise.allSettled([l.isLoggedIn?w.me({force:!0}):Promise.resolve(null),w.goldPrice({force:!0})]);o.status==="fulfilled"?(d.value=o.value,v.value=!1):(v.value=l.isLoggedIn&&!d.value,console.log(o.reason)),z.value=e.status==="fulfilled"?e.value:null}async function A(){try{await g()}finally{y.value=!1}}let D=!1;q(()=>{D&&g(),D=!0});let L=!1;const x=m(L);function f(o){return{"--reveal-delay":`${o*Ps}ms`}}return G(async()=>{await g(),!x.value&&(await H(),requestAnimationFrame(()=>{x.value=!0,L=!0}))}),(o,e)=>{const B=W("container");return _(),u("div",os,[a(ss,{title:"میز کار",back:!1},{trailing:C(()=>[i(l).isLoggedIn?(_(),u("button",{key:0,type:"button",class:"dash__exit","aria-label":"خروج",onClick:e[0]||(e[0]=n=>h.notify=!0)},[a(t,{icon:"vuesax-linear:logout",size:"18"})])):(_(),u("span",ts))]),_:1}),a(Z,{modelValue:y.value,"onUpdate:modelValue":e[10]||(e[10]=n=>y.value=n),onRefresh:A},{default:C(()=>[a(B,{class:T(["dash__body",{"is-revealed":x.value}])},{default:C(()=>[i(l).isLoggedIn&&d.value?(_(),u("section",{key:0,class:"dash__hero dash__reveal",style:b(f(0))},[s("header",ns,[s("div",is,[s("span",rs,p(d.value.fullName),1),s("span",ls,p(i(l).mobile),1)]),s("span",{class:T(["dash__heroSeal",S.value?"is-debtor":"is-creditor"])},p(S.value?"بدهکار":"بستانکار"),3)]),s("div",ds,[s("div",us,[s("span",_s,p(E.value),1),e[14]||(e[14]=s("span",{class:"dash__heroUnit"},"گرم",-1))]),e[15]||(e[15]=s("span",{class:"dash__heroEyebrow"},"موجودی طلا",-1))]),s("div",hs,[e[17]||(e[17]=s("span",{class:"dash__heroDebtLabel"},"بدهی ریالی",-1)),s("b",null,[j(p(i(as)(d.value.fiatDebtRial))+" ",1),e[16]||(e[16]=s("i",null,"ریال",-1))])])],4)):i(l).isLoggedIn?(_(),u("section",{key:1,class:"dash__hero dash__hero--pending dash__reveal",style:b(f(0))},[s("header",cs,[s("div",ps,[e[18]||(e[18]=s("span",{class:"dash__heroName"},"حساب شما",-1)),s("span",vs,p(i(l).mobile),1)])]),s("p",fs,p(v.value?"موجودی الان در دسترس نیست. دوباره تلاش کنید.":"در حال دریافت موجودی…"),1),v.value?(_(),u("button",{key:0,type:"button",class:"dash__heroRetry",onClick:g}," تلاش دوباره ")):R("",!0)],4)):(_(),u("section",{key:2,class:"dash__hero dash__invite dash__reveal",style:b(f(0))},[s("img",{class:"dash__inviteLogo",src:J,alt:i(k).name},null,8,ms),s("button",{type:"button",class:"dash__inviteCta",onClick:e[1]||(e[1]=n=>i(r).push({name:"login"}))}," ورود / ثبت‌نام ")],4)),s("section",{class:"dash__rows dash__reveal",style:b(f(1))},[s("button",{type:"button",class:"dash__row",onClick:e[2]||(e[2]=n=>c(0))},[s("span",bs,[a(t,{icon:"vuesax-linear:box",size:"18"})]),e[19]||(e[19]=s("span",{class:"dash__rowText"},[s("b",null,"سفارشات")],-1)),s("span",ws,[a(t,{icon:"vuesax-linear:arrow-left-1",size:"16"})])]),s("button",{type:"button",class:"dash__row",onClick:e[3]||(e[3]=n=>c(1))},[s("span",gs,[a(t,{icon:"vuesax-linear:receipt-text",size:"18"})]),e[20]||(e[20]=s("span",{class:"dash__rowText"},[s("b",null,"اسناد")],-1)),s("span",ys,[a(t,{icon:"vuesax-linear:arrow-left-1",size:"16"})])]),s("button",{type:"button",class:"dash__row",onClick:e[4]||(e[4]=n=>c(2))},[s("span",xs,[a(t,{icon:"vuesax-linear:user",size:"18"})]),e[21]||(e[21]=s("span",{class:"dash__rowText"},[s("b",null,"پروفایل")],-1)),s("span",Cs,[a(t,{icon:"vuesax-linear:arrow-left-1",size:"16"})])]),s("button",{type:"button",class:"dash__row",onClick:e[5]||(e[5]=n=>c(3))},[s("span",ks,[a(t,{icon:"vuesax-linear:heart",size:"18"})]),e[22]||(e[22]=s("span",{class:"dash__rowText"},[s("b",null,"علاقمندی")],-1)),s("span",Is,[a(t,{icon:"vuesax-linear:arrow-left-1",size:"16"})])]),s("button",{type:"button",class:"dash__row",onClick:e[6]||(e[6]=n=>c(6))},[s("span",zs,[a(t,{icon:"vuesax-linear:chart-2",size:"18"})]),e[23]||(e[23]=s("span",{class:"dash__rowText"},[s("b",null,"گزارش")],-1)),s("span",Ss,[a(t,{icon:"vuesax-linear:arrow-left-1",size:"16"})])]),s("button",{type:"button",class:"dash__row",onClick:e[7]||(e[7]=n=>i(r).push({name:"appearanceSettings"}))},[s("span",Ds,[a(t,{icon:"vuesax-linear:brush",size:"18"})]),e[24]||(e[24]=s("span",{class:"dash__rowText"},[s("b",null,"تنظیمات ظاهری")],-1)),s("span",Ls,[a(t,{icon:"vuesax-linear:arrow-left-1",size:"16"})])]),i(l).isSalesExpert?(_(),u(Q,{key:0},[s("button",{type:"button",class:"dash__row",onClick:e[8]||(e[8]=n=>c(4))},[s("span",$s,[a(t,{icon:"vuesax-linear:box-tick",size:"18"})]),e[25]||(e[25]=s("span",{class:"dash__rowText"},[s("b",null,"سفارش مشتریان")],-1)),s("span",Ns,[a(t,{icon:"vuesax-linear:arrow-left-1",size:"16"})])]),s("button",{type:"button",class:"dash__row",onClick:e[9]||(e[9]=n=>c(5))},[s("span",Ts,[a(t,{icon:"vuesax-linear:profile-2user",size:"18"})]),e[26]||(e[26]=s("span",{class:"dash__rowText"},[s("b",null,"مشتریان من")],-1)),s("span",Rs,[a(t,{icon:"vuesax-linear:arrow-left-1",size:"16"})])])],64)):R("",!0)],4),a(es,{quote:z.value,class:"dash__rate dash__reveal",style:b(f(2))},null,8,["quote","style"])]),_:1},8,["class"])]),_:1},8,["modelValue"]),a(N,{show:h.notify,"onUpdate:show":e[11]||(e[11]=n=>h.notify=n),art:"logout",title:"آیا می خواهید از برنامه خارج شوید؟",description:`برای استفاده دوباره از امکانات ${i(k).name}، باید دوباره وارد حساب کاربری خود شوید.`,"confirm-text":"بله","cancel-text":"بی خیال",onConfirm:F},null,8,["show","description"]),a(N,{show:h.loginNotify,"onUpdate:show":e[12]||(e[12]=n=>h.loginNotify=n),art:"login",title:"ابتدا وارد حساب کاربری شوید",description:`برای دسترسی به تمامی امکانات نرم افزار ${i(k).name}، گزینه ورود/ثبت نام را لمس کنید و در صورت نداشتن حساب کاربری، ثبت نام نمایید.`,"confirm-text":"ورود/ثبت نام","cancel-text":"بیخیال",onConfirm:e[13]||(e[13]=n=>i(r).push({name:"login"}))},null,8,["show","description"])])}}}),Os=X(Vs,[["__scopeId","data-v-7ba204f2"]]);export{Os as default};