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

2 lines
17 KiB
JavaScript
Raw Normal View History

2026-10-10 13:28:46 +03:30
import{_ as ce}from"./BasicMainCard-4c879cc2.js";import{_ as de}from"./BasicModal.vue_vue_type_style_index_0_lang-c3b69d02.js";import{_ as pe}from"./BasicTextArea.vue_vue_type_style_index_0_lang-a60ebddb.js";import{_ as me}from"./BasicInput.vue_vue_type_style_index_0_lang-9a0053be.js";import{_ as _e,u as ve}from"./useBaseTable-e35ecaa9.js";import{_ as fe}from"./button.vue_vue_type_style_index_0_lang-b32e1136.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-90ac1a44.js";import{t as Ie}from"./useDataTime-c7be2668.js";import{I as A}from"./Icon-85823aa3.js";import{e as T,g as N}from"./convert-2ad76038.js";import{_ as Le}from"./TextPreview.vue_vue_type_script_setup_true_lang-acd6228c.js";import{M as De}from"./index-a413fea1.js";import{T as G}from"./isSymbol-9094e8b7.js";import{S as Se}from"./index-93d9312f.js";import{U as W}from"./index-e50485ad.js";import"./Grid-839ef6d1.js";import"./index-4d938e91.js";import"./_plugin-vue_export-helper-8ee86600.js";import"./shallowequal-36516cfd.js";import"./index-9869a66e.js";import"./vnode-b0455438.js";import"./index-c0eeee91.js";import"./useState-64f2823f.js";import"./useRefs-2a883b79.js";import"./_flatRest-f2577aae.js";import"./isMobile-e2e89480.js";import"./omit-84d71e15.js";import"./index-109c99be.js";import"./Col-fddaa6b7.js";import"./styleChecker-1445806f.js";import"./isPlainObject-aab367ce.js";import"./index-027c2128.js";import"./SearchOutlined-0eaaa97a.js";import"./FormItemContext-64f846db.js";import"./index-cfa536c5.js";import"./usePrice-bc935b83.js";import"./updateLocale-cec40f3d.js";import"./useMemo-9928f29b.js";import"./lodash-07b825be.js";import"./BaseSwitch.vue_vue_type_script_setup_true_lang-fb5041dc.js";import"./index-95b42b3e.js";import"./Badge-54a9cc4e.js";import"./isNumeric-3f69e2aa.js";import"./index-5f5223b4.js";import"./index-788f312f.js";import"./index-90f5ddad.js";import"./DialogWrap-6616a498.js";import"./pickAttrs-ba13e92c.js";import"./css-aae66f86.js";import"./index-a2503c07.js";import"./toArray-3936b2d5.js";import"./index-bb804fdd.js";import"./textUtils-c37780ad.js";import"./index-03d99677.js";import"./index-ebd9fdbb.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-c046d1a6.js"),["assets/buildSupabaseQuery-c046d1a6.js","assets/index-90ac1a44.js","assets/index-0643191e.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