2026-10-14 16:25:33 +03:30
|
|
|
import{_ as Y}from"./BasicMainCard-104c14b2.js";import{_ as Z}from"./BasicModal.vue_vue_type_style_index_0_lang-c75cb8ba.js";import{_ as j,u as ee}from"./useBaseTable-dfbf3762.js";import{_ as te}from"./button.vue_vue_type_style_index_0_lang-5dd5fad9.js";import{I as R}from"./Icon-0c593d03.js";import{t as ae}from"./useDataTime-9987a66e.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-a94f140f.js";import{fetchMatchingUserIds as z,formatTableResult as me}from"./supabaseTableQuery-9d743a53.js";import{c as fe}from"./pushNotification-2f181e40.js";import{_ as pe}from"./TextPreview.vue_vue_type_script_setup_true_lang-0697c916.js";import{e as _e,g as ve}from"./convert-2ad76038.js";import{M as F}from"./index-cadfe89f.js";import{C as he}from"./index-02db9106.js";import{I as xe}from"./index-9bf19e54.js";import{T as N}from"./isSymbol-0faad147.js";import{U as ge}from"./index-b2be5cd6.js";import"./Grid-33e7139e.js";import"./index-e5d8b47c.js";import"./_plugin-vue_export-helper-3751a4c9.js";import"./shallowequal-311bf7d9.js";import"./index-fa5a0887.js";import"./vnode-d8d89b8b.js";import"./index-d139af20.js";import"./useState-75e49d81.js";import"./useRefs-14e054ef.js";import"./_flatRest-38d88d03.js";import"./isMobile-e2e89480.js";import"./omit-09913e6a.js";import"./index-53e81bb5.js";import"./Col-098f825e.js";import"./styleChecker-cbf8a3c6.js";import"./isPlainObject-fa7524bd.js";import"./index-a08f6658.js";import"./updateLocale-63da7352.js";import"./index-da3c4531.js";import"./useMemo-e6667500.js";import"./FormItemContext-d446a85f.js";import"./lodash-b667f7ec.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-988f9693.js";import"./index-94f097c0.js";import"./Badge-64556311.js";import"./isNumeric-3f69e2aa.js";import"./index-a10a5cee.js";import"./index-1e5db048.js";import"./toArray-3323d384.js";import"./SearchOutlined-2c05f948.js";import"./pickAttrs-d12003ac.js";import"./index-f9445381.js";import"./textUtils-c37780ad.js";import"./DialogWrap-1f925fe5.js";import"./index-6838bdc5.js";import"./css-aae66f86.js";import"./index-12b232e8.js";import"./index-00238e03.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-7024d485.js"),["assets/buildSupabaseQuery-7024d485.js","assets/index-a94f140f.js","assets/index-ceed3b68.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
|