Files
tehran_taj/apps/user-app/dist/assets/ProfileView-B4P7gJP8.js
T
s.esmaeiliandClaude Opus 5.5 1bc3739e78 Merge release/delivery (IAM single sign-on) into the triage work
Brings the four release/delivery commits (IAM SSO for the admin panel,
both apps and the API; IAM env in docker-compose) onto fix/issues-triage.

Conflicts:
- customer-auth.service.ts imports: both kept.
- both apps' api/client.ts: both kept (AccountingBalance/WageQuote, and
  iamAppUrl).
- all build output (admin-panel, user-app, user-app-v2 dist, and the api
  release bundle): rebuilt from the merged source instead of picking a
  side.

Fixed while verifying:
- The IAM change calls iam.browserBootstrapUrl after every login, but
  the identity-service stand-ins in three test files lacked it. 15 tests
  failed on release/delivery itself.
- SMS relay: SMS_RELAY_PLATFORM was read but never sent, so the gateway
  never got `platform` (documented body: phone, host, text, platform).
  relayConfig() now returns it ("default" → null) and the request carries
  it. sms.service.spec now passes.

All 249 API tests pass; the three front-ends type-check and build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 09:03:53 +03:30

2 lines
4.1 KiB
JavaScript

import{d as x,Q as L,o as w,x as g,c as n,p as r,z as M,g as d,B as F,i,b as e,I as y,t as a,f as c,e as f,P as k,l as $,h as v,E as z,_ as O}from"./index-A5mMuyrx.js";import{P as U}from"./PageBar-DywP6W8w.js";import{S as m}from"./SectionHead-kC2XiYoH.js";const A={class:"prof"},W={class:"prof__identity"},H={class:"prof__avatar","aria-hidden":"true"},J={class:"prof__name"},Q={key:0,class:"prof__mobile"},j={key:0,class:"prof__block"},q={class:"prof__specs"},G={class:"prof__spec"},K={class:"prof__spec"},X={class:"prof__spec"},Y={class:"prof__spec"},Z={key:1,class:"prof__block"},ee={class:"prof__specs"},se={class:"prof__spec"},te={class:"prof__spec"},oe={key:2,class:"prof__block"},le={key:3,class:"prof__empty"},ae=x({__name:"ProfileView",setup(ne){const S={UNVERIFIED:"احراز نشده",STEP_ONE_SUBMITTED:"مرحله اول ثبت شده",STEP_TWO_SUBMITTED:"مرحله دوم ثبت شده",VERIFIED:"تایید شده",REJECTED:"رد شده"},T=L(),o=d(null),_=d(!1),h=v(()=>{var s;return((s=o.value)==null?void 0:s.verificationStep)==="VERIFIED"}),B=v(()=>{var t;const s=(t=o.value)==null?void 0:t.verificationStep;return!!s&&s!=="VERIFIED"&&s!=="STEP_TWO_SUBMITTED"}),V=z(),l=d(null),p=d(!1),u=s=>Number(s??0),b=s=>u(s)>0?"بدهکار":u(s)<0?"بستانکار":"",E=s=>u(s)>0?"is-debt":u(s)<0?"is-credit":"",C=s=>`${Math.abs(u(s)).toLocaleString("fa-IR",{maximumFractionDigits:3})} گرم`,D=s=>`${Math.abs(u(s)).toLocaleString("fa-IR")} ریال`,P=v(()=>{const s=l.value;if(!(s!=null&&s.at))return"";const t=new Date(s.at).toLocaleString("fa-IR",{dateStyle:"short",timeStyle:"short"});return s.source==="stored"?`آخرین مانده‌ی ثبت‌شده — ${t}`:`از ${s.provider??"حسابداری"} — ${t}`});async function R(){p.value=!0;try{l.value=await g.getAccountingBalance()}catch{l.value=null}finally{p.value=!1}}return w(async()=>{if(T.isLoggedIn){R(),_.value=!0;try{o.value=await g.getMe()}finally{_.value=!1}}}),(s,t)=>{const N=F("container");return i(),n("div",A,[r(U,{title:"اطلاعات کاربری","back-to":"userPage::hasSubRoute"}),r(N,{class:"prof__body"},{default:M(()=>{var I;return[e("section",W,[e("div",H,[r(y,{icon:"vuesax-linear:user",size:"30"})]),e("h2",J,a(((I=o.value)==null?void 0:I.fullName)??"—"),1),o.value?(i(),n("p",Q,a(o.value.mobile),1)):c("",!0),o.value?(i(),n("span",{key:1,class:f(["prof__seal",h.value?"is-ok":"is-pending"])},a(S[o.value.verificationStep]??o.value.verificationStep),3)):c("",!0)]),o.value?(i(),n("section",j,[r(m,{title:"مشخصات",subtitle:"اطلاعات ثبت‌شده حساب شما"}),e("dl",q,[e("div",G,[t[1]||(t[1]=e("dt",null,"نام و نام خانوادگی",-1)),e("dd",null,a(o.value.fullName),1)]),e("div",K,[t[2]||(t[2]=e("dt",null,"تلفن همراه",-1)),e("dd",null,a(o.value.mobile),1)]),e("div",X,[t[3]||(t[3]=e("dt",null,"کد ملی",-1)),e("dd",null,a(o.value.nationalCode||"-"),1)]),e("div",Y,[t[4]||(t[4]=e("dt",null,"وضعیت احراز هویت",-1)),e("dd",null,a(S[o.value.verificationStep]??o.value.verificationStep),1)])])])):c("",!0),l.value&&l.value.source!=="none"?(i(),n("section",Z,[r(m,{title:"مانده‌ی حساب",subtitle:P.value},null,8,["subtitle"]),e("dl",ee,[e("div",se,[t[5]||(t[5]=e("dt",null,"مانده‌ی طلا",-1)),e("dd",{class:f(E(l.value.gold))},[k(a(C(l.value.gold))+" ",1),e("small",null,a(b(l.value.gold)),1)],2)]),e("div",te,[t[6]||(t[6]=e("dt",null,"مانده‌ی ریالی",-1)),e("dd",{class:f(E(l.value.rial))},[k(a(D(l.value.rial))+" ",1),e("small",null,a(b(l.value.rial)),1)],2)])])])):p.value?(i(),n("section",oe,[r(m,{title:"مانده‌ی حساب",subtitle:"در حال دریافت از حسابداری…"}),t[7]||(t[7]=e("div",{class:"prof__specs prof__skeleton"},null,-1))])):_.value?c("",!0):(i(),n("section",le,[r(y,{icon:"vuesax-linear:user",size:"26"}),t[8]||(t[8]=e("p",null,"اطلاعات حساب در دسترس نیست.",-1))])),B.value?(i(),n("button",{key:4,type:"button",class:"prof__complete",onClick:t[0]||(t[0]=ie=>$(V).push({name:"completeProfile"}))}," تکمیل پروفایل ")):c("",!0)]}),_:1})])}}}),de=O(ae,[["__scopeId","data-v-5e5ee3f7"]]);export{de as default};