diff --git a/src/api/generated/index.ts b/src/api/generated/index.ts index a48b0a9..0532b4b 100644 --- a/src/api/generated/index.ts +++ b/src/api/generated/index.ts @@ -80,6 +80,8 @@ export type { GetObjectResultsDto } from './models/GetObjectResultsDto'; export type { GetObjectResultsFileDto } from './models/GetObjectResultsFileDto'; export type { GetOutcropsCommandResponse } from './models/GetOutcropsCommandResponse'; export type { GetOutcropsDto } from './models/GetOutcropsDto'; +export type { GetOutcropsLocationDto } from './models/GetOutcropsLocationDto'; +export type { GetOutcropsRegionDto } from './models/GetOutcropsRegionDto'; export type { GetUploadDetailQueryResponse } from './models/GetUploadDetailQueryResponse'; export type { GetUploadListQueryResponse } from './models/GetUploadListQueryResponse'; export type { GetVariogramResultsByModelIdQueryResponse } from './models/GetVariogramResultsByModelIdQueryResponse'; @@ -105,6 +107,7 @@ export type { ListMetadataTypesQueryResponse } from './models/ListMetadataTypesQ export type { ListModelAreaTypesQueryResponse } from './models/ListModelAreaTypesQueryResponse'; export type { ListStratColumnQueryResponse } from './models/ListStratColumnQueryResponse'; export type { ListStratUnitsQueryResponse } from './models/ListStratUnitsQueryResponse'; +export type { LocationDto } from './models/LocationDto'; export type { MergeModelCommandResponse } from './models/MergeModelCommandResponse'; export type { MergeModelDto } from './models/MergeModelDto'; export type { MetadataDto } from './models/MetadataDto'; @@ -126,6 +129,7 @@ export type { PrepareChunkedUploadCommandResponse } from './models/PrepareChunke export type { PrepareChunkedUploadDto } from './models/PrepareChunkedUploadDto'; export type { ProblemDetails } from './models/ProblemDetails'; export type { RadixJobDto } from './models/RadixJobDto'; +export type { RegionDto } from './models/RegionDto'; export type { StratColumnDto } from './models/StratColumnDto'; export type { StratigraphicGroupDto } from './models/StratigraphicGroupDto'; export type { StratUnitDto } from './models/StratUnitDto'; diff --git a/src/api/generated/models/GetOutcropsDto.ts b/src/api/generated/models/GetOutcropsDto.ts index a1d007b..9619bb0 100644 --- a/src/api/generated/models/GetOutcropsDto.ts +++ b/src/api/generated/models/GetOutcropsDto.ts @@ -3,11 +3,13 @@ /* tslint:disable */ /* eslint-disable */ +import type { GetOutcropsRegionDto } from './GetOutcropsRegionDto'; + export type GetOutcropsDto = { outcropId: string; name: string; outcropCategory: string; - region: string; basins: Array; + region: GetOutcropsRegionDto; }; diff --git a/src/api/generated/models/GetOutcropsLocationDto.ts b/src/api/generated/models/GetOutcropsLocationDto.ts new file mode 100644 index 0000000..d61ceb7 --- /dev/null +++ b/src/api/generated/models/GetOutcropsLocationDto.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type GetOutcropsLocationDto = { + locationId: string; + regionId: string; + locationName: string; + country: string; +}; + diff --git a/src/api/generated/models/GetOutcropsRegionDto.ts b/src/api/generated/models/GetOutcropsRegionDto.ts new file mode 100644 index 0000000..a69c4b2 --- /dev/null +++ b/src/api/generated/models/GetOutcropsRegionDto.ts @@ -0,0 +1,13 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { GetOutcropsLocationDto } from './GetOutcropsLocationDto'; + +export type GetOutcropsRegionDto = { + regionId: string; + name: string; + locations: Array; +}; + diff --git a/src/api/generated/models/LocationDto.ts b/src/api/generated/models/LocationDto.ts new file mode 100644 index 0000000..904ac69 --- /dev/null +++ b/src/api/generated/models/LocationDto.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type LocationDto = { + locationId: string; + regionId: string; + locationName: string; + country: string; +}; + diff --git a/src/api/generated/models/OutcropDto.ts b/src/api/generated/models/OutcropDto.ts index cf67581..928b901 100644 --- a/src/api/generated/models/OutcropDto.ts +++ b/src/api/generated/models/OutcropDto.ts @@ -3,11 +3,13 @@ /* tslint:disable */ /* eslint-disable */ +import type { RegionDto } from './RegionDto'; + export type OutcropDto = { outcropId: string; name: string; outcropCategory: string; - region: string; basins: Array; + region: RegionDto; }; diff --git a/src/api/generated/models/RegionDto.ts b/src/api/generated/models/RegionDto.ts new file mode 100644 index 0000000..96f2660 --- /dev/null +++ b/src/api/generated/models/RegionDto.ts @@ -0,0 +1,13 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { LocationDto } from './LocationDto'; + +export type RegionDto = { + regionId: string; + name: string; + locations: Array; +}; + diff --git a/src/components/OutcropAnalogue/OutcropAnalogueGroup/OutcropAnalogueGroup.tsx b/src/components/OutcropAnalogue/OutcropAnalogueGroup/OutcropAnalogueGroup.tsx index 87737d3..4b00e86 100644 --- a/src/components/OutcropAnalogue/OutcropAnalogueGroup/OutcropAnalogueGroup.tsx +++ b/src/components/OutcropAnalogue/OutcropAnalogueGroup/OutcropAnalogueGroup.tsx @@ -12,6 +12,7 @@ import { AddAnalogueModelOutcropForm, AnalogueModelDetail, OutcropDto, + RegionDto, } from '../../../api/generated'; import { useOutcropAnalouge } from '../../../hooks/useOutcropAnalogue'; import * as StyledDialog from '../../../styles/addRowDialog/AddRowDialog.styled'; @@ -23,7 +24,7 @@ export interface OutcropType { outcropId?: string; name?: string; outcropCategory?: string; - region?: string; + region?: RegionDto; basins?: Array; } @@ -108,6 +109,8 @@ export const OutcropAnalogueGroup = ({ Analogue + Country + Location Region Basin Category @@ -136,7 +139,20 @@ export const OutcropAnalogueGroup = ({ {row.name} - {row.region} + {row.region.locations.length !== 0 ? ( + <> + {row.region.locations[0].country} + + {row.region.locations[0].locationName} + + + ) : ( + <> + + + + )} + {row.region.name} {row.basins?.map((item) => item)} diff --git a/src/components/OutcropAnalogue/OutcropSelect/OutcropSelect.tsx b/src/components/OutcropAnalogue/OutcropSelect/OutcropSelect.tsx index 5161e33..96c0b30 100644 --- a/src/components/OutcropAnalogue/OutcropSelect/OutcropSelect.tsx +++ b/src/components/OutcropAnalogue/OutcropSelect/OutcropSelect.tsx @@ -64,14 +64,56 @@ export const OutcropSelect = ({ helperText={error.Analogue ? error.Analogue : undefined} /> + {outcropObject.region?.locations.length !== 0 ? ( + <> + + + + + ) : ( + <> + )} +