2026-09-01 10:46:46 +03:30
|
|
|
import{_ as Y}from"./BasicMainCard-289887ef.js";import{_ as Z}from"./BasicModal.vue_vue_type_style_index_0_lang-8e72024f.js";import{_ as j,u as ee}from"./useBaseTable-97132b25.js";import{_ as te}from"./button.vue_vue_type_style_index_0_lang-2aadace4.js";import{I as R}from"./Icon-3bccc0d8.js";import{t as ae}from"./useDataTime-581d686b.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-9cc7ea05.js";import{fetchMatchingUserIds as z,formatTableResult as me}from"./supabaseTableQuery-09e0fd1f.js";import{c as fe}from"./pushNotification-0f6dd5b1.js";import{_ as pe}from"./TextPreview.vue_vue_type_script_setup_true_lang-9b1f2aa7.js";import{e as _e,g as ve}from"./convert-2ad76038.js";import{M as F}from"./index-1c0096a5.js";import{C as he}from"./index-461c54dd.js";import{I as xe}from"./index-2fad7c88.js";import{T as N}from"./isSymbol-d00ad36c.js";import{U as ge}from"./index-0eeaee66.js";import"./Grid-36f4030b.js";import"./index-d780a420.js";import"./_plugin-vue_export-helper-0df7e82e.js";import"./shallowequal-8e48ba05.js";import"./index-c158727f.js";import"./vnode-1811a8a6.js";import"./index-ea36e535.js";import"./useState-b2543aac.js";import"./useRefs-563b43fc.js";import"./_flatRest-2790c772.js";import"./isMobile-e2e89480.js";import"./omit-3563fca2.js";import"./index-57fd432f.js";import"./Col-c9a7abf2.js";import"./styleChecker-035391ef.js";import"./isPlainObject-2a229bdb.js";import"./index-064eab1c.js";import"./updateLocale-845f5b58.js";import"./index-26f9cac8.js";import"./useMemo-fb2bb0e4.js";import"./FormItemContext-32857be9.js";import"./lodash-e6a6a79e.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-49bf9297.js";import"./index-0b2caecc.js";import"./Badge-abdbd545.js";import"./isNumeric-3f69e2aa.js";import"./index-fb06c021.js";import"./index-02aeab7c.js";import"./toArray-43df885b.js";import"./SearchOutlined-829b0931.js";import"./pickAttrs-f69e7d2f.js";import"./index-6a4605ec.js";import"./textUtils-c37780ad.js";import"./DialogWrap-cba6088f.js";import"./index-4d488545.js";import"./css-aae66f86.js";import"./index-df2deb09.js";import"./index-6c5d1c5e.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-51e32fda.js"),["assets/buildSupabaseQuery-51e32fda.js","assets/index-9cc7ea05.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
|