Files
machartaa_admin_dist/dist/assets/index-e50d711a.js
T

2 lines
14 KiB
JavaScript
Raw Normal View History

2026-10-14 16:25:33 +03:30
import{_ as ve}from"./BasicModal.vue_vue_type_style_index_0_lang-c75cb8ba.js";import{_ as _e}from"./BasicInput.vue_vue_type_style_index_0_lang-eec084de.js";import{u as H,_ as fe}from"./useBaseTable-dfbf3762.js";import{_ as he}from"./button.vue_vue_type_style_index_0_lang-5dd5fad9.js";import{I as D}from"./Icon-0c593d03.js";import{t as ge}from"./useDataTime-9987a66e.js";import{g as we,a as xe,v as ye}from"./itemViews-834715dd.js";import{_ as be,I as ke,J as ee,K as Me,d as Ae,i as v,z as Ie,B as W,o as A,c as I,e as o,w as m,f as J,b as s,l as x,t as O,L as X,n as V,H as h,M as K}from"./index-a94f140f.js";import{g as B}from"./convert-2ad76038.js";import{g as Y}from"./index-396f8cde.js";import{M as Ce}from"./index-cadfe89f.js";import{S as G}from"./index-a08f6658.js";import{T as P}from"./isSymbol-0faad147.js";import{U as Q}from"./index-b2be5cd6.js";import"./usePrice-bc935b83.js";import"./index-9bf19e54.js";import"./SearchOutlined-2c05f948.js";import"./omit-09913e6a.js";import"./vnode-d8d89b8b.js";import"./FormItemContext-d446a85f.js";import"./index-da3c4531.js";import"./_plugin-vue_export-helper-3751a4c9.js";import"./isPlainObject-fa7524bd.js";import"./index-d139af20.js";import"./updateLocale-63da7352.js";import"./shallowequal-311bf7d9.js";import"./useState-75e49d81.js";import"./useMemo-e6667500.js";import"./lodash-b667f7ec.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-988f9693.js";import"./index-94f097c0.js";import"./Badge-64556311.js";import"./isNumeric-3f69e2aa.js";import"./index-a10a5cee.js";import"./index-02db9106.js";import"./styleChecker-cbf8a3c6.js";import"./index-6838bdc5.js";import"./index-fa5a0887.js";import"./DialogWrap-1f925fe5.js";import"./pickAttrs-d12003ac.js";import"./css-aae66f86.js";import"./index-1e5db048.js";import"./toArray-3323d384.js";import"./isMobile-e2e89480.js";import"./index-f9445381.js";import"./supabaseTableQuery-9d743a53.js";import"./index-12b232e8.js";import"./_flatRest-38d88d03.js";import"./Col-098f825e.js";import"./index-00238e03.js";import"./useRefs-14e054ef.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 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-7024d485.js"),["assets/buildSupabaseQuery-7024d485.js","assets/index-a94f140f.js","assets/index-ceed3b68.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