Commit Graph

8 Commits

Author SHA1 Message Date
richarjiang
f71ff968ad perf: 更新依赖版本 2026-04-05 21:41:54 +08:00
richarjiang
4633ceea8c perf: 完善订单管理 2026-04-05 21:03:18 +08:00
richarjiang
694330b7a6 feat: 接入微信支付 2026-04-05 18:23:23 +08:00
richarjiang
9eee4f6b87 perf: 支持微信支付接口 2026-04-05 14:09:36 +08:00
richarjiang
9811c9a13b perf: 优化页面 2026-04-05 13:25:54 +08:00
richarjiang
b6986ba30c feat(admin): implement full day-by-day schedule editor with live preview
## Features

### Admin Schedule Page (`packages/app/src/pages/admin/schedule.vue`)
- Interactive date-based slot editor for managing daily schedules
- Real-time slot editing: start/end times, capacity adjustments
- Slot deletion with conflict warnings when bookings exist
- Add new slots with modal dialog
- Live booking status display (booked count, people names)
- Publish/Save changes with sync feedback
- Revert unsaved changes with confirmation
- Skeleton loading states and empty state handling
- Responsive design with optimized mobile UX

### Backend Enhancements
- **New DTO** (`PublishDaySlotsDto`): Structured slot publishing with validation
  - Date string validation
  - Slot array with existing slot IDs for updates
  - Time and capacity validation per slot

- **Schedule Preview API** (`getSchedulePreview`):
  - Check for existing published slots
  - Fallback to active WeekTemplates for unpublished dates
  - Unified response format with isPublished flag

- **Publish Slots API** (`publishDaySlots`):
  - Atomic transaction for consistency
  - Update existing slots with new times/capacity
  - Create new slots from template data
  - Delete unpublished slots or set to CLOSED if bookings exist
  - Prevent capacity reduction below existing bookings
  - Returns all published slots for feedback

### State Management
- Enhanced admin store with schedule state
- Support for pending/unsaved slot changes
- Optimistic UI updates with server sync

### Documentation
- Comprehensive scheduling system architecture docs
- Quick reference for admin workflows
- Flow diagrams and state transitions
- Implementation guide for future maintenance

## Breaking Changes
None

## Testing Recommendations
- Create slots for future dates via schedule editor
- Verify booking prevention for locked/full slots
- Test capacity adjustments with existing bookings
- Confirm template-based schedule generation
- Verify transaction rollback on publish failures

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 12:18:49 +08:00
richarjiang
9c5dd4a911 feat: 使用微信原生chooseAvatar获取头像
改用 button open-type="chooseAvatar" 替代上传方案,用户只能选择
微信头像,确保头像来源安全可控。头像URL直接存储到数据库。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-05 11:03:46 +08:00
richarjiang
982e569fa3 feat: 支持一键发布服务端 2026-04-04 15:39:26 +08:00