Skip to content

Commit

Permalink
AE-2040: Allow new käytönvalvonta toimenpidetypes in production
Browse files Browse the repository at this point in the history
  • Loading branch information
Juholei committed Feb 21, 2024
1 parent 8c85df0 commit 943c4ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
24 changes: 3 additions & 21 deletions etp-front/src/pages/valvonta-kaytto/valvonta.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@
import Manager from './manager.svelte';
import Toimenpide from './toimenpide.svelte';
import Note from './note.svelte';
import * as versionApi from '@Component/Version/version-api';
import { isProduction } from '@Utility/config-utils';
import { announcementsForModule } from '@Utility/announce';
const TOIMENPIDETYPES_ALLOWED_IN_PRODUCTION = [0, 1, 2, 3, 4, 5];
const i18n = $_;
const i18nRoot = 'valvonta.kaytto.valvonta';
const { announceError, announceSuccess } =
Expand All @@ -48,22 +44,11 @@
overlay = false;
},
R.chain(
({ whoami, environment }) =>
whoami =>
Future.parallelObject(7, {
toimenpiteet: ValvontaApi.toimenpiteet(params.id),
notes: ValvontaApi.notes(params.id),
toimenpidetyypit: R.when(
R.always(isProduction(environment)),
R.map(
R.filter(
R.propSatisfies(
R.includes(R.__, TOIMENPIDETYPES_ALLOWED_IN_PRODUCTION),
'id'
)
)
),
ValvontaApi.toimenpidetyypit
),
toimenpidetyypit: ValvontaApi.toimenpidetyypit,
templatesByType: ValvontaApi.templatesByType,
roolit: ValvontaApi.roolit,
toimitustavat: ValvontaApi.toimitustavat,
Expand All @@ -77,10 +62,7 @@
johtaja: ValvontaApi.johtaja,
whoami: Future.resolve(whoami)
}),
Future.parallelObject(2, {
whoami: KayttajaApi.whoami,
environment: R.map(R.prop('environment'), versionApi.getConfig)
})
KayttajaApi.whoami
)
);
};
Expand Down
5 changes: 0 additions & 5 deletions etp-front/src/utils/config-utils.js

This file was deleted.

0 comments on commit 943c4ec

Please sign in to comment.