From fbc03ee04b598eb85cc61651f68fbdec040f42d2 Mon Sep 17 00:00:00 2001 From: Rachid Yahiaoui <rachid.yahiaoui@inra.fr> Date: Tue, 21 Jan 2025 11:28:43 +0100 Subject: [PATCH 01/12] Improve GitLab CI : Centralized common variables for triggers --- .gitlab-ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fedb0c083..f60695ec0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -125,10 +125,15 @@ production: deployment: stage: trigger + variables: + TRIGGERED_BY_PARENT: 'true' + TRIGGERED_PROJECT_NAME: "$CI_PROJECT_NAME" + TRIGGERED_USER_NAME: "$GITLAB_USER_NAME" + TRIGGERED_PROJECT_COMMIT_ID: "[\`${CI_COMMIT_SHA:0:8}\`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" + TRIGGERED_PROJECT_BRANCH: "$CI_COMMIT_REF_NAME" rules: - if: '$CI_COMMIT_REF_SLUG == "develop"' # Development Env variables: - TRIGGERED_BY_PARENT: 'true' ENV: 'development' OA_FRONTEND_VERSION: '$CI_COMMIT_REF_SLUG' # develop branch INIT_DB_USER: true @@ -136,7 +141,6 @@ deployment: when: on_success - if: '$CI_COMMIT_REF_SLUG == "main"' # Preprod Env variables: - TRIGGERED_BY_PARENT: 'true' ENV: 'preprod' OA_FRONTEND_VERSION: '$CI_COMMIT_REF_SLUG' # main branch INIT_DB_USER: true @@ -144,7 +148,6 @@ deployment: when: on_success - if: '$CI_COMMIT_TAG' # Production Env variables: - TRIGGERED_BY_PARENT: 'true' ENV: "production" OA_FRONTEND_VERSION: '$CI_COMMIT_TAG' INIT_DB_USER: false @@ -154,7 +157,6 @@ deployment: when: never - when: manual # Trigger manually if needed ( Feature Dev branch ) variables: - TRIGGERED_BY_PARENT: 'true' ENV: "development" OA_FRONTEND_VERSION: '$CI_COMMIT_REF_SLUG' INIT_DB_USER: true -- GitLab From edc89ce0e42731ecae4f5f45fe2a8a46f27f220e Mon Sep 17 00:00:00 2001 From: Rachid Yahiaoui <rachid.yahiaoui@inra.fr> Date: Tue, 21 Jan 2025 11:30:39 +0100 Subject: [PATCH 02/12] Improve GitLab CI : Centralized common variables for triggers --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f60695ec0..ef152e7ed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -129,7 +129,7 @@ deployment: TRIGGERED_BY_PARENT: 'true' TRIGGERED_PROJECT_NAME: "$CI_PROJECT_NAME" TRIGGERED_USER_NAME: "$GITLAB_USER_NAME" - TRIGGERED_PROJECT_COMMIT_ID: "[\`${CI_COMMIT_SHA:0:8}\`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" + TRIGGERED_PROJECT_COMMIT_ID: "[`${CI_COMMIT_SHA:0:8}`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" TRIGGERED_PROJECT_BRANCH: "$CI_COMMIT_REF_NAME" rules: - if: '$CI_COMMIT_REF_SLUG == "develop"' # Development Env -- GitLab From dc1455773c6ce9f9f206254fcc6e0b4d76071bc4 Mon Sep 17 00:00:00 2001 From: Rachid Yahiaoui <rachid.yahiaoui@inra.fr> Date: Tue, 21 Jan 2025 13:31:40 +0100 Subject: [PATCH 03/12] Improve GitLab CI : Centralized common variables for triggers --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef152e7ed..9fd8677a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -129,7 +129,8 @@ deployment: TRIGGERED_BY_PARENT: 'true' TRIGGERED_PROJECT_NAME: "$CI_PROJECT_NAME" TRIGGERED_USER_NAME: "$GITLAB_USER_NAME" - TRIGGERED_PROJECT_COMMIT_ID: "[`${CI_COMMIT_SHA:0:8}`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" + # TRIGGERED_PROJECT_COMMIT_ID: "[`${CI_COMMIT_SHA:0:8}`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" + TRIGGERED_PROJECT_COMMIT_ID: "[\`${CI_COMMIT_SHA:0:8}\`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" TRIGGERED_PROJECT_BRANCH: "$CI_COMMIT_REF_NAME" rules: - if: '$CI_COMMIT_REF_SLUG == "develop"' # Development Env -- GitLab From ce263bc0165e0ec0f4d9911c52f12e9a6bd15793 Mon Sep 17 00:00:00 2001 From: Rachid Yahiaoui <rachid.yahiaoui@inra.fr> Date: Tue, 21 Jan 2025 13:42:37 +0100 Subject: [PATCH 04/12] Improve GitLab CI : Centralized common variables for triggers --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9fd8677a3..a3188b8d1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,7 +130,7 @@ deployment: TRIGGERED_PROJECT_NAME: "$CI_PROJECT_NAME" TRIGGERED_USER_NAME: "$GITLAB_USER_NAME" # TRIGGERED_PROJECT_COMMIT_ID: "[`${CI_COMMIT_SHA:0:8}`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" - TRIGGERED_PROJECT_COMMIT_ID: "[\`${CI_COMMIT_SHA:0:8}\`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" + TRIGGERED_PROJECT_COMMIT_ID: "[\\\`${CI_COMMIT_SHA:0:8}\\\`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" TRIGGERED_PROJECT_BRANCH: "$CI_COMMIT_REF_NAME" rules: - if: '$CI_COMMIT_REF_SLUG == "develop"' # Development Env -- GitLab From 79442c4e3a31ecf9a0625eb45a4171b6517562a9 Mon Sep 17 00:00:00 2001 From: Rachid Yahiaoui <rachid.yahiaoui@inra.fr> Date: Tue, 21 Jan 2025 13:43:44 +0100 Subject: [PATCH 05/12] Improve GitLab CI : Centralized common variables for triggers --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a3188b8d1..d00622399 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,7 +130,7 @@ deployment: TRIGGERED_PROJECT_NAME: "$CI_PROJECT_NAME" TRIGGERED_USER_NAME: "$GITLAB_USER_NAME" # TRIGGERED_PROJECT_COMMIT_ID: "[`${CI_COMMIT_SHA:0:8}`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" - TRIGGERED_PROJECT_COMMIT_ID: "[\\\`${CI_COMMIT_SHA:0:8}\\\`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" + TRIGGERED_PROJECT_COMMIT_ID: "[\\`${CI_COMMIT_SHA:0:8}\\`](${CI_PROJECT_URL}/-/commit/${CI_COMMIT_SHA})" TRIGGERED_PROJECT_BRANCH: "$CI_COMMIT_REF_NAME" rules: - if: '$CI_COMMIT_REF_SLUG == "develop"' # Development Env -- GitLab From 1cb12d53f47072181babb26ed36b532a87eabe30 Mon Sep 17 00:00:00 2001 From: Rachid Yahiaoui <rachid.yahiaoui@inra.fr> Date: Tue, 21 Jan 2025 14:19:02 +0100 Subject: [PATCH 06/12] Improve GitLab CI : Centralized common variables for triggers --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d00622399..22f1808b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -130,7 +130,7 @@ deployment: TRIGGERED_PROJECT_NAME: "$CI_PROJECT_NAME" TRIGGERED_USER_NAME: "$GITLAB_USER_NAME" # TRIGGERED_PROJECT_COMMIT_ID: "[`${CI_COMMIT_SHA:0:8}`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" - TRIGGERED_PROJECT_COMMIT_ID: "[\\`${CI_COMMIT_SHA:0:8}\\`](${CI_PROJECT_URL}/-/commit/${CI_COMMIT_SHA})" + TRIGGERED_PROJECT_COMMIT: "$CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA" TRIGGERED_PROJECT_BRANCH: "$CI_COMMIT_REF_NAME" rules: - if: '$CI_COMMIT_REF_SLUG == "develop"' # Development Env -- GitLab From 95faac4a00bae501fa421d1a2568458910f4918e Mon Sep 17 00:00:00 2001 From: Rachid Yahiaoui <rachid.yahiaoui@inra.fr> Date: Tue, 21 Jan 2025 14:33:24 +0100 Subject: [PATCH 07/12] Add TRIGGERED_PROJECT_COMMIT_TITLE variable to the CI/CD pipeline --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22f1808b7..e2799a73d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -129,8 +129,8 @@ deployment: TRIGGERED_BY_PARENT: 'true' TRIGGERED_PROJECT_NAME: "$CI_PROJECT_NAME" TRIGGERED_USER_NAME: "$GITLAB_USER_NAME" - # TRIGGERED_PROJECT_COMMIT_ID: "[`${CI_COMMIT_SHA:0:8}`]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA)" TRIGGERED_PROJECT_COMMIT: "$CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA" + TRIGGERED_PROJECT_COMMIT_TITLE: "$CI_COMMIT_TITLE" TRIGGERED_PROJECT_BRANCH: "$CI_COMMIT_REF_NAME" rules: - if: '$CI_COMMIT_REF_SLUG == "develop"' # Development Env -- GitLab From b89733a69d6be469f1933a3b326916752c6ecfc6 Mon Sep 17 00:00:00 2001 From: Rachid Yahiaoui <rachid.yahiaoui@inra.fr> Date: Tue, 21 Jan 2025 14:44:41 +0100 Subject: [PATCH 08/12] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e2799a73d..1a5efa14a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ image: docker:stable -# Pour l'utilisation de testcontainers +# For using Testcontainers # https://www.testcontainers.org/supported_docker_environment/continuous_integration/gitlab_ci/ services: &dind_definition - name: docker:dind -- GitLab From a829aa17954d145da2e7cbe08069ccd6d49e1594 Mon Sep 17 00:00:00 2001 From: Rachid Yahiaoui <rachid.yahiaoui@inra.fr> Date: Tue, 21 Jan 2025 14:55:10 +0100 Subject: [PATCH 09/12] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1a5efa14a..4e5160770 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ image: docker:stable -# For using Testcontainers +# For using Testcontainers : # https://www.testcontainers.org/supported_docker_environment/continuous_integration/gitlab_ci/ services: &dind_definition - name: docker:dind -- GitLab From 1e9b77cccba8f5f433d1bbe567cbb43feb1cb6ab Mon Sep 17 00:00:00 2001 From: lucile varloteaux <lucile.varloteaux@inrae.fr> Date: Fri, 24 Jan 2025 10:56:41 +0100 Subject: [PATCH 10/12] modification de tous les switch en bouton radio --- .../common/provider/FilterNumberOrDate.vue | 49 ++++++----- .../common/provider/FiltersDataCollapse.vue | 3 +- src/locales/en.json | 2 +- src/locales/fr.json | 2 +- src/main.js | 6 +- .../DataTypeAuthorizationsView.vue | 35 +++++--- src/views/data/DataTableView.vue | 83 +++++++++++-------- 7 files changed, 109 insertions(+), 71 deletions(-) diff --git a/src/components/common/provider/FilterNumberOrDate.vue b/src/components/common/provider/FilterNumberOrDate.vue index f17ca8fef..35ffc08a7 100644 --- a/src/components/common/provider/FilterNumberOrDate.vue +++ b/src/components/common/provider/FilterNumberOrDate.vue @@ -1,13 +1,24 @@ <template> <div class="inputStyle"> <b-tooltip :label="$t('dataTypeAuthorizations.interval')" position="is-right"> - <b-switch - v-model="isInterval" - size="is-small" - @click.native="changeValueSizeHeight(isInterval, isInterval ? -6 : 6)" - > - {{ isInterval ? $t("rules.for-interval") : $t("rules.for-value") }} - </b-switch> + <b-field style="margin-bottom: 1rem"> + <b-radio-button + v-model="isInterval" + :native-value="true" + size="is-small" + type="is-primary is-outlined" + > + <span>{{ $t("rules.for-interval") }}</span> + </b-radio-button> + <b-radio-button + v-model="isInterval" + :native-value="false" + size="is-small" + type="is-primary is-outlined" + > + <span>{{ $t("rules.for-value") }}</span> + </b-radio-button> + </b-field> </b-tooltip> <div v-if="isInterval" class="rows"> <InputDateInterval @@ -76,7 +87,7 @@ export default { components: { InputNumber, InputNumberInterval, InputDateInterval, InputDate }, emits: ["update:modelValue", "sizeHeight"], props: { - modelValue: Object, + modelValue: Object }, setup(props, ctx) { watch( @@ -132,7 +143,7 @@ export default { y: { pattern: "\\d", type: "date" }, M: { pattern: "\\d", type: "date" }, Z: { pattern: "[+-]\\d{4}", type: "date" }, - G: { pattern: "[AB]D", type: "date" }, + G: { pattern: "[AB]D", type: "date" } }); const { refText: inputType, doChangeText: changeInputType } = useText("text"); const { refRegex: pattern, doChangeRegex: changePattern } = useRegex(); @@ -189,14 +200,14 @@ export default { } let value = isInterval.value ? { - intervalValues: { - from: from.value, - to: to.value, - }, + intervalValues: { + from: from.value, + to: to.value } + } : { - simpleValue: from.value, - }; + simpleValue: from.value + }; ctx.emit("update:modelValue", { ...props.modelValue, type: type.value, @@ -204,7 +215,7 @@ export default { format: format.value, intervalValues: value.intervalValues, simpleValue: value.simpleValue, - isInterval: isInterval.value, + isInterval: isInterval.value }); } @@ -212,7 +223,7 @@ export default { isInterval.value = collapside; if (event) { ctx.emit("sizeHeight", { - value: event, + value: event }); } return isInterval.value; @@ -233,9 +244,9 @@ export default { fromDate, min, max, - isInterval, + isInterval }; - }, + } }; </script> diff --git a/src/components/common/provider/FiltersDataCollapse.vue b/src/components/common/provider/FiltersDataCollapse.vue index 10b5f9a97..cb0f1c625 100644 --- a/src/components/common/provider/FiltersDataCollapse.vue +++ b/src/components/common/provider/FiltersDataCollapse.vue @@ -3,7 +3,8 @@ <template #trigger="props"> <div class="card-header" role="button"> <p class="card-header-title" style="text-transform: capitalize"> - {{ $t("applications.advancedFilter") }} + <b-icon icon="sliders-h"></b-icon> + <span>{{ $t("applications.advancedFilter") }}</span> </p> <a class="card-header-icon"> <b-icon :icon="props.open ? 'chevron-up' : 'chevron-down'"></b-icon> diff --git a/src/locales/en.json b/src/locales/en.json index ad4c4992a..f15588959 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -120,7 +120,7 @@ "applications": { "actions": "Actions", "additionalFile": "Additional files", - "advancedFilter": "Advanced search", + "advancedFilter": "Filter", "app_version": "Current version of {name} is: {version}", "app_update_version": "Version of {name} proposed is: {version}", "change": "Update", diff --git a/src/locales/fr.json b/src/locales/fr.json index c2c675108..91e0d660c 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -120,7 +120,7 @@ "applications": { "actions": "Actions", "additionalFile": "Fichiers additionnels", - "advancedFilter": "Recherche avancée", + "advancedFilter": "Filtrer", "app_version": "Version actuelle de {name} est : {version}", "app_update_version": "Version de {name} proposée est : {version}", "change": "Mise à jour", diff --git a/src/main.js b/src/main.js index db8801a46..5cc374f65 100644 --- a/src/main.js +++ b/src/main.js @@ -82,7 +82,7 @@ import { faArrowRight, faExchangeAlt, faUserShield, - faCity, + faCity, faArrowsAltV, faArrowsAltH, faSlidersH, faUsers } from "@fortawesome/free-solid-svg-icons"; import { faCalendar as farCalendar, @@ -117,6 +117,10 @@ library.add( farTimesCircle ); library.add( + faArrowsAltV, + faArrowsAltH, + faUsers, + faSlidersH, faUsersCog, faUserShield, faLink, diff --git a/src/views/authorizations/DataTypeAuthorizationsView.vue b/src/views/authorizations/DataTypeAuthorizationsView.vue index ea6054af7..8295e675c 100644 --- a/src/views/authorizations/DataTypeAuthorizationsView.vue +++ b/src/views/authorizations/DataTypeAuthorizationsView.vue @@ -22,19 +22,28 @@ <div class="row"> <div class="columns" style="margin: 0"> <div class="column is-2"> - <b-switch - v-model="hasAuthorizationsByUsers" - :disabled="hasPublicAuthorizations" - passive-type="is-dark" - type="is-primary" - @input="updateTableAuthorizations" - > - {{ - hasAuthorizationsByUsers - ? $t("dataTypeAuthorizations.table-auth-users") - : $t("dataTypeAuthorizations.table-auth-name") - }} - </b-switch> + <b-field> + <b-radio-button + v-model="hasAuthorizationsByUsers" + :disabled="hasPublicAuthorizations" + :native-value="true" + type="is-primary is-outlined" + @input="updateTableAuthorizations" + > + <b-icon icon="users"></b-icon> + <span>{{ $t("dataTypeAuthorizations.table-auth-users") }}</span> + </b-radio-button> + <b-radio-button + v-model="hasAuthorizationsByUsers" + :disabled="hasPublicAuthorizations" + :native-value="false" + type="is-primary is-outlined" + @input="updateTableAuthorizations" + > + <b-icon icon="key"></b-icon> + <span>{{ $t("dataTypeAuthorizations.table-auth-name") }}</span> + </b-radio-button> + </b-field> </div> <div class="column is-2"> <b-checkbox diff --git a/src/views/data/DataTableView.vue b/src/views/data/DataTableView.vue index 9d3f83848..2c3a59536 100644 --- a/src/views/data/DataTableView.vue +++ b/src/views/data/DataTableView.vue @@ -8,9 +8,9 @@ /> <TitleAndDescription :application="application" + :local-title="$t('titles.references-data', { refName: application.localRefName })" :localDescription="application.localRefDescription" :localName="application.localRefName" - :local-title="$t('titles.references-data', { refName: application.localRefName })" /> <div id="tagsCollapsereal" class="column"> <TagsCollapse @@ -33,22 +33,35 @@ /> <LoadingAnimate v-if="isLoading" :size="'is-large'"></LoadingAnimate> <div v-if="data && dataColumnsToBeShown && !isLoading && totalRows > 0"> - <b-switch v-if="canHorizontalize" v-model="horizontalDisplay" @input="changeDisplay"> - {{ - horizontalDisplay - ? $t("dataTypesManagement.horizontalized") - : $t("dataTypesManagement.verticalized") - }} - </b-switch> + <b-field v-if="canHorizontalize"> + <b-radio-button + v-model="horizontalDisplay" + :native-value="true" + type="is-dark" + @input="changeDisplay" + > + <b-icon icon="arrows-alt-h"></b-icon> + <span>{{ $t("dataTypesManagement.horizontalized") }}</span> + </b-radio-button> + <b-radio-button + v-model="horizontalDisplay" + :native-value="false" + type="is-dark" + @input="changeDisplay" + > + <b-icon icon="arrows-alt-v"></b-icon> + <span>{{ $t("dataTypesManagement.verticalized") }}</span> + </b-radio-button> + </b-field> <b-table id="filtreTable" :current-page="currentPage" :data="rows" + :height="tableHeight" :is-focusable="true" :is-hoverable="true" :per-page="params.limit" :sticky-header="true" - :height="tableHeight" striped style="padding-bottom: 20px; position: relative; z-index: 2" > @@ -56,8 +69,8 @@ v-for="column in dataColumnsToBeShown" :key="column.id" :field="column.id" - style="padding-bottom: 20px; position: relative; z-index: 2" sortable + style="padding-bottom: 20px; position: relative; z-index: 2" > <template v-slot:header> <div v-if="column.tags" class="column" style="padding: 0"> @@ -68,28 +81,28 @@ </TagsInfos> <DatasPatternLink v-if="'PatternComponent' === column.type" - :with-qualifier="horizontalDisplay" - :info="column.type === 'PatternComponent'" :application="application" - :value=" + :column-id="column.id" + :column-title="column.id" + :data-id="dataId" + :info="column.type === 'PatternComponent'" + :info-values=" column.getColumnQualifiersMap( application, column.horizontalDisplay ? dataId : column.componentKey, rows[0] ) " - :column-id="column.id" - :column-title="column.id" - :info-values=" + :loaded-references-by-key="{}" + :pattern-checker-date-ref="patternCheckerDateRef" + :value=" column.getColumnQualifiersMap( application, column.horizontalDisplay ? dataId : column.componentKey, rows[0] ) " - :loaded-references-by-key="{}" - :pattern-checker-date-ref="patternCheckerDateRef" - :data-id="dataId" + :with-qualifier="horizontalDisplay" ></DatasPatternLink> <div v-else-if="'patternQualifierComponent' === column.type"> {{ column.getHeader(application, dataId) }} @@ -127,8 +140,8 @@ :column="column" :column-id="column.id" :component="props.row" - :info-values="props.row.values[column.id]" :displays-for-row="props.row.displaysForRow" + :info-values="props.row.values[column.id]" :loaded-references-by-key="{}" :multiplicity="multiplicity(column.id, props.row.values[column.id])" :reference-type="addRefLinkedTo(column.id, column.linkedTo)" @@ -168,7 +181,7 @@ </b-table> </div> <div v-else> - <b-message type="is-primary" :closable="false" size="is-medium" has-icon> + <b-message :closable="false" has-icon size="is-medium" type="is-primary"> {{ $tc("applications.register-rows", totalRows, { totalRows: totalRows }) }} </b-message> </div> @@ -176,17 +189,17 @@ <div class="buttons" style="margin-top: 16px"> <!-- <b-button @click="loadExampleData">Afficher un exemple</b-button>--> <b-button + icon-left="download" style="margin-bottom: 15px; float: right" type="is-primary" - icon-left="download" @click.prevent="downloadResultSearch" - >{{ $t("dataTable.donwload-result") }} + >{{ $t("dataTable.donwload-result") }} </b-button> </div> </div> <div v-else-if="state === 'NO-RIGHTS'"> - <b-message type="is-danger" :closable="false" size="is-medium" has-icon> + <b-message :closable="false" has-icon size="is-medium" type="is-danger"> {{ $t("applications.no-right-for-application") }} </b-message> <b-button @@ -198,7 +211,7 @@ </b-button> </div> <div v-else> - <b-message type="is-primary" :closable="false" size="is-medium" has-icon> + <b-message :closable="false" has-icon size="is-medium" type="is-primary"> {{ $tc("applications.register-rows", totalRows, { totalRows: totalRows }) }} </b-message> </div> @@ -239,7 +252,7 @@ export default { name: "DataTableView", props: { applicationName: String, - dataId: String, + dataId: String }, components: { TitleAndDescription, @@ -252,7 +265,7 @@ export default { TagsCollapse, DatasLink, DatasManyLink, - DatasDynamicLink, + DatasDynamicLink }, setup(props) { const loadExample = ref(true); @@ -334,7 +347,7 @@ export default { }); const hasTags = useBoolean(false).refBoolean; - const changeTags = function (tagsToChange) { + const changeTags = function(tagsToChange) { _changeTags({ ...tagsToChange }); hasTags.value = tags.value && @@ -397,7 +410,7 @@ export default { `/applications/${props.applicationName}/${dataIsType}/${props.dataId}` ), () => app.$router.push(`/applications/${props.applicationName}/${dataIsType}`) - ), + ) ]); changeColumns(services.tagService.toBeShown(tags.value, columns.value)); changeTags(buildTagsColumns(application, columns.value, tags.value)); @@ -409,14 +422,14 @@ export default { changeApplication( await services.applicationService.getApplication(props.applicationName, [ "CONFIGURATION", - "REFERENCETYPE", + "REFERENCETYPE" ]) ); changeApplication({ ...services.internationalisationService.mergeInternationalization(application), localRefName: application.configuration.i18n.data[props.dataId].i18n.title[locale], localRefDescription: - application.configuration.i18n.data[props.dataId].i18n.description[locale], + application.configuration.i18n.data[props.dataId].i18n.description[locale] }); totalRows.value = application.referenceSynthesis.find( @@ -428,7 +441,7 @@ export default { { horizontalDisplay: horizontalDisplay.value, offset: params.offset, - limit: params.limit, + limit: params.limit }, loadExample.value ); @@ -533,7 +546,7 @@ export default { .reduce((accumulator, component) => { accumulator.push(component); return accumulator; - }, []), + }, []) ]; changeColumns(localColumns); if (rows.value) { @@ -737,9 +750,9 @@ export default { tableHeight, loader, canHorizontalize, - horizontalDisplay, + horizontalDisplay }; - }, + } }; </script> <style lang="scss" scoped> -- GitLab From a0217f595d62f1ea0d51036eb07f68833485fc57 Mon Sep 17 00:00:00 2001 From: lucile varloteaux <lucile.varloteaux@inrae.fr> Date: Fri, 24 Jan 2025 11:00:46 +0100 Subject: [PATCH 11/12] correction erreur orthographe --- src/locales/fr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/fr.json b/src/locales/fr.json index 91e0d660c..8b54fd9ba 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -971,7 +971,7 @@ "integer": "Le champ doit correspondre à une valeur entière", "regexp": "Le champ doit correspondre à l'expression régulière {pattern}", "not-null": "Le champ ne doit pas être vide", - "for-interval": "par interval", + "for-interval": "par intervalle", "for-value": "par valeur" }, "tags": { -- GitLab From b7c87566f6a17b8820b2670aa5b3cd1676d934f6 Mon Sep 17 00:00:00 2001 From: lucile varloteaux <lucile.varloteaux@inrae.fr> Date: Fri, 24 Jan 2025 11:28:22 +0100 Subject: [PATCH 12/12] modification de la position du btn authorization --- src/components/common/TitleAndDescription.vue | 49 ++++++++++++++++++- .../common/provider/FilterNumberOrDate.vue | 8 +-- src/views/data/DatasManagementView.vue | 19 ++----- 3 files changed, 56 insertions(+), 20 deletions(-) diff --git a/src/components/common/TitleAndDescription.vue b/src/components/common/TitleAndDescription.vue index 60658e20e..6c5fb0d5a 100644 --- a/src/components/common/TitleAndDescription.vue +++ b/src/components/common/TitleAndDescription.vue @@ -1,4 +1,6 @@ <script> +import app from "@/main"; + export default { name: "TitleAndDescription", props: { @@ -6,6 +8,35 @@ export default { localName: String, localDescription: String, localTitle: String, + applicationName: { + type: String, + required: false, + }, + withAuth: { + type: Boolean, + required: false, + }, + canCreateApplication: { + type: Boolean, + required: false, + }, + canManagerApplication: { + type: Boolean, + required: false, + }, + canManagerUser: { + type: Boolean, + required: false, + }, + }, + setup(props) { + function consultAuthorization() { + app.$router.push(`/applications/${props.applicationName}/authorizations`); + } + + return { + consultAuthorization, + }; }, }; </script> @@ -15,7 +46,7 @@ export default { <slot name="label" v-bind:option="application"> {{ localTitle || localName }} </slot> - <slot name="description" v-bind:option="application" v-if="localDescription"> + <slot v-if="localDescription" name="description" v-bind:option="application"> <sup style="font-size: 1.5em"> <b-tooltip :label="$t('applications.description', { localDescription: localDescription })" @@ -25,10 +56,24 @@ export default { </b-tooltip> </sup> </slot> + <slot + v-if="canCreateApplication || canManagerApplication || canManagerUser" + class="btn_auth_tooltip" + > + <b-tooltip :label="$t('dataTypesManagement.consult-authorization')" position="is-top"> + <b-button + icon-left="key" + outlined + rounded + type="is-warning" + @click="consultAuthorization" + /> + </b-tooltip> + </slot> </h1> </template> -<style scoped lang="scss"> +<style lang="scss" scoped> .icon { vertical-align: text-top; } diff --git a/src/components/common/provider/FilterNumberOrDate.vue b/src/components/common/provider/FilterNumberOrDate.vue index 35ffc08a7..7de432294 100644 --- a/src/components/common/provider/FilterNumberOrDate.vue +++ b/src/components/common/provider/FilterNumberOrDate.vue @@ -4,19 +4,19 @@ <b-field style="margin-bottom: 1rem"> <b-radio-button v-model="isInterval" - :native-value="true" + :native-value="false" size="is-small" type="is-primary is-outlined" > - <span>{{ $t("rules.for-interval") }}</span> + <span>{{ $t("rules.for-value") }}</span> </b-radio-button> <b-radio-button v-model="isInterval" - :native-value="false" + :native-value="true" size="is-small" type="is-primary is-outlined" > - <span>{{ $t("rules.for-value") }}</span> + <span>{{ $t("rules.for-interval") }}</span> </b-radio-button> </b-field> </b-tooltip> diff --git a/src/views/data/DatasManagementView.vue b/src/views/data/DatasManagementView.vue index 59c67ea74..bc7350614 100644 --- a/src/views/data/DatasManagementView.vue +++ b/src/views/data/DatasManagementView.vue @@ -19,21 +19,12 @@ " :localDescription="application.localDescription" :localName="application.localName" + :with-auth="true" + :can-create-application="canCreateApplication" + :can-manager-application="canManagerApplication" + :can-manager-user="canManagerUser" + :application-name="applicationName" /> - <div - v-if="canCreateApplication || canManagerApplication || canManagerUser" - class="btn_auth_tooltip" - > - <b-tooltip :label="$t('dataTypesManagement.consult-authorization')" position="is-top"> - <b-button - icon-left="key" - outlined - rounded - type="is-warning" - @click="consultAuthorization" - /> - </b-tooltip> - </div> <div v-if="errorsMessages.length !== 0" style="margin: 10px"> <ShowErrors :errors-messages="errorsMessages" -- GitLab