diff --git a/src/app/auth/login.component.html b/src/app/auth/login.component.html index a30d712..1dee613 100644 --- a/src/app/auth/login.component.html +++ b/src/app/auth/login.component.html @@ -17,15 +17,15 @@
-
- - +
+ +
+
diff --git a/src/app/auth/register.component.html b/src/app/auth/register.component.html index a54fb0a..9391b63 100644 --- a/src/app/auth/register.component.html +++ b/src/app/auth/register.component.html @@ -134,12 +134,12 @@
Please Select a User Type
-
+
+
+
+ + + +
+
@@ -107,6 +120,19 @@
+
+
+ + + +
+
diff --git a/src/app/dashboard/account-edit.component.ts b/src/app/dashboard/account-edit.component.ts index c7cde13..5df1bb3 100644 --- a/src/app/dashboard/account-edit.component.ts +++ b/src/app/dashboard/account-edit.component.ts @@ -14,6 +14,7 @@ export class AccountEditComponent implements OnInit { settingCustomerForm: FormGroup; accountType: any; @ViewChild('fileInput') fileInput; + submitStatus: any; constructor( private http: Http, @@ -70,6 +71,8 @@ export class AccountEditComponent implements OnInit { console.log(this.settingForm.valid); if (!this.settingForm.valid && !this.settingOrganisationForm.valid) { console.log('Not Valid!'); + this.submitStatus = "validation_failed"; + console.log(this.submitStatus); return; } @@ -103,9 +106,13 @@ export class AccountEditComponent implements OnInit { .subscribe( result => { console.log('data submitted!'); + this.submitStatus = "success"; + console.log(this.submitStatus); }, error => { console.log( error._body ); + this.submitStatus = "send_failed"; + console.log(this.submitStatus); } ); } @@ -114,6 +121,8 @@ export class AccountEditComponent implements OnInit { console.log(this.settingForm.valid); if (!this.settingForm.valid && !this.settingCustomerForm.valid) { console.log('Not Valid!'); + this.submitStatus = "validation_failed"; + console.log(this.submitStatus); return; } @@ -145,9 +154,13 @@ export class AccountEditComponent implements OnInit { .subscribe( result => { console.log('data submitted!'); + this.submitStatus = "success"; + console.log(this.submitStatus); }, error => { console.log( error._body ); + this.submitStatus = "send_failed"; + console.log(this.submitStatus); } ); } diff --git a/src/app/dashboard/add-data.component.html b/src/app/dashboard/add-data.component.html index 6143d49..49bb9b8 100644 --- a/src/app/dashboard/add-data.component.html +++ b/src/app/dashboard/add-data.component.html @@ -89,9 +89,21 @@ A total of other payments such as refunded fuel etc. +
+
+
+ + +
+
+
@@ -133,9 +145,21 @@ This is a help text +
+
+
+ + +
+
+
@@ -177,9 +201,21 @@ This is a help text +
+
+
+ + +
+
+
@@ -254,9 +290,21 @@ A total of other payments such as refunded fuel etc. +
+
+
+ + +
+
+
diff --git a/src/app/dashboard/add-data.component.ts b/src/app/dashboard/add-data.component.ts index 5abd822..b4fba15 100644 --- a/src/app/dashboard/add-data.component.ts +++ b/src/app/dashboard/add-data.component.ts @@ -13,6 +13,10 @@ export class AddDataComponent { suppliersForm: FormGroup; singleSupplierForm: FormGroup; employeeForm: FormGroup; + payrollFormStatus: any; + suppliersFormStatus: any; + singleSupplierFormStatus: any; + employeeFormStatus: any; constructor( private http: Http, @@ -61,9 +65,13 @@ export class AddDataComponent { .subscribe( result => { console.log('data submitted!'); + this.payrollFormStatus = "success"; + console.log(this.payrollFormStatus); }, error => { console.log( error._body ); + this.payrollFormStatus = "send_failed"; + console.log(this.payrollFormStatus); } ); } @@ -76,9 +84,13 @@ export class AddDataComponent { .subscribe( result => { console.log('data submitted!'); + this.suppliersFormStatus = "success"; + console.log(this.suppliersFormStatus); }, error => { console.log( error._body ); + this.suppliersFormStatus = "send_failed"; + console.log(this.suppliersFormStatus); } ); } @@ -91,9 +103,13 @@ export class AddDataComponent { .subscribe( result => { console.log('data submitted!'); + this.singleSupplierFormStatus = "success"; + console.log(this.singleSupplierFormStatus); }, error => { console.log( error._body ); + this.singleSupplierFormStatus = "send_failed"; + console.log(this.singleSupplierFormStatus); } ); } @@ -106,9 +122,13 @@ export class AddDataComponent { .subscribe( result => { console.log('data submitted!'); + this.employeeFormStatus = "success"; + console.log(this.employeeFormStatus); }, error => { console.log( error._body ); + this.employeeFormStatus = "send_failed"; + console.log(this.employeeFormStatus); } ); }