Ejemplo n.º 1
0
        public async Task ChooseTokens()
        {
            var act    = headersDict.Where(x => x.Value == HeaderType.Activity);
            var caseId = headersDict.Where(x => x.Value == HeaderType.Case);

            if (!act.Any() || !caseId.Any())
            {
                await MatDialogService.AlertAsync("You need at least 1 activity and 1 case!");

                return;
            }

            var timetmpList = headersDict.Where(x => x.Value == HeaderType.Timestamp).Select(x => x.Key).ToList();
            var time        = timetmpList.Any() ? timetmpList[0] : null;
            var resources   = headersDict.Where(x => x.Value == HeaderType.Resource).Select(x => x.Key).ToArray();

            _imported.ChooseTokens(act.FirstOrDefault().Key, caseId.FirstOrDefault().Key, time, resources);
        }