Skip to content

Commit

Permalink
Update CreateEventViewModel.cs (#1730)
Browse files Browse the repository at this point in the history
  • Loading branch information
vtserej authored Oct 21, 2024
1 parent 36d52dc commit 85e993d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions TrashMobMobile/ViewModels/CreateEventViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ private void ValidateCurrentStep(object sender, PropertyChangedEventArgs e)
break;
//Step 2 validation
case 1:
if (!string.IsNullOrEmpty(EventViewModel.Address.City))
if (!string.IsNullOrEmpty(EventViewModel.Address.City) && !string.IsNullOrEmpty(EventViewModel.Address.Region))
{
IsStepValid = true;
}
Expand Down Expand Up @@ -305,7 +305,7 @@ public async Task SetCurrentStep(StepType step)
}
else
{
if (CurrentStep < Steps.Length - 1)
if (CurrentStep < Steps.Length)
{
switch (CurrentStep)
{
Expand All @@ -318,13 +318,13 @@ public async Task SetCurrentStep(StepType step)

await LoadPartners();
await LoadLitterReports();

break;
}
case 6:
case 5:
//Evaluate displaying a confirmation text
CloseCommand.Execute(null);
break;
return;
}

CurrentStep++;
Expand All @@ -333,7 +333,7 @@ public async Task SetCurrentStep(StepType step)
}
}

CanGoBack = CurrentStep != 0 && CurrentStep != 4;
CanGoBack = CurrentStep != 0 && CurrentStep != 4 && CurrentStep != 5;
}

// This is only for the map point
Expand Down

0 comments on commit 85e993d

Please sign in to comment.