From 214fbd837ce521c94e4530a5fbedbb0cecc5b287 Mon Sep 17 00:00:00 2001 From: paidge <paidge_cs@hotmail.com> Date: Sun, 6 Nov 2022 21:31:52 +0100 Subject: [PATCH] =?UTF-8?q?am=C3=A9lioration=20des=20suivis=20#2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/style.scss | 2 +- components/member/Card.vue | 4 +++ components/member/Filter.vue | 2 +- components/member/List.vue | 62 ++++++++++++++++++++++++++++++------ i18n/locales/de.json | 3 +- i18n/locales/en.json | 3 +- i18n/locales/es.json | 3 +- i18n/locales/fr.json | 3 +- i18n/locales/it.json | 3 +- pages/a-propos.vue | 4 ++- pages/mes-suivis.vue | 12 +++++-- plugins/bootstrap.js | 13 ++++---- 12 files changed, 87 insertions(+), 27 deletions(-) diff --git a/assets/css/style.scss b/assets/css/style.scss index b0d1b1f..2ba1538 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -182,7 +182,7 @@ a:hover { .nav-tabs { .nav-link { - border-color: var(--txt-secondary-color); + border-color: var(--txt-primary-color); &:focus { background: var(--txt-secondary-color); diff --git a/components/member/Card.vue b/components/member/Card.vue index 9d0affe..0a513af 100644 --- a/components/member/Card.vue +++ b/components/member/Card.vue @@ -11,6 +11,10 @@ </h2> <div class="btn-group" role="group"> <button + v-if=" + $parent.registeredHash == '' || + $parent.registeredHash == hash.hash + " class="btn" :class="{ 'btn-success': $parent.registeredHash != hash.hash, diff --git a/components/member/Filter.vue b/components/member/Filter.vue index 461d927..0f9ced4 100644 --- a/components/member/Filter.vue +++ b/components/member/Filter.vue @@ -2,7 +2,7 @@ <div class="text-muted"> <p id="filterStatutTitle">{{ $t("filter.statut") }} :</p> <ul class="p-0" aria-labelledby="filterStatutTitle" role="group"> - <li class="form-check form-check-inline"> + <li class="form-check form-check-inline" v-if="type != 'certificateurs'"> <input class="form-check-input" v-model="checkedStatus" diff --git a/components/member/List.vue b/components/member/List.vue index 452a1cb..5f348ce 100644 --- a/components/member/List.vue +++ b/components/member/List.vue @@ -30,7 +30,9 @@ <th scope="col" class="td-quality d-none d-lg-table-cell p-0" - v-if="['favoris', 'search'].includes(id)" + v-if=" + ['favoris', 'search', 'certificateurs', 'certifies'].includes(id) + " @click="sort('quality')" @keyup.enter="sort('quality')"> <BtnSort @@ -42,7 +44,9 @@ <th scope="col" class="d-none d-xl-table-cell p-0" - v-if="['favoris', 'search'].includes(id)" + v-if=" + ['favoris', 'search', 'certificateurs', 'certifies'].includes(id) + " @click="sort('dispo')" @keyup.enter="sort('dispo')"> <BtnSort @@ -56,7 +60,15 @@ class="td-date d-none d-sm-table-cell p-0" @click="sort('date_membership')" @keyup.enter="sort('date_membership')" - v-if="['adhesion', 'favoris', 'search'].includes(id)"> + v-if=" + [ + 'adhesion', + 'favoris', + 'search', + 'certificateurs', + 'certifies' + ].includes(id) + "> <BtnSort fieldName="date_membership" :title=" @@ -76,7 +88,15 @@ }" @click="sort('date_certs')" @keyup.enter="sort('date_certs')" - v-if="['certif', 'favoris', 'search'].includes(id)"> + v-if=" + [ + 'certif', + 'favoris', + 'search', + 'certificateurs', + 'certifies' + ].includes(id) + "> <BtnSort fieldName="date_certs" :title=" @@ -124,7 +144,11 @@ </div> <div class="w-50 d-flex flex-column align-items-center justify-content-evenly gap-1 d-lg-none" - v-if="['favoris', 'search'].includes(id)"> + v-if=" + ['favoris', 'search', 'certificateurs', 'certifies'].includes( + id + ) + "> <BadgeStatus :membre="member" class="mw-100 text-truncate" /> <BadgeQuality :quality="member.quality.ratio" /> <BadgeDispo @@ -140,12 +164,16 @@ </td> <td class="d-none d-lg-table-cell" - v-if="['favoris', 'search'].includes(id)"> + v-if=" + ['favoris', 'search', 'certificateurs', 'certifies'].includes(id) + "> <BadgeQuality :quality="member.quality.ratio" /> </td> <td class="d-none d-xl-table-cell" - v-if="['favoris', 'search'].includes(id)"> + v-if=" + ['favoris', 'search', 'certificateurs', 'certifies'].includes(id) + "> <BadgeDispo :isDispo="member.minDatePassed" :dateDispo="member.minDate" @@ -153,7 +181,15 @@ </td> <td class="d-none d-sm-table-cell" - v-if="['adhesion', 'favoris', 'search'].includes(id)"> + v-if=" + [ + 'adhesion', + 'favoris', + 'search', + 'certificateurs', + 'certifies' + ].includes(id) + "> <BadgeDate :date="member.limitDate" /> </td> <td @@ -162,7 +198,15 @@ 'd-sm-table-cell': id == 'certif', 'd-md-table-cell': id != 'certif' }" - v-if="['certif', 'favoris', 'search'].includes(id)"> + v-if=" + [ + 'certif', + 'favoris', + 'search', + 'certificateurs', + 'certifies' + ].includes(id) + "> <BadgeDate :date="member.certsLimit" /> </td> <td class="py-1" v-if="id == 'favoris'" style="width: 60px"> diff --git a/i18n/locales/de.json b/i18n/locales/de.json index 4e8d2b4..3655a31 100644 --- a/i18n/locales/de.json +++ b/i18n/locales/de.json @@ -268,7 +268,8 @@ "certifies": "Meine Zertifizierten" }, "title": "Meine Nachfolge", - "use": "Nur meine Favoriten" + "use": "Nur meine Favoriten", + "voir_profil": "Siehe mein Profil" }, "time": { "a": "um" diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 693ad15..3a822e4 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -269,7 +269,8 @@ "certifies": "My certified members" }, "title": "My follow-ups", - "use": "My favorites only" + "use": "My favorites only", + "voir_profil": "See my profile" }, "time": { "a": "at" diff --git a/i18n/locales/es.json b/i18n/locales/es.json index 5454a67..b27e44f 100644 --- a/i18n/locales/es.json +++ b/i18n/locales/es.json @@ -269,7 +269,8 @@ "certifies": "Mis miembros certificados" }, "title": "Mis seguimientos", - "use": "Solo mis favoritos" + "use": "Solo mis favoritos", + "voir_profil": "Mira mi perfil" }, "time": { "a": "a" diff --git a/i18n/locales/fr.json b/i18n/locales/fr.json index e75ff90..f66485e 100644 --- a/i18n/locales/fr.json +++ b/i18n/locales/fr.json @@ -269,7 +269,8 @@ "certifies": "Mes certifiés" }, "title": "Mes suivis", - "use": "Mes favoris uniquement" + "use": "Mes favoris uniquement", + "voir_profil": "Voir mon profil" }, "time": { "a": "à" diff --git a/i18n/locales/it.json b/i18n/locales/it.json index ffd1322..df0b31e 100644 --- a/i18n/locales/it.json +++ b/i18n/locales/it.json @@ -269,7 +269,8 @@ "certifies": "I miei membri certificati" }, "title": "I miei follow-up", - "use": "Solo i miei favoriti" + "use": "Solo i miei favoriti", + "voir_profil": "Guarda il mio profilo" }, "time": { "a": "a" diff --git a/pages/a-propos.vue b/pages/a-propos.vue index 2f0ddbe..b4403f3 100644 --- a/pages/a-propos.vue +++ b/pages/a-propos.vue @@ -155,7 +155,9 @@ export default { methods: { chemin(contrib) { if (this.hash_contrib[contrib] != "") { - return this.localePath("/membre?hash=" + this.hash_contrib[contrib]) + return this.localePath( + "/membres/profil?hash=" + this.hash_contrib[contrib] + ) } else { return this.localePath("/") } diff --git a/pages/mes-suivis.vue b/pages/mes-suivis.vue index 65bb94b..2d2cfb1 100644 --- a/pages/mes-suivis.vue +++ b/pages/mes-suivis.vue @@ -19,7 +19,13 @@ </div> <div v-else> <div class="row"> - <div class="col"> + <div class="col text-center"> + <NuxtLink + class="btn btn-secondary mb-4" + :to="localePath('/membres/profil?hash=' + isRegistered)"> + <solid-user-circle-icon class="icon" aria-hidden="true" /> + {{ $t("suivis.voir_profil") }} + </NuxtLink> <ul class="nav nav-tabs nav-justified" id="suivis" role="tablist"> <li class="nav-item" role="presentation"> <button @@ -95,7 +101,7 @@ <div v-if="!$apollo.queries.contacts.loading"> <SuivisTableau :param="contacts.received_certifications" - type="search" /> + type="certificateurs" /> </div> </transition> </div> @@ -115,7 +121,7 @@ <div v-if="!$apollo.queries.contacts.loading"> <SuivisTableau :param="contacts.sent_certifications" - type="search" /> + type="certifies" /> </div> </transition> </div> diff --git a/plugins/bootstrap.js b/plugins/bootstrap.js index e0d381e..5c8a2ad 100644 --- a/plugins/bootstrap.js +++ b/plugins/bootstrap.js @@ -27,12 +27,11 @@ Vue.directive("tooltip", function (el, binding, vnode) { trigger: "hover" }) - vnode.context.$nextTick(() => { - var x = new MutationObserver(function (e) { - if (e[0].removedNodes) tooltip.hide() - }) - - x.observe(el.parentNode, { childList: true }) - }) + // vnode.context.$nextTick(() => { + // var x = new MutationObserver(function (e) { + // if (e[0].removedNodes) tooltip.hide() + // }) + // x.observe(el.parentNode, { childList: true }) + // }) } }) -- GitLab