Files
tehran_taj/apps/admin-panel/dist/assets/SingleCustomer-7bEeUvGa.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
3.5 KiB
JavaScript

import{d as G,u as L,a as m,w as t,s as M,r as l,o as p,c as o,h as f,E as Q,i as w,Q as R,p as W,f as j,m as d,G as b,y as q,l as z,X as A,_ as D}from"./index-D8Sl1lAu.js";import{a as H,b as u,X as J}from"./model-qEyXFzcU.js";import{C as Y}from"./CreditCardOutlined-BWqkAZfi.js";import"./filters-DgXlZ4wf.js";import"./index-DBCPuYKo.js";import"./SettingOutlined-BVtVPkyH.js";function Z(){const a=new H("admin/customers-omde/single/list","لیست مشتریان تک");return a.add(new u("id","کد").filterNumber()),a.add(new u("fname","نام").filterKey("fullName").filterText()),a.add(new u("lname","نام خانوادگی").filterKey("fullName").filterText().noSort()),a.add(new u("phone","تلفن تماس").filterKey("mobile").filterText().noSort()),a.add(new u("email","ایمیل").filterText().noSort()),a.add(new u("branch.name","نام شعبه").filterText().noSort()),a.add(new u("op","عملیات").noSort().renderSlot("op")),a}const ee={class:"charge-grid"},te=G({__name:"SingleCustomer",setup(a){const _=z(),y=L(),v=e=>!!y.hasPermission(e),k=Z(),S=d(null),h=M(()=>A()),c=d(!1),g=d(!1),r=d(void 0),C=d(void 0);function T(e){C.value=e,r.value=void 0,c.value=!0}function N(){r.value=void 0,c.value=!1}async function V(){var e,n;if(!C.value||!r.value){b.error("لطفا مقدار را وارد کنید");return}try{g.value=!0,await q.post("wallet/charge",{customer_id:C.value,value:r.value}),b.info("عملیات با موفقیت انجام شد"),c.value=!1,r.value=void 0,await _.push("/wallet")}catch(s){console.log(s),b.error(((n=(e=s==null?void 0:s.response)==null?void 0:e.data)==null?void 0:n.message)??"خطا در ثبت اطلاعات.")}finally{g.value=!1}}function B(e){_.push(`/singleCustomer/edit/${e}`)}function X(e){_.push(`/singleCustomer/view/${e}`)}return(e,n)=>{const s=l("a-tooltip"),$=l("a-input-number"),E=l("a-form-item"),K=l("a-button"),O=l("a-popconfirm"),U=l("a-form"),I=l("a-spin"),P=l("a-modal"),F=l("a-card");return p(),m(F,{title:h.value?"لیست مشتریان":"لیست مشتریان تک فروشی",class:"page-card"},{default:t(()=>[o(J,{ref_key:"tbl",ref:S,model:f(k),"mobile-cards":""},{op:t(({record:i})=>[o(s,{title:"ویرایش"},{default:t(()=>[o(f(Q),{class:"cursor-pointer mx-1 text-primary",onClick:x=>B(i.id)},null,8,["onClick"])]),_:2},1024),v("wallet.charge")&&!h.value?(p(),m(s,{key:0,title:"شارژ کیف پول"},{default:t(()=>[o(f(Y),{class:"cursor-pointer mx-1",style:{color:"#d48806"},onClick:x=>T(i.id)},null,8,["onClick"])]),_:2},1024)):w("",!0),v("wallet.charge")?(p(),m(s,{key:1,title:"مشاهده اطلاعات"},{default:t(()=>[o(f(R),{class:"cursor-pointer mx-1 text-success",onClick:x=>X(i.id)},null,8,["onClick"])]),_:2},1024)):w("",!0)]),_:1},8,["model"]),v("wallet.charge")?(p(),m(P,{key:0,open:c.value,"onUpdate:open":n[1]||(n[1]=i=>c.value=i),footer:null,title:"شارژ کیف پول"},{default:t(()=>[o(I,{spinning:g.value},{default:t(()=>[o(U,{layout:"vertical"},{default:t(()=>[W("div",ee,[o(E,{label:"میزان شارژ"},{default:t(()=>[o($,{value:r.value,"onUpdate:value":n[0]||(n[0]=i=>r.value=i),class:"w-full"},null,8,["value"])]),_:1}),o(O,{style:{"margin-bottom":"24px"},title:"آیا از شارژ کیف پول مطمعن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:V,onCancel:N},{default:t(()=>[o(K,{type:"primary"},{default:t(()=>[...n[2]||(n[2]=[j("ثبت",-1)])]),_:1})]),_:1})])]),_:1})]),_:1},8,["spinning"])]),_:1},8,["open"])):w("",!0)]),_:1},8,["title"])}}}),ie=D(te,[["__scopeId","data-v-9bf82b76"]]);export{ie as default};