Change desing for zoom references (#252)
* bugfix advanced search when field value no change * update stylespull/3759/head
parent
758fc12796
commit
828edc58a2
|
@ -20,7 +20,6 @@
|
||||||
v-if="(field.contextInfo && field.contextInfo.isActive) || field.reference.zoomWindowList.length"
|
v-if="(field.contextInfo && field.contextInfo.isActive) || field.reference.zoomWindowList.length"
|
||||||
ref="contextOptions"
|
ref="contextOptions"
|
||||||
placement="top"
|
placement="top"
|
||||||
:title="isFieldOnly()"
|
|
||||||
width="300"
|
width="300"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
>
|
>
|
||||||
|
@ -28,8 +27,13 @@
|
||||||
class="pre-formatted"
|
class="pre-formatted"
|
||||||
v-html="field.contextInfo.messageText.msgText"
|
v-html="field.contextInfo.messageText.msgText"
|
||||||
/>
|
/>
|
||||||
<div class="el-popover__title">
|
<div>
|
||||||
{{ $t('table.ProcessActivity.zoomIn') }}
|
<span class="custom-tittle-popover">
|
||||||
|
{{ field.name }}
|
||||||
|
</span>
|
||||||
|
<template v-if="!isEmptyValue(field.help)">
|
||||||
|
: {{ field.help }}
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<template v-for="(zoomItem, index) in field.reference.zoomWindowList">
|
<template v-for="(zoomItem, index) in field.reference.zoomWindowList">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -37,7 +41,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
@click="redirect({ window: zoomItem, columnName: field.columnName, value: field.value })"
|
@click="redirect({ window: zoomItem, columnName: field.columnName, value: field.value })"
|
||||||
>
|
>
|
||||||
{{ zoomItem.name }}
|
{{ $t('table.ProcessActivity.zoomIn') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
@ -99,6 +103,7 @@ import FieldTranslated from '@/components/ADempiere/Field/fieldTranslated'
|
||||||
import { FIELD_ONLY } from '@/components/ADempiere/Field/references'
|
import { FIELD_ONLY } from '@/components/ADempiere/Field/references'
|
||||||
import { DEFAULT_SIZE } from '@/components/ADempiere/Field/fieldSize'
|
import { DEFAULT_SIZE } from '@/components/ADempiere/Field/fieldSize'
|
||||||
import { fieldIsDisplayed } from '@/utils/ADempiere'
|
import { fieldIsDisplayed } from '@/utils/ADempiere'
|
||||||
|
import { showMessage } from '@/utils/ADempiere/notification'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the base component for linking the components according to the
|
* This is the base component for linking the components according to the
|
||||||
|
@ -260,6 +265,7 @@ export default {
|
||||||
this.field = this.metadataField
|
this.field = this.metadataField
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
showMessage,
|
||||||
isDisplayed() {
|
isDisplayed() {
|
||||||
if (this.isAdvancedQuery) {
|
if (this.isAdvancedQuery) {
|
||||||
return this.field.isShowedFromUser
|
return this.field.isShowedFromUser
|
||||||
|
@ -334,25 +340,33 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
redirect({ window, columnName, value }) {
|
redirect({ window, columnName, value }) {
|
||||||
this.$store.dispatch('getWindowByUuid', {
|
this.$store.dispatch('getWindowByUuid', { routes: this.permissionRoutes, windowUuid: window.uuid })
|
||||||
routes: this.permissionRoutes,
|
var windowRoute = this.$store.getters.getWindowRoute(window.uuid)
|
||||||
windowUuid: window.uuid
|
if (windowRoute) {
|
||||||
})
|
this.$router.push({
|
||||||
const windowRoute = this.$store.getters.getWindowRoute(window.uuid)
|
name: windowRoute.name,
|
||||||
this.$router.push({
|
query: {
|
||||||
name: windowRoute.name,
|
action: 'advancedQuery',
|
||||||
query: {
|
tabParent: 0,
|
||||||
action: 'advancedQuery',
|
[columnName]: value
|
||||||
tabParent: 0,
|
}
|
||||||
[columnName]: value
|
})
|
||||||
}
|
} else {
|
||||||
})
|
this.showMessage({
|
||||||
|
type: 'error',
|
||||||
|
message: this.$t('notifications.noRoleAccess')
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.custom-tittle-popover {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Separation between elements (item) of the form
|
* Separation between elements (item) of the form
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -44,7 +44,8 @@ export default {
|
||||||
updateSuccessfully: 'Successfully made changes',
|
updateSuccessfully: 'Successfully made changes',
|
||||||
invalidEmailFormat: 'Invalid email format',
|
invalidEmailFormat: 'Invalid email format',
|
||||||
recordLocked: 'This record has been locked',
|
recordLocked: 'This record has been locked',
|
||||||
recordUnlocked: 'This record has been unlocked'
|
recordUnlocked: 'This record has been unlocked',
|
||||||
|
noRoleAccess: 'With your current role and settings, you cannot view this information.'
|
||||||
},
|
},
|
||||||
navbar: {
|
navbar: {
|
||||||
badge: {
|
badge: {
|
||||||
|
|
|
@ -44,7 +44,8 @@ export default {
|
||||||
updateSuccessfully: 'Cambios realizados exitosamente',
|
updateSuccessfully: 'Cambios realizados exitosamente',
|
||||||
invalidEmailFormat: 'Formato de correo electronico invalido',
|
invalidEmailFormat: 'Formato de correo electronico invalido',
|
||||||
recordLocked: 'Este registro ha sido bloqueado',
|
recordLocked: 'Este registro ha sido bloqueado',
|
||||||
recordUnlocked: 'Este registro ha sido desbloqueado'
|
recordUnlocked: 'Este registro ha sido desbloqueado',
|
||||||
|
noRoleAccess: 'Con su rol y configuración actuales, no puede ver esta información.'
|
||||||
},
|
},
|
||||||
navbar: {
|
navbar: {
|
||||||
badge: {
|
badge: {
|
||||||
|
|
|
@ -576,7 +576,7 @@ const panel = {
|
||||||
})
|
})
|
||||||
|
|
||||||
// the field has not changed, then the action is broken
|
// the field has not changed, then the action is broken
|
||||||
if (newValue === field.value && isEmptyValue(displayColumn)) {
|
if (newValue === field.value && isEmptyValue(displayColumn) && !isAdvancedQuery) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue