From a471b3121b06ce909b673b669acb6cd0badc9312 Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 23 Nov 2019 11:08:15 -0700 Subject: [PATCH] add red border when dates do not match --- .../add-transaction-page.component.html | 16 ++++++++++------ .../add-transaction-page.component.ts | 12 ++++++++++++ Client/src/styles.css | 4 ++++ 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Client/src/app/components/add-transaction-page/add-transaction-page.component.html b/Client/src/app/components/add-transaction-page/add-transaction-page.component.html index c1afae6..8ba86f9 100644 --- a/Client/src/app/components/add-transaction-page/add-transaction-page.component.html +++ b/Client/src/app/components/add-transaction-page/add-transaction-page.component.html @@ -6,9 +6,9 @@ - - - + + + @@ -23,8 +23,8 @@ - - + + @@ -35,6 +35,7 @@ + @@ -42,6 +43,7 @@ + @@ -55,9 +57,10 @@ - + + @@ -65,6 +68,7 @@ + diff --git a/Client/src/app/components/add-transaction-page/add-transaction-page.component.ts b/Client/src/app/components/add-transaction-page/add-transaction-page.component.ts index e1452b4..d7f470f 100644 --- a/Client/src/app/components/add-transaction-page/add-transaction-page.component.ts +++ b/Client/src/app/components/add-transaction-page/add-transaction-page.component.ts @@ -107,6 +107,18 @@ export class AddTransactionPageComponent implements OnInit { return contributor ? contributor.display : undefined; } + contributorDatesMatch(contributorId: number) { + const contributor = this.contributions.find(c => c.contributorId === contributorId); + if (!contributor) return true; + let match = true; + contributor.transactions.forEach(t => { + if (t.date != contributor.date) { + match = false; + } + }); + return match; + } + contributorTotal(contributorId: number, fundId: number) { const contrib = this.contributions.find(c => c.contributorId === contributorId); if (!contrib) return 0; diff --git a/Client/src/styles.css b/Client/src/styles.css index 2140edf..8bb2be7 100644 --- a/Client/src/styles.css +++ b/Client/src/styles.css @@ -19,6 +19,10 @@ body { color: red; } +.bg-red { + background-color: red; +} + /*MATERIAL FONT FOR ICONS*/ @font-face { font-family: 'Material Icons';
{{contributorName(c.contributorId)}}
{{c.date}}{{contributorName(c.contributorId)}}
{{t.description}}{{t.description}}
{{t.date}}
GeneralTotal
{{contributorTotal(c.contributorId, 1) | currency}}
Grand TotalsGrand Totals
GeneralTotal
{{combinedTotal(1) | currency}}