diff --git a/zero.Backoffice.UI/app/components/ui-form.vue b/zero.Backoffice.UI/app/components/ui-form.vue index 2b7f057f..5b81e908 100644 --- a/zero.Backoffice.UI/app/components/ui-form.vue +++ b/zero.Backoffice.UI/app/components/ui-form.vue @@ -17,7 +17,7 @@ //import FormErrorView from './form-error-view.vue'; import * as overlays from '../services/overlay'; import * as notifications from '../services/notification'; - import { arrayGroupBy } from '../utils/arrays'; + import { arrayGroupBy, selectorToArray } from '../utils'; export default defineComponent({ name: 'uiForm', @@ -276,21 +276,55 @@ let errorGroups = arrayGroupBy(this.errors, 'property'); let handledGroups = []; + console.info({ errorComponents, errorGroups }); + // set errors errorComponents.forEach(component => { let field = component.field; - if (field && errorGroups[field]) + if (field) { - handledGroups.push(field); - component.setErrors(errorGroups[field]); - - if (component.tab) + this.errors.forEach(error => { - component.tab.setErrors(true); - } + let errorField = error.property; + let errorFieldSelector = selectorToArray(errorField); + + // exact error field match + if (errorField == field) + { + handledGroups.push(field); + component.setErrors(error, true); + + if (component.tab) + { + component.tab.setErrors(true); + } + } + // nested error + else if (errorFieldSelector[0] == field) + { + handledGroups.push(field); + component.setErrors(error, true); + + if (component.tab) + { + component.tab.setErrors(true); + } + } + }); } + + //if (field && errorGroups[field]) + //{ + // handledGroups.push(field); + // component.setErrors(errorGroups[field]); + + // if (component.tab) + // { + // component.tab.setErrors(true); + // } + //} }); for (var field in errorGroups) diff --git a/zero.Backoffice.UI/app/components/ui-header-bar.vue b/zero.Backoffice.UI/app/components/ui-header-bar.vue index 8a29ebeb..b7ead57a 100644 --- a/zero.Backoffice.UI/app/components/ui-header-bar.vue +++ b/zero.Backoffice.UI/app/components/ui-header-bar.vue @@ -112,7 +112,11 @@ top: 0; z-index: 2; background: var(--color-bg); - background: linear-gradient(0deg, transparent, var(--color-bg) 40%); + //width: auto; + //border-radius: var(--radius); + //box-shadow: 0 0 10px rgba(0,0,0,0.1); + //margin-bottom: var(--padding); + //background: linear-gradient(0deg, transparent, var(--color-bg) 30%); } } diff --git a/zero.Backoffice.UI/app/components/ui-table-filter-overlay.vue b/zero.Backoffice.UI/app/components/ui-table-filter-overlay.vue index 94562661..0af5c347 100644 --- a/zero.Backoffice.UI/app/components/ui-table-filter-overlay.vue +++ b/zero.Backoffice.UI/app/components/ui-table-filter-overlay.vue @@ -3,7 +3,7 @@