Files
machartaa_admin_dist/dist/assets/index-47b558cc.js
T

2 lines
11 KiB
JavaScript
Raw Normal View History

2026-08-23 14:52:55 +03:30
import{_ as Z}from"./BasicMainCard-774c1aa2.js";import{_ as ee}from"./BasicModal.vue_vue_type_style_index_0_lang-c3017354.js";import{_ as te}from"./BasicInput.vue_vue_type_style_index_0_lang-5a31e25c.js";import{_ as ae,u as oe}from"./useBaseTable-6d1e031d.js";import{_ as ie}from"./button.vue_vue_type_style_index_0_lang-29638cb6.js";import{I as D}from"./Icon-c8a211f1.js";import{t as ne}from"./useDataTime-4239bab9.js";import{_ as le,H as se,I as re,J as ue,d as me,i as y,o as A,c as B,e as l,w as m,b as n,f as E,K as ce,l as v,t as de,n as S,z as pe,E as _,L as _e}from"./index-a28be152.js";import{g as z}from"./convert-2ad76038.js";import{n as H}from"./textUtils-c37780ad.js";import{g as N}from"./index-66691ac0.js";import{M as he}from"./index-8cc4eae2.js";import{S as ve}from"./index-dd708aca.js";import{C as fe}from"./index-1e365e2e.js";import{I as ge}from"./index-f317ca53.js";import{T as P}from"./isSymbol-25ca88cb.js";import{U as be}from"./index-1018439f.js";import"./Grid-442881e7.js";import"./index-96443f0e.js";import"./_plugin-vue_export-helper-f8ecc290.js";import"./shallowequal-4c00a664.js";import"./index-4a3fe357.js";import"./vnode-4742fc96.js";import"./index-5222fc6e.js";import"./useState-277534ff.js";import"./useRefs-e22a3bf7.js";import"./_flatRest-08328244.js";import"./isMobile-e2e89480.js";import"./omit-8084e33b.js";import"./index-51b737a4.js";import"./Col-86738adb.js";import"./styleChecker-8c6ff79a.js";import"./isPlainObject-450bf3c7.js";import"./usePrice-bc935b83.js";import"./updateLocale-619fe8a7.js";import"./index-3bdda65d.js";import"./useMemo-832cfde0.js";import"./FormItemContext-e50ee5a3.js";import"./lodash-5d3e4f7d.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-1d4fd99b.js";import"./index-61ef5439.js";import"./Badge-7dd6b925.js";import"./isNumeric-3f69e2aa.js";import"./index-dbebb139.js";import"./index-2849b35f.js";import"./toArray-bdec6b87.js";import"./SearchOutlined-4a5562a8.js";import"./pickAttrs-38902005.js";import"./index-f3f71242.js";import"./DialogWrap-617bda84.js";import"./index-12d303fc.js";import"./css-aae66f86.js";import"./index-85ba3ddf.js";import"./index-6d9febfe.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-7d0fcf16.js"),["assets/buildSupabaseQuery-7d0fcf16.js","assets/index-a28be152.js","assets/index-d7456b90.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"},$e={key:0,class:"absolute inset-0 bg-white/60 z-10 flex items-center j