2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
import{_ as vt}from"./BasicModal.vue_vue_type_style_index_0_lang-381c939b.js";import{_ as _t}from"./BasicInput.vue_vue_type_style_index_0_lang-44a75d74.js";import{u as W,_ as ft}from"./useBaseTable-6b0100f9.js";import{_ as ht}from"./button.vue_vue_type_style_index_0_lang-055ef55a.js";import{I as D}from"./Icon-e2745237.js";import{t as gt}from"./useDataTime-61faf9b9.js";import{v as wt}from"./viewersColumns-a8a8307e.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-74df3455.js";import{g as kt,a as Mt}from"./itemViews-8aa88257.js";import{g as B}from"./convert-2ad76038.js";import{g as Y}from"./index-82edf946.js";import{M as It}from"./index-65da5dac.js";import{S as K}from"./index-83319668.js";import{T as E}from"./isSymbol-62e97e43.js";import{U as Z}from"./index-90b890a0.js";import"./usePrice-bc935b83.js";import"./index-ec36d435.js";import"./SearchOutlined-8f5d71bf.js";import"./omit-763d2c81.js";import"./vnode-b6bcf78e.js";import"./FormItemContext-6413b4c6.js";import"./index-efd9ee2a.js";import"./_plugin-vue_export-helper-37aa05ea.js";import"./isPlainObject-4825706c.js";import"./index-efc8d329.js";import"./updateLocale-5b0fd44f.js";import"./index-bc659f42.js";import"./shallowequal-299ad79c.js";import"./useState-2abd0489.js";import"./useMemo-a5bf3ddc.js";import"./lodash-6f7438f2.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-d8bae45c.js";import"./index-6a94b684.js";import"./Badge-be9a4aa1.js";import"./isNumeric-3f69e2aa.js";import"./index-7ea4c0f8.js";import"./index-5ea23f62.js";import"./styleChecker-4c9a1b23.js";import"./index-d81adf35.js";import"./index-ee58981c.js";import"./DialogWrap-93c13aef.js";import"./pickAttrs-e0ea06b2.js";import"./css-aae66f86.js";import"./index-043ef8cd.js";import"./toArray-5920af1b.js";import"./isMobile-e2e89480.js";import"./index-0f51a503.js";import"./index-9a2fbb01.js";import"./_flatRest-899894ad.js";import"./Col-7df1a821.js";import"./index-4e077a6e.js";import"./useRefs-d90adc8f.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-d27c17fb.js"),["assets/buildSupabaseQuery-d27c17fb.js","assets/index-74df3455.js","assets/index-159b4110.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.
|