Files
tehran_tala/apps/admin-panel/dist/assets/List-CHntEZJd.js
T
s.esmaeiliandClaude Opus 5 d15129168a admin-panel: drop the four redundant add entries from the sidebar
Each of these now has an add button at the top of its own list page, so the
nav entry duplicated it:
  - 'اضافه کردن شخص'  (/customer/add)
  - 'افزودن شعب'      (/branch/add)
  - 'افزودن کارگاه'    (/workshop/add)
  - 'افزودن مدیر'      (/user/create)

Only the adminMenu tree is touched; branchMenu keeps its own /customer/add
entry, since the branch build has no converted add-modal. All four routes
still exist and still work as a direct-link fallback, and the parent
submenus keep their remaining children (including 'دسترسی ها' under مدیران).

Verified in a real browser: menu items 30 -> 26, none of the four labels
render, all four parent submenus still present with their list children,
icons unchanged at 16, no console errors. Committed dist/ artifact rebuilt
to match (force-added, as it is gitignored but deliberately tracked for
Dokploy).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 17:45:30 +03:30

2 lines
7.5 KiB
JavaScript

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