add goods or services
parent
d2a88e1cd0
commit
e57da0ddd5
|
|
@ -62,7 +62,8 @@ export class AddTransactionPageComponent implements OnInit {
|
||||||
contributor: contrib ? contrib : undefined,
|
contributor: contrib ? contrib : undefined,
|
||||||
typeId: lastTransaction ? lastTransaction.typeId : TransactionType.Cash,
|
typeId: lastTransaction ? lastTransaction.typeId : TransactionType.Cash,
|
||||||
fundId: lastTransaction ? (lastTransaction.fundId === Fund.General ? Fund.Missions : Fund.General) : Fund.General,
|
fundId: lastTransaction ? (lastTransaction.fundId === Fund.General ? Fund.Missions : Fund.General) : Fund.General,
|
||||||
checkNumber: lastTransaction ? lastTransaction.checkNumber : ''
|
checkNumber: lastTransaction ? lastTransaction.checkNumber : '',
|
||||||
|
goodsOrServices: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<div md-dialog-title>
|
<div md-dialog-title>
|
||||||
<p>Add Event</p>
|
<p>Add Transaction</p>
|
||||||
</div>
|
</div>
|
||||||
<div md-dialog-content>
|
<div md-dialog-content>
|
||||||
<form [formGroup]="form" (ngSubmit)="onSubmit()">
|
<form [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||||
|
|
@ -41,6 +41,10 @@
|
||||||
<input matInput placeholder="Description" type="text" formControlName="description" >
|
<input matInput placeholder="Description" type="text" formControlName="description" >
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<br>
|
<br>
|
||||||
|
<mat-form-field class="w-100">
|
||||||
|
<mat-checkbox formControlName="goodsOrServices">Goods or Services Received</mat-checkbox>
|
||||||
|
</mat-form-field>
|
||||||
|
<br>
|
||||||
<button mat-raised-button class="m-5" type="button" (click)="cancel()" >Cancel</button>
|
<button mat-raised-button class="m-5" type="button" (click)="cancel()" >Cancel</button>
|
||||||
<button mat-raised-button class="m-5" type="submit" [disabled]="!form.valid || saveBtnDisabled">{{ saveBtnTxt }}</button>
|
<button mat-raised-button class="m-5" type="submit" [disabled]="!form.valid || saveBtnDisabled">{{ saveBtnTxt }}</button>
|
||||||
<button mat-raised-button class="m-5" type="button" (click)="onSubmit(true)" [disabled]="!form.valid || saveBtnDisabled">{{ saveAndAddBtnTxt }}</button>
|
<button mat-raised-button class="m-5" type="button" (click)="onSubmit(true)" [disabled]="!form.valid || saveBtnDisabled">{{ saveAndAddBtnTxt }}</button>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ export interface DialogData {
|
||||||
fundId: number,
|
fundId: number,
|
||||||
checkNumber: string,
|
checkNumber: string,
|
||||||
description: string,
|
description: string,
|
||||||
taxYear: number
|
taxYear: number,
|
||||||
|
goodsOrServices: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -56,7 +57,8 @@ export class AddTransactionPopupComponent implements OnInit {
|
||||||
checkNumber: [this.data.checkNumber],
|
checkNumber: [this.data.checkNumber],
|
||||||
description: [this.data.description],
|
description: [this.data.description],
|
||||||
amount: ['', [Validators.required]],
|
amount: ['', [Validators.required]],
|
||||||
taxYear: [this.data.taxYear || new Date().getFullYear(), [Validators.required]]
|
taxYear: [this.data.taxYear || new Date().getFullYear(), [Validators.required]],
|
||||||
|
goodsOrServices: [this.data.goodsOrServices || false]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,5 @@ export class Transaction {
|
||||||
fundId: number;
|
fundId: number;
|
||||||
taxYear: number;
|
taxYear: number;
|
||||||
typeId: number;
|
typeId: number;
|
||||||
|
goodsOrServices: boolean;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue