2026-10-10 10:47:47 +03:30
|
|
|
import{_ as G}from"./BasicModal.vue_vue_type_style_index_0_lang-3186fd13.js";import{_ as Q}from"./BasicInput.vue_vue_type_style_index_0_lang-8f3a56f0.js";import{u as $,_ as X}from"./useBaseTable-e684a9eb.js";import{_ as Z}from"./button.vue_vue_type_style_index_0_lang-de1581fe.js";import{I as k}from"./Icon-623de3ea.js";import{t as ee}from"./useDataTime-284d8334.js";import{g as te,a as ae,v as se}from"./itemViews-cfc386f2.js";import{_ as oe,I as ie,J as L,K as le,d as ne,i as _,z as re,B as U,o as g,c as x,e as i,w as n,f as O,b as s,l as v,t as T,L as N,n as ce,H as h}from"./index-185c08ed.js";import{M as de}from"./index-2573091c.js";import{S as ue}from"./index-5a721f2f.js";import{I as me}from"./index-a29d0cc7.js";import{T as V}from"./isSymbol-18d6b370.js";import"./usePrice-bc935b83.js";import"./updateLocale-d0f4ef4d.js";import"./index-f463cb03.js";import"./_plugin-vue_export-helper-e26fbd9a.js";import"./shallowequal-6622fb79.js";import"./vnode-8a371720.js";import"./useState-50bb8c1f.js";import"./useMemo-4f3c1eb4.js";import"./FormItemContext-2d3e7341.js";import"./omit-d93eaa18.js";import"./lodash-0633e973.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-e9f1c563.js";import"./index-9383b001.js";import"./Badge-51142f0a.js";import"./isNumeric-3f69e2aa.js";import"./index-9e9f857b.js";import"./index-a2809ce1.js";import"./index-33777d70.js";import"./styleChecker-7bb1c6f5.js";import"./index-975de3f6.js";import"./index-1f485cc0.js";import"./DialogWrap-9863a7c0.js";import"./pickAttrs-e062aa3e.js";import"./css-aae66f86.js";import"./index-0ee37254.js";import"./toArray-da31f78e.js";import"./SearchOutlined-d9b8def2.js";import"./isMobile-e2e89480.js";import"./index-77ae4c49.js";import"./supabaseTableQuery-ebcdd1b8.js";import"./isPlainObject-5638f45d.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"}],j="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 L("music_macharta_videos",a,{...c,updated_at:new Date().toISOString()});return Array.isArray(l)?l:[l]}async function fe(a,c){const l=await L("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,j)}function z(a,c){return te(a,c,j)}async function ye(a){const{TableEngineRequest:c}=await oe(()=>import("./buildSupabaseQuery-32cb26f7.js"),["assets/buildSupabaseQuery-32cb26f7.js","assets/index-185c08ed.js","assets/index-0643191e.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),Ce=s("div",{class:"mb-1 text-sm text-gray-600"},"ترتیب نمایش",-1),Te=s("div",{class:"mb-1 text-sm text-gray-600"},"کد embed *",-1),Ae={class:"flex justify-end"},Re={key:0,class:"space-y-4"},Be={class:"grid gr
|