Files
tehran_taj/apps/admin-panel/dist/assets/TaminList-Di-q4cQw.js
T
mahmoodandClaude Sonnet 5.5 5ddb225813 fix(ui): act-as strip no longer covers headers; customer type and slider permission
- apps: the fixed «در حال مشاهده به‌عنوان» strip (38px) sat over the fixed page
  headers, which still sat at top: 0 (the old 30px body padding was shorter than
  the strip too). The strip's height is now one variable, --aab-h, that the
  fixed headers (PageBar, home, dashboard, toasts) use as their top.
- admin: the customer form offers only «مغازه دار اپلیکیشن» to anyone but the
  super admin; bankers and walk-in shopkeepers are listed by super-admin-only
  endpoints, so ordinary admins lost the customers they created under them.
- admin: the mobile slider rid (custom.config.statics.slider) was only under the
  «سفارشی» branch, which the permission screen hides outside level 104. Same rid,
  now listed under «مدیریت ثابت ها». Display only: the slider routes are still
  gated by config.statics.

Rebuilds admin-panel, user-app and user-app-v2 dist.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 11:16:23 +03:30

2 lines
6.7 KiB
JavaScript

import{u as X,d as R,b as c,c as a,w as t,r as u,o as s,h as J,f as d,t as l,H as Q,i as v,p as k,a as b,F as I,e as V,m as C,y as N,G as T,_ as Y}from"./index-D8Sl1lAu.js";import{a as Z,b as m,X as ee}from"./model-qEyXFzcU.js";import{_ as te}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-DWu7yULp.js";import{j as oe}from"./filters-DgXlZ4wf.js";import"./SettingOutlined-BVtVPkyH.js";import"./icons-DHiAKSMj.js";import"./UnorderedListOutlined-Bi9vIEx9.js";import"./PercentageOutlined-CnxkRmPA.js";import"./UserAddOutlined-CvdaMiGk.js";import"./CreditCardOutlined-BWqkAZfi.js";import"./AppstoreOutlined-Dz75-Ak8.js";import"./TeamOutlined-DNrZLver.js";import"./UserOutlined-C6rYnBkL.js";import"./CameraOutlined-DuOWfWU1.js";import"./index-DBCPuYKo.js";function ae(){const $=X(),r=new Z("admin/orders/tamin/list","لیست سفارش های عمده");return r.add(new m("id","شماره").filterNumber()),r.add(new m("customer.name","مشتری").filterKey("customer.fullName").filterText()),r.add(new m("customer.mobile","موبایل").filterText().hidden().noSort()),r.add(new m("input","ورودی").filterKey("totalGoldWeightGrams").filterText()),r.add(new m("wage","اجرت").filterKey("wageWeightGrams").filterText().noSort()),r.add(new m("items","تعداد آیتم ها").renderSlot("items_len").noSort()),r.add(new m("caj","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),r.add(new m("uaj","تاریخ ویرایش").hidden().filterKey("updatedAt").filterDate().noSort()),$.roles&&$.roles.includes("order.tamin.state")&&r.add(new m("sts","وضعیت").renderSlot("sts_str").noSort().filterSelect()),r.add(new m("confirmed","وضعیت تایید مشتری").renderSlot("confirmed_str").noSort().filterSelect({1:"تایید شده",2:"در انتظار تایید"})),r.add(new m("opt","عملیات").noSort().renderSlot("opt")),r}const ne={id:"page-user-list"},se={class:"flex"},le={key:0},re=["onClick"],ie={key:1},de={class:"flex flex-col"},ue={key:0},ce={class:"flex"},me={class:"flex-1"},_e={key:1,class:"flex items-center"},fe={key:2},pe={key:0},ve=R({__name:"TaminList",setup($){const r=X(),g=n=>!!r.hasPermission(n),z=ae(),j=C(null),i=C(void 0),x=C(!1),w=C(!1),B=n=>n?oe(n):"";function A(n){return n.proceed?"green":"gray"}async function D(n){const{data:o}=await N.get(`admin/orders/${n}`);return o}async function F(n){i.value=await D(n.id),x.value=!0}async function M(n){i.value=await D(n.id),w.value=!0}async function P(n){var o,_;try{await N.post("order-sts/edit",{orderId:(o=i.value)==null?void 0:o.id,status:n.status,note:n.note}),w.value=!1,T.info("ویرایش موفق آمیز"),(_=j.value)==null||_.fetch()}catch{T.error("خطا در ویرایش")}}async function W(n){var o,_,f,h;try{await N.post("order-sts/edit",{orderId:(o=i.value)==null?void 0:o.id,status:n.status,remove:!0}),w.value=!1,T.info("ویرایش موفق آمیز"),(_=j.value)==null||_.fetch()}catch(S){T.error(((h=(f=S==null?void 0:S.response)==null?void 0:f.data)==null?void 0:h.message)??"خطا در ویرایش")}}return(n,o)=>{const _=u("a-tag"),f=u("a-button"),h=u("a-popconfirm"),S=u("a-input"),q=u("a-timeline-item"),E=u("a-timeline"),K=u("a-modal"),p=u("a-descriptions-item"),U=u("a-descriptions"),H=u("a-divider"),G=u("a-card"),O=u("a-empty");return s(),c("div",ne,[a(G,{title:"لیست سفارش های عمده",class:"page-card"},{default:t(()=>[a(ee,{ref_key:"tbl",ref:j,model:J(z),"mobile-cards":""},{opt:t(({record:e})=>[k("div",se,[g("order.tamin.view")?(s(),b(te,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"ListIcon",title:"مشاهده سفارش",onClick:y=>F(e)},null,8,["onClick"])):v("",!0)])]),items_len:t(({text:e})=>[e?(s(),c("div",le,l(e.length),1)):v("",!0)]),sts_str:t(({record:e})=>[g("order.tamin.state")?(s(),c("a",{key:0,href:"",onClick:Q(y=>M(e),["prevent"])},l(e.sts_str),9,re)):(s(),c("span",ie,l(e.sts_str),1))]),confirmed_str:t(({record:e})=>[d(l(e.confirmed_str),1)]),_:1},8,["model"]),a(K,{open:w.value,"onUpdate:open":o[1]||(o[1]=e=>w.value=e),title:"وضعیت سفارش","wrap-class-name":"detail-modal"},{footer:t(()=>[a(f,{onClick:o[0]||(o[0]=e=>w.value=!1)},{default:t(()=>[...o[7]||(o[7]=[d("باشه",-1)])]),_:1})]),default:t(()=>[i.value?(s(),b(E,{key:0},{default:t(()=>[(s(!0),c(I,null,V(i.value.activity,(e,y)=>(s(),b(q,{key:y,color:A(e)},{default:t(()=>[k("div",de,[k("div",null,l(e.title),1),e.proceed?(s(),c("div",ue,[k("div",ce,[k("div",me,[a(_,null,{default:t(()=>[d(l(B(e.uaj)),1)]),_:2},1024)]),y>0&&g("order.tamin.state.remove")?(s(),b(h,{key:0,"ok-text":"بله","cancel-text":"بی خیال",onConfirm:L=>W(e)},{title:t(()=>[...o[4]||(o[4]=[k("p",null,"آیا مطمئن به حذف وضعیت مورد نظر هستید ؟",-1)])]),default:t(()=>[a(f,{size:"small",danger:""},{default:t(()=>[...o[5]||(o[5]=[d("حذف وضعیت",-1)])]),_:1})]),_:1},8,["onConfirm"])):v("",!0)])])):v("",!0),!e.proceed&&g("order.tamin.state.submit")?(s(),c("div",_e,[a(S,{value:e.note,"onUpdate:value":L=>e.note=L,placeholder:"یادداشت"},null,8,["value","onUpdate:value"]),a(f,{type:"text",size:"small",onClick:L=>P(e)},{default:t(()=>[...o[6]||(o[6]=[d("ثبت وضعیت",-1)])]),_:1},8,["onClick"])])):v("",!0),e.proceed?(s(),c("div",fe,l(e.note),1)):v("",!0)])]),_:2},1032,["color"]))),128))]),_:1})):v("",!0)]),_:1},8,["open"]),a(K,{open:x.value,"onUpdate:open":o[3]||(o[3]=e=>x.value=e),title:"مشاهده سفارش",width:"80%","wrap-class-name":"detail-modal"},{footer:t(()=>[a(f,{onClick:o[2]||(o[2]=e=>x.value=!1)},{default:t(()=>[...o[8]||(o[8]=[d("باشه",-1)])]),_:1})]),default:t(()=>[i.value?(s(),c("div",pe,[a(U,null,{default:t(()=>[a(p,{label:"مشتری"},{default:t(()=>[d(l(i.value.customer.fname)+" "+l(i.value.customer.lname),1)]),_:1}),a(p,{label:"تلفن همراه"},{default:t(()=>[d(l(i.value.customer.phone),1)]),_:1}),a(p,{label:"تاریخ ثبت"},{default:t(()=>[d(l(B(i.value.caj)),1)]),_:1}),a(p,{label:"وضعیت"},{default:t(()=>[d(l(i.value.sts_str),1)]),_:1})]),_:1}),a(G,{title:"آیتم های سفارش"},{default:t(()=>[(s(!0),c(I,null,V(i.value.items,(e,y)=>(s(),c("div",{key:y},[a(U,null,{default:t(()=>[a(p,{label:"نام محصول"},{default:t(()=>[a(_,{color:"blue"},{default:t(()=>[d(l(e.title),1)]),_:2},1024)]),_:2},1024),a(p,{label:"عنوان تنوع"},{default:t(()=>[d(l(e.variant_title),1)]),_:2},1024),a(p,{label:"وزن نهایی"},{default:t(()=>[a(_,{color:"red"},{default:t(()=>[d(l(e.grams),1)]),_:2},1024)]),_:2},1024),a(p,{label:"تعداد"},{default:t(()=>[a(_,{color:"orange"},{default:t(()=>[d(l(e.qty),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),y<i.value.items.length-1?(s(),b(H,{key:0})):v("",!0)]))),128))]),_:1})])):(s(),b(O,{key:1}))]),_:1},8,["open"])]),_:1})])}}}),De=Y(ve,[["__scopeId","data-v-96b6e261"]]);export{De as default};