# Proposals Management PRD

## Field Mapping (Create & Edit)

All proposal fields are unified and mapped identically for both creation and editing. The only difference is which fields are shown or hidden depending on the context (create vs. edit, status, permissions, etc.).

### Fields (Always Present)
- **Title**
- **Client**
- **Departments** (multi-select, always the same options)
- **Description**
- **Status**
- **Proposal Date**
- **Valid Until**
- **Amount**
- **Internal Notes**
- **Attachments**

> **Departments:**
> - The list of departments is always the same for both create and edit.
> - The selected departments are stored as an array in the `departments` JSON column in the database.
> - The UI always shows the same checkboxes for both create and edit.

## Status Workflow

- **conflict_analyse**: Set automatically when a proposal is created (default status).
- **draft**: User can change to draft after "no conflict" is set.
- **sent**: User manually changes status when sending the proposal.
- **pending**: After 24h, status changes automatically from sent to pending.
- **approved**: Manually set after client approval.
- **rejected**: Manually set after client rejection.
- **expired**: Automatically set after 30 days.
- **no_conflict**: Automatically set after conflict analysis is approved.
- **conflict**: Automatically set if a conflict is detected during analysis.

> **Note:** All proposal information is always the same; only the UI changes what is visible/editable depending on the context and status. 