diff --git a/app/api/dtos/OrganizationDtoSchema.ts b/app/api/dtos/OrganizationDtoSchema.ts index b79f1f6..9686197 100644 --- a/app/api/dtos/OrganizationDtoSchema.ts +++ b/app/api/dtos/OrganizationDtoSchema.ts @@ -3,6 +3,6 @@ import { z } from 'zod'; export const OrganizationDtoSchema = z.object({ id: z.number(), name: z.string(), - organizationType: OrganizationTypeDtoSchema, + type: OrganizationTypeDtoSchema, }); export type OrganizationDto = z.infer; \ No newline at end of file diff --git a/app/api/dtos/ProviderRoleAvailabilityDtoSchema.ts b/app/api/dtos/ProviderRoleAvailabilityDtoSchema.ts new file mode 100644 index 0000000..1e674bb --- /dev/null +++ b/app/api/dtos/ProviderRoleAvailabilityDtoSchema.ts @@ -0,0 +1,9 @@ +import { CycleSubspanDtoSchema } from './CycleSubspanDtoSchema'; +import { z } from 'zod'; +export const ProviderRoleAvailabilityDtoSchema = z.object({ + id: z.number(), + providerRoleId: z.number(), + cycleSubspanDto: CycleSubspanDtoSchema, + availabilityCode: z.number(), +}); +export type ProviderRoleAvailabilityDto = z.infer; \ No newline at end of file diff --git a/app/api/dtos/ProviderRoleTypeWorkTaskTypeSuitabilityDtoSchema.ts b/app/api/dtos/ProviderRoleTypeWorkTaskTypeSuitabilityDtoSchema.ts index 275f205..3125d3e 100644 --- a/app/api/dtos/ProviderRoleTypeWorkTaskTypeSuitabilityDtoSchema.ts +++ b/app/api/dtos/ProviderRoleTypeWorkTaskTypeSuitabilityDtoSchema.ts @@ -3,7 +3,9 @@ export const ProviderRoleTypeWorkTaskTypeSuitabilityDtoSchema = z.object({ id: z.number(), rating: z.number(), partyId: z.number(), - workTaskType: z.string(), + providerRoleTypeId: z.number(), + providerRoleTypeName: z.string(), workTaskTypeId: z.number(), + workTaskTypeName: z.string(), }); export type ProviderRoleTypeWorkTaskTypeSuitabilityDto = z.infer; \ No newline at end of file diff --git a/app/contexts/selective-context/selective-context-creators.ts b/app/contexts/selective-context/selective-context-creators.ts index 8155b75..95a0bdf 100644 --- a/app/contexts/selective-context/selective-context-creators.ts +++ b/app/contexts/selective-context/selective-context-creators.ts @@ -5,5 +5,5 @@ import { ProviderRoleTypeWorkTaskTypeSuitabilityDto } from '../../api/dtos/Provi export const AssetSuitabilityListSelectiveContext = createSelectiveContext(); -export const WorkTaskCompetencyListSelectiveContext = +export const ProviderRoleTypeWorkTaskTypeSuitabilityListSelectiveContext = createSelectiveContext(); diff --git a/app/contexts/selective-context/work-task-competency-list-selective-context-provider.tsx b/app/contexts/selective-context/work-task-competency-list-selective-context-provider.tsx index b3edf24..6c08c2e 100644 --- a/app/contexts/selective-context/work-task-competency-list-selective-context-provider.tsx +++ b/app/contexts/selective-context/work-task-competency-list-selective-context-provider.tsx @@ -1,7 +1,7 @@ 'use client'; import { PropsWithChildren } from 'react'; import GenericSelectiveContextManager from '../../selective-context/components/base/generic-selective-context-manager'; -import { WorkTaskCompetencyListSelectiveContext } from './selective-context-creators'; +import { ProviderRoleTypeWorkTaskTypeSuitabilityListSelectiveContext } from './selective-context-creators'; import { getSelectiveContextControllerHook } from '../../selective-context/hooks/curriedHooks/get-selective-context-controller-hook'; import getSelectiveContextListenerHook from '../../selective-context/hooks/curriedHooks/get-selective-context-listener-hook'; import getSelectiveContextDispatchHook from '../../selective-context/hooks/curriedHooks/get-selective-context-dispatch-hook'; @@ -10,15 +10,23 @@ export default function WorkTaskCompetencyListSelectiveContextProvider({ children }: PropsWithChildren) { return ( - + {children} ); } export const useWorkTaskCompetencyListController = - getSelectiveContextControllerHook(WorkTaskCompetencyListSelectiveContext); + getSelectiveContextControllerHook( + ProviderRoleTypeWorkTaskTypeSuitabilityListSelectiveContext + ); export const useWorkTaskCompetencyListDispatch = - getSelectiveContextDispatchHook(WorkTaskCompetencyListSelectiveContext); + getSelectiveContextDispatchHook( + ProviderRoleTypeWorkTaskTypeSuitabilityListSelectiveContext + ); export const useWorkTaskCompetencyListListener = - getSelectiveContextListenerHook(WorkTaskCompetencyListSelectiveContext); + getSelectiveContextListenerHook( + ProviderRoleTypeWorkTaskTypeSuitabilityListSelectiveContext + ); diff --git a/app/generic/components/tables/big-table-card.tsx b/app/generic/components/tables/big-table-card.tsx index 7e2eb34..1808c42 100644 --- a/app/generic/components/tables/big-table-card.tsx +++ b/app/generic/components/tables/big-table-card.tsx @@ -7,7 +7,10 @@ export default function BigTableCard({ children?: React.ReactNode; }) { return ( - +
{children}
diff --git a/app/staffroom/contexts/providerRoles/provider-role-skill-edit-context-provider.tsx b/app/staffroom/contexts/providerRoles/provider-role-skill-edit-context-provider.tsx index 0a223f6..2f00bb6 100644 --- a/app/staffroom/contexts/providerRoles/provider-role-skill-edit-context-provider.tsx +++ b/app/staffroom/contexts/providerRoles/provider-role-skill-edit-context-provider.tsx @@ -14,7 +14,7 @@ import { IdStringFromNumberAccessor } from '../../../premises/classroom-suitabil import { getCurriedProducer } from './get-curried-producer'; import { UnsavedProviderRoleChanges } from './provider-role-string-map-context-creator'; import { useSelectiveContextListenerReadAll } from '../../../selective-context/components/base/generic-selective-context-creator'; -import { WorkTaskCompetencyListSelectiveContext } from '../../../contexts/selective-context/selective-context-creators'; +import { ProviderRoleTypeWorkTaskTypeSuitabilityListSelectiveContext } from '../../../contexts/selective-context/selective-context-creators'; import { ProviderRoleTypeWorkTaskTypeSuitabilityDto } from '../../../api/dtos/ProviderRoleTypeWorkTaskTypeSuitabilityDtoSchema'; const skillProducer = getCurriedProducer< @@ -28,7 +28,7 @@ export default function ProviderRoleSkillEditContextProvider({ children: ReactNode; }) { const selectiveContextReadAll = useSelectiveContextListenerReadAll( - WorkTaskCompetencyListSelectiveContext + ProviderRoleTypeWorkTaskTypeSuitabilityListSelectiveContext ); const confirmRatingValue = useConfirmRatingValueFunction( diff --git a/app/staffroom/contexts/providerRoles/provider-role-string-map-context-provider.tsx b/app/staffroom/contexts/providerRoles/provider-role-string-map-context-provider.tsx index 6e04fb2..dfeed14 100644 --- a/app/staffroom/contexts/providerRoles/provider-role-string-map-context-provider.tsx +++ b/app/staffroom/contexts/providerRoles/provider-role-string-map-context-provider.tsx @@ -4,7 +4,7 @@ import { ProviderRoleDto } from '../../../api/dtos/ProviderRoleDtoSchema'; import { WriteableStringMapContextProvider } from '../../../contexts/string-map-context/writeable-string-map-context-provider'; import { StringMap } from '../../../contexts/string-map-context/string-map-reducer'; import { PropsWithChildren, useCallback } from 'react'; -import { WorkTaskCompetencyListSelectiveContext } from '../../../contexts/selective-context/selective-context-creators'; +import { ProviderRoleTypeWorkTaskTypeSuitabilityListSelectiveContext } from '../../../contexts/selective-context/selective-context-creators'; import { patchWorkTaskSuitabilities, updateTeachers @@ -24,7 +24,7 @@ export default function ProviderRoleStringMapContextProvider({ children }: { providerRoleStringMap: StringMap } & PropsWithChildren) { const selectiveContextReadAll = useSelectiveContextListenerReadAll( - WorkTaskCompetencyListSelectiveContext + ProviderRoleTypeWorkTaskTypeSuitabilityListSelectiveContext ); const commitServerAction = useCallback(