Files
tehran_taj/apps/admin-panel/dist/assets/List-BtjkagGb.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
7.6 KiB
JavaScript

import{u as q,d as oe,b as i,c as l,w as t,p as ne,r as c,o as n,h as K,A as ae,t as s,i as p,n as b,a as f,F as P,e as V,f as d,l as U,x as N,z as h,H as le}from"./index-CVG99b4v.js";import{a as se,b as v,X as re}from"./model-CvqTGmy8.js";import{_ as X}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-DxnpxKjK.js";import{a as ie,j as de}from"./filters-UavLT20t.js";import{_ as ue}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-D7--Xtqg.js";import"./icons-BaVxJrpa.js";import"./TeamOutlined-BEJyrWYB.js";import"./UnorderedListOutlined-CKa6XzC7.js";import"./CreditCardOutlined-wQJvlSrP.js";import"./index-pLFqZCCf.js";function ce(){const u=new se("admin/orders/list","لیست سفارش های تک فروشی");u.add(new v("id","شماره").filterNumber()),u.add(new v("customer.fname","نام مشتری").filterKey("customer.fullName").filterText()),u.add(new v("customer.lname","نام خانوادگی").filterKey("customer.fullName").filterText()),u.add(new v("total_price","جمع کل سفارش").renderSlot("total_price").filterText()),u.add(new v("items","تعداد آیتم ها").renderSlot("items_len").noSort()),u.add(new v("caj","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),u.add(new v("uaj","تاریخ ویرایش").hidden().filterKey("updatedAt").filterDate().noSort()),u.add(new v("user","ثبت کننده").renderSlot("user").noSort());const $=q();return $.roles&&$.roles.includes("order.tamin.state")&&(u.add(new v("sts_str","وضعیت").renderSlot("sts").noSort()),u.add(new v("branch.name","نام شعبه").filterText().noSort())),u.add(new v("opt","عملیات").noSort().renderSlot("opt")),u}const _e={id:"page-user-list"},fe={class:"flex"},pe={key:0},ve={key:0},me={key:1},ye={key:0},ke=["onClick"],we={key:1},be={class:"flex flex-col"},ge={key:0},he={class:"flex"},Se={class:"flex-1"},Ce={key:1,class:"flex items-center"},xe={key:2},Ue={key:0},$e={class:"flex justify-between"},je=oe({__name:"List",setup(u){const $=q(),k=a=>!!$.hasPermission(a),z=ce(),j=U(null),r=U(void 0),S=U(!1),C=U(!1),x=U(!1),A=ne(()=>le()),T=a=>a?de(a):"";function M(a){return a.proceed?"green":"gray"}async function O(a){a.branch_id||(r.value=await B(a.id),C.value=!0)}async function B(a){const{data:o}=await N.get(`admin/orders/${a}`);return o}async function R(a){var o,m;try{await N.post("single/order-sts/edit",{orderId:(o=r.value)==null?void 0:o.id,status:a.status,note:a.note}),C.value=!1,h.info("ویرایش موفق آمیز"),(m=j.value)==null||m.fetch()}catch{h.error("خطا در ویرایش")}}async function E(a){var o,m;try{await N.post("single/order-sts/edit",{orderId:(o=r.value)==null?void 0:o.id,status:a.status,note:a.note,remove:!0}),C.value=!1,h.info("ویرایش موفق آمیز"),(m=j.value)==null||m.fetch()}catch{h.error("خطا در ویرایش")}}async function H(){var a;try{x.value=!x.value,S.value=!S.value,h.info("ویرایش موفق آمیز"),(a=j.value)==null||a.fetch()}catch{h.error("خطا در ویرایش")}}async function G(a){r.value=await B(a.id),S.value=!0}async function J(a){h.warning("خروجی PDF هنوز در بک‌اند جدید پیاده‌سازی نشده است")}return(a,o)=>{const m=c("a-tag"),g=c("a-button"),Q=c("a-popconfirm"),W=c("a-input"),Y=c("a-timeline-item"),Z=c("a-timeline"),D=c("a-modal"),y=c("a-descriptions-item"),L=c("a-descriptions"),I=c("a-input-number"),ee=c("a-divider"),F=c("a-card"),te=c("a-empty");return n(),i("div",_e,[l(F,{title:A.value?"لیست سفارش":"لیست سفارش های تک فروشی"},{default:t(()=>[l(re,{ref_key:"tbl",ref:j,model:K(z)},{opt:t(({record:e})=>[b("div",fe,[k("order.list.view")?(n(),f(X,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"ListIcon",title:"مشاهده سفارش",onClick:_=>G(e)},null,8,["onClick"])):p("",!0),k("order.list.pdf")?(n(),f(X,{key:1,"icon-class":"w-5 h-5 text-danger",class:"mr-3",icon:"FileIcon",title:"دانلود pdf",onClick:_=>J(e.id)},null,8,["onClick"])):p("",!0)])]),items_len:t(({text:e})=>[e?(n(),i("div",pe,s(e.length),1)):p("",!0)]),user:t(({text:e,record:_})=>[e?(n(),i("div",ve,s(e.name),1)):(n(),i("div",me,s(_.customer.fname+" "+_.customer.lname),1))]),total_price:t(({text:e})=>[e?(n(),i("div",ye,s(K(ie)(e)),1)):p("",!0)]),sts:t(({text:e,record:_})=>[k("order.list.sts")?(n(),i("a",{key:0,href:"",onClick:ae(w=>O(_),["prevent"])},s(e),9,ke)):(n(),i("span",we,s(e),1))]),_:1},8,["model"]),l(D,{open:C.value,"onUpdate:open":o[1]||(o[1]=e=>C.value=e),title:"وضعیت سفارش"},{footer:t(()=>[l(g,{onClick:o[0]||(o[0]=e=>C.value=!1)},{default:t(()=>[...o[8]||(o[8]=[d("باشه",-1)])]),_:1})]),default:t(()=>[r.value?(n(),f(Z,{key:0},{default:t(()=>[(n(!0),i(P,null,V(r.value.activity,(e,_)=>(n(),f(Y,{key:_,color:M(e)},{default:t(()=>[b("div",be,[b("div",null,s(e.title),1),e.proceed?(n(),i("div",ge,[b("div",he,[b("div",Se,[l(m,null,{default:t(()=>[d(s(T(e.uaj)),1)]),_:2},1024)]),_>0&&k("order.list.sts.remove")?(n(),f(Q,{key:0,"ok-text":"بله","cancel-text":"بی خیال",onConfirm:w=>E(e)},{title:t(()=>[...o[5]||(o[5]=[b("p",null,"آیا مطمئن به حذف وضعیت مورد نظر هستید ؟",-1)])]),default:t(()=>[l(g,{size:"small",danger:""},{default:t(()=>[...o[6]||(o[6]=[d("حذف وضعیت",-1)])]),_:1})]),_:1},8,["onConfirm"])):p("",!0)])])):p("",!0),!e.proceed&&k("order.list.sts.submit")?(n(),i("div",Ce,[l(W,{value:e.note,"onUpdate:value":w=>e.note=w,placeholder:"یادداشت"},null,8,["value","onUpdate:value"]),l(g,{type:"text",size:"small",onClick:w=>R(e)},{default:t(()=>[...o[7]||(o[7]=[d("ثبت وضعیت",-1)])]),_:1},8,["onClick"])])):p("",!0),e.proceed?(n(),i("div",xe,s(e.note),1)):p("",!0)])]),_:2},1032,["color"]))),128))]),_:1})):p("",!0)]),_:1},8,["open"]),l(D,{open:S.value,"onUpdate:open":o[4]||(o[4]=e=>S.value=e),title:"مشاهده سفارش",width:"80%"},{footer:t(()=>[b("div",$e,[l(g,{onClick:o[2]||(o[2]=e=>S.value=!1)},{default:t(()=>[...o[9]||(o[9]=[d("باشه",-1)])]),_:1}),x.value&&k("order.list.view.edit")?(n(),f(g,{key:0,danger:"",onClick:o[3]||(o[3]=e=>H())},{default:t(()=>[...o[10]||(o[10]=[d(" ویرایش سفارش ",-1)])]),_:1})):p("",!0)])]),default:t(()=>[r.value?(n(),i("div",Ue,[l(L,null,{default:t(()=>[l(y,{label:"مشتری"},{default:t(()=>[d(s(r.value.customer.fname)+" "+s(r.value.customer.lname),1)]),_:1}),l(y,{label:"تلفن همراه"},{default:t(()=>[d(s(r.value.customer.phone),1)]),_:1}),l(y,{label:"تاریخ ثبت"},{default:t(()=>[d(s(T(r.value.caj)),1)]),_:1}),l(y,{label:"وضعیت"},{default:t(()=>[d(s(r.value.sts_str),1)]),_:1})]),_:1}),l(F,{title:"آیتم های سفارش"},{default:t(()=>[(n(!0),i(P,null,V(r.value.items,(e,_)=>(n(),i("div",{key:_},[l(L,null,{default:t(()=>[l(y,{label:"نام محصول"},{default:t(()=>[l(m,{color:"blue"},{default:t(()=>[d(s(e.title),1)]),_:2},1024)]),_:2},1024),l(y,{label:"عنوان تنوع"},{default:t(()=>[d(s(e.variant_title),1)]),_:2},1024),l(y,{label:"وزن نهایی"},{default:t(()=>[x.value&&k("order.list.view.edit")?(n(),f(I,{key:0,value:e.grams,"onUpdate:value":w=>e.grams=w,class:"w-full mt-0"},null,8,["value","onUpdate:value"])):(n(),f(m,{key:1,color:"red"},{default:t(()=>[d(s(e.grams),1)]),_:2},1024))]),_:2},1024),l(y,{label:"تعداد"},{default:t(()=>[x.value&&k("order.list.view.edit")?(n(),f(I,{key:0,value:e.qty,"onUpdate:value":w=>e.qty=w},null,8,["value","onUpdate:value"])):(n(),f(m,{key:1,color:"orange"},{default:t(()=>[d(s(e.qty),1)]),_:2},1024))]),_:2},1024),l(y,{label:"توضیحات"},{default:t(()=>[b("div",null,s(e.note),1)]),_:2},1024)]),_:2},1024),_<r.value.items.length-1?(n(),f(ee,{key:0})):p("",!0)]))),128))]),_:1})])):(n(),f(te,{key:1}))]),_:1},8,["open"])]),_:1},8,["title"])])}}}),qe=ue(je,[["__scopeId","data-v-a0837a14"]]);export{qe as default};