2026-08-25 16:12:17 +03:30
|
|
|
import{_ as Y}from"./BasicMainCard-9a9b0e82.js";import{_ as Z}from"./BasicModal.vue_vue_type_style_index_0_lang-0db8aa6c.js";import{_ as j,u as ee}from"./useBaseTable-0fdb84ad.js";import{_ as te}from"./button.vue_vue_type_style_index_0_lang-0b499337.js";import{I as R}from"./Icon-d1d29ca3.js";import{t as ae}from"./useDataTime-234977eb.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-0ae7844c.js";import{fetchMatchingUserIds as z,formatTableResult as me}from"./supabaseTableQuery-98b38f56.js";import{c as fe}from"./pushNotification-8265e648.js";import{_ as pe}from"./TextPreview.vue_vue_type_script_setup_true_lang-cae329b9.js";import{e as _e,g as ve}from"./convert-2ad76038.js";import{M as F}from"./index-6d32dcba.js";import{C as he}from"./index-7d2db2fd.js";import{I as xe}from"./index-81a07cb9.js";import{T as N}from"./isSymbol-d0ec885c.js";import{U as ge}from"./index-5936ec05.js";import"./Grid-1b086c47.js";import"./index-33c0557e.js";import"./_plugin-vue_export-helper-277b1c3f.js";import"./shallowequal-a089597b.js";import"./index-02b92135.js";import"./vnode-454b4aa7.js";import"./index-c2776ddf.js";import"./useState-80fd23c9.js";import"./useRefs-0b121885.js";import"./_flatRest-5e9bcb10.js";import"./isMobile-e2e89480.js";import"./omit-e036f60c.js";import"./index-3189b1a9.js";import"./Col-84747301.js";import"./styleChecker-918e9a0f.js";import"./isPlainObject-4659a577.js";import"./index-0309284c.js";import"./updateLocale-15cba891.js";import"./index-c2bca1e0.js";import"./useMemo-19000d17.js";import"./FormItemContext-e7b6ca96.js";import"./lodash-6746fa7b.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-630a739a.js";import"./index-ff77e42c.js";import"./Badge-3dfd39bb.js";import"./isNumeric-3f69e2aa.js";import"./index-6585bad2.js";import"./index-a2cfdf13.js";import"./toArray-592e82ea.js";import"./SearchOutlined-8b990494.js";import"./pickAttrs-2e870478.js";import"./index-7090fbb0.js";import"./textUtils-c37780ad.js";import"./DialogWrap-930ec585.js";import"./index-0c08cf04.js";import"./css-aae66f86.js";import"./index-936e9d5d.js";import"./index-9d9cf8fd.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-ef030906.js"),["assets/buildSupabaseQuery-ef030906.js","assets/index-0ae7844c.js","assets/index-71a80eb0.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
|