private void DisplaySingleTicket() { _applicationStateSetter.SetCurrentApplicationScreen(AppScreens.TicketView); if (ShouldDisplayEntityList(SelectedTicket)) { _ticketEntityListViewModel.Update(SelectedTicket); DisplayTicketEntityList(); return; } if (ShouldDisplayTicketTagList(SelectedTicket)) { _ticketTagListViewModel.Update(SelectedTicket); DisplayTicketTagList(); return; } if (SelectedTicket != null && !_userService.IsUserPermittedFor(PermissionNames.DisplayOtherWaitersTickets) && SelectedTicket.Orders.Any() && SelectedTicket.Orders[0].CreatingUserName != _applicationState.CurrentLoggedInUser.Name) { InteractionService.UserIntraction.GiveFeedback("Can't display this ticket"); EventServiceFactory.EventService.PublishEvent(EventTopicNames.CloseTicketRequested); return; } _regionManager.RequestNavigate(RegionNames.MainRegion, new Uri("PosView", UriKind.Relative)); _regionManager.RequestNavigate(RegionNames.PosMainRegion, new Uri("TicketView", UriKind.Relative)); _accountBalances.RefreshAsync(() => _ticketViewModel.RefreshSelectedTicketTitle()); _ticketViewModel.RefreshSelectedItems(); if (SelectedTicket != null) { CommonEventPublisher.ExecuteEvents(SelectedTicket); } }
public void DisplayTickets() { _lastSelectedEntity = null; Debug.Assert(_applicationState.CurrentDepartment != null); if (SelectedTicket != null || !_applicationState.GetTicketEntityScreens().Any() || _applicationState.CurrentDepartment.TicketCreationMethod == 1) { _applicationStateSetter.SetCurrentApplicationScreen(AppScreens.TicketView); DisplaySingleTicket(); return; } CommonEventPublisher.PublishEntityOperation <Entity>(null, EventTopicNames.SelectEntity, EventTopicNames.EntitySelected); }
public void Activate() { _applicationStateSetter.SetCurrentApplicationScreen(_appScreen); _regionManager.ActivateRegion(RegionNames.MainRegion, GetVisibleView()); }
private void ActivateEntityEditor() { _applicationStateSetter.SetCurrentApplicationScreen(AppScreens.EntityView); _regionManager.ActivateRegion(RegionNames.EntityScreenRegion, _entityEditorView); }