2026-08-23 17:45:14 +03:30
|
|
|
import{_ as Y}from"./BasicModal.vue_vue_type_style_index_0_lang-19f7e884.js";import{_ as Q}from"./BasicInput.vue_vue_type_style_index_0_lang-f42b6616.js";import{u as $,_ as X}from"./useBaseTable-b54f1011.js";import{_ as Z}from"./button.vue_vue_type_style_index_0_lang-573c8178.js";import{I as k}from"./Icon-51292ba8.js";import{t as ee}from"./useDataTime-ba303e4c.js";import{g as te,a as ae,v as se}from"./itemViews-ff4b2539.js";import{_ as oe,H as ie,I as z,J as le,d as ne,i as _,y as re,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,K as N,n as ce,G as h}from"./index-85b0a871.js";import{M as de}from"./index-8e461858.js";import{S as ue}from"./index-0bc12b2b.js";import{I as me}from"./index-a4749a4e.js";import{T as V}from"./isSymbol-f096d1f3.js";import"./usePrice-bc935b83.js";import"./updateLocale-e1269d0e.js";import"./index-0ad3a6e0.js";import"./_plugin-vue_export-helper-7166b54f.js";import"./shallowequal-f73ccac4.js";import"./vnode-67298ed6.js";import"./useState-dca0eb62.js";import"./useMemo-2d8f0e33.js";import"./FormItemContext-c3e7c21a.js";import"./omit-6e71f361.js";import"./lodash-a94f6ca6.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-9242d002.js";import"./index-a4228ed0.js";import"./Badge-6e22b582.js";import"./isNumeric-3f69e2aa.js";import"./index-f833d7e1.js";import"./index-d729d8f3.js";import"./index-378e150b.js";import"./styleChecker-700d5c9b.js";import"./index-13a23e48.js";import"./index-4f2f7002.js";import"./DialogWrap-31c1c17a.js";import"./pickAttrs-b5c2621e.js";import"./css-aae66f86.js";import"./index-1e0c5a9f.js";import"./toArray-ede1f933.js";import"./SearchOutlined-2119418f.js";import"./isMobile-e2e89480.js";import"./index-f07edbcd.js";import"./supabaseTableQuery-c1fc4a72.js";import"./isPlainObject-3b96d88c.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-892fb39b.js"),["assets/buildSupabaseQuery-892fb39b.js","assets/index-85b0a871.js","assets/index-82ea5f16.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 grid-co
|