Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • anaee-dev/openadom/frontend
  • lucile.varloteaux/frontend
2 results
Show changes
Commits on Source (5)
Showing
with 125 additions and 6 deletions
......@@ -4,6 +4,7 @@
__tags__: Création d'un regroupements sous une étiquette permettant de filtré l'affichages des listes des [__references__](#referentiels) et des [__datatypes__](#datatypes).
Mais aussi les [__colonnes__](#columns), les [__colonnes calculées__](#computedColumns), les [__colones dynamiques__](#dynamicColumns) d'une [__reference__](#referentiels) et les *variables*, les *components* et les *computedComponents* d'un [__datatype__](#datatypes).
``` yaml
tags:
localization:
......
package fr.inra.oresing.rest.exceptions.data;
import fr.inra.oresing.OreSiTechnicalException;
public class BadCsvFileFormat extends OreSiTechnicalException {
static final String BAD_CSV_FILE_FORMAT = "badCsvFileFormat";
public BadCsvFileFormat() {
super(BAD_CSV_FILE_FORMAT);
}
}
\ No newline at end of file
package fr.inra.oresing.rest.exceptions.data;
import fr.inra.oresing.OreSiTechnicalException;
import lombok.extern.java.Log;
@Log
public class UnloadDataCsvFileException extends OreSiTechnicalException {
static final String UNLOAD_DATA_CSV_FILE_EXCEPTION = "unloadDataCsvFileException";
Exception exception;
public UnloadDataCsvFileException(Exception exception) {
super(UNLOAD_DATA_CSV_FILE_EXCEPTION);
this.exception = exception;
log.severe(exception.getMessage());
}
}
\ No newline at end of file
......@@ -16,6 +16,17 @@
</div>
</template>
<div class="card-content">
<div class="content columns" style="display: flex; flex-wrap: wrap">
<b-switch
class="column is-narrow"
v-model="allTags"
passive-type="is-light"
type="is-warning"
@input="changeAllTags(allTags, $event)"
>
{{ $t("tags.allTags") }}
</b-switch>
</div>
<div class="content columns" style="display: flex; flex-wrap: wrap">
<b-field v-for="(tag, key) in tags" :key="key" class="column is-narrow">
<b-switch
......@@ -24,7 +35,7 @@
type="is-dark"
@input="changeTag(key, $event)"
>
{{ tag.value.localName === "no-tag" ? $t("tags.no-tag") : tag.value.localName }}
{{ key === "no-tag" ? $t("tags.no-tag") : tag.value.localName }}
</b-switch>
</b-field>
</div>
......@@ -45,12 +56,19 @@ export default {
setup(props) {
const { refBoolean: open } = useBoolean();
const { refBoolean: allTags } = useBoolean(true);
function changeTag() {
this.$emit("change:tag", props.tags);
}
function changeAllTags(allTags) {
this.$emit("change:allTags", allTags);
}
return {
changeTag,
changeAllTags,
open,
allTags,
};
},
};
......
......@@ -584,7 +584,8 @@
},
"tags": {
"no-tag": "No tag",
"tag": "Tags"
"tag": "Tags",
"allTags": "All tags"
},
"titles": {
"additionalFile": "Additional Files",
......
......@@ -584,7 +584,8 @@
},
"tags": {
"no-tag": "Sans étiquette",
"tag": "Etiquettes"
"tag": "Etiquettes",
"allTags": "Toutes les étiquettes"
},
"titles": {
"additionalFile": "Fichiers additionnels",
......
......@@ -13,6 +13,7 @@
v-if="tagsColumn && Object.keys(tagsColumn).length > 1"
:tags="tagsColumn"
@change:tag="newTableWithFilterTags($event)"
@change:allTags="changeAllValueTags($event)"
/>
</div>
<div v-if="!showSort && !showFilter" class="columns">
......@@ -524,7 +525,17 @@
:colspan="colspan(variable)"
:variable="variable.id"
>
{{ variable.label }}
<div v-if="variable.tags" class="column" style="padding: 0px">
<span v-for="tag in variable.tags" :key="tag" style="margin-left: 5px">
{{ variable.label }}
<b-tag v-if="tag !== 'no-tag'" class="is-primary is-light">
{{ tag }}
</b-tag>
</span>
</div>
<div v-else class="column">
{{ variable.label }}
</div>
</th>
</tr>
<tr>
......@@ -534,7 +545,17 @@
:component="comp.component"
:variable="comp.variable"
>
{{ comp.label }}
<div v-if="comp.tags" class="column" style="padding: 0px">
<span v-for="tag in comp.tags" :key="tag" style="margin-left: 5px">
{{ comp.label }}
<b-tag v-if="tag !== 'no-tag'" class="is-primary is-light">
{{ tag }}
</b-tag>
</span>
</div>
<div v-else class="column">
{{ comp.label }}
</div>
</th>
</tr>
</thead>
......@@ -822,6 +843,15 @@ export default {
changeIsLoading(false);
}
async function changeAllValueTags(allTags) {
changeIsLoading(true);
for (let key in tagsColumn.value) {
tagsColumn.value[key].value.selected = allTags;
}
await initDatatype();
changeIsLoading(false);
}
async function init() {
changeIsLoading(true);
changeApplication(
......@@ -1575,6 +1605,7 @@ export default {
getRefsLinkedToId,
changeTagsColumn,
newTableWithFilterTags,
changeAllValueTags,
rows,
totalRows,
referenceLineCheckers,
......
......@@ -19,6 +19,7 @@
v-if="tags && Object.keys(tags).length > 1"
:tags="tags"
@change:tag="newListDataTypesWithFilterTags($event)"
@change:allTags="changeAllValueTags($event)"
/>
</div>
<AvailablityChart v-if="false" />
......@@ -140,6 +141,14 @@ export default {
return services.tagService.toBeShown(tags, dataTypes.value);
});
function changeAllValueTags(allTags) {
for (let key in tags) {
tags[key].value.selected = allTags;
}
newListDataTypesWithFilterTags();
}
async function newListDataTypesWithFilterTags() {
isSynthesisLoading.value = true;
await init();
......@@ -379,6 +388,7 @@ export default {
openDataTypeDetailSynthesisCb,
showRepository,
newListDataTypesWithFilterTags,
changeAllValueTags,
application,
subMenuPaths,
errorsMessages,
......
......@@ -14,6 +14,7 @@
v-if="tags && Object.keys(tags).length > 1"
:tags="tags"
@change:tag="newListColumnsWithFilterTags($event)"
@change:allTags="changeAllValueTags($event)"
/>
</div>
<FiltersCollapse
......@@ -60,6 +61,19 @@
:label="column.title"
sortable
>
<template v-slot:header>
<div v-if="column.tags" class="column" style="padding: 0px">
<span v-for="tag in column.tags" :key="tag" style="margin-left: 5px">
{{ column.title }}
<b-tag v-if="tag !== 'no-tag'" class="is-primary is-light">
{{ tag }}
</b-tag>
</span>
</div>
<div v-else class="column">
{{ column.title }}
</div>
</template>
<template v-slot="props">
<ReferencesDynamicLink
v-if="info(column.id)"
......@@ -84,9 +98,9 @@
:application="application"
:column-title="column.title"
:loaded-references-by-key="{}"
:pattern-checker-date="patternCheckerDateRef(application, column.title, refId)"
:reference-type="addRefLinkedTo(column.id, column.linkedTo)"
:value="props.row[column.id]"
:pattern-checker-date="patternCheckerDateRef(application, column.title, refId)"
></ReferencesLink>
<div v-else class="columns">
<a
......@@ -202,6 +216,13 @@ export default {
services.tagService.toBeShown(tags.value, columns.value)
);
function changeAllValueTags(allTags) {
for (let key in tags.value) {
tags.value[key].value.selected = allTags;
}
newListColumnsWithFilterTags();
}
async function newListColumnsWithFilterTags() {
changeIsLoading(true);
await init();
......@@ -476,6 +497,7 @@ export default {
downloadResultSearch,
newListColumnsWithFilterTags,
clear,
changeAllValueTags,
tags,
subMenuPaths,
params,
......
......@@ -31,6 +31,7 @@
v-if="tags && Object.keys(tags).length > 1"
:tags="tags"
@change:tag="newListReferencesWithFilterTags($event)"
@change:allTags="changeAllValueTags($event)"
/>
</div>
<LoadingAnimate v-if="isLoading" :size="'is-small'"></LoadingAnimate>
......@@ -125,6 +126,13 @@ export default {
return services.tagService.toBeShown(tags, references.value);
});
function changeAllValueTags(allTags) {
for (let key in tags) {
tags[key].value.selected = allTags;
}
newListReferencesWithFilterTags();
}
async function newListReferencesWithFilterTags() {
changeIsLineCountLoading(true);
await init();
......@@ -314,6 +322,7 @@ export default {
uploadReferenceCsv,
checkMessageErrors,
newListReferencesWithFilterTags,
changeAllValueTags,
buttons,
lineCountSynthesis,
tags,
......