2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
import{_ as Y}from"./BasicMainCard-774c1aa2.js";import{_ as Z}from"./BasicModal.vue_vue_type_style_index_0_lang-c3017354.js";import{_ as j,u as ee}from"./useBaseTable-6d1e031d.js";import{_ as te}from"./button.vue_vue_type_style_index_0_lang-29638cb6.js";import{I as R}from"./Icon-c8a211f1.js";import{t as ae}from"./useDataTime-4239bab9.js";import{_ as ne,H as ie,I as se,J as le,d as oe,i as y,B 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,K as ce,n as L,z as de,t as q,E as m}from"./index-a28be152.js";import{fetchMatchingUserIds as z,formatTableResult as me}from"./supabaseTableQuery-e3d032a9.js";import{c as fe}from"./pushNotification-7da7018d.js";import{_ as pe}from"./TextPreview.vue_vue_type_script_setup_true_lang-8e9148a1.js";import{e as _e,g as ve}from"./convert-2ad76038.js";import{M as F}from"./index-8cc4eae2.js";import{C as he}from"./index-1e365e2e.js";import{I as xe}from"./index-f317ca53.js";import{T as N}from"./isSymbol-25ca88cb.js";import{U as ge}from"./index-1018439f.js";import"./Grid-442881e7.js";import"./index-96443f0e.js";import"./_plugin-vue_export-helper-f8ecc290.js";import"./shallowequal-4c00a664.js";import"./index-4a3fe357.js";import"./vnode-4742fc96.js";import"./index-5222fc6e.js";import"./useState-277534ff.js";import"./useRefs-e22a3bf7.js";import"./_flatRest-08328244.js";import"./isMobile-e2e89480.js";import"./omit-8084e33b.js";import"./index-51b737a4.js";import"./Col-86738adb.js";import"./styleChecker-8c6ff79a.js";import"./isPlainObject-450bf3c7.js";import"./index-dd708aca.js";import"./updateLocale-619fe8a7.js";import"./index-3bdda65d.js";import"./useMemo-832cfde0.js";import"./FormItemContext-e50ee5a3.js";import"./lodash-5d3e4f7d.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-1d4fd99b.js";import"./index-61ef5439.js";import"./Badge-7dd6b925.js";import"./isNumeric-3f69e2aa.js";import"./index-dbebb139.js";import"./index-2849b35f.js";import"./toArray-bdec6b87.js";import"./SearchOutlined-4a5562a8.js";import"./pickAttrs-38902005.js";import"./index-f3f71242.js";import"./textUtils-c37780ad.js";import"./DialogWrap-617bda84.js";import"./index-12d303fc.js";import"./css-aae66f86.js";import"./index-85ba3ddf.js";import"./index-6d9febfe.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-7d0fcf16.js"),["assets/buildSupabaseQuery-7d0fcf16.js","assets/index-a28be152.js","assets/index-d7456b90.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
|