@capillarytech/creatives-library 7.10.29 → 7.10.31
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.
package/package.json
CHANGED
|
@@ -30,6 +30,7 @@ import { makeSelectFetchingCmsData } from '../Email/selectors';
|
|
|
30
30
|
import { IMAGE as LINE_IMAGE, IMAGE_MAP, IMAGE_CAROUSEL, VIDEO as LINE_VIDEO, TEMPLATE, STICKER } from '../Line/Container/constants';
|
|
31
31
|
import {IMAGE, VIDEO } from '../Facebook/Advertisement/constant';
|
|
32
32
|
import { CREATIVE } from '../Facebook/constants';
|
|
33
|
+
import { LOYALTY } from '../App/constants';
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
const classPrefix = 'add-creatives-section';
|
|
@@ -419,7 +420,10 @@ class Creatives extends React.Component {
|
|
|
419
420
|
if (get(template, "value.versions.base")) {
|
|
420
421
|
const mobilpushTemplate = template.value;
|
|
421
422
|
templateData.accountId = get(mobilpushTemplate, 'definition.accountId');
|
|
422
|
-
|
|
423
|
+
const pathName = get(this.props,"location.pathname");
|
|
424
|
+
if( pathName && `${pathName}`.includes(LOYALTY)){
|
|
425
|
+
templateData.licenseCode = get(mobilpushTemplate, 'definition.licenseCode');
|
|
426
|
+
}
|
|
423
427
|
const androidContent = get(mobilpushTemplate, 'versions.base.ANDROID');
|
|
424
428
|
if (!isEmpty(androidContent)) {
|
|
425
429
|
delete androidContent.cuid;
|
|
@@ -100,9 +100,9 @@ const LINE_FILTERS = {
|
|
|
100
100
|
|
|
101
101
|
const SMS_FILTERS = {
|
|
102
102
|
ALL: 'all',
|
|
103
|
-
PROMOTIONAL: '
|
|
104
|
-
SERVICE_EXPLICIT: '
|
|
105
|
-
SERVICE_IMPLICIT: '
|
|
103
|
+
PROMOTIONAL: 'promo',
|
|
104
|
+
SERVICE_EXPLICIT: 'explicit',
|
|
105
|
+
SERVICE_IMPLICIT: 'implicit',
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
export class Templates extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
@@ -586,7 +586,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
586
586
|
moment.locale(locale);
|
|
587
587
|
};
|
|
588
588
|
getAllTemplates = ({params, getNextPage, resetPage}, resetTemplates) => {
|
|
589
|
-
let queryParams = params;
|
|
589
|
+
let queryParams = params || {};
|
|
590
590
|
let page = this.state.page;
|
|
591
591
|
const { activeMode } = this.state;
|
|
592
592
|
if (activeMode === ACCOUNT_SELECTION_MODE) {
|
|
@@ -659,7 +659,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
659
659
|
if (SMS_FILTERS.ALL === smsFilter) {
|
|
660
660
|
return templates;
|
|
661
661
|
}
|
|
662
|
-
return templates.filter((template) => template.versions.base.type
|
|
662
|
+
return templates.filter((template) => template.versions.base.type?.toLowerCase()?.includes(smsFilter));
|
|
663
663
|
}
|
|
664
664
|
|
|
665
665
|
getTemplateDataForGrid = ({templates, handlers, filterContent, channel, isLoading, loadingTip}) => {
|