Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.saveVendorProduct = function() {
- if(!$scope.vendorProductData.product_name_id) {
- this.saveProductName();
- }
- if(!$scope.vendorProductData.product_type_id) {
- this.saveProductType();
- }
- if(!$scope.vendorProductData.product_category_id) {
- this.saveProductCategory();
- }
- if($scope.vendorProductData.product_name_id
- && $scope.vendorProductData.product_type_id
- && $scope.vendorProductData.product_category_id) {
- VendorProduct.saveVendorProduct($scope.vendorProductData, function(response) {
- if(response.status === 'success') {
- $state.go('products');
- } else {
- $scope.message = response.data.message;
- }
- });
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement