Skip to content

Commit

Permalink
ET-454-show-next-available-slots (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
sharlotta93 authored Nov 21, 2024
1 parent d31d5a9 commit 7a826ab
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 34 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@awell-health/sol-scheduling",
"version": "0.3.22",
"version": "0.3.23",
"packageManager": "[email protected]",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/atoms/AvailabilitySlots/AvailabilitySlots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const AvailabilitySlots: FC<AvailabilitySlotsProps> = ({
}) => {
const slotsToMap = slots.slice(0, 3);
return (
<div>
<div className='sm:min-w-[400px] mt-4'>
<div className='mb-2 text-sm font-medium text-slate-600'>
Next availability:
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/atoms/ProviderSelection/ProviderCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ const ProviderHeader: FC<{ provider: Provider }> = ({ provider }) => {
const providerName = `${provider.firstName} ${provider.lastName}`;
const location = provider.location?.state ?? '';
return (
<div className='flex flex-col sm:flex-row items-start sm:items-center gap-1 sm:justify-between'>
<div className='flex flex-col sm:flex-row items-start sm:items-center sm:justify-between'>
<div className='self-center sm:self-auto'>
<ProviderAvatar
name={providerName}
image={provider.image}
classes='w-32 h-32'
/>
</div>
<div>
<div className='flex flex-col sm:flex-row sm:items-center justify-between mb-3'>
<div className='w-full sm:w-auto sm:gap-y-6'>
<div className='flex flex-col sm:flex-row items-center sm:justify-between justify-center mb-3'>
<div>
<h3 className='text-slate-800 text-lg m-0 font-semibold text-center sm:text-left'>
{providerName}
Expand Down Expand Up @@ -185,7 +185,7 @@ const Slot: FC<{ count: number }> = ({ count }) => {
return (
<div
className={clsx(
'rounded-full max-w-[130px] text-sm text-white text-center font-medium flex items-center justify-center px-3 py-1',
'rounded-full text-sm text-white text-center font-medium flex items-center justify-center px-3 py-1',
{
'bg-slate-300': count === 0,
'bg-yellow-500': count > 0 && count <= 2,
Expand Down
182 changes: 154 additions & 28 deletions src/lib/api/__mocks__/GetProviders.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const getMockProvidersResponse = () => {
language: '',
location: {
facility: '',
state: 'CO'
state: ''
},
firstName: 'Lauren',
lastName: 'Jouzapaitis',
Expand Down Expand Up @@ -40,25 +40,25 @@ export const getMockProvidersResponse = () => {
duration: 60,
facility: 'CO - Cherry Creek',
location: 'Telehealth'
},
{
eventId: 'a2qa6ececpacb952eqbb6sbeq0',
date: '2024-09-17',
providerId: '1637',
slotstart: '2024-09-17T14:00:00Z',
duration: 60,
facility: 'CO - Cherry Creek',
location: 'In-Person'
},
{
eventId: 'pl17mj3vh6d6t1sj7e4qsbvavg',
date: '2024-09-17',
providerId: '1637',
slotstart: '2024-09-17T15:00:00Z',
duration: 60,
facility: 'CO - Cherry Creek',
location: 'In-Person'
}
// {
// eventId: 'a2qa6ececpacb952eqbb6sbeq0',
// date: '2024-09-17',
// providerId: '1637',
// slotstart: '2024-09-17T14:00:00Z',
// duration: 60,
// facility: 'CO - Cherry Creek',
// location: 'In-Person'
// },
// {
// eventId: 'pl17mj3vh6d6t1sj7e4qsbvavg',
// date: '2024-09-17',
// providerId: '1637',
// slotstart: '2024-09-17T15:00:00Z',
// duration: 60,
// facility: 'CO - Cherry Creek',
// location: 'In-Person'
// }
]
},
{
Expand Down Expand Up @@ -103,16 +103,16 @@ export const getMockProvidersResponse = () => {
duration: 60,
facility: 'CO - Greenwood Village',
location: 'In-Person'
},
{
eventId: '26fsgfn18olbt06rvo20jdjfg0',
date: '2024-09-18',
providerId: '1642',
slotstart: '2024-09-18T17:00:00Z',
duration: 60,
facility: 'CO - Greenwood Village',
location: 'In-Person'
}
// {
// eventId: '26fsgfn18olbt06rvo20jdjfg0',
// date: '2024-09-18',
// providerId: '1642',
// slotstart: '2024-09-18T17:00:00Z',
// duration: 60,
// facility: 'CO - Greenwood Village',
// location: 'In-Person'
// }
]
},
{
Expand Down Expand Up @@ -158,6 +158,132 @@ export const getMockProvidersResponse = () => {
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'k502dms131icctm7sg2mnutl1o',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T14:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'si8rekpo26dqlro4t37qh6m664',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T13:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'k502dms131icctm7sg2mnutl1o',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T14:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'si8rekpo26dqlro4t37qh6m664',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T13:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'k502dms131icctm7sg2mnutl1o',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T14:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'si8rekpo26dqlro4t37qh6m664',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T13:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'k502dms131icctm7sg2mnutl1o',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T14:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'si8rekpo26dqlro4t37qh6m664',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T13:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'k502dms131icctm7sg2mnutl1o',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T14:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'si8rekpo26dqlro4t37qh6m664',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T13:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'k502dms131icctm7sg2mnutl1o',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T14:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'si8rekpo26dqlro4t37qh6m664',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T13:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'k502dms131icctm7sg2mnutl1o',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T14:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'si8rekpo26dqlro4t37qh6m664',
date: '2024-09-17',
providerId: '1733',
slotstart: '2024-09-17T13:00:00Z',
duration: 60,
facility: 'NY - Union Square',
location: 'In-Person'
},
{
eventId: 'k502dms131icctm7sg2mnutl1o',
date: '2024-09-17',
Expand Down

0 comments on commit 7a826ab

Please sign in to comment.