- 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>
2 lines
3.0 KiB
JavaScript
2 lines
3.0 KiB
JavaScript
import{a as R,b as f,X as D}from"./model-qEyXFzcU.js";import{d as G,a as v,w as t,r as n,o as r,c as a,h as w,Q as M,b as y,f as l,t as c,F as x,i as O,m as b,y as g,G as C,_ as Q}from"./index-D8Sl1lAu.js";import"./filters-DgXlZ4wf.js";import"./index-DBCPuYKo.js";import"./SettingOutlined-BVtVPkyH.js";function U(){const d=new R("admin/misc/notify/list","لیست نوتیفیکیشن های دریافتی");return d.add(new f("id","شماره")),d.add(new f("title","عنوان")),d.add(new f("text","متن").noSort()),d.add(new f("opt","عملیات").noSort().renderSlot("opt")),d.noFilters(),d}const j={key:0},q=G({__name:"user",setup(d){const I=U(),S=b(null),m=b(!1),o=b(void 0),$=[{title:"مشتری",dataIndex:"customer"},{title:"وضعیت",dataIndex:"is_read"}];async function z(u){const{data:e}=await g.get(`notify/${u.id}`);o.value=e,m.value=!0}async function N(u){var e,_;try{await g.get(`notify/read/${u.id}`),u.is_read=!0,o.value&&(o.value.read_count+=1),C.success("علامتگذاری شد")}catch(s){C.error(((_=(e=s==null?void 0:s.response)==null?void 0:e.data)==null?void 0:_.message)??"خطا")}}return(u,e)=>{const _=n("a-tooltip"),s=n("a-descriptions-item"),X=n("a-descriptions"),B=n("a-tag"),k=n("a-button"),F=n("a-table"),T=n("a-empty"),V=n("a-modal"),E=n("a-card");return r(),v(E,{title:"لیست نوتیفیکیشن های دریافتی",class:"page-card"},{default:t(()=>[a(D,{ref_key:"tbl",ref:S,model:w(I),"mobile-cards":""},{opt:t(({record:i})=>[a(_,{title:"مشاهده"},{default:t(()=>[a(w(M),{class:"cursor-pointer mx-1 text-primary",onClick:p=>z(i)},null,8,["onClick"])]),_:2},1024)]),_:1},8,["model"]),a(V,{open:m.value,"onUpdate:open":e[1]||(e[1]=i=>m.value=i),title:"مشاهده نوتیفیکیشن",width:"60%","wrap-class-name":"detail-modal"},{footer:t(()=>[a(k,{onClick:e[0]||(e[0]=i=>m.value=!1)},{default:t(()=>[...e[4]||(e[4]=[l("بستن",-1)])]),_:1})]),default:t(()=>[o.value?(r(),y("div",j,[a(X,{bordered:"",size:"small",column:1},{default:t(()=>[a(s,{label:"عنوان"},{default:t(()=>[l(c(o.value.title),1)]),_:1}),a(s,{label:"متن"},{default:t(()=>[l(c(o.value.body),1)]),_:1}),a(s,{label:"ارسال کننده"},{default:t(()=>[l(c(o.value.sender??"-"),1)]),_:1}),a(s,{label:"خوانده شده"},{default:t(()=>[l(c(o.value.read_count)+" از "+c(o.value.total_count),1)]),_:1})]),_:1}),a(F,{class:"mt-4",size:"small","data-source":o.value.recipients,columns:$,pagination:{pageSize:10},"row-key":"id"},{bodyCell:t(({column:i,record:p})=>[i.dataIndex==="is_read"?(r(),y(x,{key:0},[p.is_read?(r(),v(B,{key:0,color:"green"},{default:t(()=>[...e[2]||(e[2]=[l("خوانده شده",-1)])]),_:1})):(r(),v(k,{key:1,size:"small",onClick:A=>N(p)},{default:t(()=>[...e[3]||(e[3]=[l("علامتگذاری",-1)])]),_:1},8,["onClick"]))],64)):i.dataIndex==="customer"?(r(),y(x,{key:1},[l(c(p.customer.name),1)],64)):O("",!0)]),_:1},8,["data-source"])])):(r(),v(T,{key:1}))]),_:1},8,["open"])]),_:1})}}}),W=Q(q,[["__scopeId","data-v-59aa3738"]]);export{W as default};
|