2 lines
9.0 KiB
JavaScript
2 lines
9.0 KiB
JavaScript
import{_ as Y}from"./BasicModal.vue_vue_type_style_index_0_lang-c3017354.js";import{_ as Q}from"./BasicInput.vue_vue_type_style_index_0_lang-5a31e25c.js";import{u as $,_ as X}from"./useBaseTable-6d1e031d.js";import{_ as Z}from"./button.vue_vue_type_style_index_0_lang-29638cb6.js";import{I as k}from"./Icon-c8a211f1.js";import{t as ee}from"./useDataTime-4239bab9.js";import{g as te,a as ae,v as se}from"./itemViews-ab7054bf.js";import{_ as oe,H as ie,I as z,J as le,d as ne,i as _,G 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,E as h}from"./index-a28be152.js";import{M as de}from"./index-8cc4eae2.js";import{S as ue}from"./index-dd708aca.js";import{I as me}from"./index-f317ca53.js";import{T as V}from"./isSymbol-25ca88cb.js";import"./usePrice-bc935b83.js";import"./updateLocale-619fe8a7.js";import"./index-3bdda65d.js";import"./_plugin-vue_export-helper-f8ecc290.js";import"./shallowequal-4c00a664.js";import"./vnode-4742fc96.js";import"./useState-277534ff.js";import"./useMemo-832cfde0.js";import"./FormItemContext-e50ee5a3.js";import"./omit-8084e33b.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-5222fc6e.js";import"./index-1e365e2e.js";import"./styleChecker-8c6ff79a.js";import"./index-12d303fc.js";import"./index-4a3fe357.js";import"./DialogWrap-617bda84.js";import"./pickAttrs-38902005.js";import"./css-aae66f86.js";import"./index-2849b35f.js";import"./toArray-bdec6b87.js";import"./SearchOutlined-4a5562a8.js";import"./isMobile-e2e89480.js";import"./index-f3f71242.js";import"./supabaseTableQuery-e3d032a9.js";import"./isPlainObject-450bf3c7.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-7d0fcf16.js"),["assets/buildSupabaseQuery-7d0fcf16.js","assets/index-a28be152.js","assets/index-d7456b90.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"},Ee={class:"grid grid-co
|