Rebuild API bundle, admin panel, and user-app-v2 for Dokploy copy-only deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
2 lines
2.7 KiB
JavaScript
2 lines
2.7 KiB
JavaScript
import{a as E,b as a,X as U}from"./model-tqsMDjkK.js";import{_ as $}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-D07Lc14a.js";import D from"./UserCreate-B0hNHwjp.js";import{d as M,u as V,x as X,y as h,b as O,c as r,w as n,m as c,r as _,o as m,h as p,a as v,E as A,i as y,G as K,p as L,f as P,t as G}from"./index-CJij4X3l.js";import{u as H}from"./useDeleteHandler-DuEp06Uq.js";import"./filters-BPYO-DKN.js";import"./index-CKg-8s_Z.js";import"./SettingOutlined-BJxMXy1I.js";import"./BaseFormModal.vue_vue_type_style_index_0_lang-YLHOAWTN.js";function I(){const o=new E("admin/users/list","لیست مدیران");return o.add(new a("id","کد مدیر")),o.add(new a("fname","نام").filterKey("fullName").filterText()),o.add(new a("lname","نام خانوادگی").filterKey("fullName").filterText()),o.add(new a("mobile","موبایل").filterText()),o.add(new a("ut","نوع کاربر").filterNumber().renderSlot("ut")),o.add(new a("op","عملیات").noSort().renderSlot("op")),o}const j={id:"page-user-list"},ee=M({__name:"ListUser",setup(o){const k=V(),x=e=>!!k.hasPermission(e),w=I(),f=c(null),b=c([]),l=c(!1),i=c(void 0);function g(e){var t;return e==null?"-":((t=b.value.find(d=>d.id===Number(e)))==null?void 0:t.title)??String(e)}function C(){i.value=void 0,l.value=!0}function T(e){i.value=e.id,l.value=!0}const{remove:N}=H({onSuccess:()=>{var e;return(e=f.value)==null?void 0:e.fetch()},successMessage:"کاربر حذف شد",fallbackErrorMessage:"خطا در حذف کاربر"});return X(async()=>{try{const{data:e}=await h.get("const/__list__ut");b.value=e}catch(e){console.log(e)}}),(e,t)=>{const d=_("a-tooltip"),S=_("a-popconfirm"),B=_("a-card");return m(),O("div",j,[r(B,{title:"لیست مدیران",class:"page-card"},{default:n(()=>[r(U,{ref_key:"tbl",ref:f,model:p(w),"mobile-cards":""},{add:n(()=>[r($,{rid:"user.list.create","add-label":"افزودن کاربر",onAdd:C})]),ut:n(({text:s})=>[P(G(g(s)),1)]),op:n(({record:s})=>[x("user.list.edit")?(m(),v(d,{key:0,title:"ویرایش"},{default:n(()=>[r(p(A),{class:"cursor-pointer mx-1 text-primary",onClick:u=>T(s)},null,8,["onClick"])]),_:2},1024)):y("",!0),x("user.list.remove")?(m(),v(d,{key:1,title:"حذف"},{default:n(()=>[r(S,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:u=>p(N)(`users/${s.id}`)},{title:n(()=>[...t[2]||(t[2]=[L("p",null,"آیا مطمئن به حذف کاربر مورد نظر هستید ؟",-1)])]),default:n(()=>[r(p(K),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):y("",!0)]),_:1},8,["model"]),(m(),v(D,{key:i.value??"new",open:l.value,id:i.value,"onUpdate:open":t[0]||(t[0]=s=>l.value=s),onSuccess:t[1]||(t[1]=s=>{var u;return(u=f.value)==null?void 0:u.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{ee as default};
|