add goods or services
parent
d2a88e1cd0
commit
e57da0ddd5
|
|
@ -62,7 +62,8 @@ export class AddTransactionPageComponent implements OnInit {
|
|||
contributor: contrib ? contrib : undefined,
|
||||
typeId: lastTransaction ? lastTransaction.typeId : TransactionType.Cash,
|
||||
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>
|
||||
<p>Add Event</p>
|
||||
<p>Add Transaction</p>
|
||||
</div>
|
||||
<div md-dialog-content>
|
||||
<form [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||
|
|
@ -41,6 +41,10 @@
|
|||
<input matInput placeholder="Description" type="text" formControlName="description" >
|
||||
</mat-form-field>
|
||||
<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="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>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ export interface DialogData {
|
|||
fundId: number,
|
||||
checkNumber: string,
|
||||
description: string,
|
||||
taxYear: number
|
||||
taxYear: number,
|
||||
goodsOrServices: boolean
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -56,7 +57,8 @@ export class AddTransactionPopupComponent implements OnInit {
|
|||
checkNumber: [this.data.checkNumber],
|
||||
description: [this.data.description],
|
||||
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;
|
||||
taxYear: number;
|
||||
typeId: number;
|
||||
goodsOrServices: boolean;
|
||||
}
|
||||
Loading…
Reference in New Issue