Skip to content

Task 5#4

Open
YurikMurik wants to merge 4 commits intotask-4from
task-5
Open

Task 5#4
YurikMurik wants to merge 4 commits intotask-4from
task-5

Conversation

@YurikMurik
Copy link
Copy Markdown
Owner

  • Added new service in according to requirements
  • Made some refactoring in the base code
  • Implemented loginpage + logic for it
  • Added logic for header component
  • Added modalwindow which show when you try to delete a course from the courseList

- Added new service in according to requirements
- Made some refactoring in the base code
- Implemented loginpage + logic for it
- Added logic for header component
- Added modalwindow which show when you try to delete a course from the courseList
Yuri Lysov added 2 commits May 16, 2020 22:13
- Changed services for app
Comment thread src/app/core/services/auth.service.ts Outdated
return this.isAuthentificated();
}

public isAuthentificated(): Observable<boolean> {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method should not return observable, just boolean value

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

import { IconDefinition, faUser, faArrowRight, faAddressCard } from '@fortawesome/free-solid-svg-icons';
import { AuthService } from 'src/app/core/services/auth.service';
import { UserInfo } from 'src/app/core/models/user-info.interface';
import { switchMap } from 'rxjs/operators';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please delete unused imports

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

})
export class HeaderLoginComponent {
export class HeaderLoginComponent implements OnInit {
@Input() public isAuthentificated: boolean;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не совсем понимаю, зачем тебе инпут, если у тебя все равно заимпортан сервис. Может лучше сделать запрос на isAuthentificated через сервис в ngOnInit()?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пофикшено


export class HeaderComponent implements OnInit {
@Input() public currentRouteUrl: string;
public authentification: boolean = false;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

неинформативное название проперти

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

заменил на isAuthentificated

});
}

public ngDoCheck(): void {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это тут зачем?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пофикшено. теперь красиво

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants