Skip to content

Commit

Permalink
initialView questionnaire initializes the policy
Browse files Browse the repository at this point in the history
  • Loading branch information
feserm committed Nov 20, 2024
1 parent faa6ea4 commit bc7d12a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@
import InitView from './components/general/InitView.svelte';
import { appstate } from '@/stores/appstate';
import { questionnaire } from './stores/questionnaire';
import { odrlStr } from '@/stores/odrl';
import { odrlObj, odrlStr } from '@/stores/odrl';
import GenericQuestionnaire from './components/questionnaire/GenericQuestionnaire.svelte';
import Header from './components/general/Header.svelte';
import SimpleGui from './components/simple-gui/SimpleGui.svelte';
import ProgressBar from './components/general/ProgressBar.svelte';
import Explanation from './components/general/Explanation.svelte';
import Schemas from './lib/schemas';
if (config.general?.initialView === 'questionnaire') {
if (Object.keys($odrlObj).length == 0) {
let emptyPolicy = Schemas.getObjectFromSchema('policy', config.prefill);
$odrlObj = emptyPolicy;
}
$appstate = appstate.QUESTIONNAIRE;
}
Expand Down

0 comments on commit bc7d12a

Please sign in to comment.