@capillarytech/creatives-library 7.10.21 → 7.10.22

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/config/app.js CHANGED
@@ -17,6 +17,7 @@ const config = {
17
17
  },
18
18
  development: {
19
19
  api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/creatives',
20
+ //api_endpoint: 'http://localhost:2022/arya/api/v1/creatives',
20
21
  campaigns_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/campaigns',
21
22
  campaigns_api_org_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/org/campaign',
22
23
  auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.10.21",
4
+ "version": "7.10.22",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -1,8 +1,6 @@
1
1
  export const DEFAULT_ACTION = 'app/SmsTrai/DEFAULT_ACTION';
2
- export const APPROVAL_STATUS = 'approval status';
3
2
  export const STATUS = 'status';
4
3
  export const TEMPLATE_NAME = 'template name';
5
- export const TYPE = 'type';
6
4
  export const HEADER = 'header';
7
5
  export const TEMPLATE_ID = 'template id';
8
6
  export const SMS = 'SMS';
@@ -11,16 +9,17 @@ export const MAPPED_SAVED_COLUMN = {
11
9
  'TEMPLATE REGISTRATION NUMBER': 'template_id',
12
10
  'TEMPLATE NAME': 'template_name',
13
11
  'TYPE': 'type',
12
+ 'COMMUNICATION TYPE': 'type',
14
13
  'HEADER': 'header',
15
14
  'SENDER ID': 'header',
16
15
  'SENDERS': 'header',
17
16
  'HEADER ID': 'header',
18
- 'HEADERS': 'header',
17
+ 'HEADERS': 'header',
18
+ 'LINKED HEADERS': 'header',
19
19
  'CATEGORY': 'category',
20
20
  'TEMPLATE MESSAGE': 'sms-editor',
21
21
  'TEMPLATE CONTENT': 'sms-editor',
22
22
  'CONSENT TYPE': 'consent-type',
23
- 'COMMUNICATION TYPE': 'consent-type',
24
23
  };
25
24
  export const HEADER_ALIASES = [
26
25
  HEADER,
@@ -28,6 +27,7 @@ export const HEADER_ALIASES = [
28
27
  'senders',
29
28
  'header id',
30
29
  'headers',
30
+ 'linked headers'
31
31
  ];
32
32
  export const TEMPLATE_ID_ALIASES = [
33
33
  'template id',
@@ -37,12 +37,11 @@ export const TEMPLATE_MESSAGE_ALIASES = [
37
37
  'template message',
38
38
  'template content',
39
39
  ];
40
- export const STATUS_ALIASES = [
41
- 'status',
42
- 'template status',
43
- ];
44
- export const MANDATORY_COLUMNS = [TEMPLATE_NAME, TYPE, APPROVAL_STATUS];
45
- export const SAVED_COLUMNS = [TEMPLATE_NAME, TYPE, 'category', 'consent type'];
40
+ //Approval status and status columns are merged as part of CAP-77329
41
+ export const STATUS_ALIASES = ['status', 'template status', 'approval status'];
42
+ export const TYPE_ALIASES = ['type', 'communication type'];
43
+ export const MANDATORY_COLUMNS = [TEMPLATE_NAME];
44
+ export const SAVED_COLUMNS = [TEMPLATE_NAME, 'category', 'consent type'];
46
45
  export const SAMPLE_CSV_DATA = [
47
46
  [
48
47
  'TEMPLATE NAME',
@@ -59,6 +58,7 @@ export const SAMPLE_CSV = 'Sample.csv';
59
58
  export const CAPILLARY_REJECTION_REASON = 'CAPILLARY REJECTION REASON';
60
59
  export const APPROVED = 'approved';
61
60
  export const ACTIVE = 'active';
61
+ export const REGISTERED = 'registered';
62
62
  export const CREATE_TRAI_SMS_TEMPLATE_REQUEST =
63
63
  'app/v2Containers/SmsTrai/Create/CREATE_TRAI_SMS_TEMPLATE_REQUEST';
64
64
  export const CREATE_TRAI_SMS_TEMPLATE_SUCCESS =
@@ -1,3 +1,4 @@
1
+ /* eslint-disable no-undef */
1
2
  import PropTypes from 'prop-types';
2
3
  import React, { useState } from 'react';
3
4
  import { FormattedMessage, injectIntl } from 'react-intl';
@@ -35,12 +36,13 @@ import {
35
36
  DOWNLOAD_ISSUES_CSV,
36
37
  SAMPLE_CSV,
37
38
  CAPILLARY_REJECTION_REASON,
38
- APPROVAL_STATUS,
39
39
  APPROVED,
40
40
  ACTIVE,
41
+ REGISTERED,
41
42
  TEMPLATE_ID_ALIASES,
42
43
  TEMPLATE_MESSAGE_ALIASES,
43
44
  STATUS_ALIASES,
45
+ TYPE_ALIASES,
44
46
  SAVED_COLUMNS,
45
47
  MAPPED_SAVED_COLUMN,
46
48
  SMS,
@@ -121,15 +123,16 @@ export const SmsTraiCreate = (props) => {
121
123
  return isError;
122
124
  };
123
125
 
124
- const checkCSVRowsValidation = (transformedResults, selectedHeaderAlias, selectedTemplateIdAlias, selectedStatusAlias) => {
126
+ const checkCSVRowsValidation = (
127
+ transformedResults,
128
+ selectedHeaderAlias,
129
+ selectedTemplateIdAlias,
130
+ selectedStatusAlias,
131
+ ) => {
125
132
  const headerIndex = getIndexofColumn(
126
133
  transformedResults[0],
127
134
  selectedHeaderAlias,
128
135
  );
129
- const approvalIndex = getIndexofColumn(
130
- transformedResults[0],
131
- APPROVAL_STATUS,
132
- );
133
136
  const templateIdIndex = getIndexofColumn(
134
137
  transformedResults[0],
135
138
  selectedTemplateIdAlias,
@@ -149,30 +152,40 @@ export const SmsTraiCreate = (props) => {
149
152
  columnErrorArray.push(
150
153
  `${selectedHeaderAlias.toUpperCase()} is mandatory and each ${selectedHeaderAlias.toUpperCase()} must contain either 6 letters or 6 digits. It cannot contain special characters. `,
151
154
  );
152
- } else if (index === approvalIndex && cell.toLowerCase() !== APPROVED) {
153
- columnErrorArray.push(`Templates will be created for only approved/ registered templates.`);
154
- } else if (index === statusIndex && cell.toLowerCase() !== ACTIVE) {
155
- columnErrorArray.push(`Only Templates with active status will be created.`);
155
+ } else if (
156
+ index === statusIndex &&
157
+ cell.toLowerCase() !== ACTIVE &&
158
+ cell.toLowerCase() !== REGISTERED &&
159
+ cell.toLowerCase() !== APPROVED
160
+ ) {
161
+ columnErrorArray.push(
162
+ `Only Templates with active/registered/approved status will be created.`,
163
+ );
156
164
  } else if (index === templateIdIndex && templateIdValidation(cell)) {
157
165
  columnErrorArray.push(
158
166
  `${selectedTemplateIdAlias.toUpperCase()} is mandatory and ${selectedTemplateIdAlias.toUpperCase()} must be numeric.`,
159
167
  );
160
- } else if (!cell && ![headerIndex, approvalIndex, templateIdIndex, statusIndex].includes(index)) {
168
+ } else if (
169
+ !cell &&
170
+ ![headerIndex, templateIdIndex, statusIndex].includes(index)
171
+ ) {
161
172
  errorArray.push(`"${transformedResults[0][index]}"`);
162
173
  }
163
174
  });
164
175
 
165
176
  if (errorArray.length !== 0) {
166
- rejectionReasons = `${rejectionReasons} Please include these mandatory fields: ${errorArray.join(
177
+ rejectionReasons = `${rejectionReasons} Please include these mandatory fields value: ${errorArray.join(
167
178
  ' ',
168
179
  )}.`;
169
180
  }
170
181
  if (columnErrorArray.length !== 0) {
171
- rejectionReasons = `${rejectionReasons} ${columnErrorArray.toString().replace(',', ' ')}`;
182
+ rejectionReasons = `${rejectionReasons} ${columnErrorArray
183
+ .toString()
184
+ .replace(',', ' ')}`;
172
185
  }
173
186
  transformedResults[row].push(rejectionReasons);
174
- //if there are rejected reasons present in this row at column 6(where we store rejected reasons), consider it as failure
175
- if (transformedResults[row][7]) {
187
+ //if there are rejected reasons present in this row at last column (where we store rejected reasons), consider it as failure
188
+ if (transformedResults[row][transformedResults[row]?.length - 1]) {
176
189
  setTotalFailCount((prev) => prev + 1);
177
190
  }
178
191
  }
@@ -187,6 +200,7 @@ export const SmsTraiCreate = (props) => {
187
200
  const templateIdAliasPresent = [];
188
201
  const templateMessageAliasPresent = [];
189
202
  const statusAliasPresent = [];
203
+ const typeAliasPresent = [];
190
204
  const colCounts = {};
191
205
  //removing last empty row if each cell is empty
192
206
  if (results?.data[results.data.length - 1]?.every((cell) => !cell)) {
@@ -212,9 +226,7 @@ export const SmsTraiCreate = (props) => {
212
226
  }
213
227
  }
214
228
  if (mandatoryColNotPresent.length > 0) {
215
- setErrorText(
216
- formatMessage(messages.mandatoryColsErrorDescription),
217
- );
229
+ setErrorText(formatMessage(messages.mandatoryColErrorDescription));
218
230
  return;
219
231
  }
220
232
 
@@ -274,6 +286,20 @@ export const SmsTraiCreate = (props) => {
274
286
  );
275
287
  return;
276
288
  }
289
+ //one of the mandatory type alias should be available.
290
+ for (let i = 0; i < TYPE_ALIASES.length; i += 1) {
291
+ if (cols.includes(TYPE_ALIASES[i])) {
292
+ typeAliasPresent.push(TYPE_ALIASES[i]);
293
+ }
294
+ }
295
+ if (typeAliasPresent.length === 0) {
296
+ setErrorText(
297
+ formatMessage(messages.typeAliasErrorDescription, {
298
+ typeAliases: TYPE_ALIASES.join(' / '),
299
+ }),
300
+ );
301
+ return;
302
+ }
277
303
  // count of each col to validate blank and repetitive cols
278
304
  for (const num of cols) {
279
305
  colCounts[num] = colCounts[num] ? colCounts[num] + 1 : 1;
@@ -290,20 +316,32 @@ export const SmsTraiCreate = (props) => {
290
316
  if (repetitiveColsArray.length !== 0) {
291
317
  setErrorText(
292
318
  formatMessage(messages.repetitiveColsErrorDescription, {
293
- repetitiveCols: repetitiveColsArray.join(", "),
319
+ repetitiveCols: repetitiveColsArray.join(', '),
294
320
  }),
295
321
  );
296
322
  return;
297
323
  }
298
324
  //perform required data transformation
299
- return dataTransformHandler(cols, results, headerAliasPresent, templateIdAliasPresent, statusAliasPresent);
325
+ return dataTransformHandler(
326
+ cols,
327
+ results,
328
+ headerAliasPresent,
329
+ templateIdAliasPresent,
330
+ statusAliasPresent,
331
+ );
300
332
  } else {
301
333
  setErrorText(formatMessage(messages.nonCsvErrorDescription));
302
334
  }
303
335
  };
304
336
 
305
- const dataTransformHandler = (cols, results, headerAliasPresent, templateIdAliasPresent, statusAliasPresent) => {
306
- //getting the index of the cols for 7 mandatory cols and also taking care of alias of headers of mandatory columns
337
+ const dataTransformHandler = (
338
+ cols,
339
+ results,
340
+ headerAliasPresent,
341
+ templateIdAliasPresent,
342
+ statusAliasPresent,
343
+ ) => {
344
+ //getting the index of the cols for 6 mandatory cols and also taking care of alias of headers of mandatory columns
307
345
  const indexArray = [];
308
346
  for (let i = 0; i < cols.length; i += 1) {
309
347
  if (
@@ -311,7 +349,8 @@ export const SmsTraiCreate = (props) => {
311
349
  HEADER_ALIASES.includes(cols[i]) ||
312
350
  TEMPLATE_ID_ALIASES.includes(cols[i]) ||
313
351
  TEMPLATE_MESSAGE_ALIASES.includes(cols[i]) ||
314
- STATUS_ALIASES.includes(cols[i])
352
+ STATUS_ALIASES.includes(cols[i]) ||
353
+ TYPE_ALIASES.includes(cols[i])
315
354
  ) {
316
355
  indexArray.push(i);
317
356
  }
@@ -319,15 +358,22 @@ export const SmsTraiCreate = (props) => {
319
358
  //transforming data to keep only mandatory cols data using their index
320
359
  const transformedResults = [];
321
360
  for (const key in results.data) {
322
- transformedResults.push(indexArray.map((i) => results.data[key][i]));
361
+ transformedResults.push(
362
+ indexArray.map((i) => results.data[key][i]?.trim()),
363
+ );
323
364
  }
324
365
  //add rejection header
325
366
  transformedResults[0].push(CAPILLARY_REJECTION_REASON);
326
- return checkCSVRowsValidation(transformedResults, headerAliasPresent[0], templateIdAliasPresent[0], statusAliasPresent[0]);
367
+ return checkCSVRowsValidation(
368
+ transformedResults,
369
+ headerAliasPresent[0],
370
+ templateIdAliasPresent[0],
371
+ statusAliasPresent[0],
372
+ );
327
373
  };
328
374
 
329
375
  //returns the headers(first row) of the uploaded file in lowercase
330
- const getAllColumnNames = (data) => data.map((x) => x.toLowerCase().trim());
376
+ const getAllColumnNames = (data) => data.map((x) => x?.toLowerCase()?.trim());
331
377
 
332
378
  const onDrop = (droppedFile) => {
333
379
  // Sets isFileDropped state to true to load the spinner while the file is being parsed.
@@ -351,7 +397,9 @@ export const SmsTraiCreate = (props) => {
351
397
  }
352
398
  //adding validated rejection reason column to original results
353
399
  for (let i = 0; i < validatedResults.length; i += 1) {
354
- results.data[i].push(validatedResults[i][7]);
400
+ results.data[i].push(
401
+ validatedResults[i][validatedResults[i]?.length - 1],
402
+ );
355
403
  }
356
404
  updateSaveTemplate(true);
357
405
  }
@@ -405,7 +453,9 @@ export const SmsTraiCreate = (props) => {
405
453
  tempArray.push(fileData[row]);
406
454
  }
407
455
  }
408
- tempArray = tempArray.map((row) => row.map((cell) => cell.replace(',', ' ')));
456
+ tempArray = tempArray.map((row) =>
457
+ row.map((cell) => cell.replace(',', ' ')),
458
+ );
409
459
  csvContent = tempArray
410
460
  .map((e) => e.join(','))
411
461
  .map((e) => e.replace(/(\r\n|\n|\r)/gm, ' '))
@@ -449,7 +499,8 @@ export const SmsTraiCreate = (props) => {
449
499
  SAVED_COLUMNS.includes(cols[i]) ||
450
500
  HEADER_ALIASES.includes(cols[i]) ||
451
501
  TEMPLATE_ID_ALIASES.includes(cols[i]) ||
452
- TEMPLATE_MESSAGE_ALIASES.includes(cols[i])
502
+ TEMPLATE_MESSAGE_ALIASES.includes(cols[i]) ||
503
+ TYPE_ALIASES.includes(cols[i])
453
504
  ) {
454
505
  indexArray.push(i);
455
506
  }
@@ -463,7 +514,7 @@ export const SmsTraiCreate = (props) => {
463
514
  if (key === '0') {
464
515
  return MAPPED_SAVED_COLUMN[tempArray[key][i]?.toUpperCase()];
465
516
  }
466
- return tempArray[key][i];
517
+ return tempArray[key][i]?.trim();
467
518
  }),
468
519
  );
469
520
  }
@@ -481,7 +532,7 @@ export const SmsTraiCreate = (props) => {
481
532
  obj['unicode-validity'] = true;
482
533
  obj['updated-sms-editor'] = '';
483
534
  obj['var-mapped'] = {};
484
- obj.header = obj.header.split(',');
535
+ obj.header = obj.header?.replace(/\s/g, '')?.split(',');
485
536
  const history = obj;
486
537
  history.tabKey = 1;
487
538
  savedData.push({
@@ -526,10 +577,10 @@ export const SmsTraiCreate = (props) => {
526
577
 
527
578
  const InstructionComp = (inst) => (
528
579
  <CapRow className="instruction">
529
- <CapColumn span={3}>
530
- <span className="instruction-num">{inst.number}</span>
580
+ <CapColumn span={1}>
581
+ <span className="instruction-num"></span>
531
582
  </CapColumn>
532
- <CapColumn span={21}>{inst.message}</CapColumn>
583
+ <CapColumn span={23}>{inst.message}</CapColumn>
533
584
  </CapRow>
534
585
  );
535
586
 
@@ -538,7 +589,7 @@ export const SmsTraiCreate = (props) => {
538
589
  return (
539
590
  <>
540
591
  <CapRow span={24} className="upload-type-group-create-container">
541
- <CapColumn span={16}>
592
+ <CapColumn span={12}>
542
593
  <CapHeading type="h4" className="upload-file-title">
543
594
  {formatMessage(messages.uploadFile)}
544
595
  </CapHeading>
@@ -585,7 +636,7 @@ export const SmsTraiCreate = (props) => {
585
636
  className="upload-file-preview-divider-1"
586
637
  />
587
638
  <CapRow>
588
- <CapColumn span={13}>
639
+ <CapColumn span={10}>
589
640
  <CapLabel.CapLabelInline type="label9">
590
641
  {file.name}
591
642
  </CapLabel.CapLabelInline>
@@ -603,7 +654,7 @@ export const SmsTraiCreate = (props) => {
603
654
  {errorText && (
604
655
  <>
605
656
  <CapColumn
606
- span={10}
657
+ span={13}
607
658
  className="upload-failed-container"
608
659
  >
609
660
  <CapLabel
@@ -623,7 +674,7 @@ export const SmsTraiCreate = (props) => {
623
674
  {!errorText && (
624
675
  <>
625
676
  <CapColumn
626
- span={3}
677
+ span={4}
627
678
  className="validation-count-container"
628
679
  >
629
680
  <CapLabel
@@ -642,7 +693,7 @@ export const SmsTraiCreate = (props) => {
642
693
  ></CapIcon>
643
694
  </CapColumn>
644
695
  <CapColumn
645
- span={3}
696
+ span={4}
646
697
  className="validation-count-container"
647
698
  >
648
699
  <CapLabel
@@ -659,7 +710,7 @@ export const SmsTraiCreate = (props) => {
659
710
  svgProps={{ color: CAP_RED01 }}
660
711
  ></CapIcon>
661
712
  </CapColumn>
662
- <CapColumn span={4}>
713
+ <CapColumn span={5}>
663
714
  {totalFailCount >= 1 && (
664
715
  <a
665
716
  onClick={downloadIssuesCSV}
@@ -689,16 +740,18 @@ export const SmsTraiCreate = (props) => {
689
740
  </>
690
741
  )}
691
742
  </CapColumn>
692
- <CapColumn span={8} className="upload-instructions-container">
743
+ <CapColumn span={12} className="upload-instructions-container">
693
744
  <CapHeading type="h4">
694
745
  {formatMessage(messages.uploadInstructions)}
695
746
  </CapHeading>
696
747
  <div className="upload-instruction-list">
697
748
  <InstructionComp
698
- number={1}
749
+ message={formatMessage(messages.deferEdit)}
750
+ />
751
+ <InstructionComp
699
752
  message={
700
753
  <FormattedMessage
701
- {...messages.downloadInstruction}
754
+ {...messages.sampleFileInstruction}
702
755
  values={{
703
756
  link: (
704
757
  <a
@@ -713,21 +766,27 @@ export const SmsTraiCreate = (props) => {
713
766
  }
714
767
  />
715
768
  <InstructionComp
716
- number={2}
717
- message={formatMessage(messages.uploadLimitInstruction)}
769
+ message={formatMessage(messages.rowLimitInstruction)}
770
+ />
771
+ <InstructionComp
772
+ message={formatMessage(messages.mandatoryColInstruction)}
773
+ />
774
+ <InstructionComp
775
+ message={formatMessage(messages.statusesInstruction)}
776
+ />
777
+ <InstructionComp
778
+ message={formatMessage(messages.duplicateTemplateIdInstruction)}
718
779
  />
719
780
  <InstructionComp
720
- number={3}
721
- message={formatMessage(messages.mandatoryColsInstruction)}
781
+ message={formatMessage(messages.duplicateTemplateNameInstruction)}
722
782
  />
723
783
  <InstructionComp
724
- number={4}
725
- message={formatMessage(messages.statusInstruction)}
784
+ message={formatMessage(messages.trimInstruction)}
726
785
  />
727
786
  <InstructionComp
728
- number={5}
729
- message={formatMessage(messages.duplicateEntriesInstruction)}
787
+ message={formatMessage(messages.tempInstruction)}
730
788
  />
789
+ <div style={{ marginBottom: '200px' }} />
731
790
  </div>
732
791
  </CapColumn>
733
792
  <SMSTraiFooter>
@@ -62,18 +62,18 @@
62
62
  bottom: -5px;
63
63
  }
64
64
  .upload-instructions-container {
65
- padding-left: $CAP_SPACE_32;
65
+ padding-left: $CAP_SPACE_24;
66
66
  margin-top: 30px;
67
67
 
68
68
  .upload-instruction-list {
69
69
  list-style-type: none;
70
70
  padding-left: 0;
71
71
  .instruction {
72
- margin-top: 30px;
72
+ margin-top: 12px;
73
73
  .instruction-num {
74
74
  display: inline-block;
75
- width: 30px;
76
- height: 30px;
75
+ width: 8px;
76
+ height: 8px;
77
77
  background: #dfe2e7;
78
78
  border-radius: 50%;
79
79
  display: inline-flex;
@@ -29,26 +29,42 @@ export default defineMessages({
29
29
  id: `${prefix}.uploadInstructions`,
30
30
  defaultMessage: 'Upload Instructions',
31
31
  },
32
- downloadInstruction: {
33
- id: `${prefix}.downloadInstruction`,
34
- defaultMessage: 'Download {link} file.',
32
+ sampleFileInstruction: {
33
+ id: `${prefix}.sampleFileInstruction`,
34
+ defaultMessage: 'Users can also download {link} file and populate data. Please ensure that datatype is not changed.',
35
35
  },
36
- uploadLimitInstruction: {
37
- id: `${prefix}.uploadLimitInstruction`,
38
- defaultMessage: 'Upload a file of <= 500 rows.',
36
+ deferEdit: {
37
+ id: `${prefix}.deferEdit`,
38
+ defaultMessage: 'It is highly recommended to use a file directly downloaded from the DLT portal. Editing the file may cause data to truncate unexpectedly.',
39
39
  },
40
- mandatoryColsInstruction: {
41
- id: `${prefix}.mandatoryColsInstruction`,
40
+ rowLimitInstruction: {
41
+ id: `${prefix}.rowLimitInstruction`,
42
+ defaultMessage: 'Maximum 500 rows are allowed in a single file.',
43
+ },
44
+ mandatoryColInstruction: {
45
+ id: `${prefix}.mandatoryColInstruction`,
42
46
  defaultMessage:
43
- 'Please ensure that each template has the following mandatory fields: Template name,Template ID, Type, Sender ID, Approval status, Status, Template message.',
47
+ 'Please ensure that each template has the following mandatory fields: Template name, Template ID, Type, Sender ID, Approval status/Status, Template message.',
48
+ },
49
+ statusesInstruction: {
50
+ id: `${prefix}.statusesInstruction`,
51
+ defaultMessage: 'Only templates in the Approved/ Registered/ Active state will be uploaded.',
52
+ },
53
+ duplicateTemplateIdInstruction: {
54
+ id: `${prefix}.duplicateTemplateIdInstruction`,
55
+ defaultMessage: 'Existing templates with the same template ids will be overwritten.',
56
+ },
57
+ duplicateTemplateNameInstruction: {
58
+ id: `${prefix}.duplicateTemplateNameInstruction`,
59
+ defaultMessage: 'The template name needs to be unique. Any new template with a name matching the existing template name will not be created.',
44
60
  },
45
- statusInstruction: {
46
- id: `${prefix}.statusInstruction`,
47
- defaultMessage: 'Only the "Approved" and “Active” templates will be uploaded.',
61
+ trimInstruction: {
62
+ id: `${prefix}.trimInstruction`,
63
+ defaultMessage: 'Whitespaces will be trimmed from both ends for all template cells.',
48
64
  },
49
- duplicateEntriesInstruction: {
50
- id: `${prefix}.duplicateEntriesInstruction`,
51
- defaultMessage: 'Duplicate entries will be overwritten.',
65
+ tempInstruction: {
66
+ id: `${prefix}.tempInstruction`,
67
+ defaultMessage: 'In case the uploaded file with multiple templates is showing errors, but any campaign needs to be sent urgently, try uploading a single template (as required in the campaign) in Sample CSV.',
52
68
  },
53
69
  fileMinlengthError: {
54
70
  id: `${prefix}.fileMinlengthError`,
@@ -59,14 +75,9 @@ export default defineMessages({
59
75
  defaultMessage:
60
76
  'More then 500 records are not allowed for the selected file.',
61
77
  },
62
- mandatoryColsErrorDescription: {
63
- id: `${prefix}.mandatoryColsErrorDescription`,
64
- defaultMessage: 'Mandatory fields: Template name, Template ID, Type, Sender ID, Approval status, Status and Template message are required for templates.',
65
- },
66
- repetitiveColsErrorDescription: {
67
- id: `${prefix}.repetitiveColsErrorDescription`,
68
- defaultMessage:
69
- 'Please remove repetitive fields ({repetitiveCols}) from the file.',
78
+ mandatoryColErrorDescription: {
79
+ id: `${prefix}.mandatoryColErrorDescription`,
80
+ defaultMessage: 'Please include mandatory field Template name.',
70
81
  },
71
82
  headerAliasErrorDescription: {
72
83
  id: `${prefix}.headerAliasErrorDescription`,
@@ -88,6 +99,16 @@ export default defineMessages({
88
99
  defaultMessage:
89
100
  'Please include mandatory field status. It can be {statusAliases}.',
90
101
  },
102
+ typeAliasErrorDescription: {
103
+ id: `${prefix}.typeAliasErrorDescription`,
104
+ defaultMessage:
105
+ 'Please include mandatory field type. It can be {typeAliases}.',
106
+ },
107
+ repetitiveColsErrorDescription: {
108
+ id: `${prefix}.repetitiveColsErrorDescription`,
109
+ defaultMessage:
110
+ 'Please remove repetitive fields ({repetitiveCols}) from the file.',
111
+ },
91
112
  nonCsvErrorDescription: {
92
113
  id: `${prefix}.nonCsvErrorDescription`,
93
114
  defaultMessage: 'Please select a csv file.',