Skip to content

Commit

Permalink
account: ensure a customer makes their first address a preferred one
Browse files Browse the repository at this point in the history
placing orders relies on the customer's preferred delivery address to complete. if no addresses are marked as preferred, the order will fail
  • Loading branch information
ShaylenReddy42 committed Aug 8, 2022
1 parent 908746b commit e7674dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SeelansTyres.Mvc/Views/Account/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@
<label class="input-group-text" asp-for="CreateAddressModel.PreferredAddress">Mark As Preferred Delivery Address</label>
<select class="form-select" asp-for="CreateAddressModel.PreferredAddress">
<option value="true" selected>Yes</option>
<option value="false">No</option>
@if (Model.Addresses.Count() is not 0)
{
<option value="false">No</option>
}
</select>
</div>
<div class="text-center">
Expand Down

0 comments on commit e7674dd

Please sign in to comment.