diff --git a/BankYouBankrupt/BankYouBankruptClientApp/Views/Home/Diagram.cshtml b/BankYouBankrupt/BankYouBankruptClientApp/Views/Home/Diagram.cshtml index 921dba1..a821589 100644 --- a/BankYouBankrupt/BankYouBankruptClientApp/Views/Home/Diagram.cshtml +++ b/BankYouBankrupt/BankYouBankruptClientApp/Views/Home/Diagram.cshtml @@ -71,8 +71,19 @@ }] }, 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, + } + } } - }); + } + ); diff --git a/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CreditingStorage.cs b/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CreditingStorage.cs index 381b02c..085aabf 100644 --- a/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CreditingStorage.cs +++ b/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/CreditingStorage.cs @@ -32,6 +32,8 @@ namespace BankYouBankruptDatabaseImplement.Implements 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) { List cards = context.Cards.Where(x => x.ClientID == model.UserId).Select(x => x.Id).ToList(); diff --git a/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/DebitingStorage.cs b/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/DebitingStorage.cs index d4ae099..13e5b94 100644 --- a/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/DebitingStorage.cs +++ b/BankYouBankrupt/BankYouBankruptDatabaseImplement/Implements/DebitingStorage.cs @@ -36,6 +36,8 @@ namespace BankYouBankruptDatabaseImplement.Implements //для получения всех заявок на стнятие со статусом "Открыта" 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) { List cards = context.Cards.Where(x => x.ClientID == model.UserId).Select(x => x.Id).ToList(); result = result.Where(x => cards.Contains(x.CardId)).ToList();