-
-
Notifications
You must be signed in to change notification settings - Fork 952
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1333 from suraj-webkul/inline-edit-views
add missing lang.
- Loading branch information
Showing
43 changed files
with
3,494 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 30 additions & 21 deletions
51
packages/Webkul/Admin/src/Resources/views/components/attributes/edit/multiselect.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,34 @@ | ||
<select | ||
v-validate="'{{$validations}}'" | ||
class="control" | ||
@php | ||
$options = $attribute->lookup_type | ||
? app('Webkul\Attribute\Repositories\AttributeRepository')->getLookUpOptions($attribute->lookup_type) | ||
: $attribute->options()->orderBy('sort_order')->get(); | ||
$selectedOption = old($attribute->code) ?: $value; | ||
@endphp | ||
|
||
<v-field | ||
type="select" | ||
id="{{ $attribute->code }}" | ||
name="{{ $attribute->code }}[]" | ||
data-vv-as=""{{ $attribute->name }}"" | ||
rules="{{ $validations }}" | ||
label="{{ $attribute->name }}" | ||
placeholder="{{ $attribute->name }}" | ||
multiple | ||
value="{{ $selectedOption }}" | ||
> | ||
@php | ||
$options = $attribute->lookup_type | ||
? app('Webkul\Attribute\Repositories\AttributeRepository')->getLookUpOptions($attribute->lookup_type) | ||
: $attribute->options()->orderBy('sort_order')->get(); | ||
$selectedOption = old($attribute->code) ?: $value; | ||
@endphp | ||
|
||
@foreach ($options as $option) | ||
<option | ||
value="{{ $option->id }}" | ||
{{ in_array($option->id, explode(',', $selectedOption)) ? 'selected' : ''}} | ||
> | ||
{{ $option->name }} | ||
</option> | ||
@endforeach | ||
</select> | ||
<select | ||
name="{{ $attribute->code }}[]" | ||
class="flex min-h-[39px] w-full rounded-md border px-3 py-2 text-sm text-gray-600 transition-all hover:border-gray-400 focus:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:hover:border-gray-400 dark:focus:border-gray-400" | ||
:class="[errors['options[sort]'] ? 'border border-red-600 hover:border-red-600' : '']" | ||
multiple | ||
> | ||
@foreach ($options as $option) | ||
<option | ||
value="{{ $option->id }}" | ||
{{ in_array($option->id, explode(',', $selectedOption)) ? 'selected' : ''}} | ||
> | ||
{{ $option->name }} | ||
</option> | ||
@endforeach | ||
</select> | ||
</v-field> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 0 additions & 66 deletions
66
packages/Webkul/Admin/src/Resources/views/components/attributes/view(Inline-edit).blade.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 10 additions & 8 deletions
18
packages/Webkul/Admin/src/Resources/views/components/attributes/view/address.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
@if ($value) | ||
{{ $value['address'] }}<br> | ||
{{ $value['postcode'] . ' ' . $value['city'] }}<br> | ||
{{ core()->state_name($value['state']) }}<br> | ||
{{ core()->country_name($value['country']) }}<br> | ||
@else | ||
{{ __('admin::app.common.not-available') }} | ||
@endif | ||
<x-admin::form.control-group.controls.inline.address | ||
::name="'{{ $attribute->code }}'" | ||
:value="$value" | ||
rules="required" | ||
position="left" | ||
:label="$attribute->name" | ||
::errors="errors" | ||
:placeholder="$attribute->name" | ||
:url="$url" | ||
/> |
11 changes: 10 additions & 1 deletion
11
packages/Webkul/Admin/src/Resources/views/components/attributes/view/boolean.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
{{ $value ? __('admin::app.common.yes') : __('admin::app.common.no') }} | ||
<x-admin::form.control-group.controls.inline.boolean | ||
::name="'{{ $attribute->code }}'" | ||
:value="json_encode($value)" | ||
rules="required" | ||
position="left" | ||
:label="$attribute->name" | ||
::errors="errors" | ||
:placeholder="$attribute->name" | ||
:url="$url" | ||
/> |
24 changes: 15 additions & 9 deletions
24
packages/Webkul/Admin/src/Resources/views/components/attributes/view/checkbox.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
@php | ||
$options = $attribute->lookup_type | ||
? app('Webkul\Attribute\Repositories\AttributeRepository')->getLookUpEntity($attribute->lookup_type, explode(',', $value)) | ||
: $attribute->options()->whereIn('id', explode(',', $value))->get(); | ||
? app('Webkul\Attribute\Repositories\AttributeRepository')->getLookUpOptions($attribute->lookup_type) | ||
: $attribute->options()->orderBy('sort_order')->get(); | ||
$selectedOption = old($attribute->code) ?: $value; | ||
@endphp | ||
|
||
@if (count($options)) | ||
@foreach ($options as $option) | ||
<span class="multi-value">{{ $option->name }}</span> | ||
@endforeach | ||
@else | ||
{{ __('admin::app.common.not-available') }} | ||
@endif | ||
<x-admin::form.control-group.controls.inline.multiselect | ||
::name="'{{ $attribute->code }}'" | ||
::value="'{{ $selectedOption }}'" | ||
:data="$options" | ||
rules="required" | ||
position="left" | ||
:label="$attribute->name" | ||
::errors="errors" | ||
:placeholder="$attribute->name" | ||
:url="$url" | ||
/> |
11 changes: 10 additions & 1 deletion
11
packages/Webkul/Admin/src/Resources/views/components/attributes/view/date.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
{{ $value ?? __('admin::app.common.not-available')}} | ||
<x-admin::form.control-group.controls.inline.date | ||
::name="'{{ $attribute->code }}'" | ||
::value="'{{ $value }}'" | ||
rules="required" | ||
position="left" | ||
:label="$attribute->name" | ||
::errors="errors" | ||
:placeholder="$attribute->name" | ||
:url="$url" | ||
/> |
11 changes: 10 additions & 1 deletion
11
packages/Webkul/Admin/src/Resources/views/components/attributes/view/datetime.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
{{ $value ?? __('admin::app.common.not-available')}} | ||
<x-admin::form.control-group.controls.inline.datetime | ||
::name="'{{ $attribute->code }}'" | ||
::value="'{{ $value }}'" | ||
rules="required" | ||
position="left" | ||
:label="$attribute->name" | ||
::errors="errors" | ||
:placeholder="$attribute->name" | ||
:url="$url" | ||
/> |
Oops, something went wrong.