public ClientWithNextActionDTO[] GetClientsScheduledToday(Guid?employeeId = null)
        {
            var clientActions = _clientApiService.GetNextNotStartedRegisteredActionsToday(employeeId);

            var clientsWithNextAction = new List <ClientWithNextActionDTO>();

            foreach (var clientAction in clientActions)
            {
                var dto = new ClientWithNextActionDTO();
                dto.ClientId   = clientAction.ClientId;
                dto.NextAction = MapRegisteredActionToBasicDto(clientAction);

                clientsWithNextAction.Add(dto);
            }

            return(clientsWithNextAction.ToArray());
        }
        public ClientWithNextActionDTO[] GetAllClientsWithNextAction(Guid?employeeId = null)
        {
            var clientActions = _clientApiService.GetAllNextRegisteredActions(employeeId);
            var clients       = _clientApiService.GetAgreedActionsLinkedClients(employeeId);

            var clientsWithNextAction = new List <ClientWithNextActionDTO>();

            foreach (var client in clients)
            {
                var nextClientAction = clientActions.SingleOrDefault(ca => ca.ClientId == client.Id);
                var dto = new ClientWithNextActionDTO();
                dto.ClientId   = client.Id;
                dto.NextAction = nextClientAction != null?MapRegisteredActionToBasicDto(nextClientAction) : null;

                clientsWithNextAction.Add(dto);
            }

            return(clientsWithNextAction.ToArray());
        }