Registration in different communities

This commit is contained in:
ogerly 2021-09-22 09:51:27 +02:00
parent db15433cc2
commit c5c97c0e67
10 changed files with 186 additions and 31 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,15 +1,22 @@
{
"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",
"created": "Geschöpft",
@ -17,8 +24,7 @@
"decay": "Vergänglichkeit",
"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",
"decay_since_last_transaction": "Vergänglichkeit seit der letzten Transaktion",
"hours": "Stunden",
"last_transaction": "Letzte Transaktion",
"minutes": "Minuten",
@ -29,8 +35,7 @@
"seconds": "Sekunden",
"sent": "Gesendet",
"since_introduction": "seit Einführung der Vergänglichkeit",
"Starting_block_decay": "Startblock Vergänglichkeit",
"toCommunity": "An die Gemeinschaft",
"Starting_block_decay": "Startblock Vergänglichkeit",
"year": "Jahre"
},
"error": {

View File

@ -1,15 +1,22 @@
{
"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",
"created": "Created",
@ -17,8 +24,7 @@
"decay": "Decay",
"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",
"decay_since_last_transaction": "Decay since the last transaction",
"hours": "Hours",
"last_transaction": "Last transaction:",
"minutes": "Minutes",
@ -29,8 +35,7 @@
"seconds": "Seconds",
"sent": "Sent",
"since_introduction": "Since the introduction of Decay",
"Starting_block_decay": "Starting Block Decay",
"toCommunity": "To the community",
"Starting_block_decay": "Starting Block Decay",
"year": "Years"
},
"error": {

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

@ -20,6 +20,12 @@
<b-card-body class="p-4">
<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)">
@ -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,23 @@
<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 +31,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">
@ -131,6 +151,7 @@
</b-card>
</b-col>
</b-row>
<div class="text-center py-lg-4">
<router-link to="/login" class="mt-3">{{ $t('back') }}</router-link>
</div>

View File

@ -0,0 +1,40 @@
<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,55 @@
<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 json from '/public/json-example/communitys.json'
export default {
name: 'registerSelectCommunity',
data() {
return {
communitys: json,
}
},
methods: {},
}
</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>