Skip to content

Commit

Permalink
Fixed Issue #1822
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-webkul committed Dec 27, 2024
1 parent 1f90616 commit ff5d65f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class="primary-button"
<div class="flex gap-2.5 max-xl:flex-wrap">
<!-- Left sub-component -->
<div class="flex flex-1 flex-col gap-2 max-xl:flex-auto">
<div class="box-shadow rounded-lg border border-gray-200 bg-white p-4 dark:bg-gray-900 dark:border-gray-800">
<div class="box-shadow rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-900">
{!! view_render_event('admin.activities.edit.form_controls.before') !!}

<!-- Schedule Date -->
Expand Down Expand Up @@ -109,7 +109,7 @@ class="flex w-full rounded-md border px-3 py-2 text-sm text-gray-600 transition-
@lang('admin::app.activities.edit.participants')
</x-admin::form.control-group.label>

<!-- Participants Multilookup Vue Component -->
<!-- Participants Multi lookup Vue Component -->
<v-multi-lookup-component>
<div
class="relative rounded border border-gray-200 px-2 py-1 hover:border-gray-400 focus:border-gray-400 dark:border-gray-800 dark:hover:border-gray-400 dark:focus:border-gray-400"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ class="group relative !w-full pl-2.5"
:style="{ 'text-align': position }"
>
<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(', ') }}
@{{ 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>
<!-- Tooltip -->
<div
class="absolute bottom-0 mb-5 hidden flex-col group-hover:flex"
v-if="inputValue.map(item => `${item.value}(${item.label})`).join(', ').length > 20"
v-if="inputValue?.map(item => `${item.value}(${item.label})`).join(', ').length > 20"
>
<span class="whitespace-no-wrap relative z-10 rounded-md bg-black px-4 py-2 text-xs leading-none text-white shadow-lg dark:bg-white dark:text-gray-900">
@{{ inputValue.map(item => `${item.value}(${item.label})`).join(', \n') }}
@{{ inputValue?.map(item => `${item.value}(${item.label})`).join(', \n') }}
</span>
<div class="-mt-2 ml-4 h-3 w-3 rotate-45 bg-black dark:bg-white"></div>
Expand Down Expand Up @@ -212,7 +212,7 @@ class="primary-button justify-center"
*/
value(newValue, oldValue) {
if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
this.emails = newVal || [{'value': '', 'label': 'work'}];
this.emails = newValue || [{'value': '', 'label': 'work'}];
}
},
},
Expand Down Expand Up @@ -286,7 +286,7 @@ class="primary-button justify-center"
},
updateOrCreate(params) {
this.inputValue = params.contact_emails;
this.inputValue = params.emails || params.contact_emails || this.inputValue;
if (this.url) {
this.$axios.put(this.url, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,32 @@ class="primary-button"
</div>
</div>

<!-- Left sub-component -->
<div class="box-shadow rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-900">
{!! view_render_event('admin.contacts.organizations.create.form_controls.before') !!}

<x-admin::attributes
:custom-attributes="app('Webkul\Attribute\Repositories\AttributeRepository')->findWhere([
'entity_type' => 'organizations',
])"
/>
:custom-attributes="app('Webkul\Attribute\Repositories\AttributeRepository')->findWhere([
'entity_type' => 'organizations',
])"
:custom-validations="[
'name' => [
'max:100',
],
'address' => [
'max:150',
],
'city' => [
'max:100',
],
'state' => [
'max:100',
],
'postcode' => [
'max:20',
],
]"
/>


{!! view_render_event('admin.contacts.organizations.edit.form_controls.after') !!}
</div>
Expand Down

0 comments on commit ff5d65f

Please sign in to comment.