2026-10-10 13:28:46 +03:30
|
|
|
import{_ as Y}from"./BasicMainCard-4c879cc2.js";import{_ as Z}from"./BasicModal.vue_vue_type_style_index_0_lang-c3b69d02.js";import{_ as j,u as ee}from"./useBaseTable-e35ecaa9.js";import{_ as te}from"./button.vue_vue_type_style_index_0_lang-b32e1136.js";import{I as R}from"./Icon-85823aa3.js";import{t as ae}from"./useDataTime-c7be2668.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-90ac1a44.js";import{fetchMatchingUserIds as z,formatTableResult as me}from"./supabaseTableQuery-19bc7c1f.js";import{c as fe}from"./pushNotification-3686255e.js";import{_ as pe}from"./TextPreview.vue_vue_type_script_setup_true_lang-acd6228c.js";import{e as _e,g as ve}from"./convert-2ad76038.js";import{M as F}from"./index-a413fea1.js";import{C as he}from"./index-788f312f.js";import{I as xe}from"./index-027c2128.js";import{T as N}from"./isSymbol-9094e8b7.js";import{U as ge}from"./index-e50485ad.js";import"./Grid-839ef6d1.js";import"./index-4d938e91.js";import"./_plugin-vue_export-helper-8ee86600.js";import"./shallowequal-36516cfd.js";import"./index-9869a66e.js";import"./vnode-b0455438.js";import"./index-c0eeee91.js";import"./useState-64f2823f.js";import"./useRefs-2a883b79.js";import"./_flatRest-f2577aae.js";import"./isMobile-e2e89480.js";import"./omit-84d71e15.js";import"./index-109c99be.js";import"./Col-fddaa6b7.js";import"./styleChecker-1445806f.js";import"./isPlainObject-aab367ce.js";import"./index-93d9312f.js";import"./updateLocale-cec40f3d.js";import"./index-cfa536c5.js";import"./useMemo-9928f29b.js";import"./FormItemContext-64f846db.js";import"./lodash-07b825be.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-fb5041dc.js";import"./index-95b42b3e.js";import"./Badge-54a9cc4e.js";import"./isNumeric-3f69e2aa.js";import"./index-5f5223b4.js";import"./index-a2503c07.js";import"./toArray-3936b2d5.js";import"./SearchOutlined-0eaaa97a.js";import"./pickAttrs-ba13e92c.js";import"./index-bb804fdd.js";import"./textUtils-c37780ad.js";import"./DialogWrap-6616a498.js";import"./index-90f5ddad.js";import"./css-aae66f86.js";import"./index-03d99677.js";import"./index-ebd9fdbb.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-c046d1a6.js"),["assets/buildSupabaseQuery-c046d1a6.js","assets/index-90ac1a44.js","assets/index-0643191e.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
|