From 1ba6963e1cc91438489e4031ed9d5d803f0a9156 Mon Sep 17 00:00:00 2001 From: Patrick Sun Date: Sun, 3 Jan 2021 02:43:43 +1100 Subject: [PATCH] adding transaction dialog first half worked hooray --- src/app/app.module.ts | 8 +- src/app/loan-edit/dist/loan-edit.component.js | 28 +++ src/app/loan-edit/loan-edit.component.html | 160 ++++++++++++++++-- src/app/loan-edit/loan-edit.component.scss | 1 + src/app/loan-edit/loan-edit.component.ts | 42 ++++- 5 files changed, 227 insertions(+), 12 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 6dbe8a9..0351d81 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -34,6 +34,10 @@ import 'hammerjs'; import { BkpDividerComponent } from './bkp-divider/bkp-divider.component'; import { BkpDividerShadowBottomComponent } from './bkp-divider-shadow-bottom/bkp-divider-shadow-bottom.component'; import { BkpDividerTextComponent } from './bkp-divider-text/bkp-divider-text.component'; +import { DateInputsModule } from '@progress/kendo-angular-dateinputs'; +import { DropDownsModule } from '@progress/kendo-angular-dropdowns'; + + @@ -72,7 +76,9 @@ import { BkpDividerTextComponent } from './bkp-divider-text/bkp-divider-text.com IndicatorsModule, LabelModule, NotificationModule, - ChartsModule + ChartsModule, + DateInputsModule, + DropDownsModule ], providers: [MenuService, AuthGuard, AuthService], bootstrap: [AppComponent] diff --git a/src/app/loan-edit/dist/loan-edit.component.js b/src/app/loan-edit/dist/loan-edit.component.js index e89e886..f85bf75 100644 --- a/src/app/loan-edit/dist/loan-edit.component.js +++ b/src/app/loan-edit/dist/loan-edit.component.js @@ -8,13 +8,35 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, exports.__esModule = true; exports.LoanEditComponent = void 0; var core_1 = require("@angular/core"); +var forms_1 = require("@angular/forms"); var LoanEditComponent = /** @class */ (function () { + //form access + //@ViewChild('birthDate', {static: true}) birthDate: LoanEditComponent; function LoanEditComponent() { //popup this.dialogOpened = false; this.windowOpened = false; //test this.somedata = "opened"; + this.min = new Date(2015, 0, 1); + this.max = new Date(2030, 4, 31); + this.registerForm = new forms_1.FormGroup({ + transID: new forms_1.FormControl(), + submissionDate: new forms_1.FormControl(new Date(2020, 0, 10)), + clientNames: new forms_1.FormControl([1]), + brokers: new forms_1.FormControl([2]), + referals: new forms_1.FormControl([3]), + status: new forms_1.FormControl(), + lender: new forms_1.FormControl(), + limit: new forms_1.FormControl(), + settlementDate: new forms_1.FormControl(new Date(2020, 0, 9)) + }); + this.listClientNames = [ + { text: 'John', value: 1 }, + { text: 'Steven', value: 2 }, + { text: 'William', value: 3 } + ]; + this.statis = { text: 'Female', value: 2 }; } LoanEditComponent.prototype.ngOnInit = function () { }; @@ -30,6 +52,12 @@ var LoanEditComponent = /** @class */ (function () { console.log("Dialog result: " + status); this.dialogOpened = false; }; + LoanEditComponent.prototype.submitForm = function () { + this.registerForm.markAllAsTouched(); + }; + LoanEditComponent.prototype.clearForm = function () { + this.registerForm.reset(); + }; LoanEditComponent = __decorate([ core_1.Component({ selector: 'app-loan-edit', diff --git a/src/app/loan-edit/loan-edit.component.html b/src/app/loan-edit/loan-edit.component.html index 59718aa..74a93a0 100644 --- a/src/app/loan-edit/loan-edit.component.html +++ b/src/app/loan-edit/loan-edit.component.html @@ -1,15 +1,155 @@
- - +
-
-

ColorGradient

- +
+ + + + + + +
+
+
+ Bank Transaction Details + + + + + Unique transaction + ID from bank + Error: the ID is required + + + + + + + + Date in bank + + + + + + + + + + + + + + + + + + + + + + + + + Error: status is required + + + + + + + + E.g. NAB Bank + Error: Lender is required + + + + + + + + E.g. 8000 + Error: Limit is required + + + + + + + + Date Settled + + +
+ + +
+
+
+
+
+ + +
+

Commission Splits

+

Resizable and collapsible.

+
+
+ +
+
+ + +
+

Revelant Parties

+

a table for revelant parties editable grid

+
+
+ +
-
- +
+ @@ -17,6 +157,6 @@
-

Additional info

-
-
+

Additional info

+ + \ No newline at end of file diff --git a/src/app/loan-edit/loan-edit.component.scss b/src/app/loan-edit/loan-edit.component.scss index e69de29..46f7c18 100644 --- a/src/app/loan-edit/loan-edit.component.scss +++ b/src/app/loan-edit/loan-edit.component.scss @@ -0,0 +1 @@ +.pane-content { padding: 0 10px; } \ No newline at end of file diff --git a/src/app/loan-edit/loan-edit.component.ts b/src/app/loan-edit/loan-edit.component.ts index 0ab318b..bbdecb6 100644 --- a/src/app/loan-edit/loan-edit.component.ts +++ b/src/app/loan-edit/loan-edit.component.ts @@ -1,4 +1,5 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { FormControl, FormGroup, Validators } from '@angular/forms'; @Component({ selector: 'app-loan-edit', @@ -12,6 +13,12 @@ export class LoanEditComponent implements OnInit { //test public somedata : string = "opened"; + + + //form access + + //@ViewChild('birthDate', {static: true}) birthDate: LoanEditComponent; + constructor() { } ngOnInit(): void { @@ -31,4 +38,37 @@ export class LoanEditComponent implements OnInit { console.log(`Dialog result: ${status}`); this.dialogOpened = false; } + + + + public min: Date = new Date(2015, 0, 1); + public max: Date = new Date(2030, 4, 31); + + public registerForm: FormGroup = new FormGroup({ + transID: new FormControl(), + submissionDate: new FormControl(new Date(2020, 0, 10)), + clientNames : new FormControl([1]), + brokers : new FormControl([2]), + referals : new FormControl([3]), + status: new FormControl(), + lender: new FormControl(), + limit: new FormControl(), + settlementDate: new FormControl(new Date(2020, 0, 9)), + }); + + public submitForm(): void { + this.registerForm.markAllAsTouched(); + } + + public clearForm(): void { + this.registerForm.reset(); + } + + public listClientNames: Array<{ text: string, value: number }> = [ + { text: 'John', value: 1 }, + { text: 'Steven', value: 2 }, + { text: 'William', value: 3 } + ]; + + public statis: { text: string, value: number } = { text: 'Female', value: 2 }; }