[Contracts] New contract statuses and migration
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Start in backend/src/api/contracts/ and backend/src/migrations/ to see how contract status is stored and where a migration would go, then check frontend/src/pages/Contracts.tsx for the Perioadă column. The status labels are still an open question with the client, so confirm them in the issue before coding. Done means the migration mapping has a passing test, the flags are computed from the end date, and web and mobile show the new statuses and tag.
由索引模型根据 Issue 内容生成。
描述
Context
Move contracts to a simpler status model:
- Active: signed and within its validity period. Can carry the flag "Expiră în curând".
- Inactive: pending or expired. Expired ones carry the flag "Expirat".
So the possible states are: Active, Active + "Expiră în curând", Inactive, Inactive + "Expirat".
Migration of existing contracts:
- signed and within the active period → Active;
- pending or expired → Inactive (with the "Expirat" flag where applicable).
"Expiră în curând" is shown as a tag in the "Perioadă" column.
Open question: the design shows the statuses "Semnat", "În așteptare", "Expiră în curând" and "Expirat", with "Expiră în curând" as a tag while the status is "Semnat". Confirm the final labels against this model before implementing.
Design
Prototype: https://perch-pic-08148752.figma.site/ → Contracte. The prototype is indicative; this issue's text wins where they differ.
Acceptance criteria
- Contracts have Active / Inactive status plus the flags "Expiră în curând" (within 1 month of end date) and "Expirat".
- A migration maps existing contracts as described; the mapping is covered by a test.
- Flags are computed from the end date, not stored manually.
- Web and mobile show the new statuses and the "Expiră în curând" tag in the Perioadă column.
Dependencies
Phase 0. No blockers.
Where to look
backend/src/api/contracts/backend/src/modules/documents/backend/src/migrations/frontend/src/pages/Contracts.tsx
Before starting
Resolve the open question above with the client and update this issue first.
- 主要语言
- TypeScript
- 星标
- 3
- 派生
- 2
- 平均合并
- 18 分钟
- 30 天内合并 PR
- 118
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
code4romania/vic 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
code4romania/vic#638 ·
维护者通常 1 天内回复
-
难度 4/5 1-2 天 新手友好度 52/100
code4romania/vic#639 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
code4romania/vic#637 ·
维护者通常 1 天内回复
-
needs-info vic-2.0
难度 4/5 半天 新手友好度 25/100
code4romania/vic#563 ·
维护者通常 1 天内回复
-
agent-ready devops enhancement :rocket: mobile-app vic-2.0
难度 4/5 3-5 天 新手友好度 15/100
code4romania/vic#513 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
nikoheikkila/nikoheikkila.fi#1131 ·
维护者通常 1 天内回复
-
Resources: Update work of urumqi可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
railmapgen/rmp-gallery#4176 ·
维护者通常 2 天内回复
-
GraphQL custom headers duplicate differently cased default headers可能已有人在做 @yxr-2025 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
github/forgoodfirstissue#574 ·