Files
machartaa_admin_dist/dist/assets/index-728e4a04.js
T

2 lines
11 KiB
JavaScript
Raw Normal View History

2026-08-21 17:49:09 +03:30
import{_ as Z}from"./BasicMainCard-3ff3ca7d.js";import{_ as ee}from"./BasicModal.vue_vue_type_style_index_0_lang-04d97f2a.js";import{_ as te}from"./BasicInput.vue_vue_type_style_index_0_lang-82c40198.js";import{_ as ae,u as oe}from"./useBaseTable-3820970d.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-5de0d8e3.js";import{I as $}from"./Icon-87be71cf.js";import{t as ne}from"./useDataTime-4d99ffa4.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-6af34310.js";import{g as P}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-fedcc8bf.js";import{M as he}from"./index-402d2a38.js";import{S as ve}from"./index-1cc8f5ba.js";import{C as fe}from"./index-7ce3f98c.js";import{I as ge}from"./index-a9aa8901.js";import{T as z}from"./isSymbol-74667f0e.js";import{U as be}from"./index-a8d977ad.js";import"./Grid-c00ab853.js";import"./index-971b2d4a.js";import"./_plugin-vue_export-helper-4395e3ae.js";import"./shallowequal-73e7ce81.js";import"./index-56af14ac.js";import"./vnode-6bd0f81f.js";import"./index-12698051.js";import"./useState-99a639ca.js";import"./useRefs-a7f6cac5.js";import"./_flatRest-fd0e6fb4.js";import"./isMobile-e2e89480.js";import"./omit-0d248b9d.js";import"./index-31d268cb.js";import"./Col-1a0e8c9f.js";import"./styleChecker-3b14718f.js";import"./isPlainObject-f211f712.js";import"./usePrice-bc935b83.js";import"./updateLocale-ce5acd65.js";import"./index-54c8d4d2.js";import"./useMemo-b6d62481.js";import"./FormItemContext-752394af.js";import"./lodash-e4e61e75.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-064ba967.js";import"./index-2e0cb6a7.js";import"./Badge-34585beb.js";import"./isNumeric-3f69e2aa.js";import"./index-12ea9e69.js";import"./index-0bc83ff9.js";import"./toArray-1c539327.js";import"./SearchOutlined-15a5b0f1.js";import"./pickAttrs-a6fd0b4c.js";import"./index-f3fb0dd4.js";import"./DialogWrap-532fa905.js";import"./index-850ddaf5.js";import"./css-aae66f86.js";import"./index-d224c105.js";import"./index-dd895eee.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-42f8a8db.js"),["assets/buildSupabaseQuery-42f8a8db.js","assets/index-6af34310.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