2026-10-04 13:31:09 +03:30
|
|
|
import{_ as Y}from"./BasicMainCard-ff1543bd.js";import{_ as Z}from"./BasicModal.vue_vue_type_style_index_0_lang-6296deb9.js";import{_ as j,u as ee}from"./useBaseTable-e18d3b32.js";import{_ as te}from"./button.vue_vue_type_style_index_0_lang-fbfa965d.js";import{I as R}from"./Icon-671f08f9.js";import{t as ae}from"./useDataTime-206d8d2e.js";import{_ as ne,I as ie,J as se,K as le,d as oe,i as y,E as re,o as T,k as ue,w as d,b as f,e as u,f as D,c as A,l as b,L as ce,n as V,C as de,t as q,H as m}from"./index-c678e119.js";import{fetchMatchingUserIds as z,formatTableResult as me}from"./supabaseTableQuery-e9feb810.js";import{c as fe}from"./pushNotification-54c2f536.js";import{_ as pe}from"./TextPreview.vue_vue_type_script_setup_true_lang-25d2a150.js";import{e as _e,g as ve}from"./convert-2ad76038.js";import{M as F}from"./index-66da2c76.js";import{C as he}from"./index-05e85885.js";import{I as xe}from"./index-e517c667.js";import{T as N}from"./isSymbol-5130882b.js";import{U as ge}from"./index-ff90b762.js";import"./Grid-192c1e72.js";import"./index-88858982.js";import"./_plugin-vue_export-helper-edd5ed68.js";import"./shallowequal-93b92d94.js";import"./index-27b4bb6d.js";import"./vnode-34fe2aaf.js";import"./index-ea10bb13.js";import"./useState-fb1fd992.js";import"./useRefs-d469f03d.js";import"./_flatRest-89cece1c.js";import"./isMobile-e2e89480.js";import"./omit-30cc2465.js";import"./index-2a1871d2.js";import"./Col-65d77001.js";import"./styleChecker-c202e4d7.js";import"./isPlainObject-2f8cd8cc.js";import"./index-5203b45e.js";import"./updateLocale-e9df593e.js";import"./index-c5016c96.js";import"./useMemo-3527b8f5.js";import"./FormItemContext-53695780.js";import"./lodash-2343a0ae.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-0d6b57d1.js";import"./index-064013c2.js";import"./Badge-b566fed9.js";import"./isNumeric-3f69e2aa.js";import"./index-d768dcac.js";import"./index-01af60d8.js";import"./toArray-acd138e5.js";import"./SearchOutlined-445bfd70.js";import"./pickAttrs-09168c62.js";import"./index-31ed7972.js";import"./textUtils-c37780ad.js";import"./DialogWrap-0297f46d.js";import"./index-d80ea252.js";import"./css-aae66f86.js";import"./index-679d69b0.js";import"./index-e3658ae2.js";const ye=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:e=>e.record.index+1},{title:"نام ارسال کننده",dataIndex:"owner_name",key:"owner_name",filterField:"owner_name",customRender:e=>e.record.owner_name||"-"},{title:"متن پیام",dataIndex:"text",key:"text",slot:"text"},{title:"فایل",dataIndex:"file",key:"file",align:"center",width:120,slot:"file"},{title:"وضعیت پین",dataIndex:"pined",key:"pined",align:"center",width:100,customRender:e=>e.record.pined?"پین شده":"-"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:e=>ae(e.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}];function we(e){let _=null;if(e.owner_id){const t=Array.isArray(e.users)?e.users[0]:e.users;t?_=`${t.first_name||""} ${t.last_name||""}`.trim()||t.phone||`کاربر ${e.owner_id}`:_=`کاربر ${e.owner_id}`}return{...e,owner_name:_,text:e.text??"",file:e.file??null,pined:e.pined??!1,pined_at:e.pined_at??null,created_at:e.created_at??"",updated_at:e.updated_at??""}}async function ke(e){const _=await ie("channel_message",e);return Array.isArray(_)?_:[_]}async function E(e,_){const t=await se("channel_message",e,_);return Array.isArray(t)?t:[t]}async function Ie(e){await le("channel_message",e)}async function be(e){var w,I,x;const{TableEngineRequest:_}=await ne(()=>import("./buildSupabaseQuery-72aac971.js"),["assets/buildSupabaseQuery-72aac971.js","assets/index-c678e119.js","assets/index-0d7ad6b5.css"]),t={...e};!t.sort&&!t.order&&(t.order="-id"),t.select=["*","users!owner_id(first_name, last_name, phone)"];const C=[...t.filters||[]],P=C.find(r=>r.field==="owner_name"&&!r.hidden);if(P&&["eq","has","like"].includes(P.op)){const r=await z(String(P.value));t.filters=C.filter(M=>M.field!=="owner_name"),r.lengt
|