2026-06-27 15:08:32 +03:30
|
|
|
import{_ as M}from"./BasicMainCard-be90d263.js";import{u as g,_ as j}from"./useBaseTable-ef6592c2.js";import{t as v,a as b}from"./useDataTime-5bd81474.js";import{H as _,d as q,g as F,h as H,E as J,L 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,G as h,j as x}from"./index-88932a9f.js";import{f as C,a as E,c as R,d as T,e as ee,b as P}from"./supabaseTableQuery-95762ff3.js";import{_ as te,T as ae}from"./index-5f2e11b4.js";import"./index-e0458754.js";import"./index-557a0399.js";import"./Col-4d8f0adc.js";import"./shallowequal-27d7f8d5.js";import"./vnode-18f41e25.js";import"./_plugin-vue_export-helper-849f1547.js";import"./styleChecker-35ce67a3.js";import"./isPlainObject-19f65999.js";import"./button.vue_vue_type_style_index_0_lang-f0aa05eb.js";import"./Icon-37974aeb.js";import"./fa_IR-17503e2b.js";import"./toArray-35830db0.js";import"./FormItemContext-c53e4887.js";import"./pickAttrs-4595270f.js";import"./useState-46615da0.js";import"./lodash-c82dcc8c.js";import"./index-071a575e.js";import"./BasicModal.vue_vue_type_style_index_0_lang-7961ad87.js";import"./index-24da0ad9.js";import"./index-d2364e4e.js";import"./index-ca44b822.js";import"./useRefs-a497cf2b.js";const 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: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)}],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: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 n;if(!e)return"نامشخص";if((n=e.name)!=null&&n.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 n=le(e);return{user_id:e.user_id,total_points:e.total_points,updated_at:e.updated_at,week_start:e.week_start,rank:a,display_name:re(n),phone:(n==null?void 0:n.phone)||""}}async function A(){const{data:
|