Files
tehran_taj/apps/user-app/dist/assets/DashboardView-CI53sbc3.js
T
s.esmaeiliandClaude Opus 5 53436ec855 chore(release): prepare release/delivery + fix docker env passthrough
DEPLOY-01: docker-compose.yml passed only DATABASE_URL and PORT to the api
service, so JWT_SECRET, JWT_CUSTOMER_SECRET, OTP_MASTER_CODE and every SMS_TREZ_*
variable were silently dropped in Docker. A deployed build would have used the
development JWT fallback and would not have had the delivery master code at all,
so the demo login would have failed with no obvious cause. All are now forwarded,
defaulting to empty (which the code treats as unset); verified with
`docker compose config`.

TEST-01: test-sales-expert-roundtrip.cjs had localhost:3077 hardcoded and could
only connect by accident. Now defaults to the repo's API_PORT. 33/33.

DELIVERY.md documents env vars (names only), run/deploy commands, how migrations
run inside the container, the verification results and the known issues.

release/delivery contains both parity branches with no conflicts (fast-forward).
build 5/5, jest 45/45, admin smoke 43/43, apps smoke 43/43, B2B scan 34/34,
B2B writes 25/25, auth-smoke 32/32, typecheck clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 00:30:09 +03:30

2 lines
5.4 KiB
JavaScript

import{d as $,G as T,o as z,c as u,b as s,u as n,k as a,s as l,g as m,C as B,q as C,i as _,t as r,E as b,e as k,I as g,F,r as G,y as P,h as y,v as U,_ as q}from"./index-gDBsh1na.js";import{S as w}from"./SectionHead-D1crGF_Y.js";import{R as E}from"./RateStrip-CWGvnHfp.js";import{_ as D}from"./DialogVant.vue_vue_type_style_index_0_lang-CjJCtcu_.js";import{l as M}from"./dialogEmpty1-Caw7F5KL.js";import{p as H}from"./filters-CLL9nGZ2.js";import{P as j}from"./index-C_XVtQe0.js";import"./_commonjsHelpers-Cpj98o6Y.js";const W="/assets/dialogEmpty5-DWebUDaI.svg",A={class:"dash"},J={class:"dash__bar"},K={class:"dash__barInner"},Q={key:1,class:"dash__barSpacer","aria-hidden":"true"},X={key:0,class:"dash__balance"},Y={class:"dash__balanceHead"},Z={class:"dash__eyebrow"},ss={class:"dash__figure"},ts={class:"dash__balanceRow"},es={class:"dash__rowValue"},as={class:"dash__identity"},os={class:"dash__name"},is={class:"dash__mobile"},ns={key:1,class:"dash__invite"},ls={class:"dash__inviteIcon","aria-hidden":"true"},ds={class:"dash__section"},rs={class:"dash__grid"},us=["onClick"],_s={class:"dash__tileIcon","aria-hidden":"true"},cs={class:"dash__tileTitle"},fs={class:"dash__section"},ps=["src"],vs=["src"],hs=$({__name:"DashboardView",setup(ms){const d=P(),c=T(),i=m(null),p=m(null),v=m(!1),h=y(()=>i.value?parseFloat(i.value.goldDebtGrams)>0:!1),I=y(()=>h.value?"بدهکار گرمی":"بستانکار گرمی"),L=y(()=>i.value?Math.abs(parseFloat(i.value.goldDebtGrams)):0),o=B({notify:!1,loginNotify:!1}),N=[{id:0,icon:"vuesax-linear:box",title:"سفارشات",disabled:!1},{id:1,icon:"vuesax-linear:receipt-text",title:"اسناد",disabled:!1},{id:2,icon:"vuesax-linear:user",title:"پروفایل",disabled:!1},{id:3,icon:"vuesax-linear:heart",title:"علاقمندی",disabled:!1}];function V(f){if(!c.isLoggedIn){o.loginNotify=!0;return}f===0&&d.push({name:"ordersList"}),f===1&&d.push({name:"transactionsList"}),f===2&&d.push({name:"profileData"}),f===3&&d.push({name:"favoritesList"})}function S(){c.logout(),o.notify=!1,d.push({name:"home"})}async function x(){c.isLoggedIn&&(i.value=await C.getMe());try{p.value=await C.getLatestGoldPrice()}catch{p.value=null}}async function O(){await x(),v.value=!1}return z(x),(f,t)=>{const R=U("container");return _(),u("div",A,[s("header",J,[s("div",K,[t[8]||(t[8]=s("span",{class:"dash__barSpacer","aria-hidden":"true"},null,-1)),t[9]||(t[9]=s("h1",{class:"dash__barTitle"},"میز کار",-1)),n(c).isLoggedIn?(_(),u("button",{key:0,type:"button",class:"dash__barBtn","aria-label":"خروج",onClick:t[0]||(t[0]=e=>o.notify=!0)},[a(g,{icon:"vuesax-linear:logout",size:"19"})])):(_(),u("span",Q))])]),a(n(j),{modelValue:v.value,"onUpdate:modelValue":t[2]||(t[2]=e=>v.value=e),onRefresh:O},{default:l(()=>[a(R,{class:"dash__body"},{default:l(()=>[i.value?(_(),u("section",X,[s("div",Y,[s("div",null,[s("div",Z,r(I.value),1),s("div",ss,[b(r(L.value)+" ",1),t[10]||(t[10]=s("span",{class:"dash__unit"},"گرم",-1))])]),s("span",{class:k(["dash__seal",h.value?"is-debtor":"is-creditor"])},r(h.value?"بدهکار":"بستانکار"),3)]),s("div",ts,[t[12]||(t[12]=s("span",{class:"dash__rowLabel"},"بدهی ریالی",-1)),s("span",es,[b(r(n(H)(i.value.fiatDebtRial))+" ",1),t[11]||(t[11]=s("i",null,"ریال",-1))])]),s("div",as,[s("span",os,r(i.value.fullName),1),s("span",is,r(n(c).mobile),1)])])):(_(),u("section",ns,[s("div",ls,[a(g,{icon:"vuesax-linear:security-user",size:"20"})]),t[13]||(t[13]=s("div",{class:"dash__inviteCopy"},[s("h3",null,"حساب گرمی شما"),s("p",null,"برای دیدن موجودی، سفارش‌ها و اسناد خود وارد شوید.")],-1)),s("button",{type:"button",class:"dash__inviteCta",onClick:t[1]||(t[1]=e=>n(d).push({name:"login"}))}," ورود / ثبت‌نام ")])),s("section",ds,[a(w,{title:"دسترسی‌ها",subtitle:"بخش‌های حساب شما"}),s("div",rs,[(_(),u(F,null,G(N,e=>s("button",{key:e.id,type:"button",class:k(["dash__tile",{"is-disabled":e.disabled}]),onClick:bs=>V(e.id)},[s("span",_s,[a(g,{icon:e.icon,size:"20"},null,8,["icon"])]),s("span",cs,r(e.title),1)],10,us)),64))])]),s("section",fs,[a(w,{title:"نرخ روز",subtitle:"آخرین نرخ اعلام‌شده"}),a(E,{quote:p.value},null,8,["quote"])])]),_:1})]),_:1},8,["modelValue"]),a(D,{timeOut:-1,show:o.notify,"onUpdate:show":t[4]||(t[4]=e=>o.notify=e),closeOnClickOverlay:!0},{img:l(()=>[s("img",{src:n(W),alt:"",class:"opacity-70 mb-8"},null,8,ps)]),title:l(()=>[...t[14]||(t[14]=[b("آیا می خواهید از برنامه خارج شوید؟",-1)])]),button:l(()=>[s("div",{class:"text-center text-[#1C2D56]",onClick:S},"بله"),s("div",{class:"text-center text-[#6b7280]",onClick:t[3]||(t[3]=e=>o.notify=!1)},"بی خیال")]),_:1},8,["show"]),a(D,{timeOut:-1,show:o.loginNotify,"onUpdate:show":t[7]||(t[7]=e=>o.loginNotify=e),closeOnClickOverlay:!0},{img:l(()=>[s("img",{src:n(M),alt:"",class:"opacity-80"},null,8,vs)]),title:l(()=>[...t[15]||(t[15]=[s("div",{class:"p-8 text-justify"}," برای دسترسی به تمامی امکانات نرم افزار منتزر، ابتدا گزینه ورود/ثبت نام را لمس کنید و در صورت نداشتن حساب کاربری، ثبت نام نمایید. ",-1)])]),button:l(()=>[s("div",{class:"text-center text-[#1C2D56]",onClick:t[5]||(t[5]=e=>n(d).push({name:"login"}))},"ورود/ثبت نام"),s("div",{class:"text-center text-danger",onClick:t[6]||(t[6]=e=>o.loginNotify=!1)},"بیخیال")]),_:1},8,["show"])])}}}),Ls=q(hs,[["__scopeId","data-v-072e5edf"]]);export{Ls as default};