2026-08-22 12:46:02 +03:30
|
|
|
import{_ as K}from"./BasicModal.vue_vue_type_style_index_0_lang-53a0262f.js";import{_ as Q}from"./BasicInput.vue_vue_type_style_index_0_lang-716e704a.js";import{u as $,_ as X}from"./useBaseTable-8494769c.js";import{_ as Z}from"./button.vue_vue_type_style_index_0_lang-6c8a1754.js";import{I as k}from"./Icon-a994075d.js";import{t as ee}from"./useDataTime-14b71fd1.js";import{g as te,a as ae,v as se}from"./itemViews-5f3ed272.js";import{_ as oe,G as ie,H as z,I as le,d as ne,g as _,E as re,T as U,o as g,c as x,b as i,w as n,e as O,a as s,j as v,t as C,J as N,k as ce,D as h}from"./index-b8949cd5.js";import{M as de}from"./index-5dac065a.js";import{S as ue}from"./index-f14a229e.js";import{I as me}from"./index-be8f184f.js";import{T as V}from"./isSymbol-71c709aa.js";import"./usePrice-bc935b83.js";import"./updateLocale-8e612d44.js";import"./index-8b168f42.js";import"./_plugin-vue_export-helper-80a7ceaa.js";import"./shallowequal-a1fb5178.js";import"./vnode-30b649a7.js";import"./useState-3541c1c7.js";import"./useMemo-0a6b6d51.js";import"./FormItemContext-9a696347.js";import"./omit-df5a2f6f.js";import"./lodash-a74993a4.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-db4861df.js";import"./index-d5350fd3.js";import"./Badge-ae00479c.js";import"./isNumeric-3f69e2aa.js";import"./index-97b694b9.js";import"./index-3f37bcfd.js";import"./index-8b8dacd8.js";import"./styleChecker-b373a9d5.js";import"./index-2eed37e0.js";import"./index-21c91830.js";import"./DialogWrap-1ca5eb9f.js";import"./pickAttrs-52cf5a7c.js";import"./css-aae66f86.js";import"./index-fc7471c3.js";import"./toArray-6496b5b4.js";import"./SearchOutlined-78438a74.js";import"./isMobile-e2e89480.js";import"./index-93cdd76f.js";import"./supabaseTableQuery-6c5f43f6.js";import"./isPlainObject-ca054af0.js";const _e=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:a=>a.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"کد embed",dataIndex:"embed_code",key:"embed_code",customRender:a=>a.record.embed_code?"دارد":"-"},{title:"ترتیب",dataIndex:"sort_order",key:"sort_order",align:"center"},{title:"نمایش",dataIndex:"show",key:"show",align:"center",customRender:a=>a.record.show===!1?"مخفی":"نمایش"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:a=>ee(a.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}],F="music_macharta_video";async function ve(a){const c=await ie("music_macharta_videos",a);return Array.isArray(c)?c:[c]}async function pe(a,c){const l=await z("music_macharta_videos",a,{...c,updated_at:new Date().toISOString()});return Array.isArray(l)?l:[l]}async function fe(a,c){const l=await z("music_macharta_videos",a,{show:c,updated_at:new Date().toISOString()});return Array.isArray(l)?l:[l]}async function he(a){await le("music_macharta_videos",a)}function we(a){return ae(a,F)}function j(a,c){return te(a,c,F)}async function ye(a){const{TableEngineRequest:c}=await oe(()=>import("./buildSupabaseQuery-bae49c63.js"),["assets/buildSupabaseQuery-bae49c63.js","assets/index-b8949cd5.js","assets/index-a54d32f7.css"]),l={...a};!l.sort&&!l.order&&(l.sort={key:"sort_order",order:"desc"});const m=await c(l,"music_macharta_videos");try{if(Array.isArray(m==null?void 0:m.rows)){const b=l.page||1,p=l.limit||20,w=(b-1)*p,y=m.rows.map((d,u)=>({...d,title:d.title??"",embed_code:d.embed_code??"",show:d.show??!0,sort_order:d.sort_order??0,index:w+u}));return{...m,rows:y}}}catch(b){console.error("[getMusicMachartaVideosTable]",b)}return m}const be={class:"h-full"},ge={class:"gap-2 flex justify-center"},xe=s("span",null,"بازدیدها",-1),ke=s("span",null,"حذف",-1),Ve=s("span",null,"ویرایش",-1),Ie={class:"space-y-4"},Me=s("div",{class:"mb-1 text-sm text-gray-600"},"عنوان *",-1),Te=s("div",{class:"mb-1 text-sm text-gray-600"},"ترتیب نمایش",-1),Ce=s("div",{class:"mb-1 text-sm text-gray-600"},"کد embed *",-1),Ae={class:"flex justify-end"},Re={key:0,class:"space-y-4"},De={class:"grid gr
|