+
+ userSelectedInMassCreation: {{ userSelectedInMassCreation }}
+
{{ $t('multiple_creation_text') }}
@@ -62,6 +64,11 @@ export default {
CreationFormular,
UserTable,
},
+ props: {
+ userSelectedInMassCreation: {
+ type: Array,
+ },
+ },
data() {
return {
showArrays: false,
@@ -104,8 +111,7 @@ export default {
{ key: 'bookmark', label: this.$t('remove') },
],
itemsList: [],
- itemsMassCreation: [],
- itemsMassCreationReverse: [],
+ itemsMassCreationReverse: this.userSelectedInMassCreation,
radioSelectedMass: '',
criteria: '',
creation: [null, null, null],
@@ -137,6 +143,7 @@ export default {
showDetails: false,
}
})
+ this.updateItem(this.userSelectedInMassCreation, 'mounted')
})
.catch((error) => {
this.$toasted.error(error.message)
@@ -151,22 +158,29 @@ export default {
findArr = this.itemsList.find((item) => e.userId === item.userId)
index = this.itemsList.indexOf(findArr)
this.itemsList.splice(index, 1)
- this.itemsMassCreation.push(findArr)
+ this.userSelectedInMassCreation.push(findArr)
break
case 'remove':
- findArr = this.itemsMassCreation.find((item) => e.userId === item.userId)
- index = this.itemsMassCreation.indexOf(findArr)
- this.itemsMassCreation.splice(index, 1)
+ findArr = this.userSelectedInMassCreation.find((item) => e.userId === item.userId)
+ index = this.userSelectedInMassCreation.indexOf(findArr)
+ this.userSelectedInMassCreation.splice(index, 1)
this.itemsList.push(findArr)
break
+ case 'mounted':
+ this.userSelectedInMassCreation.map((value, key) => {
+ findArr = this.itemsList.find((item) => value.userId === item.userId)
+ index = this.itemsList.indexOf(findArr)
+ this.itemsList.splice(index, 1)
+ })
+ break
default:
throw new Error(event)
}
- this.itemsMassCreationReverse = this.itemsMassCreation
+ this.itemsMassCreationReverse = this.userSelectedInMassCreation
this.itemsMassCreationReverse.reverse()
},
removeAllBookmark() {
- this.itemsMassCreation = []
+ this.userSelectedInMassCreation = []
this.getUsers()
},
},
diff --git a/admin/src/router/routes.js b/admin/src/router/routes.js
index 72e7b1ac5..2d7667329 100644
--- a/admin/src/router/routes.js
+++ b/admin/src/router/routes.js
@@ -18,6 +18,7 @@ const routes = [
{
path: '/creation',
component: () => import('@/pages/Creation.vue'),
+ props: { userSelectedInMassCreation: [] },
},
{
path: '/creation-confirm',