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

2 lines
14 KiB
JavaScript
Raw Normal View History

2026-08-19 11:15:51 +03:30
import{_ as vt}from"./BasicModal.vue_vue_type_style_index_0_lang-31a77bff.js";import{_ as _t}from"./BasicInput.vue_vue_type_style_index_0_lang-16fb135f.js";import{u as W,_ as ft}from"./useBaseTable-53dd99af.js";import{_ as ht}from"./button.vue_vue_type_style_index_0_lang-bfd9fcfc.js";import{I as D}from"./Icon-49e380f5.js";import{t as gt}from"./useDataTime-3763aaa9.js";import{v as wt}from"./viewersColumns-5b442494.js";import{_ as xt,G as P,d as bt,g as _,E as yt,Q as J,o as I,c as C,b as i,w as p,e as X,a as s,j as x,t as q,H as G,k as V,D as g,I as Q}from"./index-bfe458ac.js";import{g as kt,a as Mt}from"./itemViews-338dd8ac.js";import{g as B}from"./convert-2ad76038.js";import{g as Y}from"./index-32a06c2d.js";import{M as It}from"./index-30f4723a.js";import{S as K}from"./index-a231d930.js";import{T as E}from"./isSymbol-0bccfc01.js";import{U as Z}from"./index-3c17cc81.js";import"./usePrice-bc935b83.js";import"./index-3a7846ee.js";import"./SearchOutlined-2adda210.js";import"./omit-31473f11.js";import"./vnode-d4498b2d.js";import"./FormItemContext-50ffb9a1.js";import"./index-866ab3cc.js";import"./_plugin-vue_export-helper-67599eab.js";import"./isPlainObject-d0372073.js";import"./index-d162d812.js";import"./updateLocale-01f6a4ae.js";import"./index-bc659f42.js";import"./shallowequal-58ae19a4.js";import"./useState-28dabf70.js";import"./useMemo-c07be216.js";import"./lodash-6ccdc7c6.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-5abef7b1.js";import"./index-24b7e322.js";import"./Badge-2d408009.js";import"./isNumeric-3f69e2aa.js";import"./index-231f7c05.js";import"./index-f9fac6a3.js";import"./styleChecker-8e2e8c57.js";import"./index-78c7f5e8.js";import"./index-d6fc1ec7.js";import"./DialogWrap-f94b796f.js";import"./pickAttrs-c1604177.js";import"./css-aae66f86.js";import"./index-d61dbb2f.js";import"./toArray-54bd8d35.js";import"./isMobile-e2e89480.js";import"./index-d3413392.js";import"./index-42759bd8.js";import"./_flatRest-e19970cd.js";import"./Col-37dd3be5.js";import"./index-7bc50da0.js";import"./useRefs-7ed7974b.js";const Ct=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:l=>l.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"زیرعنوان",dataIndex:"sub_title",key:"sub_title"},{title:"زمان",dataIndex:"time",key:"time",customRender:l=>{const m=l.record.time||{minutes:0,seconds:0},r=String(m.minutes??0).padStart(2,"0"),v=String(m.seconds??0).padStart(2,"0");return`${r}:${v}`}},{title:"صوت",dataIndex:"src",key:"src",customRender:l=>l.record.src?"دارد":"-"},{title:"ترتیب",dataIndex:"sort_order",key:"sort_order",align:"center"},{title:"نمایش",dataIndex:"show",key:"show",align:"center",customRender:l=>l.record.show===!1?"مخفی":"نمایش"},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:l=>gt(l.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}],et="music_macharta_audio";async function Tt(l){const{data:m,error:r}=await P.from("music_macharta_audios").insert([l]).select();if(r)throw r;return m}async function Ut(l,m){const{data:r,error:v}=await P.from("music_macharta_audios").update({...m,updated_at:new Date().toISOString()}).eq("id",l).select();if(v)throw v;return r}async function At(l,m){const{data:r,error:v}=await P.from("music_macharta_audios").update({show:m,updated_at:new Date().toISOString()}).eq("id",l).select();if(v)throw v;return r}async function Rt(l){const{error:m}=await P.from("music_macharta_audios").delete().eq("id",l);if(m)throw m}function St(l){return Mt(l,et)}function tt(l,m){return kt(l,m,et)}async function Dt(l){const{TableEngineRequest:m}=await xt(()=>import("./buildSupabaseQuery-8476cba9.js"),["assets/buildSupabaseQuery-8476cba9.js","assets/index-bfe458ac.js","assets/index-a54d32f7.css","assets/supabaseTableQuery-8ab5665d.js"]),r={...l};!r.sort&&!r.order&&(r.sort={key:"sort_order",order:"desc"});const v=await m(r,"music_macharta_audios");try{if(Array.isArray(v==null?void 0:v.rows)){const b=r.page||1,U=r.