feat(admin): add draw management features including create, update, delete, and batch delete functionalities

- Implemented API functions for creating, updating, and deleting draws.
- Enhanced the admin draws console with UI components for managing draws.
- Added internationalization support for new draw management actions and messages.
This commit is contained in:
2026-05-25 18:00:43 +08:00
parent eb02252431
commit f080e6ba8e
15 changed files with 948 additions and 24 deletions

View File

@@ -80,6 +80,9 @@
"exportDone": "Exported",
"exportFailed": "Export failed"
},
"datetime": {
"optionalHint": "Leave empty to auto-fill from server config"
},
"date": {
"placeholder": "Select date",
"rangePlaceholder": "Select date range",

View File

@@ -5,6 +5,18 @@
"generating": "Generating…",
"generateSuccess": "Generated {{created}} draws, buffer {{upcoming}}/{{target}}",
"generateFailed": "Generation failed",
"scheduleTimezoneHint": "Times in server timezone {{tz}} (GMT, per UI spec); draw interval {{interval}} min (LOTTERY_DRAW_INTERVAL_MINUTES).",
"createDraw": {
"open": "New draw",
"title": "Create draw manually",
"description": "Enter date and time in {{tz}} (not your browser local zone). If only draw time is set, start/close are derived from server config.",
"hint": "Start < close < draw. Draw number optional; sequence auto-assigned by UTC business date.",
"drawTimeRequired": "Draw time is required",
"submit": "Create",
"saving": "Creating…",
"success": "Draw created",
"failed": "Create failed"
},
"drawNo": "Draw no.",
"status": "Status",
"startTime": "Start time",
@@ -18,6 +30,28 @@
"reset": "Reset",
"fuzzyDrawNo": "Fuzzy draw no.",
"viewDetails": "View details",
"editDraw": {
"action": "Edit",
"title": "Edit draw",
"description": "Draw {{drawNo}} · edit times in {{tz}}",
"submit": "Save",
"saving": "Saving…",
"success": "Draw updated",
"failed": "Update failed"
},
"deleteDraw": {
"action": "Delete",
"title": "Delete draw",
"description": "Delete draw {{drawNo}}? Only for pending draws with no bets. This cannot be undone.",
"success": "Draw deleted",
"failed": "Delete failed"
},
"cancelFromList": {
"action": "Cancel",
"title": "Cancel draw",
"description": "Cancel draw {{drawNo}}? Status becomes cancelled; the row is kept."
},
"listActionsHint": "Pending with no bets: edit or delete. Open/closing/closed with no bets: cancel from list or use detail page.",
"invalidDrawId": "Invalid draw ID",
"loadFailed": "Failed to load. Check login and API configuration.",
"drawDetail": "Draw details",
@@ -162,5 +196,14 @@
"publishDescription": "Results become visible to players and may trigger settlement.",
"generatePlanTitle": "Confirm generate draw plan?",
"generatePlanDescription": "Future bettable draws will be created per system rules."
},
"batchDelete": {
"action": "Delete {{count}} draws",
"deleting": "Deleting…",
"confirmTitle": "Confirm batch delete draws?",
"confirmDescription": "Will delete {{count}} pending draws with no bets. This cannot be undone.",
"success": "Successfully deleted {{count}} draws",
"failed": "Batch delete failed",
"partialFailed": "Partial failure: {{success}} succeeded, {{failed}} failed"
}
}

View File

@@ -80,6 +80,9 @@
"exportDone": "निर्यात भयो",
"exportFailed": "निर्यात असफल"
},
"datetime": {
"optionalHint": "खाली छोड्नुहोस् — सर्वर सेटिङबाट स्वचालित"
},
"date": {
"placeholder": "मिति छान्नुहोस्",
"rangePlaceholder": "मिति दायरा छान्नुहोस्",

View File

@@ -5,6 +5,18 @@
"generating": "सिर्जना हुँदैछ…",
"generateSuccess": "{{created}} ड्रअ सिर्जना भयो, बफर {{upcoming}}/{{target}}",
"generateFailed": "सिर्जना असफल भयो",
"scheduleTimezoneHint": "सूची समय सर्भर समयक्षेत्र {{tz}} (GMT); ड्र अन्तराल {{interval}} मिनेट।",
"createDraw": {
"open": "नयाँ ड्रअ",
"title": "म्यानुअल ड्रअ सिर्जना",
"description": "{{tz}} मा मिति र समय प्रविष्ट गर्नुहोस् (ब्राउजर स्थानीय समय होइन)।",
"hint": "सुरु < बन्द < ड्रअ। ड्रअ नम्बर वैकल्पिक।",
"drawTimeRequired": "ड्रअ समय आवश्यक छ",
"submit": "सिर्जना",
"saving": "सिर्जना हुँदैछ…",
"success": "ड्रअ सिर्जना भयो",
"failed": "सिर्जना असफल"
},
"drawNo": "ड्रअ नं.",
"status": "स्थिति",
"startTime": "सुरु समय",
@@ -18,6 +30,28 @@
"reset": "रिसेट",
"fuzzyDrawNo": "फजी ड्रअ नं.",
"viewDetails": "विवरण हेर्नुहोस्",
"editDraw": {
"action": "सम्पादन",
"title": "ड्रअ सम्पादन",
"description": "ड्रअ {{drawNo}} · {{tz}}",
"submit": "सेभ",
"saving": "सेभ हुँदैछ…",
"success": "ड्रअ अद्यावधिक भयो",
"failed": "अद्यावधिक असफल"
},
"deleteDraw": {
"action": "मेटाउनुहोस्",
"title": "ड्रअ मेटाउनुहोस्",
"description": "ड्रअ {{drawNo}} मेटाउने? केवल pending र बेट नभएको।",
"success": "ड्रअ मेटाइयो",
"failed": "मेटाउन असफल"
},
"cancelFromList": {
"action": "रद्द",
"title": "ड्रअ रद्द",
"description": "ड्रअ {{drawNo}} रद्द गर्ने?"
},
"listActionsHint": "बेट नभएको pending: सम्पादन/मेटाउन; अन्य: विवरण पृष्ठ।",
"invalidDrawId": "अवैध ड्रअ ID",
"loadFailed": "लोड असफल भयो। लगइन र API कन्फिग जाँच गर्नुहोस्।",
"drawDetail": "ड्रअ विवरण",
@@ -162,5 +196,14 @@
"publishDescription": "खेलाडीहरूले नतिजा देख्नेछन्।",
"generatePlanTitle": "ड्रअ योजना सिर्जना पुष्टि?",
"generatePlanDescription": "भविष्यका ड्रअहरू सिर्जना हुनेछन्।"
},
"batchDelete": {
"action": "{{count}} ड्रअ मेटाउनुहोस्",
"deleting": "मेटाउँदै…",
"confirmTitle": "ब्याच मेटाउने पुष्टि?",
"confirmDescription": "{{count}} विना दांवका ड्रअहरू मेटाउनेछ। यो पूर्ववत गर्न सकिँदैन।",
"success": "सफलतापूर्वक {{count}} ड्रअ मेटाइयो",
"failed": "ब्याच मेटाउन असफल",
"partialFailed": "आंशिक असफल: {{success}} सफल, {{failed}} असफल"
}
}

View File

@@ -80,6 +80,9 @@
"exportDone": "已导出",
"exportFailed": "导出失败"
},
"datetime": {
"optionalHint": "留空则按服务器配置自动推算"
},
"date": {
"placeholder": "选择日期",
"rangePlaceholder": "选择日期范围",

View File

@@ -5,6 +5,18 @@
"generating": "生成中…",
"generateSuccess": "已生成 {{created}} 期,当前缓冲 {{upcoming}}/{{target}}",
"generateFailed": "生成失败",
"scheduleTimezoneHint": "列表时间为服务器时区 {{tz}}GMT与界面文档一致开奖间隔 {{interval}} 分钟LOTTERY_DRAW_INTERVAL_MINUTES。",
"createDraw": {
"open": "新建期号",
"title": "手动创建期号",
"description": "日期与时间按 {{tz}} 填写(勿用浏览器本地时区)。仅填开奖时间时,开始/封盘按系统配置自动推算。",
"hint": "开始 < 封盘 < 开奖。期号可留空,将按 UTC 业务日自动生成流水号。",
"drawTimeRequired": "请填写开奖时间",
"submit": "创建",
"saving": "创建中…",
"success": "期号已创建",
"failed": "创建失败"
},
"drawNo": "期号",
"status": "状态",
"startTime": "开始时间",
@@ -18,6 +30,28 @@
"reset": "重置",
"fuzzyDrawNo": "模糊匹配期号",
"viewDetails": "查看详情",
"editDraw": {
"action": "编辑",
"title": "编辑期号",
"description": "期号 {{drawNo}} · 时间按 {{tz}} 编辑",
"submit": "保存",
"saving": "保存中…",
"success": "期号已更新",
"failed": "更新失败"
},
"deleteDraw": {
"action": "删除",
"title": "删除期号",
"description": "确定删除期号 {{drawNo}}?仅适用于未开始且无注单的记录,删除后不可恢复。",
"success": "期号已删除",
"failed": "删除失败"
},
"cancelFromList": {
"action": "取消",
"title": "取消期号",
"description": "确定取消期号 {{drawNo}}?取消后状态为「已取消」,记录仍保留。"
},
"listActionsHint": "未开始且无注单:可编辑、删除;可下注/封盘/待开奖且无注单:可取消(见详情页更多操作)。",
"invalidDrawId": "无效的期号 ID",
"loadFailed": "加载失败,请检查登录与 API 配置",
"drawDetail": "开奖详情",
@@ -162,5 +196,14 @@
"publishDescription": "发布后将对玩家可见并可能触发结算,请再次核对号码。",
"generatePlanTitle": "确认批量生成期号计划?",
"generatePlanDescription": "将按系统规则补充未来可下注期号。"
},
"batchDelete": {
"action": "删除 {{count}} 期",
"deleting": "删除中…",
"confirmTitle": "确认批量删除期号?",
"confirmDescription": "将删除 {{count}} 个未开始且无注单的期号,删除后不可恢复。",
"success": "已成功删除 {{count}} 个期号",
"failed": "批量删除失败",
"partialFailed": "部分删除失败:成功 {{success}} 个,失败 {{failed}} 个"
}
}