Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 public void Activate()
 {
     _applicationStateSetter.SetCurrentApplicationScreen(_appScreen);
     _regionManager.ActivateRegion(RegionNames.MainRegion, GetVisibleView());
 }
Ejemplo n.º 4
0
 private void ActivateEntityEditor()
 {
     _applicationStateSetter.SetCurrentApplicationScreen(AppScreens.EntityView);
     _regionManager.ActivateRegion(RegionNames.EntityScreenRegion, _entityEditorView);
 }