Files
machartaa_admin_dist/dist/assets/index-2d894b30.js
T

2 lines
14 KiB
JavaScript
Raw Normal View History

2026-08-18 16:19:11 +03:30
import{_ as vt}from"./BasicModal.vue_vue_type_style_index_0_lang-4b1d1ef5.js";import{_ as _t}from"./BasicInput.vue_vue_type_style_index_0_lang-f043e831.js";import{u as W,_ as ft}from"./useBaseTable-f8894810.js";import{_ as ht}from"./button.vue_vue_type_style_index_0_lang-bc3a48f6.js";import{I as D}from"./Icon-767d2866.js";import{t as gt}from"./useDataTime-4be5c5cf.js";import{v as wt}from"./viewersColumns-5f0e8f19.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-24cdd011.js";import{g as kt,a as Mt}from"./itemViews-61d4be50.js";import{g as B}from"./convert-2ad76038.js";import{g as Y}from"./index-1ace681c.js";import{M as It}from"./index-5eb1b262.js";import{S as K}from"./index-d68d1b34.js";import{T as E}from"./isSymbol-e7ce9b5a.js";import{U as Z}from"./index-5477dee9.js";import"./usePrice-bc935b83.js";import"./index-942dc2ed.js";import"./SearchOutlined-3570b8ac.js";import"./omit-08db5ef5.js";import"./vnode-562ae89f.js";import"./FormItemContext-a07e1be1.js";import"./index-cbf3fafb.js";import"./_plugin-vue_export-helper-06d65383.js";import"./isPlainObject-25081d35.js";import"./index-fec9c5bc.js";import"./updateLocale-58c30845.js";import"./index-bc659f42.js";import"./shallowequal-59945f6f.js";import"./useState-bb6abd58.js";import"./useMemo-5fb6706d.js";import"./lodash-3126ec34.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-5acaa0f7.js";import"./index-3078e65c.js";import"./Badge-aa4916ac.js";import"./isNumeric-3f69e2aa.js";import"./index-38d9344c.js";import"./index-39621559.js";import"./styleChecker-aeb3f501.js";import"./index-093e137a.js";import"./index-4057f476.js";import"./DialogWrap-4e2453b1.js";import"./pickAttrs-64381c06.js";import"./css-aae66f86.js";import"./index-0ceac0d6.js";import"./toArray-e3c28da8.js";import"./isMobile-e2e89480.js";import"./index-559e3814.js";import"./index-3867b2dc.js";import"./_flatRest-28f96ed6.js";import"./Col-8ec8a751.js";import"./index-9df579ce.js";import"./useRefs-2bd76cbf.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-856791d4.js"),["assets/buildSupabaseQuery-856791d4.js","assets/index-24cdd011.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.