2026-10-10 13:00:20 +03:30
|
|
|
import{_ as Y}from"./BasicMainCard-b162b1c4.js";import{_ as Z}from"./BasicModal.vue_vue_type_style_index_0_lang-a4f4e215.js";import{_ as j,u as ee}from"./useBaseTable-2ab18557.js";import{_ as te}from"./button.vue_vue_type_style_index_0_lang-1d790c18.js";import{I as R}from"./Icon-82d1568b.js";import{t as ae}from"./useDataTime-54c17809.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-b1a7e04b.js";import{fetchMatchingUserIds as z,formatTableResult as me}from"./supabaseTableQuery-ba3eb91b.js";import{c as fe}from"./pushNotification-84fd7275.js";import{_ as pe}from"./TextPreview.vue_vue_type_script_setup_true_lang-03365c83.js";import{e as _e,g as ve}from"./convert-2ad76038.js";import{M as F}from"./index-95736a95.js";import{C as he}from"./index-d8d70cfa.js";import{I as xe}from"./index-40ad5e11.js";import{T as N}from"./isSymbol-8bb1a5fc.js";import{U as ge}from"./index-b2a473c2.js";import"./Grid-bde7d306.js";import"./index-89d97954.js";import"./_plugin-vue_export-helper-bc5e645a.js";import"./shallowequal-8317aeac.js";import"./index-3adb8492.js";import"./vnode-cf87e7d8.js";import"./index-a5f1405d.js";import"./useState-bee297fc.js";import"./useRefs-8cde84b1.js";import"./_flatRest-49c0ef8d.js";import"./isMobile-e2e89480.js";import"./omit-8d80653a.js";import"./index-53cb41a6.js";import"./Col-b5ed65ce.js";import"./styleChecker-e7996752.js";import"./isPlainObject-aea507b4.js";import"./index-abe83bbb.js";import"./updateLocale-7460d5f0.js";import"./index-3c78ebad.js";import"./useMemo-f1dd6d43.js";import"./FormItemContext-75ce584c.js";import"./lodash-a3cc5b11.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-dbbf8b2d.js";import"./index-ca8dc14f.js";import"./Badge-815f7351.js";import"./isNumeric-3f69e2aa.js";import"./index-62a1d374.js";import"./index-c03866b7.js";import"./toArray-7c7c3b23.js";import"./SearchOutlined-280cd434.js";import"./pickAttrs-6c8634eb.js";import"./index-35b107f8.js";import"./textUtils-c37780ad.js";import"./DialogWrap-06d91612.js";import"./index-06b581ca.js";import"./css-aae66f86.js";import"./index-b14e1723.js";import"./index-32cf5d9b.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-75615d81.js"),["assets/buildSupabaseQuery-75615d81.js","assets/index-b1a7e04b.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
|