Files
tehran_taj/apps/admin-panel/dist/assets/user-D29KoPC1.js
T
mahmoodandClaude Sonnet 5.5 6514b05d18 fix(money,orders): wage/gram-debt parity, atomic document confirm, expert edit, made-to-order, QA fixes
- Rial wage and gram-debt arithmetic matched to the reference; order corrections keep debt in sync
- Document confirm/un-confirm is a compare-and-swap (no double-applied cache under concurrency)
- Settlement document and expert inputs validated (400 instead of 500)
- Expert: edit / activate-deactivate own customers, adjust raw weights only
- Made-to-order flow in the app, PreOrder.quantity migration
- Order grids: customer column, sort keys; panel select search; pre-order quantity save
- Rebuilt release artifacts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 18:09:02 +03:30

2 lines
3.0 KiB
JavaScript

import{a as E,b as f,X as D}from"./model-mwiDYd1J.js";import{d as J,a as v,w as t,r as n,o as r,c as a,h as w,R as M,b as y,f as l,t as c,F as x,i as O,m as b,y as g,J as C,_ as U}from"./index-CpVArufm.js";import"./filters-CoNJlguG.js";import"./index-DjZc5EYL.js";import"./SettingOutlined-E4OknxY2.js";function j(){const d=new E("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 q={key:0},A=J({__name:"user",setup(d){const I=j(),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"),R=n("a-empty"),T=n("a-modal"),V=n("a-card");return r(),v(V,{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(T,{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",q,[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:G=>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(R,{key:1}))]),_:1},8,["open"])]),_:1})}}}),W=U(A,[["__scopeId","data-v-59aa3738"]]);export{W as default};