@capillarytech/creatives-library 7.10.28 → 7.10.30
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
|
@@ -197,11 +197,7 @@ export const SmsTraiCreate = (props) => {
|
|
|
197
197
|
columnErrorArray.push(
|
|
198
198
|
`${selectedHeaderAlias.toUpperCase()} is mandatory and each ${selectedHeaderAlias.toUpperCase()} must contain either 6 letters or 6 digits. It cannot contain special characters. `,
|
|
199
199
|
);
|
|
200
|
-
} else if (statusIndexes.includes(index) &&
|
|
201
|
-
(cell.toLowerCase() === ACTIVE ||
|
|
202
|
-
cell.toLowerCase() === REGISTERED ||
|
|
203
|
-
cell.toLowerCase() === APPROVED)
|
|
204
|
-
) {
|
|
200
|
+
} else if (statusIndexes.includes(index) && [ACTIVE, REGISTERED, APPROVED].includes(cell.toLowerCase())) {
|
|
205
201
|
statusErrorIndicator = false;
|
|
206
202
|
} else if (index === templateIdIndex && templateIdValidation(cell)) {
|
|
207
203
|
columnErrorArray.push(
|
|
@@ -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}) => {
|