[Contracts] New contract statuses and migration

Đang mở
#488 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend, frontend, mobile

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

back-end enhancement :rocket: mobile-app needs-info vic-2.0 web-app

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.

Ngôn ngữ chính
TypeScript
Star
3
Fork
2
Merge trung bình
18 phút
Pull request đã merge (30 ngày)
118

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của code4romania/vic

Tất cả issue của code4romania/vic

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.