Files
machartaa_admin_dist/dist/assets/index-923effaf.js
T

2 lines
17 KiB
JavaScript
Raw Normal View History

2026-09-01 10:46:46 +03:30
import{_ as ce}from"./BasicMainCard-289887ef.js";import{_ as de}from"./BasicModal.vue_vue_type_style_index_0_lang-8e72024f.js";import{_ as pe}from"./BasicTextArea.vue_vue_type_style_index_0_lang-9f8a3d33.js";import{_ as me}from"./BasicInput.vue_vue_type_style_index_0_lang-c14148df.js";import{_ as _e,u as ve}from"./useBaseTable-97132b25.js";import{_ as fe}from"./button.vue_vue_type_style_index_0_lang-2aadace4.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-9cc7ea05.js";import{t as Ie}from"./useDataTime-581d686b.js";import{I as A}from"./Icon-3bccc0d8.js";import{e as T,g as N}from"./convert-2ad76038.js";import{_ as De}from"./TextPreview.vue_vue_type_script_setup_true_lang-9b1f2aa7.js";import{M as Le}from"./index-1c0096a5.js";import{T as Q}from"./isSymbol-d00ad36c.js";import{S as Se}from"./index-064eab1c.js";import{U as W}from"./index-0eeaee66.js";import"./Grid-36f4030b.js";import"./index-d780a420.js";import"./_plugin-vue_export-helper-0df7e82e.js";import"./shallowequal-8e48ba05.js";import"./index-c158727f.js";import"./vnode-1811a8a6.js";import"./index-ea36e535.js";import"./useState-b2543aac.js";import"./useRefs-563b43fc.js";import"./_flatRest-2790c772.js";import"./isMobile-e2e89480.js";import"./omit-3563fca2.js";import"./index-57fd432f.js";import"./Col-c9a7abf2.js";import"./styleChecker-035391ef.js";import"./isPlainObject-2a229bdb.js";import"./index-2fad7c88.js";import"./SearchOutlined-829b0931.js";import"./FormItemContext-32857be9.js";import"./index-26f9cac8.js";import"./usePrice-bc935b83.js";import"./updateLocale-845f5b58.js";import"./useMemo-fb2bb0e4.js";import"./lodash-e6a6a79e.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-49bf9297.js";import"./index-0b2caecc.js";import"./Badge-abdbd545.js";import"./isNumeric-3f69e2aa.js";import"./index-fb06c021.js";import"./index-461c54dd.js";import"./index-4d488545.js";import"./DialogWrap-cba6088f.js";import"./pickAttrs-f69e7d2f.js";import"./css-aae66f86.js";import"./index-02aeab7c.js";import"./toArray-43df885b.js";import"./index-6a4605ec.js";import"./textUtils-c37780ad.js";import"./index-df2deb09.js";import"./index-6c5d1c5e.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-51e32fda.js"),["assets/buildSupabaseQuery-51e32fda.js","assets/index-9cc7ea05.js","assets/index-71a80eb0.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