Skip to content

Commit

Permalink
Fix PR comments
Browse files Browse the repository at this point in the history
PR comments

Update README.md

Co-authored-by: Laurens Weijs <laurens.weijs@rijksoverheid.nl>

Update frontend/src/stores/QuestionStore.ts

Co-authored-by: Laurens Weijs <laurens.weijs@rijksoverheid.nl>

Update frontend/src/components/SubResult.vue

Co-authored-by: Laurens Weijs <laurens.weijs@rijksoverheid.nl>
  • Loading branch information
ravimeijerrig and laurensWe committed Nov 11, 2024
1 parent 777c38a commit dab5217
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Let op: de diagrammen kunnen het beste in Chrome, Safari of Microsoft Edge worde

Om door de beslishulp te lopen is een visualizatie tool gemaakt. Met deze tool kunt u door de vragen lopen. De frontend is beschikbaar op deze [website](https://ai-act-decisiontree.apps.digilab.network).

### Frontend locaal draaien
### Frontend lokaal draaien

Om de development omgeving te standaardiseren maken we gebruik van [devcontainers](https://code.visualstudio.com/docs/devcontainers/containers#_getting-started).

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/SubResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface Props {
// Function to check if there are any valid labels in a category
function hasValidLabelsForCategory(assigned_labels: string[]) {
return assigned_labels.some(label => label !== 'nader te bepalen' && label !== 'niet van toepassing')
return assigned_labels.some(label => label !== 'nader te bepalen' )
}
// Filter categories that have valid labels (not 'nader te bepalen' or 'niet van toepassing')
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/stores/CategoryStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export const useCategoryStore = defineStore('category', () => {
function revertCurrentCategory() {
/**
* Set the currentCategory back to incomplete when the previousCategory is different
* TODO: subcategory?
*/
// Categories section
revertCategoryState()
Expand Down Expand Up @@ -142,7 +141,6 @@ export const useCategoryStore = defineStore('category', () => {
previousCategory.value = startCategory
previousSubCategory.value = startSubCategory
categoryState.value = JSON.parse(initialCategoryStateString)
// subCategoryState.value = JSON.parse(initialSubCategoryStateString)
categoryTrace.value = []
subCategoryTrace.value = []
localStorage.removeItem('currentCategory')
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/stores/QuestionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ export const useQuestionStore = defineStore('question', () => {
"Transparantieverplichting": ["nader te bepalen"]
}`

const initialAcceptedDisclaimer = sessionStorage.getItem('acceptedDisclaimer') ?? '0' //TODO: figure out why this is 0
const initialAcceptedDisclaimer = sessionStorage.getItem('acceptedDisclaimer') ?? '0'
const initialAnswers = JSON.parse(localStorage.getItem('answers') ?? '[]')
const initialLabels = JSON.parse(localStorage.getItem('labels') ?? '{}')
<<<<<<< HEAD
const initialLabelsBySubCategory = JSON.parse(localStorage.getItem('labelsbysubcategoryß') ?? initialLabelsBySubCategoryNTB)
=======
const initialLabelsBySubCategory = JSON.parse(localStorage.getItem('labelsbysubcategory') ?? initialLabelsBySubCategoryNTB)
const initialQuestionId = localStorage.getItem('currentquestion') ?? '1.2' //TODO: check if this is correct
>>>>>>> e1268db (Update frontend/src/stores/QuestionStore.ts)
const initialQuestionId = localStorage.getItem('currentquestion') ?? '1.2'
const initialConclusionId = localStorage.getItem('currentconclusion') ?? ''

const AcceptedDisclaimer = ref(String(initialAcceptedDisclaimer))
Expand Down

0 comments on commit dab5217

Please sign in to comment.