GL view transaction enhanced (#1645)

Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
José Alberto Hernández
2023-01-17 15:02:32 -06:00
committed by GitHub
co-authored by Jose Alberto Hernandez
parent d714eee1a7
commit b6c5f0e41e
11 changed files with 51 additions and 24 deletions
@@ -21,7 +21,7 @@ export class CreateTaxComponentComponent implements OnInit {
/** Minimum start date allowed. */
minDate = new Date();
/** Maximum start date allowed. */
maxDate = new Date(new Date().setFullYear(new Date().getFullYear() + 10));
maxDate = new Date();
/** Tax Component form. */
taxComponentForm: FormGroup;
/** Tax Component template data. */
@@ -59,6 +59,8 @@ export class CreateTaxComponentComponent implements OnInit {
* Creates the tax Component form
*/
ngOnInit() {
this.minDate = this.settingsService.minAllowedDate;
this.maxDate = this.settingsService.maxAllowedDate;
this.createTaxComponentForm();
this.setConditionalControls();
}
@@ -22,21 +22,21 @@
<mat-error *ngIf="taxComponentForm.controls.name.hasError('required')">
Percentage is <strong>required</strong>
</mat-error>
</mat-form-field>
</mat-form-field>
<mat-form-field *ngIf="taxComponentData.creditAccountType.value">
<mat-label>Credit Account Type</mat-label>
<input matInput formControlName="creditAccountType">
</mat-form-field>
</mat-form-field>
<mat-form-field *ngIf="taxComponentData.creditAccount.name">
<mat-label>Credit Account</mat-label>
<input matInput formControlName="creditAccount">
</mat-form-field>
</mat-form-field>
<mat-form-field (click)="startDatePicker.open()">
<mat-label>Start Date</mat-label>
<input matInput [min]="minDate" [matDatepicker]="startDatePicker" required formControlName="startDate">
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="startDatePicker" required formControlName="startDate">
<mat-datepicker-toggle matSuffix [for]="startDatePicker"></mat-datepicker-toggle>
<mat-datepicker #startDatePicker></mat-datepicker>
<mat-error *ngIf="taxComponentForm.controls.startDate.hasError('required')">
@@ -20,6 +20,8 @@ export class EditTaxComponentComponent implements OnInit {
/** Minimum date allowed. */
minDate = new Date(2000, 0, 1);
/** Maximum start date allowed. */
maxDate = new Date();
/** Tax Component form. */
taxComponentForm: FormGroup;
/** Tax Component data. */
@@ -49,6 +51,8 @@ export class EditTaxComponentComponent implements OnInit {
* Creates the edit tax component form.
*/
ngOnInit() {
this.minDate = this.settingsService.minAllowedDate;
this.maxDate = this.settingsService.maxAllowedDate;
this.editTaxComponent();
}
@@ -26,7 +26,7 @@
</div>
<div fxFlex="50%">
{{ taxComponentData.percentage }}
{{ taxComponentData.percentage | number }} %
</div>
<div fxFlex="50%" class="mat-body-strong" *ngIf="taxComponentData.debitAccountType">
@@ -73,6 +73,9 @@
</mat-card-content>
<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="2%" fxLayout.lt-md="column">
<button type="button" color="primary" mat-raised-button [routerLink]="['../']">Back</button>
</div>
</mat-card>
</div>