Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Feb 1, 2021
1 parent 78d29ee commit e7e4e62
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v0.4.5 (2021-02-01)
### Fixed
- Fixed Order creation error [#100](https://github.com/conedevelopment/bazar/issues/100)
- Fixed hidden Alert

## v0.4.4 (2021-01-31)
### Fixed
- Fixed Vue compiling error [#91](https://github.com/conedevelopment/bazar/issues/91)
Expand Down
2 changes: 1 addition & 1 deletion public/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/app.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/app.js": "/app.js?id=bdadb48a8bdab3ab4a6c",
"/app.js": "/app.js?id=799262302b7b2e2cd4bd",
"/app.css": "/app.css?id=d9149b1a668d628f4c25"
}
6 changes: 6 additions & 0 deletions resources/js/Components/Alert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
type: Boolean,
default: false
}
},
data() {
return {
isOpen: true
};
}
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/Bazar.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ abstract class Bazar
*
* @var string
*/
public const VERSION = '0.4.4';
public const VERSION = '0.4.5';

/**
* The default currency.
Expand Down
2 changes: 1 addition & 1 deletion src/Concerns/InteractsWithItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function getShippingAttribute(): Shipping
public function getItemsAttribute(): Collection
{
return $this->products->map(function (Product $product): Item {
return $product->item
return ($product->item instanceof Item ? $product->item : new Item)
->setRelation('product', $product)
->setRelation('itemable', $this);
});
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Requests/OrderStoreRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public function rules(): array
],
'products' => ['required', 'array'],
'products.*.id' => ['required'],
'products.*.item_tax' => ['required', 'numeric', 'min:0'],
'products.*.item_quantity' => ['required', 'numeric', 'gt:0'],
'products.*.item_tax' => ['nullable', 'numeric', 'min:0'],
'products.*.item_quantity' => ['nullable', 'numeric', 'gt:0'],
'discount' => ['nullable', 'numeric', 'min:0'],
'currency' => [
'required',
Expand Down

0 comments on commit e7e4e62

Please sign in to comment.