Files
machartaa_admin_dist/dist/assets/index-4744cb78.js
T

2 lines
11 KiB
JavaScript
Raw Normal View History

2026-08-15 17:53:12 +03:30
import{_ as ee}from"./BasicMainCard-29eef376.js";import{_ as te}from"./BasicModal.vue_vue_type_style_index_0_lang-7803828f.js";import{_ as ae}from"./BasicInput.vue_vue_type_style_index_0_lang-0a352870.js";import{_ as oe,u as ne}from"./useBaseTable-e4bbf0da.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-99dfcd06.js";import{I as A}from"./Icon-c9ad16b9.js";import{t as le}from"./useDataTime-5442c624.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-bc4edd51.js";import{g as P}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-edd68561.js";import{M as pe}from"./index-609e9a96.js";import{S as _e}from"./index-d4870df7.js";import{C as he}from"./index-4e41e7b6.js";import{I as ve}from"./index-49e2e544.js";import{T as z}from"./isSymbol-f9834f4f.js";import{U as fe}from"./index-368498f7.js";import"./Grid-08ee34b6.js";import"./index-627337a8.js";import"./_plugin-vue_export-helper-c8347567.js";import"./shallowequal-cad00b6e.js";import"./index-47b6ba8f.js";import"./vnode-f2307909.js";import"./index-1d49b36b.js";import"./useState-47ff4833.js";import"./useRefs-225197bd.js";import"./_flatRest-9adb1e9a.js";import"./isMobile-e2e89480.js";import"./omit-6f60253b.js";import"./index-7fcb5f91.js";import"./Col-96f7f23f.js";import"./styleChecker-bc667521.js";import"./isPlainObject-ed8996b4.js";import"./usePrice-bc935b83.js";import"./updateLocale-7b0be7e3.js";import"./index-9df7eaa1.js";import"./index-bc659f42.js";import"./useMemo-8275a234.js";import"./FormItemContext-4e017a44.js";import"./lodash-3efc1909.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-9775c8a5.js";import"./index-5ea3cefd.js";import"./Badge-627fd6d3.js";import"./isNumeric-3f69e2aa.js";import"./index-34768277.js";import"./index-727535d5.js";import"./toArray-b01cb1f9.js";import"./SearchOutlined-4504ec77.js";import"./pickAttrs-1c46cfba.js";import"./index-ae018072.js";import"./index-3aafac3f.js";import"./DialogWrap-f12e49af.js";import"./index-393b875d.js";import"./css-aae66f86.js";import"./index-6d8a75c0.js";import"./index-60d2bcc6.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-e64be55f.js"),["assets/buildSupabaseQuery-e64be55f.js","assets/index-bc4edd51.js","assets/index-c30c691c.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:"g