chore: more debug
This commit is contained in:
@@ -129,7 +129,7 @@ export default {
|
||||
console.groupEnd();
|
||||
const menuItems = this.sideMenuConfig.primaryMenu;
|
||||
return menuItems.filter(menuItem => {
|
||||
console.group(menuItem.toStateName);
|
||||
console.log('----------------', menuItem.toStateName);
|
||||
console.log(menuItem);
|
||||
const isAvailableForTheUser = hasPermissions(
|
||||
routesWithPermissions[menuItem.toStateName],
|
||||
@@ -159,7 +159,6 @@ export default {
|
||||
return isEnabled;
|
||||
}
|
||||
console.log('RETURN TRUE');
|
||||
console.groupEnd();
|
||||
return true;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -121,22 +121,24 @@ export default {
|
||||
});
|
||||
},
|
||||
setLocale(localeWithVariation) {
|
||||
console.log('SETTING LOACLE IN WIDGET');
|
||||
if (!localeWithVariation) return;
|
||||
const { enabledLanguages } = window.chatwootWebChannel;
|
||||
const localeWithoutVariation = localeWithVariation.split('_')[0];
|
||||
const hasLocaleWithoutVariation = enabledLanguages.some(
|
||||
lang => lang.iso_639_1_code === localeWithoutVariation
|
||||
);
|
||||
const hasLocaleWithVariation = enabledLanguages.some(
|
||||
lang => lang.iso_639_1_code === localeWithVariation
|
||||
);
|
||||
console.log('IGNORE SETTING LOCALE HAHAHAHAHA!', localeWithVariation);
|
||||
return;
|
||||
// console.log('SETTING LOACLE IN WIDGET');
|
||||
// if (!localeWithVariation) return;
|
||||
// const { enabledLanguages } = window.chatwootWebChannel;
|
||||
// const localeWithoutVariation = localeWithVariation.split('_')[0];
|
||||
// const hasLocaleWithoutVariation = enabledLanguages.some(
|
||||
// lang => lang.iso_639_1_code === localeWithoutVariation
|
||||
// );
|
||||
// const hasLocaleWithVariation = enabledLanguages.some(
|
||||
// lang => lang.iso_639_1_code === localeWithVariation
|
||||
// );
|
||||
|
||||
if (hasLocaleWithVariation) {
|
||||
this.$i18n.locale = localeWithVariation;
|
||||
} else if (hasLocaleWithoutVariation) {
|
||||
this.$i18n.locale = localeWithoutVariation;
|
||||
}
|
||||
// if (hasLocaleWithVariation) {
|
||||
// this.$i18n.locale = localeWithVariation;
|
||||
// } else if (hasLocaleWithoutVariation) {
|
||||
// this.$i18n.locale = localeWithoutVariation;
|
||||
// }
|
||||
},
|
||||
registerUnreadEvents() {
|
||||
emitter.on(ON_AGENT_MESSAGE_RECEIVED, () => {
|
||||
|
||||
Reference in New Issue
Block a user