Skip to content

Commit

Permalink
fixes ES bug with saving new items x,y,z and weight float
Browse files Browse the repository at this point in the history
  • Loading branch information
TJTorola committed Jun 2, 2016
1 parent d6a79b5 commit f14ad3b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ STRIPE_PUBLIC
STRIPE_SECRET

RECAPTCHA_PUBLIC
RECAPTCHA_SECRET
RECAPTCHA_SECRET

EASYPOST_KEY

GA_KEY
12 changes: 0 additions & 12 deletions app/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,6 @@

});

/*
|--------------------------------------------------------------------------
| Store Group (Optimized storefront requests)
|--------------------------------------------------------------------------
*/
// Route::group(['prefix' => 'store'], function() {
//
// Route::get('menus', 'StoreController@getMenus');
// Route::post('invoice', 'StoreController@postInvoice');
//
// });

/*
|--------------------------------------------------------------------------
| Tags Group (Retrieve tags and tag usage)
Expand Down
6 changes: 5 additions & 1 deletion app/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public static function saveMany($items, $offer_id)
'infinite' => 'boolean',
'public' => 'boolean',
'type_info' => 'array',
'x' => 'float',
'y' => 'float',
'z' => 'float',
'weight' => 'float'
];

/**
Expand Down Expand Up @@ -218,7 +222,7 @@ public function toPublicArray()
/**
* Set mapping properties
*/
// protected $mappingProperties = array();
// protected $mappingProperties = [];

/**
* Modify index model as it goes into ES
Expand Down
2 changes: 2 additions & 0 deletions public/js/main.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -19532,6 +19532,8 @@ module.exports = {

this.$http.post('offer', this.offer).then(function (response) {
_this.$router.go({ path: '/offer/' + response.data.id });
}, function () {
_this.$refs.store.fail();
});
},

Expand Down
2 changes: 1 addition & 1 deletion public/js/main.min.js.map

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions resources/assets/js/pages/newOffer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<picture-upload :offer-id="offer.id"></picture-upload>

<pictures v-if="offer.pictures.length > 0"
:pictures="offer.pictures"
:pictures="offer.pictures"
:deleted="offer.deleted_pictures"
:offer-id="offer.id">
</pictures>
Expand All @@ -31,18 +31,18 @@
</div>

<div class="col-md-4 col-xs-12">
<confirmed-button icon="fa-repeat"
<confirmed-button icon="fa-repeat"
v-if="offer.id"
text="Discard Changes"
text="Discard Changes"
color="btn-info"
:action="discard"
v-ref:discard>
</confirmed-button>
</div>

<div class="col-md-4 col-xs-12">
<confirmed-button icon="fa-trash"
text="Delete Offer"
<confirmed-button icon="fa-trash"
text="Delete Offer"
color="btn-danger"
:action="delete"
v-ref:delete>
Expand Down Expand Up @@ -116,6 +116,8 @@ module.exports = {
this.$http.post('offer', this.offer).then(response => {
this.$router.go({ path: `/offer/${response.data.id}` })
}, () => {
this.$refs.store.fail()
})
},
Expand All @@ -124,4 +126,4 @@ module.exports = {
}
}
}
</script>
</script>

0 comments on commit f14ad3b

Please sign in to comment.