Beispiel #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();
        }
Beispiel #2
0
        private void DisplaySingleTicket()
        {
            if (SelectedTicket != null && SelectedTicket.Orders.Count == 0 && _cacheService.GetTicketTagGroups().Count(x => x.AskBeforeCreatingTicket && !SelectedTicket.IsTaggedWith(x.Name)) > 0)
            {
                _ticketTagListViewModel.Update(SelectedTicket);
                DisplayTicketTagList();
                return;
            }

            _regionManager.RequestNavigate(RegionNames.MainRegion, new Uri("PosView", UriKind.Relative));
            _regionManager.RequestNavigate(RegionNames.PosMainRegion, new Uri("TicketView", UriKind.Relative));
            _ticketViewModel.RefreshSelectedItems();
            _ticketViewModel.RefreshVisuals();
        }