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

2 lines
14 KiB
JavaScript
Raw Normal View History

2026-08-20 17:26:16 +03:30
import{_ as ve}from"./BasicModal.vue_vue_type_style_index_0_lang-ca4aa0a6.js";import{_ as _e}from"./BasicInput.vue_vue_type_style_index_0_lang-7718018f.js";import{u as W,_ as fe}from"./useBaseTable-8eb27015.js";import{_ as he}from"./button.vue_vue_type_style_index_0_lang-b7b1a519.js";import{I as D}from"./Icon-82f6c95b.js";import{t as ge}from"./useDataTime-785ab201.js";import{v as we}from"./viewersColumns-5cf0e230.js";import{_ as xe,G as P,d as be,g as _,E as ye,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-b279599b.js";import{g as ke,a as Me}from"./itemViews-ac0575fd.js";import{g as B}from"./convert-2ad76038.js";import{g as Y}from"./index-f0a024ec.js";import{M as Ie}from"./index-9c450bf9.js";import{S as K}from"./index-86478c3f.js";import{T as E}from"./isSymbol-4b8c1f3e.js";import{U as Z}from"./index-98405404.js";import"./usePrice-bc935b83.js";import"./index-e626bdbb.js";import"./SearchOutlined-3414d521.js";import"./omit-4c59a877.js";import"./vnode-cc30a5f9.js";import"./FormItemContext-a76fbf7e.js";import"./index-9879659d.js";import"./_plugin-vue_export-helper-f38a7ea6.js";import"./isPlainObject-093495b2.js";import"./index-cce68701.js";import"./updateLocale-1fd95539.js";import"./index-bc659f42.js";import"./shallowequal-59da3a36.js";import"./useState-588c2312.js";import"./useMemo-39d0bfae.js";import"./lodash-98c01373.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-62e181b5.js";import"./index-7dd4f08a.js";import"./Badge-2dd91e64.js";import"./isNumeric-3f69e2aa.js";import"./index-cb1dea06.js";import"./index-076900a0.js";import"./styleChecker-e8fc6c1f.js";import"./index-624f47cc.js";import"./index-5f5b359c.js";import"./DialogWrap-a7021269.js";import"./pickAttrs-7db0f563.js";import"./css-aae66f86.js";import"./index-6707c586.js";import"./toArray-b7e6b8ed.js";import"./isMobile-e2e89480.js";import"./index-2f258009.js";import"./index-1fd3daba.js";import"./_flatRest-cb9a1464.js";import"./Col-c7dcaed0.js";import"./index-de855912.js";import"./useRefs-72c4a0da.js";const Ce=[{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=>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{data:m,error:r}=await P.from("music_macharta_audios").insert([l]).select();if(r)throw r;return m}async function Ue(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 Ae(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 Re(l){const{error:m}=await P.from("music_macharta_audios").delete().eq("id",l);if(m)throw m}function Se(l){return Me(l,te)}function ee(l,m){return ke(l,m,te)}async function De(l){const{TableEngineRequest:m}=await xe(()=>import("./buildSupabaseQuery-7cbfb50c.js"),["assets/buildSupabaseQuery-7cbfb50c.js","assets/index-b279599b.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.