Added Org submission API and transaction fixes
This commit is contained in:
parent
65cbea5d5d
commit
1982ce6790
3 changed files with 31 additions and 5 deletions
|
@ -69,7 +69,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button type="submit" (click)="postTransaction()" [disabled]="TransactionFormInvalid" class="btn btn-sm btn-primary"><i class="fa fa-dot-circle-o"></i> Submit</button>
|
||||
<button type="submit" (click)="postTransaction()" [disabled]="transactionFormInvalid" class="btn btn-sm btn-primary"><i class="fa fa-dot-circle-o"></i> Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="accountType == 'organisation'" class="card">
|
||||
|
|
|
@ -158,7 +158,7 @@ export class AddDataComponent {
|
|||
}
|
||||
|
||||
transactionFormValidate() {
|
||||
if( this.submitOrg.name.length == 0 ||
|
||||
if( this.submitOrg.name.length == 0 &&
|
||||
this.amount == 0 ) {
|
||||
this.transactionFormInvalid = true;
|
||||
}else{
|
||||
|
@ -252,7 +252,7 @@ export class AddDataComponent {
|
|||
console.log(this.payrollForm.value);
|
||||
|
||||
this.api
|
||||
.login(this.payrollForm.value)
|
||||
.orgPayroll(this.payrollForm.value)
|
||||
.subscribe(
|
||||
result => {
|
||||
console.log('data submitted!');
|
||||
|
@ -271,7 +271,7 @@ export class AddDataComponent {
|
|||
console.log(this.singleSupplierForm.value);
|
||||
|
||||
this.api
|
||||
.login(this.singleSupplierForm.value)
|
||||
.orgSupplier(this.singleSupplierForm.value)
|
||||
.subscribe(
|
||||
result => {
|
||||
console.log('data submitted!');
|
||||
|
@ -290,7 +290,7 @@ export class AddDataComponent {
|
|||
console.log(this.employeeForm.value);
|
||||
|
||||
this.api
|
||||
.login(this.employeeForm.value)
|
||||
.orgEmployee(this.employeeForm.value)
|
||||
.subscribe(
|
||||
result => {
|
||||
console.log('data submitted!');
|
||||
|
|
Reference in a new issue