Skip to content

Commit

Permalink
fixing additional missing SAname case (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronpettit authored Mar 6, 2024
1 parent 1b5f653 commit 603fc25
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/app/enter-data/enter-data.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,25 @@ export class EnterDataComponent implements OnInit, OnDestroy {
event.url.split('?')[0] !== '/enter-data' ? true : false;
})
);
this.subscriptions.add(
this.dataService.watchItem(Constants.dataIds.ENTER_DATA_URL_PARAMS)
.subscribe((res) => {
if (res) {
this.urlParams = res;
}
})
);
}

ngOnInit(): void {
this.urlParams = this.urlService.getQueryParams();
this.dataService.setItemValue(Constants.dataIds.ENTER_DATA_URL_PARAMS, this.urlService.getQueryParams());
}

formatDate(date): string {
return DateTime.fromFormat(date, 'yyyyLL').toFormat('LLLL yyyy');
if (date) {
return DateTime.fromFormat(date, 'yyyyLL').toFormat('LLLL yyyy');
}
return '-';
}

ngOnDestroy() {
Expand Down
1 change: 1 addition & 0 deletions src/app/forms/cancel-button/cancel-button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class CancelButtonComponent implements OnDestroy {
if (res) {
this.navParams['date'] = res.date;
this.navParams['parkName'] = res.parkName;
this.navParams['subAreaName'] = res.subAreaName;
this.navParams['subAreaId'] = res.subAreaId;
this.navParams['orcs'] = res.orcs;
}
Expand Down

0 comments on commit 603fc25

Please sign in to comment.