fix: align diary diet row and hide terminal cancel

- show only the personal diet name in the diary and keep the plan day chip
- hide consultation cancellation for terminal and non-cancellable states
- enable the refund form only for paid, started and in-progress plans
- cover diary rows and order info cancel visibility with tests
This commit is contained in:
2026-11-06 13:33:44 +03:00
parent 57536aba06
commit 0241265b3c
7 changed files with 105 additions and 29 deletions

View File

@@ -164,7 +164,7 @@ class _InfoByOrderScreenContentState extends State<InfoByOrderScreenContent> {
const SizedBox(height: 8),
PlanState(state: plan.chosenPlanState, hasPersonalDiet: chosenOption?.hasPersonalDiet ?? false),
const SizedBox(height: 20),
if (widget.successfulPayment == null)
if (widget.successfulPayment == null && plan.chosenPlanState.canShowCancelAction)
CustomOutlinedButton(
text: s.cancelConsultation,
height: 52,
@@ -173,7 +173,7 @@ class _InfoByOrderScreenContentState extends State<InfoByOrderScreenContent> {
onPressed: () async {
showModalBottomSheet(
context: context,
builder: (context) => CancelPlanBottomSheet(enableForm: plan.chosenPlanState.isStateAfterPaidState(), planId: plan.id),
builder: (context) => CancelPlanBottomSheet(enableForm: plan.chosenPlanState.isCancelAfterPaidState, planId: plan.id),
);
},
),