Update category name inside module for different flavors
Resolves MS-503
This commit is contained in:
parent
ea9c90189a
commit
6019adf09a
|
|
@ -87,6 +87,7 @@
|
|||
import PopoverLink from '@/components/ui/PopoverLink';
|
||||
import { removeAtIndex } from '@/graphql/immutable-operations';
|
||||
import { EDIT_CONTENT_BLOCK_PAGE } from '@/router/module.names';
|
||||
import {instrumentCategory} from '@/helpers/instrumentType';
|
||||
|
||||
const ContentComponent = () => import(/* webpackChunkName: "content-components" */'@/components/content-blocks/ContentComponent');
|
||||
|
||||
|
|
@ -137,8 +138,7 @@
|
|||
if (!(contentType in instruments)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return `${this.$flavor.textInstrument} - ${instruments[contentType]}`;
|
||||
return instrumentCategory();
|
||||
},
|
||||
canEditContentBlock() {
|
||||
return this.contentBlock.mine && !this.contentBlock.indent;
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { INTERDISCIPLINARY, LANGUAGE_COMMUNICATION, SOCIETY } from '@/consts/instrument.consts';
|
||||
import instrumentType from '@/helpers/instrumentType';
|
||||
import {INTERDISCIPLINARY, LANGUAGE_COMMUNICATION, SOCIETY} from '@/consts/instrument.consts';
|
||||
import instrumentType, {instrumentCategory} from '@/helpers/instrumentType';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
|
@ -33,13 +33,7 @@
|
|||
'instrument-entry__interdisciplinary': this.instrument.type.category === INTERDISCIPLINARY,
|
||||
};
|
||||
},
|
||||
categoryName() {
|
||||
if (this.$flavor.appFlavor === 'my-kv') {
|
||||
return this.$flavor.textInstruments;
|
||||
} else {
|
||||
return instrumentType(this.instrument);
|
||||
}
|
||||
},
|
||||
categoryName: instrumentCategory,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { LANGUAGE_COMMUNICATION, SOCIETY } from '@/consts/instrument.consts';
|
||||
import {LANGUAGE_COMMUNICATION, SOCIETY} from '@/consts/instrument.consts';
|
||||
import flavor from '@/helpers/app-flavor';
|
||||
|
||||
const instrumentType = ({type: {category}}) => {
|
||||
if (category === LANGUAGE_COMMUNICATION) {
|
||||
|
|
@ -10,4 +11,15 @@ const instrumentType = ({type: {category}}) => {
|
|||
}
|
||||
};
|
||||
|
||||
const instrumentCategory = () => {
|
||||
if (flavor.appFlavor === 'my-kv') {
|
||||
return flavor.textInstruments;
|
||||
} else {
|
||||
return instrumentType(this.instrument);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
export default instrumentType;
|
||||
|
||||
export {instrumentCategory, instrumentType};
|
||||
|
|
|
|||
Loading…
Reference in New Issue