Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

AE-2040 Sallitaan uusien käytönvalvonnan toimenpiteiden käyttö tuotannossa #988

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions src/pages/valvonta-kaytto/valvonta.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
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';

const TOIMENPIDETYPES_ALLOWED_IN_PRODUCTION = [0, 1, 2, 3, 4, 5];

const i18n = $_;
const i18nRoot = 'valvonta.kaytto.valvonta';
Expand All @@ -50,22 +46,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 @@ -79,10 +64,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 src/utils/config-utils.js

This file was deleted.

Loading