I'm having two templates sharing the same . They are opening on a different actions. When user tries to submit:
submit() {
if (canSubmit) {
if (moment(plannedDeliveryDate).isSame(actualDeliveryDate, 'day') === false) {
this._renderModal('pending-delivery/submit-date-confirm');
} else {
this._renderModal('pending-delivery/submit-confirm');
}
}
},
_renderModal(path) {
this.render(path, {
into: 'application',
outlet: 'modal'
});
},
And when user tries to accept a line:
accept(line) {
if (line.get('status') === 'Modified') {
this.render('pending-delivery/pending-delivery-line/accept', {
into: 'application',
outlet: 'modal',
controller: 'pending-delivery.pending-delivery-line',
model: line
});
} else {
line.set('status', 'Accepted');
line.save()
.then(() => this.refreshPendingDeliveryRoute());
}
},
After the second (accept line) modal has been rendered the first one (submit) won't render any longer. There are no errors in the console. And if i visit a child route the modal is popping up immediately.
Aucun commentaire:
Enregistrer un commentaire