mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
requestor call AddPersons modal, and pass options until api (wip)
This commit is contained in:
parent
242c2b31a3
commit
b37a7d2690
@ -40,9 +40,10 @@
|
|||||||
|
|
||||||
<add-persons
|
<add-persons
|
||||||
buttonTitle="requestor.add_requestor"
|
buttonTitle="requestor.add_requestor"
|
||||||
v-bind:key="addNewPersons.key"
|
v-bind:key="addPersons.key"
|
||||||
v-bind:options="addNewPersons.options"
|
v-bind:options="addPersons.options"
|
||||||
@addNewPersons="addNewPersons">
|
@addNewPersons="addNewPersons"
|
||||||
|
ref="addPersons"> <!-- to cast child method -->
|
||||||
</add-persons>
|
</add-persons>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -58,7 +59,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
addNewPersons: {
|
addPersons: {
|
||||||
key: 'requestor',
|
key: 'requestor',
|
||||||
options: {
|
options: {
|
||||||
type: ['person', 'thirdparty'],
|
type: ['person', 'thirdparty'],
|
||||||
@ -77,11 +78,10 @@ export default {
|
|||||||
addNewPersons({ selected, modal }) {
|
addNewPersons({ selected, modal }) {
|
||||||
console.log('@@@ CLICK button addNewPersons', selected);
|
console.log('@@@ CLICK button addNewPersons', selected);
|
||||||
selected.forEach(function(item) {
|
selected.forEach(function(item) {
|
||||||
//console.log('# dispatch action for each item', item);
|
this.$store.dispatch('addRequestor', item);
|
||||||
console.log('HU-HUE, we want add new requestor !!', item);
|
|
||||||
//this.$store.dispatch('addRequestor', item);
|
|
||||||
}, this
|
}, this
|
||||||
);
|
);
|
||||||
|
this.$refs.addPersons.resetSearch(); // to cast child method
|
||||||
modal.showModal = false;
|
modal.showModal = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user