@model (int ItemIndex, List SelectedServices) @{ var itemIndex = Model.ItemIndex; var selectedServices = Model.SelectedServices ?? new List(); var prepServices = ViewBag.PrepServices as List ?? new List(); } @if (prepServices.Any()) {
Please select all services needed for this item and enter the estimated amount of time they will take to accomplish.
@foreach (var service in prepServices) { var existingEntry = selectedServices.FirstOrDefault(s => s.PrepServiceId == service.Id); var isChecked = existingEntry != null; var existingMinutes = existingEntry?.EstimatedMinutes ?? 0;
}
}