mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch '1197-admin-interface-created-transactions-list' into 1196-send-registration-link
This commit is contained in:
commit
d3105bbbad
40
admin/src/components/ConfirmRegisterMailFormular.spec.js
Normal file
40
admin/src/components/ConfirmRegisterMailFormular.spec.js
Normal file
@ -0,0 +1,40 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import ConfirmRegisterMailFormular from './ConfirmRegisterMailFormular.vue'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
const mocks = {
|
||||
$moment: jest.fn(() => {
|
||||
return {
|
||||
format: jest.fn((m) => m),
|
||||
subtract: jest.fn(() => {
|
||||
return {
|
||||
format: jest.fn((m) => m),
|
||||
}
|
||||
}),
|
||||
}
|
||||
}),
|
||||
}
|
||||
|
||||
const propsData = {
|
||||
email: '',
|
||||
dateLastSend: '',
|
||||
}
|
||||
|
||||
describe('ConfirmRegisterMailFormular', () => {
|
||||
let wrapper
|
||||
|
||||
const Wrapper = () => {
|
||||
return mount(ConfirmRegisterMailFormular, { localVue, mocks, propsData })
|
||||
}
|
||||
|
||||
describe('mount', () => {
|
||||
beforeEach(() => {
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
|
||||
it('has a DIV element with the class.component-confirm-register-mail', () => {
|
||||
expect(wrapper.find('.component-confirm-register-mail').exists()).toBeTruthy()
|
||||
})
|
||||
})
|
||||
})
|
||||
47
admin/src/components/ConfirmRegisterMailFormular.vue
Normal file
47
admin/src/components/ConfirmRegisterMailFormular.vue
Normal file
@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div class="component-confirm-register-mail">
|
||||
<div class="shadow p-3 mb-5 bg-white rounded">
|
||||
<div class="h5">
|
||||
Die letzte Email wurde am
|
||||
<b>{{ dateLastSend }} Uhr</b>
|
||||
an das Mitglied ({{ email }}) gesendet.
|
||||
</div>
|
||||
|
||||
<!-- Using components -->
|
||||
<b-input-group prepend="Email bestätigen, wiederholt senden an:" class="mt-3">
|
||||
<b-form-input readonly :value="email"></b-form-input>
|
||||
<b-input-group-append>
|
||||
<b-button variant="outline-success" class="test-button" @click="sendRegisterMail">
|
||||
Registrierungs-Email bestätigen, jetzt senden
|
||||
</b-button>
|
||||
</b-input-group-append>
|
||||
</b-input-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// import { verifyLogin } from '../graphql/verifyLogin'
|
||||
// import { createPendingCreation } from '../graphql/createPendingCreation'
|
||||
export default {
|
||||
name: 'ConfirmRegisterMail',
|
||||
props: {
|
||||
email: {
|
||||
type: String,
|
||||
},
|
||||
dateLastSend: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
sendRegisterMail() {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('sende wiederholt den ConfirmText an die register E-Mail des User!')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.input-group-text {
|
||||
background-color: rgb(255, 252, 205);
|
||||
}
|
||||
</style>
|
||||
@ -204,8 +204,6 @@ export default {
|
||||
// Die anzahl der Mitglieder aus der Mehrfachschöpfung
|
||||
const i = Object.keys(this.itemsMassCreation).length
|
||||
// hinweis das eine Mehrfachschöpfung ausgeführt wird an (Anzahl der MItgleider an die geschöpft wird)
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('SUBMIT CREATION => ' + this.type + ' >> für VIELE ' + i + ' Mitglieder')
|
||||
this.submitObj = [
|
||||
{
|
||||
item: this.itemsMassCreation,
|
||||
@ -216,8 +214,6 @@ export default {
|
||||
moderator: this.$store.state.moderator.id,
|
||||
},
|
||||
]
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('MehrfachSCHÖPFUNG ABSENDEN FÜR >> ' + i + ' Mitglieder')
|
||||
|
||||
// $store - offene Schöpfungen hochzählen
|
||||
this.$store.commit('openCreationsPlus', i)
|
||||
|
||||
59
admin/src/components/CreationTransactionListFormular.vue
Normal file
59
admin/src/components/CreationTransactionListFormular.vue
Normal file
@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<div class="component-creation-transaction-list">
|
||||
Alle Geschöpften Transaktionen für den User
|
||||
<b-table striped hover :items="items"></b-table>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'CreationTransactionList',
|
||||
data() {
|
||||
return {
|
||||
items: [
|
||||
{
|
||||
gdd: 700,
|
||||
date: '16.11.2021',
|
||||
memo: 'klaljk jakldasjd lajlaldjalajsd aasj asdl jaljaldj aa jda l jdla jda',
|
||||
moderator: 'Moderator Eins',
|
||||
},
|
||||
{
|
||||
gdd: 800,
|
||||
date: '23.10.2021',
|
||||
memo: 'jij ijdas ijad sa jsd a ijaojodjajd jiaojdja dij aij doa aojd ao jd',
|
||||
moderator: 'Moderator Eins',
|
||||
},
|
||||
{
|
||||
gdd: 1000,
|
||||
date: '13.09.2021',
|
||||
memo: 'asdd d adad adsdadda dsdadadasds asdadada da dadadad adadada d',
|
||||
moderator: 'Moderator Eins',
|
||||
},
|
||||
{
|
||||
gdd: 400,
|
||||
date: '03.07.2021',
|
||||
memo: 'casc acas ac acacacs cac acacac acc acac ca cacac',
|
||||
moderator: 'Moderator Zwei',
|
||||
},
|
||||
{
|
||||
gdd: 210,
|
||||
date: '04.06.2021',
|
||||
memo: 'asc dfdvdvdf vfvd vdfvdff vdvdfvd vff dvfd vdfv dfv dfvdf vdfvdfv',
|
||||
moderator: 'Moderator Eins',
|
||||
},
|
||||
{
|
||||
gdd: 890,
|
||||
date: '07.05.2021',
|
||||
memo: 'reett ttertt etet et et ertetetet et ert et ertertertet',
|
||||
moderator: 'Moderator Eins',
|
||||
},
|
||||
{
|
||||
gdd: 380,
|
||||
date: '22.04.2021',
|
||||
memo: 'bnnbnbbncvbcv bcbcbc bcb cbc bcb cvb cbccvvbcvb bvbcbcbcbc bcb cb',
|
||||
moderator: 'Moderator Zwei',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="component-nabvar">
|
||||
<b-navbar toggleable="sm" type="dark" variant="success">
|
||||
<b-navbar toggleable="md" type="dark" variant="success" class="p-3">
|
||||
<b-navbar-brand to="/">
|
||||
<img src="img/brand/green.png" class="navbar-brand-img" alt="..." />
|
||||
</b-navbar-brand>
|
||||
@ -9,19 +9,18 @@
|
||||
|
||||
<b-collapse id="nav-collapse" is-nav>
|
||||
<b-navbar-nav>
|
||||
<b-nav-item to="/">Übersicht |</b-nav-item>
|
||||
<b-nav-item to="/user">Usersuche |</b-nav-item>
|
||||
<b-nav-item to="/">Übersicht</b-nav-item>
|
||||
<b-nav-item to="/user">Usersuche</b-nav-item>
|
||||
<b-nav-item to="/creation">Mehrfachschöpfung</b-nav-item>
|
||||
<b-nav-item
|
||||
v-show="$store.state.openCreations > 0"
|
||||
class="h5 bg-danger"
|
||||
class="bg-color-creation p-1"
|
||||
to="/creation-confirm"
|
||||
>
|
||||
| {{ $store.state.openCreations }} offene Schöpfungen
|
||||
{{ $store.state.openCreations }} offene Schöpfungen
|
||||
</b-nav-item>
|
||||
<b-nav-item @click="wallet">Wallet</b-nav-item>
|
||||
<b-nav-item @click="logout">Logout</b-nav-item>
|
||||
<!-- <b-nav-item v-show="open < 1" to="/creation-confirm">| keine offene Schöpfungen</b-nav-item> -->
|
||||
</b-navbar-nav>
|
||||
</b-collapse>
|
||||
</b-navbar>
|
||||
@ -49,4 +48,7 @@ export default {
|
||||
height: 2rem;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.bg-color-creation {
|
||||
background-color: #cf1010dc;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -40,7 +40,8 @@
|
||||
<b-button
|
||||
variant="info"
|
||||
size="md"
|
||||
@click="editCreationUserTable(row, row.item)"
|
||||
:class="'details_' + row.detailsShowing"
|
||||
@click="editCreationUserTable(row)"
|
||||
class="mr-2"
|
||||
>
|
||||
<b-icon v-if="row.detailsShowing" icon="x" aria-label="Help"></b-icon>
|
||||
@ -49,40 +50,85 @@
|
||||
</template>
|
||||
|
||||
<template #cell(show_details)="row">
|
||||
<b-button variant="info" size="md" @click="row.toggleDetails" class="mr-2">
|
||||
<b-button
|
||||
variant="info"
|
||||
size="md"
|
||||
:ref="'showing_detals_' + row.detailsShowing"
|
||||
@click="rowDetailsToogle(row, row.detailsShowing)"
|
||||
class="mr-2"
|
||||
>
|
||||
<b-icon v-if="row.detailsShowing" icon="eye-slash-fill" aria-label="Help"></b-icon>
|
||||
<b-icon v-else icon="eye-fill" aria-label="Help"></b-icon>
|
||||
</b-button>
|
||||
</template>
|
||||
|
||||
<template #cell(confirm_mail)="row">
|
||||
<b-button
|
||||
:variant="row.item.firstName === 'Peter' ? 'success' : 'danger'"
|
||||
size="md"
|
||||
:ref="'showing_registermail_detals_' + row.detailsShowing"
|
||||
@click="
|
||||
row.item.firstName !== 'Peter'
|
||||
? rowDetailsToogleRegisterMail(row, row.detailsShowing)
|
||||
: ''
|
||||
"
|
||||
class="mr-2"
|
||||
>
|
||||
<b-icon
|
||||
:icon="row.item.firstName === 'Peter' ? 'envelope-open' : 'envelope'"
|
||||
aria-label="Help"
|
||||
></b-icon>
|
||||
</b-button>
|
||||
</template>
|
||||
|
||||
<template #cell(transactions_list)="row">
|
||||
<b-button
|
||||
variant="warning"
|
||||
size="md"
|
||||
:ref="'showing_transactions_list_' + row.detailsShowing"
|
||||
@click="rowDetailsToogleTransactionsList(row, row.detailsShowing)"
|
||||
class="mr-2"
|
||||
>
|
||||
<b-icon icon="list"></b-icon>
|
||||
</b-button>
|
||||
</template>
|
||||
|
||||
<template #row-details="row">
|
||||
<b-card class="shadow-lg p-3 mb-5 bg-white rounded">
|
||||
<b-card class="shadow-lg pl-3 pr-3 mb-5 bg-white rounded">
|
||||
<b-row class="mb-2">
|
||||
<b-col></b-col>
|
||||
</b-row>
|
||||
{{ type }}
|
||||
<creation-formular
|
||||
v-if="type === 'PageUserSearch'"
|
||||
type="singleCreation"
|
||||
:pagetype="type"
|
||||
:creation="row.item.creation"
|
||||
:item="row.item"
|
||||
:creationUserData="creationUserData"
|
||||
@update-creation-data="updateCreationData"
|
||||
@update-user-data="updateUserData"
|
||||
/>
|
||||
<edit-creation-formular
|
||||
v-else
|
||||
type="singleCreation"
|
||||
:pagetype="type"
|
||||
:creation="row.item.creation"
|
||||
:item="row.item"
|
||||
:row="row"
|
||||
:creationUserData="creationUserData"
|
||||
@update-creation-data="updateCreationData"
|
||||
@update-user-data="updateUserData"
|
||||
<div v-if="showCreationFormular">
|
||||
<creation-formular
|
||||
v-if="type === 'PageUserSearch'"
|
||||
type="singleCreation"
|
||||
:pagetype="type"
|
||||
:creation="row.item.creation"
|
||||
:item="row.item"
|
||||
:creationUserData="creationUserData"
|
||||
@update-creation-data="updateCreationData"
|
||||
@update-user-data="updateUserData"
|
||||
/>
|
||||
<edit-creation-formular
|
||||
v-else
|
||||
type="singleCreation"
|
||||
:pagetype="type"
|
||||
:creation="row.item.creation"
|
||||
:item="row.item"
|
||||
:row="row"
|
||||
:creationUserData="creationUserData"
|
||||
@update-creation-data="updateCreationData"
|
||||
@update-user-data="updateUserData"
|
||||
/>
|
||||
</div>
|
||||
<confirm-register-mail-formular
|
||||
v-if="showConfirmRegisterMailFormular"
|
||||
:email="row.item.email"
|
||||
:dateLastSend="$moment().subtract(1, 'month').format('dddd, DD.MMMM.YYYY HH:mm'),"
|
||||
/>
|
||||
|
||||
<creation-transaction-list-formular v-if="showCreationTransactionListFormular" />
|
||||
|
||||
<b-button size="sm" @click="row.toggleDetails">
|
||||
<b-icon
|
||||
:icon="type === 'PageCreationConfirm' ? 'x' : 'eye-slash-fill'"
|
||||
@ -132,6 +178,9 @@
|
||||
<script>
|
||||
import CreationFormular from '../components/CreationFormular.vue'
|
||||
import EditCreationFormular from '../components/EditCreationFormular.vue'
|
||||
import ConfirmRegisterMailFormular from '../components/ConfirmRegisterMailFormular.vue'
|
||||
import CreationTransactionListFormular from '../components/CreationTransactionListFormular.vue'
|
||||
|
||||
import { confirmPendingCreation } from '../graphql/confirmPendingCreation'
|
||||
|
||||
export default {
|
||||
@ -162,9 +211,14 @@ export default {
|
||||
components: {
|
||||
CreationFormular,
|
||||
EditCreationFormular,
|
||||
ConfirmRegisterMailFormular,
|
||||
CreationTransactionListFormular,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showCreationFormular: null,
|
||||
showConfirmRegisterMailFormular: null,
|
||||
showCreationTransactionListFormular: null,
|
||||
creationUserData: {},
|
||||
overlay: false,
|
||||
overlayBookmarkType: '',
|
||||
@ -181,6 +235,73 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
rowDetailsToogle(row, details) {
|
||||
if (
|
||||
this.showConfirmRegisterMailFormular === true ||
|
||||
this.showCreationTransactionListFormular === true
|
||||
) {
|
||||
this.showCreationFormular = true
|
||||
this.showConfirmRegisterMailFormular = false
|
||||
this.showCreationTransactionListFormular = false
|
||||
return
|
||||
}
|
||||
if (details) {
|
||||
row.toggleDetails()
|
||||
this.showCreationFormular = null
|
||||
this.showConfirmRegisterMailFormular = null
|
||||
this.showCreationTransactionListFormular = null
|
||||
}
|
||||
if (!details) {
|
||||
row.toggleDetails()
|
||||
this.showCreationFormular = true
|
||||
if (this.$refs.showing_detals_true !== undefined) {
|
||||
this.$refs.showing_detals_true.click()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
rowDetailsToogleRegisterMail(row, details) {
|
||||
if (this.showCreationFormular === true || this.showCreationTransactionListFormular === true) {
|
||||
this.showCreationFormular = false
|
||||
this.showConfirmRegisterMailFormular = true
|
||||
this.showCreationTransactionListFormular = false
|
||||
return
|
||||
}
|
||||
if (details) {
|
||||
row.toggleDetails()
|
||||
this.showCreationFormular = null
|
||||
this.showConfirmRegisterMailFormular = null
|
||||
this.showCreationTransactionListFormular = null
|
||||
}
|
||||
if (!details) {
|
||||
row.toggleDetails()
|
||||
this.showConfirmRegisterMailFormular = true
|
||||
if (this.$refs.showing_registermail_detals_true !== undefined) {
|
||||
this.$refs.showing_registermail_detals_true.click()
|
||||
}
|
||||
}
|
||||
},
|
||||
rowDetailsToogleTransactionsList(row, details) {
|
||||
if (this.showCreationFormular === true || this.showConfirmRegisterMailFormular === true) {
|
||||
this.showCreationFormular = false
|
||||
this.showConfirmRegisterMailFormular = false
|
||||
this.showCreationTransactionListFormular = true
|
||||
return
|
||||
}
|
||||
if (details) {
|
||||
row.toggleDetails()
|
||||
this.showCreationFormular = null
|
||||
this.showConfirmRegisterMailFormular = null
|
||||
this.showCreationTransactionListFormular = null
|
||||
}
|
||||
if (!details) {
|
||||
row.toggleDetails()
|
||||
this.showCreationTransactionListFormular = true
|
||||
if (this.$refs.showing_transactions_list_true !== undefined) {
|
||||
this.$refs.showing_transactions_list_true.click()
|
||||
}
|
||||
}
|
||||
},
|
||||
overlayShow(bookmarkType, item) {
|
||||
this.overlay = true
|
||||
this.overlayBookmarkType = bookmarkType
|
||||
|
||||
@ -40,7 +40,6 @@
|
||||
:items="itemsMassCreation"
|
||||
@remove-all-bookmark="removeAllBookmark"
|
||||
/>
|
||||
{{ itemsMassCreation }}
|
||||
</b-col>
|
||||
</b-row>
|
||||
</div>
|
||||
|
||||
@ -28,28 +28,6 @@
|
||||
</b-link>
|
||||
</b-card-text>
|
||||
</b-card>
|
||||
<br />
|
||||
<hr />
|
||||
<br />
|
||||
<b-list-group>
|
||||
<b-list-group-item class="bg-secondary text-light" href="user">
|
||||
zur Usersuche
|
||||
</b-list-group-item>
|
||||
<b-list-group-item class="d-flex justify-content-between align-items-center">
|
||||
Mitglieder
|
||||
<b-badge class="bg-success" pill>2400</b-badge>
|
||||
</b-list-group-item>
|
||||
|
||||
<b-list-group-item class="d-flex justify-content-between align-items-center">
|
||||
aktive Mitglieder
|
||||
<b-badge class="bg-primary" pill>2201</b-badge>
|
||||
</b-list-group-item>
|
||||
|
||||
<b-list-group-item class="d-flex justify-content-between align-items-center">
|
||||
nicht bestätigte Mitglieder
|
||||
<b-badge class="bg-warning text-dark" pill>120</b-badge>
|
||||
</b-list-group-item>
|
||||
</b-list-group>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@ -4,16 +4,23 @@
|
||||
<b-input
|
||||
type="text"
|
||||
v-model="criteria"
|
||||
class="shadow p-3 mb-5 bg-white rounded"
|
||||
class="shadow p-3 mb-3 bg-white rounded"
|
||||
placeholder="User suche"
|
||||
@input="getUsers"
|
||||
></b-input>
|
||||
|
||||
<user-table
|
||||
type="PageUserSearch"
|
||||
:itemsUser="searchResult"
|
||||
:fieldsTable="fields"
|
||||
:criteria="criteria"
|
||||
/>
|
||||
<div>
|
||||
<b-button block variant="danger" @click="unconfirmedRegisterMails">
|
||||
<b-icon icon="envelope" variant="light"></b-icon>
|
||||
Anzeigen aller nicht registrierten E-Mails.
|
||||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -40,6 +47,8 @@ export default {
|
||||
},
|
||||
},
|
||||
{ key: 'show_details', label: 'Details' },
|
||||
{ key: 'confirm_mail', label: 'Mail' },
|
||||
{ key: 'transactions_list', label: 'Transaction' },
|
||||
],
|
||||
searchResult: [],
|
||||
massCreation: [],
|
||||
@ -48,6 +57,9 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
unconfirmedRegisterMails() {
|
||||
alert('Apollo anfrage, alle Mitglieder, die nicht ihre Register E-Mail bestätigt haben.')
|
||||
},
|
||||
getUsers() {
|
||||
this.$apollo
|
||||
.query({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user