- verbeteringen client
- removal of eveai_chat
This commit is contained in:
@@ -29,7 +29,31 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
hasFormData() {
|
||||
return this.formData && this.formData.fields && Object.keys(this.formData.fields).length > 0;
|
||||
// Check if formData and fields exist
|
||||
if (!this.formData || !this.formData.fields || Object.keys(this.formData.fields).length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if formValues exist and contain meaningful data
|
||||
if (!this.formValues || Object.keys(this.formValues).length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if any formValues have actual content (not empty, null, or undefined)
|
||||
const hasActualValues = Object.entries(this.formValues).some(([key, value]) => {
|
||||
// Skip if the field doesn't exist in formData
|
||||
if (!this.formData.fields[key]) return false;
|
||||
|
||||
// Check for meaningful values
|
||||
if (value === null || value === undefined) return false;
|
||||
if (typeof value === 'string' && value.trim() === '') return false;
|
||||
if (typeof value === 'boolean') return true; // Boolean values are always meaningful
|
||||
if (Array.isArray(value) && value.length === 0) return false;
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
return hasActualValues;
|
||||
},
|
||||
formattedFields() {
|
||||
if (!this.hasFormData) return [];
|
||||
@@ -267,7 +291,7 @@ export default {
|
||||
}
|
||||
|
||||
/* High contrast mode */
|
||||
@media (prefers-contrast: high) {
|
||||
@media (prefers-contrast: more) {
|
||||
.form-message {
|
||||
border: 2px solid #000;
|
||||
background-color: #fff;
|
||||
|
||||
Reference in New Issue
Block a user