Files
machartaa_admin_dist/dist/assets/index-2320cfdd.js
T

2 lines
11 KiB
JavaScript
Raw Normal View History

2026-08-19 18:36:32 +03:30
import{_ as ee}from"./BasicMainCard-c1077cbf.js";import{_ as te}from"./BasicModal.vue_vue_type_style_index_0_lang-0121d908.js";import{_ as ae}from"./BasicInput.vue_vue_type_style_index_0_lang-83b58369.js";import{_ as oe,u as ne}from"./useBaseTable-7b78293f.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-dcd86e7a.js";import{I as A}from"./Icon-8dedfa53.js";import{t as le}from"./useDataTime-a337f5c6.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-b0561d74.js";import{g as P}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-833169e4.js";import{M as pe}from"./index-12bdf78c.js";import{S as _e}from"./index-b7f1770d.js";import{C as he}from"./index-93c22234.js";import{I as ve}from"./index-d18c8f13.js";import{T as z}from"./isSymbol-a4291d99.js";import{U as fe}from"./index-2e6c7b29.js";import"./Grid-80c38bfa.js";import"./index-f9091817.js";import"./_plugin-vue_export-helper-130a5518.js";import"./shallowequal-4f931fa5.js";import"./index-2dc7fe57.js";import"./vnode-531f9d95.js";import"./index-5d725680.js";import"./useState-94528018.js";import"./useRefs-899ec8f3.js";import"./_flatRest-39f9ed6b.js";import"./isMobile-e2e89480.js";import"./omit-e6701bfc.js";import"./index-9a77c0e9.js";import"./Col-08664037.js";import"./styleChecker-d39a1d44.js";import"./isPlainObject-3a5eccde.js";import"./usePrice-bc935b83.js";import"./updateLocale-b730d578.js";import"./index-092c5981.js";import"./index-bc659f42.js";import"./useMemo-0162b583.js";import"./FormItemContext-5520cb52.js";import"./lodash-9a3882db.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-71825e72.js";import"./index-46f9dc77.js";import"./Badge-d2c862d8.js";import"./isNumeric-3f69e2aa.js";import"./index-7febe226.js";import"./index-482a46a3.js";import"./toArray-1ab9b01c.js";import"./SearchOutlined-ca6a4719.js";import"./pickAttrs-69dd58a4.js";import"./index-840dd6b2.js";import"./DialogWrap-9c2d8a9c.js";import"./index-b618fa76.js";import"./css-aae66f86.js";import"./index-5398304a.js";import"./index-ea044634.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-09e09955.js"),["assets/buildSupabaseQuery-09e09955.js","assets/index-b0561d74.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