2026-09-27 17:26:36 +03:30
|
|
|
import{_ as Y}from"./BasicMainCard-235c6a8e.js";import{_ as Z}from"./BasicModal.vue_vue_type_style_index_0_lang-6b846ddc.js";import{_ as j,u as ee}from"./useBaseTable-af0ac405.js";import{_ as te}from"./button.vue_vue_type_style_index_0_lang-2b2ee941.js";import{I as R}from"./Icon-b552f0cb.js";import{t as ae}from"./useDataTime-45198684.js";import{_ as ne,H as ie,I as se,J as le,d as oe,i as y,D as re,o as T,k as ue,w as d,b as f,e as u,f as $,c as A,l as b,K as ce,n as L,B as de,t as q,G as m}from"./index-ab3b0b84.js";import{fetchMatchingUserIds as z,formatTableResult as me}from"./supabaseTableQuery-7c1903fc.js";import{c as fe}from"./pushNotification-867b5532.js";import{_ as pe}from"./TextPreview.vue_vue_type_script_setup_true_lang-6e277daa.js";import{e as _e,g as ve}from"./convert-2ad76038.js";import{M as F}from"./index-34ee3839.js";import{C as he}from"./index-0e84975e.js";import{I as xe}from"./index-adf5fd7f.js";import{T as N}from"./isSymbol-5cc45ff5.js";import{U as ge}from"./index-732bfe67.js";import"./Grid-0eb1a61b.js";import"./index-b305a6df.js";import"./_plugin-vue_export-helper-6c5748cb.js";import"./shallowequal-39bf2166.js";import"./index-b2118e3c.js";import"./vnode-602d90c4.js";import"./index-d5e11315.js";import"./useState-7883cedd.js";import"./useRefs-3f675f69.js";import"./_flatRest-289ae805.js";import"./isMobile-e2e89480.js";import"./omit-837670e8.js";import"./index-fd8a1334.js";import"./Col-48c01651.js";import"./styleChecker-558deef9.js";import"./isPlainObject-d617fbb5.js";import"./index-cbd716ee.js";import"./updateLocale-958574f8.js";import"./index-086ff91e.js";import"./useMemo-1af73168.js";import"./FormItemContext-548f4b58.js";import"./lodash-a8d94941.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-d33f0812.js";import"./index-b5f9a27e.js";import"./Badge-fca8f233.js";import"./isNumeric-3f69e2aa.js";import"./index-18e93846.js";import"./index-9bb4e5d4.js";import"./toArray-78940ccb.js";import"./SearchOutlined-a36e5cce.js";import"./pickAttrs-1e1939a5.js";import"./index-257982d0.js";import"./textUtils-c37780ad.js";import"./DialogWrap-421034e2.js";import"./index-323711b8.js";import"./css-aae66f86.js";import"./index-993bd9f9.js";import"./index-75515977.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 H(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-15bd6baf.js"),["assets/buildSupabaseQuery-15bd6baf.js","assets/index-ab3b0b84.js","assets/index-43f2d491.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
|