[Contracts] New contract statuses and migration

オープン
#488 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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 の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
3
フォーク
2
平均マージ
18分
マージ済み PR(30日)
118

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

code4romania/vic のほかの issue

code4romania/vic の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。