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

2 lines
14 KiB
JavaScript
Raw Normal View History

2026-08-15 17:53:12 +03:30
import{_ as vt}from"./BasicModal.vue_vue_type_style_index_0_lang-7803828f.js";import{_ as _t}from"./BasicInput.vue_vue_type_style_index_0_lang-0a352870.js";import{u as W,_ as ft}from"./useBaseTable-e4bbf0da.js";import{_ as ht}from"./button.vue_vue_type_style_index_0_lang-99dfcd06.js";import{I as D}from"./Icon-c9ad16b9.js";import{t as gt}from"./useDataTime-5442c624.js";import{v as wt}from"./viewersColumns-f65e8a12.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-bc4edd51.js";import{g as kt,a as Mt}from"./itemViews-6e427b1e.js";import{g as B}from"./convert-2ad76038.js";import{g as Y}from"./index-edd68561.js";import{M as It}from"./index-609e9a96.js";import{S as K}from"./index-d4870df7.js";import{T as E}from"./isSymbol-f9834f4f.js";import{U as Z}from"./index-368498f7.js";import"./usePrice-bc935b83.js";import"./index-49e2e544.js";import"./SearchOutlined-4504ec77.js";import"./omit-6f60253b.js";import"./vnode-f2307909.js";import"./FormItemContext-4e017a44.js";import"./index-9df7eaa1.js";import"./_plugin-vue_export-helper-c8347567.js";import"./isPlainObject-ed8996b4.js";import"./index-1d49b36b.js";import"./updateLocale-7b0be7e3.js";import"./index-bc659f42.js";import"./shallowequal-cad00b6e.js";import"./useState-47ff4833.js";import"./useMemo-8275a234.js";import"./lodash-3efc1909.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-9775c8a5.js";import"./index-5ea3cefd.js";import"./Badge-627fd6d3.js";import"./isNumeric-3f69e2aa.js";import"./index-34768277.js";import"./index-4e41e7b6.js";import"./styleChecker-bc667521.js";import"./index-393b875d.js";import"./index-47b6ba8f.js";import"./DialogWrap-f12e49af.js";import"./pickAttrs-1c46cfba.js";import"./css-aae66f86.js";import"./index-727535d5.js";import"./toArray-b01cb1f9.js";import"./isMobile-e2e89480.js";import"./index-ae018072.js";import"./index-3aafac3f.js";import"./index-6d8a75c0.js";import"./_flatRest-9adb1e9a.js";import"./Col-96f7f23f.js";import"./index-60d2bcc6.js";import"./useRefs-225197bd.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-e64be55f.js"),["assets/buildSupabaseQuery-e64be55f.js","assets/index-bc4edd51.js","assets/index-c30c691c.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.r