-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add educational institution status#363/zubkov #635
Conversation
…Frontend into addEducationalInstitutionStatus#363/Zubkov
@@ -43,6 +44,7 @@ export class Provider { | |||
this.actualAddress = actualAddress; | |||
this.description = photo.description; | |||
this.userId = user.id; | |||
this.institutionStatusId = photo.institutionStatusId? photo.institutionStatusId : null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.institutionStatusId = photo.institutionStatusId || null;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it is not photo anymore, lets rename photo parameter
* This method get all institution statuses | ||
*/ | ||
getInstitutionStatus(): Observable<InstitutionStatus[]> { | ||
return this.http.get<InstitutionStatus[]>('/api/v1/InstitutionStatus/Get'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentations
@@ -36,4 +61,7 @@ export class ProviderOrgInfoComponent implements OnInit { | |||
this.editLink = createProviderSteps[tabChangeEvent.index]; | |||
} | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
@@ -26,7 +26,7 @@ export class CreateProviderGuard implements CanDeactivate<unknown>, CanLoad { | |||
segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree { | |||
const isEditMode = this.store.selectSnapshot<boolean>(AppState.isEditMode); | |||
|
|||
return isEditMode ? true : this.user$.pipe(map((user: User) => user.role === Role.provider && user.isRegistered === false)); | |||
return isEditMode ? true : this.user$.pipe(map((user: User) => user?.role === Role.provider && user.isRegistered === false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in which cases user can be undefined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for catching that, I think it was for testing purposes, deleted '?'
No description provided.