feat: stack related date fields and clarify share stock labels (#422)

* feat: stack related date fields and clarify share stock labels

* test: cover stacked date pairs and share labels
This commit is contained in:
Daniel Volz
2026-03-12 21:32:56 +01:00
committed by GitHub
parent 3fda41e501
commit d0837a7281
12 changed files with 238 additions and 63 deletions
+21 -19
View File
@@ -1247,17 +1247,27 @@ export function MedicationsPage() {
<span className="field-error">{fieldErrors.genericName}</span>
)}
</label>
<label>
{t("form.medicationStartDate")}
<DateInput
value={form.medicationStartDate}
onChange={(e) => handleValueChange("medicationStartDate", e.target.value)}
placeholder={t("common.optional")}
/>
{!readOnlyView && dateConsistencyError && (
<span className="field-error">{dateConsistencyError}</span>
)}
</label>
<div className="full date-pair-group">
<label className="date-pair-field">
{t("form.medicationStartDate")}
<DateInput
value={form.medicationStartDate}
onChange={(e) => handleValueChange("medicationStartDate", e.target.value)}
placeholder={t("common.optional")}
/>
{!readOnlyView && dateConsistencyError && (
<span className="field-error">{dateConsistencyError}</span>
)}
</label>
<label className="date-pair-field">
{t("form.medicationEndDate")}
<DateInput
value={form.medicationEndDate}
onChange={(e) => handleValueChange("medicationEndDate", e.target.value)}
placeholder={t("common.optional")}
/>
</label>
</div>
<label>
{t("form.packageType")}
<select
@@ -1272,14 +1282,6 @@ export function MedicationsPage() {
))}
</select>
</label>
<label>
{t("form.medicationEndDate")}
<DateInput
value={form.medicationEndDate}
onChange={(e) => handleValueChange("medicationEndDate", e.target.value)}
placeholder={t("common.optional")}
/>
</label>
{allowsPillFormSelection(form.packageType) && (
<label>
{t("form.pillForm")}