I have a modal dialog that opens up, after making changes and clicking save, its saving but not refreshing the data on the parent page, any help please?
Hi, I have a modal dialog that opens up, after making changes and clicking save, its saving but not refreshing the data on the parent page, any help please?
setViolationInactive: function () {
var scope = this;
console.log('content');
console.log(this.get('content.ResultId'));
let model = this.get('model');
console.log('model 001');
console.log(model);
//validating form
if ($("#edit-violationinactive-form").validate()) {
var data = {
ViolationId: this.get('model.ViolationId'),
ResultId: this.get('content.ResultId'),
InactiveComment: this.get('inactiveComment'),
};
scope.api('InspectionItem/SetViolationInactiveResult').post(data).then(function (response) {
$('.modal').modal('hide');
toastr.success("Violation set Inactive.");
scope.transitionToRoute("result.details");
scope.get('result.details').refreshData();
scope.clearForm();
}, function (error) {
$('.modal').modal('hide');
scope.transitionToRoute('result.details');
toastr.error("Error saving violation inactive.");
});
}
else {
toastr.warning("Please fix the form", "Validation failed");
}
},
Any help why is it not refreshing the result details page, the route for that one is: result.details, any help please?
Aucun commentaire:
Enregistrer un commentaire