Skip to content

Commit

Permalink
Fix MAS Job Records not being displayed in MAS overview
Browse files Browse the repository at this point in the history
Fix MAS Job Records not being displayed in MAS overview
  • Loading branch information
TomDijkema committed Dec 5, 2024
1 parent 50982a5 commit 444a73f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/api/digitalMedia/GetDigitalMediaMasJobRecords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import axios from 'axios';

/* Import Types */
import { JSONResultArray, Dict } from 'app/Types';
import { MasJobRecord, JSONResultArray, Dict } from 'app/Types';

/* Import Exceptions */
import { NotFoundException } from 'app/Exceptions';
Expand All @@ -16,7 +16,7 @@ import { NotFoundException } from 'app/Exceptions';
*/
const GetDigitalMediaMasJobRecords = async ({ handle, pageSize, pageNumber, state }: { handle: string, pageSize?: number, pageNumber: number, state?: string }) => {
let returnData: {
masJobRecords: Dict[],
masJobRecords: MasJobRecord[],
links?: Dict
} = {
masJobRecords: []
Expand All @@ -41,7 +41,7 @@ const GetDigitalMediaMasJobRecords = async ({ handle, pageSize, pageNumber, stat
const data: JSONResultArray = result.data;

data.data.forEach(dataFragment => {
returnData.masJobRecords.push(dataFragment.attributes);
returnData.masJobRecords.push(dataFragment.attributes as MasJobRecord);
});

/* Set return data */
Expand Down
6 changes: 3 additions & 3 deletions src/api/digitalSpecimen/GetDigitalSpecimenMasJobRecords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import axios from 'axios';

/* Import Types */
import { JSONResultArray, Dict } from 'app/Types';
import { MasJobRecord, JSONResultArray, Dict } from 'app/Types';

/* Import Exceptions */
import { NotFoundException } from 'app/Exceptions';
Expand All @@ -16,7 +16,7 @@ import { NotFoundException } from 'app/Exceptions';
*/
const GetDigitalSpecimenMasJobRecords = async ({ handle, pageSize, pageNumber, state }: { handle: string, pageSize?: number, pageNumber: number, state?: string }) => {
let returnData: {
masJobRecords: Dict[],
masJobRecords: MasJobRecord[],
links?: Dict
} = {
masJobRecords: []
Expand All @@ -41,7 +41,7 @@ const GetDigitalSpecimenMasJobRecords = async ({ handle, pageSize, pageNumber, s
const data: JSONResultArray = result.data;

data.data.forEach(dataFragment => {
returnData.masJobRecords.push(dataFragment.attributes);
returnData.masJobRecords.push(dataFragment.attributes as MasJobRecord);
});

/* Set return data */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const MasOverview = (props: Props) => {
/* Hooks */
const pagination = usePagination({
pageSize: 25,
resultKey: 'MasJobRecords',
resultKey: 'masJobRecords',
params: {
handle: digitalObjectId,
state: masJobRecordStateFilter
Expand Down

0 comments on commit 444a73f

Please sign in to comment.