2026-08-22 13:27:44 +03:30
|
|
|
import{_ as Z}from"./BasicMainCard-f06c4dad.js";import{_ as ee}from"./BasicModal.vue_vue_type_style_index_0_lang-7cc4ab5d.js";import{_ as te}from"./BasicInput.vue_vue_type_style_index_0_lang-ebcbbe1b.js";import{_ as ae,u as oe}from"./useBaseTable-01dc558f.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-86273660.js";import{I as $}from"./Icon-cc126d0d.js";import{t as ne}from"./useDataTime-5a09f654.js";import{_ as le,G as se,H as re,I as ue,d as me,g as y,o as A,c as B,b as l,w as m,a as n,e as E,J as ce,j as v,t as de,k as L,y as pe,D as _,K as _e}from"./index-d718011e.js";import{g as P}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-18640d9e.js";import{M as he}from"./index-eb860757.js";import{S as ve}from"./index-5ade1644.js";import{C as fe}from"./index-6fc61bbd.js";import{I as ge}from"./index-ba4d9879.js";import{T as z}from"./isSymbol-e219d64b.js";import{U as be}from"./index-c895ada9.js";import"./Grid-162208a5.js";import"./index-68cba126.js";import"./_plugin-vue_export-helper-0ed48b96.js";import"./shallowequal-c9e151d3.js";import"./index-5b828516.js";import"./vnode-0b482026.js";import"./index-7eae579c.js";import"./useState-d226846a.js";import"./useRefs-373e2aeb.js";import"./_flatRest-e8ea393e.js";import"./isMobile-e2e89480.js";import"./omit-86fc1094.js";import"./index-44f8c87e.js";import"./Col-7aad654b.js";import"./styleChecker-351d08aa.js";import"./isPlainObject-63126d02.js";import"./usePrice-bc935b83.js";import"./updateLocale-dac04afb.js";import"./index-12b8b726.js";import"./useMemo-9e09b0c8.js";import"./FormItemContext-6bb05345.js";import"./lodash-02d12c59.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-e23cf95b.js";import"./index-cbb71dc1.js";import"./Badge-bf61afe1.js";import"./isNumeric-3f69e2aa.js";import"./index-9747fd4d.js";import"./index-4e5c2990.js";import"./toArray-02b8a08a.js";import"./SearchOutlined-31f9ef0b.js";import"./pickAttrs-49bc9c67.js";import"./index-7a44352f.js";import"./DialogWrap-944b6cdf.js";import"./index-59898946.js";import"./css-aae66f86.js";import"./index-7a1bd658.js";import"./index-a2e0d559.js";const V=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:s=>s.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"عنوان ویدیو",dataIndex:"video_title",key:"video_title",customRender:s=>s.record.video_title||"-"},{title:"نمایش در صفحه اصلی",dataIndex:"show_on_home",key:"show_on_home",align:"center",width:140,customRender:s=>s.record.show_on_home?"بله":"خیر"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:s=>ne(s.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}];async function we(s){const h=await se("announcements",s);return Array.isArray(h)?h:[h]}async function q(s,h){const c=await re("announcements",s,{...h,updated_at:new Date().toISOString()});return Array.isArray(c)?c:[c]}async function ye(s){await ue("announcements",s)}async function xe(s){const{TableEngineRequest:h}=await le(()=>import("./buildSupabaseQuery-ad024d1e.js"),["assets/buildSupabaseQuery-ad024d1e.js","assets/index-d718011e.js","assets/index-a54d32f7.css"]),c={...s};!c.sort&&!c.order&&(c.order="-id");const g=await h(c,"announcements");try{if(Array.isArray(g==null?void 0:g.rows)){const x=c.page||1,M=c.limit||20,k=(x-1)*M,T=g.rows.map((d,b)=>({...d,title:d.title??"",description:d.description??"",video_title:d.video_title??"",thumbnail:d.thumbnail??null,aparat_embed_code:d.aparat_embed_code??"",show_on_home:d.show_on_home!==!1,index:k+b}));return{...g,rows:T}}}catch(x){console.error("[getAnnouncementsTable]",x)}return g}const ke={class:"flex justify-between items-center mb-4"},Ie=n("h2",null,"اطلاعرسانی ویدیویی",-1),Te=["src"],Ce={key:1},Ue={class:"gap-2 flex justify-center"},Ae=n("span",null,"حذف",-1),Be=n("span",null,"ویرایش",-1),Re={class:"space-y-4 relative"},De={key:0,class:"absolute inset-0 bg-white/60 z-10 flex items-center j
|