Skip to content

Commit

Permalink
Merge pull request #268 from severinbeauvais/PRC-720
Browse files Browse the repository at this point in the history
PRC-720: assign CL File number for display on create
  • Loading branch information
marklise authored Oct 4, 2018
2 parents fad0d26 + a684525 commit 9b7366b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/app/applications/application-resolver.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ export class ApplicationDetailResolver implements Resolve<Application> {
tenureStage: route.queryParamMap.get('tenureStage'),
location: route.queryParamMap.get('location'),
businessUnit: route.queryParamMap.get('businessUnit'),
cl_file: route.queryParamMap.get('cl_file'),
tantalisID: route.queryParamMap.get('tantalisID'),
cl_file: +route.queryParamMap.get('cl_file'), // NB: unary operator
tantalisID: +route.queryParamMap.get('tantalisID'), // NB: unary operator
});

// 7-digit CL File number for display
if (app.cl_file) {
app['clFile'] = app.cl_file.toString().padStart(7, '0');
}

return Observable.of(app);
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class SearchComponent implements OnInit, OnDestroy {
location: item.properties.TENURE_LOCATION,
businessUnit: item.properties.RESPONSIBLE_BUSINESS_UNIT,
// these are special - we will persist them to db as search keys
cl_file: +item.properties.CROWN_LANDS_FILE, // NOTE: unary operator
cl_file: item.properties.CROWN_LANDS_FILE,
tantalisID: item.properties.DISPOSITION_TRANSACTION_SID,
};
// go to add-edit page
Expand Down

0 comments on commit 9b7366b

Please sign in to comment.