From d7e518930dce7e89a1123fcfc0cc20a6ce018c71 Mon Sep 17 00:00:00 2001 From: suraj kashyap Date: Tue, 16 Jul 2024 12:01:42 +0530 Subject: [PATCH] handle server validations and fix minor issues. --- .../views/common/custom-attributes/edit/email.blade.php | 2 ++ .../views/common/custom-attributes/edit/lookup.blade.php | 7 +++---- .../views/common/custom-attributes/edit/phone.blade.php | 2 ++ .../views/components/layouts/sidebar/index.blade.php | 5 +---- .../src/Resources/views/contacts/persons/create.blade.php | 3 --- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/common/custom-attributes/edit/email.blade.php b/packages/Webkul/Admin/src/Resources/views/common/custom-attributes/edit/email.blade.php index 28511b14f..ed17239e4 100644 --- a/packages/Webkul/Admin/src/Resources/views/common/custom-attributes/edit/email.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/common/custom-attributes/edit/email.blade.php @@ -62,6 +62,8 @@ class="cursor-pointer rounded-md p-1.5 ml-1 text-2xl transition-all hover:bg-gra + + getLookUpEntity($attribute->lookup_type, old($attribute->code) ?: $value); @endphp @@ -67,7 +66,7 @@ class="p-4 text-sm font-semibold text-gray-600 dark:text-gray-300" app.component('v-lookup-component', { template: '#v-lookup-component-template', - props: ['validations', 'attribute', 'src', 'value'], + props: ['validations', 'attribute', 'value'], data() { return { @@ -79,7 +78,7 @@ class="p-4 text-sm font-semibold text-gray-600 dark:text-gray-300" entityId: null, - searchRoute: this.src ?? `{{ route('admin.settings.attributes.lookup') }}/${this.attribute.lookup_type}`, + searchRoute: `{{ route('admin.settings.attributes.lookup') }}/${this.attribute.lookup_type}`, }; }, @@ -113,7 +112,7 @@ class="p-4 text-sm font-semibold text-gray-600 dark:text-gray-300" search(event) { const searchTerm = event.target.value; - if (searchTerm <= 1) { + if (searchTerm.length <= 2) { this.searchedResults = []; this.isDropdownOpen = false; diff --git a/packages/Webkul/Admin/src/Resources/views/common/custom-attributes/edit/phone.blade.php b/packages/Webkul/Admin/src/Resources/views/common/custom-attributes/edit/phone.blade.php index 993a962e5..ca0d70465 100644 --- a/packages/Webkul/Admin/src/Resources/views/common/custom-attributes/edit/phone.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/common/custom-attributes/edit/phone.blade.php @@ -62,6 +62,8 @@ class="cursor-pointer rounded-md p-1.5 ml-1 text-2xl transition-all hover:bg-gra + +