mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
update community
This commit is contained in:
commit
8c14a07872
@ -17,19 +17,21 @@ import icon from "./icon.js";
|
||||
export default {
|
||||
name: 'app',
|
||||
components: {
|
||||
ParticlesBg,
|
||||
ParticlesBg
|
||||
},
|
||||
created () {
|
||||
//console.log("this.$cookies.get('gdd_session_id') ", this.$cookies.get('gdd_session_id') )
|
||||
//console.log(" $cookies.isKey('gdd_session_id') == true", this.$cookies.isKey("gdd_session_id") == true )
|
||||
if ( this.$cookies.get('gdd_session_id') == this.$store.state.session_id ) {
|
||||
//this.$store.state.email = this.$cookies.get('gdd_u')
|
||||
console.log(" $cookies.isKey('gdd_session_id') ", this.$cookies.isKey("gdd_session_id") )
|
||||
if ( this.$cookies.isKey('gdd_session_id') ) {
|
||||
//this.$store.state.email = this.$cookies.get('gdd_u')
|
||||
console.log("login to kontooverview")
|
||||
this.$router.push('/KontoOverview')
|
||||
}else {
|
||||
console.log("login to LOGIN")
|
||||
this.$router.push("/Login")
|
||||
}
|
||||
},
|
||||
data: function () {
|
||||
data() {
|
||||
return {
|
||||
config: {
|
||||
num: [1, 7],
|
||||
@ -51,12 +53,11 @@ export default {
|
||||
</script>
|
||||
<style>
|
||||
.btn {
|
||||
background-color: #5A7B02;
|
||||
border-color: #5e72e4;
|
||||
background-color: #5A7B02;
|
||||
border-color: #5e72e4;
|
||||
}
|
||||
a, .copyright{
|
||||
color: #5A7B02;
|
||||
|
||||
color: #5A7B02;
|
||||
}
|
||||
gradido-global-color-text{color: #3D443B }
|
||||
gradido-global-color-accent{color: #047006 }
|
||||
|
||||
@ -59,8 +59,10 @@ export const store = new Vuex.Store({
|
||||
// Asyncronous actions - used for api calls
|
||||
actions: {
|
||||
login: async ({ dispatch, commit }, data) => {
|
||||
//console.log('action: login')
|
||||
console.log('action: login')
|
||||
const result = await loginAPI.login(data.email,data.password)
|
||||
console.log('result',result)
|
||||
console.log('result.success',result.success)
|
||||
if( result.success ){
|
||||
commit('session_id', result.result.data.session_id)
|
||||
commit('email', data.email)
|
||||
|
||||
@ -22,27 +22,53 @@
|
||||
<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">von</label>
|
||||
<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"/>
|
||||
<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">bis</label>
|
||||
<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"/>
|
||||
<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 class="col-md-2 col-form-label form-control-label">Ort</label>
|
||||
<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"></base-input>
|
||||
<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" id="exampleFormControlTextarea3" rows="3" v-model="form.text"></textarea>
|
||||
<textarea class="form-control form-control-lg" rows="3" v-model="form.text" ></textarea>
|
||||
</base-input>
|
||||
|
||||
<br>
|
||||
@ -61,6 +87,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'GDDAddWork',
|
||||
data(){
|
||||
@ -69,11 +96,12 @@ export default {
|
||||
form: {
|
||||
from:'',
|
||||
to: '',
|
||||
hours: 0,
|
||||
hours: '',
|
||||
text: '',
|
||||
gdd: 0.00,
|
||||
location: '',
|
||||
text2: ''
|
||||
text2: '',
|
||||
sendtime: ''
|
||||
},
|
||||
timestamp: ""
|
||||
}
|
||||
@ -82,24 +110,23 @@ export default {
|
||||
setInterval(this.getNow, 2000);
|
||||
},
|
||||
methods: {
|
||||
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();
|
||||
dateDiff() {
|
||||
this.form.hours = ((((this.$moment(this.form.to)) - (this.$moment(this.form.from)))/1000)/3600)
|
||||
},
|
||||
getHours: function (from,to) {
|
||||
const a = (to - from)
|
||||
console.log("(to - from)", (to - from))
|
||||
console.log("a summe", a)
|
||||
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.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))
|
||||
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user