diff --git a/src/main/java/fr/inra/oresing/model/Configuration.java b/src/main/java/fr/inra/oresing/model/Configuration.java index 1a0d12db03f03f5b68c7a7d4e95b8ed914217746..08d98149acce6475ac8365ec70ae9af6590a689c 100644 --- a/src/main/java/fr/inra/oresing/model/Configuration.java +++ b/src/main/java/fr/inra/oresing/model/Configuration.java @@ -360,6 +360,8 @@ public class Configuration { @ApiModelProperty(notes = "If this section exists, the data file will be store on a repository tree", required = false) private RepositoryDescription repository = null; + public List<String> tags = new LinkedList<>(); + public static Map<String, InternationalizationDataTypeMap> getInternationalization(LinkedHashMap<String, DataTypeDescription> dataTypeDescriptionMap) { Map<String, InternationalizationDataTypeMap> internationalizationDataTypeMapMap = new HashMap<>(); for (Map.Entry<String, DataTypeDescription> entry : dataTypeDescriptionMap.entrySet()) { diff --git a/src/main/java/fr/inra/oresing/rest/ApplicationResult.java b/src/main/java/fr/inra/oresing/rest/ApplicationResult.java index fdf51345149c18c54b26390267f98d85240196c2..3baf3762b94d94d249069a6a407970fc1786bb60 100644 --- a/src/main/java/fr/inra/oresing/rest/ApplicationResult.java +++ b/src/main/java/fr/inra/oresing/rest/ApplicationResult.java @@ -67,6 +67,7 @@ public class ApplicationResult { Map<String, Variable> variables; Repository repository; boolean hasAuthorizations; + Set<String> tags; @Value public static class Repository { diff --git a/src/main/java/fr/inra/oresing/rest/OreSiResources.java b/src/main/java/fr/inra/oresing/rest/OreSiResources.java index ed4f94aefb0619a0d62fb95157910ba196ccd47c..6a35f187ffff27820f70b1588afc66d197db3908 100644 --- a/src/main/java/fr/inra/oresing/rest/OreSiResources.java +++ b/src/main/java/fr/inra/oresing/rest/OreSiResources.java @@ -181,7 +181,11 @@ public class OreSiResources { return new ApplicationResult.DataType.Repository(filePattern, authorizationScope, startDate, endDate); }) .orElse(null); - return new ApplicationResult.DataType(dataType, dataType, variables, repositoryResult, hasAuthorizations); + final Set<String> tags = Optional.ofNullable(dataTypeDescription.getTags()) + .filter(list->!list.isEmpty()) + .map(t->new HashSet(t)) + .orElse(new HashSet(List.of("no-tag"))); + return new ApplicationResult.DataType(dataType, dataType, variables, repositoryResult, hasAuthorizations, tags); }) : Map.of(); Configuration configuration = withConfiguration ? application.getConfiguration() : null; ApplicationResult applicationResult = new ApplicationResult(application.getId().toString(), application.getName(), application.getConfiguration().getApplication().getName(), application.getComment(), application.getConfiguration().getInternationalization(), references, dataTypes, referenceSynthesis, configuration); diff --git a/src/test/resources/data/monsore/monsore-with-repository.yaml b/src/test/resources/data/monsore/monsore-with-repository.yaml index 4f7c542754a60ec3948b103944468fd4bdfaf815..08a074defca6c851bf4a6764df8af818c4201ccc 100644 --- a/src/test/resources/data/monsore/monsore-with-repository.yaml +++ b/src/test/resources/data/monsore/monsore-with-repository.yaml @@ -14,6 +14,9 @@ tags: data: fr: données en: data + test: + fr: test + en: test compositeReferences: sites: components: @@ -46,7 +49,7 @@ references: esp_definition_en: null colonne_homonyme_entre_referentiels: null projet: - tags: [context] + tags: [context, data, test] internationalizationName: fr: Projet en: Project @@ -374,6 +377,7 @@ references: nom de l'unité: null dataTypes: pem: + tags: [context, data, test] internationalizationName: fr: Piégeage en Montée en: Trap in ascent diff --git a/ui/src/components/common/CollapsibleTree.vue b/ui/src/components/common/CollapsibleTree.vue index 3c228f343f4d55020d26fc0ae85a3a611f23322d..8fa33c351148e9e7076f9c607111ff2811185c79 100644 --- a/ui/src/components/common/CollapsibleTree.vue +++ b/ui/src/components/common/CollapsibleTree.vue @@ -8,24 +8,11 @@ @click="displayChildren = !displayChildren" @keypress.enter="displayChildren = !displayChildren" > - <div - class="CollapsibleTree-header-infos column is-variable is-half-desktop is-three-quarters-widescreen" - > - <div - class="CollapsibleTree-header-infos column" + <div class="CollapsibleTree-header-infos column is-two-thirds" > + <div class="CollapsibleTree-header-infos column is-narrow" :style="`transform:translate(${level * 50}px);`" > - <b-checkbox - v-if="withRadios" - v-model="innerOptionChecked" - :name="radioName" - @click.native="stopPropagation" - :native-value="option.id" - > - {{ option.localName || option.label }} - </b-checkbox> <div - v-else :class="onClickLabelCb ? 'link' : ''" @click="(event) => onClickLabelCb && onClickLabelCb(event, option.label)" @keypress.enter="(event) => onClickLabelCb && onClickLabelCb(event, option.label)" @@ -50,19 +37,22 @@ class="clickable mr-3" tabindex="0" /> - <p > {{ option.localName || option.label }} </p> + <p> {{ option.localName || option.label }} </p> <span class="file-name" v-if="refFile"> {{ refFile.name }} </span> -<!-- <span class="file-name" v-else-if="lineCount > 0"> - {{ $t("validation.count-line") }} {{ lineCount }} - </span>--> + <div v-if="option.localtags" class="column"> + <span v-for="tag in option.localtags" :key="tag" style="margin-left: 5px"> + <b-tag v-if="tag !== 'no-tag'" class="is-primary is-light"> + {{ tag }} + </b-tag> + </span> + </div> </div> - <div - :class=" + <div :class=" option.synthesisMinMax && onClickLabelSynthesisDetailCb - ? 'tile synthesis-details link column is-variable is-10-desktop is-8-widescreen' - : 'tile synthesis-details column' + ? 'tile synthesis-details link column is-four-fifths' + : 'tile synthesis-details column is-full' " @click=" (event) => @@ -71,7 +61,7 @@ onClickLabelSynthesisDetailCb(event, option) " > - <span v-if="option.synthesisMinMax" class="synthesis-infos has-text-info-dark"> + <span v-if="option.synthesisMinMax" class="synthesis-infos has-text-info-dark column is-full"> <b-field v-show="false"> {{ new Date(option.synthesisMinMax[0]).toLocaleDateString("fr") + @@ -98,17 +88,15 @@ {{ $t("validation.data-empty") }} </span> </div> - <b-tag v-for="tag in option.localtags" :key="tag" class="is-primary is-light"> - {{tag=='no-tag'?$t('tags.no-tag'):tag}} - </b-tag> </div> - <div class="CollapsibleTree-buttons column is-2"> + <div class="CollapsibleTree-buttons column is-narrow"> <div class="file button is-small is-info" v-if="onUploadCb"> <b-upload v-model="refFile" class="file-label ml-1" accept=".csv" @input="() => onUploadCb(option.label, refFile) && showChildren()" + style="padding: 0px" > <span class="file-cta"> <b-icon icon="upload"></b-icon> diff --git a/ui/src/components/common/TagsCollapse.vue b/ui/src/components/common/TagsCollapse.vue new file mode 100644 index 0000000000000000000000000000000000000000..b902eb41dec54756d0f4af9652ef8f258b9c4515 --- /dev/null +++ b/ui/src/components/common/TagsCollapse.vue @@ -0,0 +1,49 @@ +<template> + <b-collapse + class="card" + :open="open" + animation="slide" + aria-id="contentIdForA11y3" + > + <template #trigger="props"> + <div + class="card-header" + role="button" + aria-controls="contentIdForA11y3" + :aria-expanded="props.open" + > + <p class="card-header-title"> + {{ $t("tags.tag") }} + </p> + <a class="card-header-icon"> + <b-icon :icon="props.open ? 'chevron-down' : 'chevron-up'"> </b-icon> + </a> + </div> + </template> + <div class="card-content"> + <div class="content columns" style="display: flex; flex-wrap: wrap;"> + <b-field class="column is-narrow" v-for="(tag, index) in tags" :key="index"> + <b-switch v-model="tag.selected" passive-type="is-light" type="is-dark"> + {{ tag.localName === "no-tag" ? $t("tags.no-tag") : tag.localName }} + </b-switch> + </b-field> + </div> + </div> + </b-collapse> + +</template> + +<script> +import { Component,Prop, Vue } from "vue-property-decorator"; +@Component({ + components: {}, +}) +export default class TagsCollapse extends Vue { + @Prop() tags; + open = false; +} +</script> + +<style scoped> + +</style> \ No newline at end of file diff --git a/ui/src/components/datatype/DataTypeDetailsPanel.vue b/ui/src/components/datatype/DataTypeDetailsPanel.vue index f545ca6d60ec04f3a0bdaaba9c13957de6e6a614..645eda8bd19415096a796c2e234968e3b371038d 100644 --- a/ui/src/components/datatype/DataTypeDetailsPanel.vue +++ b/ui/src/components/datatype/DataTypeDetailsPanel.vue @@ -5,6 +5,18 @@ :title="dataType && (dataType.localName || dataType.label)" :close-cb="closeCb" > + <div class="columns"> + <caption> + {{ $t('tags.tag') }} {{ $t('ponctuation.colon')}} + </caption> + <div v-for="(tag) in dataType.tags" :key="tag" style="margin: 5px"> + <b-tag class="is-primary" v-if="tags[tag].localName !== 'no-tag'"> + <span> + {{ tags[tag].localName }} + </span> + </b-tag> + </div> + </div> <div class="Panel-buttons"> <b-button type="is-dark" icon-left="key" @click="consultAuthorization">{{ $t("dataTypesManagement.consult-authorization") @@ -26,6 +38,7 @@ export default class DataTypeDetailsPanel extends Vue { @Prop() dataType; @Prop() closeCb; @Prop() applicationName; + @Prop() tags; consultAuthorization() { this.$router.push( diff --git a/ui/src/components/references/ReferencesDetailsPanel.vue b/ui/src/components/references/ReferencesDetailsPanel.vue index 854894cb224315d9081c6e45f4c4b4461e04acec..6ee112f3132390f467f9b289251ef1ec0357ab8a 100644 --- a/ui/src/components/references/ReferencesDetailsPanel.vue +++ b/ui/src/components/references/ReferencesDetailsPanel.vue @@ -5,15 +5,17 @@ :open="open" :title="reference && (reference.refNameLocal || reference.label)" > - <div v-if="tags">{{ $t('tags.tag') }} : - <b-tag v-for="(tag) in reference.tags" :key="tag" class="is-primary is-light"> - <span v-if="tag=='no-tag'"> - {{ $t('tags.no-tag') }} - </span> - <span v-else> - {{(tags[tag] && tags[tag].localName)|| tag}} - </span> - </b-tag> + <div class="columns"> + <caption> + {{ $t('tags.tag') }} {{ $t('ponctuation.colon')}} + </caption> + <div v-for="(tag) in reference.tags" :key="tag" style="margin: 5px"> + <b-tag class="is-primary" v-if="tags[tag].localName !== 'no-tag'"> + <span> + {{ tags[tag].localName }} + </span> + </b-tag> + </div> </div> <div class="Panel-buttons"> <b-button icon-left="trash-alt" type="is-danger" @click="askDeletionConfirmation">{{ diff --git a/ui/src/style/_common.scss b/ui/src/style/_common.scss index 5ad39bd60d00251dacc0cadcfd5aa5c364cdd288..9a8ece84d1dbbf968e880a94edf2636a1d795d77 100644 --- a/ui/src/style/_common.scss +++ b/ui/src/style/_common.scss @@ -140,6 +140,9 @@ a { .dropdown-content{ box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.5), 0 0px 0 1px rgba(10, 10, 10, 0.1); } +.section { + padding: 1em; +} .pagination-link.is-current { background-color: $dark; border-color: $dark; diff --git a/ui/src/views/common/MenuView.vue b/ui/src/views/common/MenuView.vue index c88d036ac57d248d95d993c37f4f45fbbd7e59f5..4f18bb45ffd0dc6eb7e1430e9aa8271a4b7bc208 100644 --- a/ui/src/views/common/MenuView.vue +++ b/ui/src/views/common/MenuView.vue @@ -90,7 +90,7 @@ <FontAwesomeIcon @click="open = !open" - :icon="open ? 'caret-up' : 'caret-down'" + :icon="open ? 'chevron-up' : 'chevron-down'" class="clickable mr-3 menu-view-collapsible-icon" /> </div> diff --git a/ui/src/views/datatype/DataTypesManagementView.vue b/ui/src/views/datatype/DataTypesManagementView.vue index 363d4d6576d1ff1a5c8816c017dfc371429e3c51..4b2e1d75f2216f68c94f43f31f2b9aaef2e23909 100644 --- a/ui/src/views/datatype/DataTypesManagementView.vue +++ b/ui/src/views/datatype/DataTypesManagementView.vue @@ -14,6 +14,12 @@ }} </h1> + <div class="column is-offset-one-third is-one-third"> + <TagsCollapse + v-if="tags && Object.keys(tags).length > 1" + :tags="tags" + /> + </div> <AvailablityChart v-if="false" /> <div v-if="errorsMessages.length" style="margin: 10px"> <div v-for="msg in errorsMessages" :key="msg"> @@ -31,7 +37,7 @@ <div> <CollapsibleTree class="liste" - v-for="(data, i) in dataTypes" + v-for="(data, i) in dataTypesToBeShown" :id="i + 1" :key="data.id" :option="{ @@ -58,6 +64,7 @@ :data-type="chosenDataType" :close-cb="(newVal) => (openPanel = newVal)" :application-name="applicationName" + :tags="tags" /> <b-modal class="modalByAgrégation" v-model="openSynthesisDetailPanel" width="100rem"> <DetailModalCard @@ -91,6 +98,7 @@ import DataTypeDetailsPanel from "@/components/datatype/DataTypeDetailsPanel.vue import AvailablityChart from "@/components/charts/AvailiblityChart.vue"; import DetailModalCard from "@/components/charts/DetailModalCard"; import { DownloadDatasetQuery } from "@/model/application/DownloadDatasetQuery"; +import TagsCollapse from "@/components/common/TagsCollapse.vue"; @Component({ components: { @@ -100,6 +108,7 @@ import { DownloadDatasetQuery } from "@/model/application/DownloadDatasetQuery"; SubMenu, DataTypeDetailsPanel, AvailablityChart, + TagsCollapse, }, }) export default class DataTypesManagementView extends Vue { @@ -125,16 +134,59 @@ export default class DataTypesManagementView extends Vue { this.downloadDataType(label) ), ]; - dataTypes = []; errorsMessages = []; errorsList = []; openPanel = false; openSynthesisDetailPanel = false; currentOptions = {}; - chosenDataType = null; + chosenDataType = {}; synthesis = {}; synthesisMinMax = {}; + tags = {}; + + get dataTypesToBeShown() { + if (!this.tags) { + return this.dataTypes; + } + let selectedTags = Object.keys(this.tags).filter((t) => this.tags[t].selected); + if (!Object.keys(this.tags).length) { + return this.dataTypes; + } + return this.dataTypes.filter((dataType) => { + return dataType.tags.some((t) => { + return selectedTags.includes(t); + }); + }); + } + buildTags() { + let tags = {}; + for (const dataType of this.dataTypes) { + let currentTags = dataType.tags; + if (!currentTags) { + continue; + } + for (const tagName of currentTags) { + if (tags[tagName]) { + continue; + } + tags[tagName] = {}; + tags[tagName].selected = true; + tags[tagName].localName = this.internationalisationService.getLocaleforPath( + this.application, + "internationalizedTags." + tagName, + tagName + ); + } + dataType.localtags = dataType.tags.map((tag) => tags[tag]?.localName || tag); + } + this.tags = tags; + } + toggle(tag) { + let tags = this.tags; + tags[tag].selected = !tags[tag].selected; + this.tags = tags; + } created() { this.subMenuPaths = [ @@ -150,7 +202,11 @@ export default class DataTypesManagementView extends Vue { async init() { try { - this.application = await this.applicationService.getApplication(this.applicationName, ['CONFIGURATION','DATATYPE', 'SYNTHESIS']); + this.application = await this.applicationService.getApplication(this.applicationName, [ + "CONFIGURATION", + "DATATYPE", + "SYNTHESIS", + ]); this.application = { ...this.application, localName: this.internationalisationService.mergeInternationalization(this.application) @@ -162,6 +218,7 @@ export default class DataTypesManagementView extends Vue { this.dataTypes = Object.values( this.internationalisationService.localeDatatypeName(this.application) ); + this.buildTags(); await this.initSynthesis(); } catch (error) { this.alertService.toastServerError(); @@ -320,4 +377,4 @@ export default class DataTypesManagementView extends Vue { margin-bottom: 10px; border: 1px solid white; } -</style> \ No newline at end of file +</style> diff --git a/ui/src/views/references/ReferencesManagementView.vue b/ui/src/views/references/ReferencesManagementView.vue index c3b4a8f5cc690f9cad0de47c1d36f8972b7204da..22a28f7fca63ce664c0e5b53071b2bd16ba4644f 100644 --- a/ui/src/views/references/ReferencesManagementView.vue +++ b/ui/src/views/references/ReferencesManagementView.vue @@ -1,82 +1,79 @@ <template> <PageView class="with-submenu"> <SubMenu - :aria-label="$t('menu.aria-sub-menu')" - :paths="subMenuPaths" - :root="application.localName" - role="navigation" + :aria-label="$t('menu.aria-sub-menu')" + :paths="subMenuPaths" + :root="application.localName" + role="navigation" /> <h1 class="title main-title"> - {{ $t("titles.references-page", {applicationName: application.localName}) }} + {{ $t("titles.references-page", { applicationName: application.localName }) }} </h1> <div v-if="errorsMessages.length" style="margin: 10px"> <div v-for="msg in errorsMessages" :key="msg"> <b-message - :aria-close-label="$t('message.close')" - :title="$t('message.data-type-config-error')" - class="mt-4" - has-icon - type="is-danger" + :aria-close-label="$t('message.close')" + :title="$t('message.data-type-config-error')" + class="mt-4" + has-icon + type="is-danger" > - <span v-html="msg"/> + <span v-html="msg" /> </b-message> </div> </div> - <b-field class="section" v-if="tags && Object.keys(tags).length>1"> - {{$t('tags.tag')}} - <b-taglist> - <b-tag v-for="(tag, index) in tags" :key="index" :icon="tag.selected?'check':''" - :type="tag.selected?'is-primary':'is-white'" - rounded @click="toggle(index)"> - {{ tag.localName }} - </b-tag> - </b-taglist> - </b-field> + <div class="column is-offset-one-third is-one-third"> + <TagsCollapse + v-if="tags && Object.keys(tags).length > 1" + :tags="tags" + /> + </div> <div class="section"> <CollapsibleTree - v-for="(ref, i) in referencesToBeShown" - :id="i + 1" - :key="ref.id" - :application-title="$t('titles.references-page')" - :buttons="buttons" - :level="0" - :line-count="lineCount(ref)" - :on-click-label-cb="(event, label) => openRefDetails(event, label)" - :on-upload-cb="(label, refFile) => uploadReferenceCsv(label, refFile)" - :option="ref" - class="liste" + v-for="(ref, i) in referencesToBeShown" + :id="i + 1" + :key="ref.id" + :application-title="$t('titles.references-page')" + :buttons="buttons" + :level="0" + :line-count="lineCount(ref)" + :on-click-label-cb="(event, label) => openRefDetails(event, label)" + :on-upload-cb="(label, refFile) => uploadReferenceCsv(label, refFile)" + :option="ref" + class="liste" > </CollapsibleTree> <ReferencesDetailsPanel - :close-cb="(newVal) => (openPanel = newVal)" - :left-align="false" - :open="openPanel" - :reference="chosenRef" - :tags="tags" + :close-cb="(newVal) => (openPanel = newVal)" + :left-align="false" + :open="openPanel" + :reference="chosenRef" + :tags="tags" /> </div> </PageView> </template> <script> -import {Component, Prop, Vue} from "vue-property-decorator"; -import {convertReferencesToTrees} from "@/utils/ConversionUtils"; +import { Component, Prop, Vue } from "vue-property-decorator"; +import { convertReferencesToTrees } from "@/utils/ConversionUtils"; import CollapsibleTree from "@/components/common/CollapsibleTree.vue"; +import TagsCollapse from "@/components/common/TagsCollapse.vue"; import ReferencesDetailsPanel from "@/components/references/ReferencesDetailsPanel.vue"; -import {ApplicationService} from "@/services/rest/ApplicationService"; -import {InternationalisationService} from "@/services/InternationalisationService"; -import {ReferenceService} from "@/services/rest/ReferenceService"; +import { ApplicationService } from "@/services/rest/ApplicationService"; +import { InternationalisationService } from "@/services/InternationalisationService"; +import { ReferenceService } from "@/services/rest/ReferenceService"; import PageView from "../common/PageView.vue"; -import {ApplicationResult} from "@/model/ApplicationResult"; -import SubMenu, {SubMenuPath} from "@/components/common/SubMenu.vue"; -import {AlertService} from "@/services/AlertService"; -import {Button} from "@/model/Button"; -import {HttpStatusCodes} from "@/utils/HttpUtils"; -import {ErrorsService} from "@/services/ErrorsService"; +import { ApplicationResult } from "@/model/ApplicationResult"; +import SubMenu, { SubMenuPath } from "@/components/common/SubMenu.vue"; +import { AlertService } from "@/services/AlertService"; +import { Button } from "@/model/Button"; +import { HttpStatusCodes } from "@/utils/HttpUtils"; +import { ErrorsService } from "@/services/ErrorsService"; @Component({ - components: {CollapsibleTree, ReferencesDetailsPanel, PageView, SubMenu}, + components: { CollapsibleTree, TagsCollapse, ReferencesDetailsPanel, PageView, SubMenu }, }) export default class ReferencesManagementView extends Vue { @Prop() applicationName; @@ -90,42 +87,40 @@ export default class ReferencesManagementView extends Vue { references = []; currentPage = 1; openPanel = false; - chosenRef = null; + chosenRef = {}; application = new ApplicationResult(); subMenuPaths = []; errorsMessages = []; errorsList = []; buttons = [ new Button( - this.$t("referencesManagement.consult"), - "eye", - (label) => this.consultReference(label), - "is-dark" + this.$t("referencesManagement.consult"), + "eye", + (label) => this.consultReference(label), + "is-dark" ), new Button(this.$t("referencesManagement.download"), "download", (label) => - this.downloadReference(label) + this.downloadReference(label) ), ]; - tags={}; + tags = {}; get referencesToBeShown() { if (!this.tags) { - return this.references + return this.references; } - let selectedTags = Object.keys(this.tags).filter(t => this.tags[t].selected) + let selectedTags = Object.keys(this.tags).filter((t) => this.tags[t].selected); if (!Object.keys(this.tags).length) { - return this.references + return this.references; } - return this.references - .filter(reference => { - return reference.tags.some(t => { - return selectedTags.includes(t) - }) - }); + return this.references.filter((reference) => { + return reference.tags.some((t) => { + return selectedTags.includes(t); + }); + }); } - buildTags() { - let tags = {} + let tags = {}; for (const reference of this.references) { let currentTags = reference.tags; if (!currentTags) { @@ -137,45 +132,50 @@ export default class ReferencesManagementView extends Vue { } tags[tagName] = {}; tags[tagName].selected = true; - let locale = this.internationalisationService - .getLocaleforPath(this.application, 'internationalizedTags.' + tagName, tagName) - tags[tagName].localName = locale; + tags[tagName].localName = this.internationalisationService.getLocaleforPath( + this.application, + "internationalizedTags." + tagName, + tagName + ); } - reference.localtags = reference.tags.map(tag => tags[tag]?.localName || tag) + reference.localtags = reference.tags.map((tag) => tags[tag]?.localName || tag); } - this.tags= tags; + this.tags = tags; } created() { this.subMenuPaths = [ new SubMenuPath( - this.$t("referencesManagement.references").toLowerCase(), - () => this.$router.push(`/applications/${this.applicationName}/references`), - () => this.$router.push(`/applications`) + this.$t("referencesManagement.references").toLowerCase(), + () => this.$router.push(`/applications/${this.applicationName}/references`), + () => this.$router.push(`/applications`) ), ]; this.init(); } toggle(tag) { - let tags = this.tags - tags[tag].selected = !tags[tag].selected - this.tags = tags + let tags = this.tags; + tags[tag].selected = !tags[tag].selected; + this.tags = tags; } async init() { try { - this.application = await this.applicationService.getApplication(this.applicationName, ['CONFIGURATION', 'REFERENCETYPE']); + this.application = await this.applicationService.getApplication(this.applicationName, [ + "CONFIGURATION", + "REFERENCETYPE", + ]); this.application = { ...this.application, localName: this.internationalisationService.mergeInternationalization(this.application) - .localName, + .localName, }; if (!this.application?.id) { return; } this.references = convertReferencesToTrees( - Object.values(this.internationalisationService.treeReferenceName(this.application)) + Object.values(this.internationalisationService.treeReferenceName(this.application)) ); this.buildTags(); } catch (error) { @@ -210,8 +210,8 @@ export default class ReferencesManagementView extends Vue { } else { for (let j = 0; j < ref.children[n].children.length; j++) { if ( - this.application.referenceSynthesis[i].referenceType === - ref.children[n].children[j].label + this.application.referenceSynthesis[i].referenceType === + ref.children[n].children[j].label ) { ref.children[n].children[j] = { ...ref.children[n].children[j], @@ -271,7 +271,6 @@ export default class ReferencesManagementView extends Vue { var ref = Object.values(this.application.references).find((ref) => ref.label === label); return ref; } - } </script> <style lang="scss" scoped> @@ -279,4 +278,4 @@ export default class ReferencesManagementView extends Vue { margin-bottom: 10px; border: 1px solid white; } -</style> \ No newline at end of file +</style>