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
@@ -421,17 +421,27 @@ export function MobileEditModal({
<span className="field-error">{fieldErrors.genericName}</span>
)}
</label>
<label className="full">
{t("form.medicationStartDate")}
<DateInput
value={form.medicationStartDate}
onChange={(e) => onHandleValueChange("medicationStartDate", e.target.value)}
placeholder={t("common.optional")}
/>
{!readOnlyMode && 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) => onHandleValueChange("medicationStartDate", e.target.value)}
placeholder={t("common.optional")}
/>
{!readOnlyMode && dateConsistencyError && (
<span className="field-error">{dateConsistencyError}</span>
)}
</label>
<label className="date-pair-field">
{t("form.medicationEndDate")}
<DateInput
value={form.medicationEndDate}
onChange={(e) => onHandleValueChange("medicationEndDate", e.target.value)}
placeholder={t("common.optional")}
/>
</label>
</div>
<label className="full">
{t("form.packageType")}
<select
@@ -446,14 +456,6 @@ export function MobileEditModal({
))}
</select>
</label>
<label className="full">
{t("form.medicationEndDate")}
<DateInput
value={form.medicationEndDate}
onChange={(e) => onHandleValueChange("medicationEndDate", e.target.value)}
placeholder={t("common.optional")}
/>
</label>
{allowsPillFormSelection(form.packageType) && (
<label className="full">
{t("form.pillForm")}