Files
machartaa_admin_dist/dist/assets/index-93bf92b5.js
T

2 lines
17 KiB
JavaScript
Raw Normal View History

2026-09-16 14:07:27 +03:30
import{_ as ce}from"./BasicMainCard-2b216dd4.js";import{_ as de}from"./BasicModal.vue_vue_type_style_index_0_lang-39ca2ebd.js";import{_ as pe}from"./BasicTextArea.vue_vue_type_style_index_0_lang-4a3d3a2c.js";import{_ as me}from"./BasicInput.vue_vue_type_style_index_0_lang-2d1bf661.js";import{_ as _e,u as ve}from"./useBaseTable-4f4d8248.js";import{_ as fe}from"./button.vue_vue_type_style_index_0_lang-307c41e8.js";import{_ as ge,H as he,I as xe,J as ye,d as be,i as x,D as we,x as ke,o as $,c as I,e as c,w as y,b as t,f as Ce,K as Ue,l as B,n as R,B as j,t as J,F as Me,q as $e,G as P,L as X}from"./index-f44a958f.js";import{t as Ie}from"./useDataTime-e3db50db.js";import{I as A}from"./Icon-daa4ada2.js";import{e as T,g as N}from"./convert-2ad76038.js";import{_ as De}from"./TextPreview.vue_vue_type_script_setup_true_lang-96830691.js";import{M as Le}from"./index-234c79ba.js";import{T as Q}from"./isSymbol-9ca68d9f.js";import{S as Se}from"./index-00d02541.js";import{U as W}from"./index-109ce1b0.js";import"./Grid-dfc25885.js";import"./index-a485cd3f.js";import"./_plugin-vue_export-helper-9644f77d.js";import"./shallowequal-30316885.js";import"./index-1399904b.js";import"./vnode-bcebd00a.js";import"./index-120ad211.js";import"./useState-7cfb31a4.js";import"./useRefs-b0f27066.js";import"./_flatRest-e4351155.js";import"./isMobile-e2e89480.js";import"./omit-555d0220.js";import"./index-ae092da9.js";import"./Col-4af7c3cd.js";import"./styleChecker-d7256a22.js";import"./isPlainObject-f85be752.js";import"./index-17909d47.js";import"./SearchOutlined-bf31e51b.js";import"./FormItemContext-801d31a4.js";import"./index-6f0218fe.js";import"./usePrice-bc935b83.js";import"./updateLocale-4abe3bd4.js";import"./useMemo-3af68d99.js";import"./lodash-ba2547f0.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-9966573e.js";import"./index-5f6600aa.js";import"./Badge-daa269e5.js";import"./isNumeric-3f69e2aa.js";import"./index-432f8768.js";import"./index-7722f326.js";import"./index-5bb4f02b.js";import"./DialogWrap-ed1e42ab.js";import"./pickAttrs-6cecdc2a.js";import"./css-aae66f86.js";import"./index-2a7e74b5.js";import"./toArray-c3886d9c.js";import"./index-a5608fae.js";import"./textUtils-c37780ad.js";import"./index-0e61c248.js";import"./index-0326f7f1.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-cbaa4453.js"),["assets/buildSupabaseQuery-cbaa4453.js","assets/index-f44a958f.js","assets/index-f80d3475.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,D=(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:D+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