diff --git a/src/components/application/DetailApplicationModalCard.vue b/src/components/application/DetailApplicationModalCard.vue index feb50e86ee8b41d9c1864f5ef73f71676fcdb8bb..2efe4923bdb5879ac641039444efcc41afd82955 100644 --- a/src/components/application/DetailApplicationModalCard.vue +++ b/src/components/application/DetailApplicationModalCard.vue @@ -73,11 +73,9 @@ export default { }); const validated = computed({ get() { - let charteTimeStamp = User.STORED_AUTHENTICATED_USER()?.chartes?.[props.application.id] + let charteTimeStamp = User.STORED_AUTHENTICATED_USER()?.chartes?.[props.application.id]; if (charteTimeStamp) { - return ( - new Date().getTime() > charteTimeStamp - ); + return new Date().getTime() > charteTimeStamp; } return false; }, diff --git a/src/components/common/CollapsibleTree.vue b/src/components/common/CollapsibleTree.vue index 9885105383e4acf37ef18c6381287ca3bdcb0f30..cf8a9ff4eaecb4be71040332eea793cade1d8fac 100644 --- a/src/components/common/CollapsibleTree.vue +++ b/src/components/common/CollapsibleTree.vue @@ -227,28 +227,28 @@ export default { computed: { length() { return length; - } + }, }, components: { TagsInfos, LoadingAnimate, FontAwesomeIcon, AvailiblityChart }, props: { applicationName: String, canUpload: { type: Boolean, - default: true + default: true, }, option: Object, level: { type: Number, - default: 0 + default: 0, }, showEmpty: { value: { type: Boolean, - default: false - } + default: false, + }, }, tags: { - type: Object + type: Object, }, referenceSynthesis: Array, onClickLabelCb: Function, @@ -257,20 +257,20 @@ export default { buttons: Array, withRadios: { type: Boolean, - default: false + default: false, }, radioName: Object, repository: Object, repositoryRedirect: Function, lineCount: { type: Number, - default: 0 + default: 0, }, isLoading: Boolean, isUploading: Boolean, applicationTitle: { - type: String - } + type: String, + }, }, setup(props) { let innerOptionChecked = null; @@ -299,9 +299,9 @@ export default { displayChildren, refFile, innerOptionChecked, - updateCountLineFile + updateCountLineFile, }; - } + }, }; </script> diff --git a/src/components/datas/DatasLink.vue b/src/components/datas/DatasLink.vue index 9241686668ef6d9e6848f67b8fac68433e0f3e91..7381d00ceacef9cd277bbfd5cd5bce7f55542e7b 100644 --- a/src/components/datas/DatasLink.vue +++ b/src/components/datas/DatasLink.vue @@ -24,7 +24,7 @@ reference ? reference.localName !== value ? getValueDisplay(reference.rows[0], application) - : reference.localName + : displayValue : value }} </p> diff --git a/src/components/datas/DatasManyLink.vue b/src/components/datas/DatasManyLink.vue index 9c052dcc4b919974501bf942d6a88c9d5f36f25c..d46d4873f1bb2e852379d4f615c56d9981056b72 100644 --- a/src/components/datas/DatasManyLink.vue +++ b/src/components/datas/DatasManyLink.vue @@ -8,8 +8,8 @@ :application="application" :column-id="val.columnName" :display-value=" - displaysForRow?.[referenceType]?.[val] && typeof val !== 'number' - ? displaysForRow?.[referenceType]?.[val] + displayValuesByReferenceAndValue[referenceType + '_' + val] && typeof val !== 'number' + ? displayValuesByReferenceAndValue[referenceType + '_' + val] : val.toString() " :loaded-references-by-key="{}" @@ -62,8 +62,8 @@ import services from "@/composable/services"; import DatasLink from "@/components/datas/DatasLink.vue"; import DatasDynamicLink from "@/components/datas/DatasDynamicLink.vue"; -import { datePatternLang } from "../../composable/application/DatePattern"; -import { computed } from "vue"; +import { datePatternLang } from "@/composable/application/DatePattern"; +import { computed, inject, onMounted, ref } from "vue"; export default { name: "DatasManyLink", @@ -99,7 +99,28 @@ export default { let refValues = { active: false }; let isCardModalActive = false; let modalArrayObj = {}; + const displayValuesByReferenceAndValue = ref({}); const dataService = services.dataService; + const { getValueDisplay, getOrLoadDataByNaturalKey } = inject("reference:dataLoader"); + + onMounted(async () => { + const newValues = {}; + for (let value of props.infoValues) { + if ( + !Object.keys(displayValuesByReferenceAndValue).includes(props.referenceType + "_" + value) + ) { + let ref = await getOrLoadDataByNaturalKey(props.application, props.referenceType, value); + newValues[props.referenceType + "_" + value] = getValueDisplay( + ref.values, + props.application + ); + } + } + displayValuesByReferenceAndValue.value = { + ...displayValuesByReferenceAndValue.value, + ...newValues, + }; + }); const applicationName = computed(() => { return props.application.name; @@ -180,17 +201,6 @@ export default { return localRefValues; } - function showBtnTablDynamicColumn(tablDynamicColumn) { - let showModal = Object.entries(tablDynamicColumn) - .filter((a) => a[1]) - .map(function (a) { - let obj = {}; - obj[a[0]] = a[1]; - return obj; - }); - return showModal.length !== 0; - } - function showModal() { isCardModalActive = true; modalArrayObj = Object.entries(this.infoValues) @@ -217,7 +227,7 @@ export default { datePatternLang, dynamicColumnReferences, openReferenceDetail, - showBtnTablDynamicColumn, + displayValuesByReferenceAndValue, showModal, refValues, dataService, @@ -225,6 +235,7 @@ export default { modalArrayObj, applicationName, columnTitle, + getValueDisplay, }; }, }; diff --git a/src/composable/applications/applications.js b/src/composable/applications/applications.js index d6fa4ab7eef04bc573815737a4b5dbd346641cce..2e411b5af5bc90765854c29ca81d59bbdd9cf523 100644 --- a/src/composable/applications/applications.js +++ b/src/composable/applications/applications.js @@ -18,7 +18,6 @@ function addApplication(result) { .map((a, i) => (a.name === application.name ? i : -1)) .find((i) => i >= 0); let localApplication = applications.value; - console.log("localApplication", localApplication); if (id >= 0) { localApplication[id] = application; } else { diff --git a/src/composable/data/dataLoader.js b/src/composable/data/dataLoader.js index 46cf14601d6742e2645fa0c5d1ddc4156e3dccf2..1ab09679429b29ba8c0933bb7bbc42fdf3e93e0e 100644 --- a/src/composable/data/dataLoader.js +++ b/src/composable/data/dataLoader.js @@ -8,9 +8,10 @@ export function dataLoader(services) { if (reference) { return reference; } - if (typeof key === "string") - reference = await dataService.getDataByNaturalKey(applicationName, referenceName, key); - if (!reference) { + try { + if (typeof key === "string") + reference = await dataService.getDataByNaturalKey(applicationName, referenceName, key); + } catch (e) { return null; } reference = { @@ -48,25 +49,6 @@ export function dataLoader(services) { if (referenceLocal.values["display_" + services.internationalisationService.getLocale()]) { return referenceLocal.values["display_" + services.internationalisationService.getLocale()]; } - if ( - referenceLocal.values[ - "display_" + services.internationalisationService.getLocale() - ] - ) { - return referenceLocal.values[ - "display_" + services.internationalisationService.getLocale() - ]; - } - if ( - application && - referenceLocal.values[ - "display_" + application.configuration.applicationDescription.defaultLanguage - ] - ) { - return referenceLocal.values[ - "display_" + application.configuration.applicationDescription.defaultLanguage - ]; - } if ( application && referenceLocal.values[ diff --git a/src/locales/en.json b/src/locales/en.json index b8cbdd8f625187067a211ec1e66a9a9dd1ec42e3..1de0cb0dcb17a2431dc373f2dab9a5a7facd1b73 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -158,6 +158,7 @@ "trier": "Sort by", "trierA_z": "Name A - z", "trierRecent": "Recent date", + "trierAncien": "Old date", "trierZ_a": "Name Z - a", "version": "The current version of the application <b class=\"has-text-primary\">{applicationName}</b> is <b class=\"has-text-primary\">{version}.</b>" }, diff --git a/src/locales/fr.json b/src/locales/fr.json index 858b8b4cc7f8497887687cfd5a4284dbb98fa14b..f681fb66e56fdffdb8e91c4d0f55e16d343a7870 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -157,6 +157,7 @@ "trier": "Trier", "trierA_z": "Nom A - z", "trierRecent": "Date récente", + "trierAncien": "Date ancienne", "trierZ_a": "Nom Z - a", "version": "La version actuelle de l'application <b class=\"has-text-primary\">{applicationName}</b> est la version <b class=\"has-text-primary\">{version}.</b>" }, diff --git a/src/model/ApplicationResult.js b/src/model/ApplicationResult.js index 069e6b4bad77c8bef16335eea26031c986c70087..2acd89713c8b4879498a7b20bd62842d55214a3a 100644 --- a/src/model/ApplicationResult.js +++ b/src/model/ApplicationResult.js @@ -90,9 +90,8 @@ export class ApplicationResult { this.dependantNodesByDataName = application.dependantNodesByDataName; this.orderedReferences = application.orderedReferences; this.referenceSynthesis = application.referenceSynthesis; - let charteTimeStamp = User.STORED_AUTHENTICATED_USER()?.chartes?.[application.id] - this.hasSignedLastCharte = - new Date().getTime() > charteTimeStamp; + let charteTimeStamp = User.STORED_AUTHENTICATED_USER()?.chartes?.[application.id]; + this.hasSignedLastCharte = new Date().getTime() > charteTimeStamp; this.hasSignedCharte = charteTimeStamp; } } diff --git a/src/model/User.js b/src/model/User.js index 7bf13dcf3d8537c5d95e9867face8fce6a53a7cb..f4d9e545b571fdb79001acd7792f4d4ff85a9ffc 100644 --- a/src/model/User.js +++ b/src/model/User.js @@ -1,10 +1,10 @@ export class User { static states = { idle: false, active: true, pending: false, closed: false }; static INSTANCE = new User(); - static STORED_AUTHENTICATED_USER = function() { - let authenticatedUser = localStorage.getItem('authenticatedUser'); - return authenticatedUser?JSON.parse(authenticatedUser):{}; - } + static STORED_AUTHENTICATED_USER = function () { + let authenticatedUser = localStorage.getItem("authenticatedUser"); + return authenticatedUser ? JSON.parse(authenticatedUser) : {}; + }; id = ""; login = ""; @@ -26,9 +26,9 @@ export class User { lang = navigator.language.slice(0, 2) || "fr"; constructor(userData) { - if (!userData ) { - let user = localStorage.getItem('authenticatedUser'); - user = user?JSON.parse(user):{}; + if (!userData) { + let user = localStorage.getItem("authenticatedUser"); + user = user ? JSON.parse(user) : {}; if (!user) { return; } diff --git a/src/model/application/Component.js b/src/model/application/Component.js index 22838f5773972a51db8a09f85caf45ca678a81ec..9843901bad779001060139424f382c8c0626f410 100644 --- a/src/model/application/Component.js +++ b/src/model/application/Component.js @@ -54,16 +54,6 @@ export class Component { return row.values[this.id]; } - getDisplayValue = function (row) { - let columnValue = this.getColumnValue(row); - let displaysForRow = row.displaysForRow?.[this.refLinkedTo]?.[row.values[this.id]]; - if (displaysForRow && typeof columnValue !== "number") { - return displaysForRow; - } else { - return "" + columnValue; - } - }; - order() { let order = (this.tags || []).find( (tag) => tag.tagDefinition === "ORDER_TAG" || tag.type === "ORDER_TAG" diff --git a/src/services/TagService.js b/src/services/TagService.js index deaaa608b0bbf52982c9e171ff16fee4d6b9c39b..e3294b3ebda2aa388b5473a8cc975a777df52f8a 100644 --- a/src/services/TagService.js +++ b/src/services/TagService.js @@ -45,10 +45,7 @@ export class TagService extends Fetcher { ) { return true; } else { - return selectedTags.some( - (selectedTag) => - selectedTag.tagName === tag.tagName - ); + return selectedTags.some((selectedTag) => selectedTag.tagName === tag.tagName); } } }); diff --git a/src/views/additionalfiles/AdditionalFileInfosView.vue b/src/views/additionalfiles/AdditionalFileInfosView.vue index ecb4ee0507d1b8d19b85d2761f2580826e42bf53..84b18562000969da1e32ad43ef5248f5e5ecae14 100644 --- a/src/views/additionalfiles/AdditionalFileInfosView.vue +++ b/src/views/additionalfiles/AdditionalFileInfosView.vue @@ -477,8 +477,7 @@ export default class AdditionalFileInfosView extends Vue { this.validFile = true; this.forApplication = additionalFile.forApplication; this.currentUser = additionalFiles.users.find( - (user) => - user.id == (additionalFile.user || User.STORED_AUTHENTICATED_USER()?.id) + (user) => user.id == (additionalFile.user || User.STORED_AUTHENTICATED_USER()?.id) ); this.comment = additionalFile.comment; this.fields = Object.keys(this.format || {} || []).reduce((acc, field) => { @@ -507,8 +506,7 @@ export default class AdditionalFileInfosView extends Vue { this.canManage = this.isApplicationAdmin || (authorizations.users && - authorizations.users[0].login === - User.STORED_AUTHENTICATED_USER()?.login); + authorizations.users[0].login === User.STORED_AUTHENTICATED_USER()?.login); } else { this.fileNames = additionalFiles.fileNames; let initialValue = new Authorizations( diff --git a/src/views/application/ApplicationCreationView.vue b/src/views/application/ApplicationCreationView.vue index a873691c25289345b856d9f5ca1b6335a4e58c15..b93c1499d7515993f1a0a7f527c8c9b48fd1e41b 100644 --- a/src/views/application/ApplicationCreationView.vue +++ b/src/views/application/ApplicationCreationView.vue @@ -207,7 +207,6 @@ export default { let disabled = useBoolean().refBoolean; let counter = useNumber(1).refNumber; let isLoading = computed(() => counter.value === 0); - let regExp = /^[a-zA-Z]+$/; async function saveApplication(status) { counter.value = 0; @@ -258,10 +257,6 @@ export default { await saveApplication("validate"); } - function validNameApplication(name) { - return regExp.test(name); - } - function showHelp() { let routeData = app.$router.resolve("/help"); window.open(routeData.href, "_blank"); @@ -279,12 +274,6 @@ export default { function parseResultChunck(chunk, caller) { const response = chunk.result; if ("validate" === caller && response.name) { - console.log( - testStringWithRegexArray( - response.configuration.applicationDescription.name.toLowerCase(), - currentUser.authorizations - ) - ); if ( response.configuration.applicationDescription.name.length < 44 && (currentUser.authorizations.includes( @@ -402,7 +391,6 @@ export default { return { createApplication, - validNameApplication, changeConfiguration, showHelp, testApplication, diff --git a/src/views/application/ApplicationInfoView.vue b/src/views/application/ApplicationInfoView.vue index 1e194a7a0131f119d159c06388533f0c84d96c89..4d93a3baf2111ac4afd32adaad2298eda4a83835 100644 --- a/src/views/application/ApplicationInfoView.vue +++ b/src/views/application/ApplicationInfoView.vue @@ -21,8 +21,8 @@ export default { emits: ["setValidatedCharte"], props: { applicationName: { - type: String - } + type: String, + }, }, setup(props, ctx) { const isCardModalActive = useBoolean().refBoolean; @@ -30,7 +30,7 @@ export default { const redirection = ref(() => { app.$router.push(`/applications/${props.applicationName}`); }); - const showCharte = function(objectShowCharte) { + const showCharte = function (objectShowCharte) { if (!objectShowCharte) { return; } else { @@ -43,25 +43,23 @@ export default { get() { let chartestimeStamp = User.STORED_AUTHENTICATED_USER()?.chartes?.[props.application.id]; if (chartestimeStamp) { - return ( - new Date().getTime() > chartestimeStamp - ); + return new Date().getTime() > chartestimeStamp; } return false; }, set(bool) { bool && - services.loginService.modifAcount({ - login: User.STORED_AUTHENTICATED_USER()?.login, - email: User.STORED_AUTHENTICATED_USER()?.email, - charte: props.application.id - }); + services.loginService.modifAcount({ + login: User.STORED_AUTHENTICATED_USER()?.login, + email: User.STORED_AUTHENTICATED_USER()?.email, + charte: props.application.id, + }); bool && - ctx.emit("setValidatedCharte", { - applicationId: application.id, - validated: bool - }); - } + ctx.emit("setValidatedCharte", { + applicationId: application.id, + validated: bool, + }); + }, }); const { reactiveObject: application, doChangeObject: changeApplication } = useObject( new ApplicationResult() @@ -89,7 +87,7 @@ export default { showAdditionalFilesManagementRights, requestRights, authorizationsManagementForApplicationUsers, - showRequestRights + showRequestRights, } = useRedirections(application); onMounted(async () => { @@ -99,7 +97,7 @@ export default { "Accueil", () => app.$router.push(`/applications/${props.applicationName}`), () => app.$router.push(`/applications`) - ) + ), ]); }); @@ -111,7 +109,7 @@ export default { "DATATYPE", "CONFIGURATION", "REFERENCETYPE", - "ADDITIONALFILE" + "ADDITIONALFILE", ]) ) ); @@ -120,12 +118,12 @@ export default { localRefName: services.internationalisationService.localeReferenceNames( props.applicationName, application - ) + ), }); } catch (e) { services.alertService.toastError( i18n.t("alert.server-error-appli-no-exist", { - name: props.applicationName + name: props.applicationName, }) ); } @@ -175,9 +173,9 @@ export default { canManagerUser, canManagerApplication, url, - redirection + redirection, }; - } + }, }; </script> @@ -267,7 +265,7 @@ export default { icon-left="drafting-compass" type="is-primary" @click="showCharte(displayReferencesManagement(application))" - >{{ $t("applications.references") }} + >{{ $t("applications.references") }} </b-button> </div> <div @@ -279,7 +277,7 @@ export default { icon-left="poll" type="is-primary" @click="showCharte(displayDataSetManagement(application))" - >{{ $t("applications.dataset") }} + >{{ $t("applications.dataset") }} </b-button> </div> </div> @@ -289,7 +287,7 @@ export default { outlined type="is-warning" @click="showDataRights(application)" - >{{ $t("applications.functions.datas-rights") }} + >{{ $t("applications.functions.datas-rights") }} </b-button> </div> </b-tab-item> @@ -302,8 +300,8 @@ export default { > <template #header> <span class="rubriqueTitle">{{ - $t("applications.functions.additional-files-manage") - }}</span> + $t("applications.functions.additional-files-manage") + }}</span> </template> <div class="buttonWarper"> <b-button @@ -329,8 +327,8 @@ export default { > <template #header> <span class="rubriqueTitle">{{ - $t("applications.functions.application-manage") - }}</span> + $t("applications.functions.application-manage") + }}</span> </template> <div class="buttonWarper columns"> <b-button @@ -401,8 +399,8 @@ export default { <b-tab-item aria-description="authorization"> <template #header> <span class="rubriqueTitle">{{ - $t("applications.functions.right-requests-manage") - }}</span> + $t("applications.functions.right-requests-manage") + }}</span> </template> <div class="buttonWarper"> <b-button @@ -436,7 +434,7 @@ export default { icon-left="drafting-compass" type="is-primary" @click="showCharte(displayReferencesManagement(application))" - >{{ $t("applications.references") }} + >{{ $t("applications.references") }} </b-button> </div> <div @@ -448,7 +446,7 @@ export default { icon-left="poll" type="is-primary" @click="showCharte(displayDataSetManagement(application))" - >{{ $t("applications.dataset") }} + >{{ $t("applications.dataset") }} </b-button> </div> <div diff --git a/src/views/application/ApplicationsView.vue b/src/views/application/ApplicationsView.vue index c89943fa9e056ff7fc92412278d7f52f0d60a8a3..06916e892d7bfe1c6af9e42a670496c5a276c8ee 100644 --- a/src/views/application/ApplicationsView.vue +++ b/src/views/application/ApplicationsView.vue @@ -34,32 +34,39 @@ <div class="card-content"> <div class="content"> <b-field class="columns"> - <b-checkbox - v-model="checkboxDate" - class="column" - false-value="false" - field="name" - true-value="true" - @input="alphabeticalSort = ''" - >{{ $t("applications.trierRecent") }} - </b-checkbox> + <b-radio + v-model="alphabeticalOrDateSort" + name="DateSort" + native-value="0_9" + @input="sortedApplicationsListForDate(applications, $event)" + > + {{ $t("applications.trierRecent") }} + </b-radio> + <b-radio + v-model="alphabeticalOrDateSort" + name="DateSort" + native-value="9_0" + @input="sortedApplicationsListForDate(applications, $event)" + > + {{ $t("applications.trierAncien") }} + </b-radio> </b-field> </div> <div class="content"> <b-field class="columns"> <b-radio - v-model="alphabeticalSort" - name="alphabeticalSort" + v-model="alphabeticalOrDateSort" + name="alphabeticalOrDateSort" native-value="Az" - @input="checkboxDate = false" + @input="sortedApplicationsListForName(applications, $event)" > {{ $t("applications.trierA_z") }} </b-radio> <b-radio - v-model="alphabeticalSort" - name="alphabeticalSort" + v-model="alphabeticalOrDateSort" + name="alphabeticalOrDateSort" native-value="Za" - @input="checkboxDate = false" + @input="sortedApplicationsListForName(applications, $event)" > {{ $t("applications.trierZ_a") }} </b-radio> @@ -169,27 +176,60 @@ export default { // filtre variable const filterName = useText().refText; const selected = useBoolean().refBoolean; - const alphabeticalSort = useText().refText; + const alphabeticalOrDateSort = useText().refText; const selectedApplications = computed(() => { - let sa = applications && applications.value; + let applicationsListOrderOrFilter = applications.value; if (filterName.value.length > 2) - sa = sa.filter( + applicationsListOrderOrFilter = applicationsListOrderOrFilter.filter( (a) => a.localName.toString().toLowerCase().indexOf(filterName.value.toLowerCase()) >= 0 ); - if (checkboxDate.value === "true") sa = sa.sort((a, b) => b.creationDate - a.creationDate); - else sa = sa.sort((a, b) => b.creationDate - a.creationDate).reverse(); - if (alphabeticalSort.value === "Az") { - sa = sa.sort((a, b) => a.localName.localeCompare(b.localName)); - } else if (alphabeticalSort.value === "Za") { - sa = sa.sort((a, b) => a.localName.localeCompare(b.localName)).reverse(); - } - return sa; + return applicationsListOrderOrFilter; }); onMounted(async () => { loadApplications(["DATATYPE", "REFERENCETYPE", "CONFIGURATION", "ADDITIONALFILE"]); }); + function sortedApplicationsListForDate(localApplications, event) { + localApplications = applications.value.sort((a, b) => { + const localA = new Date( + a.updateDate[0], + a.updateDate[1] - 1, + a.updateDate[2], + a.updateDate[3], + a.updateDate[4], + a.updateDate[5], + a.updateDate[6] / 1000000 + ); + const localB = new Date( + b.updateDate[0], + b.updateDate[1] - 1, + b.updateDate[2], + b.updateDate[3], + b.updateDate[4], + b.updateDate[5], + b.updateDate[6] / 1000000 + ); + return event === "0_9" + ? localB.getTime() - localA.getTime() + : localA.getTime() - localB.getTime(); + }); + return localApplications; + } + + function sortedApplicationsListForName(localApplications, event) { + if (event === "Az") { + localApplications = localApplications.sort((a, b) => + a.localName.localeCompare(b.localName) + ); + } else if (event === "Za") { + localApplications = localApplications + .sort((a, b) => a.localName.localeCompare(b.localName)) + .reverse(); + } + return localApplications; + } + const ownApplications = computed(() => { return applications.value.filter((application) => application.isApplicationUser()); }); @@ -229,9 +269,11 @@ export default { loading, selectedName, checkboxDate, - alphabeticalSort, + alphabeticalOrDateSort, isCardModalActive, canCreateApplication, + sortedApplicationsListForDate, + sortedApplicationsListForName }; }, }; diff --git a/src/views/authorizations/AuthorizationsRightsRequestInfoView.vue b/src/views/authorizations/AuthorizationsRightsRequestInfoView.vue index 3a814140185c972aaca84f0eee3ad47766d827f5..b7717db6f06f8badac183b5843690207cf291505 100644 --- a/src/views/authorizations/AuthorizationsRightsRequestInfoView.vue +++ b/src/views/authorizations/AuthorizationsRightsRequestInfoView.vue @@ -534,10 +534,8 @@ export default { let usersId; let authenticatedUserId = User.STORED_AUTHENTICATED_USER().id; if ( - (currentUser.value.id && - currentUser.value.id !== authenticatedUserId) || - (currentUser.value[0] && - currentUser.value[0].id !== authenticatedUserId) + (currentUser.value.id && currentUser.value.id !== authenticatedUserId) || + (currentUser.value[0] && currentUser.value[0].id !== authenticatedUserId) ) { usersId = currentUser.value.id ? [currentUser.value.id, authenticatedUserId] diff --git a/src/views/authorizations/DataTypeAuthorizationsView.vue b/src/views/authorizations/DataTypeAuthorizationsView.vue index 11da1e277630abc5c85fb9730d81a6dfa3b12379..a92819727fa00793c08263c34d43777dd026a8fb 100644 --- a/src/views/authorizations/DataTypeAuthorizationsView.vue +++ b/src/views/authorizations/DataTypeAuthorizationsView.vue @@ -86,8 +86,7 @@ {{ $t("dataTypeAuthorizations.table-auth-users-all-user") }} </b-radio> </div> - <div class="column is-offset-4 is-2" - v-if="isApplicationManager"> + <div class="column is-offset-4 is-2" v-if="isApplicationManager"> <b-button icon-left="plus" outlined @@ -229,7 +228,7 @@ > <b-checkbox v-model="checkbox[auth.name + '_' + props.row.name]" - :disabled="(isApplicationManager || isUserManager)" + :disabled="isApplicationManager || isUserManager" @input="updateListUsersInAuthorization(auth, props.row.name, $event)" > {{ auth.name }} @@ -454,8 +453,9 @@ <b-checkbox v-model="checkbox[props.row.name + '_' + user.label]" :disabled=" - ((props?.row?.users || []).map((use) => use.login).length === 1 && - checkbox[props.row.name + '_' + user.label] === true) && (isApplicationManager || isUserManager) + (props?.row?.users || []).map((use) => use.login).length === 1 && + checkbox[props.row.name + '_' + user.label] === true && + (isApplicationManager || isUserManager) " @input="updateListUsersInAuthorization(props.row, user.label, $event)" > @@ -591,8 +591,7 @@ export default { const { shallowRefArray: authorizations, doChangeArray: changeAuthorizations } = useArray(); const { refBoolean: isApplicationManager, doChangeBoolean: changeIsApplicationManager } = useBoolean(false); - const { refBoolean: isUserManager, doChangeBoolean: changeIsUserManager } = - useBoolean(false); + const { refBoolean: isUserManager, doChangeBoolean: changeIsUserManager } = useBoolean(false); const { refBoolean: isDragging } = useBoolean(false); const { refBoolean: isCardModalActive } = useBoolean(false); const { refBoolean: hasAuthorizationsByUsers } = useBoolean(false); diff --git a/src/views/data/DataTableView.vue b/src/views/data/DataTableView.vue index 90d47f152cfde92b0df4140b9ac95e0258323e9d..8d71eba45c6c8c089e7f9463603599462c383ea8 100644 --- a/src/views/data/DataTableView.vue +++ b/src/views/data/DataTableView.vue @@ -135,7 +135,7 @@ :column-id="getRefColumnId(props.row, column)" :column-title="getColumnNameView(column.id, application, dataId, column)" :component="props.row" - :display-value="'' + column.getDisplayValue(props.row, column)" + :display-value="'' + loader.getValueDisplay(props.row, application)" :loaded-references-by-key="{}" :pattern-checker-date="patternCheckerDateRef(application, column.title, dataId)" :reference-type="column.refLinkedTo" @@ -593,7 +593,7 @@ export default { const ONE = Component.MULTIPLICITY_ONE; async function showModal() { - console.log()("coucu"); + console.log("coucou"); } return { @@ -634,6 +634,7 @@ export default { patternCheckerDateRef, totalRows, tableHeight, + loader, }; }, };