-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 86extdm6t #89
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
Merged
Merged
feat: 86extdm6t #89
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,12 @@ | ||
| import { formatIsoDate } from '@/utils/datesUtils' | ||
|
|
||
| export const DOT = '•' | ||
| export const METRIC_MAX_VALUE = '10' | ||
| export const SLIDER_MIN_VALUE = 1 | ||
| export const SLIDER_MAX_VALUE = 10 | ||
| export const BALANCE_VIDEO_TIME = 15 | ||
| export const STRETCH_VIDEO_TIME = 10 | ||
| export const MOCK_DATA = { | ||
| patientID: Number('1622017'), | ||
| date: formatIsoDate(new Date(2026, 5, 23)), | ||
| } |
39 changes: 39 additions & 0 deletions
39
src/pages/home/AppointmentBottomSheet/AppointmentBottomSheet.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import { useQuery } from '@tanstack/react-query' | ||
| import { BottomSheetDialog } from '@/components/BottomSheetDialog/BottomSheetDialog' | ||
| import { apiService } from '@/services/api/api.service' | ||
| import { useState } from 'react' | ||
| import type { Appointment } from '@/components/BottomSheetDialog/types' | ||
| import { API_ENDPOINTS } from '@/constants/api.constants' | ||
| import { MOCK_DATA } from '@/constants' | ||
|
|
||
| export const AppointmentBottomSheet = () => { | ||
| const [selectedAppointment, setSelectedAppointment] = useState<boolean>(true) | ||
|
|
||
| const patientid = MOCK_DATA.patientID | ||
| const date = MOCK_DATA.date | ||
|
|
||
| const { data: appointment } = useQuery({ | ||
| queryKey: ['nextAppointment', patientid, date], | ||
| queryFn: async () => { | ||
| const response = await apiService.get<Appointment>(API_ENDPOINTS.appointment, { | ||
| params: { | ||
| patientid, | ||
| date, | ||
| }, | ||
| }) | ||
| return response | ||
| }, | ||
| }) | ||
|
|
||
| const handleCloseBottomSheet = () => { | ||
| setSelectedAppointment(false) | ||
| } | ||
|
|
||
| return ( | ||
| <BottomSheetDialog | ||
| appointment={appointment} | ||
| isOpen={selectedAppointment && !!appointment} | ||
| onClose={handleCloseBottomSheet} | ||
| /> | ||
| ) | ||
| } | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: ColmanDevClubORG/Sagol360Management
Length of output: 2726
🏁 Script executed:
Repository: ColmanDevClubORG/Sagol360Management
Length of output: 1466
🏁 Script executed:
Repository: ColmanDevClubORG/Sagol360Management
Length of output: 3033
🏁 Script executed:
Repository: ColmanDevClubORG/Sagol360Management
Length of output: 1286
🏁 Script executed:
Repository: ColmanDevClubORG/Sagol360Management
Length of output: 61
🏁 Script executed:
Repository: ColmanDevClubORG/Sagol360Management
Length of output: 300
🏁 Script executed:
Repository: ColmanDevClubORG/Sagol360Management
Length of output: 495
🏁 Script executed:
Repository: ColmanDevClubORG/Sagol360Management
Length of output: 3873
Parameter names and date format do not match the API contract—this query will fail silently.
The code sends
patientID(line 19) and a non-ISO date'07-06-2026'(line 12), but theAppointmentresponse type expectspatientId(lowercase, typed asnumber) anddateasIsoDateString(YYYY-MM-DD format, validated againstIsoDateStringSchema). This mismatch will cause the endpoint to reject or ignore parameters, returning empty/incorrect data. UsepatientIdand convert the date to ISO format usingformatIsoDate()fromdatesUtils.🤖 Prompt for AI Agents
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.
@rachelishteren what do you think about that comment?
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.
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 will take this offer.