public async Task <IActionResult> Create(string filterTagTypeKey = null, string filterTagKey = null)
        {
            var rule = new dto.Model.TransactionRecognitionRule();

            var conditions = new List <TransactionRecognitionRuleCondition>();
            var actions    = new List <TransactionRecognitionRuleAction>();

            ViewBag.AllTagsTypes = await _api.GetAsync <IEnumerable <dto.Model.TagType> >("tagtypes");

            conditions.Add(new TransactionRecognitionRuleCondition
            {
                FieldType     = dto.ERecognitionRuleConditionFieldType.Tag,
                FieldName     = "payee",
                ValueOperator = dto.ERecognitionRuleConditionOperator.Equals,
                Value         = ""
            });

            actions.Add(new TransactionRecognitionRuleAction
            {
                Type  = dto.ERecognitionRuleActionType.AddTag,
                Field = "category",
                Value = "",
            });

            rule.Conditions = conditions;
            rule.Actions    = actions;

            return(View(rule));
        }
        public async Task <IActionResult> DetectTransactions(dto.Model.TransactionRecognitionRule rule)
        {
            var transactions = await _api.PostAsync <IEnumerable <ImportedTransaction>, dto.Model.TransactionRecognitionRule>($"recognition/rules/detect", rule);

            return(PartialView("ImportedTransactions", transactions));
        }