Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
application-administarator-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Рогов Артем Владимирович
application-administarator-service
Commits
d7e6e00b
Commit
d7e6e00b
authored
Nov 20, 2023
by
konstantin-smirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DMVP-1039 - fix
parent
53e6eef8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
0 deletions
+58
-0
appointments.api.js
src/_store/api/appointments.api.js
+35
-0
geocoder.api.js
src/_store/api/geocoder.api.js
+23
-0
No files found.
src/_store/api/appointments.api.js
0 → 100644
View file @
d7e6e00b
import
{
createApi
}
from
'@reduxjs/toolkit/query/react'
;
import
baseQueryWithToken
from
'./helpers/customFetchBase'
;
const
HEALTHAPP_URI
=
process
.
env
.
REACT_APP_BASE_URL
;
const
TELEHEALTH_URI
=
process
.
env
.
REACT_APP_BACKEND_URL
;
const
SETTINGS
=
'/settings/appointmentWindow'
;
export
const
appointmentsApi
=
createApi
({
reducerPath
:
'appointmentsApi'
,
baseQuery
:
baseQueryWithToken
,
entityTypes
:
[
"AppointmentSettings"
],
endpoints
:
(
builder
)
=>
({
fetchAppointmentSettings
:
builder
.
query
({
query
()
{
return
{
url
:
TELEHEALTH_URI
+
SETTINGS
,
};
},
providesTags
:
(
result
)
=>
[
"AppointmentSettings"
],
}),
patchAppointmentSettings
:
builder
.
mutation
({
query
:
(
data
)
=>
({
url
:
TELEHEALTH_URI
+
SETTINGS
,
method
:
'PATCH'
,
body
:
data
}),
invalidatesTags
:
[
"AppointmentSettings"
],
}),
}),
})
export
const
{
useFetchAppointmentSettingsQuery
,
usePatchAppointmentSettingsMutation
}
=
appointmentsApi
;
src/_store/api/geocoder.api.js
0 → 100644
View file @
d7e6e00b
import
{
createApi
}
from
'@reduxjs/toolkit/query/react'
;
import
baseQueryWithToken
from
'./helpers/customFetchBase'
;
const
HEALTHAPP_URI
=
process
.
env
.
REACT_APP_BASE_URL
;
const
API_GEOCODE
=
'/maps/api/geocode/json'
;
export
const
geocoderApi
=
createApi
({
reducerPath
:
'geocoderApi'
,
baseQuery
:
baseQueryWithToken
,
endpoints
:
(
builder
)
=>
({
geocodeByLocation
:
builder
.
query
({
query
(
latlng
)
{
return
{
url
:
HEALTHAPP_URI
+
API_GEOCODE
+
'?latlng='
+
latlng
,
};
},
}),
}),
})
export
const
{
useGeocodeByLocationQuery
,
}
=
geocoderApi
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment