Skip to content
Snippets Groups Projects
Commit 7c3c4cc0 authored by poka's avatar poka Committed by Pierre-Jean CHANCELLIER
Browse files

Add certifications numbers

parent 92c84fe3
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ build/Release ...@@ -37,6 +37,7 @@ build/Release
# Dependency directories # Dependency directories
node_modules/ node_modules/
jspm_packages/ jspm_packages/
package-lock.json
# TypeScript v1 declaration files # TypeScript v1 declaration files
typings/ typings/
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
## Build Setup ## Build Setup
```bash ```bash
# use node 16
$ nvm use 16
# install dependencies # install dependencies
$ npm install $ npm install
......
...@@ -39,14 +39,7 @@ export default { ...@@ -39,14 +39,7 @@ export default {
}, },
getMediaPreference() { getMediaPreference() {
const hasDarkPreference = window.matchMedia( return localStorage.getItem("user-theme");
"(prefers-color-scheme: dark)"
).matches;
if (hasDarkPreference) {
return "dark-theme";
} else {
return "light-theme";
}
}, },
}, },
}; };
......
...@@ -27,14 +27,14 @@ export default { ...@@ -27,14 +27,14 @@ export default {
type: String, type: String,
required: true, required: true,
validator: function (value) { validator: function (value) {
const types = ['recieved','sent'] const types = ['received','sent']
return types.indexOf(value) !== -1 return types.indexOf(value) !== -1
} }
} }
}, },
methods : { methods : {
getNeighbor(certif) { getNeighbor(certif) {
return this.type == "recieved" ? certif.from : certif.to return this.type == "received" ? certif.from : certif.to
} }
}, },
computed : { computed : {
......
This diff is collapsed.
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
</div> </div>
<div class="row mt-3" v-if="idFromHash.status != 'REVOKED'"> <div class="row mt-3" v-if="idFromHash.status != 'REVOKED'">
<div class="col-12 col-md-6 mb-3"> <div class="col-12 col-md-6 mb-3">
<h3>{{ $t('certifications.recues') }} <h3>{{ $t('certifications.recues') }} ({{ idFromHash.received_certifications.certifications.length }})
<BadgeCertifStatus :limitDate="idFromHash.received_certifications.limit" :memberStatus="idFromHash.status" /> <BadgeCertifStatus :limitDate="idFromHash.received_certifications.limit" :memberStatus="idFromHash.status" />
</h3> </h3>
<CertifList :certifs="idFromHash.received_certifications.certifications" type="recieved" /> <CertifList :certifs="idFromHash.received_certifications.certifications" type="received" />
</div> </div>
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<h3>{{ $t('certifications.envoyees') }}</h3> <h3>{{ $t('certifications.envoyees') }} ({{ idFromHash.sent_certifications.length }})</h3>
<CertifList :certifs="idFromHash.sent_certifications" type="sent" /> <CertifList :certifs="idFromHash.sent_certifications" type="sent" />
</div> </div>
</div> </div>
...@@ -30,8 +30,10 @@ ...@@ -30,8 +30,10 @@
<script> <script>
import {SEARCH_MEMBER} from "@/graphql/queries" import {SEARCH_MEMBER} from "@/graphql/queries"
import CertifStatus from '~/components/badge/CertifStatus.vue';
export default { export default {
components: { CertifStatus },
data() { data() {
// Variables locales // Variables locales
return { return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment