Fix in some view that were having missing data

This commit is contained in:
Jose Alberto Hernandez
2022-08-27 18:22:52 -05:00
parent e17a022c5f
commit e946726645
24 changed files with 185 additions and 170 deletions
@@ -68,7 +68,6 @@ export class AcceptClientTransferComponent implements OnInit {
*/
submit() {
const acceptClientTransferFormData = this.acceptClientTransferForm.value;
const locale = this.settingsService.language.code;
const dateFormat = this.settingsService.dateFormat;
const prevTransferDate: Date = this.acceptClientTransferForm.value.transferDate;
if (acceptClientTransferFormData.transferDate instanceof Date) {
@@ -76,8 +75,6 @@ export class AcceptClientTransferComponent implements OnInit {
}
const data = {
...acceptClientTransferFormData,
dateFormat,
locale
};
this.clientsService.executeClientCommand(this.clientId, 'acceptTransfer', data).subscribe(() => {
this.router.navigate(['../../'], { relativeTo: this.route });
@@ -20,7 +20,7 @@
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<button type="button" mat-raised-button [routerLink]="['../../']">Cancel</button>
<button mat-raised-button color="accent" [disabled]="!reactivateClientForm.valid">Confirm</button>
<button mat-raised-button color="primary" [disabled]="!reactivateClientForm.valid">Confirm</button>
</mat-card-actions>
</form>
@@ -70,7 +70,7 @@ export class ReactivateClientComponent implements OnInit {
const locale = this.settingsService.language.code;
const dateFormat = this.settingsService.dateFormat;
const prevReactivationDate: Date = this.reactivateClientForm.value.reactivationDate;
if (reactivateClientFormData.closureDate instanceof Date) {
if (reactivateClientFormData.reactivationDate instanceof Date) {
reactivateClientFormData.reactivationDate = this.dateUtils.formatDate(prevReactivationDate, dateFormat);
}
const data = {