- Combined
+
+
+
+
+ | General |
+ Missions |
+ Total |
+
+
+
+
+
+ | {{contributorName(i)}} |
+
+
+ | {{contributorTotal(i, 1) | currency}} |
+ {{contributorTotal(i, 2) | currency}} |
+ {{contributorTotal(i, 0) | currency}} |
+
+
+
+ |
+ Total
+ |
+
+
+ | {{combinedTotal(1) | currency}} |
+ {{combinedTotal(2) | currency}} |
+ {{combinedTotal(0) | currency}} |
+
+
+
-
- General: {{combinedTotal(1)}}
-
-
- Missions: {{combinedTotal(2)}}
-
-
- Total: {{combinedTotal(0)}}
-
-
-
\ No newline at end of file
+
+
+
+
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 74cca79..51afb54 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
@@ -82,7 +82,17 @@ export class AddTransactionPageComponent implements OnInit {
addTransaction(contributorPosition: number) {
const contributors = this.form.get('contributions') as FormArray;
const transactions = contributors.controls[contributorPosition].get('transactions') as FormArray;
- transactions.push(this.getTransaction());
+ const lastTransaction = transactions.value.length > 0 ? transactions.value[transactions.value.length-1] : undefined;
+ console.log(lastTransaction);
+ const newTransaction = this.getTransaction();
+ if (lastTransaction) {
+ newTransaction.patchValue({
+ "typeId": lastTransaction.typeId,
+ "checkNumber": lastTransaction.checkNumber,
+ "fundId": lastTransaction.fundId === 1 ? 2 : 1
+ });
+ }
+ transactions.push(newTransaction);
}
addContributor() {
diff --git a/Client/src/app/components/secondary-page/secondary-page.component.css b/Client/src/app/components/secondary-page/secondary-page.component.css
index 0d4df67..80b1602 100644
--- a/Client/src/app/components/secondary-page/secondary-page.component.css
+++ b/Client/src/app/components/secondary-page/secondary-page.component.css
@@ -19,6 +19,10 @@
padding: 20px;
}
+.fixed-side-bar {
+ position: fixed;
+}
+
.align-top{
vertical-align: top;
}
@@ -28,6 +32,11 @@
display: block;
width: 100%;
}
+
+ .fixed-side-bar {
+ position: initial;
+ }
+
.hide-on-mobile{
display: none;
}
diff --git a/Client/src/app/components/secondary-page/secondary-page.component.html b/Client/src/app/components/secondary-page/secondary-page.component.html
index db0680f..f21bde6 100644
--- a/Client/src/app/components/secondary-page/secondary-page.component.html
+++ b/Client/src/app/components/secondary-page/secondary-page.component.html
@@ -3,7 +3,7 @@
diff --git a/Client/src/app/components/secondary-page/secondary-page.component.ts b/Client/src/app/components/secondary-page/secondary-page.component.ts
index 6d4c51c..9f2d400 100644
--- a/Client/src/app/components/secondary-page/secondary-page.component.ts
+++ b/Client/src/app/components/secondary-page/secondary-page.component.ts
@@ -8,6 +8,8 @@ import { Component, Input, OnInit } from '@angular/core';
export class SecondaryPageComponent implements OnInit {
@Input()
public hideSideBarOnMobile: boolean;
+ @Input()
+ public fixedSideBar: boolean;
constructor(){