mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
reload messages if submited adminarea
This commit is contained in:
parent
c6f2e9fb0d
commit
fd74a2e671
@ -1,23 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="contribution-messages-formular">
|
<div class="contribution-messages-formular">
|
||||||
<div v-if="form.text !== ''" class="mt-5">
|
|
||||||
<h4>{{ $t('preview') }}</h4>
|
|
||||||
<div class="border border-info m-5">
|
|
||||||
<b-row>
|
|
||||||
<b-col cols="1"><b-avatar square text="AA"></b-avatar></b-col>
|
|
||||||
<b-col cols="11">
|
|
||||||
<pre class="mt-2">
|
|
||||||
{{ $store.state.moderator.firstName }} {{ $store.state.moderator.lastName }}
|
|
||||||
</pre>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
<b-row>
|
|
||||||
<b-col>
|
|
||||||
<pre class="ml-3 mt-3 mb-5">{{ form.text }}</pre>
|
|
||||||
</b-col>
|
|
||||||
</b-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<b-form @submit="onSubmit" @reset="onReset">
|
<b-form @submit="onSubmit" @reset="onReset">
|
||||||
<b-form-textarea
|
<b-form-textarea
|
||||||
@ -27,8 +9,14 @@
|
|||||||
rows="3"
|
rows="3"
|
||||||
max-rows="6"
|
max-rows="6"
|
||||||
></b-form-textarea>
|
></b-form-textarea>
|
||||||
<b-button type="submit" variant="primary">{{ $t('form.submit') }}</b-button>
|
<b-row class="mt-4 mb-6">
|
||||||
<b-button type="reset" variant="danger">{{ $t('form.reset') }}</b-button>
|
<b-col>
|
||||||
|
<b-button type="reset" variant="danger">{{ $t('form.reset') }}</b-button>
|
||||||
|
</b-col>
|
||||||
|
<b-col class="text-right">
|
||||||
|
<b-button type="submit" variant="primary">{{ $t('form.submit') }}</b-button>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
</b-form>
|
</b-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -63,6 +51,8 @@ export default {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
|
this.$emit('get-list-contribution-messages', this.contributionId)
|
||||||
|
this.form.text = ''
|
||||||
this.toastSuccess(result)
|
this.toastSuccess(result)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
@ -16,7 +16,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</b-container>
|
</b-container>
|
||||||
|
|
||||||
<contribution-messages-formular :contributionId="contributionId" />
|
<contribution-messages-formular
|
||||||
|
:contributionId="contributionId"
|
||||||
|
@get-list-contribution-messages="getListContributionMessages"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -51,6 +54,7 @@ export default {
|
|||||||
variables: {
|
variables: {
|
||||||
contributionId: id,
|
contributionId: id,
|
||||||
},
|
},
|
||||||
|
fetchPolicy: 'no-cache',
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
// console.log('result', result.data.listContributionMessages)
|
// console.log('result', result.data.listContributionMessages)
|
||||||
|
|||||||
@ -23,12 +23,6 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// storeName: `${this.$store.state.firstName} ${this.$store.state.lastName}`,
|
|
||||||
moderationName: `${this.message.userFirstName} ${this.message.userLastName}`,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
isModerator() {
|
isModerator() {
|
||||||
return this.$store.state.moderator.id === this.message.userId
|
return this.$store.state.moderator.id === this.message.userId
|
||||||
|
|||||||
@ -1,15 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="slot-is-moderator">
|
<div class="slot-is-moderator">
|
||||||
<b-avatar
|
<div class="text-right">
|
||||||
square
|
<b-avatar
|
||||||
:text="`${message.userFirstName[0]} ${message.userLastName[0]}`"
|
square
|
||||||
variant="warning"
|
:text="`${message.userFirstName[0]} ${message.userLastName[0]}`"
|
||||||
></b-avatar>
|
variant="warning"
|
||||||
<span class="ml-2 mr-2">
|
></b-avatar>
|
||||||
{{ message.userFirstName }} {{ message.userLastName }}
|
<span class="ml-2 mr-2">
|
||||||
<small class="ml-4 text-success">{{ $t('moderator') }}</small>
|
{{ message.userFirstName }} {{ message.userLastName }}
|
||||||
</span>
|
<small class="ml-4 text-success">{{ $t('moderator') }}</small>
|
||||||
<div class="mt-2 text-bold h4">{{ message.message }}</div>
|
</span>
|
||||||
|
<div class="mt-2 text-bold h4">{{ message.message }}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -27,7 +29,9 @@ export default {
|
|||||||
<style>
|
<style>
|
||||||
.slot-is-moderator {
|
.slot-is-moderator {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
float: right;
|
||||||
width: 75%;
|
width: 75%;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="slot-is-not-moderator">
|
<div class="slot-is-not-moderator">
|
||||||
<div class="text-right">
|
<div>
|
||||||
<b-avatar
|
<b-avatar
|
||||||
:text="`${message.userFirstName[0]} ${message.userLastName[0]}`"
|
:text="`${message.userFirstName[0]} ${message.userLastName[0]}`"
|
||||||
variant="info"
|
variant="info"
|
||||||
@ -25,14 +25,9 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.clear {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.slot-is-not-moderator {
|
.slot-is-not-moderator {
|
||||||
clear: both;
|
clear: both;
|
||||||
float: right;
|
|
||||||
width: 75%;
|
width: 75%;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user