@capillarytech/creatives-library 7.17.33-alpha.3 → 7.17.33-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,7 +13,7 @@ import React from 'react';
|
|
|
13
13
|
import _ from 'lodash';
|
|
14
14
|
// import messages from './messages';
|
|
15
15
|
const loadScript = require('load-script');
|
|
16
|
-
const defaultScriptUrl =
|
|
16
|
+
const defaultScriptUrl = "https://storage.crm.n.content-cdn.io/ckeditor_full/ckeditor/ckeditor.js";
|
|
17
17
|
const user = localStorage.getItem('user');
|
|
18
18
|
let locale = 'en';
|
|
19
19
|
if (user && JSON.parse(user).lang) {
|
package/package.json
CHANGED
package/utils/common.js
CHANGED
|
@@ -71,6 +71,11 @@ export const hasJPLocaleHideFeatureEnabled = Auth.hasFeatureAccess.bind(
|
|
|
71
71
|
JP_LOCALE_HIDE_FEATURE,
|
|
72
72
|
);
|
|
73
73
|
|
|
74
|
+
// export const hasCustomerBarcodeFeatureEnabled = Auth.hasFeatureAccess.bind(
|
|
75
|
+
// null,
|
|
76
|
+
// ENABLE_CUSTOMER_BARCODE_TAG,
|
|
77
|
+
// );
|
|
78
|
+
|
|
74
79
|
//filtering tags based on scope
|
|
75
80
|
export const filterTags = (tagsToFilter, tagsList) => tagsList?.filter(
|
|
76
81
|
(tag) => !tagsToFilter?.includes(tag?.definition?.value)
|
|
@@ -17,7 +17,7 @@ import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
|
|
|
17
17
|
import { createStructuredSelector } from 'reselect';
|
|
18
18
|
import messages from './messages';
|
|
19
19
|
import { makeSelectLoyaltyPromotionDisplay } from '../../v2Containers/Cap/selectors';
|
|
20
|
-
import { CARD_RELATED_TAGS, HOSPITALITY_RELATED_TAGS
|
|
20
|
+
import { CARD_RELATED_TAGS, HOSPITALITY_RELATED_TAGS } from '../../containers/App/constants';
|
|
21
21
|
import { hasCardBasedScope, hasHospitalityBasedScope } from '../../utils/common';
|
|
22
22
|
|
|
23
23
|
import {
|
|
@@ -177,6 +177,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
177
177
|
const { accessibleFeatures = [] } = this?.props?.currentOrgDetails || {};
|
|
178
178
|
const hideDateTagsForJpLocale = accessibleFeatures.includes(JP_LOCALE_HIDE_FEATURE);
|
|
179
179
|
const enabledCustomerBarcode = accessibleFeatures.includes(ENABLE_CUSTOMER_BARCODE_TAG);
|
|
180
|
+
console.log("enabled-->", accessibleFeatures, enabledCustomerBarcode);
|
|
180
181
|
const list = [];
|
|
181
182
|
const loyaltyAttrDisableText = <FormattedMessage {...messages.loyaltyAttributeDisable} />;
|
|
182
183
|
const customerBarcodeDisableText = <FormattedMessage {...messages.customerBarcodeDisable} />;
|
|
@@ -184,9 +185,9 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
184
185
|
if (!hasCardBasedScope()) {
|
|
185
186
|
clonedTags = _.omit(clonedTags, CARD_RELATED_TAGS);
|
|
186
187
|
}
|
|
187
|
-
//code to remove until barcode tag is not supported by BE
|
|
188
|
-
// if (!
|
|
189
|
-
// clonedTags = _.omit(clonedTags,
|
|
188
|
+
// code to remove until barcode tag is not supported by BE
|
|
189
|
+
// if (!hasCustomerBarcodeFeatureEnabled()) {
|
|
190
|
+
// clonedTags = _.omit(clonedTags, ENABLE_CUSTOMER_BARCODE_TAG);
|
|
190
191
|
// }
|
|
191
192
|
if (!hasHospitalityBasedScope()) {
|
|
192
193
|
//filtering HOSPITALITY_RELATED_TAGS if org does not have HOSPITALITY_BASED_SCOPE feature enabled
|
|
@@ -218,6 +219,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
218
219
|
childDisabled = true;
|
|
219
220
|
}
|
|
220
221
|
else childDisabled = disableRelatedTags ? childTagsToDisable.includes(key) : false;
|
|
222
|
+
console.log("child", childDisabled);
|
|
221
223
|
const tempNode = (
|
|
222
224
|
<CapTreeNode
|
|
223
225
|
title={childDisabled ? <CapTooltip title={key === "customer_barcode" ? customerBarcodeDisableText : loyaltyAttrDisableText}>{val.desc || val.name}</CapTooltip> : (val.desc || val.name)} //need to add key name to get tooltip
|
|
@@ -13,8 +13,7 @@ import React from 'react';
|
|
|
13
13
|
import _ from 'lodash';
|
|
14
14
|
// import messages from './messages';
|
|
15
15
|
const loadScript = require('load-script');
|
|
16
|
-
const defaultScriptUrl =
|
|
17
|
-
//const defaultScriptUrl = '{hostName}/arya/ui/library/ckeditor/ckeditor.js'; uncomment for local testing
|
|
16
|
+
const defaultScriptUrl = "https://storage.crm.n.content-cdn.io/ckeditor_full/ckeditor/ckeditor.js";
|
|
18
17
|
const user = localStorage.getItem('user');
|
|
19
18
|
let locale = 'en';
|
|
20
19
|
if (user && JSON.parse(user).lang) {
|