Disable mag. glass in metric configurator if blockID is 0
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
:title="isBlockMagnified ? '' : $t('general.label.magnify')"
|
||||
variant="outline-light"
|
||||
class="d-flex align-items-center text-secondary d-print-none border-0"
|
||||
@click="$root.$emit('magnify-page-block', isBlockMagnified ? undefined : { blockID: block.blockID })"
|
||||
@click="$root.$emit('magnify-page-block', isBlockMagnified ? undefined : magnifyParams)"
|
||||
>
|
||||
<font-awesome-icon :icon="['fas', isBlockMagnified ? 'times' : 'search-plus']" />
|
||||
</b-button>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
:title="isBlockMagnified ? '' : $t('general.label.magnify')"
|
||||
variant="outline-light"
|
||||
class="d-flex align-items-center text-primary d-print-none border-0"
|
||||
@click="$root.$emit('magnify-page-block', isBlockMagnified ? undefined : { blockID: block.blockID })"
|
||||
@click="$root.$emit('magnify-page-block', isBlockMagnified ? undefined : magnifyParams)"
|
||||
>
|
||||
<font-awesome-icon :icon="['fas', isBlockMagnified ? 'times' : 'search-plus']" />
|
||||
</b-button>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script>
|
||||
import { compose } from '@cortezaproject/corteza-js'
|
||||
import { compose, NoID } from '@cortezaproject/corteza-js'
|
||||
|
||||
export default {
|
||||
i18nOptions: {
|
||||
namespaces: 'block',
|
||||
@@ -71,6 +72,11 @@ export default {
|
||||
this.block.options.showRefresh,
|
||||
].some(c => !!c)
|
||||
},
|
||||
|
||||
magnifyParams () {
|
||||
const params = this.block.blockID === NoID ? { block: this.block } : { blockID: this.block.blockID }
|
||||
return this.isBlockMagnified ? undefined : params
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { compose, NoID } from '@cortezaproject/corteza-js'
|
||||
import { fetchID } from 'corteza-webapp-compose/src/lib/block'
|
||||
import PageBlock from 'corteza-webapp-compose/src/components/PageBlocks'
|
||||
|
||||
export default {
|
||||
@@ -133,7 +134,7 @@ export default {
|
||||
|
||||
const { namespaceID, moduleID } = this.page
|
||||
const recordID = paramsRecordID || queryRecordID
|
||||
this.block = this.customBlock || this.page.blocks.find(block => block.blockID === blockID)
|
||||
this.block = this.customBlock || this.page.blocks.find(block => fetchID(block) === blockID)
|
||||
this.module = moduleID !== NoID ? this.getModuleByID(moduleID) : undefined
|
||||
this.showModal = !!(this.block || {}).blockID
|
||||
|
||||
|
||||
Reference in New Issue
Block a user