Skip to content

Commit

Permalink
Merge pull request #1540 from suraj-webkul/inline-allow-edit
Browse files Browse the repository at this point in the history
inline allow edit.
  • Loading branch information
jitendra-webkul authored Aug 30, 2024
2 parents 0508e2b + 10de5d6 commit f559e91
Show file tree
Hide file tree
Showing 32 changed files with 134 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
/>
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-admin::form.control-group.control
<x-admin::form.control-group.controls.inline.text
type="inline"
::name="'{{ $attribute->code }}'"
::value="'{{ $value }}'"
Expand All @@ -8,4 +8,5 @@
:placeholder="$attribute->name"
::errors="errors"
:url="$url"
/>
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
::errors="errors"
:placeholder="$attribute->name"
:url="$url"
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-admin::form.control-group.control
<x-admin::form.control-group.controls.inline.text
type="inline"
::name="'{{ $attribute->code }}'"
::value="'{{ $value }}'"
Expand All @@ -8,4 +8,5 @@
:placeholder="$attribute->name"
::errors="errors"
:url="$url"
/>
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-admin::form.control-group.control
<x-admin::form.control-group.controls.inline.text
type="inline"
::name="'{{ $attribute->code }}'"
::value="'{{ $value }}'"
Expand All @@ -8,4 +8,5 @@
:placeholder="$attribute->name"
::errors="errors"
:url="$url"
/>
:allow-edit="$allowEdit"
/>
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
@props([
'allowEdit' => true,
])

<v-inline-address-edit
{{ $attributes->except('value') }}
:value='@json($attributes->get('value'))'
:allow-edit="{{ $allowEdit ? 'true' : 'false' }}"
>
<div class="group w-full max-w-full hover:rounded-sm">
<div class="rounded-xs flex h-[34px] items-center ltr:pl-2.5 ltr:text-left rtl:pr-2.5 rtl:text-right">
Expand All @@ -17,14 +22,14 @@
<div class="group w-full max-w-full hover:rounded-sm">
<!-- Non-editing view -->
<div
class="flex h-[34px] items-center border border-transparent transition-all rounded"
class="flex h-[34px] items-center rounded border border-transparent transition-all"
:class="allowEdit ? 'hover:bg-gray-100 dark:hover:bg-gray-800' : ''"
>
<div
class="group relative !w-full pl-2.5"
:style="{ 'text-align': position }"
>
<span class="truncate rounded cursor-pointer">
<span class="cursor-pointer truncate rounded">
@{{ valueLabel ? valueLabel : `${inputValue?.address} ${inputValue?.postcode} ${inputValue?.city} ${inputValue?.state} ${inputValue?.country}`.length > 20 ? `${inputValue?.address} ${inputValue?.postcode} ${inputValue?.city} ${inputValue?.state} ${inputValue?.country}`.substring(0, 20) + '...' : `${inputValue?.address} ${inputValue?.postcode} ${inputValue?.city} ${inputValue?.state} ${inputValue?.country}` }}
</span>
Expand All @@ -35,7 +40,7 @@ class="group relative !w-full pl-2.5"
@{{ `${inputValue?.state}, ${inputValue?.country}` }}<br>
</span>
<div class="-mt-2 h-3 w-3 ml-4 rotate-45 bg-black dark:bg-white"></div>
<div class="-mt-2 ml-4 h-3 w-3 rotate-45 bg-black dark:bg-white"></div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<v-inline-boolean-edit {{ $attributes->except('options') }}>
@props([
'allowEdit' => true,
])

<v-inline-boolean-edit
{{ $attributes->except('options') }}
:allow-edit="{{ $allowEdit ? 'true' : 'false' }}"
>
<div class="group w-full max-w-full hover:rounded-sm">
<div class="rounded-xs flex h-[34px] items-center pl-2.5 text-left">
<div class="shimmer h-5 w-48 rounded border border-transparent"></div>
Expand All @@ -15,7 +22,7 @@
<!-- Non-editing view -->
<div
v-if="! isEditing"
class="flex h-[34px] items-center border border-transparent transition-all rounded"
class="flex h-[34px] items-center rounded border border-transparent transition-all"
:class="allowEdit ? 'hover:bg-gray-100 dark:hover:bg-gray-800' : ''"
>
<x-admin::form.control-group.control
Expand All @@ -25,7 +32,7 @@ class="flex h-[34px] items-center border border-transparent transition-all round
v-model="inputValue"
/>
<span class="truncate rounded cursor-pointer">
<span class="cursor-pointer truncate rounded">
@{{ valueLabel ? valueLabel : selectedValue?.name }}
</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<v-inline-date-edit {{ $attributes }}>
@props([
'allowEdit' => true,
])

<v-inline-date-edit
{{ $attributes }}
:allow-edit="{{ $allowEdit ? 'true' : 'false' }}"
>
<div class="group w-full max-w-full hover:rounded-sm">
<div class="rounded-xs flex h-[34px] items-center pl-2.5 text-left">
<div class="shimmer h-5 w-48 rounded border border-transparent"></div>
Expand All @@ -15,7 +22,7 @@
<!-- Non-editing view -->
<div
v-if="! isEditing"
class="flex h-[34px] items-center border border-transparent transition-all rounded"
class="flex h-[34px] items-center rounded border border-transparent transition-all"
:class="allowEdit ? 'hover:bg-gray-100 dark:hover:bg-gray-800' : ''"
>
<x-admin::form.control-group.control
Expand All @@ -29,7 +36,7 @@ class="flex h-[34px] items-center border border-transparent transition-all round
class="group relative !w-full pl-2.5"
:style="{ 'text-align': position }"
>
<span class="truncate rounded cursor-pointer">
<span class="cursor-pointer truncate rounded">
@{{ valueLabel ? valueLabel : inputValue.length > 20 ? inputValue.substring(0, 20) + '...' : inputValue }}
</span>
Expand All @@ -42,7 +49,7 @@ class="absolute bottom-0 mb-5 hidden flex-col group-hover:flex"
@{{ inputValue }}
</span>
<div class="-mt-2 h-3 w-3 ml-4 rotate-45 bg-black dark:bg-white"></div>
<div class="-mt-2 ml-4 h-3 w-3 rotate-45 bg-black dark:bg-white"></div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<v-inline-datetime-edit {{ $attributes }}>
@props([
'allowEdit' => true,
])

<v-inline-datetime-edit
{{ $attributes }}
:allow-edit="{{ $allowEdit ? 'true' : 'false' }}"
>
<div class="group w-full max-w-full hover:rounded-sm">
<div class="rounded-xs flex h-[34px] items-center ltr:pl-2.5 ltr:text-left rtl:pr-2.5 rtl:text-right">
<div class="shimmer h-5 w-48 rounded border border-transparent"></div>
Expand All @@ -15,7 +22,7 @@
<!-- Non-editing view -->
<div
v-if="! isEditing"
class="flex h-[34px] items-center border border-transparent transition-all rounded"
class="flex h-[34px] items-center rounded border border-transparent transition-all"
:class="allowEdit ? 'hover:bg-gray-100 dark:hover:bg-gray-800' : ''"
>
<x-admin::form.control-group.control
Expand All @@ -29,7 +36,7 @@ class="flex h-[34px] items-center border border-transparent transition-all round
class="group relative !w-full pl-2.5"
:style="{ 'text-align': position }"
>
<span class="truncate rounded cursor-pointer">
<span class="cursor-pointer truncate rounded">
@{{ valueLabel ? valueLabel : inputValue.length > 20 ? inputValue.substring(0, 20) + '...' : inputValue }}
</span>
Expand All @@ -42,7 +49,7 @@ class="absolute bottom-0 mb-5 hidden flex-col group-hover:flex"
@{{ inputValue }}
</span>
<div class="-mt-2 h-3 w-3 ml-4 rotate-45 bg-black dark:bg-white"></div>
<div class="-mt-2 ml-4 h-3 w-3 rotate-45 bg-black dark:bg-white"></div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
@props([
'allowEdit' => true,
])

<v-inline-email-edit
{{ $attributes->except('value') }}
:value={{ json_encode($attributes->get('value')) }}
:allow-edit="{{ $allowEdit ? 'true' : 'false' }}"
>
<div class="group w-full max-w-full hover:rounded-sm">
<div class="rounded-xs flex h-[34px] items-center ltr:pl-2.5 ltr:text-left rtl:pr-2.5 rtl:text-right">
Expand All @@ -17,14 +22,14 @@
<div class="group w-full max-w-full hover:rounded-sm">
<!-- Non-editing view -->
<div
class="flex h-[34px] items-center border border-transparent transition-all rounded"
class="flex h-[34px] items-center rounded border border-transparent transition-all"
:class="allowEdit ? 'hover:bg-gray-100 dark:hover:bg-gray-800' : ''"
>
<div
class="group relative !w-full pl-2.5"
:style="{ 'text-align': position }"
>
<span class="truncate rounded cursor-pointer">
<span class="cursor-pointer truncate rounded">
@{{ valueLabel ? valueLabel : inputValue.map(item => `${item.value}(${item.label})`).join(', ').length > 20 ? inputValue.map(item => `${item.value}(${item.label})`).join(', ').substring(0, 20) + '...' : inputValue.map(item => `${item.value}(${item.label})`).join(', ') }}
</span>
Expand All @@ -37,7 +42,7 @@ class="absolute bottom-0 mb-5 hidden flex-col group-hover:flex"
@{{ inputValue.map(item => `${item.value}(${item.label})`).join(', \n') }}
</span>
<div class="-mt-2 h-3 w-3 ml-4 rotate-45 bg-black dark:bg-white"></div>
<div class="-mt-2 ml-4 h-3 w-3 rotate-45 bg-black dark:bg-white"></div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<v-inline-file-edit {{ $attributes }}>
@props([
'allowEdit' => true,
])

<v-inline-file-edit
{{ $attributes }}
:allow-edit="{{ $allowEdit ? 'true' : 'false' }}"
>
<div class="group w-full max-w-full hover:rounded-sm">
<div class="rounded-xs flex h-[34px] items-center pl-2.5 text-left">
<div class="shimmer h-5 w-48 rounded border border-transparent"></div>
Expand All @@ -15,7 +22,7 @@
<!-- Non-editing view -->
<div
v-if="! isEditing"
class="flex h-[34px] items-center border border-transparent transition-all rounded"
class="flex h-[34px] items-center rounded border border-transparent transition-all"
:class="allowEdit ? 'hover:bg-gray-100 dark:hover:bg-gray-800' : ''"
>
<x-admin::form.control-group.control
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<v-inline-image-edit {{ $attributes }}>
@props([
'allowEdit' => true,
])

<v-inline-image-edit
{{ $attributes }}
:allow-edit="{{ $allowEdit ? 'true' : 'false' }}"
>
<div class="group w-full max-w-full hover:rounded-sm">
<div class="rounded-xs flex h-[34px] items-center pl-2.5 text-left">
<div class="shimmer h-5 w-48 rounded border border-transparent"></div>
Expand All @@ -15,7 +22,7 @@
<!-- Non-editing view -->
<div
v-if="! isEditing"
class="flex h-[34px] items-center border border-transparent transition-all rounded"
class="flex h-[34px] items-center rounded border border-transparent transition-all"
:class="allowEdit ? 'hover:bg-gray-100 dark:hover:bg-gray-800' : ''"
>
<x-admin::form.control-group.control
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
@props([
'allowEdit' => true,
'attribute' => [],
])

<v-inline-look-edit
{{ $attributes }}
:attribute="{{ json_encode($attribute) }}"
:allow-edit="{{ $allowEdit ? 'true' : 'false' }}"
>
<div class="group w-full max-w-full hover:rounded-sm">
<div class="rounded-xs flex h-[34px] items-center pl-2.5 text-left">
Expand All @@ -22,7 +24,7 @@
<!-- Non-editing view -->
<div
v-if="! isEditing"
class="flex h-[34px] items-center border border-transparent transition-all rounded"
class="flex h-[34px] items-center rounded border border-transparent transition-all"
:class="allowEdit ? 'hover:bg-gray-100 dark:hover:bg-gray-800' : ''"
>
<x-admin::form.control-group.control
Expand All @@ -36,7 +38,7 @@ class="flex h-[34px] items-center border border-transparent transition-all round
class="group relative !w-full pl-2.5"
:style="{ 'text-align': position }"
>
<span class="truncate rounded cursor-pointer">
<span class="cursor-pointer truncate rounded">
@{{ valueLabel ? valueLabel : inputValue.length > 20 ? inputValue.substring(0, 20) + '...' : inputValue }}
</span>
Expand All @@ -49,7 +51,7 @@ class="absolute bottom-0 mb-5 hidden flex-col group-hover:flex"
@{{ inputValue }}
</span>
<div class="-mt-2 h-3 w-3 ml-4 rotate-45 bg-black dark:bg-white"></div>
<div class="-mt-2 ml-4 h-3 w-3 rotate-45 bg-black dark:bg-white"></div>
</div>
</div>
Expand Down
Loading

0 comments on commit f559e91

Please sign in to comment.