merge master in 803-community-selection-page-of-registration-process-2

This commit is contained in:
ogerly 2021-09-28 18:41:16 +02:00
commit 173dac51b1
10 changed files with 187 additions and 23 deletions

View File

@ -0,0 +1,7 @@
{
"community": [
{"id": 1, "name": "Community 1", "location": "Ort 1", "description":"description 1 description 1 description 1 description 1 description 1 description 1 description 1 ", "url": "http://localhost:3000/vue/"},
{"id": 2, "name": "Community 2", "location": "Ort 2", "description":"description 2 description 2 description 2 description 2 description 2 description 2 description 2 ", "url": "https://stage1.gradido.net/vue/"},
{"id": 3, "name": "Community 3", "location": "Ort 3", "description":"description 3 description 3 description 3 description 3 description 3 description 3 description 3 ", "url": "https://gdd1.gradido.net/vue/"}
]
}

View File

@ -1,14 +1,21 @@
{
"back": "Zurück",
"community": "Gemeinschaft",
"communitys": {
"form": {
"date_period": "Datum / Zeitraum",
"hours": "Stunden",
"hours_report": "Stundenbericht",
"more_hours": "weitere Stunden",
"submit": "Einreichen"
}
"community": {
"choose-another-aommunity": "Eine andere Gemeinschaft auswählen",
"community": "Gemeinschaft",
"communitys": {
"form": {
"date_period": "Datum / Zeitraum",
"hours": "Stunden",
"hours_report": "Stundenbericht",
"more_hours": "weitere Stunden",
"submit": "Einreichen"
}
},
"continue-to-registration": "weiter zur Registrierung",
"current-community": "Aktuelle Gemeinschaft",
"other-communities": "weitere Gemeinschaften",
"switch-to-this-community": "zu dieser Gemeinschaft wechseln"
},
"decay": {
"calculation_decay": "Berechnung der Vergänglichkeit",
@ -19,7 +26,6 @@
"decayStart": " - Startblock für Vergänglichkeit am: ",
"decay_introduced": "Die Vergänglichkeit wurde Eingeführt am ",
"decay_since_last_transaction": "Vergänglichkeit seit der letzten Transaktion",
"fromCommunity": "Aus der Gemeinschaft",
"hours": "Stunden",
"last_transaction": "Letzte Transaktion",
"minutes": "Minuten",

View File

@ -1,14 +1,21 @@
{
"back": "Back",
"community": "Community",
"communitys": {
"form": {
"date_period": "Date / Period",
"hours": "hours",
"hours_report": "Hourly report",
"more_hours": "more hours",
"submit": "submit"
}
"community": {
"choose-another-aommunity": "Choose another community",
"community": "Community",
"communitys": {
"form": {
"date_period": "Date / Period",
"hours": "hours",
"hours_report": "Hourly report",
"more_hours": "more hours",
"submit": "submit"
}
},
"continue-to-registration": "Continue to registration",
"current-community": "Current community",
"other-communities": "Other communities",
"switch-to-this-community": "switch to this community"
},
"decay": {
"calculation_decay": "Calculation of Decay",
@ -19,7 +26,6 @@
"decayStart": " - Starting block for decay at: ",
"decay_introduced": "Decay was Introduced on",
"decay_since_last_transaction": "Decay since the last transaction",
"fromCommunity": "From the community",
"hours": "Hours",
"last_transaction": "Last transaction:",
"minutes": "Minutes",

View File

@ -36,7 +36,7 @@ const routes = [
path: '/thx/:comingFrom',
component: () => import('../views/Pages/thx.vue'),
beforeEnter: (to, from, next) => {
const validFrom = ['password', 'reset', 'register']
const validFrom = ['password', 'reset', 'register', 'community']
if (!validFrom.includes(from.path.split('/')[1])) {
next({ path: '/login' })
} else {
@ -48,6 +48,14 @@ const routes = [
path: '/password',
component: () => import('../views/Pages/ForgotPassword.vue'),
},
{
path: '/regist-community',
component: () => import('../views/Pages/RegisterCommunity.vue'),
},
{
path: '/select-community',
component: () => import('../views/Pages/RegisterSelectCommunity.vue'),
},
{
path: '/reset/:optin',
component: () => import('../views/Pages/ResetPassword.vue'),

View File

@ -68,6 +68,14 @@ export const store = new Vuex.Store({
description: '',
token: null,
newsletterState: null,
community_name: 'Community 1',
community: {
name: 'Community 1',
name2: 'Community 1',
location: 'Ort 1',
description:
'description 1 description 1 description 1 description 1 description 1 description 1',
},
},
getters: {},
// Syncronous mutation of the state

View File

@ -21,6 +21,12 @@
<div class="text-center text-muted mb-4">
<small>{{ $t('login') }}</small>
</div>
<div class="text-center text-muted mb-4">
{{ $store.state.community_name }}
</div>
<div class="text-center text-muted mb-4">
{{ $store.state.community.description }}
</div>
<validation-observer ref="observer" v-slot="{ handleSubmit }">
<b-form @submit.stop.prevent="handleSubmit(onSubmit)">
<input-email v-model="form.email"></input-email>
@ -44,7 +50,7 @@
</router-link>
</b-col>
<b-col cols="6" class="text-right" v-show="allowRegister">
<router-link to="/register">
<router-link to="/regist-community">
{{ $t('site.login.new_wallet') }}
</router-link>
</b-col>

View File

@ -1,5 +1,24 @@
<template>
<div id="registerform">
<div class="justify-content-center container">
<b-card
bg-variant="info"
text-variant=""
:header="$store.state.community_name"
class="text-center"
>
<b-card-text>
{{ $store.state.community.description }}, Location:
{{ $store.state.community.location }}
</b-card-text>
</b-card>
</div>
<div class="text-center py-lg-4">
<router-link to="/select-community" class="mt-3">
{{ $t('community.choose-another-aommunity') }}
</router-link>
</div>
<!-- Header -->
<div class="header p-4">
<b-container class="container">
@ -13,9 +32,11 @@
</div>
</b-container>
</div>
<!-- Page content -->
<b-container class="mt--8 p-1">
<!-- Table -->
<b-row class="justify-content-center">
<b-col lg="6" md="8">
<b-card no-body class="border-0" style="background-color: #ebebeba3 !important">

View File

@ -0,0 +1,44 @@
<template>
<div id="register-select-community">
<b-container class="container text-center">
<div class="justify-content-center container">
<b-card
bg-variant="info"
text-variant=""
:header="$store.state.community_name"
class="text-center"
>
<b-card-text>
{{ $store.state.community.description }}, Location:
{{ $store.state.community.location }}
</b-card-text>
<b-button size="sm" to="/register">
{{ $t('community.continue-to-registration') }}
</b-button>
</b-card>
</div>
<hr />
<div class="text-center py-lg-4">
<router-link to="/select-community" class="mt-3">
{{ $t('community.choose-another-aommunity') }}
</router-link>
</div>
<hr />
<div class="text-center py-lg-4">
<router-link to="/login" class="mt-3">{{ $t('back') }}</router-link>
</div>
</b-container>
</div>
</template>
<script>
export default {
name: 'registerSelectCommunity',
data() {
return {}
},
methods: {},
}
</script>
<style></style>

View File

@ -0,0 +1,58 @@
<template>
<div id="register-select-community">
<b-container class="justify-content-center text-center">
<div class="mb-4">{{ $t('community.current-community') }}</div>
<div v-for="community in communitys.community" :key="community.id" class="pb-3">
<b-card
v-show="community.name === $store.state.community_name"
bg-variant="success"
text-variant=""
:header="community.name"
>
<b-card-text>
{{ $store.state.community.description }}, Location:
{{ $store.state.community.location }}
</b-card-text>
<b-button size="sm" to="/register">
{{ $t('community.continue-to-registration') }}
</b-button>
</b-card>
</div>
<hr />
<div>{{ $t('community.other-communities') }}</div>
<div v-for="community in communitys.community" :key="community.id" class="pb-5">
<b-card
v-show="community.name != $store.state.community_name"
bg-variant="info"
text-variant=""
:header="community.name"
>
<b-card-text>beschreibung für community 1, Location:</b-card-text>
<b-button size="sm" :href="community.url">
{{ $t('community.switch-to-this-community') }}
</b-button>
</b-card>
</div>
<hr />
<div class="text-center py-lg-4">
<router-link to="/login" class="mt-3">{{ $t('back') }}</router-link>
</div>
</b-container>
</div>
</template>
<script>
import MyCommunitys from '../../../public/json-example/communitys.json'
export default {
name: 'registerSelectCommunity',
data() {
return {
communitys: MyCommunitys,
}
},
}
</script>
<style></style>

View File

@ -21,7 +21,7 @@
</div>
<div>
<span class="heading">--</span>
<span class="description">{{ $t('community') }}</span>
<span class="description">{{ $t('community.community') }}</span>
</div>
</div>
</b-card>