Files
tehran_tala/apps/admin-panel/dist/assets/ReagentList-Dj5f3DdQ.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
5.0 KiB
JavaScript

import{b as x,d as j,i as k,c as _,g as u,e as b,o as i,n as E,h as D,f as o,j as a,l as g,t as h,r as F,a as L,x as S,z as p}from"./index-Cv1Zmfn4.js";import{a as R,b as n,X as O}from"./model-Ccgnj9lY.js";import{_ as c}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-DSrZEa8g.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./icons-OQOqoZeQ.js";import"./UnorderedListOutlined-DQ42yB62.js";import"./TeamOutlined-BkGBieVh.js";import"./CreditCardOutlined-PqXbGvjY.js";function P(){const m=x();Object.keys(m.cityFilters).length<1&&m.getCities();const t=new R("admin/customers-omde/reagent/list","لیست کارشناسان فروش");return t.add(new n("id","کد").filterNumber()),t.add(new n("lname","نام خانوادگی").filterText().hidden()),t.add(new n("name","نام و نام خانوادگی").filterText()),t.add(new n("name","نام").filterText().hidden()),t.add(new n("mobile","موبایل").filterText().hidden().noSort()),t.add(new n("city_id","شهر").hidden().renderSlot("city").filterKey("city_id").filterSelect(m.cityFilters)),t.add(new n("gram_level","سطح اعتبار").filterNumber().noSort()),t.add(new n("percent","درصد").filterNumber().noSort()),t.add(new n("remain","بدهی گرمی").filterNumber().noSort()),t.add(new n("rial_remain","بدهی ریالی").filterNumber().noSort()),t.add(new n("grams_sell","میزان فروش").filterNumber().noSort()),t.add(new n("caj","تاریخ ثبت").filterDate().noSort()),t.add(new n("uaj","بروزرسانی").hidden().filterDate().noSort()),t.add(new n("sts_str","وضعیت ثبت سفارش").renderSlot("sts").noSort()),t.add(new n("active","وضعیت حساب کاربری").renderSlot("active").noSort().filterSelect({1:"فعال","-1":"غیر فعال"})),t.add(new n("opt","عملیات").noSort().renderSlot("opt")),t}const z={id:"page-user-list"},A={key:0},K={key:1},M={class:"flex"},Z=j({__name:"ReagentList",setup(m){const t=L(),$=x(),l=s=>!!$.hasPermission(s),N=P(),f=F(null);function v(s){return s.sts===1?"CheckIcon":"XIcon"}async function y(s){var d;try{await S.post("customer/toggle-active",{id:s.id}),p.info("تغییرات ثبت شد "),await((d=f.value)==null?void 0:d.fetch())}catch{p.error("خطا در تغییر وضعیت")}}async function C(s){var d;try{await S.post("customer/toggle-sts",{id:s.id,sts:s.sts}),p.info("تغییرات ثبت شد "),await((d=f.value)==null?void 0:d.fetch())}catch{p.error("خطا در تغییر وضعیت")}}function I(s){t.push(`/reagent/edit/${s}`)}function T(s){t.push(`/bulkCustomer/view/${s}`)}function X(s){t.push(`/bulkCustomer/view/${s.id}?tab=orders`)}function B(s){t.push(`/bulkCustomer/view/${s.id}?tab=documents`)}return(s,d)=>{const w=b("a-tag"),V=b("a-card");return i(),k("div",z,[_(V,{title:"لیست کارشناسان فروش"},{default:u(()=>[_(O,{ref_key:"tbl",ref:f,model:E(N)},{city:u(({record:e})=>[e.city&&e.city.title?(i(),k("div",A,h(e.city.title),1)):(i(),k("div",K,"-"))]),sts:u(({record:e})=>[g(h(e.sts_str),1)]),active:u(({record:e})=>[_(w,{color:e.active===1?"green":"red"},{default:u(()=>[g(h(e.active===1?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])]),opt:u(({record:e})=>[D("div",M,[l("persons.list.sellers.edit")?(i(),o(c,{key:0,"icon-class":"w-5 h-5 text-primary",class:"ml-3",icon:"EditIcon",title:"ویرایش",onClick:r=>I(e.id)},null,8,["onClick"])):a("",!0),l("persons.list.sellers.view")?(i(),o(c,{key:1,"icon-class":"w-5 h-5 text-success",class:"ml-3",icon:"EyeIcon",title:"مشاهده اطلاعات",onClick:r=>T(e.id)},null,8,["onClick"])):a("",!0),l("persons.list.sellers.view.orders")?(i(),o(c,{key:2,"icon-class":"w-5 h-5 text-primary",class:"ml-3",icon:"ListIcon",title:"مشاهده سفارش",onClick:r=>X(e)},null,8,["onClick"])):a("",!0),l("persons.list.sellers.view.documents")?(i(),o(c,{key:3,"icon-class":"w-5 h-5 text-success",class:"ml-3",icon:"FileTextIcon",title:"سند های مالی",onClick:r=>B(e)},null,8,["onClick"])):a("",!0),e.sts==1&&l("persons.list.sellers.unable.order")?(i(),o(c,{key:4,"icon-class":"w-5 h-5 text-danger",class:"ml-3",icon:v(e),title:"توقف سفارش","pop-title":"آیا مطمئن هستید؟",onClick:r=>C(e)},null,8,["icon","onClick"])):a("",!0),e.sts!==1&&l("persons.list.sellers.able.order")?(i(),o(c,{key:5,"icon-class":"w-5 h-5 text-success",class:"ml-3",icon:v(e),title:"فعال سازی سفارش سفارش","pop-title":"آیا مطمئن هستید؟",onClick:r=>C(e)},null,8,["icon","onClick"])):a("",!0),e.active==1&&l("persons.list.sellers.unable")?(i(),o(c,{key:6,"icon-class":"w-5 h-5 text-danger",class:"ml-3",icon:"XIcon",title:"غیر فعال کردن حساب کاربری","pop-title":"آیا مطمئن هستید؟",onClick:r=>y(e)},null,8,["onClick"])):a("",!0),e.active!==1&&l("persons.list.sellers.able")?(i(),o(c,{key:7,"icon-class":"w-5 h-5 text-success",class:"ml-3",icon:"CheckIcon",title:"فعال سازی حساب کاربری","pop-title":"آیا مطمئن هستید؟",onClick:r=>y(e)},null,8,["onClick"])):a("",!0)])]),_:1},8,["model"])]),_:1})])}}});export{Z as default};