Files
machartaa_admin_dist/dist/assets/index-ae94f09f.js
T

2 lines
8.9 KiB
JavaScript
Raw Normal View History

2026-07-15 17:50:32 +03:30
import{_ as K}from"./BasicModal.vue_vue_type_style_index_0_lang-59e3a60f.js";import{_ as Q}from"./BasicInput.vue_vue_type_style_index_0_lang-0e70f28c.js";import{u as O,_ as X}from"./useBaseTable-37cc5c4e.js";import{_ as Z}from"./button.vue_vue_type_style_index_0_lang-f45a0e84.js";import{I as k}from"./Icon-1df01939.js";import{t as ee}from"./useDataTime-d0312d21.js";import{v as te}from"./viewersColumns-6b511bec.js";import{_ as ae,G as I,d as se,g as _,E as oe,O as U,o as x,c as y,b as i,w as r,e as q,a as s,j as v,t as E,H as N,k as ie,D as h}from"./index-4ed3ac6f.js";import{g as le,a as ne}from"./itemViews-1098e841.js";import{M as re}from"./index-11cc1aef.js";import{S as ce}from"./index-59052094.js";import{I as de}from"./index-9cf626d0.js";import{T as V}from"./isSymbol-affa2e59.js";import"./usePrice-bc935b83.js";import"./updateLocale-bc84b8d6.js";import"./_plugin-vue_export-helper-63226944.js";import"./vnode-89c9e7cb.js";import"./useState-8f767204.js";import"./index-a14f73db.js";import"./toArray-7ead3702.js";import"./FormItemContext-2461cbab.js";import"./pickAttrs-5db0ba14.js";import"./lodash-93f7118d.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-33c708c4.js";import"./index-634fb851.js";import"./isNumeric-3f69e2aa.js";import"./index-0555c827.js";import"./index-da74a8b6.js";import"./styleChecker-8552d8dc.js";import"./index-23a87c32.js";import"./LeftOutlined-61414320.js";import"./css-aae66f86.js";import"./DialogWrap-576e3f01.js";import"./index-0259cd70.js";import"./isPlainObject-28bd6686.js";const ue=[{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"}],z="music_macharta_video";async function me(a){const{data:c,error:n}=await I.from("music_macharta_videos").insert([a]).select();if(n)throw n;return c}async function _e(a,c){const{data:n,error:l}=await I.from("music_macharta_videos").update({...c,updated_at:new Date().toISOString()}).eq("id",a).select();if(l)throw l;return n}async function ve(a,c){const{data:n,error:l}=await I.from("music_macharta_videos").update({show:c,updated_at:new Date().toISOString()}).eq("id",a).select();if(l)throw l;return n}async function pe(a){const{error:c}=await I.from("music_macharta_videos").delete().eq("id",a);if(c)throw c}function fe(a){return ne(a,z)}function j(a,c){return le(a,c,z)}async function he(a){const{TableEngineRequest:c}=await ae(()=>import("./buildSupabaseQuery-11ebe2fd.js"),["assets/buildSupabaseQuery-11ebe2fd.js","assets/index-4ed3ac6f.js","assets/index-338b63e2.css","assets/supabaseTableQuery-9069679c.js"]),n={...a};!n.sort&&!n.order&&(n.sort={key:"sort_order",order:"desc"});const l=await c(n,"music_macharta_videos");try{if(Array.isArray(l==null?void 0:l.rows)){const g=n.page||1,p=n.limit||20,w=(g-1)*p,b=l.rows.map((u,m)=>({...u,title:u.title??"",embed_code:u.embed_code??"",show:u.show??!0,sort_order:u.sort_order??0,index:w+m}));return{...l,rows:b}}}catch(g){console.error("[getMusicMachartaVideosTable]",g)}return l}const we={class:"h-full"},be={class:"gap-2 flex justify-center"},ge=s("span",null,"بازدیدها",-1),xe=s("span",null,"حذف",-1),ye=s("span",null,"ویرایش",-1),ke={class:"space-y-4"},Ve=s("div",{class:"mb-1 text-sm text-gray-600"},"عنوان *",-1),Ie=s("div",{class:"mb-1 text-sm text-gray-600"},"ترتیب نمایش",-1),Me=s("div",{class:"mb-1 text-sm text-gray-600"},"کد embed *",-1),Te={class:"flex justify-end"},Ce={key:0,class:"space-y-4"},Ee={class:"grid grid-cols-2 gap-4"},Be={class:"bg-blue-50 p-4 rounded-lg"},De