2026-08-22 13:27:44 +03:30
|
|
|
import{_ as ve}from"./BasicModal.vue_vue_type_style_index_0_lang-7cc4ab5d.js";import{_ as _e}from"./BasicInput.vue_vue_type_style_index_0_lang-ebcbbe1b.js";import{u as H,_ as fe}from"./useBaseTable-01dc558f.js";import{_ as he}from"./button.vue_vue_type_style_index_0_lang-86273660.js";import{I as S}from"./Icon-cc126d0d.js";import{t as ge}from"./useDataTime-5a09f654.js";import{g as we,a as xe,v as ye}from"./itemViews-55ee3956.js";import{_ as be,G as ke,H as ee,I as Me,d as Ae,g as v,E as Ie,T as W,o as A,c as I,b as o,w as m,e as J,a as s,j as x,t as O,J as X,k as V,D as h,K as G}from"./index-d718011e.js";import{g as B}from"./convert-2ad76038.js";import{g as K}from"./index-18640d9e.js";import{M as Ce}from"./index-eb860757.js";import{S as Y}from"./index-5ade1644.js";import{T as E}from"./isSymbol-e219d64b.js";import{U as Q}from"./index-c895ada9.js";import"./usePrice-bc935b83.js";import"./index-ba4d9879.js";import"./SearchOutlined-31f9ef0b.js";import"./omit-86fc1094.js";import"./vnode-0b482026.js";import"./FormItemContext-6bb05345.js";import"./index-12b8b726.js";import"./_plugin-vue_export-helper-0ed48b96.js";import"./isPlainObject-63126d02.js";import"./index-7eae579c.js";import"./updateLocale-dac04afb.js";import"./shallowequal-c9e151d3.js";import"./useState-d226846a.js";import"./useMemo-9e09b0c8.js";import"./lodash-02d12c59.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-e23cf95b.js";import"./index-cbb71dc1.js";import"./Badge-bf61afe1.js";import"./isNumeric-3f69e2aa.js";import"./index-9747fd4d.js";import"./index-6fc61bbd.js";import"./styleChecker-351d08aa.js";import"./index-59898946.js";import"./index-5b828516.js";import"./DialogWrap-944b6cdf.js";import"./pickAttrs-49bc9c67.js";import"./css-aae66f86.js";import"./index-4e5c2990.js";import"./toArray-02b8a08a.js";import"./isMobile-e2e89480.js";import"./index-7a44352f.js";import"./supabaseTableQuery-bada93b0.js";import"./index-7a1bd658.js";import"./_flatRest-e8ea393e.js";import"./Col-7aad654b.js";import"./index-a2e0d559.js";import"./useRefs-373e2aeb.js";const Te=[{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 p=l.record.time||{minutes:0,seconds:0},r=String(p.minutes??0).padStart(2,"0"),g=String(p.seconds??0).padStart(2,"0");return`${r}:${g}`}},{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=>ge(l.record.created_at)},{title:"عملیات",dataIndex:"action",key:"action",slot:"action",filterable:!1,align:"center"}],te="music_macharta_audio";async function Ue(l){const p=await ke("music_macharta_audios",l);return Array.isArray(p)?p:[p]}async function Re(l,p){const r=await ee("music_macharta_audios",l,{...p,updated_at:new Date().toISOString()});return Array.isArray(r)?r:[r]}async function De(l,p){const r=await ee("music_macharta_audios",l,{show:p,updated_at:new Date().toISOString()});return Array.isArray(r)?r:[r]}async function Se(l){await Me("music_macharta_audios",l)}function $e(l){return xe(l,te)}function Z(l,p){return we(l,p,te)}async function Le(l){const{TableEngineRequest:p}=await be(()=>import("./buildSupabaseQuery-ad024d1e.js"),["assets/buildSupabaseQuery-ad024d1e.js","assets/index-d718011e.js","assets/index-a54d32f7.css"]),r={...l};!r.sort&&!r.order&&(r.sort={key:"sort_order",order:"desc"});const g=await p(r,"music_macharta_audios");try{if(Array.isArray(g==null?void 0:g.rows)){const y=r.page||1,T=r.limit||20,U=(y-1)*T,C=g.rows.map((c,$)=>({...c,title:c.title??"",sub_title:c.sub_title??"",cover:c.cover??null,src:c.src??null,time:c.time??{minutes:0,seconds:0},show:c.show??!0,sort_order:c.sort_order??0
|