Files
machartaa_admin_dist/dist/assets/index-747d1aaa.js
T

2 lines
14 KiB
JavaScript
Raw Normal View History

2026-08-20 11:30:22 +03:30
import{_ as vt}from"./BasicModal.vue_vue_type_style_index_0_lang-12600cfe.js";import{_ as _t}from"./BasicInput.vue_vue_type_style_index_0_lang-1dcca595.js";import{u as W,_ as ft}from"./useBaseTable-09dec183.js";import{_ as ht}from"./button.vue_vue_type_style_index_0_lang-485aa400.js";import{I as D}from"./Icon-b61699b8.js";import{t as gt}from"./useDataTime-c34f53fe.js";import{v as wt}from"./viewersColumns-2b2088e2.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-5a216054.js";import{g as kt,a as Mt}from"./itemViews-1d89b22f.js";import{g as B}from"./convert-2ad76038.js";import{g as Y}from"./index-4e7d1e3d.js";import{M as It}from"./index-21b3e11b.js";import{S as K}from"./index-efc9438a.js";import{T as E}from"./isSymbol-67342ebb.js";import{U as Z}from"./index-1dde6b67.js";import"./usePrice-bc935b83.js";import"./index-f7d24d7c.js";import"./SearchOutlined-4a9dd4f9.js";import"./omit-0e04d816.js";import"./vnode-4ae36afb.js";import"./FormItemContext-c093a4c8.js";import"./index-35a2fbcb.js";import"./_plugin-vue_export-helper-bf156267.js";import"./isPlainObject-3c9a77e7.js";import"./index-70ec4858.js";import"./updateLocale-67e6a89b.js";import"./index-bc659f42.js";import"./shallowequal-9390c690.js";import"./useState-aaca7c53.js";import"./useMemo-f3fe2319.js";import"./lodash-724580df.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-5d13f90f.js";import"./index-7e28a3d1.js";import"./Badge-f954f9ce.js";import"./isNumeric-3f69e2aa.js";import"./index-16772af6.js";import"./index-fe5d35f1.js";import"./styleChecker-559f6f42.js";import"./index-8a5836b4.js";import"./index-99d6fd3f.js";import"./DialogWrap-104be95a.js";import"./pickAttrs-ca601ed4.js";import"./css-aae66f86.js";import"./index-14d22686.js";import"./toArray-6764992d.js";import"./isMobile-e2e89480.js";import"./index-89aa8d2e.js";import"./index-d9ae5dff.js";import"./_flatRest-65586b5d.js";import"./Col-a3540e0e.js";import"./index-8c21a425.js";import"./useRefs-88e72f09.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-4a0e50c6.js"),["assets/buildSupabaseQuery-4a0e50c6.js","assets/index-5a216054.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.