Files
tehran_taj/apps/admin-panel/dist/assets/AgentDetail-tAZA35KU.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
3.6 KiB
JavaScript

import{d as D,v as S,x as A,a as x,w as a,j as F,l as y,r as d,o as i,c as o,f as l,t as s,n as E,b as p,F as f,h as I,i as k}from"./index-CVG99b4v.js";import{j}from"./filters-UavLT20t.js";import{_ as M}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./index-pLFqZCCf.js";const R={class:"stats mt-4"},T=D({__name:"AgentDetail",setup($){const h=F().params.id,m=y(!1),n=y(void 0),C=[{title:"نام",dataIndex:"name"},{title:"موبایل",dataIndex:"mobile"},{title:"شهر",dataIndex:"city"},{title:"نوع",dataIndex:"type_str"},{title:"وضعیت",dataIndex:"active"},{title:"تاریخ ثبت",dataIndex:"caj"}],w=[{title:"شماره سفارش",dataIndex:"name"},{title:"مشتری",dataIndex:"customer"},{title:"وزن",dataIndex:"w"},{title:"وضعیت",dataIndex:"status"},{title:"تاریخ",dataIndex:"caj"}];return S(async()=>{try{m.value=!0;const{data:_}=await A.get(`admin/customers-omde/reagent/${h}`);n.value=_}catch(_){console.log(_)}finally{m.value=!1}}),(_,G)=>{const c=d("a-descriptions-item"),u=d("a-tag"),z=d("a-descriptions"),B=d("a-card"),v=d("a-table"),g=d("a-tab-pane"),N=d("a-tabs"),V=d("a-spin");return i(),x(V,{spinning:m.value},{default:a(()=>[o(B,{title:"مشاهده اطلاعات کارشناس فروش"},{default:a(()=>[o(z,{bordered:"",size:"small",column:3},{default:a(()=>[o(c,{label:"نام"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.name)??"-"),1)]}),_:1}),o(c,{label:"موبایل"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.mobile)??"-"),1)]}),_:1}),o(c,{label:"شعبه"},{default:a(()=>{var e,t;return[l(s(((t=(e=n.value)==null?void 0:e.branch)==null?void 0:t.name)??"-"),1)]}),_:1}),o(c,{label:"درصد کمیسیون"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.percent)??"-"),1)]}),_:1}),o(c,{label:"وضعیت"},{default:a(()=>{var e;return[o(u,{color:((e=n.value)==null?void 0:e.active)===1?"green":"red"},{default:a(()=>{var t;return[l(s(((t=n.value)==null?void 0:t.active)===1?"فعال":"غیر فعال"),1)]}),_:1},8,["color"])]}),_:1}),o(c,{label:"میزان فروش (گرم)"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.grams_sell)??0),1)]}),_:1})]),_:1}),E("div",R,[o(u,{color:"blue"},{default:a(()=>{var e,t;return[l("مشتریان معرفی‌شده: "+s(((t=(e=n.value)==null?void 0:e.referred_customers)==null?void 0:t.length)??0),1)]}),_:1}),o(u,{color:"green"},{default:a(()=>{var e,t;return[l("سفارش‌های ثبت‌شده: "+s(((t=(e=n.value)==null?void 0:e.orders)==null?void 0:t.length)??0),1)]}),_:1})])]),_:1}),o(N,{class:"mt-4","default-active-key":"referred"},{default:a(()=>[o(g,{key:"referred",tab:"مشتریان معرفی‌شده"},{default:a(()=>{var e;return[o(v,{size:"small","data-source":(e=n.value)==null?void 0:e.referred_customers,columns:C,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>{var b;return[t.dataIndex==="active"?(i(),x(u,{key:0,color:r.active===1?"green":"red"},{default:a(()=>[l(s(r.active===1?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])):t.dataIndex==="city"?(i(),p(f,{key:1},[l(s(((b=r.city)==null?void 0:b.title)??"-"),1)],64)):t.dataIndex==="caj"?(i(),p(f,{key:2},[l(s(I(j)(r.caj)),1)],64)):k("",!0)]}),_:1},8,["data-source"])]}),_:1}),o(g,{key:"orders",tab:"سفارش‌های مشتریان"},{default:a(()=>{var e;return[o(v,{size:"small","data-source":(e=n.value)==null?void 0:e.orders,columns:w,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>[t.dataIndex==="caj"?(i(),p(f,{key:0},[l(s(I(j)(r.caj)),1)],64)):k("",!0)]),_:1},8,["data-source"])]}),_:1})]),_:1})]),_:1},8,["spinning"])}}}),O=M(T,[["__scopeId","data-v-726ef090"]]);export{O as default};