More front-end bug fixes

This commit is contained in:
Julien Nahum
2024-02-10 12:46:17 +01:00
parent 91911bc6e5
commit e5dc3f1bd4
8 changed files with 10 additions and 9 deletions

View File

@@ -138,7 +138,7 @@ export default {
if(this.compVal === null){
return;
}
if (!this.compVal.startsWith('+')) {
if (!this.compVal?.startsWith('+')) {
this.selectedCountryCode = this.getCountryBy(this.compVal.substring(2, 0))
}

View File

@@ -32,7 +32,7 @@
<template v-if="multiple">
<div class="flex items-center truncate mr-6">
<span class="truncate">
{{ selectedValues.join(', ') }}
{{ selectedValues?.join(', ') }}
</span>
</div>
</template>
@@ -122,6 +122,7 @@ export default {
return null
},
updateModelValue(newValues){
if (newValues === null) newValues = []
this.selectedValues = newValues
},
updateOptions (newItem) {

View File

@@ -53,7 +53,7 @@ export default {
if (this.disabled) {
this.$refs.signaturePad.clearSignature()
} else {
const { isEmpty, data } = this.$refs.signaturePad.saveSignature()
const { isEmpty, data } = this.$refs.signaturePad?.saveSignature()
this.form[this.name] = (!isEmpty && data) ? data : null
}
}

View File

@@ -23,7 +23,7 @@
<template v-for="worksp in workspaces" :key="worksp.id">
<a href="#"
class="px-4 py-2 text-md text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-100 dark:hover:text-white dark:hover:bg-gray-600 flex items-center"
:class="{'bg-blue-100 dark:bg-blue-900':workspace.id === worksp.id}" @click.prevent="switchWorkspace(worksp)"
:class="{'bg-blue-100 dark:bg-blue-900':workspace?.id === worksp?.id}" @click.prevent="switchWorkspace(worksp)"
>
<div class="rounded-full h-8 w-8 flex-shrink-0" role="button">
<img v-if="isUrl(worksp.icon)"

View File

@@ -47,7 +47,7 @@
</open-form-button>
<slot v-if="isLastPage" name="submit-btn" :submitForm="submitForm" />
<open-form-button v-else native-type="button" :color="form.color" :theme="theme" class="mt-2 px-8 mx-1"
<open-form-button v-else-if="currentFieldsPageBreak" native-type="button" :color="form.color" :theme="theme" class="mt-2 px-8 mx-1"
@click.stop="nextPage"
>
{{ currentFieldsPageBreak.next_btn_text }}