Files
machartaa_admin_dist/dist/assets/index-6ffa6c30.js
T

2 lines
11 KiB
JavaScript
Raw Normal View History

2026-08-19 11:15:51 +03:30
import{_ as ee}from"./BasicMainCard-945a60be.js";import{_ as te}from"./BasicModal.vue_vue_type_style_index_0_lang-31a77bff.js";import{_ as ae}from"./BasicInput.vue_vue_type_style_index_0_lang-16fb135f.js";import{_ as oe,u as ne}from"./useBaseTable-53dd99af.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-bfd9fcfc.js";import{I as A}from"./Icon-49e380f5.js";import{t as le}from"./useDataTime-3763aaa9.js";import{_ as se,G as O,d as re,g as x,o as B,c as $,b as l,w as c,a as i,e as E,H as ue,j as f,t as me,k as L,y as ce,D as v,I as de}from"./index-bfe458ac.js";import{g as P}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-32a06c2d.js";import{M as pe}from"./index-30f4723a.js";import{S as _e}from"./index-a231d930.js";import{C as he}from"./index-f9fac6a3.js";import{I as ve}from"./index-3a7846ee.js";import{T as z}from"./isSymbol-0bccfc01.js";import{U as fe}from"./index-3c17cc81.js";import"./Grid-653102df.js";import"./index-17e4f352.js";import"./_plugin-vue_export-helper-67599eab.js";import"./shallowequal-58ae19a4.js";import"./index-d6fc1ec7.js";import"./vnode-d4498b2d.js";import"./index-d162d812.js";import"./useState-28dabf70.js";import"./useRefs-7ed7974b.js";import"./_flatRest-e19970cd.js";import"./isMobile-e2e89480.js";import"./omit-31473f11.js";import"./index-61da12ec.js";import"./Col-37dd3be5.js";import"./styleChecker-8e2e8c57.js";import"./isPlainObject-d0372073.js";import"./usePrice-bc935b83.js";import"./updateLocale-01f6a4ae.js";import"./index-866ab3cc.js";import"./index-bc659f42.js";import"./useMemo-c07be216.js";import"./FormItemContext-50ffb9a1.js";import"./lodash-6ccdc7c6.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-5abef7b1.js";import"./index-24b7e322.js";import"./Badge-2d408009.js";import"./isNumeric-3f69e2aa.js";import"./index-231f7c05.js";import"./index-d61dbb2f.js";import"./toArray-54bd8d35.js";import"./SearchOutlined-2adda210.js";import"./pickAttrs-c1604177.js";import"./index-d3413392.js";import"./DialogWrap-f94b796f.js";import"./index-78c7f5e8.js";import"./css-aae66f86.js";import"./index-42759bd8.js";import"./index-7bc50da0.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=>le(s.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}];async function be(s){const{data:_,error:m}=await O.from("announcements").insert([s]).select();if(m)throw m;return _}async function F(s,_){const{data:m,error:h}=await O.from("announcements").update({..._,updated_at:new Date().toISOString()}).eq("id",s).select();if(h)throw h;return m}async function ge(s){const{error:_}=await O.from("announcements").delete().eq("id",s);if(_)throw _}async function we(s){const{TableEngineRequest:_}=await se(()=>import("./buildSupabaseQuery-8476cba9.js"),["assets/buildSupabaseQuery-8476cba9.js","assets/index-bfe458ac.js","assets/index-a54d32f7.css","assets/supabaseTableQuery-8ab5665d.js"]),m={...s};!m.sort&&!m.order&&(m.order="-id");const h=await _(m,"announcements");try{if(Array.isArray(h==null?void 0:h.rows)){const y=m.page||1,R=m.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=i("h2",null,"اطلاع‌رسانی ویدیویی",-1),ke=["src"],Ie={key:1},Te={class:"gap-2 flex justify-center"},C