Files
tehran_taj/apps/admin-panel/dist/assets/SingleCustomer-C5Dlor_C.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.5 KiB
JavaScript

import{d as F,u as H,a as d,w as t,p as L,r as l,o as p,c as o,h as f,E as M,i as w,T as R,n as W,f as j,l as m,z as h,x as q,k as A,H as D}from"./index-CVG99b4v.js";import{a as G,b as u,X as J}from"./model-CvqTGmy8.js";import{C as Q}from"./CreditCardOutlined-wQJvlSrP.js";import{_ as Y}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";function Z(){const a=new G("admin/customers-omde/single/list","لیست مشتریان تک");return a.add(new u("id","کد").filterNumber()),a.add(new u("fname","نام").filterKey("fullName").filterText()),a.add(new u("lname","نام خانوادگی").filterKey("fullName").filterText().noSort()),a.add(new u("phone","تلفن تماس").filterKey("mobile").filterText().noSort()),a.add(new u("email","ایمیل").filterText().noSort()),a.add(new u("branch.name","نام شعبه").filterText().noSort()),a.add(new u("op","عملیات").noSort().renderSlot("op")),a}const ee={class:"charge-grid"},te=F({__name:"SingleCustomer",setup(a){const _=A(),y=H(),v=e=>!!y.hasPermission(e),k=Z(),S=m(null),x=L(()=>D()),c=m(!1),C=m(!1),r=m(void 0),g=m(void 0);function T(e){g.value=e,r.value=void 0,c.value=!0}function N(){r.value=void 0,c.value=!1}async function V(){var e,n;if(!g.value||!r.value){h.error("لطفا مقدار را وارد کنید");return}try{C.value=!0,await q.post("wallet/charge",{customer_id:g.value,value:r.value}),h.info("عملیات با موفقیت انجام شد"),c.value=!1,r.value=void 0,await _.push("/wallet")}catch(s){console.log(s),h.error(((n=(e=s==null?void 0:s.response)==null?void 0:e.data)==null?void 0:n.message)??"خطا در ثبت اطلاعات.")}finally{C.value=!1}}function B(e){_.push(`/singleCustomer/edit/${e}`)}function $(e){_.push(`/singleCustomer/view/${e}`)}return(e,n)=>{const s=l("a-tooltip"),E=l("a-input-number"),X=l("a-form-item"),K=l("a-button"),O=l("a-popconfirm"),U=l("a-form"),I=l("a-spin"),P=l("a-modal"),z=l("a-card");return p(),d(z,{title:x.value?"لیست مشتریان":"لیست مشتریان تک فروشی"},{default:t(()=>[o(J,{ref_key:"tbl",ref:S,model:f(k)},{op:t(({record:i})=>[o(s,{title:"ویرایش"},{default:t(()=>[o(f(M),{class:"cursor-pointer mx-1 text-primary",onClick:b=>B(i.id)},null,8,["onClick"])]),_:2},1024),v("wallet.charge")&&!x.value?(p(),d(s,{key:0,title:"شارژ کیف پول"},{default:t(()=>[o(f(Q),{class:"cursor-pointer mx-1",style:{color:"#d48806"},onClick:b=>T(i.id)},null,8,["onClick"])]),_:2},1024)):w("",!0),v("wallet.charge")?(p(),d(s,{key:1,title:"مشاهده اطلاعات"},{default:t(()=>[o(f(R),{class:"cursor-pointer mx-1 text-success",onClick:b=>$(i.id)},null,8,["onClick"])]),_:2},1024)):w("",!0)]),_:1},8,["model"]),v("wallet.charge")?(p(),d(P,{key:0,open:c.value,"onUpdate:open":n[1]||(n[1]=i=>c.value=i),footer:null,title:"شارژ کیف پول"},{default:t(()=>[o(I,{spinning:C.value},{default:t(()=>[o(U,{layout:"vertical"},{default:t(()=>[W("div",ee,[o(X,{label:"میزان شارژ"},{default:t(()=>[o(E,{value:r.value,"onUpdate:value":n[0]||(n[0]=i=>r.value=i),class:"w-full"},null,8,["value"])]),_:1}),o(O,{style:{"margin-bottom":"24px"},title:"آیا از شارژ کیف پول مطمعن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:V,onCancel:N},{default:t(()=>[o(K,{type:"primary"},{default:t(()=>[...n[2]||(n[2]=[j("ثبت",-1)])]),_:1})]),_:1})])]),_:1})]),_:1},8,["spinning"])]),_:1},8,["open"])):w("",!0)]),_:1},8,["title"])}}}),ue=Y(te,[["__scopeId","data-v-c516ee92"]]);export{ue as default};