Merge pull request #2676 from brkcvn/master

Some console error fixed
This commit is contained in:
Burak Civan 2022-10-20 09:28:37 +03:00 committed by GitHub
commit 845448d3cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 28 deletions

View File

@ -53,12 +53,10 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else class="document-contact-with-contact-bill-to"> <div v-else class="document-contact-with-contact-bill-to">
<div> <div>
<span class="text-sm">{{ contactInfoText }}</span> <span class="text-sm">{{ contactInfoText }}</span>
</div> </div>
<div class="overflow-x-visible mt-0"> <div class="overflow-x-visible mt-0">
<table class="table table-borderless p-0"> <table class="table table-borderless p-0">
<tbody> <tbody>
@ -88,28 +86,26 @@
<th class="font-normal text-xs text-left p-0"> <th class="font-normal text-xs text-left p-0">
{{ contact.phone }} &nbsp; {{ contact.phone }} &nbsp;
<span v-if="contact.email"> <span v-if="contact.email">
- {{ contact.email }} - {{ contact.email }}
</span> </span>
</th> </th>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="absolute flex flex-col mt-2">
<button type="button" class="p-0 text-xs text-purple ltr:text-left rtl:text-right" @click="onContactEdit">
<span class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize">
{{ editContactText.replace(':contact_name', contact.name).replace(':field', contact.name) }}
</span>
</button>
<button type="button" class="p-0 text-xs text-purple ltr:text-left rtl:text-right" @click="onContactList">
<span class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize">
{{ chooseDifferentContactText }}
</span>
</button>
</div>
</div> </div>
<div :class="show.contact_selected ? 'flex' : 'hidden'" class="absolute flex-col mt-2">
<button type="button" class="p-0 text-xs text-purple ltr:text-left rtl:text-right" @click="onContactEdit">
<span class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize">
{{ editContactText.replace(':contact_name', contact.name).replace(':field', contact.name) }}
</span>
</button>
<button type="button" class="p-0 text-xs text-purple ltr:text-left rtl:text-right" @click="onContactList">
<span class="bg-no-repeat bg-0-2 bg-0-full hover:bg-full-2 bg-gradient-to-b from-transparent to-purple transition-backgroundSize">
{{ chooseDifferentContactText }}
</span>
</button>
</div>
<component v-bind:is="add_new_html" @submit="onSubmit" @cancel="onCancel"></component> <component v-bind:is="add_new_html" @submit="onSubmit" @cancel="onCancel"></component>
</div> </div>
</div> </div>

View File

@ -304,7 +304,7 @@ export default {
onInput(evt) { onInput(evt) {
this.search = evt.target.value; this.search = evt.target.value;
let option_url = this.selected_options[this.filter_index].url; let option_url = this.selected_options.length > 0 ? this.selected_options[this.filter_index].url : '';
if (this.search) { if (this.search) {
if (option_url.indexOf('?') === -1) { if (option_url.indexOf('?') === -1) {
@ -581,7 +581,7 @@ export default {
onFilterDelete(index) { onFilterDelete(index) {
this.show_icon = true; this.show_icon = true;
this.show_close_icon = false;
this.filter_list.push(this.selected_options[index]); this.filter_list.push(this.selected_options[index]);
if (this.filter_last_step == 'options') { if (this.filter_last_step == 'options') {
@ -598,8 +598,10 @@ export default {
if (this.filter_index == 0) { if (this.filter_index == 0) {
this.onChangeSearchAndFilterText(this.defaultPlaceholder, true); this.onChangeSearchAndFilterText(this.defaultPlaceholder, true);
this.show_close_icon = false;
} else { } else {
this.show_icon = false; this.show_icon = false;
this.show_close_icon = true;
} }
this.filter_last_step = 'options'; this.filter_last_step = 'options';
@ -790,6 +792,10 @@ export default {
if (this.filter_index > 0) { if (this.filter_index > 0) {
this.onChangeSearchAndFilterText(this.enterPlaceholder, false); this.onChangeSearchAndFilterText(this.enterPlaceholder, false);
} }
if (this.selected_values.length > 0) {
this.show_close_icon = true;
}
}, },
computed: { computed: {

View File

@ -875,7 +875,7 @@ export default {
if (this.multiple) { if (this.multiple) {
this.selected = []; this.selected = [];
} else { } else {
this.selected = null; this.selected = '';
} }
return; return;
@ -892,7 +892,7 @@ export default {
}, this); }, this);
} else { } else {
if (! options.find((option) => option == this.selected)) { if (! options.find((option) => option == this.selected)) {
this.selected = null; this.selected = '';
} }
} }
} }

View File

@ -1094,7 +1094,7 @@ export default {
if (this.multiple) { if (this.multiple) {
this.selected = []; this.selected = [];
} else { } else {
this.selected = null; this.selected = '';
} }
return; return;
@ -1111,7 +1111,7 @@ export default {
}, this); }, this);
} else { } else {
if (! options.find((option) => option == this.selected)) { if (! options.find((option) => option == this.selected)) {
this.selected = null; this.selected = '';
} }
} }
}, },

View File

@ -229,6 +229,9 @@ export default {
// Bulk Action modal cancel // Bulk Action modal cancel
onCancelBulkAction() { onCancelBulkAction() {
this.bulk_action.modal = false; this.bulk_action.modal = false;
let documentClasses = document.body.classList;
documentClasses.remove('overflow-y-hidden', 'overflow-overlay', '-ml-4');
}, },
// Bulk Action Clear selected items // Bulk Action Clear selected items

View File

@ -24,7 +24,7 @@
<x-form.group.select name="type" label="{{ trans_choice('general.types', 1) }}" :options="$types" :selected="config('general.types')" change="updateParentCategories" /> <x-form.group.select name="type" label="{{ trans_choice('general.types', 1) }}" :options="$types" :selected="config('general.types')" change="updateParentCategories" />
<x-form.group.select name="parent_id" label="{{ trans('general.parent') . ' ' . trans_choice('general.categories', 1) }}" :options="[]" not-required dynamicOptions="categoriesBasedTypes" sort-options="false" v-disabled="isParentCategoryDisabled" /> <x-form.group.select name="parent_id" label="{{ trans('general.parent') . ' ' . trans_choice('general.categories', 1) }}" :options="[]" not-required dynamicOptions="categoriesBasedTypes" sort-options="false" />
<x-form.input.hidden name="categories" value="{{ json_encode($categories) }}" /> <x-form.input.hidden name="categories" value="{{ json_encode($categories) }}" />
</x-slot> </x-slot>