merging conflicts

This commit is contained in:
Moriz Wahl 2021-03-24 20:29:50 +01:00
commit 0d38e8e1ff
6 changed files with 48 additions and 46 deletions

View File

@ -38,7 +38,7 @@ const communityAPI = {
transactions: async (session_id) => {
return apiGet(CONFIG.COMMUNITY_API_STATE_BALANCE_URL + 'ajaxListTransactions/' + session_id)
},
create: async (session_id, email, amount, memo, target_date = new Date()) => {
/*create: async (session_id, email, amount, memo, target_date = new Date() ) => {
const payload = {
session_id,
email,
@ -48,6 +48,16 @@ const communityAPI = {
auto_sign: true,
}
return apiPost(CONFIG.COMMUNITY_API_TRANSACTION_CREATION_URL + 'ajaxCreate/', payload)
},*/
send: async (session_id, email, amount, memo) => {
const payload = {
session_id,
email,
amount,
memo,
auto_sign: true,
}
return apiPost(CONFIG.COMMUNITY_API_TRANSACTION_SEND_COINS + 'ajaxCreate/', payload)
},
}

View File

@ -13,9 +13,8 @@ const server = {
LOGIN_API_URL: process.env.LOGIN_API_URL || 'http://localhost/login_api/',
COMMUNITY_API_STATE_BALANCE_URL:
process.env.COMMUNITY_API_STATE_BALANCE_URL || 'http://localhost/state-balances/',
COMMUNITY_API_TRANSACTION_CREATION_URL:
process.env.COMMUNITY_API_TRANSACTION_CREATION_URL || 'http://localhost/transaction-creations/',
// TODO is this the right API call? what does it do?
// Schöpfung
// COMMUNITY_API_TRANSACTION_CREATION_URL: process.env.COMMUNITY_API_TRANSACTION_CREATION_URL || 'http://localhost/transaction-creations/',
COMMUNITY_API_TRANSACTION_SEND_COINS:
process.env.COMMUNITY_API_TRANSACTION_SEND_COINS || 'http://localhost/transaction-send-coins/',
}

View File

@ -6,7 +6,7 @@
"signup": "Registrieren",
"imprint":"Impressum",
"privacy_policy":"Datenschutzerklärung",
"back":"zurück",
"back":"Zurück",
"sent":"Senden",
"transactions":"Transaktionen",
"language":"Language",
@ -15,7 +15,7 @@
"en": "English"
},
"form": {
"cancel":"abbrechen",
"cancel":"Abbrechen",
"firstname":"Vorname",
"lastname":"Nachname",
"email":"eMail",
@ -29,7 +29,7 @@
"from":"von",
"to":"bis",
"at":"am",
"send_now":"jetzt versenden"
"send_now":"Jetzt versenden"
},
"transaction":{
"show_part": "Die letzten <strong>{count}</strong> Transaktionen",
@ -54,7 +54,7 @@
"password": {
"title": "Passwort zurücksetzen",
"subtitle": "Wenn du dein Passwort vergessen hast, kannst du es hier zurücksetzen.",
"reset_now": "jetzt zurücksetzen"
"reset_now": "Jetzt zurücksetzen"
},
"thx": {
"title": "Danke!",
@ -68,7 +68,7 @@
},
"navbar" : {
"my-profil":"Mein Profil",
"settings":"Einstellung",
"settings":"Einstellungen",
"activity":"Aktivität",
"support":"Support"
},
@ -80,19 +80,19 @@
},
"landing1" : {
"explore": "Erkunden Sie Gradido",
"text": "Gesundes Geld für eine gesunde Welt - Das Gradido-Modell kann weltweiten Wohlstand und Frieden schaffen",
"text": "Gesundes Geld für eine gesunde Welt Das Gradido-Modell kann weltweiten Wohlstand und Frieden schaffen",
"link": "Seiten erkunden"
},
"404" : {
"ooops" : "Ooops!",
"text" : "Seite nicht gefunden. Aber keine Sorge, wir haben noch viele andere Seiten zum Erkunden",
"back" : "zurück zur Übersicht!"
"back" : "Zurück zur Übersicht!"
}
},
"admin": {
"site": {
"overview": {
"created": "created",
"created": "Schöpfen",
"transience" : "Transience",
"exchanged": "Exchanged",
"members" : "Members"
@ -102,4 +102,4 @@
"nav": {
"features": "Neuigkeiten"
}
}
}

View File

@ -6,9 +6,9 @@
"signup": "Sign up",
"imprint":"Legal notice",
"privacy_policy":"Privacy policy",
"back":"back",
"back":"Back",
"sent":"Send",
"transactions":"transactions",
"transactions":"Transactions",
"language":"Sprache",
"languages":{
"de": "Deutsch",
@ -19,9 +19,9 @@
"firstname":"Firstname",
"lastname":"Lastname",
"email":"Email",
"email_repeat":"repeat_email",
"email_repeat":"Repeat Email",
"password":"Password",
"password_repeat":"repeat password",
"password_repeat":"Repeat password",
"amount":"Amount",
"memo":"Memo",
"message":"Message",
@ -30,7 +30,7 @@
"to":"to",
"at":"at",
"time":"Time",
"send_now":"send now"
"send_now":"Send now"
},
"transaction":{
"show_part": "The last <strong>{count}</strong> transactions",
@ -48,18 +48,18 @@
"signup": {
"title": "Create your Gradido account",
"subtitle": "Become a part of the community!",
"strength":"password strength:",
"strength":"Password strength:",
"strong":"strong",
"agree":"I have read and understood and agree to them the"
"agree":"I have read and understood and agree to them"
},
"password": {
"title": "reset password",
"title": "Reset password",
"subtitle": "If you have forgotten your password, you can reset it here.",
"reset_now": "reset now"
"reset_now": "Reset now"
},
"thx": {
"title": "Thank you",
"subtitle": "We have sent you an eMail."
"title": "Thank you!",
"subtitle": "We have sent you an email."
},
"overview":{
"account_overview":"Account overview",
@ -68,7 +68,7 @@
"add_work":"New Community Contribution"
},
"navbar" : {
"my-profil":"My Profil",
"my-profil":"My profile",
"settings":"Settings",
"activity":"Activity",
"support":"Support"
@ -76,16 +76,17 @@
"sidebar" : {
"community":"Community",
"members_area":"Members area",
"membership":"Membership"
"membership":"Membership",
"language":"Languages"
},
"landing1" : {
"explore":"Explore Gradido",
"text":"If you want to get inspiration or just show something directly to your clients, you can jump start your development with our pre-built example pages.",
"text":"Healthy money for a healthy world — the Gradido model can create global prosperity and peace",
"link":"Explore pages"
},
"404" : {
"ooops" : "Ooops!",
"text" : "Page not found. Don't worry though, we have plenty of other pages to explore",
"text" : "Page not found. Do not worry though, we have plenty of other pages to explore",
"back" : "Back to dashboard!"
}
},

View File

@ -4,28 +4,20 @@
<side-bar>
<template slot="links">
<b-nav-item href="#!" to="/overview">
<b-nav-text class="p-0 text-lg text-muted">
{{ $t('sent') }}
</b-nav-text>
<b-nav-text class="p-0 text-lg text-muted">{{ $t('sent') }}</b-nav-text>
</b-nav-item>
<b-nav-item href="#!" to="/transactions">
<b-nav-text class="p-0 text-lg text-muted">Transaktionen</b-nav-text>
<b-nav-text class="p-0 text-lg text-muted">{{ $t('transactions') }}</b-nav-text>
</b-nav-item>
<b-nav-item href="#!" to="/profile">
<b-nav-text class="p-0 text-lg text-muted">
{{ $t('site.navbar.my-profil') }}
</b-nav-text>
<b-nav-text class="p-0 text-lg text-muted">{{ $t('site.navbar.my-profil') }}</b-nav-text>
</b-nav-item>
<b-nav-item href="#!" to="/profileedit">
<b-nav-text class="p-0 text-lg text-muted">
{{ $t('site.navbar.settings') }}
</b-nav-text>
<b-nav-text class="p-0 text-lg text-muted">{{ $t('site.navbar.settings') }}</b-nav-text>
</b-nav-item>
<b-nav-item href="#!" to="/activity">
<b-nav-text class="p-0 text-lg text-muted">
{{ $t('site.navbar.activity') }}
</b-nav-text>
<b-nav-text class="p-0 text-lg text-muted">{{ $t('site.navbar.activity') }}</b-nav-text>
</b-nav-item>
</template>
</side-bar>
@ -43,7 +35,6 @@
</div>
</template>
<script>
/* eslint-disable no-new */
import PerfectScrollbar from 'perfect-scrollbar'
import 'perfect-scrollbar/css/perfect-scrollbar.css'

View File

@ -77,11 +77,12 @@ Poco::JSON::Object* JsonGetUserInfos::handle(Poco::Dynamic::Var params)
auto session_user = session->getNewUser();
auto session_user_model = session_user->getModel();
bool isAdmin = false;
bool emailBelongToUser = false;
if (model::table::ROLE_ADMIN == session_user_model->getRole()) {
isAdmin = true;
}
if (session_user_model->getEmail() != email && !isAdmin) {
return customStateError("not same", "email don't belong to logged in user");
if (session_user_model->getEmail() == email) {
emailBelongToUser = true;
}
auto user = controller::User::create();
@ -102,7 +103,7 @@ Poco::JSON::Object* JsonGetUserInfos::handle(Poco::Dynamic::Var params)
std::string parameterString;
try {
parameter.convert(parameterString);
if (parameterString == "EmailVerificationCode.Register" && isAdmin && session_user_model->getEmail() != user_model->getEmail()) {
if (parameterString == "EmailVerificationCode.Register" && isAdmin && !emailBelongToUser) {
auto code = readOrCreateEmailVerificationCode(user_model->getID(), model::table::EMAIL_OPT_IN_REGISTER_DIRECT);
if (code) {
jsonUser.set("EmailVerificationCode.Register", std::to_string(code));
@ -123,7 +124,7 @@ Poco::JSON::Object* JsonGetUserInfos::handle(Poco::Dynamic::Var params)
else if (parameterString == "user.disabled") {
jsonUser.set("disabled", user_model->isDisabled());
}
else if (parameterString == "user.email_checked") {
else if (parameterString == "user.email_checked" && (isAdmin || emailBelongToUser)) {
jsonUser.set("email_checked", user_model->isEmailChecked());
}
else if (parameterString == "user.identHash") {