Files

2 lines
14 KiB
JavaScript
Raw Permalink Normal View History

2026-10-20 16:52:05 +03:30
import{_ as ve}from"./BasicModal.vue_vue_type_style_index_0_lang-aed8f5e4.js";import{_ as _e}from"./BasicInput.vue_vue_type_style_index_0_lang-e6a4e582.js";import{u as H,_ as fe}from"./useBaseTable-e7a67916.js";import{_ as he}from"./button.vue_vue_type_style_index_0_lang-f90e25b2.js";import{I as D}from"./Icon-29e38d16.js";import{t as ge}from"./useDataTime-6e234adb.js";import{g as we,a as xe,v as ye}from"./itemViews-9a58c947.js";import{_ as be,O as ke,P as ee,Q as Me,d as Ae,i as v,z as Ce,B as W,o as A,c as C,e as o,w as m,f as J,b as s,l as x,t as O,R as X,n as V,H as h,S as Q}from"./index-1ba0f9ec.js";import{g as B}from"./convert-2ad76038.js";import{g as Y}from"./index-c4537a3b.js";import{M as Ie}from"./index-ec322234.js";import{S as G}from"./index-4bff02a6.js";import{T as P}from"./isSymbol-355a1404.js";import{U as K}from"./index-f4084f09.js";import"./usePrice-bc935b83.js";import"./index-aafc0fe2.js";import"./SearchOutlined-95278fe5.js";import"./omit-f5d28cd3.js";import"./vnode-c4e67237.js";import"./FormItemContext-33ef1221.js";import"./index-8f2b7e91.js";import"./_plugin-vue_export-helper-31e07528.js";import"./isPlainObject-e945bc1f.js";import"./index-73cafb1e.js";import"./updateLocale-a8654270.js";import"./shallowequal-e0d9eafb.js";import"./useState-dcd360f8.js";import"./useMemo-ee45fb46.js";import"./lodash-27f814e6.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-36a1ea6e.js";import"./index-c8127d4e.js";import"./Badge-8a8eeb58.js";import"./isNumeric-3f69e2aa.js";import"./index-a8579634.js";import"./index-e22339b6.js";import"./styleChecker-19ce40ea.js";import"./index-876da578.js";import"./index-3f6d5caa.js";import"./LeftOutlined-93011b30.js";import"./css-aae66f86.js";import"./DialogWrap-394d7eb0.js";import"./pickAttrs-0ddf9a54.js";import"./index-e0664925.js";import"./toArray-41940180.js";import"./isMobile-e2e89480.js";import"./index-175b83cf.js";import"./supabaseTableQuery-e0472e9c.js";import"./index-83b891e2.js";import"./_flatRest-7877cdf8.js";import"./Col-f8806a10.js";import"./index-65e13d19.js";import"./useRefs-5e33302c.js";const Re=[{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 Te(l){const p=await ke("music_macharta_audios",l);return Array.isArray(p)?p:[p]}async function Ue(l,p){const r=await ee("music_macharta_audios",l,{...p,updated_at:new Date().toISOString()});return Array.isArray(r)?r:[r]}async function Se(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 De(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-2323f568.js"),["assets/buildSupabaseQuery-2323f568.js","assets/index-1ba0f9ec.js","assets/index-cb402307.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,R=r.limit||20,T=(y-1)*R,I=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.