mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into build_on_run
This commit is contained in:
commit
8c153ff255
@ -61,4 +61,5 @@ services:
|
||||
|
||||
volumes:
|
||||
frontend_node_modules:
|
||||
login_build:
|
||||
login_build:
|
||||
|
||||
|
||||
@ -209,4 +209,46 @@ return
|
||||
- info can contain additional info strings
|
||||
- user hasn't password: if user hasn't set a password yet (for example if he was registered via elopage)
|
||||
- email already activated: if email was already checked
|
||||
- session_id: session_id for new session
|
||||
- session_id: session_id for new session
|
||||
|
||||
|
||||
## Check Running Transactions / password encryption
|
||||
Check if transactions on login-server for user are processed
|
||||
|
||||
GET http://localhost/login_api/getRunningUserTasks?email=max.musterman%40gmail.de
|
||||
# OR
|
||||
POST http://localhost/login_api/getRunningUserTasks
|
||||
```json
|
||||
{"email":"max.musterman@gmail.de"}
|
||||
```
|
||||
|
||||
return
|
||||
```json
|
||||
{
|
||||
"state":"success",
|
||||
"runningTasks": {
|
||||
"password creation": 0,
|
||||
"sign transaction": 1,
|
||||
"prepare transaction": 1,
|
||||
"ready for sign transaction":0
|
||||
}
|
||||
}
|
||||
```
|
||||
return only entrys which > 0
|
||||
- password creation: after register or password change, login possible after tasks is finish
|
||||
- sign transaction: after check transaction in backend, before transaction is in db
|
||||
- prepare transaction: after sending transaction to login-server, before they can be checked
|
||||
- ready for sign transaction: transactions ready for signing from user
|
||||
|
||||
## Check Session State
|
||||
GET http://localhost/login_api/checkSessionState?session_id=-127182
|
||||
|
||||
return if session is still open
|
||||
```json
|
||||
{"state":"success"}
|
||||
```
|
||||
else return
|
||||
```json
|
||||
{"state":"not found", "msg": "session not found"}
|
||||
```
|
||||
|
||||
|
||||
@ -39,7 +39,12 @@ export default {
|
||||
//console.log('%cHey %c' + $cookies.get('gdd_u') + '', 'font-weight:bold', 'color: orange')
|
||||
this.$store.commit('session_id', $cookies.get('gdd_session_id'))
|
||||
this.$store.commit('email', $cookies.get('gdd_u'))
|
||||
this.$store.commit('language', $cookies.get('gdd_lang'))
|
||||
if ($cookies.get('gdd_lang') != 'de' || $cookies.get('gdd_lang') != 'de') {
|
||||
this.$store.commit('language', 'de')
|
||||
} else {
|
||||
this.$store.commit('language', $cookies.get('gdd_lang'))
|
||||
}
|
||||
|
||||
this.$i18n.locale = $cookies.get('gdd_lang')
|
||||
this.$router.push('overview')
|
||||
} else {
|
||||
|
||||
@ -13,6 +13,9 @@ export const store = new Vuex.Store({
|
||||
sizeDE: 'normal',
|
||||
sizeGB: 'big',
|
||||
loginfail: false,
|
||||
row_form: true,
|
||||
row_check: false,
|
||||
row_thx: false,
|
||||
user: {
|
||||
name: '',
|
||||
balance: 0,
|
||||
@ -22,7 +25,7 @@ export const store = new Vuex.Store({
|
||||
session_id: '',
|
||||
email: '',
|
||||
amount: 0,
|
||||
target_date: '2021-02-19T13:25:36+00:00',
|
||||
target_date: '',
|
||||
memo: '',
|
||||
auto_sign: true,
|
||||
},
|
||||
@ -141,8 +144,17 @@ export const store = new Vuex.Store({
|
||||
},
|
||||
ajaxCreate: async ({ dispatch, state }) => {
|
||||
//console.log('action: ajaxCreate')
|
||||
|
||||
state.ajaxCreateData.amount = state.ajaxCreateData.amount * 10000
|
||||
const result = await communityAPI.create($cookies.get('gdd_session_id', email, amount, memo))
|
||||
|
||||
const result = await communityAPI.send(
|
||||
state.session_id,
|
||||
state.ajaxCreateData.email,
|
||||
state.ajaxCreateData.amount,
|
||||
state.ajaxCreateData.memo,
|
||||
)
|
||||
|
||||
return result
|
||||
//console.log(result)
|
||||
},
|
||||
ajaxListTransactions: async ({ commit, dispatch, state }) => {
|
||||
@ -157,8 +169,8 @@ export const store = new Vuex.Store({
|
||||
// commit('session_id', $cookies.get("gdd_session_id"))
|
||||
// commit('email', $cookies.get("gdd_u"))
|
||||
const result = await communityAPI.balance($cookies.get('gdd_session_id'))
|
||||
//console.log('accountBalance result', result)
|
||||
//console.log('aresult.result.data.balance', result.result.data.balance)
|
||||
//console.log("accountBalance result", result)
|
||||
//console.log("aresult.result.data.balance", result.result.data.balance)
|
||||
if (result.success) {
|
||||
commit('user_balance', result.result.data.balance)
|
||||
} else {
|
||||
|
||||
@ -1,210 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-row>
|
||||
<b-col xl="12" md="12">
|
||||
<base-button icon type="info" size="lg" v-b-toggle.collapse-2>
|
||||
<span class="btn-inner--icon"><i class="ni ni-fat-add"></i></span>
|
||||
<span class="btn-inner--text">
|
||||
{{ $t('site.overview.add_work') }}
|
||||
</span>
|
||||
</base-button>
|
||||
<b-collapse id="collapse-2" class="mt-2">
|
||||
<b-card>
|
||||
<div class="card-text">
|
||||
<b-row>
|
||||
<b-col>
|
||||
<h1>Neuer Beitrag</h1>
|
||||
<h3>{ Name der Community }</h3>
|
||||
</b-col>
|
||||
<b-col>
|
||||
<h3>Bitte trage jede arbeit einzeln ein.</h3>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<hr />
|
||||
<b-form @submit="onSubmit" @reset="onReset" v-if="show">
|
||||
<b-row class="form-group">
|
||||
<label
|
||||
for="example-datetime-local-input"
|
||||
class="col-md-2 col-form-label form-control-label form-control-lg"
|
||||
>
|
||||
von
|
||||
</label>
|
||||
<b-col md="10">
|
||||
<base-input
|
||||
type="datetime-local"
|
||||
value="2018-11-23T10:30:00"
|
||||
v-model="form.from"
|
||||
@change="dateDiff"
|
||||
/>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row class="form-group">
|
||||
<label
|
||||
for="example-datetime-local-input"
|
||||
class="col-md-2 col-form-label form-control-label form-control-lg"
|
||||
>
|
||||
bis
|
||||
</label>
|
||||
<b-col md="10">
|
||||
<base-input
|
||||
type="datetime-local"
|
||||
value="2018-11-23T10:30:00"
|
||||
v-model="form.to"
|
||||
@change="dateDiff"
|
||||
/>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row class="form-group">
|
||||
<label
|
||||
for="example-datetime-local-input"
|
||||
class="col-md-2 col-form-label form-control-label form-control-lg"
|
||||
>
|
||||
Stunden
|
||||
</label>
|
||||
<b-col md="10">
|
||||
<base-input type="text" v-model="form.hours" disabled class="form-control-lg" />
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row class="form-group">
|
||||
<label
|
||||
for="example-datetime-local-input"
|
||||
class="col-md-2 col-form-label form-control-label form-control-lg"
|
||||
>
|
||||
GDD Shöpfen
|
||||
</label>
|
||||
<b-col md="10">
|
||||
<base-input
|
||||
type="text"
|
||||
:value="form.hours * 20"
|
||||
disabled
|
||||
class="form-control-lg"
|
||||
/>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row class="form-group">
|
||||
<label class="col-md-2 col-form-label form-control-label form-control-lg">
|
||||
Ort
|
||||
</label>
|
||||
<b-col md="10">
|
||||
<base-input
|
||||
placeholder="Berlin"
|
||||
v-model="form.location"
|
||||
class="form-control-lg"
|
||||
></base-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row class="form-group">
|
||||
<label class="col-md-2 col-form-label form-control-label form-control-lg">
|
||||
Kategorie
|
||||
</label>
|
||||
<b-col md="10">
|
||||
<base-input>
|
||||
<select class="form-control form-control-lg">
|
||||
<option>Umwelt</option>
|
||||
<option>Helfen</option>
|
||||
<option>Verein</option>
|
||||
</select>
|
||||
</base-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
|
||||
<base-input label="Beitrag">
|
||||
<textarea
|
||||
class="form-control form-control-lg"
|
||||
rows="3"
|
||||
v-model="form.text"
|
||||
></textarea>
|
||||
</base-input>
|
||||
<b-row class="form-group">
|
||||
<label class="col-md-2 col-form-label form-control-label form-control-lg">
|
||||
Tätigkeit
|
||||
</label>
|
||||
<b-col md="8">
|
||||
<base-input
|
||||
placeholder="Tätigkeit"
|
||||
v-model="form.location"
|
||||
class="form-control-lg"
|
||||
></base-input>
|
||||
</b-col>
|
||||
<b-col md="2">
|
||||
<base-input
|
||||
placeholder="Stunden"
|
||||
v-model="form.location"
|
||||
class="form-control-lg"
|
||||
></base-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
|
||||
<br />
|
||||
|
||||
<br />
|
||||
<b-button type="submit" variant="success">
|
||||
jetzt einreichen
|
||||
<small>{{ timestamp }}</small>
|
||||
</b-button>
|
||||
<b-button type="reset" variant="danger">Cancel</b-button>
|
||||
<br />
|
||||
</b-form>
|
||||
</div>
|
||||
</b-card>
|
||||
</b-collapse>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'GDDAddWork',
|
||||
data() {
|
||||
return {
|
||||
show: true,
|
||||
form: {
|
||||
from: '',
|
||||
to: '',
|
||||
hours: '',
|
||||
text: '',
|
||||
gdd: 0.0,
|
||||
location: '',
|
||||
text2: '',
|
||||
sendtime: '',
|
||||
},
|
||||
timestamp: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setInterval(this.getNow, 2000)
|
||||
},
|
||||
methods: {
|
||||
dateDiff() {
|
||||
this.form.hours = (this.$moment(this.form.to) - this.$moment(this.form.from)) / 1000 / 3600
|
||||
},
|
||||
getNow: function () {
|
||||
//const today = new Date()
|
||||
//const date = today.getDate()+'.'+(today.getMonth()+1)+'.'+ today.getFullYear();
|
||||
//const time = today.getHours() + ":" + today.getMinutes();
|
||||
//const dateTime = date +', '+ time;
|
||||
this.timestamp = new Date()
|
||||
},
|
||||
onSubmit(event) {
|
||||
event.preventDefault()
|
||||
//console.log('onSUBMIT this.form.from >>>>', this.form.from)
|
||||
//console.log('onSUBMIT this.form.from >>>>', this.$moment(this.form.from))
|
||||
//console.log('onSUBMIT this.form.to >>>>', this.form.to)
|
||||
// console.log("onSUBMIT >>>>", this.getHours(this.form.from, this.form.to))
|
||||
this.form.sendtime = new Date()
|
||||
alert(JSON.stringify(this.form))
|
||||
},
|
||||
onReset(event) {
|
||||
event.preventDefault()
|
||||
// Reset our form values
|
||||
|
||||
// Trick to reset/clear native browser form validation state
|
||||
this.show = false
|
||||
this.$nextTick(() => {
|
||||
this.show = true
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@ -1,119 +1,53 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-tabs content-class="mt-3" fill>
|
||||
<div class="pt-4 pb-4">
|
||||
<b-tabs content-class="mt-3" class="display-4" fill>
|
||||
<b-tab :title="names.thisMonth" active>
|
||||
<b-row>
|
||||
<b-col cols="3">
|
||||
<base-input label="Arbeitstunden">
|
||||
<b-form-input type="number" placeholder="23" />
|
||||
</base-input>
|
||||
<base-input label="Datum / Zeitraum">
|
||||
<flat-pickr class="form-control" v-model="date" :config="config"></flat-pickr>
|
||||
</base-input>
|
||||
</b-col>
|
||||
<b-col cols="9">
|
||||
<base-input label="Arbeitsreport">
|
||||
<textarea class="form-control" rows="5" @focus="textFocus"></textarea>
|
||||
</base-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row>
|
||||
<b-col>
|
||||
<button class="btn btn-info text-right" @click.prevent="newWorkForm">
|
||||
weiteren Report hinzufügen
|
||||
</button>
|
||||
</b-col>
|
||||
<b-col>
|
||||
<div class="text-right">
|
||||
<button class="btn btn-info text-right" @click.prevent="submitForm2">
|
||||
save new Report
|
||||
</button>
|
||||
</div>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-tab>
|
||||
|
||||
<b-tab :title="names.lastMonth">
|
||||
<b-row>
|
||||
<b-col cols="3">
|
||||
<base-input label="Arbeitstunden">
|
||||
<b-form-input type="number" placeholder="23" />
|
||||
</base-input>
|
||||
<base-input label="Datum / Zeitraum">
|
||||
<flat-pickr class="form-control" v-model="date" :config="lastConfig"></flat-pickr>
|
||||
</base-input>
|
||||
</b-col>
|
||||
<b-col cols="9">
|
||||
<base-input label="Arbeitsreport">
|
||||
<textarea class="form-control" rows="5" @focus="textFocus"></textarea>
|
||||
</base-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row>
|
||||
<b-col>
|
||||
<button class="btn btn-warning text-right" @click.prevent="newWorkForm">
|
||||
+ weiteren Report hinzufügen
|
||||
</button>
|
||||
</b-col>
|
||||
<b-col>
|
||||
<div class="text-right">
|
||||
<button class="btn btn-info text-right" @click.prevent="submitForm2">
|
||||
save new Report
|
||||
</button>
|
||||
</div>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<hr />
|
||||
<pre>Selected date is - {{ date }}</pre>
|
||||
<p>{{ days.lastMonth }} Days in {{ names.lastMonth }}</p>
|
||||
|
||||
<p>
|
||||
Du hast diesen Monat
|
||||
{{ stundenSumme > 0 ? 'schon ' : 'noch keine' }}
|
||||
{{ stundenSumme > 0 ? '' + stundenSumme : '' }}
|
||||
Stunden eingetragen
|
||||
</p>
|
||||
</b-tab>
|
||||
|
||||
<b-tab :title="names.beforLastMonth">
|
||||
<b-row>
|
||||
<b-col cols="3">
|
||||
<base-input label="Arbeitstunden">
|
||||
<b-form-input type="number" placeholder="23" />
|
||||
<b-col lg="3">
|
||||
<base-input label="Stunden">
|
||||
<b-form-input
|
||||
type="number"
|
||||
size="lg"
|
||||
placeholder="0"
|
||||
style="font-size: xx-large; padding-left: 20px"
|
||||
/>
|
||||
</base-input>
|
||||
<base-input label="Datum / Zeitraum">
|
||||
<flat-pickr
|
||||
class="form-control"
|
||||
v-model="date"
|
||||
:config="beforLastConfig"
|
||||
:config="config"
|
||||
style="font-size: x-large; padding-left: 20px"
|
||||
></flat-pickr>
|
||||
</base-input>
|
||||
</b-col>
|
||||
<b-col cols="9">
|
||||
<b-col lg="9">
|
||||
<base-input label="Arbeitsreport">
|
||||
<textarea class="form-control" rows="5" @focus="textFocus"></textarea>
|
||||
<textarea
|
||||
class="form-control"
|
||||
rows="5"
|
||||
@focus="textFocus"
|
||||
style="font-size: x-large; padding-left: 20px"
|
||||
></textarea>
|
||||
</base-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row>
|
||||
<b-col>
|
||||
<button class="btn btn-warning text-right" @click.prevent="newWorkForm">
|
||||
+ weiteren Report hinzufügen
|
||||
</button>
|
||||
<div ref="mydiv"></div>
|
||||
</b-row>
|
||||
<b-row>
|
||||
<b-col md="6">
|
||||
<b-button @click.prevent="newWorkForm" variant="warning">+ weitere Stunden</b-button>
|
||||
</b-col>
|
||||
<b-col>
|
||||
<div class="text-right">
|
||||
<button class="btn btn-info text-right" @click.prevent="submitForm3">
|
||||
save new Report
|
||||
</button>
|
||||
</div>
|
||||
<b-col md="6" class="text-right">
|
||||
<b-button variant="success" @click.prevent="submitForm2">Einreichen, absenden</b-button>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<hr />
|
||||
<pre>Selected date is - {{ date }}</pre>
|
||||
<p>{{ days.beforLastMonth }} Days in {{ names.beforLastMonth }}</p>
|
||||
<p>Du hast noch keine Einträge</p>
|
||||
</b-tab>
|
||||
|
||||
<b-tab :title="names.lastMonth"></b-tab>
|
||||
|
||||
<b-tab :title="names.beforLastMonth"></b-tab>
|
||||
</b-tabs>
|
||||
</div>
|
||||
</template>
|
||||
@ -135,32 +69,6 @@ export default {
|
||||
maxDate: this.$moment().format('DD.MM.YYYY'),
|
||||
mode: 'range',
|
||||
},
|
||||
lastConfig: {
|
||||
altInput: false,
|
||||
dateFormat: 'd-m-Y',
|
||||
minDate: this.$moment()
|
||||
.month(this.$moment().month() - 1)
|
||||
.startOf('month')
|
||||
.format('DD.MM.YYYY'),
|
||||
maxDate: this.$moment()
|
||||
.month(this.$moment().month() - 1)
|
||||
.endOf('month')
|
||||
.format('DD.MM.YYYY'),
|
||||
mode: 'range',
|
||||
},
|
||||
beforLastConfig: {
|
||||
altInput: false,
|
||||
dateFormat: 'd-m-Y',
|
||||
minDate: this.$moment()
|
||||
.month(this.$moment().month() - 2)
|
||||
.startOf('month')
|
||||
.format('DD.MM.YYYY'),
|
||||
maxDate: this.$moment()
|
||||
.month(this.$moment().month() - 2)
|
||||
.endOf('month')
|
||||
.format('DD.MM.YYYY'),
|
||||
mode: 'range',
|
||||
},
|
||||
index: 0,
|
||||
form: [],
|
||||
stundenSumme: 0,
|
||||
@ -184,6 +92,7 @@ export default {
|
||||
.month(this.$moment().month() - 2)
|
||||
.format('MMMM'),
|
||||
},
|
||||
formular: null,
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
@ -192,21 +101,12 @@ export default {
|
||||
stunden(this.form)
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
getTR(m, i) {
|
||||
//console.log(m + '-' + i)
|
||||
},
|
||||
stunden(hour, i, mon) {
|
||||
let n = 0
|
||||
//console.log('stunden(form)=>', hour)
|
||||
//console.log('stunden(i)=>', i)
|
||||
//console.log('stunden(mon)=>', mon)
|
||||
|
||||
//console.log('this.stundenSumme start=> ', this.stundenSumme)
|
||||
this.stundenSumme = 0
|
||||
//console.log('arr.length => ', this.form.length)
|
||||
for (n; n < this.form.length; n++) {
|
||||
//console.log('>arr[n]=> ', this.form[n])
|
||||
if (this.form[n] > 0) {
|
||||
this.stundenSumme += parseInt(this.form[n])
|
||||
}
|
||||
@ -220,7 +120,6 @@ export default {
|
||||
TextDecoded: '',
|
||||
})
|
||||
this.index++
|
||||
//console.log('this.stundenSumme ende=> ', this.stundenSumme)
|
||||
},
|
||||
addNewMessage: function () {
|
||||
this.messages.push({
|
||||
@ -229,29 +128,55 @@ export default {
|
||||
})
|
||||
},
|
||||
deleteNewMessage: function (event) {
|
||||
//console.log('deleteNewMessage:event) => ', event)
|
||||
//console.log("deleteNewMessage:this.events.splice(this.event) => ", this.events.splice(this.event))
|
||||
this.form.splice(event, null)
|
||||
this.messages.splice(index, 1)
|
||||
this.index--
|
||||
},
|
||||
submitForm: function (e) {
|
||||
//console.log(this.messages)
|
||||
|
||||
//console.log('submitForm')
|
||||
this.messages = [{ DaysNumber: '', TextDecoded: '' }]
|
||||
this.submitted = true
|
||||
},
|
||||
submitForm2() {
|
||||
//console.log('submitForm2 TODO')
|
||||
},
|
||||
submitForm3() {
|
||||
//console.log('submitForm3 TODO')
|
||||
},
|
||||
textFocus() {
|
||||
//console.log('textFocus TODO')
|
||||
},
|
||||
newWorkForm() {
|
||||
//console.log('newWorkForm TODO')
|
||||
this.formular = `
|
||||
<b-col lg="3">
|
||||
<base-input label="Stunden">
|
||||
<b-form-input
|
||||
type="number"
|
||||
size="lg"
|
||||
placeholder="0"
|
||||
style="font-size: xx-large; padding-left: 20px"
|
||||
/>
|
||||
</base-input>
|
||||
<base-input label="Datum / Zeitraum">
|
||||
<flat-pickr
|
||||
class="form-control"
|
||||
v-model="date"
|
||||
:config="config"
|
||||
style="font-size: xx-large; padding-left: 20px"
|
||||
></flat-pickr>
|
||||
</base-input>
|
||||
</b-col>
|
||||
<b-col lg="9">
|
||||
<base-input label="Arbeitsreport">
|
||||
<textarea
|
||||
class="form-control"
|
||||
rows="5"
|
||||
@focus="textFocus"
|
||||
style="font-size: x-large; padding-left: 20px"
|
||||
></textarea>
|
||||
</base-input>
|
||||
</b-col>
|
||||
`
|
||||
|
||||
// console.log('newWorkForm TODO')
|
||||
const myElement = this.$refs.mydiv
|
||||
myElement.append(this.formular)
|
||||
this.$compile(myElement)
|
||||
this.formular = null
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-row>
|
||||
<b-row v-show="$store.state.row_form">
|
||||
<b-col xl="12" md="12">
|
||||
<b-alert variant="warning" show dismissible>
|
||||
<strong>Achtung!</strong>
|
||||
Bitte überprüfe alle deine Eingaben sehr genau. Du bist alleine Verantwortlich für deine
|
||||
Entscheidungen. Versendete Gradidos können nicht wieder zurück geholt werden.
|
||||
</b-alert>
|
||||
<b-card class="p-0 p-md-3">
|
||||
<b-card class="p-0 p-md-3" style="background-color: #ebebeba3 !important">
|
||||
<b-alert show variant="secondary">
|
||||
<span class="alert-text">
|
||||
<strong>QR Code Scanner</strong>
|
||||
@ -17,9 +17,7 @@
|
||||
<img src="/img/icons/gradido/qr-scan-pure.png" height="50" @click="scan = true" />
|
||||
</b-col>
|
||||
<b-alert v-show="scan" show variant="warning">
|
||||
<span class="alert-text" @click="scan = false">
|
||||
<strong>schließen!</strong>
|
||||
</span>
|
||||
<span class="alert-text" @click="scan = false"><strong>schließen!</strong></span>
|
||||
</b-alert>
|
||||
<div v-if="scan">
|
||||
<!-- <b-row>
|
||||
@ -142,11 +140,57 @@
|
||||
</b-card>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row v-show="$store.state.row_check">
|
||||
<b-col>
|
||||
<div class="display-4 p-4">Bestätige deine Zahlung. Prüfe bitte nochmal alle Daten!</div>
|
||||
|
||||
<b-list-group>
|
||||
<b-list-group-item active>Meine Zahlung</b-list-group-item>
|
||||
<b-list-group-item class="d-flex justify-content-between align-items-center">
|
||||
{{ $store.state.ajaxCreateData.email }}
|
||||
<b-badge variant="primary" pill>Empfänger</b-badge>
|
||||
</b-list-group-item>
|
||||
|
||||
<b-list-group-item class="d-flex justify-content-between align-items-center">
|
||||
{{ $store.state.ajaxCreateData.amount }} GDD
|
||||
<b-badge variant="primary" pill>Betrag</b-badge>
|
||||
</b-list-group-item>
|
||||
|
||||
<b-list-group-item class="d-flex justify-content-between align-items-center">
|
||||
{{ $store.state.ajaxCreateData.memo }}
|
||||
<b-badge variant="primary" pill>Nachricht</b-badge>
|
||||
</b-list-group-item>
|
||||
<b-list-group-item class="d-flex justify-content-between align-items-center">
|
||||
{{ $moment($store.state.ajaxCreateData.target_date).format('DD.MM.YYYY - HH:mm:ss') }}
|
||||
<b-badge variant="primary" pill>Datum</b-badge>
|
||||
</b-list-group-item>
|
||||
</b-list-group>
|
||||
<hr />
|
||||
<b-row>
|
||||
<b-col><b-button @click="onReset">abbrechen</b-button></b-col>
|
||||
<b-col class="text-right">
|
||||
<b-button variant="success" @click="sendTransaction">jetzt versenden</b-button>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row v-show="$store.state.row_thx">
|
||||
<b-col>
|
||||
<div class="display-1 p-4">
|
||||
Danke
|
||||
<hr />
|
||||
Deine Zahlung wurde erfolgreich versendet.
|
||||
</div>
|
||||
|
||||
<b-button variant="success" @click="onReset">schließen</b-button>
|
||||
<hr />
|
||||
</b-col>
|
||||
</b-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { QrcodeStream, QrcodeDropZone /*, QrcodeCapture*/ } from 'vue-qrcode-reader'
|
||||
import { QrcodeStream, QrcodeDropZone } from 'vue-qrcode-reader'
|
||||
import { BIcon } from 'bootstrap-vue'
|
||||
|
||||
export default {
|
||||
@ -154,7 +198,6 @@ export default {
|
||||
components: {
|
||||
QrcodeStream,
|
||||
QrcodeDropZone,
|
||||
// QrcodeCapture,
|
||||
BIcon,
|
||||
},
|
||||
data() {
|
||||
@ -167,57 +210,9 @@ export default {
|
||||
amount: '',
|
||||
memo: '',
|
||||
},
|
||||
sent: false,
|
||||
send: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
sendbutton() {
|
||||
this.sent = true
|
||||
},
|
||||
async onDecode(decodedString) {
|
||||
//console.log('onDecode JSON.parse(decodedString)', JSON.parse(decodedString))
|
||||
const arr = JSON.parse(decodedString)
|
||||
//console.log('qr-email', arr[0].email)
|
||||
//console.log('qr-amount', arr[0].amount)
|
||||
|
||||
this.form.email = arr[0].email
|
||||
this.form.amount1 = arr[0].amount
|
||||
},
|
||||
async onDetect(promise) {
|
||||
try {
|
||||
const {
|
||||
imageData, // raw image data of image/frame
|
||||
content, // decoded String
|
||||
location, // QR code coordinates
|
||||
} = await promise
|
||||
// console.log('onDetect promise',promise)
|
||||
//console.log('JSON.parse(decodedString)',JSON.parse(promise) )
|
||||
const arr = JSON.parse(decodedString)
|
||||
} catch (error) {
|
||||
// ...
|
||||
}
|
||||
},
|
||||
async onSubmit() {
|
||||
//event.preventDefault()
|
||||
//console.log("onSubmit", this.form)
|
||||
this.$store.state.ajaxCreateData.session_id = this.$cookies.get('gdd_session_id')
|
||||
this.$store.state.ajaxCreateData.email = this.form.email
|
||||
this.$store.state.ajaxCreateData.amount = this.form.amount
|
||||
this.$store.state.ajaxCreateData.memo = this.form.memo
|
||||
this.$store.state.ajaxCreateData.target_date = Date.now()
|
||||
|
||||
this.$store.dispatch('ajaxCreate')
|
||||
},
|
||||
onReset(event) {
|
||||
event.preventDefault()
|
||||
this.form.email = ''
|
||||
this.form.amount = ''
|
||||
this.show = false
|
||||
this.$nextTick(() => {
|
||||
this.show = true
|
||||
})
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
state() {
|
||||
return this.name.length >= 4
|
||||
@ -229,6 +224,48 @@ export default {
|
||||
return 'Bitte geben Sie eine GDD Adresse ein.'
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async onDecode(decodedString) {
|
||||
//console.log('onDecode JSON.parse(decodedString)', JSON.parse(decodedString))
|
||||
const arr = JSON.parse(decodedString)
|
||||
//console.log('qr-email', arr[0].email)
|
||||
//console.log('qr-amount', arr[0].amount)
|
||||
this.form.email = arr[0].email
|
||||
this.form.amount = arr[0].amount
|
||||
this.scan = false
|
||||
},
|
||||
async onSubmit() {
|
||||
//event.preventDefault()
|
||||
//console.log("onSubmit", this.form)
|
||||
this.$store.state.ajaxCreateData.session_id = this.$cookies.get('gdd_session_id')
|
||||
this.$store.state.ajaxCreateData.email = this.form.email
|
||||
this.$store.state.ajaxCreateData.amount = this.form.amount
|
||||
this.$store.state.ajaxCreateData.memo = this.form.memo
|
||||
this.$store.state.ajaxCreateData.target_date = Date.now()
|
||||
|
||||
this.$store.state.row_form = false
|
||||
this.$store.state.row_check = true
|
||||
this.$store.state.row_thx = false
|
||||
},
|
||||
sendTransaction() {
|
||||
this.$store.dispatch('ajaxCreate')
|
||||
this.$store.state.row_form = false
|
||||
this.$store.state.row_check = false
|
||||
this.$store.state.row_thx = true
|
||||
},
|
||||
onReset(event) {
|
||||
event.preventDefault()
|
||||
this.form.email = ''
|
||||
this.form.amount = ''
|
||||
this.show = false
|
||||
this.$nextTick(() => {
|
||||
this.show = true
|
||||
})
|
||||
this.$store.state.row_form = true
|
||||
this.$store.state.row_check = false
|
||||
this.$store.state.row_thx = false
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
@ -1,13 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-row>
|
||||
<b-row v-show="$store.state.row_form">
|
||||
<b-col xl="6" md="6">
|
||||
<stats-card type="gradient-red" sub-title="balance_gdd" class="mb-4 h1">
|
||||
<stats-card
|
||||
type="gradient-red"
|
||||
sub-title="balance_gdd"
|
||||
class="mb-4 h1"
|
||||
style="background-color: #ebebeba3 !important"
|
||||
>
|
||||
{{ $n($store.state.user.balance) }} GDD
|
||||
</stats-card>
|
||||
</b-col>
|
||||
<b-col xl="6" md="6">
|
||||
<stats-card type="gradient-orange" sub-title="balance_gdt" class="mb-4 h1">
|
||||
<stats-card
|
||||
type="gradient-orange"
|
||||
sub-title="balance_gdt"
|
||||
class="mb-4 h1"
|
||||
style="background-color: #ebebeba3 !important"
|
||||
>
|
||||
{{ $n($store.state.user.balance_gdt) }} GDT
|
||||
</stats-card>
|
||||
</b-col>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-list-group>
|
||||
<b-list-group v-show="$store.state.row_form">
|
||||
<b-list-group-item
|
||||
v-for="item in filteredItems"
|
||||
:key="item.id"
|
||||
@ -111,12 +111,20 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredItems(a) {
|
||||
// console.log("filteredItems date",a.items)
|
||||
return a.items
|
||||
filteredItems() {
|
||||
return this.ojectToArray(this.items).reverse()
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
ojectToArray(obj) {
|
||||
let result = new Array(Object.keys(obj).length)
|
||||
Object.entries(obj).forEach((entry) => {
|
||||
const [key, value] = entry
|
||||
result[key] = value
|
||||
})
|
||||
return result
|
||||
},
|
||||
|
||||
rowClass(item, type) {
|
||||
if (!item || type !== 'row') return
|
||||
if (item.type === 'receive') return 'table-success'
|
||||
|
||||
@ -18,6 +18,11 @@
|
||||
</div>
|
||||
</b-list-group-item>
|
||||
</b-list-group>
|
||||
<hr />
|
||||
<b-icon icon="clock-history" class="m-1" font-scale="2" style="color: orange"></b-icon>
|
||||
Wartet auf Bestätigung |
|
||||
<b-icon icon="check2-all" class="m-1" font-scale="2" style="color: green"></b-icon>
|
||||
bestätigt
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -30,25 +35,25 @@ export default {
|
||||
items: [
|
||||
{
|
||||
id: 1,
|
||||
text: 'Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum ',
|
||||
text: 'Zwei Säcke Plastikmüll im Wald gesammelt',
|
||||
datel: '12.12.2020 14:04',
|
||||
status: 'submitted',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
text: 'Larsen Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum ',
|
||||
text: 'Frau Schmidt bei der Gartenarbeit geholfen.',
|
||||
datel: '22.06.2020 22:23',
|
||||
status: 'submitted',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: 'Geneva Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum ',
|
||||
text: 'Ein online Kurs für nachhaltiges Mülltrennen erstellt',
|
||||
datel: '15.04.2020 12:55',
|
||||
status: 'confirmed',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
text: 'Community Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum ',
|
||||
text: 'Gradido bei meinen Freunden vorgestellt',
|
||||
datel: '10.03.2020 18:20',
|
||||
status: 'confirmed',
|
||||
},
|
||||
|
||||
@ -1,10 +1,5 @@
|
||||
<template>
|
||||
<card>
|
||||
<b-row align-v="center" slot="header">
|
||||
<b-col cols="8"></b-col>
|
||||
<b-col cols="4" class="text-right"></b-col>
|
||||
</b-row>
|
||||
|
||||
<card style="background-color: #ebebeba3 !important">
|
||||
<b-form @submit.prevent="updateProfile">
|
||||
<h6 class="heading-small text-muted mb-4">User information</h6>
|
||||
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<b-card no-body class="card-profile" alt="Image placeholder" img-top>
|
||||
<b-card
|
||||
no-body
|
||||
class="card-profile"
|
||||
alt="Image placeholder"
|
||||
img-top
|
||||
style="background-color: #ebebeba3 !important"
|
||||
>
|
||||
<b-row class="justify-content-center">
|
||||
<b-col lg="3" class="order-lg-2">
|
||||
<div class="card-profile-image">
|
||||
|
||||
@ -1,61 +1,47 @@
|
||||
<template>
|
||||
<div>
|
||||
<div
|
||||
class="header pb-8 pt-5 pt-lg-8 d-flex align-items-center profile-header"
|
||||
style="max-height: 200px"
|
||||
></div>
|
||||
<div class="header pb-7 pt-5"></div>
|
||||
|
||||
<b-container fluid class="mt--6">
|
||||
<div class="display-4 mb-3">Gemeinschaftsstunden Chart</div>
|
||||
<b-row>
|
||||
<b-col>
|
||||
<div>
|
||||
<gdd-add-work-2 />
|
||||
<div class="chart">
|
||||
<line-chart :height="350" :chart-data="bigLineChart.chartData"></line-chart>
|
||||
</div>
|
||||
<br />
|
||||
</b-col>
|
||||
</b-row>
|
||||
<hr />
|
||||
<div class="display-4 mt-6">Neue Gemeinschaftsstunden eintragen</div>
|
||||
<b-row>
|
||||
<b-col xl="4" class="order-xl-2 mb-5">
|
||||
community
|
||||
<gdd-work-table></gdd-work-table>
|
||||
</b-col>
|
||||
<b-col xl="8" class="order-xl-1">
|
||||
transactions
|
||||
<gdd-table></gdd-table>
|
||||
<b-col>
|
||||
<gdd-add-work-2 />
|
||||
</b-col>
|
||||
</b-row>
|
||||
|
||||
<hr />
|
||||
<div class="display-4 mb-3">Meine Gemeinschaftsstunden Liste</div>
|
||||
<b-row>
|
||||
<b-col xl="6" S>
|
||||
<div class="chart">
|
||||
<line-chart :height="350" :chart-data="bigLineChart.chartData"></line-chart>
|
||||
</div>
|
||||
</b-col>
|
||||
<b-col xl="6">
|
||||
<div class="chart">
|
||||
<line-chart :height="350" :chart-data="bigLineChart.chartData"></line-chart>
|
||||
</div>
|
||||
<b-col class="mb-5">
|
||||
community
|
||||
<gdd-work-table></gdd-work-table>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-container>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import GddTable from '../../views/KontoOverview/GddTable.vue'
|
||||
import GddWorkTable from '../../views/KontoOverview/GddWorkTable.vue'
|
||||
import GddAddWork2 from '../../views/KontoOverview/GddAddWork2.vue'
|
||||
|
||||
import * as chartConfigs from '@/components/Charts/config'
|
||||
import LineChart from '@/components/Charts/LineChart'
|
||||
//import BarChart from '@/components/Charts/BarChart';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GddTable,
|
||||
GddWorkTable,
|
||||
LineChart,
|
||||
GddAddWork2,
|
||||
//BarChart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -70,11 +56,11 @@ export default {
|
||||
chartData: {
|
||||
datasets: [
|
||||
{
|
||||
label: 'Performance',
|
||||
data: [0, 20, 10, 30, 15, 40, 20, 60, 60],
|
||||
label: 'Gemeinschaftsstunden',
|
||||
data: [30, 20, 10, 30, 65, 40, 20, 60, 70],
|
||||
},
|
||||
],
|
||||
labels: ['May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
labels: ['2020 Aug', 'Sep', 'Okt', 'Nov', 'Dez', 'Jan', 'Feb', 'Mär 2021'],
|
||||
},
|
||||
extraOptions: chartConfigs.blueChartOptions,
|
||||
},
|
||||
|
||||
53
login_server/src/cpp/JSONInterface/JsonCheckSessionState.cpp
Normal file
53
login_server/src/cpp/JSONInterface/JsonCheckSessionState.cpp
Normal file
@ -0,0 +1,53 @@
|
||||
#include "JsonCheckSessionState.h"
|
||||
#include "Poco/URI.h"
|
||||
#include "../lib/DataTypeConverter.h"
|
||||
#include "../SingletonManager/SessionManager.h"
|
||||
|
||||
Poco::JSON::Object* JsonCheckSessionState::handle(Poco::Dynamic::Var params)
|
||||
{
|
||||
int session_id = 0;
|
||||
|
||||
bool parameterReaded = false;
|
||||
// if is json object
|
||||
if (params.type() == typeid(Poco::JSON::Object::Ptr)) {
|
||||
Poco::JSON::Object::Ptr paramJsonObject = params.extract<Poco::JSON::Object::Ptr>();
|
||||
/// Throws a RangeException if the value does not fit
|
||||
/// into the result variable.
|
||||
/// Throws a NotImplementedException if conversion is
|
||||
/// not available for the given type.
|
||||
/// Throws InvalidAccessException if Var is empty.
|
||||
try {
|
||||
paramJsonObject->get("session_id").convert(session_id);
|
||||
parameterReaded = true;
|
||||
}
|
||||
catch (Poco::Exception& ex) {
|
||||
return stateError("json exception", ex.displayText());
|
||||
}
|
||||
}
|
||||
else if (params.isVector()) {
|
||||
const Poco::URI::QueryParameters queryParams = params.extract<Poco::URI::QueryParameters>();
|
||||
for (auto it = queryParams.begin(); it != queryParams.end(); it++) {
|
||||
if (it->first == "session_id") {
|
||||
DataTypeConverter::strToInt(it->second, session_id);
|
||||
//session_id = it->second;
|
||||
break;
|
||||
}
|
||||
}
|
||||
parameterReaded = true;
|
||||
}
|
||||
else {
|
||||
return stateError("format not implemented", std::string(params.type().name()));
|
||||
}
|
||||
if (!parameterReaded) {
|
||||
return stateError("parameter couldn't parsed");
|
||||
}
|
||||
auto sm = SessionManager::getInstance();
|
||||
auto session = sm->getSession(session_id);
|
||||
if (session) {
|
||||
return stateSuccess();
|
||||
}
|
||||
else {
|
||||
return customStateError("not found", "session not found");
|
||||
}
|
||||
|
||||
}
|
||||
16
login_server/src/cpp/JSONInterface/JsonCheckSessionState.h
Normal file
16
login_server/src/cpp/JSONInterface/JsonCheckSessionState.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef __JSON_INTERFACE_JSON_CHECK_SESSION_STATE_
|
||||
#define __JSON_INTERFACE_JSON_CHECK_SESSION_STATE_
|
||||
|
||||
#include "JsonRequestHandler.h"
|
||||
|
||||
class JsonCheckSessionState : public JsonRequestHandler
|
||||
{
|
||||
public:
|
||||
Poco::JSON::Object* handle(Poco::Dynamic::Var params);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // __JSON_INTERFACE_JSON_CHECK_SESSION_STATE_
|
||||
@ -4,6 +4,8 @@
|
||||
|
||||
#include "../SingletonManager/SessionManager.h"
|
||||
|
||||
#include "JsonAdminEmailVerificationResend.h"
|
||||
#include "JsonCheckSessionState.h"
|
||||
#include "JsonCreateUser.h"
|
||||
#include "JsonGetLogin.h"
|
||||
#include "JsonUnknown.h"
|
||||
@ -11,7 +13,6 @@
|
||||
#include "JsonGetRunningUserTasks.h"
|
||||
#include "JsonGetUsers.h"
|
||||
#include "JsonLoginViaEmailVerificationCode.h"
|
||||
#include "JsonAdminEmailVerificationResend.h"
|
||||
#include "JsonGetUserInfos.h"
|
||||
#include "JsonUpdateUserInfos.h"
|
||||
#include "JsonUnsecureLogin.h"
|
||||
@ -44,6 +45,9 @@ Poco::Net::HTTPRequestHandler* JsonRequestHandlerFactory::createRequestHandler(c
|
||||
if (url_first_part == "/login") {
|
||||
return new JsonGetLogin;
|
||||
}
|
||||
else if (url_first_part == "/checkSessionState") {
|
||||
return new JsonCheckSessionState;
|
||||
}
|
||||
else if (url_first_part == "/checkTransaction") {
|
||||
return new JsonTransaction;
|
||||
}
|
||||
|
||||
@ -1,29 +1,12 @@
|
||||
#########################################################################################################
|
||||
# Build skeema
|
||||
#########################################################################################################
|
||||
FROM golang:1.14.4 as skeema_build
|
||||
RUN go get -d -v github.com/skeema/skeema
|
||||
WORKDIR /go/src/github.com/skeema/skeema
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/bin/skeema .
|
||||
|
||||
#########################################################################################################
|
||||
# mariadb server
|
||||
#########################################################################################################
|
||||
From mariadb/server:10.5 as mariadb_server
|
||||
|
||||
ENV DOCKER_WORKDIR="/docker-entrypoint-initdb.d"
|
||||
#ENV DOCKER_WORKDIR="/skeema"
|
||||
|
||||
# copy skeema
|
||||
#COPY --from=skeema_build /go/bin/skeema /usr/bin/
|
||||
|
||||
RUN mkdir -p ${DOCKER_WORKDIR}
|
||||
WORKDIR ${DOCKER_WORKDIR}
|
||||
#COPY ./mariadb/.skeema .
|
||||
#COPY ./login_server/skeema/ .
|
||||
#COPY ./mariadb/.skeema.login ./gradido_login/.skeema
|
||||
#COPY ./community_server/skeema/ .
|
||||
#RUN for f in *.c; do cp -- "$f" "$OTHERDIR/old#$f"; done
|
||||
|
||||
# create databases
|
||||
COPY ./mariadb/setup_dbs.sql a_setup_dbs.sql
|
||||
@ -35,52 +18,3 @@ COPY ./community_server/skeema/ .
|
||||
RUN cd ./gradido_community/ && for f in *.sql; do cp -- "$f" "../d_$f"; sed -i '1i use gradido_community;' "../d_$f"; done
|
||||
RUN cd ./gradido_community/insert && for f in *.sql; do cp -- "$f" "../../e_$f"; sed -i '1i use gradido_community;' "../../e_$f"; done
|
||||
|
||||
RUN ls -ls
|
||||
|
||||
|
||||
#USER mysql
|
||||
#VOLUME /var/lib/mysql
|
||||
#RUN mysqld
|
||||
#RUN mysql -e 'CREATE DATABASE gradido_login_server;'
|
||||
#RUN mysql -e 'CREATE DATABASE gradido_community_server;'
|
||||
|
||||
|
||||
#RUN skeema push
|
||||
|
||||
#########################################################################################################
|
||||
# mariadb server selfmade
|
||||
#########################################################################################################
|
||||
From alpine:latest as mariadb_DIV
|
||||
|
||||
ENV DOCKER_WORKDIR="/skeema"
|
||||
|
||||
#VOLUME /var/lib/mysql
|
||||
|
||||
#RUN apt-get update \
|
||||
# && apt-get -y --no-install-recommends install mariadb-server mariadb-client \
|
||||
# && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
||||
RUN apk add mariadb mariadb-client
|
||||
|
||||
# copy skeema
|
||||
COPY --from=skeema_build /go/bin/skeema /usr/bin/
|
||||
|
||||
RUN mkdir -p ${DOCKER_WORKDIR}
|
||||
WORKDIR ${DOCKER_WORKDIR}
|
||||
|
||||
COPY ./mariadb/setup_dbs.sh .
|
||||
COPY ./mariadb/.skeema .
|
||||
COPY ./login_server/skeema/ .
|
||||
COPY ./mariadb/.skeema.login ./gradido_login/.skeema
|
||||
COPY ./community_server/skeema/ .
|
||||
COPY ./mariadb/.skeema.community ./gradido_community/.skeema
|
||||
|
||||
USER mysql
|
||||
#VOLUME /var/lib/mysql
|
||||
#RUN mysqld
|
||||
#RUN chmod +x ./setup_dbs.sh
|
||||
#RUN mysql < setup_dbs.sql
|
||||
#RUN skeema push
|
||||
|
||||
#EXPOSE 3306
|
||||
|
||||
#CMD ["mysld"]
|
||||
5
skeema/.skeema
Normal file
5
skeema/.skeema
Normal file
@ -0,0 +1,5 @@
|
||||
[production]
|
||||
flavor=mariadb:10.5
|
||||
host=mariadb
|
||||
port=3306
|
||||
user=root
|
||||
28
skeema/Dockerfile
Normal file
28
skeema/Dockerfile
Normal file
@ -0,0 +1,28 @@
|
||||
#########################################################################################################
|
||||
# Build skeema
|
||||
#########################################################################################################
|
||||
FROM golang:1.14.4 as skeema_build
|
||||
RUN go get -d -v github.com/skeema/skeema
|
||||
WORKDIR /go/src/github.com/skeema/skeema
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /go/bin/skeema .
|
||||
|
||||
#########################################################################################################
|
||||
# Run skeema
|
||||
#########################################################################################################
|
||||
From alpine:latest as skeema_run
|
||||
|
||||
ENV DOCKER_WORKDIR="/skeema"
|
||||
|
||||
# copy skeema
|
||||
COPY --from=skeema_build /go/bin/skeema /usr/bin/
|
||||
|
||||
RUN mkdir -p ${DOCKER_WORKDIR}
|
||||
WORKDIR ${DOCKER_WORKDIR}
|
||||
|
||||
COPY ./skeema/.skeema .
|
||||
COPY ./login_server/skeema/ .
|
||||
COPY ./mariadb/.skeema.login ./gradido_login/.skeema
|
||||
COPY ./community_server/skeema/ .
|
||||
COPY ./mariadb/.skeema.community ./gradido_community/.skeema
|
||||
|
||||
CMD skeema push
|
||||
Loading…
x
Reference in New Issue
Block a user