[#25] Improve UI#26
Open
Janirr wants to merge 5 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Janirr
commented
Aug 17, 2025
Janirr
left a comment
Owner
Author
There was a problem hiding this comment.
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") |
Owner
Author
There was a problem hiding this comment.
pamiętaj o update'ach na frontendzie
| } | ||
|
|
||
| loadStatistics() { | ||
| this.httpService.getStudentReservations().subscribe({ |
Owner
Author
There was a problem hiding this comment.
zrób endpoint działający pod to
| </mat-card> | ||
| </div> | ||
|
|
||
| <div *ngIf="formSubmitted && (!events || events.length === 0)" class="no-results"> |
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); |
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); | ||
| } |
Owner
Author
There was a problem hiding this comment.
httpService oddzielić od logiki biznesowe
| </mat-card-header> | ||
|
|
||
| <mat-card-content> | ||
| @if (reservations.length > 0) { |
Owner
Author
There was a problem hiding this comment.
pójdzie exception jak reservations jest puste
| </table> | ||
|
|
||
| <!-- No results text --> | ||
| @if (dataSource.data.length === 0) { |
Owner
Author
There was a problem hiding this comment.
tu chyba też exception przy === 0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.