Skip to content
Commits on Source (2)
......@@ -5,12 +5,19 @@
.controller('MostReviewCreateController', MostReviewCreateController);
function MostReviewCreateController(
$state,
_,
asyncAction,
fileUploadService,
mostReviewApiClient,
proposal
) {
var self = this;
var CREATING_NOTIFICATION_MESSAGE = {
progressing: 'Đang gửi đánh giá ...',
success: 'Gửi đánh giá thành công',
failure: 'Gửi đánh giá thất bại'
};
init();
self.onAttachmentsSelect = onAttachmentsSelect;
......@@ -38,7 +45,12 @@
})
};
return mostReviewApiClient.createReview(reviewToCreate);
return asyncAction(CREATING_NOTIFICATION_MESSAGE, function() {
return mostReviewApiClient.createReview(reviewToCreate)
.then(function() {
$state.go('most.proposal');
});
});
}
function onAttachmentsSelect($attachments) {
......