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

2 lines
11 KiB
JavaScript
Raw Normal View History

2026-08-25 15:58:39 +03:30
import{_ as Z}from"./BasicMainCard-858b87e5.js";import{_ as ee}from"./BasicModal.vue_vue_type_style_index_0_lang-5e13aafb.js";import{_ as te}from"./BasicInput.vue_vue_type_style_index_0_lang-0a0d6ad5.js";import{_ as ae,u as oe}from"./useBaseTable-fbe43a97.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-56e9b09f.js";import{I as D}from"./Icon-7c626614.js";import{t as ne}from"./useDataTime-75033b2a.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-864e73c5.js";import{g as P}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-ee82d0b5.js";import{M as he}from"./index-e0e66192.js";import{S as ve}from"./index-bd9719ff.js";import{C as fe}from"./index-01d39c58.js";import{I as ge}from"./index-7c172d43.js";import{T as z}from"./isSymbol-cbbd997a.js";import{U as be}from"./index-00a79bb5.js";import"./Grid-b4a61c99.js";import"./index-846ea911.js";import"./_plugin-vue_export-helper-a65526b0.js";import"./shallowequal-c06f2dba.js";import"./index-e8adaad2.js";import"./vnode-81e10d7c.js";import"./index-e764b6ae.js";import"./useState-85b22590.js";import"./useRefs-d7f22ed1.js";import"./_flatRest-2445814a.js";import"./isMobile-e2e89480.js";import"./omit-ab9263d6.js";import"./index-faaf1291.js";import"./Col-55712802.js";import"./styleChecker-4198f097.js";import"./isPlainObject-13142948.js";import"./usePrice-bc935b83.js";import"./updateLocale-71589e17.js";import"./index-69195e76.js";import"./useMemo-652a8e82.js";import"./FormItemContext-37273d98.js";import"./lodash-ba10e651.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-781130e9.js";import"./index-974d8184.js";import"./Badge-7246b1a5.js";import"./isNumeric-3f69e2aa.js";import"./index-3799ba3b.js";import"./index-72f07d1b.js";import"./toArray-21522b5d.js";import"./SearchOutlined-8ea30c34.js";import"./pickAttrs-bb0043f0.js";import"./index-07df2e8f.js";import"./DialogWrap-8cebf5f4.js";import"./index-b21b8492.js";import"./css-aae66f86.js";import"./index-391eda35.js";import"./index-041723b0.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-f6fdad41.js"),["assets/buildSupabaseQuery-f6fdad41.js","assets/index-864e73c5.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