Skip to content

Commit 5fdc860

Browse files
committed
Merge remote-tracking branch 'origin/2.0' into readme
2 parents f50d71e + 28ed127 commit 5fdc860

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

packages/Webkul/Admin/src/Resources/views/products/create.blade.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ class="primary-button"
6060
<x-admin::attributes
6161
:custom-attributes="app('Webkul\Attribute\Repositories\AttributeRepository')->findWhere([
6262
'entity_type' => 'products',
63-
['code', 'NOTIN', ['price']],
64-
['code' , '!=', 'quantity']
63+
['code', 'NOTIN', ['price', 'quantity']],
6564
])"
6665
/>
6766

@@ -92,8 +91,7 @@ class="primary-button"
9291
<x-admin::attributes
9392
:custom-attributes="app('Webkul\Attribute\Repositories\AttributeRepository')->findWhere([
9493
'entity_type' => 'products',
95-
['code', 'IN', ['price']],
96-
['code' , '!=', 'quantity']
94+
['code', 'IN', ['price', 'quantity']],
9795
])"
9896
/>
9997

packages/Webkul/Admin/src/Resources/views/products/edit.blade.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ class="primary-button"
5858
<x-admin::attributes
5959
:custom-attributes="app('Webkul\Attribute\Repositories\AttributeRepository')->findWhere([
6060
'entity_type' => 'products',
61-
['code', 'NOTIN', ['price']],
62-
['code' , '!=', 'quantity']
61+
['code', 'NOTIN', ['price', 'quantity']],
6362
])"
6463
:entity="$product"
6564
/>
@@ -91,8 +90,7 @@ class="primary-button"
9190
<x-admin::attributes
9291
:custom-attributes="app('Webkul\Attribute\Repositories\AttributeRepository')->findWhere([
9392
'entity_type' => 'products',
94-
['code', 'IN', ['price']],
95-
['code' , '!=', 'quantity']
93+
['code', 'IN', ['price', 'quantity']],
9694
])"
9795
:entity="$product"
9896
/>

packages/Webkul/Contact/src/Repositories/PersonRepository.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,9 @@ public function create(array $data)
7474
*/
7575
public function update(array $data, $id, $attributes = [])
7676
{
77-
$data['user_id'] = $data['user_id'] ?? null;
77+
$data['user_id'] = empty($data['user_id']) ? null : $data['user_id'];
7878

79-
$person = $this->find($id);
80-
81-
$data['organization_id'] = $data['organization_id'] ?? $person->organization_id;
82-
83-
$person->update($data);
79+
$person = parent::update($data, $id);
8480

8581
/**
8682
* If attributes are provided then only save the provided attributes and return.

0 commit comments

Comments
 (0)