2026-07-14 12:58:42 +03:30
|
|
|
import{_ as M}from"./BasicMainCard-9c458ce7.js";import{u as g,_ as j}from"./useBaseTable-3b2d0853.js";import{t as v,a as b}from"./useDataTime-c147e135.js";import{G as _,d as q,g as F,h as H,E as J,O as G,D as Y,v as z,o as L,c as $,b as c,w as u,a as I,t as Q,k as X,H as h,j as x}from"./index-20d5dab1.js";import{f as C,a as P,c as R,d as T,e as ee,b as E}from"./supabaseTableQuery-95762ff3.js";import{T as te,a as ae}from"./index-4284a867.js";import"./index-857151a7.js";import"./index-0d016563.js";import"./Col-6ec89065.js";import"./styleChecker-6ae1ce26.js";import"./isPlainObject-769b8c03.js";import"./vnode-18b1f518.js";import"./_plugin-vue_export-helper-26f60d29.js";import"./button.vue_vue_type_style_index_0_lang-95946c23.js";import"./Icon-06d3f751.js";import"./updateLocale-6ea9ed84.js";import"./toArray-fb96c8b9.js";import"./isSymbol-f04930e1.js";import"./FormItemContext-28b30746.js";import"./pickAttrs-93039156.js";import"./useState-3cc4a0be.js";import"./lodash-28ee46da.js";import"./index-4f6342fa.js";import"./DialogWrap-a4cda90f.js";import"./BasicModal.vue_vue_type_style_index_0_lang-5bce5515.js";import"./index-38a2f111.js";import"./index-f6eb678e.js";import"./css-0bca533a.js";import"./index-f75dc027.js";import"./useRefs-03151dab.js";import"./_flatRest-12208321.js";const ie=[{title:"ردیف",dataIndex:"index",key:"index",filterable:!1,width:70,align:"center",customRender:e=>e.record.index+1},{title:"رتبه",dataIndex:"rank",key:"rank",filterable:!1,width:80,align:"center"},{title:"نام کاربر",dataIndex:"display_name",key:"display_name",filterField:"display_name"},{title:"شماره همراه",dataIndex:"phone",key:"phone",filterField:"phone",width:130},{title:"امتیاز",dataIndex:"total_points",key:"total_points",filterField:"total_points",align:"center",width:100,customRender:e=>(e.record.total_points??0).toLocaleString("fa-IR")},{title:"آخرین بروزرسانی",dataIndex:"updated_at",key:"updated_at",type:"DateTime",filterField:"updated_at",width:150,customRender:e=>v(e.record.updated_at)}],ne=[{title:"ردیف",dataIndex:"index",key:"index",filterable:!1,width:70,align:"center",customRender:e=>e.record.index+1},{title:"رتبه",dataIndex:"rank",key:"rank",filterable:!1,width:80,align:"center"},{title:"نام کاربر",dataIndex:"display_name",key:"display_name",filterField:"display_name"},{title:"شماره همراه",dataIndex:"phone",key:"phone",filterField:"phone",width:130},{title:"امتیاز هفته",dataIndex:"total_points",key:"total_points",filterField:"total_points",align:"center",width:110,customRender:e=>(e.record.total_points??0).toLocaleString("fa-IR")},{title:"آخرین بروزرسانی",dataIndex:"updated_at",key:"updated_at",type:"DateTime",filterField:"updated_at",width:150,customRender:e=>v(e.record.updated_at)}],oe=[{title:"ردیف",dataIndex:"index",key:"index",filterable:!1,width:70,align:"center",customRender:e=>e.record.index+1},{title:"بازه هفته",dataIndex:"week_period",key:"week_period",filterField:"week_start",width:180,customRender:e=>{const a=e.record;return`${D(a.week_start)} تا ${D(a.week_end)}`}},{title:"رتبه",dataIndex:"rank",key:"rank",filterField:"rank",align:"center",width:80},{title:"نام کاربر",dataIndex:"display_name",key:"display_name",filterField:"display_name"},{title:"امتیاز",dataIndex:"total_points",key:"total_points",filterField:"total_points",align:"center",width:100,customRender:e=>(e.record.total_points??0).toLocaleString("fa-IR")},{title:"زمان آرشیو",dataIndex:"created_at",key:"created_at",type:"DateTime",filterField:"created_at",width:150,customRender:e=>v(e.record.created_at)}];function D(e){return e?b(`${e}T00:00:00Z`):"—"}function re(e){var i;if(!e)return"نامشخص";if((i=e.name)!=null&&i.trim())return e.name.trim();const a=`${e.first_name||""} ${e.last_name||""}`.trim();return a||e.phone||"نامشخص"}function le(e){return Array.isArray(e.users)?e.users[0]:e.users}function W(e,a){const i=le(e);return{user_id:e.user_id,total_points:e.total_points,updated_at:e.updated_at,week_start:e.week_star
|