2026-07-09 15:20:19 +03:30
|
|
|
import{_ as ee}from"./BasicMainCard-8fe4bdc4.js";import{_ as te}from"./BasicModal.vue_vue_type_style_index_0_lang-1bdfd956.js";import{_ as ae}from"./BasicInput.vue_vue_type_style_index_0_lang-0064d90a.js";import{_ as oe,u as ne}from"./useBaseTable-dfc7081d.js";import{_ as le}from"./button.vue_vue_type_style_index_0_lang-1caad4e7.js";import{I as A}from"./Icon-c87fac13.js";import{t as ie}from"./useDataTime-e1a8db4a.js";import{_ as se,G as O,d as re,g as x,o as B,c as $,b as i,w as m,a as l,e as E,H as ue,j as f,t as ce,k as L,y as me,D as v,I as de}from"./index-a08997de.js";import{g as P}from"./convert-67c23be8.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-4c089ded.js";import{M as _e}from"./index-676f4182.js";import{S as pe}from"./index-23f9a644.js";import{C as he}from"./index-3f53f7ff.js";import{I as ve}from"./index-8b4fbdda.js";import{T as z}from"./isSymbol-6a02f777.js";import{U as fe}from"./index-dcc91815.js";import"./index-2be1788e.js";import"./index-a6b85004.js";import"./_plugin-vue_export-helper-20260c74.js";import"./styleChecker-0d78d27e.js";import"./vnode-ddd966cb.js";import"./useState-4330fc6d.js";import"./useRefs-e28c9a2f.js";import"./_flatRest-e8546dba.js";import"./index-cf80abd0.js";import"./Col-231bd990.js";import"./isPlainObject-a1ebcbd7.js";import"./usePrice-bc935b83.js";import"./fa_IR-22f438b3.js";import"./toArray-efae666c.js";import"./FormItemContext-5c31efc9.js";import"./pickAttrs-a3c5523a.js";import"./lodash-aac8995a.js";import"./css-0fc50739.js";import"./DialogWrap-4549d95e.js";import"./index-1b6f1280.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=>ie(s.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}];async function be(s){const{data:p,error:c}=await O.from("announcements").insert([s]).select();if(c)throw c;return p}async function F(s,p){const{data:c,error:h}=await O.from("announcements").update({...p,updated_at:new Date().toISOString()}).eq("id",s).select();if(h)throw h;return c}async function ge(s){const{error:p}=await O.from("announcements").delete().eq("id",s);if(p)throw p}async function we(s){const{TableEngineRequest:p}=await se(()=>import("./buildSupabaseQuery-0ad3022e.js"),["assets/buildSupabaseQuery-0ad3022e.js","assets/index-a08997de.js","assets/index-a3740640.css","assets/supabaseTableQuery-95762ff3.js"]),c={...s};!c.sort&&!c.order&&(c.order="-id");const h=await p(c,"announcements");try{if(Array.isArray(h==null?void 0:h.rows)){const y=c.page||1,R=c.limit||20,k=(y-1)*R,T=h.rows.map((d,g)=>({...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+g}));return{...h,rows:T}}}catch(y){console.error("[getAnnouncementsTable]",y)}return h}const xe={class:"flex justify-between items-center mb-4"},ye=l("h2",null,"اطلاع‌رسانی ویدیویی",-1),ke=["src"],Ie={key:1},Te={class:"gap-2 flex justify-center"},Ce=l("span",null,"ØØ°Ù�",-1),Ue=l("span",null,"ویرایش",-1),Be={class:"space-y-4 relative"},$e={key:0,class:"absolute inset-0 bg-white/60 z-10 flex items-center justify-center"},De=l("div",{class:"mb-1 text-sm text-gray-600"},"عنوان *",-1),Me=l("div",{class:"mb-1 text-sm text-gray-600"},"عنوان ویدیو",-1),Ae=l("div",{class:"mb-1 text-sm text-gray-600"},"ØªÙˆØ¶ÛŒØØ§Øª *",-1),Re=l("div",{class:"mb-1 text-sm text-gray-600"},"کد embed آپارات *",-1),Se=l("div",{class:"mb-1 text-sm text-gray-600"},"تامنیل",-1),Le={key:0},Pe=l("div",null,"Ø¢Ù
|