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>
This commit is contained in:
co-authored by
Claude Opus 5
parent
4b038c0518
commit
d15129168a
@@ -0,0 +1 @@
|
||||
import{a as X,b as t,X as j}from"./model-Ccgnj9lY.js";import{L}from"./ListPageHeader-DnQDX3sP.js";import{_ as M}from"./addFinDoc.vue_vue_type_script_setup_true_lang-CQ8tte4E.js";import{d as P,b as A,i as H,c as r,g as o,r as g,e as f,o as i,n as p,f as s,K as I,h as C,j as k,J as U,E as z,D as J,l as b,x as K,z as T}from"./index-Cv1Zmfn4.js";import{u as q}from"./useDeleteHandler-GUY85WYz.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Ctp6vfI0.js";function F(){const e=new X("admin/documents/list","لیست اسناد");return e.add(new t("id","شماره سفارش").filterNumber()),e.add(new t("type_str","نوع سند").filterText()),e.add(new t("price","پول").filterDate().noSort()),e.add(new t("value","وزن نهایی (گرم)").filterDate().noSort()),e.add(new t("to","به").filterText().hidden()),e.add(new t("customer.name","نام و نام خانوادگی مشتری").filterText()),e.add(new t("note","توضیحات").filterText()),e.add(new t("ayar","عیار").filterNumber().noSort()),e.add(new t("lab","آزمایشگاه").filterText().noSort()),e.add(new t("recive_date","تاریخ دریافت").filterDate().noSort()),e.add(new t("account_name","نام حساب").filterText().hidden()),e.add(new t("bank_name","بانک").filterText().hidden()),e.add(new t("caj","تاریخ ثبت").filterDate().noSort()),e.add(new t("uaj","بروزرسانی").hidden().filterDate().noSort()),e.add(new t("confirmed","وضعیت تایید سند").renderSlot("confirmed").noSort().filterSelect({0:"تایید نشده",1:"تایید شده"})),e.add(new t("price_per_gram","مظنه").hidden().filterText().noSort()),e.add(new t("original_value","وزن طلای داده شده").hidden().filterText().noSort()),e.add(new t("ang","انگ").hidden().filterText().noSort()),e.add(new t("opt","عملیات").noSort().renderSlot("opt")),e}const G={id:"page-user-list"},ne=P({__name:"list",setup(e){const h=A(),_=a=>!!h.hasPermission(a),D=F(),x=g(null),S=g(!1),v=g(!1),w=g(void 0);function $(){w.value=void 0,v.value=!0}function B(a){w.value=a,v.value=!0}async function y(a){var n,m,u;try{S.value=!0,await K.post(`cash/confirem/${a.id}`),T.success("تغییرات با موفقیت ثبت شد"),(n=x.value)==null||n.fetch()}catch(d){console.log(d),T.error(((u=(m=d==null?void 0:d.response)==null?void 0:m.data)==null?void 0:u.message)??"خطا در ثبت تغییرات")}finally{S.value=!1}}const{remove:N}=q({onSuccess:()=>{var a;return(a=x.value)==null?void 0:a.fetch()},successMessage:"سند حذف شد",fallbackErrorMessage:"خطا در حذف سند"});function E(a){return N(`cash/${a.id}`)}return(a,n)=>{const m=f("a-tag"),u=f("a-popconfirm"),d=f("a-tooltip"),O=f("a-card"),V=f("a-spin");return i(),H("div",G,[r(V,{spinning:S.value},{default:o(()=>[r(O,{title:"لیست اسناد مالی"},{default:o(()=>[r(L,{rid:"document.create","add-label":"ثبت سند مالی",onAdd:$}),r(j,{ref_key:"tbl",ref:x,model:p(D)},{confirmed:o(({text:l})=>[l===1?(i(),s(m,{key:0,color:"green"},{default:o(()=>[...n[2]||(n[2]=[b("تایید شده",-1)])]),_:1})):(i(),s(m,{key:1},{default:o(()=>[...n[3]||(n[3]=[b("تایید نشده",-1)])]),_:1}))]),opt:o(({record:l})=>[!l.confirmed&&_("document.list.confirm")?(i(),s(d,{key:0,title:"تایید سند"},{default:o(()=>[r(u,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:c=>y(l)},{title:o(()=>[...n[4]||(n[4]=[C("p",null,"آیا سند تایید شود ؟",-1)])]),default:o(()=>[r(p(I),{class:"cursor-pointer mx-1 text-success"})]),_:1},8,["onConfirm"])]),_:2},1024)):k("",!0),l.confirmed&&_("document.list.deny")?(i(),s(d,{key:1,title:"رد کردن سند"},{default:o(()=>[r(u,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:c=>y(l)},{title:o(()=>[...n[5]||(n[5]=[C("p",null,"آیا سند رد شود ؟",-1)])]),default:o(()=>[r(p(U),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):k("",!0),_("document.list.edit")?(i(),s(d,{key:2,title:"ویرایش"},{default:o(()=>[r(p(z),{class:"cursor-pointer mx-1 text-primary",onClick:c=>B(l.id)},null,8,["onClick"])]),_:2},1024)):k("",!0),_("document.list.remove")?(i(),s(d,{key:3,title:"حذف"},{default:o(()=>[r(u,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:c=>E(l)},{title:o(()=>[...n[6]||(n[6]=[C("p",null,"آیا مطمئن به حذف سند مورد نظر هستید ؟",-1)])]),default:o(()=>[r(p(J),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):k("",!0)]),_:1},8,["model"]),(i(),s(M,{key:w.value??"new",open:v.value,id:w.value,"onUpdate:open":n[0]||(n[0]=l=>v.value=l),onSuccess:n[1]||(n[1]=l=>{var c;return(c=x.value)==null?void 0:c.fetch()})},null,8,["open","id"]))]),_:1})]),_:1},8,["spinning"])])}}});export{ne as default};
|
||||
Reference in New Issue
Block a user