Files
machartaa_admin_dist/dist/assets/index-4a3c5e20.js
T

2 lines
11 KiB
JavaScript
Raw Normal View History

2026-08-25 18:44:14 +03:30
import{_ as Z}from"./BasicMainCard-debf8353.js";import{_ as ee}from"./BasicModal.vue_vue_type_style_index_0_lang-fae33930.js";import{_ as te}from"./BasicInput.vue_vue_type_style_index_0_lang-697dbf22.js";import{_ as ae,u as oe}from"./useBaseTable-82539eae.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-a8e4c363.js";import{I as D}from"./Icon-edf119de.js";import{t as ne}from"./useDataTime-da5b6dce.js";import{_ as le,H as se,I as re,J as ue,d as me,i as y,o as B,c as A,e as l,w as m,b as n,f as E,K as ce,l as v,t as de,n as S,B as pe,G as _,L as _e}from"./index-a8367ff2.js";import{g as P}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-757f1155.js";import{M as he}from"./index-9945ba04.js";import{S as ve}from"./index-4a5bdd84.js";import{C as fe}from"./index-bb89eb22.js";import{I as ge}from"./index-7c64cd55.js";import{T as z}from"./isSymbol-14cd0bd9.js";import{U as be}from"./index-55485934.js";import"./Grid-b32f963a.js";import"./index-41027af5.js";import"./_plugin-vue_export-helper-33d8d282.js";import"./shallowequal-6dfee65d.js";import"./index-f900e797.js";import"./vnode-29430e8f.js";import"./index-c3834dab.js";import"./useState-594e21bf.js";import"./useRefs-620742e5.js";import"./_flatRest-8af74098.js";import"./isMobile-e2e89480.js";import"./omit-b4301d3d.js";import"./index-09fb7960.js";import"./Col-998ad8d4.js";import"./styleChecker-26fef2aa.js";import"./isPlainObject-c12254bd.js";import"./usePrice-bc935b83.js";import"./updateLocale-fac91928.js";import"./index-b114ff98.js";import"./useMemo-21aa3156.js";import"./FormItemContext-fe223efb.js";import"./lodash-ed85ff31.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-3910ceb5.js";import"./index-e105ccfe.js";import"./Badge-2c6fd47c.js";import"./isNumeric-3f69e2aa.js";import"./index-e36cdf8a.js";import"./index-59fae103.js";import"./toArray-13b6ecf9.js";import"./SearchOutlined-2e41df22.js";import"./pickAttrs-9e6a5f83.js";import"./index-ab16997f.js";import"./DialogWrap-2da8810d.js";import"./index-2750d3d4.js";import"./css-aae66f86.js";import"./index-e13f986d.js";import"./index-df7d258e.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-a62e4852.js"),["assets/buildSupabaseQuery-a62e4852.js","assets/index-a8367ff2.js","assets/index-71a80eb0.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"},Be=n("span",null,"حذف",-1),Ae=n("span",null,"ویرایش",-1),Re={class:"space-y-4 relative"},$e={key:0,class:"absolute inset-0 bg-white/60 z-10 flex items-center j