Skip to content

Commit

Permalink
Fix/nelze menit datum posledni navstevy u vlastnich prohlidek spatne …
Browse files Browse the repository at this point in the history
…razeni#117 (#470)

* fix/nelze_zmenit_datum_posledni_navstevy_vlastnich_prohlidek (Loono-cz/loono-tasks#117)

* fix/nelze_zmenit_datum_posledni_navstevy_vlastnich_prohlidek (Loono-cz/loono-tasks#117)
  • Loading branch information
Brambora0 authored Dec 14, 2022
1 parent cdb26f9 commit 38fcb02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/helpers/examination_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ extension SelfExaminationPreventionStatusExt on SelfExaminationPreventionStatus

extension ExaminationExt on ExaminationPreventionStatus {
DateTime? get targetExamDate {
if (plannedDate != null && plannedDate != lastConfirmedDate) {
if (plannedDate != null &&
plannedDate != lastConfirmedDate &&
plannedDate?.isAfter(lastConfirmedDate ?? DateTime.fromMillisecondsSinceEpoch(0)) == true) {
return DateTime(
plannedDate!.year,
plannedDate!.month,
Expand Down
1 change: 0 additions & 1 deletion lib/ui/widgets/prevention/examinations_sheet_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ class ExaminationsSheetOverlay extends StatelessWidget {

final categorizedExaminations =
categorized.where((e) => e.category == examinationStatus).toList();
//..sortExaminations();

return Column(
children: [
Expand Down

0 comments on commit 38fcb02

Please sign in to comment.