[Contracts] New contract statuses and migration
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 3
- Forks
- 2
- Merge médio
- 18min
- PRs com merge (30d)
- 118
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de code4romania/vic
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
code4romania/vic#638 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 1-2 dias Facilidade para iniciantes 52/100
code4romania/vic#639 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
code4romania/vic#637 ·
Mantenedores costumam responder em até 1 dia
-
needs-info vic-2.0
Dificuldade 4/5 Meio dia Facilidade para iniciantes 25/100
code4romania/vic#563 ·
Mantenedores costumam responder em até 1 dia
-
agent-ready devops enhancement :rocket: mobile-app vic-2.0
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 15/100
code4romania/vic#513 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de code4romania/vic
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
pieterjanscheir/belgica#201 ·
Mantenedores costumam responder em até 1 dia
-
accessibility
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
numerique-gouv/lasuite-landingpage#311 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
oxc-project/tsgolint#1362 ·
Mantenedores costumam responder em até 1 dia
-
bug external xai
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
langchain-ai/langchain#41854 ·
Mantenedores costumam responder em até 1 dia
-
ready-for-agent
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 72/100
nemchik/biome-plugin-suitescript#137 ·
Mantenedores costumam responder em até 1 dia