diff --git a/assets/css/style.scss b/assets/css/style.scss index 18e78744a80c6e0d7e2a6a71cba28e66aef1ccdf..591a6cd7d5080c0b5a7fb284228fc2a022b5b913 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -51,3 +51,9 @@ $info: #0a8299; thead.sortable th { cursor: pointer; } + +.table { + tbody tr > * { + vertical-align: middle; + } +} diff --git a/components/badge/Date.vue b/components/badge/Date.vue index c3f44dd7cc236953f3feb6b6423817d6b2f7ce7d..6c29157e6f2199095f935bd43d3422fa15772247 100644 --- a/components/badge/Date.vue +++ b/components/badge/Date.vue @@ -1,9 +1,7 @@ <template> - <small> - <span class="badge" :class="'badge-' + $options.filters.dateStatus(date)"> - {{ date == 0 ? "N/A" : $d(new Date(date * 1000), styleDate) }} - </span> - </small> + <span class="badge" :class="'badge-' + $options.filters.dateStatus(date)"> + {{ date == 0 ? "N/A" : $d(new Date(date * 1000), styleDate) }} + </span> </template> <script> diff --git a/components/member/List.vue b/components/member/List.vue index 6cf81b645b60a64b3f0c2e9a1db9cadfca85b984..ad0d665fa45b555f62332279220ab60a2ede29bc 100644 --- a/components/member/List.vue +++ b/components/member/List.vue @@ -38,14 +38,23 @@ <tbody> <tr v-for="member in membersSorted" :key="member.uid"> <th scope="row" @click="redirect(member.hash)"> - <span v-if="$favourites.list.includes(member.uid)">★ </span - >{{ member.uid }} - <BadgeDanger - :limitDate=" - Math.min(member.received_certifications.limit, member.limitDate) - " - :memberStatus="member.status" /> + <div> + <span v-if="$favourites.list.includes(member.uid)">★ </span + >{{ member.uid }} + <BadgeDanger + :limitDate=" + Math.min( + member.received_certifications.limit, + member.limitDate + ) + " + :memberStatus="member.status" /> + </div> <BadgeStatus :membre="member" /> + <BadgeDispo + :isDispo="member.minDatePassed" + :dateDispo="member.minDate" + v-if="member.status == 'MEMBER'" /> </th> <td class="d-none d-md-table-cell" @@ -63,7 +72,7 @@ " styleDate="long" /> </td> - <td class="py-1 text-center"> + <td class="py-1 text-center" :title="$t('favoris.supprimer')"> <button class="btn btn-danger" v-if="$favourites.list.includes(member.uid)" diff --git a/graphql/queries.js b/graphql/queries.js index 1aae22226bd331751aad2f95e26e1c6329d6c4e0..c15bb369f36fd1e33bd0653f334781a8b75f14e5 100644 --- a/graphql/queries.js +++ b/graphql/queries.js @@ -23,6 +23,8 @@ export const LAST_EVENTS = gql` uid status hash + minDatePassed + minDate limitDate history { __typename @@ -87,6 +89,8 @@ export const SEARCH_MEMBERS = gql` pubkey uid status + minDate + minDatePassed hash limitDate received_certifications { @@ -200,6 +204,8 @@ export const FAVORIS = gql` status hash limitDate + minDatePassed + minDate received_certifications { __typename limit @@ -210,12 +216,14 @@ export const FAVORIS = gql` // Pour la page index export const NEXT_EXITS = gql` query NextExits($group: [String!], $start: Int64, $period: Int64) { - memEnds (group: $group, startFromNow: $start, period: $period) { + memEnds(group: $group, startFromNow: $start, period: $period) { __typename pubkey uid status hash + minDatePassed + minDate limitDate received_certifications { __typename diff --git a/i18n/locales/en.json b/i18n/locales/en.json index bb96d8ae5b691be3cdc0ed08a21862ba08ffe04f..ad003f2a3ddeff07538d37c22e77315a7b5c2f39 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -66,6 +66,7 @@ "enregistre": "Saved to favorites !", "none": "You don't have any favorites yet", "supprime": "Deleted from favourites !", + "supprimer": "Delete from favourites", "title": "My favourites" }, "futuremembers": "Future members", diff --git a/i18n/locales/es.json b/i18n/locales/es.json index 24591902be319196d2b4c20f23bf2b99ecf54a32..ea6f6846bd58b44fae8abaeb3a335808864934d9 100644 --- a/i18n/locales/es.json +++ b/i18n/locales/es.json @@ -66,6 +66,7 @@ "enregistre": "¡Guardado en favoritos!", "none": "Aún no tienes favoritos", "supprime": "¡Eliminado de favoritos!", + "supprimer": "Eliminar de favoritos", "title": "Mis favoritos" }, "futuremembers": "Futuros miembros", diff --git a/i18n/locales/fr.json b/i18n/locales/fr.json index cae2dd1481efbd298ab09da79e6595d6f2a6256f..6e1812c8d8774173e6b0fc9cd3a1cb7d072e1eaa 100644 --- a/i18n/locales/fr.json +++ b/i18n/locales/fr.json @@ -66,6 +66,7 @@ "enregistre": "Enregistré dans les favoris !", "none": "Vous n'avez pas encore de favoris", "supprime": "Supprimé des favoris !", + "supprimer": "Supprimer des favoris", "title": "Mes favoris" }, "futuremembers": "Futurs membres", diff --git a/pages/membres/index.vue b/pages/membres/index.vue index 480e75fc65181ff0acad38bef1b0c1ac64050ea8..28c4d5c047eadd2c3563f7e48d153a5b0ba8d4e7 100644 --- a/pages/membres/index.vue +++ b/pages/membres/index.vue @@ -2,7 +2,7 @@ <main class="container"> <h2 class="text-center my-5 font-weight-light">{{ $t("membres") }}</h2> <div class="row mb-4"> - <div class="col-6 m-auto text-center"> + <div class="col-sm-8 col-md-6 col-lg-5 m-auto text-center"> <label for="rech" class="form-label">{{ $t("recherche.title") }}</label> <input type="text" @@ -27,8 +27,8 @@ v-if=" idSearch && param.length > 2 && !$apollo.queries.idSearch.loading "> - <div class="col-8 m-auto"> - <MemberList :members="idSearch.ids" :displayDate="false" /> + <div class="col-lg-9 col-xl-8 m-auto"> + <MemberList :members="idSearch.ids" /> </div> </div> </transition>