2026-09-19 11:51:19 +03:30
|
|
|
import{_ as Z}from"./BasicMainCard-5c80ef19.js";import{_ as ee}from"./BasicModal.vue_vue_type_style_index_0_lang-73f8a39e.js";import{_ as te}from"./BasicInput.vue_vue_type_style_index_0_lang-4e4a82fb.js";import{_ as ae,u as oe}from"./useBaseTable-fed341a8.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-76fea031.js";import{I as D}from"./Icon-66010218.js";import{t as ne}from"./useDataTime-ba62eb36.js";import{_ as le,H as se,I as re,J as ue,d as me,i as y,o as B,c as A,e as l,w as m,b as n,f as E,K as ce,l as v,t as de,n as S,B as pe,G as _,L as _e}from"./index-e064ffac.js";import{g as P}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-1d8e1887.js";import{M as he}from"./index-418d2c16.js";import{S as ve}from"./index-5791312b.js";import{C as fe}from"./index-1320e6a3.js";import{I as ge}from"./index-3d02255e.js";import{T as z}from"./isSymbol-dc94e500.js";import{U as be}from"./index-227d8909.js";import"./Grid-28c7683b.js";import"./index-69ceab84.js";import"./_plugin-vue_export-helper-c2b02d20.js";import"./shallowequal-9a59fe48.js";import"./index-01bd72a1.js";import"./vnode-43e0532a.js";import"./index-2f676c29.js";import"./useState-1df7da74.js";import"./useRefs-320b3f3d.js";import"./_flatRest-0e75a214.js";import"./isMobile-e2e89480.js";import"./omit-98a5c881.js";import"./index-7dcbad31.js";import"./Col-e0b57a55.js";import"./styleChecker-a89d8927.js";import"./isPlainObject-118a5a84.js";import"./usePrice-bc935b83.js";import"./updateLocale-53d85368.js";import"./index-c6cc46d7.js";import"./useMemo-118b7fdd.js";import"./FormItemContext-ea5e629b.js";import"./lodash-77052907.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-094732f6.js";import"./index-a1f6487e.js";import"./Badge-31351815.js";import"./isNumeric-3f69e2aa.js";import"./index-6b63d7e6.js";import"./index-020f9f38.js";import"./toArray-03404447.js";import"./SearchOutlined-bce29925.js";import"./pickAttrs-20fc50b7.js";import"./index-4cde3ed4.js";import"./DialogWrap-934116e0.js";import"./index-cf4a2322.js";import"./css-aae66f86.js";import"./index-d6ed4c52.js";import"./index-def436d1.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-3ca34e46.js"),["assets/buildSupabaseQuery-3ca34e46.js","assets/index-e064ffac.js","assets/index-7c005fab.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"},Be=n("span",null,"حذف",-1),Ae=n("span",null,"ویرایش",-1),Re={class:"space-y-4 relative"},$e={key:0,class:"absolute inset-0 bg-white/60 z-10 flex items-center j
|