Skip to content

Commit

Permalink
error inputSettingTypeId
Browse files Browse the repository at this point in the history
  • Loading branch information
mheggelund committed Jan 18, 2024
1 parent d7ae69f commit 1d2845f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 31 deletions.
9 changes: 5 additions & 4 deletions src/features/Compute/CaseGroup/CaseGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ export const CaseGroup = ({
queryFn: () => ComputeSettingsService.getApiComputeSettings(),
enabled: !!token,
});
// eslint-disable-next-line no-console
console.log(computeSettingsResponse && computeSettingsResponse.data?.data);
// // eslint-disable-next-line no-console
// console.log(computeSettingsResponse && computeSettingsResponse.data?.data);

const settingsFilter = (name: string) => {
if (computeSettingsResponse) {
Expand All @@ -117,8 +117,8 @@ export const CaseGroup = ({
const channelSettings = settingsFilter('Object');
const variogramSettings = settingsFilter('Variogram');

// eslint-disable-next-line no-console
console.log(variogramSettings);
// // eslint-disable-next-line no-console
// console.log(variogramSettings);

const variogramFilter = (name: string) => {
if (variogramSettings) {
Expand Down Expand Up @@ -327,6 +327,7 @@ export const CaseGroup = ({
<Tooltip title="Functionality not implemented yet.">
<Button
variant="outlined"
// eslint-disable-next-line no-console
onClick={() => console.log('Running all')}
disabled
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ export const VariogramOptionSelect = ({

let defaultParameter: ListComputeSettingsInputValueDto[] = [];

if (method === 'Indicator' && loadedParameters) {
if (method === 'Indicator' && loadedParameters && setIndicatorParameters) {
if (
loadedParameters !== undefined &&
selectedIndicatorParameters === undefined
) {
defaultParameter = loadedParameters;
setIndicatorParameters && setIndicatorParameters(loadedParameters);
setIndicatorParameters(loadedParameters);
} else if (
selectedIndicatorParameters !== undefined &&
loadedParameters === undefined
Expand Down
55 changes: 30 additions & 25 deletions src/features/Compute/CaseGroup/CaseRow/CaseRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,37 +141,39 @@ export const CaseRow = ({
methodType: string,
) => {
if (setting) {
let id = undefined;
let selectedId = undefined;
switch (settingType) {
case 'Indicator':
// id =
// indicatorSettings &&
// indicatorSettings[0].inputSettings.filter(
// (i) => (i.name = methodType),
// );

console.log(indicatorSettings);
console.log(indicatorSettings && indicatorSettings[0].inputSettings);

// console.log(id);

break;
if (indicatorSettings) {
// eslint-disable-next-line no-console
console.log(methodType);
// eslint-disable-next-line no-console
console.log(indicatorSettings[0].inputSettings);

const res = indicatorSettings[0].inputSettings.filter(
(i) => (i.name = methodType),
);
// eslint-disable-next-line no-console
console.log(res);
}
return selectedId;
case 'Net-To-Gross':
id =
netToGrossSettings &&
netToGrossSettings[0].inputSettings.filter(
if (netToGrossSettings)
selectedId = netToGrossSettings[0].inputSettings.filter(
(i) => (i.inputSettingTypeId = setting[0].inputSettingValueId),
);
console.log(id);
break;
// eslint-disable-next-line no-console
console.log(selectedId);
return selectedId;
case 'ContiniousParameter':
id =
selectedId =
continiousParameterSettings &&
continiousParameterSettings[0].inputSettings.filter(
(i) => (i.inputSettingTypeId = setting[0].inputSettingValueId),
);
console.log(id);
break;
// eslint-disable-next-line no-console
console.log(selectedId);
return selectedId;
}

// const variogramModelTypeId = '4d07719a-3f1c-4a0e-9147-23a51adb876c';
Expand All @@ -189,20 +191,23 @@ export const CaseRow = ({
const getParameterList = () => {
let inputSettingsList: CreateComputeCaseInputSettingsForm[] = [];

console.log('Kjører parameter list GET');

addSelectedSettings(
const resIndicator = addSelectedSettings(
selectedIndicatorParameters,
inputSettingsList,
'Indicator',
'Indicator',
);
addSelectedSettings(
// eslint-disable-next-line no-console
console.log(resIndicator);

const resFamily = addSelectedSettings(
selectedVariogramModels,
inputSettingsList,
'Indicator',
'Variogram Family Filter',
);
// eslint-disable-next-line no-console
console.log(resFamily);

if (selectedVariogramModels) {
const inputSettingTypeId = '4d07719a-3f1c-4a0e-9147-23a51adb876c';
Expand Down

0 comments on commit 1d2845f

Please sign in to comment.