feat(v1.5): 触摸键盘、格子大字计数、客户停用/删除、按钮收纳、7 天徽标、抽屉时钟
build / build-and-test (push) Successful in 3m19s

1) 工作台速录
- 手机尾号输入框下方新增 3×4 触摸小键盘(1-9、0、⌫、✓),点 ✓ 直接提交;实体键盘仍可输入
- 抽屉顶部新增秒级时钟(HH:MM:SS),位于日期标题上方

2) 日历格子
- 移除排单缩略信息(客户名/套餐色签/“x/y 单”小字)
- 保留左侧打手颜色竖条,中间改为大字「待完成 / 总数」,例如 1/2 = 还剩 1 单、共 2 单
- 大屏格子按此前约定保持原样

3) 客户停用 / 恢复 / 彻底删除
- customers 新增 archived 列(0/1);停用后默认从客户列表、日历、待办、大屏、到期提醒、徽标中隐藏,订阅与打卡记录原样保留
- 恢复后立即回到日历;列表右上角可切换「显示已停用」,已停用行带标记
- 彻底删除为二次确认操作,依赖外键级联清理订阅、打卡、暂停、追加记录与加急标记
- 停用/恢复/删除都会写入操作日志

4) 按钮收纳
- 任务行只露出「完成」,跳过 / 加急(取消加急)/ 追加收进「⋯」菜单;已完成行只露「撤销打卡」等,点空白处自动收起
- 加急、跳过等原有能力不变,仅入口折叠

5) 顶栏
- 在「今日到期」「3 天内到期」右侧新增「7 天内到期」徽标,固定统计未来 7 天

6) 视觉
- 移除管理端背景的横线装饰,改为纯底色;大屏网格背景保留

数据库兼容性:
- 只新增 customers.archived 一列,老库启动时自动 ALTER,可重复迁移;原有表结构与接口不变

测试:
- 新增单测 TestCustomerArchiveFilters:停用后日历/到期/徽标/搜索/列表全部过滤、恢复回日历、彻底删除级联清理订阅与打卡
- 功能验证 20 项(键盘、格子计数、折叠菜单、7 天徽标、时钟、停用/恢复/删除、背景)全部通过
- 原有 119 项验收回归全绿;go vet / go test ./... 通过;版本号 1.5.0
This commit is contained in:
subtrack
2026-10-19 02:12:25 +08:00
parent 95fa4fd6fd
commit 1f7d0f0cc4
16 changed files with 447 additions and 72 deletions
+6 -2
View File
@@ -105,6 +105,9 @@ func (s *Server) routes() http.Handler {
mux.HandleFunc("GET /customers/{id}/edit", s.auth(s.handleCustomerEditPage))
mux.HandleFunc("POST /customers/{id}/edit", s.auth(s.handleCustomerUpdate))
mux.HandleFunc("POST /customers/{id}/assignee", s.auth(s.handleCustomerAssignee))
mux.HandleFunc("POST /customers/{id}/archive", s.auth(s.handleCustomerArchive))
mux.HandleFunc("POST /customers/{id}/restore", s.auth(s.handleCustomerRestore))
mux.HandleFunc("POST /customers/{id}/delete", s.auth(s.handleCustomerDelete))
mux.HandleFunc("POST /customers/{id}/subscriptions", s.auth(s.handleSubCreate))
mux.HandleFunc("GET /subscriptions", s.auth(s.handleSubscriptions))
mux.HandleFunc("POST /subscriptions/{id}/extend", s.auth(s.handleSubExtend))
@@ -334,6 +337,7 @@ type page struct {
Next string
DueToday int
Due3 int
Due7 int
Addr string
Theme string // "" = 跟随系统;light / dark
D any
@@ -371,8 +375,8 @@ func (s *Server) newPage(r *http.Request, title, nav string) *page {
Theme: themeFromRequest(r),
}
if u != nil {
if due, due3, err := s.db.Badges(today); err == nil {
p.DueToday, p.Due3 = due, due3
if due, due3, due7, err := s.db.Badges(today); err == nil {
p.DueToday, p.Due3, p.Due7 = due, due3, due7
}
}
return p