From f4b9d6b36398675fb8cfa344dd53777df20f3e4b Mon Sep 17 00:00:00 2001 From: Pierre-Jean CHANCELLIER <paidge_cs@hotmail.com> Date: Thu, 27 Jan 2022 09:51:48 +0100 Subject: [PATCH] dele useless functions for futures_sorties --- graphql/fragmentTypes.json | 25 +-------------------- i18n/locales/en.json | 2 +- i18n/locales/es.json | 2 +- i18n/locales/fr.json | 2 +- pages/previsions/futures_sorties.vue | 33 ++-------------------------- 5 files changed, 6 insertions(+), 58 deletions(-) diff --git a/graphql/fragmentTypes.json b/graphql/fragmentTypes.json index 551fbb1..1ee79b1 100644 --- a/graphql/fragmentTypes.json +++ b/graphql/fragmentTypes.json @@ -1,24 +1 @@ -{ - "__schema": { - "types": [ - { - "kind": "UNION", - "name": "CertifOrDossier", - "possibleTypes": [ - { "name": "MarkedDatedCertification" }, - { "name": "MarkedDossier" } - ] - }, - { - "kind": "INTERFACE", - "name": "File", - "possibleTypes": [{ "name": "FileS" }] - }, - { - "kind": "INTERFACE", - "name": "WWResult", - "possibleTypes": [{ "name": "WWResultS" }] - } - ] - } -} +{"__schema":{"types":[{"kind":"UNION","name":"CertifOrDossier","possibleTypes":[{"name":"MarkedDatedCertification"},{"name":"MarkedDossier"}]},{"kind":"INTERFACE","name":"File","possibleTypes":[{"name":"FileS"}]},{"kind":"INTERFACE","name":"WWResult","possibleTypes":[{"name":"WWResultS"}]}]}} \ No newline at end of file diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 600d6c6..9cd1e74 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -80,7 +80,7 @@ "supprimer": "Delete from favourites", "title": "My favourites" }, - "futuremembers": "Future members", + "futuremembers": "Future entries", "futureexits": "Future exits", "infos": "Informations", "inout": "Entries and exits of the web of trust for the last 2 days", diff --git a/i18n/locales/es.json b/i18n/locales/es.json index 75e3c04..8de8353 100644 --- a/i18n/locales/es.json +++ b/i18n/locales/es.json @@ -80,7 +80,7 @@ "supprimer": "Eliminar de favoritos", "title": "Mis favoritos" }, - "futuremembers": "Futuros miembros", + "futuremembers": "Futuras entradas", "futureexits": "Futuras salidas", "infos": "Informaciones", "inout": "Entradas y salidas de la red de confianza en los últimos 2 dÃas", diff --git a/i18n/locales/fr.json b/i18n/locales/fr.json index 55cc52b..ddfa26d 100644 --- a/i18n/locales/fr.json +++ b/i18n/locales/fr.json @@ -80,7 +80,7 @@ "supprimer": "Supprimer des favoris", "title": "Mes favoris" }, - "futuremembers": "Futurs membres", + "futuremembers": "Futurs entrées", "futureexits": "Futures sorties", "infos": "Informations", "inout": "Entrées et sorties de la toile de confiance des 2 derniers jours", diff --git a/pages/previsions/futures_sorties.vue b/pages/previsions/futures_sorties.vue index b2b0c02..2062e55 100644 --- a/pages/previsions/futures_sorties.vue +++ b/pages/previsions/futures_sorties.vue @@ -56,9 +56,6 @@ <script> import { NEXT_EXITS } from "@/graphql/queries.js" -const day = 24 * 60 * 60 -const defaultPeriod = 30 * day - export default { data() { return { @@ -82,40 +79,14 @@ export default { }, methods: { save() { - this.error = null - localStorage.setItem("previsions_period", this.getPeriod() / day) - }, - addValue(arr, val) { - if ( - arr.filter(function (e) { - return e.uid === val.uid - }).length == 0 - ) { - arr.push(val) - } - return arr - }, - getPeriod() { - if (this.period != "") { - let tempPeriod = parseInt(this.period) - if (tempPeriod < 1) { - this.error = this.$t("error.tooSmall", [tempPeriod, 1, 30]) - return day - } - if (tempPeriod > 30) { - this.error = this.$t("error.tooBig", [tempPeriod, 1, 30]) - return 30 * day - } - return this.period * day - } - return defaultPeriod + localStorage.setItem("previsions_period", this.period) } }, apollo: { wwResult: { query: NEXT_EXITS, variables() { - return { period: this.getPeriod() } + return { period: this.period * 24 * 60 * 60 } }, update(data) { let result = { membership: [], outOfCerts: [] } -- GitLab