Compare commits

...

2 Commits

3 changed files with 17 additions and 2 deletions

View File

@ -71,8 +71,19 @@
}] }]
}, },
options: { options: {
plugins: {
legend: {
display: false
}
},
scales: {
y: {
suggestedMin: Math.min(data) - Math.min(data) * -0.1,
suggestedMax: Math.max(data) + Math.max(data) * 0.1,
}
}
} }
}); }
);
</script> </script>

View File

@ -32,6 +32,8 @@ namespace BankYouBankruptDatabaseImplement.Implements
if (model.Status.HasValue) result = result.Where(x => x.Status == model.Status).ToList(); if (model.Status.HasValue) result = result.Where(x => x.Status == model.Status).ToList();
if (model.CardId.HasValue) result = result.Where(x => x.CardId == model.CardId).ToList();
if (model.UserId.HasValue) if (model.UserId.HasValue)
{ {
List<int> cards = context.Cards.Where(x => x.ClientID == model.UserId).Select(x => x.Id).ToList(); List<int> cards = context.Cards.Where(x => x.ClientID == model.UserId).Select(x => x.Id).ToList();

View File

@ -36,6 +36,8 @@ namespace BankYouBankruptDatabaseImplement.Implements
//для получения всех заявок на стнятие со статусом "Открыта" //для получения всех заявок на стнятие со статусом "Открыта"
if (model.Status.HasValue) result = result.Where(x => x.Status == model.Status).ToList(); if (model.Status.HasValue) result = result.Where(x => x.Status == model.Status).ToList();
if (model.CardId.HasValue) result = result.Where(x => x.CardId == model.CardId).ToList();
if (model.UserId.HasValue) { if (model.UserId.HasValue) {
List<int> cards = context.Cards.Where(x => x.ClientID == model.UserId).Select(x => x.Id).ToList(); List<int> cards = context.Cards.Where(x => x.ClientID == model.UserId).Select(x => x.Id).ToList();
result = result.Where(x => cards.Contains(x.CardId)).ToList(); result = result.Where(x => cards.Contains(x.CardId)).ToList();