mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Registration in different communities
This commit is contained in:
parent
db15433cc2
commit
c5c97c0e67
7
frontend/public/json-example/communitys.json
Normal file
7
frontend/public/json-example/communitys.json
Normal 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/"}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,14 +1,21 @@
|
|||||||
{
|
{
|
||||||
"back": "Zurück",
|
"back": "Zurück",
|
||||||
"community": "Gemeinschaft",
|
"community": {
|
||||||
"communitys": {
|
"choose-another-aommunity":"Eine andere Gemeinschaft auswählen",
|
||||||
"form": {
|
"community": "Gemeinschaft",
|
||||||
"date_period": "Datum / Zeitraum",
|
"communitys": {
|
||||||
"hours": "Stunden",
|
"form": {
|
||||||
"hours_report": "Stundenbericht",
|
"date_period": "Datum / Zeitraum",
|
||||||
"more_hours": "weitere Stunden",
|
"hours": "Stunden",
|
||||||
"submit": "Einreichen"
|
"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": {
|
"decay": {
|
||||||
"calculation_decay": "Berechnung der Vergänglichkeit",
|
"calculation_decay": "Berechnung der Vergänglichkeit",
|
||||||
@ -18,7 +25,6 @@
|
|||||||
"decayStart": " - Startblock für Vergänglichkeit am: ",
|
"decayStart": " - Startblock für Vergänglichkeit am: ",
|
||||||
"decay_introduced": "Die Vergänglichkeit wurde Eingeführt am ",
|
"decay_introduced": "Die Vergänglichkeit wurde Eingeführt am ",
|
||||||
"decay_since_last_transaction": "Vergänglichkeit seit der letzten Transaktion",
|
"decay_since_last_transaction": "Vergänglichkeit seit der letzten Transaktion",
|
||||||
"fromCommunity": "Aus der Gemeinschaft",
|
|
||||||
"hours": "Stunden",
|
"hours": "Stunden",
|
||||||
"last_transaction": "Letzte Transaktion",
|
"last_transaction": "Letzte Transaktion",
|
||||||
"minutes": "Minuten",
|
"minutes": "Minuten",
|
||||||
@ -30,7 +36,6 @@
|
|||||||
"sent": "Gesendet",
|
"sent": "Gesendet",
|
||||||
"since_introduction": "seit Einführung der Vergänglichkeit",
|
"since_introduction": "seit Einführung der Vergänglichkeit",
|
||||||
"Starting_block_decay": "Startblock Vergänglichkeit",
|
"Starting_block_decay": "Startblock Vergänglichkeit",
|
||||||
"toCommunity": "An die Gemeinschaft",
|
|
||||||
"year": "Jahre"
|
"year": "Jahre"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
|
|||||||
@ -1,14 +1,21 @@
|
|||||||
{
|
{
|
||||||
"back": "Back",
|
"back": "Back",
|
||||||
"community": "Community",
|
"community": {
|
||||||
"communitys": {
|
"choose-another-aommunity":"Choose another community",
|
||||||
"form": {
|
"community": "Community",
|
||||||
"date_period": "Date / Period",
|
"communitys": {
|
||||||
"hours": "hours",
|
"form": {
|
||||||
"hours_report": "Hourly report",
|
"date_period": "Date / Period",
|
||||||
"more_hours": "more hours",
|
"hours": "hours",
|
||||||
"submit": "submit"
|
"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": {
|
"decay": {
|
||||||
"calculation_decay": "Calculation of Decay",
|
"calculation_decay": "Calculation of Decay",
|
||||||
@ -18,7 +25,6 @@
|
|||||||
"decayStart": " - Starting block for decay at: ",
|
"decayStart": " - Starting block for decay at: ",
|
||||||
"decay_introduced": "Decay was Introduced on",
|
"decay_introduced": "Decay was Introduced on",
|
||||||
"decay_since_last_transaction": "Decay since the last transaction",
|
"decay_since_last_transaction": "Decay since the last transaction",
|
||||||
"fromCommunity": "From the community",
|
|
||||||
"hours": "Hours",
|
"hours": "Hours",
|
||||||
"last_transaction": "Last transaction:",
|
"last_transaction": "Last transaction:",
|
||||||
"minutes": "Minutes",
|
"minutes": "Minutes",
|
||||||
@ -30,7 +36,6 @@
|
|||||||
"sent": "Sent",
|
"sent": "Sent",
|
||||||
"since_introduction": "Since the introduction of Decay",
|
"since_introduction": "Since the introduction of Decay",
|
||||||
"Starting_block_decay": "Starting Block Decay",
|
"Starting_block_decay": "Starting Block Decay",
|
||||||
"toCommunity": "To the community",
|
|
||||||
"year": "Years"
|
"year": "Years"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
|
|||||||
@ -36,7 +36,7 @@ const routes = [
|
|||||||
path: '/thx/:comingFrom',
|
path: '/thx/:comingFrom',
|
||||||
component: () => import('../views/Pages/thx.vue'),
|
component: () => import('../views/Pages/thx.vue'),
|
||||||
beforeEnter: (to, from, next) => {
|
beforeEnter: (to, from, next) => {
|
||||||
const validFrom = ['password', 'reset', 'register']
|
const validFrom = ['password', 'reset', 'register', 'community']
|
||||||
if (!validFrom.includes(from.path.split('/')[1])) {
|
if (!validFrom.includes(from.path.split('/')[1])) {
|
||||||
next({ path: '/login' })
|
next({ path: '/login' })
|
||||||
} else {
|
} else {
|
||||||
@ -48,6 +48,14 @@ const routes = [
|
|||||||
path: '/password',
|
path: '/password',
|
||||||
component: () => import('../views/Pages/ForgotPassword.vue'),
|
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',
|
path: '/reset/:optin',
|
||||||
component: () => import('../views/Pages/ResetPassword.vue'),
|
component: () => import('../views/Pages/ResetPassword.vue'),
|
||||||
|
|||||||
@ -68,6 +68,14 @@ export const store = new Vuex.Store({
|
|||||||
description: '',
|
description: '',
|
||||||
token: null,
|
token: null,
|
||||||
newsletterState: 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: {},
|
getters: {},
|
||||||
// Syncronous mutation of the state
|
// Syncronous mutation of the state
|
||||||
|
|||||||
@ -20,6 +20,12 @@
|
|||||||
<b-card-body class="p-4">
|
<b-card-body class="p-4">
|
||||||
<div class="text-center text-muted mb-4">
|
<div class="text-center text-muted mb-4">
|
||||||
<small>{{ $t('login') }}</small>
|
<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>
|
</div>
|
||||||
<validation-observer ref="observer" v-slot="{ handleSubmit }">
|
<validation-observer ref="observer" v-slot="{ handleSubmit }">
|
||||||
<b-form @submit.stop.prevent="handleSubmit(onSubmit)">
|
<b-form @submit.stop.prevent="handleSubmit(onSubmit)">
|
||||||
@ -44,7 +50,7 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="6" class="text-right" v-show="allowRegister">
|
<b-col cols="6" class="text-right" v-show="allowRegister">
|
||||||
<router-link to="/register">
|
<router-link to="/regist-community">
|
||||||
{{ $t('site.login.new_wallet') }}
|
{{ $t('site.login.new_wallet') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</b-col>
|
</b-col>
|
||||||
|
|||||||
@ -1,5 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="registerform">
|
<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 -->
|
<!-- Header -->
|
||||||
<div class="header p-4">
|
<div class="header p-4">
|
||||||
<b-container class="container">
|
<b-container class="container">
|
||||||
@ -13,9 +31,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</b-container>
|
</b-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Page content -->
|
<!-- Page content -->
|
||||||
<b-container class="mt--8 p-1">
|
<b-container class="mt--8 p-1">
|
||||||
<!-- Table -->
|
<!-- Table -->
|
||||||
|
|
||||||
<b-row class="justify-content-center">
|
<b-row class="justify-content-center">
|
||||||
<b-col lg="6" md="8">
|
<b-col lg="6" md="8">
|
||||||
<b-card no-body class="border-0" style="background-color: #ebebeba3 !important">
|
<b-card no-body class="border-0" style="background-color: #ebebeba3 !important">
|
||||||
@ -131,6 +151,7 @@
|
|||||||
</b-card>
|
</b-card>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
|
|
||||||
<div class="text-center py-lg-4">
|
<div class="text-center py-lg-4">
|
||||||
<router-link to="/login" class="mt-3">{{ $t('back') }}</router-link>
|
<router-link to="/login" class="mt-3">{{ $t('back') }}</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
40
frontend/src/views/Pages/RegisterCommunity.vue
Normal file
40
frontend/src/views/Pages/RegisterCommunity.vue
Normal 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>
|
||||||
55
frontend/src/views/Pages/RegisterSelectCommunity.vue
Normal file
55
frontend/src/views/Pages/RegisterSelectCommunity.vue
Normal 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>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="heading">--</span>
|
<span class="heading">--</span>
|
||||||
<span class="description">{{ $t('community') }}</span>
|
<span class="description">{{ $t('community.community') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</b-card>
|
</b-card>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user