2026-08-22 14:52:19 +03:30
|
|
|
import{_ as Z}from"./BasicMainCard-aaaa8dc3.js";import{_ as ee}from"./BasicModal.vue_vue_type_style_index_0_lang-20cc468f.js";import{_ as te}from"./BasicInput.vue_vue_type_style_index_0_lang-4f908c47.js";import{_ as ae,u as oe}from"./useBaseTable-1184a002.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-cbfd9667.js";import{I as $}from"./Icon-0c226cc8.js";import{t as ne}from"./useDataTime-35d3ce8c.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-35c19078.js";import{g as P}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-65ebcbaa.js";import{M as he}from"./index-d1bea9c9.js";import{S as ve}from"./index-c135e3cd.js";import{C as fe}from"./index-3e7c49ac.js";import{I as ge}from"./index-e2b66426.js";import{T as z}from"./isSymbol-76912a30.js";import{U as be}from"./index-b998e211.js";import"./Grid-5df717b4.js";import"./index-0b82077f.js";import"./_plugin-vue_export-helper-b8aa26f1.js";import"./shallowequal-336924ae.js";import"./index-e39a0c4e.js";import"./vnode-bd016db8.js";import"./index-81c6c557.js";import"./useState-0b0c0b26.js";import"./useRefs-d20fccdf.js";import"./_flatRest-ce9c6e5e.js";import"./isMobile-e2e89480.js";import"./omit-fea2187f.js";import"./index-5e048154.js";import"./Col-93e193e7.js";import"./styleChecker-5378d544.js";import"./isPlainObject-9fc066ac.js";import"./usePrice-bc935b83.js";import"./updateLocale-674603f1.js";import"./index-317dfb98.js";import"./useMemo-141475be.js";import"./FormItemContext-c59740e7.js";import"./lodash-e3d7e6b8.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-aa5cbf20.js";import"./index-9c958bd1.js";import"./Badge-5aec0f5b.js";import"./isNumeric-3f69e2aa.js";import"./index-597067d3.js";import"./index-0cfe3fb2.js";import"./toArray-f7bbf4fe.js";import"./SearchOutlined-fd97bf7f.js";import"./pickAttrs-2a6a34d0.js";import"./index-70f42a71.js";import"./DialogWrap-7ea92471.js";import"./index-53a07be2.js";import"./css-aae66f86.js";import"./index-727899c3.js";import"./index-1016d40d.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-d68eb591.js"),["assets/buildSupabaseQuery-d68eb591.js","assets/index-35c19078.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
|