Files
machartaa_admin_dist/dist/assets/index-4c7d21c8.js
T

2 lines
17 KiB
JavaScript
Raw Normal View History

2026-10-14 16:25:33 +03:30
import{_ as ce}from"./BasicMainCard-104c14b2.js";import{_ as de}from"./BasicModal.vue_vue_type_style_index_0_lang-c75cb8ba.js";import{_ as pe}from"./BasicTextArea.vue_vue_type_style_index_0_lang-75f57b2d.js";import{_ as me}from"./BasicInput.vue_vue_type_style_index_0_lang-eec084de.js";import{_ as _e,u as ve}from"./useBaseTable-dfbf3762.js";import{_ as fe}from"./button.vue_vue_type_style_index_0_lang-5dd5fad9.js";import{_ as ge,I as he,J as xe,K as ye,d as be,i as x,E as we,x as ke,o as $,c as I,e as c,w as y,b as t,f as Ce,L as Ue,l as B,n as R,C as j,t as J,F as Me,q as $e,H as P,M as X}from"./index-a94f140f.js";import{t as Ie}from"./useDataTime-9987a66e.js";import{I as A}from"./Icon-0c593d03.js";import{e as T,g as N}from"./convert-2ad76038.js";import{_ as Le}from"./TextPreview.vue_vue_type_script_setup_true_lang-0697c916.js";import{M as De}from"./index-cadfe89f.js";import{T as G}from"./isSymbol-0faad147.js";import{S as Se}from"./index-a08f6658.js";import{U as W}from"./index-b2be5cd6.js";import"./Grid-33e7139e.js";import"./index-e5d8b47c.js";import"./_plugin-vue_export-helper-3751a4c9.js";import"./shallowequal-311bf7d9.js";import"./index-fa5a0887.js";import"./vnode-d8d89b8b.js";import"./index-d139af20.js";import"./useState-75e49d81.js";import"./useRefs-14e054ef.js";import"./_flatRest-38d88d03.js";import"./isMobile-e2e89480.js";import"./omit-09913e6a.js";import"./index-53e81bb5.js";import"./Col-098f825e.js";import"./styleChecker-cbf8a3c6.js";import"./isPlainObject-fa7524bd.js";import"./index-9bf19e54.js";import"./SearchOutlined-2c05f948.js";import"./FormItemContext-d446a85f.js";import"./index-da3c4531.js";import"./usePrice-bc935b83.js";import"./updateLocale-63da7352.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"./index-6838bdc5.js";import"./DialogWrap-1f925fe5.js";import"./pickAttrs-d12003ac.js";import"./css-aae66f86.js";import"./index-1e5db048.js";import"./toArray-3323d384.js";import"./index-f9445381.js";import"./textUtils-c37780ad.js";import"./index-12b232e8.js";import"./index-00238e03.js";async function Pe(p){const m={title:p.title,description:p.description,owner_id:p.owner_id,minute:p.minute,score:p.score,image_url:p.image_url||null,clip_url:p.clip_url||null,steps:p.steps||[]},_=await he("challenge",m);return Array.isArray(_)?_:[_]}async function Te(p,m){const _=await xe("challenge",p,{title:m.title,description:m.description,owner_id:m.owner_id,minute:m.minute,score:m.score,image_url:m.image_url||null,clip_url:m.clip_url||null,steps:m.steps||[]});return Array.isArray(_)?_:[_]}async function Be(p){await ye("challenge",p)}async function Re(p){const{TableEngineRequest:m}=await ge(()=>import("./buildSupabaseQuery-7024d485.js"),["assets/buildSupabaseQuery-7024d485.js","assets/index-a94f140f.js","assets/index-ceed3b68.css"]),_={...p};!_.sort&&!_.order&&(_.order="-id");const k=await m(_,"challenge");try{if(Array.isArray(k==null?void 0:k.rows)){const C=_.page||1,b=_.limit||200,L=(C-1)*b,g=k.rows.map((v,M)=>({id:v.id,title:v.title??"",description:v.description??"",steps:v.steps??[],created_at:v.created_at??"",index:L+M,...v}));return{...k,rows:g}}}catch(C){console.log("[getChallengeTable] normalize error:",C)}return k}const Ae=[{title:"ردیف",dataIndex:"id",key:"id",filterable:!1,width:70,align:"center",customRender:p=>p.record.index+1},{title:"عنوان",dataIndex:"title",key:"title"},{title:"شرح",dataIndex:"description",key:"description",slot:"description"},{title:"مراحل",dataIndex:"steps",key:"steps",customRender:p=>{const m=p.record.steps||[];if(m.length===0)return"-";const _=m.reduce((C,b)=>C+(Number(b.minute)||0),0),k=m.reduce((C,b)=>C+(Number(b.score)||0),0);return`${m.length} مرحله / ${_} دقیقه / ${k} امتیاز`}},{title:"زمان ایجاد",dataIndex:"created_at",key:"created_at",customRender:p=>Ie(p.record.created_at)},{title:"عملیات",dataIndex:"actio