Skip to content

Commit

Permalink
Removed a few more superseded API calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
buchananwill committed Apr 11, 2024
1 parent e9daf36 commit e7af577
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 51 deletions.
20 changes: 0 additions & 20 deletions app/api/actions/custom/option-blocks.ts

This file was deleted.

21 changes: 0 additions & 21 deletions app/api/actions/custom/premises.ts

This file was deleted.

5 changes: 2 additions & 3 deletions app/navbar/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ import ProtectedNavigation from './protected-navigation';
import { Text } from '@tremor/react';
import { SvgLogo } from './svg-logo';
import { ChevronDownIcon } from '@heroicons/react/20/solid';

import { getOptionBlocks } from '../api/actions/custom/option-blocks';
import { KnowledgeLevelDto } from '../api/dtos/KnowledgeLevelDtoSchema';
import { ServiceCategoryDto } from '../api/dtos/ServiceCategoryDtoSchema';
import ToolTipsToggle from '../generic/components/tooltips/tool-tips-toggle';
import { getGraphByRootId } from '../api/READ-ONLY-generated-actions/OrganizationType';
import { getAll } from '../api/READ-ONLY-generated-actions/CarouselGroup';

interface DropdownItem {
name: string;
Expand Down Expand Up @@ -67,7 +66,7 @@ export default function Navbar({

useEffect(() => {
if (isLoading) {
getOptionBlocks().then((r) => {
getAll().then((r) => {
if (r.data) {
if (organizationTypes !== undefined) setIsLoading(false);
const receivedDropdownData = r.data.map((carouselGroupDto) => ({
Expand Down
9 changes: 3 additions & 6 deletions app/playground/page.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
import { Card } from '@nextui-org/card';
import SelectiveContextManagerGlobal from '../selective-context/components/global/selective-context-manager-global';
import { getCoAppearanceMatrix } from '../api/actions/custom/option-blocks';
import { isNotUndefined } from '../api/main';
import { DataNotFoundCard } from '../timetables/students/[schedule]/data-not-found-card';
import ArcChart from './arcChart';
import { getPage } from '../api/READ-ONLY-generated-actions/Carousel';

export default async function PlaygroundPage({}: {}) {
const actionResponse = await getPage({});

const { data } = await getCoAppearanceMatrix(12);
const data = undefined;

if (!isNotUndefined(data))
return <DataNotFoundCard>No matrix.</DataNotFoundCard>;

return (
<SelectiveContextManagerGlobal>
<Card className={'flex gap-4'}>
<ArcChart data={data} />
</Card>
<Card className={'flex gap-4'}></Card>
</SelectiveContextManagerGlobal>
);
}
2 changes: 1 addition & 1 deletion app/premises/asset-string-map-context-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from './asset-string-map-context-creator';
import { StringMap } from '../contexts/string-map-context/string-map-reducer';
import { PropsWithChildren, useCallback } from 'react';
import { patchAssetRoleWorkTaskSuitabilities } from '../api/actions/custom/premises';
import { AssetSuitabilityListSelectiveContext } from '../contexts/selective-context/selective-context-creators';
import { useSelectiveContextListenerReadAll } from '../selective-context/components/base/generic-selective-context-creator';
import { isNotUndefined } from '../api/main';
Expand All @@ -30,6 +29,7 @@ export default function AssetStringMapContextProvider({
.map((assetDto) => selectiveContextReadAll(assetDto.id.toString()))
.filter(isNotUndefined)
.reduce((prev, curr) => [...prev, ...curr], []);
console.log(updatedSuitabilityLists);
await putList(updatedSuitabilityLists);
return await putAssetList(changedAssetDtoList);
},
Expand Down

0 comments on commit e7af577

Please sign in to comment.