Skip to content

Commit

Permalink
All the generic framework for API V2 seems to be working. The graph A…
Browse files Browse the repository at this point in the history
…PI needs more detail in filtering particular cliques.
  • Loading branch information
buchananwill committed Apr 5, 2024
1 parent 8825b16 commit af1b557
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/api/actions/availability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const teachersEndpoint = `${API_BASE_URL}/providers/teachers`;
export async function getAvailabilities(
providerRoleId: number
): ActionResponsePromise<ProviderAvailabilityDto[]> {
const url = `${teachersEndpoint}/${providerRoleId}/availability`;
const url = `${teachersEndpoint}/${providerRoleId}/availabilities`;

return await getWithoutBody<ProviderAvailabilityDto[]>(url);
}
Expand Down
7 changes: 6 additions & 1 deletion app/api/actions/curriculum-delivery-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,18 @@ export async function getSchemasByIdList(idList: string[]) {
return await getDtoListByIds<string, WorkProjectSeriesSchemaDto>(idList, url);
}

const organizationGraphEndpoint = `${API_BASE_URL}/graphs/organizations`;
const organizationGraphEndpoint = `${API_BASE_URL}/v2/organizations/graphs`;

export async function getOrganizationGraph(): ActionResponsePromise<
GraphDto<OrganizationDto>
> {
return getWithoutBody(organizationGraphEndpoint);
}
export async function getOrganizationGraphByRootId(
rootId: number
): ActionResponsePromise<GraphDto<OrganizationDto>> {
return getWithoutBody(`${organizationGraphEndpoint}/byRootId/${rootId}`);
}

export async function getOrganizationGraphByOrganizationType(
yearGroup: string
Expand Down
7 changes: 5 additions & 2 deletions app/curriculum/class-hierarchy/[yearGroup]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {
getBundleDeliveriesByOrgType,
getBundles,
getOrganizationGraph,
getOrganizationGraphByOrganizationType,
getOrganizationGraphByRootId,
getSchemasByIdList
} from '../../../api/actions/curriculum-delivery-model';
import { Card } from '@nextui-org/card';
Expand All @@ -28,10 +30,11 @@ export default async function Page({
yearGroup: string;
};
}) {
// await getOrganizationGraph();
const bundleDeliveries = await getBundleDeliveriesByOrgType(yearGroup);
const actionResponseOrganizationGraph =
await getOrganizationGraphByOrganizationType(yearGroup);
// await getOrganizationGraphByOrganizationType(yearGroup);
// await getOrganizationGraph();
await getOrganizationGraphByRootId(1446);

const indexOfSpace = yearGroup.indexOf('%20');
const taskTypesResponse = await getWorkTaskTypes({
Expand Down

0 comments on commit af1b557

Please sign in to comment.