Files
machartaa_admin_dist/dist/assets/index-351c08ae.js
T

2 lines
11 KiB
JavaScript
Raw Normal View History

2026-09-27 17:26:36 +03:30
import{_ as Z}from"./BasicMainCard-235c6a8e.js";import{_ as ee}from"./BasicModal.vue_vue_type_style_index_0_lang-6b846ddc.js";import{_ as te}from"./BasicInput.vue_vue_type_style_index_0_lang-c6922e3c.js";import{_ as ae,u as oe}from"./useBaseTable-af0ac405.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-2b2ee941.js";import{I as D}from"./Icon-b552f0cb.js";import{t as ne}from"./useDataTime-45198684.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-ab3b0b84.js";import{g as P}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-488721be.js";import{M as he}from"./index-34ee3839.js";import{S as ve}from"./index-cbd716ee.js";import{C as fe}from"./index-0e84975e.js";import{I as ge}from"./index-adf5fd7f.js";import{T as z}from"./isSymbol-5cc45ff5.js";import{U as be}from"./index-732bfe67.js";import"./Grid-0eb1a61b.js";import"./index-b305a6df.js";import"./_plugin-vue_export-helper-6c5748cb.js";import"./shallowequal-39bf2166.js";import"./index-b2118e3c.js";import"./vnode-602d90c4.js";import"./index-d5e11315.js";import"./useState-7883cedd.js";import"./useRefs-3f675f69.js";import"./_flatRest-289ae805.js";import"./isMobile-e2e89480.js";import"./omit-837670e8.js";import"./index-fd8a1334.js";import"./Col-48c01651.js";import"./styleChecker-558deef9.js";import"./isPlainObject-d617fbb5.js";import"./usePrice-bc935b83.js";import"./updateLocale-958574f8.js";import"./index-086ff91e.js";import"./useMemo-1af73168.js";import"./FormItemContext-548f4b58.js";import"./lodash-a8d94941.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-d33f0812.js";import"./index-b5f9a27e.js";import"./Badge-fca8f233.js";import"./isNumeric-3f69e2aa.js";import"./index-18e93846.js";import"./index-9bb4e5d4.js";import"./toArray-78940ccb.js";import"./SearchOutlined-a36e5cce.js";import"./pickAttrs-1e1939a5.js";import"./index-257982d0.js";import"./DialogWrap-421034e2.js";import"./index-323711b8.js";import"./css-aae66f86.js";import"./index-993bd9f9.js";import"./index-75515977.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-15bd6baf.js"),["assets/buildSupabaseQuery-15bd6baf.js","assets/index-ab3b0b84.js","assets/index-43f2d491.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