FIx some for production again

This commit is contained in:
Montech
2026-09-15 17:26:42 +03:30
parent afde44ab8a
commit 3bc97461e0
195 changed files with 258003 additions and 344 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
# Docker Compose build arg for admin "view wheel" links.
# On production server, override with your real client domain before building admin:
# Bake this into the admin dist at local `pnpm build:release` time
# (no longer a Docker build arg — images only copy pre-built files).
# VITE_CLIENT_PUBLIC_URL=https://wheel.example.com
VITE_CLIENT_PUBLIC_URL=http://localhost:5174
+8 -2
View File
@@ -1,12 +1,18 @@
node_modules/
dist/
apps/api/dist/
apps/api/coverage/
build/
.env
.env.local
*.log
uploads/
coverage/
.DS_Store
Thumbs.db
package-lock.json
*.ps1
*.tsbuildinfo
# Release artifacts ARE committed for Dokploy copy-only deploys:
# apps/api/release/app.js + apps/api/release/vendor/ (Prisma)
# apps/admin/dist/
# apps/client/dist/
+5
View File
@@ -0,0 +1,5 @@
*
!dist/
!dist/**
!nginx.conf
!Dockerfile
+3
View File
@@ -0,0 +1,3 @@
# Dist is committed for Dokploy copy-only images.
node_modules/
*.tsbuildinfo
+3 -21
View File
@@ -1,25 +1,7 @@
FROM node:20-alpine AS builder
FROM docker.arvancloud.ir/nginx:latest
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable pnpm
WORKDIR /app
COPY . .
ARG VITE_CLIENT_PUBLIC_URL=
ENV VITE_CLIENT_PUBLIC_URL=$VITE_CLIENT_PUBLIC_URL
RUN pnpm install --frozen-lockfile
RUN pnpm --filter @lucky-wheel/api exec prisma generate
RUN pnpm run build:types
RUN pnpm --filter @lucky-wheel/admin build
FROM nginx:alpine
COPY --from=builder /app/apps/admin/dist /usr/share/nginx/html
COPY apps/admin/nginx.conf /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY dist /usr/share/nginx/html
EXPOSE 80
+1
View File
@@ -0,0 +1 @@
.page-header-title[data-v-ec85b8e1]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-ec85b8e1]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-ec85b8e1]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-ec85b8e1]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-ec85b8e1]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.filters[data-v-ec85b8e1]{display:flex;gap:12px}.admin-name[data-v-ec85b8e1]{font-weight:500;color:#1e293b}.code-badge[data-v-ec85b8e1]{background:#f8fafc;border:1px solid #e2e8f0;padding:2px 6px;border-radius:4px;font-family:monospace;font-size:11px;color:#64748b}.date-cell[data-v-ec85b8e1]{color:#334155;font-size:13px}.text-muted[data-v-ec85b8e1]{color:#94a3b8;font-size:12px}.action-more-btn[data-v-ec85b8e1]{color:#64748b;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;transition:all .2s ease}.action-more-btn[data-v-ec85b8e1]:hover{background-color:#eef2ff!important}.json-box[data-v-ec85b8e1]{background:#0f172a;color:#38bdf8;padding:14px;border-radius:8px;font-family:monospace;font-size:12px;max-height:240px;overflow-y:auto;direction:ltr;text-align:left;border:1px solid #1e293b}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.wheel-picker-grid[data-v-16f7d06b]{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;margin-top:10px}.design-card[data-v-16f7d06b]{border:2px solid #e2e8f0;border-radius:12px;overflow:hidden;cursor:pointer;transition:all .25s ease;background:#fff;display:flex;flex-direction:column}.design-card[data-v-16f7d06b]:hover{border-color:#1677ff;transform:translateY(-3px);box-shadow:0 8px 20px #0000001a}.design-card.is-selected[data-v-16f7d06b]{border-color:#1677ff;box-shadow:0 0 0 2px #1677ff40}.preview-stage[data-v-16f7d06b]{height:140px;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;border-bottom:1px solid rgba(0,0,0,.08)}.theme-tag[data-v-16f7d06b]{position:absolute;top:10px;right:10px;z-index:10;margin:0;font-weight:600}.stage-tools[data-v-16f7d06b]{position:absolute;bottom:8px;left:8px;display:flex;gap:6px;z-index:10}.tool-btn[data-v-16f7d06b]{background:#ffffffd9;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border:none;box-shadow:0 2px 6px #00000026}.tool-btn[data-v-16f7d06b]:hover{background:#fff;color:#1677ff}.wheel-wrapper[data-v-16f7d06b]{position:relative;width:96px;height:96px;display:flex;align-items:center;justify-content:center}.pointer-wrapper[data-v-16f7d06b]{position:absolute;top:-8px;left:50%;transform:translate(-50%);z-index:20;filter:drop-shadow(0 2px 4px rgba(0,0,0,.4))}.mini-wheel-svg[data-v-16f7d06b]{width:100%;height:100%;border-radius:50%;filter:drop-shadow(0 4px 10px rgba(0,0,0,.3))}.card-body[data-v-16f7d06b]{padding:14px 16px;flex:1;display:flex;flex-direction:column}.card-title-row[data-v-16f7d06b]{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.title-text[data-v-16f7d06b]{font-weight:700;font-size:13.5px;color:#1e293b}.selected-icon[data-v-16f7d06b]{color:#1677ff;font-size:18px}.card-desc[data-v-16f7d06b]{font-size:11.5px;color:#64748b;line-height:1.6;margin:0}.modal-preview-container[data-v-16f7d06b]{padding:30px 20px;border-radius:12px;display:flex;flex-direction:column;align-items:center}.modal-wheel-box[data-v-16f7d06b]{position:relative;width:240px;height:240px}.large-pointer[data-v-16f7d06b]{position:absolute;top:-12px;left:50%;transform:translate(-50%);z-index:20;filter:drop-shadow(0 3px 6px rgba(0,0,0,.5))}.large-wheel-svg[data-v-16f7d06b]{width:100%;height:100%;border-radius:50%;filter:drop-shadow(0 8px 24px rgba(0,0,0,.4))}.submit-btn[data-v-c11ffb22]{font-weight:600;border-radius:8px}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.page-header-title[data-v-9de02d8a]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-9de02d8a]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-9de02d8a]{font-size:13px;color:#64748b;margin:4px 0 0}.create-btn[data-v-9de02d8a]{font-weight:600;border-radius:8px;box-shadow:0 2px 4px #4f46e533}.main-card[data-v-9de02d8a]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-9de02d8a]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;flex-wrap:wrap;gap:12px}.filters[data-v-9de02d8a]{display:flex;gap:12px}.campaign-title[data-v-9de02d8a]{font-weight:600;color:#1e293b;cursor:pointer;transition:color .15s ease}.campaign-title[data-v-9de02d8a]:hover{color:#4f46e5}.slug-badge[data-v-9de02d8a]{background:#f8fafc;border:1px solid #e2e8f0;padding:2px 8px;border-radius:6px;color:#475569;font-size:12px;font-family:monospace}.date-cell[data-v-9de02d8a],.num-cell[data-v-9de02d8a]{color:#334155;font-size:13px}.status-tag[data-v-9de02d8a]{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:20px;font-weight:500}.status-dot[data-v-9de02d8a]{width:6px;height:6px;border-radius:50%;display:inline-block}.action-more-btn[data-v-9de02d8a]{color:#64748b;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;transition:all .2s ease}.action-more-btn[data-v-9de02d8a]:hover{color:#4f46e5!important;background-color:#eef2ff!important}.dropdown-action-item[data-v-9de02d8a]{display:flex;align-items:center;gap:8px;color:#334155;text-decoration:none;font-size:13px}.dropdown-item-icon[data-v-9de02d8a]{font-size:14px}.text-success[data-v-9de02d8a]{color:#10b981}.text-warning[data-v-9de02d8a]{color:#f59e0b}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{b as f,I as u}from"./index-C4s_T2hP.js";var l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 310H732.4c13.6-21.4 21.6-46.8 21.6-74 0-76.1-61.9-138-138-138-41.4 0-78.7 18.4-104 47.4-25.3-29-62.6-47.4-104-47.4-76.1 0-138 61.9-138 138 0 27.2 7.9 52.6 21.6 74H144c-17.7 0-32 14.3-32 32v200c0 4.4 3.6 8 8 8h40v344c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V550h40c4.4 0 8-3.6 8-8V342c0-17.7-14.3-32-32-32zm-334-74c0-38.6 31.4-70 70-70s70 31.4 70 70-31.4 70-70 70h-70v-70zm-138-70c38.6 0 70 31.4 70 70v70h-70c-38.6 0-70-31.4-70-70s31.4-70 70-70zM180 482V378h298v104H180zm48 68h250v308H228V550zm568 308H546V550h250v308zm48-376H546V378h298v104z"}}]},name:"gift",theme:"outlined"};function c(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.forEach(function(a){o(r,a,e[a])})}return r}function o(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var i=function(t,e){var n=c({},t,e.attrs);return f(u,c({},n,{icon:l}),null)};i.displayName="GiftOutlined";i.inheritAttrs=!1;export{i as G};
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
import{b as i,I as l}from"./index-C4s_T2hP.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};function a(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),n.forEach(function(c){f(r,c,e[c])})}return r}function f(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var o=function(t,e){var n=a({},t,e.attrs);return i(l,a({},n,{icon:u}),null)};o.displayName="LockOutlined";o.inheritAttrs=!1;export{o as L};
+1
View File
@@ -0,0 +1 @@
import{d as w,u as b,c as y,a,b as o,w as t,r as l,o as h,e as d,f as x,g as k,h as V,i as L,j as S,_ as z}from"./index-C4s_T2hP.js";import{M as B}from"./MailOutlined-DMDnYu7e.js";import{L as C}from"./LockOutlined-C2VUSHin.js";const M={class:"login-container"},N={class:"login-card"},q=w({__name:"LoginView",setup(A){const c=L(),u=b(),s=k({email:"admin@luckywheel.local",password:"Admin@SecurePass2026"}),r=V(!1);async function m(){r.value=!0;try{await u.login({email:s.email,password:s.password}),c.push(S()?"/m/dashboard":"/dashboard")}catch{}finally{r.value=!1}}return(p,e)=>{const _=l("a-input"),n=l("a-form-item"),f=l("a-input-password"),g=l("a-button"),v=l("a-form");return h(),y("div",M,[e[4]||(e[4]=a("div",{class:"login-bg-decorations"},[a("div",{class:"decor-circle circle-1"}),a("div",{class:"decor-circle circle-2"})],-1)),a("div",N,[e[3]||(e[3]=a("div",{class:"header"},[a("div",{class:"logo-wrapper"},[a("span",{class:"logo"},"🎡")]),a("h1",null,"ورود به پنل مدیریت"),a("p",null,"سامانه گردونه شانس و قرعه‌کشی")],-1)),o(v,{model:s,layout:"vertical",onFinish:m},{default:t(()=>[o(n,{label:"ایمیل مدیریت",name:"email",rules:[{required:!0,message:"لطفاً ایمیل را وارد کنید"},{type:"email",message:"فرمت ایمیل نامعتبر است"}]},{default:t(()=>[o(_,{value:s.email,"onUpdate:value":e[0]||(e[0]=i=>s.email=i),size:"large",placeholder:"admin@example.com"},{prefix:t(()=>[o(d(B),{style:{color:"#6366f1"}})]),_:1},8,["value"])]),_:1}),o(n,{label:"کلمه عبور",name:"password",rules:[{required:!0,message:"لطفاً کلمه عبور را وارد کنید"}]},{default:t(()=>[o(f,{value:s.password,"onUpdate:value":e[1]||(e[1]=i=>s.password=i),size:"large",placeholder:"••••••••"},{prefix:t(()=>[o(d(C),{style:{color:"#6366f1"}})]),_:1},8,["value"])]),_:1}),o(n,{style:{"margin-top":"28px"}},{default:t(()=>[o(g,{type:"primary","html-type":"submit",size:"large",block:"",loading:r.value,class:"login-submit-btn"},{default:t(()=>[...e[2]||(e[2]=[x(" ورود به پنل ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])])])}}}),j=z(q,[["__scopeId","data-v-6a1d5c0c"]]);export{j as default};
+1
View File
@@ -0,0 +1 @@
.login-container[data-v-6a1d5c0c]{min-height:100vh;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 20%,#1e1b4b,#0f172a 70%,#020617);padding:24px;position:relative;overflow:hidden}.login-bg-decorations[data-v-6a1d5c0c]{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;overflow:hidden}.decor-circle[data-v-6a1d5c0c]{position:absolute;border-radius:50%;filter:blur(80px);opacity:.15}.circle-1[data-v-6a1d5c0c]{width:400px;height:400px;background:#6366f1;top:10%;left:20%}.circle-2[data-v-6a1d5c0c]{width:350px;height:350px;background:#a855f7;bottom:10%;right:20%}.login-card[data-v-6a1d5c0c]{width:100%;max-width:420px;background:#fff;border-radius:16px;padding:40px 36px;box-shadow:0 25px 50px -12px #00000073,0 0 0 1px #ffffff1a;position:relative;z-index:1}.header[data-v-6a1d5c0c]{text-align:center;margin-bottom:32px}.logo-wrapper[data-v-6a1d5c0c]{width:68px;height:68px;margin:0 auto 16px;background:#eef2ff;border-radius:16px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #4f46e51f}.logo[data-v-6a1d5c0c]{font-size:34px;line-height:1}h1[data-v-6a1d5c0c]{font-size:20px;font-weight:700;margin:0;color:#0f172a;letter-spacing:-.3px}p[data-v-6a1d5c0c]{font-size:13px;color:#64748b;margin-top:6px;margin-bottom:0}.login-submit-btn[data-v-6a1d5c0c]{height:44px;font-size:15px;font-weight:600;border-radius:8px;background:#4f46e5;box-shadow:0 4px 14px #4f46e559;transition:all .2s ease}.login-submit-btn[data-v-6a1d5c0c]:hover{background:#4338ca!important;box-shadow:0 6px 18px #4f46e573}
+1
View File
@@ -0,0 +1 @@
.m-page[data-v-c77a623e]{padding:12px 14px 24px}.m-filters[data-v-c77a623e]{display:flex;gap:8px;margin-bottom:12px}.m-filters[data-v-c77a623e] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-icon-btn[data-v-c77a623e]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5}.m-empty[data-v-c77a623e]{text-align:center;color:#94a3b8;padding:40px}.m-card[data-v-c77a623e]{background:#fff;border-radius:14px;padding:12px;margin-bottom:8px;border:1px solid #f1f5f9}.m-card__top[data-v-c77a623e]{display:flex;justify-content:space-between;gap:8px;margin-bottom:8px}.m-card__admin[data-v-c77a623e]{font-weight:800;font-size:13px;color:#0f172a}.m-card__entity[data-v-c77a623e]{font-size:11px;color:#94a3b8;margin-top:2px;direction:ltr;text-align:right}.m-card__meta[data-v-c77a623e]{display:flex;justify-content:space-between;font-size:11px;color:#94a3b8}.m-detail[data-v-c77a623e]{margin-top:10px;width:100%;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:10px;font-weight:700;font-size:12px;color:#334155;min-height:42px}.m-pager[data-v-c77a623e]{display:flex;justify-content:center;padding:12px 0}.detail__row[data-v-c77a623e]{display:flex;justify-content:space-between;margin-bottom:8px;font-size:13px;color:#64748b}.detail__row strong[data-v-c77a623e]{color:#0f172a}.detail h4[data-v-c77a623e]{margin:16px 0 8px;font-size:13px}.detail pre[data-v-c77a623e]{background:#0f172a;color:#e2e8f0;border-radius:12px;padding:12px;font-size:11px;overflow:auto;direction:ltr;text-align:left;max-height:180px}
+1
View File
@@ -0,0 +1 @@
import{t as U}from"./farsi-number-stB7JMN0.js";import{d as L,l as x,c as _,a as t,b as a,w as o,e as S,R as I,h as g,g as R,n as M,r as c,o as m,f as p,s as D,F as P,y as B,t as s,H as F,_ as H}from"./index-C4s_T2hP.js";const J={class:"m-page"},G={class:"m-filters"},$={key:0,class:"m-empty"},j={class:"m-card__top"},q={class:"m-card__admin"},K={class:"m-card__entity"},Q={class:"m-card__meta"},W={dir:"ltr"},X=["onClick"],Y={key:1,class:"m-pager"},Z={key:0,class:"detail"},h={class:"detail__row"},ee={class:"detail__row"},te={class:"detail__row"},ne=L({__name:"MAuditLogView",setup(ae){const v=g(!1),T=g([]),w=g(0),A=g(!1),u=g(null),l=R({page:1,pageSize:10,entityType:void 0});async function f(){var i,e,d,y;v.value=!0;try{const r=await M.get("/admin/audit-logs",{params:{page:l.page,pageSize:l.pageSize,entityType:l.entityType||void 0}}),C=Array.isArray(r.data)?r.data:((i=r.data)==null?void 0:i.data)||[];T.value=C,w.value=((e=r.meta)==null?void 0:e.total)||((y=(d=r.data)==null?void 0:d.meta)==null?void 0:y.total)||C.length}finally{v.value=!1}}function k(i){u.value=i,A.value=!0}function V(i){const e=(i||"").toUpperCase();return e.includes("CREATE")||e.includes("ADD")?"green":e.includes("UPDATE")||e.includes("EDIT")||e.includes("PATCH")?"blue":e.includes("DELETE")||e.includes("REMOVE")?"red":e.includes("LOGIN")||e.includes("AUTH")?"purple":"default"}function b(i){return i?U(new Date(i).toLocaleDateString("fa-IR",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})):"—"}return x(f),(i,e)=>{const d=c("a-select-option"),y=c("a-select"),r=c("a-tag"),C=c("a-pagination"),N=c("a-spin"),O=c("a-drawer");return m(),_("div",J,[t("div",G,[a(y,{value:l.entityType,"onUpdate:value":e[0]||(e[0]=n=>l.entityType=n),"allow-clear":"",placeholder:"نوع موجودیت",style:{flex:"1"},onChange:e[1]||(e[1]=()=>{l.page=1,f()})},{default:o(()=>[a(d,{value:"Campaign"},{default:o(()=>[...e[4]||(e[4]=[p("کمپین",-1)])]),_:1}),a(d,{value:"Prize"},{default:o(()=>[...e[5]||(e[5]=[p("جایزه",-1)])]),_:1}),a(d,{value:"User"},{default:o(()=>[...e[6]||(e[6]=[p("کاربر",-1)])]),_:1}),a(d,{value:"Chance"},{default:o(()=>[...e[7]||(e[7]=[p("شانس",-1)])]),_:1}),a(d,{value:"UserPrize"},{default:o(()=>[...e[8]||(e[8]=[p("جایزه کاربر",-1)])]),_:1})]),_:1},8,["value"]),t("button",{type:"button",class:"m-icon-btn",onClick:f},[a(S(I),{spin:v.value},null,8,["spin"])])]),a(N,{spinning:v.value},{default:o(()=>[!T.value.length&&!v.value?(m(),_("div",$,"لاگی یافت نشد")):D("",!0),(m(!0),_(P,null,B(T.value,n=>{var E,z;return m(),_("div",{key:n.id,class:"m-card"},[t("div",j,[t("div",null,[t("div",q,s(((E=n.admin)==null?void 0:E.name)||((z=n.admin)==null?void 0:z.email)||"سیستم"),1),t("div",K,s(n.entityType)+" · "+s(n.entityId||"—"),1)]),a(r,{color:V(n.action)},{default:o(()=>[p(s(n.action),1)]),_:2},1032,["color"])]),t("div",Q,[t("span",W,s(n.ipAddress||"—"),1),t("span",null,s(b(n.createdAt)),1)]),t("button",{type:"button",class:"m-detail",onClick:se=>k(n)},[a(S(F)),e[9]||(e[9]=p(" جزئیات JSON ",-1))],8,X)])}),128)),w.value>l.pageSize?(m(),_("div",Y,[a(C,{current:l.page,"onUpdate:current":e[2]||(e[2]=n=>l.page=n),total:w.value,"page-size":l.pageSize,size:"small",onChange:f},null,8,["current","total","page-size"])])):D("",!0)]),_:1},8,["spinning"]),a(O,{open:A.value,"onUpdate:open":e[3]||(e[3]=n=>A.value=n),placement:"bottom",height:"70%",title:"جزئیات لاگ"},{default:o(()=>{var n;return[u.value?(m(),_("div",Z,[t("div",h,[e[10]||(e[10]=t("span",null,"ادمین",-1)),t("strong",null,s(((n=u.value.admin)==null?void 0:n.name)||"—"),1)]),t("div",ee,[e[11]||(e[11]=t("span",null,"اکشن",-1)),t("strong",null,s(u.value.action),1)]),t("div",te,[e[12]||(e[12]=t("span",null,"موجودیت",-1)),t("strong",null,s(u.value.entityType),1)]),e[13]||(e[13]=t("h4",null,"قبل",-1)),t("pre",null,s(JSON.stringify(u.value.oldValues||{},null,2)),1),e[14]||(e[14]=t("h4",null,"بعد",-1)),t("pre",null,s(JSON.stringify(u.value.newValues||{},null,2)),1)])):D("",!0)]}),_:1},8,["open"])])}}}),oe=H(ne,[["__scopeId","data-v-c77a623e"]]);export{oe as default};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.m-form-page[data-v-c3ce5e92]{padding:12px 14px 24px}.m-steps[data-v-c3ce5e92]{display:flex;gap:6px;margin-bottom:14px}.m-step[data-v-c3ce5e92]{flex:1;text-align:center;font-size:11px;font-weight:700;padding:8px 4px;border-radius:10px;background:#e2e8f0;color:#64748b}.m-step.active[data-v-c3ce5e92]{background:#4f46e5;color:#fff}.m-step.done[data-v-c3ce5e92]{background:#c7d2fe;color:#3730a3}.m-card[data-v-c3ce5e92]{background:#fff;border-radius:16px;padding:16px;border:1px solid #f1f5f9;margin-bottom:14px}.m-wheel-grid[data-v-c3ce5e92]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.m-wheel-opt[data-v-c3ce5e92]{border:1px solid #e2e8f0;background:#f8fafc;border-radius:12px;padding:12px 8px;font-size:12px;font-weight:700;color:#334155;min-height:48px}.m-wheel-opt.active[data-v-c3ce5e92]{border-color:#4f46e5;background:#eef2ff;color:#4f46e5}.m-form-actions[data-v-c3ce5e92]{display:flex;flex-direction:column;gap:8px}.m-form-actions[data-v-c3ce5e92] .ant-btn{height:48px;border-radius:14px;font-weight:700}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.m-page[data-v-859536c8]{padding:12px 14px 88px;position:relative}.m-search-bar[data-v-859536c8]{display:flex;gap:8px;margin-bottom:12px}.m-search-bar[data-v-859536c8] .ant-input-affix-wrapper,.m-search-bar[data-v-859536c8] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-empty[data-v-859536c8]{text-align:center;color:#94a3b8;padding:48px 16px;font-size:13px}.m-camp-card[data-v-859536c8]{background:#fff;border-radius:16px;padding:14px;margin-bottom:10px;border:1px solid #f1f5f9;box-shadow:0 2px 10px #0f172a0a}.m-camp-card__top[data-v-859536c8]{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px}.m-camp-card__title[data-v-859536c8]{font-size:15px;font-weight:800;color:#0f172a}.m-camp-card__slug[data-v-859536c8]{font-size:11px;color:#94a3b8;direction:ltr;text-align:right;margin-top:2px}.m-status[data-v-859536c8]{font-size:11px;font-weight:700;padding:4px 10px;border-radius:999px;white-space:nowrap;height:fit-content}.m-camp-card__meta[data-v-859536c8]{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#64748b;margin-bottom:12px}.m-camp-card__actions[data-v-859536c8]{display:flex;gap:6px}.m-action[data-v-859536c8]{flex:1;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:10px 6px;font-size:11px;font-weight:700;color:#334155;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:42px}.m-pager[data-v-859536c8]{display:flex;justify-content:center;padding:12px 0}.m-fab[data-v-859536c8]{position:fixed;left:18px;bottom:calc(80px + env(safe-area-inset-bottom,0px));width:56px;height:56px;border:none;border-radius:18px;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;font-size:22px;box-shadow:0 10px 24px #4f46e566;z-index:90}
+1
View File
@@ -0,0 +1 @@
.m-dash[data-v-f792aa47]{padding:12px 14px 24px}.m-dash__toolbar[data-v-f792aa47]{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.m-dash__live[data-v-f792aa47]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:#059669;background:#ecfdf5;border-radius:999px;padding:4px 10px}.pulse[data-v-f792aa47]{width:7px;height:7px;border-radius:50%;background:#10b981;box-shadow:0 0 #10b98180;animation:pulse-f792aa47 1.6s infinite}@keyframes pulse-f792aa47{70%{box-shadow:0 0 0 8px #10b98100}to{box-shadow:0 0 #10b98100}}.m-dash__sub[data-v-f792aa47]{margin:8px 2px 0;color:#64748b;font-size:12px}.m-icon-btn[data-v-f792aa47]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5;box-shadow:0 2px 10px #0f172a0f;font-size:16px}.m-kpi-grid[data-v-f792aa47]{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}.m-kpi[data-v-f792aa47]{background:#fff;border-radius:16px;padding:14px;box-shadow:0 2px 12px #0f172a0a;border:1px solid #f1f5f9}.m-kpi__head[data-v-f792aa47]{display:flex;justify-content:space-between;align-items:center;color:#64748b;font-size:12px;font-weight:600;margin-bottom:8px}.m-kpi__val[data-v-f792aa47]{font-size:22px;font-weight:800;color:#0f172a;margin-bottom:4px}.m-kpi__sub[data-v-f792aa47]{font-size:11px;color:#94a3b8;display:flex;align-items:center;gap:4px}.m-kpi.indigo .m-kpi__head[data-v-f792aa47]{color:#4f46e5}.m-kpi.amber .m-kpi__head[data-v-f792aa47]{color:#d97706}.m-kpi.emerald .m-kpi__head[data-v-f792aa47]{color:#059669}.m-kpi.violet .m-kpi__head[data-v-f792aa47]{color:#7c3aed}.m-quick[data-v-f792aa47]{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.m-quick__btn[data-v-f792aa47]{border:1px solid #e2e8f0;background:#fff;border-radius:14px;padding:12px 10px;font-size:12px;font-weight:700;color:#334155;display:flex;align-items:center;justify-content:center;gap:6px;min-height:48px}.m-quick__btn.primary[data-v-f792aa47]{background:linear-gradient(135deg,#4f46e5,#7c3aed);border-color:transparent;color:#fff}.m-card[data-v-f792aa47]{background:#fff;border-radius:16px;padding:14px;margin-bottom:12px;border:1px solid #f1f5f9;box-shadow:0 2px 12px #0f172a0a}.m-card__title[data-v-f792aa47]{font-size:14px;font-weight:800;color:#0f172a;margin-bottom:10px}.m-chart[data-v-f792aa47]{height:200px;width:100%}.m-winner-row[data-v-f792aa47]{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #f1f5f9}.m-winner-row[data-v-f792aa47]:last-child{border-bottom:none;padding-bottom:0}.m-winner-row__name[data-v-f792aa47]{font-size:13px;font-weight:700;color:#0f172a}.m-winner-row__meta[data-v-f792aa47]{font-size:11px;color:#94a3b8;margin-top:2px}.m-winner-row__side[data-v-f792aa47]{display:flex;flex-direction:column;align-items:flex-end;gap:4px}.m-tag[data-v-f792aa47]{margin:0!important;font-size:10px!important;line-height:18px!important}.m-code[data-v-f792aa47]{border:none;background:#f8fafc;color:#4f46e5;font-size:10px;font-family:monospace;border-radius:8px;padding:2px 6px;direction:ltr}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.m-login[data-v-e344c244]{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:#0f172a}.m-login__hero[data-v-e344c244]{position:relative;flex:0 0 auto;padding:calc(env(safe-area-inset-top,0px) + 48px) 24px 56px;overflow:hidden;background:linear-gradient(160deg,#312e81,#4f46e5 45%,#7c3aed)}.m-login__blob[data-v-e344c244]{position:absolute;border-radius:50%;filter:blur(40px);opacity:.35}.blob-1[data-v-e344c244]{width:180px;height:180px;background:#a78bfa;top:-40px;left:-30px}.blob-2[data-v-e344c244]{width:140px;height:140px;background:#38bdf8;bottom:20px;right:-20px}.m-login__brand[data-v-e344c244]{position:relative;z-index:1;text-align:center;color:#fff}.m-login__logo[data-v-e344c244]{width:72px;height:72px;margin:0 auto 14px;border-radius:20px;background:#ffffff2e;display:flex;align-items:center;justify-content:center;font-size:36px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.m-login__brand h1[data-v-e344c244]{margin:0 0 6px;font-size:24px;font-weight:800}.m-login__brand p[data-v-e344c244]{margin:0;opacity:.85;font-size:13px}.m-login__sheet[data-v-e344c244]{flex:1;margin-top:-28px;background:#fff;border-radius:28px 28px 0 0;padding:28px 20px calc(24px + env(safe-area-inset-bottom,0px));position:relative;z-index:2}.m-login__sheet h2[data-v-e344c244]{margin:0 0 4px;font-size:20px;font-weight:800;color:#0f172a}.m-login__hint[data-v-e344c244]{margin:0 0 22px;color:#64748b;font-size:13px}.m-login__btn[data-v-e344c244]{height:48px!important;border-radius:14px!important;font-weight:700!important;margin-top:8px;background:linear-gradient(135deg,#4f46e5,#7c3aed)!important;border:none!important}[data-v-e344c244] .ant-input-affix-wrapper,[data-v-e344c244] .ant-input{border-radius:12px!important}
+1
View File
@@ -0,0 +1 @@
import{d as g,u as b,c as w,k as y,a as n,b as a,w as s,r as t,o as h,e as d,f as x,g as k,h as V,i as S,_ as L}from"./index-C4s_T2hP.js";import{M}from"./MailOutlined-DMDnYu7e.js";import{L as N}from"./LockOutlined-C2VUSHin.js";const z={class:"m-login"},B={class:"m-login__sheet"},C=g({__name:"MLoginView",setup(q){const m=S(),u=b(),o=k({email:"admin@luckywheel.local",password:"Admin@SecurePass2026"}),l=V(!1);async function p(){l.value=!0;try{await u.login({email:o.email,password:o.password}),m.push("/m/dashboard")}catch{}finally{l.value=!1}}return(A,e)=>{const _=t("a-input"),r=t("a-form-item"),c=t("a-input-password"),v=t("a-button"),f=t("a-form");return h(),w("div",z,[e[5]||(e[5]=y('<div class="m-login__hero" data-v-e344c244><div class="m-login__blob blob-1" data-v-e344c244></div><div class="m-login__blob blob-2" data-v-e344c244></div><div class="m-login__brand" data-v-e344c244><div class="m-login__logo" data-v-e344c244>🎡</div><h1 data-v-e344c244>گردونه شانس</h1><p data-v-e344c244>پنل مدیریت موبایل</p></div></div>',1)),n("div",B,[e[3]||(e[3]=n("h2",null,"ورود به حساب",-1)),e[4]||(e[4]=n("p",{class:"m-login__hint"},"با حساب ادمین وارد شوید",-1)),a(f,{model:o,layout:"vertical",onFinish:p},{default:s(()=>[a(r,{label:"ایمیل",name:"email",rules:[{required:!0,message:"ایمیل را وارد کنید"},{type:"email",message:"فرمت ایمیل نامعتبر است"}]},{default:s(()=>[a(_,{value:o.email,"onUpdate:value":e[0]||(e[0]=i=>o.email=i),size:"large",placeholder:"admin@example.com"},{prefix:s(()=>[a(d(M),{style:{color:"#6366f1"}})]),_:1},8,["value"])]),_:1}),a(r,{label:"کلمه عبور",name:"password",rules:[{required:!0,message:"کلمه عبور را وارد کنید"}]},{default:s(()=>[a(c,{value:o.password,"onUpdate:value":e[1]||(e[1]=i=>o.password=i),size:"large",placeholder:"••••••••"},{prefix:s(()=>[a(d(N),{style:{color:"#6366f1"}})]),_:1},8,["value"])]),_:1}),a(v,{type:"primary","html-type":"submit",size:"large",block:"",loading:l.value,class:"m-login__btn"},{default:s(()=>[...e[2]||(e[2]=[x(" ورود ",-1)])]),_:1},8,["loading"])]),_:1},8,["model"])])])}}}),F=L(C,[["__scopeId","data-v-e344c244"]]);export{F as default};
+1
View File
@@ -0,0 +1 @@
.m-page[data-v-14adecb4]{padding:12px 14px 88px}.m-banner[data-v-14adecb4]{display:flex;justify-content:space-between;align-items:center;background:#fff;border-radius:16px;padding:14px;margin-bottom:12px;border:1px solid #f1f5f9}.m-banner__title[data-v-14adecb4]{font-weight:800;font-size:15px;color:#0f172a}.m-banner__sub[data-v-14adecb4]{font-size:11px;color:#94a3b8;margin-top:2px}.m-icon-btn[data-v-14adecb4]{width:40px;height:40px;border:none;border-radius:12px;background:#eef2ff;color:#4f46e5;font-size:15px}.m-empty[data-v-14adecb4]{text-align:center;color:#94a3b8;padding:40px 12px}.m-prize-card[data-v-14adecb4]{display:flex;gap:0;background:#fff;border-radius:16px;overflow:hidden;margin-bottom:10px;border:1px solid #f1f5f9}.m-prize-card__color[data-v-14adecb4]{width:8px;flex-shrink:0}.m-prize-card__body[data-v-14adecb4]{flex:1;padding:12px}.m-prize-card__top[data-v-14adecb4]{display:flex;justify-content:space-between;gap:8px;margin-bottom:6px}.m-prize-card__title[data-v-14adecb4]{font-weight:800;font-size:14px;color:#0f172a}.m-prize-card__meta[data-v-14adecb4]{font-size:11px;color:#64748b;margin-bottom:4px}.m-prize-card__actions[data-v-14adecb4]{display:flex;gap:6px;margin-top:10px}.m-action[data-v-14adecb4]{flex:1;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:10px;font-size:11px;font-weight:700;color:#334155;min-height:42px}.m-action.danger[data-v-14adecb4]{color:#ef4444;flex:0 0 48px}.m-fab[data-v-14adecb4]{position:fixed;left:18px;bottom:calc(80px + env(safe-area-inset-bottom,0px));width:56px;height:56px;border:none;border-radius:18px;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;font-size:22px;box-shadow:0 10px 24px #4f46e566;z-index:90}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.m-page[data-v-4a903d28]{padding:12px 14px 24px}.m-filters[data-v-4a903d28]{display:flex;gap:8px;margin-bottom:12px}.m-filters[data-v-4a903d28] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-icon-btn[data-v-4a903d28]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5}.m-kpi-grid[data-v-4a903d28]{display:grid;grid-template-columns:1fr 1fr;gap:10px}.m-kpi[data-v-4a903d28]{background:#fff;border-radius:16px;padding:16px 12px;text-align:center;border:1px solid #f1f5f9;box-shadow:0 2px 10px #0f172a0a}.m-kpi.wide[data-v-4a903d28]{grid-column:1 / -1}.ico[data-v-4a903d28]{font-size:18px;margin-bottom:8px}.ico.indigo[data-v-4a903d28]{color:#4f46e5}.ico.amber[data-v-4a903d28]{color:#d97706}.ico.emerald[data-v-4a903d28]{color:#059669}.ico.violet[data-v-4a903d28]{color:#7c3aed}.ico.blue[data-v-4a903d28]{color:#2563eb}.ico.slate[data-v-4a903d28]{color:#64748b}.val[data-v-4a903d28]{font-size:22px;font-weight:800;color:#0f172a}.lbl[data-v-4a903d28]{font-size:11px;color:#64748b;margin-top:4px;font-weight:600}
+1
View File
@@ -0,0 +1 @@
import{f as n}from"./farsi-number-stB7JMN0.js";import{d as B,l as N,c as w,a as s,b as e,w as v,e as t,R as S,h as m,g as A,n as x,r as u,o as _,F,y as M,U as T,t as o,T as z,x as G,f as D,_ as E}from"./index-C4s_T2hP.js";import{T as U}from"./ThunderboltOutlined-DP1eBOSO.js";import{G as L}from"./GiftOutlined-DgNzKaks.js";import{T as j}from"./TeamOutlined-Cc_Yyb--.js";const q={class:"m-page"},H={class:"m-filters"},J={class:"m-kpi-grid"},K={class:"m-kpi"},P={class:"val"},Q={class:"m-kpi"},W={class:"val"},X={class:"m-kpi"},Y={class:"val"},Z={class:"m-kpi"},$={class:"val"},ss={class:"m-kpi"},as={class:"val"},ts={class:"m-kpi"},es={class:"val"},is={class:"m-kpi wide"},ls={class:"val"},os=B({__name:"MReportView",setup(ns){const c=m(!1),i=m(null),f=m([]),r=A({campaignId:void 0});async function I(){var a;const d=await x.get("/admin/campaigns",{params:{pageSize:100}});f.value=Array.isArray(d.data)?d.data:((a=d.data)==null?void 0:a.data)||[]}async function p(){c.value=!0;try{const d=await x.get("/admin/reports/participation",{params:{campaignId:r.campaignId||void 0}});i.value=d.data}finally{c.value=!1}}return N(()=>{I(),p()}),(d,a)=>{const O=u("a-select-option"),R=u("a-select"),V=u("a-spin");return _(),w("div",q,[s("div",H,[e(R,{value:r.campaignId,"onUpdate:value":a[0]||(a[0]=l=>r.campaignId=l),"allow-clear":"",placeholder:"همه کمپین‌ها",style:{flex:"1"},onChange:p},{default:v(()=>[(_(!0),w(F,null,M(f.value,l=>(_(),G(O,{key:l.id,value:l.id},{default:v(()=>[D(o(l.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"]),s("button",{type:"button",class:"m-icon-btn",onClick:p},[e(t(S),{spin:c.value},null,8,["spin"])])]),e(V,{spinning:c.value},{default:v(()=>{var l,g,b,k,y,h,C;return[s("div",J,[s("div",K,[e(t(T),{class:"ico indigo"}),s("div",P,o(t(n)(((l=i.value)==null?void 0:l.totalUsers)||0)),1),a[1]||(a[1]=s("div",{class:"lbl"},"کل کاربران",-1))]),s("div",Q,[e(t(U),{class:"ico amber"}),s("div",W,o(t(n)(((g=i.value)==null?void 0:g.totalSpins)||0)),1),a[2]||(a[2]=s("div",{class:"lbl"},"کل اسپین",-1))]),s("div",X,[e(t(z),{class:"ico emerald"}),s("div",Y,o(t(n)(((b=i.value)==null?void 0:b.winnersCount)||0)),1),a[3]||(a[3]=s("div",{class:"lbl"},"برندگان",-1))]),s("div",Z,[e(t(L),{class:"ico violet"}),s("div",$,o(t(n)(((k=i.value)==null?void 0:k.totalChancesAllocated)||0)),1),a[4]||(a[4]=s("div",{class:"lbl"},"شانس تخصیص",-1))]),s("div",ss,[e(t(j),{class:"ico blue"}),s("div",as,o(t(n)(((y=i.value)==null?void 0:y.totalChancesUsed)||0)),1),a[5]||(a[5]=s("div",{class:"lbl"},"شانس مصرف",-1))]),s("div",ts,[e(t(T),{class:"ico slate"}),s("div",es,o(t(n)(((h=i.value)==null?void 0:h.zeroSpinUsers)||0)),1),a[6]||(a[6]=s("div",{class:"lbl"},"بدون اسپین",-1))]),s("div",is,[e(t(U),{class:"ico indigo"}),s("div",ls,o(t(n)(((C=i.value)==null?void 0:C.remainingChanceUsers)||0)),1),a[7]||(a[7]=s("div",{class:"lbl"},"کاربران با شانس باقی‌مانده",-1))])])]}),_:1},8,["spinning"])])}}}),ms=E(os,[["__scopeId","data-v-4a903d28"]]);export{ms as default};
+1
View File
@@ -0,0 +1 @@
import{t as k}from"./farsi-number-stB7JMN0.js";import{b as o,I as P,d as V,l as j,c as p,a as u,w as f,e as x,R as B,h as O,g as R,n as I,r as v,o as m,f as y,s as w,F as T,y as $,t as g,z as Q,_ as q}from"./index-C4s_T2hP.js";var G={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"}}]},name:"send",theme:"outlined"};function M(l){for(var a=1;a<arguments.length;a++){var s=arguments[a]!=null?Object(arguments[a]):{},r=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(s).filter(function(c){return Object.getOwnPropertyDescriptor(s,c).enumerable}))),r.forEach(function(c){H(l,c,s[c])})}return l}function H(l,a,s){return a in l?Object.defineProperty(l,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[a]=s,l}var z=function(a,s){var r=M({},a,s.attrs);return o(P,M({},r,{icon:G}),null)};z.displayName="SendOutlined";z.inheritAttrs=!1;const J={class:"m-page"},W={class:"m-filters"},X={class:"m-filters__row"},Y={key:0,class:"m-empty"},Z={class:"m-card__top"},K={class:"mobile",dir:"ltr"},ee={class:"m-card__msg"},te={class:"m-card__meta"},ae={key:0,class:"m-card__err"},se=["disabled","onClick"],ne={key:1,class:"m-pager"},oe=V({__name:"MSmsLogView",setup(l){const a=O(!1),s=O([]),r=O(0),c=O(null),n=R({page:1,pageSize:10,mobile:"",status:void 0}),D={SENT:{text:"ارسال شد",color:"success"},QUEUED:{text:"صف",color:"processing"},FAILED:{text:"ناموفق",color:"error"}};async function b(){var i,t,S,_;a.value=!0;try{const d=await I.get("/admin/sms-logs",{params:{page:n.page,pageSize:n.pageSize,mobile:n.mobile||void 0,status:n.status||void 0}}),h=Array.isArray(d.data)?d.data:((i=d.data)==null?void 0:i.data)||[];s.value=h,r.value=((t=d.meta)==null?void 0:t.total)||((_=(S=d.data)==null?void 0:S.meta)==null?void 0:_.total)||h.length}finally{a.value=!1}}async function A(i){c.value=i;try{await I.post(`/admin/sms-logs/${i}/resend`),Q.success("ارسال مجدد انجام شد"),b()}finally{c.value=null}}function L(){n.page=1,b()}function N(i){return i?k(new Date(i).toLocaleDateString("fa-IR",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})):"—"}return j(b),(i,t)=>{const S=v("a-input"),_=v("a-select-option"),d=v("a-select"),h=v("a-tag"),U=v("a-pagination"),F=v("a-spin");return m(),p("div",J,[u("div",W,[o(S,{value:n.mobile,"onUpdate:value":t[0]||(t[0]=e=>n.mobile=e),"allow-clear":"",placeholder:"شماره موبایل...",onPressEnter:L},null,8,["value"]),u("div",X,[o(d,{value:n.status,"onUpdate:value":t[1]||(t[1]=e=>n.status=e),"allow-clear":"",placeholder:"وضعیت",style:{flex:"1"},onChange:L},{default:f(()=>[o(_,{value:"SENT"},{default:f(()=>[...t[3]||(t[3]=[y("ارسال شد",-1)])]),_:1}),o(_,{value:"QUEUED"},{default:f(()=>[...t[4]||(t[4]=[y("صف",-1)])]),_:1}),o(_,{value:"FAILED"},{default:f(()=>[...t[5]||(t[5]=[y("ناموفق",-1)])]),_:1})]),_:1},8,["value"]),u("button",{type:"button",class:"m-icon-btn",onClick:b},[o(x(B),{spin:a.value},null,8,["spin"])])])]),o(F,{spinning:a.value},{default:f(()=>[!s.value.length&&!a.value?(m(),p("div",Y,"لاگی یافت نشد")):w("",!0),(m(!0),p(T,null,$(s.value,e=>{var C;return m(),p("div",{key:e.id,class:"m-card"},[u("div",Z,[u("span",K,g(x(k)(e.mobile)),1),o(h,{color:((C=D[e.status])==null?void 0:C.color)||"default"},{default:f(()=>{var E;return[y(g(((E=D[e.status])==null?void 0:E.text)||e.status),1)]}),_:2},1032,["color"])]),u("div",ee,g(e.message),1),u("div",te,[u("span",null,g(e.provider||"—"),1),u("span",null,g(N(e.createdAt)),1)]),e.errorMessage?(m(),p("div",ae,g(e.errorMessage),1)):w("",!0),e.status==="FAILED"?(m(),p("button",{key:1,type:"button",class:"m-resend",disabled:c.value===e.id,onClick:E=>A(e.id)},[o(x(z)),t[6]||(t[6]=y(" ارسال مجدد ",-1))],8,se)):w("",!0)])}),128)),r.value>n.pageSize?(m(),p("div",ne,[o(U,{current:n.page,"onUpdate:current":t[2]||(t[2]=e=>n.page=e),total:r.value,"page-size":n.pageSize,size:"small",onChange:b},null,8,["current","total","page-size"])])):w("",!0)]),_:1},8,["spinning"])])}}}),ie=q(oe,[["__scopeId","data-v-fe6c23bf"]]);export{ie as default};
+1
View File
@@ -0,0 +1 @@
.m-page[data-v-fe6c23bf]{padding:12px 14px 24px}.m-filters[data-v-fe6c23bf]{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}.m-filters__row[data-v-fe6c23bf]{display:flex;gap:8px}.m-filters[data-v-fe6c23bf] .ant-input,.m-filters[data-v-fe6c23bf] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-icon-btn[data-v-fe6c23bf]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5}.m-empty[data-v-fe6c23bf]{text-align:center;color:#94a3b8;padding:40px}.m-card[data-v-fe6c23bf]{background:#fff;border-radius:14px;padding:12px;margin-bottom:8px;border:1px solid #f1f5f9}.m-card__top[data-v-fe6c23bf]{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.mobile[data-v-fe6c23bf]{font-weight:800;color:#0f172a;font-size:13px}.m-card__msg[data-v-fe6c23bf]{font-size:12px;color:#334155;line-height:1.6;margin-bottom:8px}.m-card__meta[data-v-fe6c23bf]{display:flex;justify-content:space-between;font-size:11px;color:#94a3b8}.m-card__err[data-v-fe6c23bf]{margin-top:8px;font-size:11px;color:#ef4444;background:#fef2f2;padding:8px;border-radius:8px}.m-resend[data-v-fe6c23bf]{margin-top:10px;width:100%;border:none;background:#eef2ff;color:#4f46e5;border-radius:10px;padding:10px;font-weight:700;font-size:12px;min-height:42px}.m-pager[data-v-fe6c23bf]{display:flex;justify-content:center;padding:12px 0}
+1
View File
@@ -0,0 +1 @@
.m-page[data-v-bff371ec]{padding:12px 14px 24px}.m-filters[data-v-bff371ec]{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}.m-filters__row[data-v-bff371ec]{display:flex;gap:8px}.m-filters[data-v-bff371ec] .ant-input-affix-wrapper,.m-filters[data-v-bff371ec] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-icon-btn[data-v-bff371ec]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5;box-shadow:0 2px 8px #0f172a0f}.m-empty[data-v-bff371ec]{text-align:center;color:#94a3b8;padding:40px}.m-card[data-v-bff371ec]{background:#fff;border-radius:14px;padding:12px;margin-bottom:8px;border:1px solid #f1f5f9}.m-card__top[data-v-bff371ec]{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.m-card__user[data-v-bff371ec]{border:none;background:transparent;padding:0;font-weight:800;color:#4f46e5;font-size:13px}.m-pill[data-v-bff371ec]{font-size:10px;font-weight:700;padding:3px 8px;border-radius:999px}.m-pill.win[data-v-bff371ec]{background:#ecfdf5;color:#059669}.m-pill.lose[data-v-bff371ec]{background:#f1f5f9;color:#64748b}.m-card__line[data-v-bff371ec]{font-size:12px;color:#334155;margin-bottom:2px}.m-card__meta[data-v-bff371ec]{display:flex;justify-content:space-between;margin-top:8px;font-size:11px;color:#94a3b8}.m-pager[data-v-bff371ec]{display:flex;justify-content:center;padding:12px 0}
+1
View File
@@ -0,0 +1 @@
import{t as A}from"./farsi-number-stB7JMN0.js";import{d as U,l as E,c as r,a as s,b as c,w as v,e as f,R as O,h,g as W,n as V,r as p,o,S as $,F as D,y as N,s as B,i as P,x as T,f as j,t as l,N as q,_ as G}from"./index-C4s_T2hP.js";const H={class:"m-page"},J={class:"m-filters"},K={class:"m-filters__row"},Q={key:0,class:"m-empty"},X={class:"m-card__top"},Y=["onClick"],Z={class:"m-card__line"},aa={class:"m-card__line"},ea={class:"m-card__meta"},ta={dir:"ltr"},sa={key:1,class:"m-pager"},na=U({__name:"MSpinListView",setup(ia){const L=P(),d=h(!1),y=h([]),S=h(0),C=h([]),e=W({page:1,pageSize:10,campaignId:void 0,search:""});async function R(){var t;const n=await V.get("/admin/campaigns",{params:{pageSize:100}});C.value=Array.isArray(n.data)?n.data:((t=n.data)==null?void 0:t.data)||[]}async function u(){var n,t,_,m;d.value=!0;try{const i=await V.get("/admin/spins",{params:{page:e.page,pageSize:e.pageSize,campaignId:e.campaignId||void 0,search:e.search||void 0}}),g=Array.isArray(i.data)?i.data:((n=i.data)==null?void 0:n.data)||[];y.value=g,S.value=((t=i.meta)==null?void 0:t.total)||((m=(_=i.data)==null?void 0:_.meta)==null?void 0:m.total)||g.length}finally{d.value=!1}}function w(){e.page=1,u()}function F(n){return n?A(new Date(n).toLocaleDateString("fa-IR",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})):"—"}return E(()=>{R(),u()}),(n,t)=>{const _=p("a-input"),m=p("a-select-option"),i=p("a-select"),g=p("a-pagination"),M=p("a-spin");return o(),r("div",H,[s("div",J,[c(_,{value:e.search,"onUpdate:value":t[0]||(t[0]=a=>e.search=a),"allow-clear":"",placeholder:"موبایل کاربر...",onPressEnter:w},{prefix:v(()=>[c(f($),{style:{color:"#94a3b8"}})]),_:1},8,["value"]),s("div",K,[c(i,{value:e.campaignId,"onUpdate:value":t[1]||(t[1]=a=>e.campaignId=a),"allow-clear":"",placeholder:"کمپین",style:{flex:"1"},onChange:w},{default:v(()=>[(o(!0),r(D,null,N(C.value,a=>(o(),T(m,{key:a.id,value:a.id},{default:v(()=>[j(l(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"]),s("button",{type:"button",class:"m-icon-btn",onClick:u},[c(f(O),{spin:d.value},null,8,["spin"])])])]),c(M,{spinning:d.value},{default:v(()=>[!y.value.length&&!d.value?(o(),r("div",Q,"اسپینی یافت نشد")):B("",!0),(o(!0),r(D,null,N(y.value,a=>{var z,k,b,x;return o(),r("div",{key:a.id,class:"m-card"},[s("div",X,[s("button",{type:"button",class:"m-card__user",onClick:oa=>{var I;return((I=a.user)==null?void 0:I.id)&&f(L).push(`/m/users/${a.user.id}`)}},l(((z=a.user)==null?void 0:z.name)||f(A)(((k=a.user)==null?void 0:k.mobile)||"—")),9,Y),s("span",{class:q(["m-pill",a.isWin?"win":"lose"])},l(a.isWin?"برد":"باخت"),3)]),s("div",Z,l(((b=a.campaign)==null?void 0:b.title)||"—"),1),s("div",aa,"جایزه: "+l(((x=a.prize)==null?void 0:x.title)||"—"),1),s("div",ea,[s("span",ta,l(a.ipAddress||"—"),1),s("span",null,l(F(a.createdAt)),1)])])}),128)),S.value>e.pageSize?(o(),r("div",sa,[c(g,{current:e.page,"onUpdate:current":t[2]||(t[2]=a=>e.page=a),total:S.value,"page-size":e.pageSize,size:"small",onChange:u},null,8,["current","total","page-size"])])):B("",!0)]),_:1},8,["spinning"])])}}}),ca=G(na,[["__scopeId","data-v-bff371ec"]]);export{ca as default};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.m-page[data-v-a4d5a217]{padding:12px 14px 24px}.m-profile[data-v-a4d5a217]{background:#fff;border-radius:18px;padding:20px 16px;text-align:center;border:1px solid #f1f5f9;margin-bottom:12px}.m-profile__avatar[data-v-a4d5a217]{width:64px;height:64px;margin:0 auto 10px;border-radius:20px;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800}.m-profile__name[data-v-a4d5a217]{font-size:17px;font-weight:800;color:#0f172a}.m-profile__mobile[data-v-a4d5a217]{font-size:13px;color:#64748b;direction:ltr;margin-top:4px}.m-profile__meta[data-v-a4d5a217]{display:flex;justify-content:center;gap:10px;margin-top:10px;font-size:11px;color:#94a3b8}.m-profile__meta .ok[data-v-a4d5a217]{color:#059669;font-weight:700}.m-profile__meta .bad[data-v-a4d5a217]{color:#ef4444;font-weight:700}.m-profile__actions[data-v-a4d5a217]{display:flex;gap:8px;margin-top:14px}.m-btn[data-v-a4d5a217]{flex:1;border:none;border-radius:12px;min-height:44px;font-weight:700;font-size:12px;display:inline-flex;align-items:center;justify-content:center;gap:6px}.m-btn.ghost[data-v-a4d5a217]{background:#f1f5f9;color:#334155}.m-btn.primary[data-v-a4d5a217]{background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff}.m-tabs[data-v-a4d5a217]{display:flex;background:#fff;border-radius:14px;padding:4px;margin-bottom:12px;gap:4px}.m-tabs button[data-v-a4d5a217]{flex:1;border:none;background:transparent;border-radius:10px;padding:10px;font-size:12px;font-weight:700;color:#64748b;min-height:40px}.m-tabs button.active[data-v-a4d5a217]{background:#eef2ff;color:#4f46e5}.m-card[data-v-a4d5a217]{background:#fff;border-radius:14px;padding:14px;margin-bottom:8px;border:1px solid #f1f5f9}.m-card__title[data-v-a4d5a217]{font-weight:800;font-size:14px;margin-bottom:8px;color:#0f172a}.m-card__row[data-v-a4d5a217]{display:flex;justify-content:space-between;font-size:12px;color:#64748b;margin-bottom:4px}.m-card__row strong[data-v-a4d5a217]{color:#0f172a}.m-link[data-v-a4d5a217]{margin-top:8px;border:none;background:#eef2ff;color:#4f46e5;border-radius:10px;width:100%;padding:10px;font-weight:700;font-size:12px}.m-empty[data-v-a4d5a217]{text-align:center;color:#94a3b8;padding:28px;font-size:13px}
+1
View File
@@ -0,0 +1 @@
.m-page[data-v-f3a13232]{padding:12px 14px 24px}.m-search-bar[data-v-f3a13232]{display:flex;gap:8px;margin-bottom:12px}.m-search-bar[data-v-f3a13232] .ant-input-affix-wrapper,.m-search-bar[data-v-f3a13232] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-empty[data-v-f3a13232]{text-align:center;color:#94a3b8;padding:48px 12px}.m-user-card[data-v-f3a13232]{display:flex;gap:12px;background:#fff;border-radius:16px;padding:14px;margin-bottom:10px;border:1px solid #f1f5f9}.m-user-card__avatar[data-v-f3a13232]{width:44px;height:44px;border-radius:14px;flex-shrink:0;background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800}.m-user-card__body[data-v-f3a13232]{flex:1;min-width:0}.m-user-card__top[data-v-f3a13232]{display:flex;justify-content:space-between;gap:8px}.m-user-card__name[data-v-f3a13232]{font-weight:800;font-size:14px;color:#0f172a}.m-user-card__mobile[data-v-f3a13232]{font-size:12px;color:#64748b;direction:ltr;text-align:right}.m-badge[data-v-f3a13232]{font-size:10px;font-weight:700;padding:3px 8px;border-radius:999px;height:fit-content}.m-badge.active[data-v-f3a13232]{background:#ecfdf5;color:#059669}.m-badge.blocked[data-v-f3a13232]{background:#fef2f2;color:#ef4444}.m-user-card__meta[data-v-f3a13232]{font-size:11px;color:#94a3b8;margin:8px 0}.m-user-card__actions[data-v-f3a13232]{display:flex;gap:6px}.m-action[data-v-f3a13232]{flex:1;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:10px 4px;font-size:11px;font-weight:700;color:#334155;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:42px}.m-pager[data-v-f3a13232]{display:flex;justify-content:center;padding:12px 0}.m-drawer-hint[data-v-f3a13232]{color:#64748b;margin-bottom:12px}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.m-page[data-v-19b853da]{padding:12px 14px 24px}.m-filters[data-v-19b853da]{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}.m-filters__row[data-v-19b853da]{display:flex;gap:6px}.m-filters[data-v-19b853da] .ant-input-affix-wrapper,.m-filters[data-v-19b853da] .ant-select-selector{border-radius:12px!important;min-height:42px!important}.m-icon-btn[data-v-19b853da]{width:42px;height:42px;border:none;border-radius:12px;background:#fff;color:#4f46e5}.m-empty[data-v-19b853da]{text-align:center;color:#94a3b8;padding:40px}.m-card[data-v-19b853da]{background:#fff;border-radius:14px;padding:12px;margin-bottom:8px;border:1px solid #f1f5f9}.m-card__top[data-v-19b853da]{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.m-card__user[data-v-19b853da]{border:none;background:transparent;padding:0;font-weight:800;color:#4f46e5;font-size:13px}.m-card__line[data-v-19b853da]{font-size:12px;color:#334155}.m-card__meta[data-v-19b853da]{display:flex;justify-content:space-between;align-items:center;margin-top:8px;font-size:11px;color:#94a3b8}.m-code[data-v-19b853da]{border:none;background:#f8fafc;color:#4f46e5;border-radius:8px;padding:4px 8px;font-size:11px;direction:ltr}.m-edit[data-v-19b853da]{margin-top:10px;width:100%;border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:10px;font-weight:700;font-size:12px;color:#334155;min-height:42px}.m-pager[data-v-19b853da]{display:flex;justify-content:center;padding:12px 0}.hint[data-v-19b853da]{color:#64748b;margin-bottom:12px;font-size:12px}
+1
View File
@@ -0,0 +1 @@
import{b as c,I as u}from"./index-C4s_T2hP.js";var o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};function l(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.forEach(function(a){f(r,a,e[a])})}return r}function f(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var i=function(t,e){var n=l({},t,e.attrs);return c(u,l({},n,{icon:o}),null)};i.displayName="MailOutlined";i.inheritAttrs=!1;export{i as M};
+1
View File
@@ -0,0 +1 @@
import{b as i,I as u}from"./index-C4s_T2hP.js";var s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};function a(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},n=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(c){return Object.getOwnPropertyDescriptor(t,c).enumerable}))),n.forEach(function(c){o(r,c,t[c])})}return r}function o(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var l=function(e,t){var n=a({},e,t.attrs);return i(u,a({},n,{icon:s}),null)};l.displayName="PlusCircleOutlined";l.inheritAttrs=!1;export{l as P};
+1
View File
@@ -0,0 +1 @@
.action-more-btn[data-v-dc4d27c1]{color:#64748b;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;transition:all .2s ease}.action-more-btn[data-v-dc4d27c1]:hover{color:#4f46e5!important;background-color:#eef2ff!important}.dropdown-action-item[data-v-dc4d27c1]{display:flex;align-items:center;gap:8px;color:#334155;text-decoration:none;font-size:13px}.dropdown-item-icon[data-v-dc4d27c1]{font-size:14px}.text-danger[data-v-dc4d27c1]{color:#ef4444}.prize-modal-form[data-v-dc4d27c1] .ant-form-item{margin-bottom:12px}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.page-header-title[data-v-ee1ef293]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-ee1ef293]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-ee1ef293]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-ee1ef293]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.kpi-card[data-v-ee1ef293]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9;transition:all .25s ease}.kpi-card[data-v-ee1ef293]:hover{transform:translateY(-2px);box-shadow:0 6px 16px #00000012}.kpi-flex[data-v-ee1ef293]{display:flex;align-items:center;gap:16px}.kpi-icon-box[data-v-ee1ef293]{width:52px;height:52px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:24px;flex-shrink:0}.icon-indigo[data-v-ee1ef293]{background:#eef2ff;color:#4f46e5}.icon-sky[data-v-ee1ef293]{background:#f0f9ff;color:#0284c7}.icon-emerald[data-v-ee1ef293]{background:#ecfdf5;color:#059669}.icon-purple[data-v-ee1ef293]{background:#faf5ff;color:#9333ea}.icon-amber[data-v-ee1ef293]{background:#fffbeb;color:#d97706}.icon-rose[data-v-ee1ef293]{background:#fff1f2;color:#e11d48}.icon-teal[data-v-ee1ef293]{background:#f0fdfa;color:#0d9488}.kpi-details[data-v-ee1ef293]{display:flex;flex-direction:column}.kpi-label[data-v-ee1ef293]{font-size:13px;color:#64748b;font-weight:500}.kpi-value[data-v-ee1ef293]{font-size:22px;font-weight:700;color:#0f172a;line-height:1.2;margin:2px 0 0}.filters-header[data-v-ee1ef293]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}.filters[data-v-ee1ef293]{display:flex;gap:12px}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.page-header-title[data-v-1ae7a208]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-1ae7a208]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-1ae7a208]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-1ae7a208]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-1ae7a208]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.filters[data-v-1ae7a208]{display:flex;gap:12px}.code-badge[data-v-1ae7a208]{background:#f8fafc;border:1px solid #e2e8f0;padding:2px 6px;border-radius:4px;font-family:monospace;font-size:11px;color:#64748b}.num-cell[data-v-1ae7a208],.date-cell[data-v-1ae7a208]{color:#334155;font-size:13px}.text-danger[data-v-1ae7a208]{color:#ef4444;font-size:12px}.text-muted[data-v-1ae7a208]{color:#94a3b8}.status-tag[data-v-1ae7a208]{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:20px;font-weight:500}.status-dot[data-v-1ae7a208]{width:6px;height:6px;border-radius:50%;display:inline-block}.action-more-btn[data-v-1ae7a208]{color:#64748b;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;transition:all .2s ease}.action-more-btn[data-v-1ae7a208]:hover{background-color:#eef2ff!important}
+1
View File
@@ -0,0 +1 @@
.page-header-title[data-v-e3a0055c]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-e3a0055c]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-e3a0055c]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-e3a0055c]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-e3a0055c]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;flex-wrap:wrap;gap:12px}.filters[data-v-e3a0055c]{display:flex;gap:12px}.mobile-cell[data-v-e3a0055c]{font-weight:600;color:#1e293b}.user-mobile-link[data-v-e3a0055c]{cursor:pointer;transition:color .15s ease}.user-mobile-link[data-v-e3a0055c]:hover{color:#4f46e5}.user-name[data-v-e3a0055c],.prize-text[data-v-e3a0055c]{font-weight:500;color:#1e293b}.code-badge[data-v-e3a0055c]{background:#f8fafc;border:1px solid #e2e8f0;padding:2px 6px;border-radius:4px;font-family:monospace;font-size:11px;color:#64748b}.num-cell[data-v-e3a0055c],.date-cell[data-v-e3a0055c]{color:#334155;font-size:13px}.text-muted[data-v-e3a0055c]{color:#94a3b8}.status-tag[data-v-e3a0055c]{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:20px;font-weight:500}.status-dot[data-v-e3a0055c]{width:6px;height:6px;border-radius:50%;display:inline-block}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{b as u,I as l}from"./index-C4s_T2hP.js";var o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};function c(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(t).filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),a.forEach(function(n){f(r,n,t[n])})}return r}function f(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var i=function(e,t){var a=c({},e,t.attrs);return u(l,c({},a,{icon:o}),null)};i.displayName="TeamOutlined";i.inheritAttrs=!1;export{i as T};
@@ -0,0 +1 @@
import{b as o,I as c}from"./index-C4s_T2hP.js";var i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"};function l(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.forEach(function(a){f(r,a,e[a])})}return r}function f(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var u=function(t,e){var n=l({},t,e.attrs);return o(c,l({},n,{icon:i}),null)};u.displayName="ThunderboltOutlined";u.inheritAttrs=!1;export{u as T};
+1
View File
@@ -0,0 +1 @@
import{b as o,I as i}from"./index-C4s_T2hP.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zm-40 376H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"unlock",theme:"outlined"};function a(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(e).filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),r.forEach(function(c){f(n,c,e[c])})}return n}function f(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var l=function(t,e){var r=a({},t,e.attrs);return o(i,a({},r,{icon:u}),null)};l.displayName="UnlockOutlined";l.inheritAttrs=!1;export{l as U};
+1
View File
@@ -0,0 +1 @@
import{b as o,I as i}from"./index-C4s_T2hP.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};function c(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.forEach(function(a){f(r,a,e[a])})}return r}function f(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}var l=function(t,e){var n=c({},t,e.attrs);return o(i,c({},n,{icon:u}),null)};l.displayName="UploadOutlined";l.inheritAttrs=!1;export{l as U};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.detail-header[data-v-8d59632b]{background:#fff;margin-bottom:20px;border-radius:12px;border:1px solid #f1f5f9;box-shadow:0 1px 3px #0000000a}.section-card[data-v-8d59632b]{border-radius:12px;border:1px solid #f1f5f9;box-shadow:0 1px 3px #0000000a}.detail-tabs[data-v-8d59632b]{background:#fff;padding:16px;border-radius:12px;border:1px solid #f1f5f9;box-shadow:0 1px 3px #0000000a}.code-badge[data-v-8d59632b]{background:#f1f5f9;padding:2px 6px;border-radius:4px;font-family:monospace;font-size:12px;color:#334155}.num-cell[data-v-8d59632b],.date-cell[data-v-8d59632b]{color:#334155;font-size:13px}.action-text-btn[data-v-8d59632b]{color:#4f46e5!important;font-size:12px;font-weight:500;border-radius:6px;transition:all .2s ease}.action-text-btn[data-v-8d59632b]:hover{background-color:#eef2ff!important}.text-muted[data-v-8d59632b]{color:#cbd5e1}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
.page-header-title[data-v-fd1c9633]{margin-bottom:20px}.page-header-title .title[data-v-fd1c9633]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-fd1c9633]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-fd1c9633]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-fd1c9633]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.filters[data-v-fd1c9633]{display:flex;gap:12px}.user-mobile-link[data-v-fd1c9633]{font-weight:600;color:#1e293b;cursor:pointer;transition:color .15s ease}.user-mobile-link[data-v-fd1c9633]:hover{color:#4f46e5}.user-name[data-v-fd1c9633]{font-weight:500;color:#334155}.num-cell[data-v-fd1c9633],.date-cell[data-v-fd1c9633]{color:#334155;font-size:13px}.status-tag[data-v-fd1c9633]{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:20px;font-weight:500}.status-dot[data-v-fd1c9633]{width:6px;height:6px;border-radius:50%;display:inline-block}.action-more-btn[data-v-fd1c9633]{color:#64748b;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;transition:all .2s ease}.action-more-btn[data-v-fd1c9633]:hover{color:#4f46e5!important;background-color:#eef2ff!important}.dropdown-action-item[data-v-fd1c9633]{display:flex;align-items:center;gap:8px;color:#334155;text-decoration:none;font-size:13px}.dropdown-item-icon[data-v-fd1c9633]{font-size:14px}.text-success[data-v-fd1c9633]{color:#10b981}.text-danger[data-v-fd1c9633]{color:#ef4444}
+1
View File
@@ -0,0 +1 @@
.page-header-title[data-v-4e0bbbf1]{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}.page-header-title .title[data-v-4e0bbbf1]{font-size:20px;font-weight:700;color:#0f172a;margin:0;letter-spacing:-.3px}.page-header-title .subtitle[data-v-4e0bbbf1]{font-size:13px;color:#64748b;margin:4px 0 0}.main-card[data-v-4e0bbbf1]{border-radius:12px;box-shadow:0 1px 3px #0000000a;border:1px solid #f1f5f9}.table-header[data-v-4e0bbbf1]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;flex-wrap:wrap;gap:12px}.filters[data-v-4e0bbbf1]{display:flex;gap:12px}.mobile-cell[data-v-4e0bbbf1]{font-weight:600;color:#1e293b}.user-link[data-v-4e0bbbf1]{cursor:pointer;transition:color .15s ease}.user-link[data-v-4e0bbbf1]:hover{color:#4f46e5}.user-name[data-v-4e0bbbf1]{font-weight:500;color:#334155}.campaign-cell[data-v-4e0bbbf1]{color:#475569}.prize-text[data-v-4e0bbbf1]{font-weight:600;color:#1e293b}.code-badge[data-v-4e0bbbf1]{background:#f8fafc;border:1px solid #e2e8f0;padding:2px 6px;border-radius:4px;font-family:monospace;font-size:12px;color:#475569}.clickable-code[data-v-4e0bbbf1]{cursor:pointer;transition:all .15s ease}.clickable-code[data-v-4e0bbbf1]:hover{background:#eef2ff;border-color:#c7d2fe;color:#4f46e5}.date-cell[data-v-4e0bbbf1]{color:#334155;font-size:13px}.text-muted[data-v-4e0bbbf1]{color:#94a3b8}.status-tag[data-v-4e0bbbf1]{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:20px;font-weight:500}.status-dot[data-v-4e0bbbf1]{width:6px;height:6px;border-radius:50%;display:inline-block}.action-more-btn[data-v-4e0bbbf1]{color:#64748b;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;transition:all .2s ease}.action-more-btn[data-v-4e0bbbf1]:hover{color:#4f46e5!important;background-color:#eef2ff!important}.dropdown-action-item[data-v-4e0bbbf1]{display:flex;align-items:center;gap:8px;color:#334155;text-decoration:none;font-size:13px}.dropdown-item-icon[data-v-4e0bbbf1]{font-size:14px}
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import{b as c,I as s}from"./index-C4s_T2hP.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224 0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"}}]},name:"pause-circle",theme:"outlined"};function i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){f(e,o,n[o])})}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(t,n){var r=i({},t,n.attrs);return c(s,i({},r,{icon:u}),null)};a.displayName="PauseCircleOutlined";a.inheritAttrs=!1;const l="http://localhost:5174";function p(){if(typeof window>"u")return!1;const e=String(window.location.href||""),t=String(window.location.hostname||""),n=String(window.location.port||"");return!!(e.includes("localhost")||e.includes("127.0.0.1")||e.includes("[::1]")||t==="localhost"||t==="127.0.0.1"||t==="[::1]"||n==="5173"||n==="5174"||n==="8080")}function d(e){const t=String(e||"").trim().replace(/^\/+/,"");if(!t)return"";if(/^https?:\/\//i.test(t)||t.includes("wheel.montest.ir"))try{const r=(/^https?:\/\//i.test(t)?new URL(t):new URL(`https://${t}`)).pathname.split("/").filter(Boolean);return r[r.length-1]||""}catch{const n=t.split("/").filter(Boolean);return n[n.length-1]||t}return t}function h(e){const t=d(e);return p()?t?`${l}/${t}`:`${l}/`:t?`/${t}`:"/"}function m(e){if(typeof window>"u")return;const t=h(e);console.log("CLICKED WHEEL LINK:",t),window.open(t,"_blank","noopener,noreferrer")}export{a as P,h as g,m as o};
+1
View File
@@ -0,0 +1 @@
const i=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"];function o(r){return r==null||typeof r=="object"&&r!==null&&"value"in r&&(r=r.value,r==null)||typeof r=="object"?"":String(r).replace(/[0-9]/g,t=>i[+t]).replace(/[٠-٩]/g,t=>i[t.charCodeAt(0)-1632])}function f(r){if(r==null||r===""||typeof r=="object"&&r!==null&&"value"in r&&(r=r.value,r==null||r==="")||typeof r=="object")return"";const t=typeof r=="string"?parseFloat(u(r)):r;if(isNaN(t))return o(r);const e=new Intl.NumberFormat("fa-IR").format(t);return o(e)}function u(r){return r==null?"":String(r).replace(/[۰-۹]/g,t=>String(t.charCodeAt(0)-1776)).replace(/[٠-٩]/g,t=>String(t.charCodeAt(0)-1632))}function s(r,t=0){if(r==null||r==="")return t;if(typeof r=="number")return isNaN(r)?t:r;const e=u(r).replace(/[^0-9.-]/g,""),n=Number(e);return isNaN(n)?t:n}export{u as a,f,s as p,o as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
var L=(A=>(A.CLASSIC_CASINO="CLASSIC_CASINO",A.NEON_CYBER="NEON_CYBER",A.MINIMAL_FLAT="MINIMAL_FLAT",A.LUXURY_GOLD="LUXURY_GOLD",A.PLAYFUL_CARTOON="PLAYFUL_CARTOON",A.RUSTIC_WOOD="RUSTIC_WOOD",A.GALAXY_SPACE="GALAXY_SPACE",A.CANDY_LAND="CANDY_LAND",A.FIRE_FLAME="FIRE_FLAME",A.CRYSTAL_ICE="CRYSTAL_ICE",A))(L||{});export{L as W};
File diff suppressed because one or more lines are too long
+39
View File
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, maximum-scale=1.0, user-scalable=no" />
<meta name="theme-color" content="#4f46e5" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="گردونه شانس" />
<meta name="mobile-web-app-capable" content="yes" />
<title>پنل مدیریت گردونه شانس و قرعه‌کشی</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<style>
* {
font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
-webkit-tap-highlight-color: transparent;
}
html, body {
margin: 0;
padding: 0;
background-color: #f0f2f5;
direction: rtl;
overscroll-behavior: none;
}
#app {
min-height: 100%;
min-height: 100dvh;
}
</style>
<script type="module" crossorigin src="/assets/index-C4s_T2hP.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-S1RRhVeD.css">
</head>
<body>
<div id="app"></div>
</body>
</html>
+19 -5
View File
@@ -1,9 +1,18 @@
server {
listen 80;
server_name localhost;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Docker's embedded DNS. Without re-resolving at request time, nginx caches the
# api container's IP from startup and keeps returning 502 ("no live upstreams")
# after the api container restarts with a new IP.
resolver 127.0.0.11 valid=10s ipv6=off;
location /api/ {
proxy_pass http://api:3000/api/;
set $api_upstream http://luckywheel-api:3000;
proxy_pass $api_upstream$request_uri;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
@@ -15,7 +24,8 @@ server {
}
location /uploads/ {
proxy_pass http://api:3000/uploads/;
set $api_upstream http://luckywheel-api:3000;
proxy_pass $api_upstream$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -23,8 +33,12 @@ server {
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg)$ {
expires 6M;
access_log off;
add_header Cache-Control "public";
}
}
+4
View File
@@ -0,0 +1,4 @@
*
!release/
!release/**
!Dockerfile
+12 -21
View File
@@ -1,28 +1,19 @@
FROM node:20-alpine AS builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN apk add --no-cache openssl
RUN corepack enable pnpm
FROM docker.arvancloud.ir/node:20-bookworm
# Pre-built on the developer machine:
# pnpm build:release
# NOTE: full "bookworm" (not -slim/-alpine) on purpose — Prisma's query engine
# links against libssl.so.3, which the slim/alpine variants do not ship, and the
# deploy host cannot reach apt/apk mirrors to install it.
WORKDIR /app
COPY . .
ENV NODE_ENV=production
# Vendored Prisma lives in ./vendor (not node_modules — that path is gitignored)
ENV NODE_PATH=/app/vendor
ENV PRISMA_QUERY_ENGINE_LIBRARY=/app/vendor/.prisma/client/libquery_engine-debian-openssl-3.0.x.so.node
RUN pnpm install --frozen-lockfile
RUN pnpm --filter @lucky-wheel/api exec prisma generate
RUN pnpm run build:types
RUN pnpm --filter @lucky-wheel/api build
RUN pnpm deploy --filter @lucky-wheel/api --prod /prod/api
RUN cp -r /app/node_modules/.pnpm/@prisma+client* /prod/api/node_modules/.pnpm/
FROM node:20-alpine AS runner
RUN apk add --no-cache openssl
WORKDIR /app
COPY --from=builder /prod/api .
COPY release/ ./
EXPOSE 3000
CMD ["node", "dist/src/main"]
CMD ["node", "app.js"]
+40
View File
@@ -0,0 +1,40 @@
/**
* esbuild config for Docker release bundle (apps/api/release/app.js).
* Used by: node scripts/bundle-release.cjs
*/
const path = require('path');
const { createRequire } = require('module');
const requireFromApi = createRequire(path.join(__dirname, 'package.json'));
module.exports = {
entryPoints: [path.join(__dirname, 'dist/src/main.js')],
outfile: path.join(__dirname, 'release/app.js'),
bundle: true,
platform: 'node',
target: 'node20',
format: 'cjs',
// Prisma ships native binaries — keep out of the JS bundle and vendor into release/
// Nest optional peers are required dynamically and are not used by this API.
external: [
'@prisma/client',
'.prisma/client',
'@nestjs/microservices',
'@nestjs/microservices/*',
'@nestjs/websockets',
'@nestjs/websockets/*',
'msgpackr-extract',
],
plugins: [
{
name: 'class-transformer-storage',
setup(build) {
build.onResolve({ filter: /^class-transformer\/storage$/ }, () => ({
path: requireFromApi.resolve('class-transformer/cjs/storage.js'),
}));
},
},
],
sourcemap: false,
logLevel: 'info',
};
+4 -2
View File
@@ -4,6 +4,7 @@
"private": true,
"scripts": {
"build": "nest build",
"build:release": "pnpm exec prisma generate && node scripts/clean-dist.cjs && nest build && node scripts/bundle-release.cjs",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start:dev": "nest start --watch",
@@ -30,7 +31,7 @@
"@nestjs/swagger": "^7.3.1",
"@nestjs/throttler": "^5.1.2",
"@prisma/client": "^5.14.0",
"bcrypt": "^5.1.1",
"bcryptjs": "^3.0.3",
"bullmq": "^5.7.8",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
@@ -48,7 +49,7 @@
"@nestjs/cli": "^10.3.2",
"@nestjs/schematics": "^10.1.1",
"@nestjs/testing": "^10.3.8",
"@types/bcrypt": "^5.0.2",
"@types/bcryptjs": "^3.0.0",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/multer": "^1.4.11",
@@ -56,6 +57,7 @@
"@types/passport-jwt": "^4.0.1",
"@types/passport-local": "^1.0.38",
"@types/supertest": "^6.0.2",
"esbuild": "^0.25.0",
"jest": "^29.7.0",
"prisma": "^5.14.0",
"source-map-support": "^0.5.21",
+2 -1
View File
@@ -1,6 +1,7 @@
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
// native = local Windows/macOS; debian-openssl-3.0.x = node:20-bookworm (Arvan)
binaryTargets = ["native", "debian-openssl-3.0.x"]
}
datasource db {
+212330
View File
File diff suppressed because one or more lines are too long
@@ -0,0 +1,320 @@
-- CreateEnum
CREATE TYPE "AdminStatus" AS ENUM ('ACTIVE', 'DISABLED');
-- CreateEnum
CREATE TYPE "AdminRole" AS ENUM ('SUPER_ADMIN', 'OPERATOR', 'SUPPORT');
-- CreateEnum
CREATE TYPE "UserStatus" AS ENUM ('ACTIVE', 'BLOCKED');
-- CreateEnum
CREATE TYPE "CampaignStatus" AS ENUM ('DRAFT', 'ACTIVE', 'PAUSED', 'FINISHED');
-- CreateEnum
CREATE TYPE "PrizeType" AS ENUM ('PHYSICAL', 'DISCOUNT_CODE', 'CREDIT', 'CASH', 'NO_PRIZE', 'OTHER');
-- CreateEnum
CREATE TYPE "StockType" AS ENUM ('LIMITED', 'UNLIMITED');
-- CreateEnum
CREATE TYPE "PrizeStatus" AS ENUM ('ACTIVE', 'INACTIVE');
-- CreateEnum
CREATE TYPE "SpinStatus" AS ENUM ('SUCCESS', 'FAILED', 'DUPLICATE');
-- CreateEnum
CREATE TYPE "ChanceTxnType" AS ENUM ('SIGNUP_BONUS', 'ADMIN_ADJUSTMENT', 'SPIN_CONSUME', 'CAMPAIGN_BONUS', 'REFUND');
-- CreateEnum
CREATE TYPE "UserPrizeStatus" AS ENUM ('NEW', 'CONTACTED', 'DELIVERED', 'ACTIVE_CODE', 'USED', 'EXPIRED');
-- CreateEnum
CREATE TYPE "SmsType" AS ENUM ('OTP', 'WINNING', 'NO_PRIZE', 'PRIZE_REMINDER');
-- CreateEnum
CREATE TYPE "SmsStatus" AS ENUM ('PENDING', 'SENT', 'FAILED');
-- CreateEnum
CREATE TYPE "WheelDesign" AS ENUM ('CLASSIC_CASINO', 'NEON_CYBER', 'MINIMAL_FLAT', 'LUXURY_GOLD', 'PLAYFUL_CARTOON');
-- CreateTable
CREATE TABLE "admins" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"mobile" TEXT NOT NULL,
"email" TEXT NOT NULL,
"password_hash" TEXT NOT NULL,
"role" "AdminRole" NOT NULL DEFAULT 'OPERATOR',
"status" "AdminStatus" NOT NULL DEFAULT 'ACTIVE',
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
CONSTRAINT "admins_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "users" (
"id" TEXT NOT NULL,
"mobile" TEXT NOT NULL,
"name" TEXT,
"status" "UserStatus" NOT NULL DEFAULT 'ACTIVE',
"last_login_at" TIMESTAMP(3),
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
CONSTRAINT "users_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "otp_codes" (
"id" TEXT NOT NULL,
"mobile" TEXT NOT NULL,
"code" TEXT NOT NULL,
"user_id" TEXT,
"attempts" INTEGER NOT NULL DEFAULT 0,
"consumed" BOOLEAN NOT NULL DEFAULT false,
"expires_at" TIMESTAMP(3) NOT NULL,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "otp_codes_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "campaigns" (
"id" TEXT NOT NULL,
"title" TEXT NOT NULL,
"slug" TEXT NOT NULL,
"description" TEXT,
"image" TEXT,
"banner" TEXT,
"logo" TEXT,
"start_at" TIMESTAMP(3) NOT NULL,
"end_at" TIMESTAMP(3) NOT NULL,
"status" "CampaignStatus" NOT NULL DEFAULT 'DRAFT',
"default_chances" INTEGER NOT NULL DEFAULT 0,
"rules" TEXT,
"cta_text" TEXT,
"wheel_design" "WheelDesign" NOT NULL DEFAULT 'CLASSIC_CASINO',
"settings" JSONB,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
CONSTRAINT "campaigns_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "prizes" (
"id" TEXT NOT NULL,
"campaign_id" TEXT NOT NULL,
"title" TEXT NOT NULL,
"description" TEXT,
"image" TEXT,
"type" "PrizeType" NOT NULL,
"stock_type" "StockType" NOT NULL,
"initial_stock" INTEGER,
"remaining_stock" INTEGER,
"weight" INTEGER NOT NULL,
"status" "PrizeStatus" NOT NULL DEFAULT 'ACTIVE',
"sort_order" INTEGER NOT NULL DEFAULT 0,
"segment_color" TEXT NOT NULL,
"expires_at" TIMESTAMP(3),
"sms_template" TEXT,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
CONSTRAINT "prizes_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "user_campaigns" (
"id" TEXT NOT NULL,
"user_id" TEXT NOT NULL,
"campaign_id" TEXT NOT NULL,
"total_chances" INTEGER NOT NULL DEFAULT 0,
"used_chances" INTEGER NOT NULL DEFAULT 0,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" TIMESTAMP(3) NOT NULL,
CONSTRAINT "user_campaigns_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "chance_transactions" (
"id" TEXT NOT NULL,
"user_id" TEXT NOT NULL,
"campaign_id" TEXT NOT NULL,
"amount" INTEGER NOT NULL,
"type" "ChanceTxnType" NOT NULL,
"reference_type" TEXT,
"reference_id" TEXT,
"description" TEXT,
"created_by" TEXT,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "chance_transactions_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "spins" (
"id" TEXT NOT NULL,
"user_id" TEXT NOT NULL,
"campaign_id" TEXT NOT NULL,
"prize_id" TEXT,
"status" "SpinStatus" NOT NULL DEFAULT 'SUCCESS',
"idempotency_key" TEXT NOT NULL,
"ip" TEXT,
"user_agent" TEXT,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "spins_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "user_prizes" (
"id" TEXT NOT NULL,
"user_id" TEXT NOT NULL,
"campaign_id" TEXT NOT NULL,
"prize_id" TEXT NOT NULL,
"spin_id" TEXT NOT NULL,
"code" TEXT,
"status" "UserPrizeStatus" NOT NULL DEFAULT 'NEW',
"won_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"redeemed_at" TIMESTAMP(3),
CONSTRAINT "user_prizes_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "sms_logs" (
"id" TEXT NOT NULL,
"user_id" TEXT,
"mobile" TEXT NOT NULL,
"type" "SmsType" NOT NULL,
"message" TEXT NOT NULL,
"provider" TEXT NOT NULL DEFAULT 'raygansms',
"status" "SmsStatus" NOT NULL DEFAULT 'PENDING',
"provider_response" JSONB,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "sms_logs_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "admin_logs" (
"id" TEXT NOT NULL,
"admin_id" TEXT NOT NULL,
"action" TEXT NOT NULL,
"entity_type" TEXT NOT NULL,
"entity_id" TEXT NOT NULL,
"old_value" JSONB,
"new_value" JSONB,
"ip" TEXT,
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "admin_logs_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "admins_mobile_key" ON "admins"("mobile");
-- CreateIndex
CREATE UNIQUE INDEX "admins_email_key" ON "admins"("email");
-- CreateIndex
CREATE UNIQUE INDEX "users_mobile_key" ON "users"("mobile");
-- CreateIndex
CREATE INDEX "users_mobile_idx" ON "users"("mobile");
-- CreateIndex
CREATE INDEX "otp_codes_mobile_consumed_idx" ON "otp_codes"("mobile", "consumed");
-- CreateIndex
CREATE UNIQUE INDEX "campaigns_slug_key" ON "campaigns"("slug");
-- CreateIndex
CREATE INDEX "campaigns_status_start_at_end_at_idx" ON "campaigns"("status", "start_at", "end_at");
-- CreateIndex
CREATE INDEX "prizes_campaign_id_status_idx" ON "prizes"("campaign_id", "status");
-- CreateIndex
CREATE UNIQUE INDEX "user_campaigns_user_id_campaign_id_key" ON "user_campaigns"("user_id", "campaign_id");
-- CreateIndex
CREATE INDEX "chance_transactions_user_id_campaign_id_idx" ON "chance_transactions"("user_id", "campaign_id");
-- CreateIndex
CREATE UNIQUE INDEX "spins_idempotency_key_key" ON "spins"("idempotency_key");
-- CreateIndex
CREATE INDEX "spins_user_id_campaign_id_idx" ON "spins"("user_id", "campaign_id");
-- CreateIndex
CREATE INDEX "spins_campaign_id_created_at_idx" ON "spins"("campaign_id", "created_at");
-- CreateIndex
CREATE UNIQUE INDEX "user_prizes_spin_id_key" ON "user_prizes"("spin_id");
-- CreateIndex
CREATE UNIQUE INDEX "user_prizes_code_key" ON "user_prizes"("code");
-- CreateIndex
CREATE INDEX "user_prizes_user_id_idx" ON "user_prizes"("user_id");
-- CreateIndex
CREATE INDEX "user_prizes_status_idx" ON "user_prizes"("status");
-- CreateIndex
CREATE INDEX "sms_logs_mobile_type_idx" ON "sms_logs"("mobile", "type");
-- CreateIndex
CREATE INDEX "admin_logs_entity_type_entity_id_idx" ON "admin_logs"("entity_type", "entity_id");
-- AddForeignKey
ALTER TABLE "otp_codes" ADD CONSTRAINT "otp_codes_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "prizes" ADD CONSTRAINT "prizes_campaign_id_fkey" FOREIGN KEY ("campaign_id") REFERENCES "campaigns"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "user_campaigns" ADD CONSTRAINT "user_campaigns_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "user_campaigns" ADD CONSTRAINT "user_campaigns_campaign_id_fkey" FOREIGN KEY ("campaign_id") REFERENCES "campaigns"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "chance_transactions" ADD CONSTRAINT "chance_transactions_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "chance_transactions" ADD CONSTRAINT "chance_transactions_campaign_id_fkey" FOREIGN KEY ("campaign_id") REFERENCES "campaigns"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "chance_transactions" ADD CONSTRAINT "chance_transactions_created_by_fkey" FOREIGN KEY ("created_by") REFERENCES "admins"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "spins" ADD CONSTRAINT "spins_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "spins" ADD CONSTRAINT "spins_campaign_id_fkey" FOREIGN KEY ("campaign_id") REFERENCES "campaigns"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "spins" ADD CONSTRAINT "spins_prize_id_fkey" FOREIGN KEY ("prize_id") REFERENCES "prizes"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "user_prizes" ADD CONSTRAINT "user_prizes_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "user_prizes" ADD CONSTRAINT "user_prizes_campaign_id_fkey" FOREIGN KEY ("campaign_id") REFERENCES "campaigns"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "user_prizes" ADD CONSTRAINT "user_prizes_prize_id_fkey" FOREIGN KEY ("prize_id") REFERENCES "prizes"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "user_prizes" ADD CONSTRAINT "user_prizes_spin_id_fkey" FOREIGN KEY ("spin_id") REFERENCES "spins"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "sms_logs" ADD CONSTRAINT "sms_logs_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "admin_logs" ADD CONSTRAINT "admin_logs_admin_id_fkey" FOREIGN KEY ("admin_id") REFERENCES "admins"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,6 @@
-- AlterEnum: add 5 new wheel design themes
ALTER TYPE "WheelDesign" ADD VALUE IF NOT EXISTS 'RUSTIC_WOOD';
ALTER TYPE "WheelDesign" ADD VALUE IF NOT EXISTS 'GALAXY_SPACE';
ALTER TYPE "WheelDesign" ADD VALUE IF NOT EXISTS 'CANDY_LAND';
ALTER TYPE "WheelDesign" ADD VALUE IF NOT EXISTS 'FIRE_FLAME';
ALTER TYPE "WheelDesign" ADD VALUE IF NOT EXISTS 'CRYSTAL_ICE';
@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (i.e. Git)
provider = "postgresql"
+108
View File
@@ -0,0 +1,108 @@
// prisma/seed.ts
var import_client = require("@prisma/client");
var prisma = new import_client.PrismaClient();
async function main() {
console.log("Seeding default demo campaign and prizes...");
const existingCampaign = await prisma.campaign.findUnique({
where: { slug: "default-campaign" }
});
if (existingCampaign) {
console.log("Default campaign already exists.");
return;
}
const campaign = await prisma.campaign.create({
data: {
title: "\u06AF\u0631\u062F\u0648\u0646\u0647 \u0634\u0627\u0646\u0633 \u062C\u0634\u0646\u0648\u0627\u0631\u0647 \u0628\u0632\u0631\u06AF \u0646\u0648\u0631\u0648\u0632\u06CC",
slug: "default-campaign",
description: "\u0647\u0631 \u0631\u0648\u0632 \u0628\u0627 \u0686\u0631\u062E\u0627\u0646\u062F\u0646 \u06AF\u0631\u062F\u0648\u0646\u0647\u060C \u0634\u0627\u0646\u0633 \u0628\u0631\u0646\u062F\u0647 \u0634\u062F\u0646 \u0622\u06CC\u0641\u0648\u0646\u060C \u0633\u06A9\u0647 \u0637\u0644\u0627\u060C \u0648 \u06A9\u062F\u0647\u0627\u06CC \u062A\u062E\u0641\u06CC\u0641 \u0634\u06AF\u0641\u062A\u200C\u0627\u0646\u06AF\u06CC\u0632 \u0631\u0627 \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u06CC\u062F!",
startAt: new Date(Date.now() - 24 * 3600 * 1e3),
endAt: new Date(Date.now() + 60 * 24 * 3600 * 1e3),
status: "ACTIVE",
defaultChances: 3,
ctaText: "\u0628\u0686\u0631\u062E\u0648\u0646 \u0648 \u0628\u0631\u0646\u062F\u0647 \u0634\u0648!",
wheelDesign: "CLASSIC_CASINO",
rules: "\u06F1. \u0647\u0631 \u06A9\u0627\u0631\u0628\u0631 \u062F\u0631 \u0628\u062F\u0648 \u0648\u0631\u0648\u062F \u06F3 \u0634\u0627\u0646\u0633 \u0686\u0631\u062E\u0627\u0646\u062F\u0646 \u0631\u0627\u06CC\u06AF\u0627\u0646 \u062F\u0631\u06CC\u0627\u0641\u062A \u0645\u06CC\u200C\u06A9\u0646\u062F.\n\u06F2. \u062C\u0648\u0627\u06CC\u0632 \u0641\u06CC\u0632\u06CC\u06A9\u06CC \u067E\u0633 \u0627\u0632 \u0647\u0645\u0627\u0647\u0646\u06AF\u06CC \u062A\u0644\u0641\u0646\u06CC \u062A\u0648\u0633\u0637 \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0627\u0631\u0633\u0627\u0644 \u062E\u0648\u0627\u0647\u062F \u0634\u062F.\n\u06F3. \u06A9\u062F\u0647\u0627\u06CC \u062A\u062E\u0641\u06CC\u0641 \u0628\u0644\u0627\u0641\u0627\u0635\u0644\u0647 \u067E\u06CC\u0627\u0645\u06A9 \u0634\u062F\u0647 \u0648 \u062A\u0627 \u06F7 \u0631\u0648\u0632 \u067E\u0633 \u0627\u0632 \u062F\u0631\u06CC\u0627\u0641\u062A \u0645\u0639\u062A\u0628\u0631 \u0647\u0633\u062A\u0646\u062F.",
prizes: {
create: [
{
title: "\u0622\u06CC\u0641\u0648\u0646 \u06F1\u06F5 \u067E\u0631\u0648",
type: "PHYSICAL",
stockType: "LIMITED",
initialStock: 3,
remainingStock: 3,
weight: 1,
sortOrder: 1,
segmentColor: "#b91c1c"
},
{
title: "\u062A\u062E\u0641\u06CC\u0641 \u06F5\u06F0\u066A \u062F\u06CC\u062C\u06CC\u200C\u06A9\u0627\u0644\u0627",
type: "DISCOUNT_CODE",
stockType: "UNLIMITED",
weight: 25,
sortOrder: 2,
segmentColor: "#1e293b"
},
{
title: "\u06A9\u0627\u0631\u062A \u0647\u062F\u06CC\u0647 \u06F5\u06F0\u06F0 \u062A\u0648\u0645\u0627\u0646\u06CC",
type: "CREDIT",
stockType: "LIMITED",
initialStock: 50,
remainingStock: 50,
weight: 10,
sortOrder: 3,
segmentColor: "#b91c1c"
},
{
title: "\u067E\u0648\u0686 (\u062F\u0641\u0639\u0647 \u0628\u0639\u062F)",
type: "NO_PRIZE",
stockType: "UNLIMITED",
weight: 20,
sortOrder: 4,
segmentColor: "#1e293b"
},
{
title: "\u062A\u062E\u0641\u06CC\u0641 \u06F3\u06F0\u066A \u0627\u0633\u0646\u067E",
type: "DISCOUNT_CODE",
stockType: "UNLIMITED",
weight: 20,
sortOrder: 5,
segmentColor: "#b91c1c"
},
{
title: "\u0633\u0627\u0639\u062A \u0647\u0648\u0634\u0645\u0646\u062F",
type: "PHYSICAL",
stockType: "LIMITED",
initialStock: 10,
remainingStock: 10,
weight: 4,
sortOrder: 6,
segmentColor: "#1e293b"
},
{
title: "\u0634\u0627\u0646\u0633 \u0645\u062C\u062F\u062F",
type: "OTHER",
stockType: "UNLIMITED",
weight: 15,
sortOrder: 7,
segmentColor: "#b91c1c"
},
{
title: "\u067E\u0648\u0686 (\u0628\u062F\u0648\u0646 \u062C\u0627\u06CC\u0632\u0647)",
type: "NO_PRIZE",
stockType: "UNLIMITED",
weight: 5,
sortOrder: 8,
segmentColor: "#1e293b"
}
]
}
}
});
console.log(`Campaign created with ID: ${campaign.id} and 8 prizes.`);
}
main().catch((e) => {
console.error(e);
process.exit(1);
}).finally(async () => {
await prisma.$disconnect();
});
+1
View File
@@ -0,0 +1 @@
export * from "./index"
+1
View File
@@ -0,0 +1 @@
module.exports = { ...require('.') }
+9
View File
@@ -0,0 +1,9 @@
class PrismaClient {
constructor() {
throw new Error(
'@prisma/client/deno/edge did not initialize yet. Please run "prisma generate" and try to import it again.',
)
}
}
export { PrismaClient }
+1
View File
@@ -0,0 +1 @@
export * from "./default"
File diff suppressed because one or more lines are too long
+428
View File
@@ -0,0 +1,428 @@
Object.defineProperty(exports, "__esModule", { value: true });
const {
Decimal,
objectEnumValues,
makeStrictEnum,
Public,
getRuntime,
skip
} = require('@prisma/client/runtime/index-browser.js')
const Prisma = {}
exports.Prisma = Prisma
exports.$Enums = {}
/**
* Prisma Client JS version: 5.22.0
* Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2
*/
Prisma.prismaVersion = {
client: "5.22.0",
engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2"
}
Prisma.PrismaClientKnownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)};
Prisma.PrismaClientUnknownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientRustPanicError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientInitializationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientValidationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.NotFoundError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.Decimal = Decimal
/**
* Re-export of sql-template-tag
*/
Prisma.sql = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.empty = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.join = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.raw = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.validator = Public.validator
/**
* Extensions
*/
Prisma.getExtensionContext = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.defineExtension = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
/**
* Shorthand utilities for JSON filtering
*/
Prisma.DbNull = objectEnumValues.instances.DbNull
Prisma.JsonNull = objectEnumValues.instances.JsonNull
Prisma.AnyNull = objectEnumValues.instances.AnyNull
Prisma.NullTypes = {
DbNull: objectEnumValues.classes.DbNull,
JsonNull: objectEnumValues.classes.JsonNull,
AnyNull: objectEnumValues.classes.AnyNull
}
/**
* Enums
*/
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
ReadUncommitted: 'ReadUncommitted',
ReadCommitted: 'ReadCommitted',
RepeatableRead: 'RepeatableRead',
Serializable: 'Serializable'
});
exports.Prisma.AdminScalarFieldEnum = {
id: 'id',
name: 'name',
mobile: 'mobile',
email: 'email',
passwordHash: 'passwordHash',
role: 'role',
status: 'status',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.UserScalarFieldEnum = {
id: 'id',
mobile: 'mobile',
name: 'name',
status: 'status',
lastLoginAt: 'lastLoginAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.OtpCodeScalarFieldEnum = {
id: 'id',
mobile: 'mobile',
code: 'code',
userId: 'userId',
attempts: 'attempts',
consumed: 'consumed',
expiresAt: 'expiresAt',
createdAt: 'createdAt'
};
exports.Prisma.CampaignScalarFieldEnum = {
id: 'id',
title: 'title',
slug: 'slug',
description: 'description',
image: 'image',
banner: 'banner',
logo: 'logo',
startAt: 'startAt',
endAt: 'endAt',
status: 'status',
defaultChances: 'defaultChances',
rules: 'rules',
ctaText: 'ctaText',
wheelDesign: 'wheelDesign',
settings: 'settings',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.PrizeScalarFieldEnum = {
id: 'id',
campaignId: 'campaignId',
title: 'title',
description: 'description',
image: 'image',
type: 'type',
stockType: 'stockType',
initialStock: 'initialStock',
remainingStock: 'remainingStock',
weight: 'weight',
status: 'status',
sortOrder: 'sortOrder',
segmentColor: 'segmentColor',
expiresAt: 'expiresAt',
smsTemplate: 'smsTemplate',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.UserCampaignScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
totalChances: 'totalChances',
usedChances: 'usedChances',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.ChanceTransactionScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
amount: 'amount',
type: 'type',
referenceType: 'referenceType',
referenceId: 'referenceId',
description: 'description',
createdById: 'createdById',
createdAt: 'createdAt'
};
exports.Prisma.SpinScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
prizeId: 'prizeId',
status: 'status',
idempotencyKey: 'idempotencyKey',
ip: 'ip',
userAgent: 'userAgent',
createdAt: 'createdAt'
};
exports.Prisma.UserPrizeScalarFieldEnum = {
id: 'id',
userId: 'userId',
campaignId: 'campaignId',
prizeId: 'prizeId',
spinId: 'spinId',
code: 'code',
status: 'status',
wonAt: 'wonAt',
redeemedAt: 'redeemedAt'
};
exports.Prisma.SmsLogScalarFieldEnum = {
id: 'id',
userId: 'userId',
mobile: 'mobile',
type: 'type',
message: 'message',
provider: 'provider',
status: 'status',
providerResponse: 'providerResponse',
createdAt: 'createdAt'
};
exports.Prisma.AdminLogScalarFieldEnum = {
id: 'id',
adminId: 'adminId',
action: 'action',
entityType: 'entityType',
entityId: 'entityId',
oldValue: 'oldValue',
newValue: 'newValue',
ip: 'ip',
createdAt: 'createdAt'
};
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
exports.Prisma.NullableJsonNullValueInput = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull
};
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
};
exports.Prisma.NullsOrder = {
first: 'first',
last: 'last'
};
exports.Prisma.JsonNullValueFilter = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull,
AnyNull: Prisma.AnyNull
};
exports.AdminRole = exports.$Enums.AdminRole = {
SUPER_ADMIN: 'SUPER_ADMIN',
OPERATOR: 'OPERATOR',
SUPPORT: 'SUPPORT'
};
exports.AdminStatus = exports.$Enums.AdminStatus = {
ACTIVE: 'ACTIVE',
DISABLED: 'DISABLED'
};
exports.UserStatus = exports.$Enums.UserStatus = {
ACTIVE: 'ACTIVE',
BLOCKED: 'BLOCKED'
};
exports.CampaignStatus = exports.$Enums.CampaignStatus = {
DRAFT: 'DRAFT',
ACTIVE: 'ACTIVE',
PAUSED: 'PAUSED',
FINISHED: 'FINISHED'
};
exports.WheelDesign = exports.$Enums.WheelDesign = {
CLASSIC_CASINO: 'CLASSIC_CASINO',
NEON_CYBER: 'NEON_CYBER',
MINIMAL_FLAT: 'MINIMAL_FLAT',
LUXURY_GOLD: 'LUXURY_GOLD',
PLAYFUL_CARTOON: 'PLAYFUL_CARTOON',
RUSTIC_WOOD: 'RUSTIC_WOOD',
GALAXY_SPACE: 'GALAXY_SPACE',
CANDY_LAND: 'CANDY_LAND',
FIRE_FLAME: 'FIRE_FLAME',
CRYSTAL_ICE: 'CRYSTAL_ICE'
};
exports.PrizeType = exports.$Enums.PrizeType = {
PHYSICAL: 'PHYSICAL',
DISCOUNT_CODE: 'DISCOUNT_CODE',
CREDIT: 'CREDIT',
CASH: 'CASH',
NO_PRIZE: 'NO_PRIZE',
OTHER: 'OTHER'
};
exports.StockType = exports.$Enums.StockType = {
LIMITED: 'LIMITED',
UNLIMITED: 'UNLIMITED'
};
exports.PrizeStatus = exports.$Enums.PrizeStatus = {
ACTIVE: 'ACTIVE',
INACTIVE: 'INACTIVE'
};
exports.ChanceTxnType = exports.$Enums.ChanceTxnType = {
SIGNUP_BONUS: 'SIGNUP_BONUS',
ADMIN_ADJUSTMENT: 'ADMIN_ADJUSTMENT',
SPIN_CONSUME: 'SPIN_CONSUME',
CAMPAIGN_BONUS: 'CAMPAIGN_BONUS',
REFUND: 'REFUND'
};
exports.SpinStatus = exports.$Enums.SpinStatus = {
SUCCESS: 'SUCCESS',
FAILED: 'FAILED',
DUPLICATE: 'DUPLICATE'
};
exports.UserPrizeStatus = exports.$Enums.UserPrizeStatus = {
NEW: 'NEW',
CONTACTED: 'CONTACTED',
DELIVERED: 'DELIVERED',
ACTIVE_CODE: 'ACTIVE_CODE',
USED: 'USED',
EXPIRED: 'EXPIRED'
};
exports.SmsType = exports.$Enums.SmsType = {
OTP: 'OTP',
WINNING: 'WINNING',
NO_PRIZE: 'NO_PRIZE',
PRIZE_REMINDER: 'PRIZE_REMINDER'
};
exports.SmsStatus = exports.$Enums.SmsStatus = {
PENDING: 'PENDING',
SENT: 'SENT',
FAILED: 'FAILED'
};
exports.Prisma.ModelName = {
Admin: 'Admin',
User: 'User',
OtpCode: 'OtpCode',
Campaign: 'Campaign',
Prize: 'Prize',
UserCampaign: 'UserCampaign',
ChanceTransaction: 'ChanceTransaction',
Spin: 'Spin',
UserPrize: 'UserPrize',
SmsLog: 'SmsLog',
AdminLog: 'AdminLog'
};
/**
* This is a stub Prisma Client that will error at runtime if called.
*/
class PrismaClient {
constructor() {
return new Proxy(this, {
get(target, prop) {
let message
const runtime = getRuntime()
if (runtime.isEdge) {
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters
`;
} else {
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
}
message += `
If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
throw new Error(message)
}
})
}
}
exports.PrismaClient = PrismaClient
Object.assign(exports, Prisma)
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More