Files
machartaa_admin_dist/dist/assets/index-bb3fad4f.js
T

2 lines
11 KiB
JavaScript
Raw Normal View History

2026-08-22 12:46:02 +03:30
import{_ as Z}from"./BasicMainCard-5c5f6d5b.js";import{_ as ee}from"./BasicModal.vue_vue_type_style_index_0_lang-53a0262f.js";import{_ as te}from"./BasicInput.vue_vue_type_style_index_0_lang-716e704a.js";import{_ as ae,u as oe}from"./useBaseTable-8494769c.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-6c8a1754.js";import{I as $}from"./Icon-a994075d.js";import{t as ne}from"./useDataTime-14b71fd1.js";import{_ as le,G as se,H as re,I as ue,d as me,g as y,o as A,c as B,b as l,w as m,a as n,e as E,J as ce,j as v,t as de,k as L,y as pe,D as _,K as _e}from"./index-b8949cd5.js";import{g as P}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-f102e8a4.js";import{M as he}from"./index-5dac065a.js";import{S as ve}from"./index-f14a229e.js";import{C as fe}from"./index-8b8dacd8.js";import{I as ge}from"./index-be8f184f.js";import{T as z}from"./isSymbol-71c709aa.js";import{U as be}from"./index-6115353a.js";import"./Grid-708d80d5.js";import"./index-6175522e.js";import"./_plugin-vue_export-helper-80a7ceaa.js";import"./shallowequal-a1fb5178.js";import"./index-21c91830.js";import"./vnode-30b649a7.js";import"./index-3f37bcfd.js";import"./useState-3541c1c7.js";import"./useRefs-ac0fbe98.js";import"./_flatRest-1538f4ef.js";import"./isMobile-e2e89480.js";import"./omit-df5a2f6f.js";import"./index-24c74f31.js";import"./Col-729d4045.js";import"./styleChecker-b373a9d5.js";import"./isPlainObject-ca054af0.js";import"./usePrice-bc935b83.js";import"./updateLocale-8e612d44.js";import"./index-8b168f42.js";import"./useMemo-0a6b6d51.js";import"./FormItemContext-9a696347.js";import"./lodash-a74993a4.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-db4861df.js";import"./index-d5350fd3.js";import"./Badge-ae00479c.js";import"./isNumeric-3f69e2aa.js";import"./index-97b694b9.js";import"./index-fc7471c3.js";import"./toArray-6496b5b4.js";import"./SearchOutlined-78438a74.js";import"./pickAttrs-52cf5a7c.js";import"./index-93cdd76f.js";import"./DialogWrap-1ca5eb9f.js";import"./index-2eed37e0.js";import"./css-aae66f86.js";import"./index-9f670063.js";import"./index-bc3f8044.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-bae49c63.js"),["assets/buildSupabaseQuery-bae49c63.js","assets/index-b8949cd5.js","assets/index-a54d32f7.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"},Ae=n("span",null,"حذف",-1),Be=n("span",null,"ویرایش",-1),Re={class:"space-y-4 relative"},De={key:0,class:"absolute inset-0 bg-white/60 z-10 flex items-center j