Skip to content

[#25] Improve UI#26

Open
Janirr wants to merge 5 commits into
mainfrom
feature/#25
Open

[#25] Improve UI#26
Janirr wants to merge 5 commits into
mainfrom
feature/#25

Conversation

@Janirr

@Janirr Janirr commented Aug 17, 2025

Copy link
Copy Markdown
Owner

No description provided.

@vercel

vercel Bot commented Aug 17, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
time-finder-rlwx Error Error Aug 19, 2025 6:54pm

@Janirr Janirr left a comment

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.

Posprawdzaj wszystkie endpointy czy się zgadzają:
backend -> frontend. Sporo się pozmieniało.

Dodatkowo wydzielić HttpService z czymś innym, aby logika biznesowa była tam i wykorzystywane metody tylko z httpService.get, .post itd..


@GetMapping("/{id}/calendar/{calendarId}")
public ResponseEntity<List<Event>> getTutorCalendar(@PathVariable Long id, @PathVariable String calendarId)
@GetMapping("/{id}/calendar/events")

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.

pamiętaj o update'ach na frontendzie

}

loadStatistics() {
this.httpService.getStudentReservations().subscribe({

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.

zrób endpoint działający pod to

</mat-card>
</div>

<div *ngIf="formSubmitted && (!events || events.length === 0)" class="no-results">

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.

@if

Comment on lines -22 to +23
get(url: string) {
return this.http.get(this.urlTemplate + url, this.httpOptions);
get<T>(url: string) {
return this.http.get<T>(this.urlTemplate + url, this.httpOptions);

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.

nie wiem :/

Comment on lines +46 to +60
getTutorReservations() {
return this.get<any[]>('/reservations');
}

getStudentReservations() {
return this.get<any[]>('/reservations/student');
}

cancelReservation(id: string) {
return this.delete(`/reservations/${id}`);
}

updateReservation(id: string, data: any) {
return this.patch(`/reservations/${id}`, data);
}

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.

httpService oddzielić od logiki biznesowe

</mat-card-header>

<mat-card-content>
@if (reservations.length > 0) {

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.

pójdzie exception jak reservations jest puste

</table>

<!-- No results text -->
@if (dataSource.data.length === 0) {

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.

tu chyba też exception przy === 0

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.

1 participant