@adlfe/campaign-management-library 2.11.1 → 2.11.4
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/adlfe-campaign-management-library.d.ts +14 -9
- package/adlfe-campaign-management-library.metadata.json +1 -1
- package/bundles/adlfe-campaign-management-library.umd.js +372 -109
- package/bundles/adlfe-campaign-management-library.umd.js.map +1 -1
- package/bundles/adlfe-campaign-management-library.umd.min.js +1 -1
- package/bundles/adlfe-campaign-management-library.umd.min.js.map +1 -1
- package/esm2015/adlfe-campaign-management-library.js +15 -10
- package/esm2015/environments/environment.js +3 -3
- package/esm2015/lib/campaign-management/campaign-management.module.js +4 -2
- package/esm2015/lib/campaign-management/components/input-numeric/input-numeric.component.js +113 -0
- package/esm2015/lib/campaign-management/components/input-numeric/input-numeric.module.js +18 -0
- package/esm2015/lib/campaign-management/models/general-information-wa-req.model.js +12 -2
- package/esm2015/lib/campaign-management/modules/campaign-index/component/filter-in-list-of-campaign/filter-in-list-of-campaign.component.js +1 -1
- package/esm2015/lib/campaign-management/modules/campaign-index/dialog/pending-approval-dialog-view/pending-approval-dialog-view.component.js +45 -43
- package/esm2015/lib/campaign-management/modules/new-campaign/components/general-information-wa/general-information-wa.component.js +64 -5
- package/esm2015/lib/campaign-management/modules/new-campaign/general-information/general-information.component.js +3 -3
- package/esm2015/lib/campaign-management/modules/new-campaign/new-campaign.component.js +45 -41
- package/esm2015/lib/campaign-management/validators/index.js +12 -0
- package/esm2015/lib/campaign-management/validators/max.validator.js +14 -0
- package/esm2015/lib/campaign-management/validators/min.validator.js +14 -0
- package/esm2015/lib/campaign-management/validators/required.validator.js +10 -0
- package/esm2015/lib/core/const/constants.const.js +6 -6
- package/esm2015/lib/core/const/validation-message.const.js +5 -2
- package/esm2015/public-api.js +1 -6
- package/esm5/adlfe-campaign-management-library.js +15 -10
- package/esm5/environments/environment.js +3 -3
- package/esm5/lib/campaign-management/campaign-management.module.js +4 -2
- package/esm5/lib/campaign-management/components/input-numeric/input-numeric.component.js +127 -0
- package/esm5/lib/campaign-management/components/input-numeric/input-numeric.module.js +21 -0
- package/esm5/lib/campaign-management/models/general-information-wa-req.model.js +12 -2
- package/esm5/lib/campaign-management/modules/campaign-index/component/filter-in-list-of-campaign/filter-in-list-of-campaign.component.js +1 -1
- package/esm5/lib/campaign-management/modules/campaign-index/dialog/pending-approval-dialog-view/pending-approval-dialog-view.component.js +44 -40
- package/esm5/lib/campaign-management/modules/new-campaign/components/general-information-wa/general-information-wa.component.js +68 -5
- package/esm5/lib/campaign-management/modules/new-campaign/general-information/general-information.component.js +3 -3
- package/esm5/lib/campaign-management/modules/new-campaign/new-campaign.component.js +45 -41
- package/esm5/lib/campaign-management/validators/index.js +12 -0
- package/esm5/lib/campaign-management/validators/max.validator.js +14 -0
- package/esm5/lib/campaign-management/validators/min.validator.js +14 -0
- package/esm5/lib/campaign-management/validators/required.validator.js +10 -0
- package/esm5/lib/core/const/constants.const.js +6 -6
- package/esm5/lib/core/const/validation-message.const.js +5 -2
- package/esm5/public-api.js +1 -6
- package/fesm2015/adlfe-campaign-management-library.js +419 -179
- package/fesm2015/adlfe-campaign-management-library.js.map +1 -1
- package/fesm5/adlfe-campaign-management-library.js +439 -176
- package/fesm5/adlfe-campaign-management-library.js.map +1 -1
- package/lib/campaign-management/components/input-numeric/input-numeric.component.d.ts +30 -0
- package/lib/campaign-management/components/input-numeric/input-numeric.module.d.ts +2 -0
- package/lib/campaign-management/models/general-information-wa-req.model.d.ts +3 -0
- package/lib/campaign-management/modules/new-campaign/components/general-information-wa/general-information-wa.component.d.ts +7 -0
- package/lib/campaign-management/validators/index.d.ts +8 -0
- package/lib/campaign-management/validators/max.validator.d.ts +2 -0
- package/lib/campaign-management/validators/min.validator.d.ts +2 -0
- package/lib/campaign-management/validators/required.validator.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __extends, __assign, __spread, __param, __values } from 'tslib';
|
|
2
|
-
import { Component, EventEmitter, Output, Input, NgModule, NgZone, Directive, ɵɵdefineInjectable, ɵɵinject, Injectable, Inject, ViewChild } from '@angular/core';
|
|
2
|
+
import { Component, EventEmitter, Output, Input, NgModule, ContentChild, forwardRef, NgZone, Directive, ɵɵdefineInjectable, ɵɵinject, Injectable, Inject, ViewChild } from '@angular/core';
|
|
3
3
|
import { MapsAPILoader, AgmCoreModule } from '@agm/core';
|
|
4
4
|
import { CommonModule, DatePipe } from '@angular/common';
|
|
5
5
|
import { HttpHeaders, HttpClient, HttpParams, HttpClientModule } from '@angular/common/http';
|
|
@@ -8,7 +8,7 @@ import { MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginato
|
|
|
8
8
|
import { NgxEchartsModule } from 'ngx-echarts';
|
|
9
9
|
import { ToastrService, ToastrModule } from 'ngx-toastr';
|
|
10
10
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
11
|
-
import { FormControl, FormsModule, ReactiveFormsModule, FormGroup, Validators, FormArray } from '@angular/forms';
|
|
11
|
+
import { FormControl, FormsModule, ReactiveFormsModule, ControlContainer, NG_VALUE_ACCESSOR, FormGroup, Validators as Validators$1, FormArray } from '@angular/forms';
|
|
12
12
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
13
13
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
14
14
|
import { MatButtonModule } from '@angular/material/button';
|
|
@@ -164,6 +164,142 @@ var CampaignManagementComponent = /** @class */ (function () {
|
|
|
164
164
|
return CampaignManagementComponent;
|
|
165
165
|
}());
|
|
166
166
|
|
|
167
|
+
var InputNumericComponent = /** @class */ (function () {
|
|
168
|
+
function InputNumericComponent(controlContainer) {
|
|
169
|
+
this.controlContainer = controlContainer;
|
|
170
|
+
this.allowDecimal = true;
|
|
171
|
+
}
|
|
172
|
+
InputNumericComponent_1 = InputNumericComponent;
|
|
173
|
+
InputNumericComponent.prototype.handleInput = function (event) {
|
|
174
|
+
var inputElement = event.target;
|
|
175
|
+
var value = inputElement.value || '';
|
|
176
|
+
var numeric = this.allowDecimal ? value.replace(/[^0-9.]/g, '') : value.replace(/\D/g, '');
|
|
177
|
+
if (this.allowDecimal) {
|
|
178
|
+
var parts = numeric.split('.');
|
|
179
|
+
if (parts.length > 2) {
|
|
180
|
+
numeric = parts[0] + '.' + parts.slice(1).join('');
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if (this.disallowLeadingZero &&
|
|
184
|
+
numeric.startsWith('0') &&
|
|
185
|
+
numeric.length > 1 &&
|
|
186
|
+
numeric[1] !== '.') {
|
|
187
|
+
numeric = numeric.replace(/^0+/, '');
|
|
188
|
+
}
|
|
189
|
+
var finalValue = numeric;
|
|
190
|
+
if (this.trimLeadingZeros && numeric !== '' && !numeric.includes('.')) {
|
|
191
|
+
finalValue = +numeric;
|
|
192
|
+
}
|
|
193
|
+
this.formControl.patchValue(finalValue, { emitEvent: false });
|
|
194
|
+
};
|
|
195
|
+
InputNumericComponent.prototype.ngOnInit = function () {
|
|
196
|
+
this.setBaseStateInitialization();
|
|
197
|
+
};
|
|
198
|
+
InputNumericComponent.prototype.setBaseStateInitialization = function () {
|
|
199
|
+
if (!this.formControlName)
|
|
200
|
+
return;
|
|
201
|
+
var formGroup = this.controlContainer.control;
|
|
202
|
+
this.formControl = formGroup.get(this.formControlName);
|
|
203
|
+
};
|
|
204
|
+
Object.defineProperty(InputNumericComponent.prototype, "isValid", {
|
|
205
|
+
get: function () {
|
|
206
|
+
var _a, _b;
|
|
207
|
+
return !!(((_a = this.formControl) === null || _a === void 0 ? void 0 : _a.touched) && ((_b = this.formControl) === null || _b === void 0 ? void 0 : _b.valid));
|
|
208
|
+
},
|
|
209
|
+
enumerable: true,
|
|
210
|
+
configurable: true
|
|
211
|
+
});
|
|
212
|
+
Object.defineProperty(InputNumericComponent.prototype, "isInvalid", {
|
|
213
|
+
get: function () {
|
|
214
|
+
var _a, _b;
|
|
215
|
+
return !!(((_a = this.formControl) === null || _a === void 0 ? void 0 : _a.touched) && ((_b = this.formControl) === null || _b === void 0 ? void 0 : _b.invalid));
|
|
216
|
+
},
|
|
217
|
+
enumerable: true,
|
|
218
|
+
configurable: true
|
|
219
|
+
});
|
|
220
|
+
Object.defineProperty(InputNumericComponent.prototype, "errors", {
|
|
221
|
+
get: function () {
|
|
222
|
+
return this.formControl.errors;
|
|
223
|
+
},
|
|
224
|
+
enumerable: true,
|
|
225
|
+
configurable: true
|
|
226
|
+
});
|
|
227
|
+
InputNumericComponent.prototype.writeValue = function (value) {
|
|
228
|
+
this._value = value;
|
|
229
|
+
};
|
|
230
|
+
InputNumericComponent.prototype.registerOnChange = function (fn) {
|
|
231
|
+
this._onBaseChange = fn;
|
|
232
|
+
};
|
|
233
|
+
InputNumericComponent.prototype.registerOnTouched = function (fn) {
|
|
234
|
+
this._onBaseTouched = fn;
|
|
235
|
+
};
|
|
236
|
+
InputNumericComponent.prototype.setDisabledState = function (isDisabled) {
|
|
237
|
+
this._isDisabled = isDisabled;
|
|
238
|
+
};
|
|
239
|
+
var InputNumericComponent_1;
|
|
240
|
+
InputNumericComponent.ctorParameters = function () { return [
|
|
241
|
+
{ type: ControlContainer }
|
|
242
|
+
]; };
|
|
243
|
+
__decorate([
|
|
244
|
+
Input()
|
|
245
|
+
], InputNumericComponent.prototype, "formControlName", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
Input()
|
|
248
|
+
], InputNumericComponent.prototype, "formControl", void 0);
|
|
249
|
+
__decorate([
|
|
250
|
+
Input()
|
|
251
|
+
], InputNumericComponent.prototype, "trimLeadingZeros", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
Input()
|
|
254
|
+
], InputNumericComponent.prototype, "disallowLeadingZero", void 0);
|
|
255
|
+
__decorate([
|
|
256
|
+
Input()
|
|
257
|
+
], InputNumericComponent.prototype, "allowDecimal", void 0);
|
|
258
|
+
__decorate([
|
|
259
|
+
Input()
|
|
260
|
+
], InputNumericComponent.prototype, "identifier", void 0);
|
|
261
|
+
__decorate([
|
|
262
|
+
Input()
|
|
263
|
+
], InputNumericComponent.prototype, "placeholder", void 0);
|
|
264
|
+
__decorate([
|
|
265
|
+
Input()
|
|
266
|
+
], InputNumericComponent.prototype, "label", void 0);
|
|
267
|
+
__decorate([
|
|
268
|
+
Input()
|
|
269
|
+
], InputNumericComponent.prototype, "maxLength", void 0);
|
|
270
|
+
__decorate([
|
|
271
|
+
ContentChild('suffix')
|
|
272
|
+
], InputNumericComponent.prototype, "suffixTmpl", void 0);
|
|
273
|
+
InputNumericComponent = InputNumericComponent_1 = __decorate([
|
|
274
|
+
Component({
|
|
275
|
+
selector: 'app-input[type=numeric]',
|
|
276
|
+
template: "<div class=\"grid\">\r\n <mat-form-field class=\"w-full\" appearance=\"outline\" floatLabel=\"always\">\r\n <mat-label *ngIf=\"label\">\r\n <span>{{ label }}</span>\r\n </mat-label>\r\n <input\r\n type=\"text\"\r\n [id]=\"identifier\"\r\n [attr.data-testid]=\"identifier\"\r\n matInput\r\n [placeholder]=\"placeholder\"\r\n [formControl]=\"formControl\"\r\n (input)=\"handleInput($event)\"\r\n [attr.maxlength]=\"maxLength\"\r\n />\r\n <span *ngIf=\"suffixTmpl\" matSuffix>\r\n <ng-container *ngTemplateOutlet=\"suffixTmpl\"></ng-container>\r\n </span>\r\n </mat-form-field>\r\n <mat-error align=\"end\" class=\"leading-zero\" *ngIf=\"isInvalid\">\r\n <small class=\"text-xs\">\r\n {{ errors?.message }}\r\n </small>\r\n </mat-error>\r\n</div>\r\n",
|
|
277
|
+
providers: [
|
|
278
|
+
{
|
|
279
|
+
provide: NG_VALUE_ACCESSOR,
|
|
280
|
+
useExisting: forwardRef(function () { return InputNumericComponent_1; }),
|
|
281
|
+
multi: true,
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
styles: [":host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-prefix,:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-suffix{top:0}"]
|
|
285
|
+
})
|
|
286
|
+
], InputNumericComponent);
|
|
287
|
+
return InputNumericComponent;
|
|
288
|
+
}());
|
|
289
|
+
|
|
290
|
+
var InputNumericModule = /** @class */ (function () {
|
|
291
|
+
function InputNumericModule() {
|
|
292
|
+
}
|
|
293
|
+
InputNumericModule = __decorate([
|
|
294
|
+
NgModule({
|
|
295
|
+
imports: [MatFormFieldModule, MatInputModule, ReactiveFormsModule, CommonModule],
|
|
296
|
+
declarations: [InputNumericComponent],
|
|
297
|
+
exports: [InputNumericComponent],
|
|
298
|
+
})
|
|
299
|
+
], InputNumericModule);
|
|
300
|
+
return InputNumericModule;
|
|
301
|
+
}());
|
|
302
|
+
|
|
167
303
|
var MatSelectInfiniteScrollDirective = /** @class */ (function () {
|
|
168
304
|
function MatSelectInfiniteScrollDirective(matSelect, ngZone) {
|
|
169
305
|
this.matSelect = matSelect;
|
|
@@ -671,11 +807,11 @@ else if (origin.includes('dashboard-qa')) {
|
|
|
671
807
|
}
|
|
672
808
|
// 4. Cek Demo Dev secara spesifik
|
|
673
809
|
else if (origin.includes('demo-dev')) {
|
|
674
|
-
API_CONST = 'https://
|
|
810
|
+
API_CONST = 'https://apibsp-dev.adlsandbox.net';
|
|
675
811
|
}
|
|
676
812
|
// 5. Default (Localhost atau lainnya)
|
|
677
813
|
else {
|
|
678
|
-
API_CONST = 'https://
|
|
814
|
+
API_CONST = 'https://apibsp-dev.adlsandbox.net';
|
|
679
815
|
}
|
|
680
816
|
var environment = {
|
|
681
817
|
production: false,
|
|
@@ -1090,6 +1226,10 @@ var MsgTypeWAOptionConst = [
|
|
|
1090
1226
|
name: 'Template',
|
|
1091
1227
|
code: 'TEMPLATE',
|
|
1092
1228
|
},
|
|
1229
|
+
{
|
|
1230
|
+
name: 'Text - Utility',
|
|
1231
|
+
code: 'utility',
|
|
1232
|
+
},
|
|
1093
1233
|
];
|
|
1094
1234
|
var MsgTypeEmailOptionConst = [
|
|
1095
1235
|
{
|
|
@@ -1171,11 +1311,7 @@ var CampaignPerformanceChartConfig = {
|
|
|
1171
1311
|
{ type: 'bar', color: '#35CDF3' },
|
|
1172
1312
|
],
|
|
1173
1313
|
};
|
|
1174
|
-
var ɵ0 = [
|
|
1175
|
-
'Delivery Rate of Campaigns',
|
|
1176
|
-
'Total Number of Campaigns',
|
|
1177
|
-
'Cost Distribution',
|
|
1178
|
-
], ɵ1 = [], ɵ2 = [], ɵ3 = [], ɵ4 = [];
|
|
1314
|
+
var ɵ0 = ['Delivery Rate of Campaigns', 'Total Number of Campaigns', 'Cost Distribution'], ɵ1 = [], ɵ2 = [], ɵ3 = [], ɵ4 = [];
|
|
1179
1315
|
var ConversationInsightsChartConfig = {
|
|
1180
1316
|
tooltip: {
|
|
1181
1317
|
trigger: 'axis',
|
|
@@ -1287,7 +1423,10 @@ var GeneralInformationMessageValidationConst = {
|
|
|
1287
1423
|
var GeneralInformationWAMessageValidationConst = {
|
|
1288
1424
|
channel: [{ type: 'required', message: 'Message Type is required' }],
|
|
1289
1425
|
from: [{ type: 'required', message: 'From is required' }],
|
|
1290
|
-
text: [
|
|
1426
|
+
text: [
|
|
1427
|
+
{ type: 'required', message: 'Text is required' },
|
|
1428
|
+
{ type: 'maxlength', message: 'Maximum character 1024' },
|
|
1429
|
+
],
|
|
1291
1430
|
media: [{ type: 'required', message: 'Media Type is required' }],
|
|
1292
1431
|
fileName: [{ type: 'required', message: 'File is required' }],
|
|
1293
1432
|
template: [{ type: 'required', message: 'Template is required' }],
|
|
@@ -1588,7 +1727,7 @@ var FilterInListOfCampaignComponent = /** @class */ (function () {
|
|
|
1588
1727
|
Component({
|
|
1589
1728
|
selector: 'lib-filter-in-list-of-campaign',
|
|
1590
1729
|
template: "<p class=\"font-16px font-bold\">Filter</p>\r\n\r\n<form [formGroup]=\"form\" class=\"contact-filter\">\r\n <div class=\"row\">\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-70\">\r\n <mat-label>Business Name</mat-label>\r\n <mat-select placeholder=\"Select Business Name\" formControlName=\"businessName\">\r\n <div class=\"select-search\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n (searchRes)=\"businessNameSearch($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option value=\"\"> --- select none --- </mat-option>\r\n <mat-option\r\n *ngFor=\"let option of filteredBusinessNameOption\"\r\n [value]=\"option.id\"\r\n >\r\n {{ option.name }}\r\n </mat-option>\r\n <mat-option *ngIf=\"!filteredBusinessNameOption.length\" disabled>\r\n No data found\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-70\">\r\n <mat-label>Channel</mat-label>\r\n\r\n <mat-select placeholder=\"Select the Channel\" formControlName=\"medium\">\r\n <mat-option value=\"\"> --- select none --- </mat-option>\r\n <mat-option\r\n *ngFor=\"let option of filteredChannelOption\"\r\n [value]=\"option.value\"\r\n (click)=\"getTemplateOptionService()\"\r\n >\r\n {{ option.label }}\r\n </mat-option>\r\n <mat-option *ngIf=\"!filteredChannelOption.length\" disabled>\r\n No data found\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label class=\"asterix--after\">Template Name</mat-label>\r\n\r\n <mat-select\r\n matSelectInfiniteScroll\r\n formControlName=\"templateName\"\r\n placeholder=\"Select template\"\r\n [complete]=\"isHaveNextTemplateOption === false\"\r\n [compareWith]=\"templateSelectedDisplay\"\r\n (infiniteScroll)=\"getNextTemplateBatch()\"\r\n >\r\n <div style=\"margin: 20px\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n [currentValue]=\"form?.get('templateName').value?.name\"\r\n (searchRes)=\"templateSearch($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option *ngFor=\"let option of templateOption\" [value]=\"option\">\r\n {{ option.name }}\r\n </mat-option>\r\n <mat-option *ngIf=\"isLoadingTemplateOption\">Loading...</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-70\">\r\n <mat-label>Status</mat-label>\r\n\r\n <mat-select placeholder=\"Select the Status\" formControlName=\"status\">\r\n <div class=\"select-search\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n (searchRes)=\"statusSearch($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option value=\"\"> --- select none --- </mat-option>\r\n <mat-option\r\n *ngFor=\"let option of filteredStatusOption\"\r\n [value]=\"option.value\"\r\n >\r\n {{ option.label }}\r\n </mat-option>\r\n <mat-option *ngIf=\"!filteredStatusOption.length\" disabled>\r\n No data found\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label> Start Date </mat-label>\r\n <input\r\n matInput\r\n [matDatepicker]=\"startDatePicker\"\r\n formControlName=\"startDate\"\r\n class=\"mat-datepicker-input\"\r\n (dateChange)=\"validateBackDate()\"\r\n />\r\n\r\n <mat-datepicker-toggle matSuffix [for]=\"startDatePicker\">\r\n </mat-datepicker-toggle>\r\n <mat-icon\r\n *ngIf=\"form.get('startDate').value\"\r\n matDatepickerToggleIcon\r\n (click)=\"clearDate()\"\r\n >clear</mat-icon\r\n >\r\n <mat-datepicker #startDatePicker></mat-datepicker>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-md-12 col-12\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label> End Date </mat-label>\r\n <input\r\n matInput\r\n [min]=\"form.get('startDate').value\"\r\n [matDatepicker]=\"endDatePicker\"\r\n formControlName=\"endDate\"\r\n class=\"mat-datepicker-input\"\r\n (dateChange)=\"validateBackDate()\"\r\n />\r\n\r\n <mat-datepicker-toggle matSuffix [for]=\"endDatePicker\"> </mat-datepicker-toggle>\r\n <mat-icon\r\n *ngIf=\"form.get('endDate').value\"\r\n matDatepickerToggleIcon\r\n (click)=\"clearDate()\"\r\n >clear</mat-icon\r\n >\r\n <mat-datepicker #endDatePicker></mat-datepicker>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n <div style=\"display: flex; flex: 1; width: 100%\">\r\n <button\r\n mat-stroked-button\r\n color=\"primary-telin\"\r\n class=\"telin-font-color w-48\"\r\n style=\"width: 100%; margin-bottom: 10px\"\r\n (click)=\"onReset()\"\r\n >\r\n Reset\r\n </button>\r\n </div>\r\n <div class=\"d-flex justify-content-between\">\r\n <button mat-stroked-button color=\"secondary-telin\" class=\"w-48\" (click)=\"onCancel()\">\r\n Cancel\r\n </button>\r\n\r\n <button mat-flat-button color=\"primary-telin-blue2\" class=\"w-48\" (click)=\"onApply()\">\r\n Apply\r\n </button>\r\n </div>\r\n </div>\r\n</form>\r\n",
|
|
1591
|
-
styles: [".contact-filter .platform{display:grid;grid-gap:5px;grid-template-columns:auto 1fr auto}.button-row{margin:8px 8px 8px 0}.mat-datepicker-input{width:85%}.mat-icon{position:relative;float:right;top:-7px;cursor:pointer;color:rgba(0,0,0,.54)}.select-search{margin:20px}"]
|
|
1730
|
+
styles: [".contact-filter .platform{display:-ms-grid;display:grid;grid-gap:5px;-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}.button-row{margin:8px 8px 8px 0}.mat-datepicker-input{width:85%}.mat-icon{position:relative;float:right;top:-7px;cursor:pointer;color:rgba(0,0,0,.54)}.select-search{margin:20px}"]
|
|
1592
1731
|
}),
|
|
1593
1732
|
Injectable({
|
|
1594
1733
|
providedIn: 'root',
|
|
@@ -1682,7 +1821,7 @@ var PendingApprovalDialogViewComponent = /** @class */ (function () {
|
|
|
1682
1821
|
var subs = this.apiAdapterService
|
|
1683
1822
|
.executeApiRequest([], "/campaign/" + ((_d = (_c = this.getCampaignStorage) === null || _c === void 0 ? void 0 : _c.generalInformation) === null || _d === void 0 ? void 0 : _d.id), 'GET')
|
|
1684
1823
|
.subscribe(function (resp) {
|
|
1685
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60;
|
|
1824
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67;
|
|
1686
1825
|
if (!resp)
|
|
1687
1826
|
return;
|
|
1688
1827
|
var generalInformation = {
|
|
@@ -1690,61 +1829,65 @@ var PendingApprovalDialogViewComponent = /** @class */ (function () {
|
|
|
1690
1829
|
medium: (_b = resp.data) === null || _b === void 0 ? void 0 : _b.platform,
|
|
1691
1830
|
channel: ['image', 'video', 'document'].includes((_c = resp.data) === null || _c === void 0 ? void 0 : _c.type)
|
|
1692
1831
|
? 'MEDIA'
|
|
1693
|
-
: (
|
|
1694
|
-
|
|
1832
|
+
: ((_d = resp.data) === null || _d === void 0 ? void 0 : _d.isDirectSend) ? 'utility'
|
|
1833
|
+
: (_f = (_e = resp.data) === null || _e === void 0 ? void 0 : _e.type) === null || _f === void 0 ? void 0 : _f.toUpperCase(),
|
|
1834
|
+
media: (_h = (_g = resp.data) === null || _g === void 0 ? void 0 : _g.type) === null || _h === void 0 ? void 0 : _h.toUpperCase(),
|
|
1835
|
+
isPrevTemplate: (_k = (_j = resp) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k.isPrevTemplate,
|
|
1836
|
+
templateName: (_m = (_l = resp) === null || _l === void 0 ? void 0 : _l.data) === null || _m === void 0 ? void 0 : _m.templateName,
|
|
1837
|
+
ttl: (_p = (_o = resp) === null || _o === void 0 ? void 0 : _o.data) === null || _p === void 0 ? void 0 : _p.ttlSeconds,
|
|
1695
1838
|
from: {
|
|
1696
|
-
id: (
|
|
1697
|
-
name: (
|
|
1698
|
-
platform: (
|
|
1699
|
-
clientId: (
|
|
1700
|
-
clientName: (
|
|
1701
|
-
accountNo: (
|
|
1702
|
-
wabaId: (
|
|
1839
|
+
id: (_q = resp.data) === null || _q === void 0 ? void 0 : _q.accountId,
|
|
1840
|
+
name: (_r = resp.data) === null || _r === void 0 ? void 0 : _r.accountName,
|
|
1841
|
+
platform: (_s = resp.data) === null || _s === void 0 ? void 0 : _s.platform,
|
|
1842
|
+
clientId: (_t = resp.data) === null || _t === void 0 ? void 0 : _t.clientId,
|
|
1843
|
+
clientName: (_u = resp.data) === null || _u === void 0 ? void 0 : _u.clientName,
|
|
1844
|
+
accountNo: (_v = resp.data) === null || _v === void 0 ? void 0 : _v.accountNo,
|
|
1845
|
+
wabaId: (_x = (_w = resp.data) === null || _w === void 0 ? void 0 : _w.wabaId, (_x !== null && _x !== void 0 ? _x : '')),
|
|
1703
1846
|
},
|
|
1704
|
-
text: (
|
|
1705
|
-
targetURL: (
|
|
1706
|
-
paramHeader: (
|
|
1707
|
-
paramBody: (
|
|
1708
|
-
paramButton: (
|
|
1709
|
-
otpValue: (
|
|
1847
|
+
text: (_z = (_y = resp.data) === null || _y === void 0 ? void 0 : _y.details) === null || _z === void 0 ? void 0 : _z.text,
|
|
1848
|
+
targetURL: (_11 = (_7 = (_3 = (_2 = (_1 = (_0 = resp.data) === null || _0 === void 0 ? void 0 : _0.details) === null || _1 === void 0 ? void 0 : _1.image) === null || _2 === void 0 ? void 0 : _2.url, (_3 !== null && _3 !== void 0 ? _3 : (_6 = (_5 = (_4 = resp.data) === null || _4 === void 0 ? void 0 : _4.details) === null || _5 === void 0 ? void 0 : _5.document) === null || _6 === void 0 ? void 0 : _6.url)), (_7 !== null && _7 !== void 0 ? _7 : (_10 = (_9 = (_8 = resp.data) === null || _8 === void 0 ? void 0 : _8.details) === null || _9 === void 0 ? void 0 : _9.video) === null || _10 === void 0 ? void 0 : _10.url)), (_11 !== null && _11 !== void 0 ? _11 : (_14 = (_13 = (_12 = resp.data) === null || _12 === void 0 ? void 0 : _12.details) === null || _13 === void 0 ? void 0 : _13.template) === null || _14 === void 0 ? void 0 : _14.headerURL)),
|
|
1849
|
+
paramHeader: (_17 = (_16 = (_15 = resp.data) === null || _15 === void 0 ? void 0 : _15.details) === null || _16 === void 0 ? void 0 : _16.template) === null || _17 === void 0 ? void 0 : _17.header,
|
|
1850
|
+
paramBody: (_20 = (_19 = (_18 = resp.data) === null || _18 === void 0 ? void 0 : _18.details) === null || _19 === void 0 ? void 0 : _19.template) === null || _20 === void 0 ? void 0 : _20.data,
|
|
1851
|
+
paramButton: (_23 = (_22 = (_21 = resp.data) === null || _21 === void 0 ? void 0 : _21.details) === null || _22 === void 0 ? void 0 : _22.template) === null || _23 === void 0 ? void 0 : _23.button,
|
|
1852
|
+
otpValue: (_28 = __spread((_27 = (_26 = (_25 = (_24 = resp.data) === null || _24 === void 0 ? void 0 : _24.details) === null || _25 === void 0 ? void 0 : _25.template) === null || _26 === void 0 ? void 0 : _26.data, (_27 !== null && _27 !== void 0 ? _27 : [])))) === null || _28 === void 0 ? void 0 : _28.pop(),
|
|
1710
1853
|
template: {
|
|
1711
|
-
ID: (
|
|
1712
|
-
name: (
|
|
1713
|
-
lang: (
|
|
1714
|
-
platform: (
|
|
1715
|
-
headerURL: (
|
|
1854
|
+
ID: (_31 = (_30 = (_29 = resp.data) === null || _29 === void 0 ? void 0 : _29.details) === null || _30 === void 0 ? void 0 : _30.template) === null || _31 === void 0 ? void 0 : _31.id,
|
|
1855
|
+
name: (_34 = (_33 = (_32 = resp.data) === null || _32 === void 0 ? void 0 : _32.details) === null || _33 === void 0 ? void 0 : _33.template) === null || _34 === void 0 ? void 0 : _34.name,
|
|
1856
|
+
lang: (_37 = (_36 = (_35 = resp.data) === null || _35 === void 0 ? void 0 : _35.details) === null || _36 === void 0 ? void 0 : _36.template) === null || _37 === void 0 ? void 0 : _37.lang,
|
|
1857
|
+
platform: (_38 = resp.data) === null || _38 === void 0 ? void 0 : _38.platform,
|
|
1858
|
+
headerURL: (_41 = (_40 = (_39 = resp.data) === null || _39 === void 0 ? void 0 : _39.details) === null || _40 === void 0 ? void 0 : _40.template) === null || _41 === void 0 ? void 0 : _41.headerURL,
|
|
1716
1859
|
header: {
|
|
1717
|
-
examples: (
|
|
1860
|
+
examples: (_44 = (_43 = (_42 = resp.data) === null || _42 === void 0 ? void 0 : _42.details) === null || _43 === void 0 ? void 0 : _43.template) === null || _44 === void 0 ? void 0 : _44.header,
|
|
1718
1861
|
},
|
|
1719
1862
|
body: {
|
|
1720
|
-
examples: (
|
|
1863
|
+
examples: (_47 = (_46 = (_45 = resp.data) === null || _45 === void 0 ? void 0 : _45.details) === null || _46 === void 0 ? void 0 : _46.template) === null || _47 === void 0 ? void 0 : _47.data,
|
|
1721
1864
|
},
|
|
1722
|
-
buttons: (
|
|
1723
|
-
ClientId: (
|
|
1724
|
-
ClientName: (
|
|
1865
|
+
buttons: (_50 = (_49 = (_48 = resp.data) === null || _48 === void 0 ? void 0 : _48.details) === null || _49 === void 0 ? void 0 : _49.template) === null || _50 === void 0 ? void 0 : _50.button,
|
|
1866
|
+
ClientId: (_51 = resp.data) === null || _51 === void 0 ? void 0 : _51.clientId,
|
|
1867
|
+
ClientName: (_52 = resp.data) === null || _52 === void 0 ? void 0 : _52.clientName,
|
|
1725
1868
|
},
|
|
1726
|
-
isUpload: ((
|
|
1727
|
-
fileId: (
|
|
1869
|
+
isUpload: ((_53 = resp.data) === null || _53 === void 0 ? void 0 : _53.fileId) !== '',
|
|
1870
|
+
fileId: (_54 = resp.data) === null || _54 === void 0 ? void 0 : _54.fileId,
|
|
1728
1871
|
};
|
|
1729
1872
|
localStorage.setItem('telin.campaign', JSON.stringify(__assign(__assign({}, _this.getCampaignStorage), {
|
|
1730
1873
|
generalInformation: {
|
|
1731
|
-
id: (
|
|
1874
|
+
id: (_55 = resp.data) === null || _55 === void 0 ? void 0 : _55.id,
|
|
1732
1875
|
form: generalInformation,
|
|
1733
1876
|
},
|
|
1734
|
-
failover: (
|
|
1735
|
-
targetAudience: (
|
|
1877
|
+
failover: (_56 = resp.data) === null || _56 === void 0 ? void 0 : _56.failover,
|
|
1878
|
+
targetAudience: (_57 = resp.data) === null || _57 === void 0 ? void 0 : _57.targets,
|
|
1736
1879
|
targetAudienceFile: {
|
|
1737
|
-
name: (
|
|
1738
|
-
targetURL: (
|
|
1880
|
+
name: (_58 = resp.data) === null || _58 === void 0 ? void 0 : _58.fileName,
|
|
1881
|
+
targetURL: (_59 = resp.data) === null || _59 === void 0 ? void 0 : _59.targetURL,
|
|
1739
1882
|
},
|
|
1740
1883
|
scheduler: {
|
|
1741
|
-
schedulerType: ((
|
|
1884
|
+
schedulerType: ((_60 = resp.data) === null || _60 === void 0 ? void 0 : _60.scheduleType) === 'MULTI'
|
|
1742
1885
|
? 'ONE_TIME'
|
|
1743
|
-
: (
|
|
1744
|
-
startDate: (
|
|
1745
|
-
startTime: (
|
|
1746
|
-
isRepeat: ((
|
|
1747
|
-
delivery: (
|
|
1886
|
+
: (_61 = resp.data) === null || _61 === void 0 ? void 0 : _61.scheduleType,
|
|
1887
|
+
startDate: (_63 = (_62 = resp.data) === null || _62 === void 0 ? void 0 : _62.startTime) === null || _63 === void 0 ? void 0 : _63.split(' ')[0],
|
|
1888
|
+
startTime: (_65 = (_64 = resp.data) === null || _64 === void 0 ? void 0 : _64.startTime) === null || _65 === void 0 ? void 0 : _65.split(' ')[1],
|
|
1889
|
+
isRepeat: ((_66 = resp.data) === null || _66 === void 0 ? void 0 : _66.scheduleType) === 'MULTI',
|
|
1890
|
+
delivery: (_67 = resp.data) === null || _67 === void 0 ? void 0 : _67.repeat,
|
|
1748
1891
|
},
|
|
1749
1892
|
})));
|
|
1750
1893
|
_this.isLoading = false;
|
|
@@ -2357,7 +2500,7 @@ var GeneralInformationWAReqModel = /** @class */ (function () {
|
|
|
2357
2500
|
function GeneralInformationWAReqModel() {
|
|
2358
2501
|
}
|
|
2359
2502
|
GeneralInformationWAReqModel.prototype.clone = function (source) {
|
|
2360
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2503
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
2361
2504
|
/* Source Mapping */
|
|
2362
2505
|
if (((_a = source) === null || _a === void 0 ? void 0 : _a.media) === 'IMAGE' ||
|
|
2363
2506
|
((_b = source) === null || _b === void 0 ? void 0 : _b.media) === 'VIDEO' ||
|
|
@@ -2421,6 +2564,16 @@ var GeneralInformationWAReqModel = /** @class */ (function () {
|
|
|
2421
2564
|
if (source.template.ID)
|
|
2422
2565
|
this.template.id = source.template.ID;
|
|
2423
2566
|
}
|
|
2567
|
+
if (this.type === 'utility') {
|
|
2568
|
+
this.type = 'template';
|
|
2569
|
+
this.category = 'utility';
|
|
2570
|
+
this.template = ((_l = source) === null || _l === void 0 ? void 0 : _l.isUseExistingTemplate) ? (_m = source) === null || _m === void 0 ? void 0 : _m.template : { name: '', lang: 'id', header: null, button: null, data: [] };
|
|
2571
|
+
this.isNeedSave = source.isNeedSave;
|
|
2572
|
+
this.ttlSeconds = source.ttl;
|
|
2573
|
+
if ((_o = source) === null || _o === void 0 ? void 0 : _o.isUseExistingTemplate) {
|
|
2574
|
+
this.text = (_r = (_q = (_p = source) === null || _p === void 0 ? void 0 : _p.template) === null || _q === void 0 ? void 0 : _q.body) === null || _r === void 0 ? void 0 : _r.text;
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2424
2577
|
return this;
|
|
2425
2578
|
};
|
|
2426
2579
|
GeneralInformationWAReqModel.prototype.convert = function () {
|
|
@@ -2546,7 +2699,7 @@ var NewCampaignComponent = /** @class */ (function () {
|
|
|
2546
2699
|
var subs = this.apiAdapterService
|
|
2547
2700
|
.executeApiRequest([], "/campaign/" + this.campaignID, 'GET')
|
|
2548
2701
|
.subscribe(function (resp) {
|
|
2549
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61;
|
|
2702
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68;
|
|
2550
2703
|
if (!resp)
|
|
2551
2704
|
return;
|
|
2552
2705
|
var generalInformation = {
|
|
@@ -2554,64 +2707,68 @@ var NewCampaignComponent = /** @class */ (function () {
|
|
|
2554
2707
|
medium: (_b = resp.data) === null || _b === void 0 ? void 0 : _b.platform,
|
|
2555
2708
|
channel: ['image', 'video', 'document'].includes((_c = resp.data) === null || _c === void 0 ? void 0 : _c.type)
|
|
2556
2709
|
? 'MEDIA'
|
|
2557
|
-
: (
|
|
2558
|
-
|
|
2710
|
+
: ((_d = resp.data) === null || _d === void 0 ? void 0 : _d.isDirectSend) ? 'utility'
|
|
2711
|
+
: (_f = (_e = resp.data) === null || _e === void 0 ? void 0 : _e.type) === null || _f === void 0 ? void 0 : _f.toUpperCase(),
|
|
2712
|
+
media: (_h = (_g = resp.data) === null || _g === void 0 ? void 0 : _g.type) === null || _h === void 0 ? void 0 : _h.toUpperCase(),
|
|
2713
|
+
isPrevTemplate: (_k = (_j = resp) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k.isPrevTemplate,
|
|
2714
|
+
templateName: (_m = (_l = resp) === null || _l === void 0 ? void 0 : _l.data) === null || _m === void 0 ? void 0 : _m.templateName,
|
|
2715
|
+
ttl: (_p = (_o = resp) === null || _o === void 0 ? void 0 : _o.data) === null || _p === void 0 ? void 0 : _p.ttlSeconds,
|
|
2559
2716
|
from: {
|
|
2560
|
-
id: (
|
|
2561
|
-
name: (
|
|
2562
|
-
platform: (
|
|
2563
|
-
clientId: (
|
|
2564
|
-
clientName: (
|
|
2565
|
-
accountNo: (
|
|
2566
|
-
wabaId: (
|
|
2717
|
+
id: (_q = resp.data) === null || _q === void 0 ? void 0 : _q.accountId,
|
|
2718
|
+
name: (_r = resp.data) === null || _r === void 0 ? void 0 : _r.accountName,
|
|
2719
|
+
platform: (_s = resp.data) === null || _s === void 0 ? void 0 : _s.platform,
|
|
2720
|
+
clientId: (_t = resp.data) === null || _t === void 0 ? void 0 : _t.clientId,
|
|
2721
|
+
clientName: (_u = resp.data) === null || _u === void 0 ? void 0 : _u.clientName,
|
|
2722
|
+
accountNo: (_v = resp.data) === null || _v === void 0 ? void 0 : _v.accountNo,
|
|
2723
|
+
wabaId: (_x = (_w = resp.data) === null || _w === void 0 ? void 0 : _w.wabaId, (_x !== null && _x !== void 0 ? _x : '')),
|
|
2567
2724
|
},
|
|
2568
|
-
text: (
|
|
2569
|
-
targetURL: (
|
|
2570
|
-
paramHeader: (
|
|
2571
|
-
paramBody: (
|
|
2572
|
-
paramButton: (
|
|
2573
|
-
otpValue: (
|
|
2725
|
+
text: (_z = (_y = resp.data) === null || _y === void 0 ? void 0 : _y.details) === null || _z === void 0 ? void 0 : _z.text,
|
|
2726
|
+
targetURL: (_11 = (_7 = (_3 = (_2 = (_1 = (_0 = resp.data) === null || _0 === void 0 ? void 0 : _0.details) === null || _1 === void 0 ? void 0 : _1.image) === null || _2 === void 0 ? void 0 : _2.url, (_3 !== null && _3 !== void 0 ? _3 : (_6 = (_5 = (_4 = resp.data) === null || _4 === void 0 ? void 0 : _4.details) === null || _5 === void 0 ? void 0 : _5.document) === null || _6 === void 0 ? void 0 : _6.url)), (_7 !== null && _7 !== void 0 ? _7 : (_10 = (_9 = (_8 = resp.data) === null || _8 === void 0 ? void 0 : _8.details) === null || _9 === void 0 ? void 0 : _9.video) === null || _10 === void 0 ? void 0 : _10.url)), (_11 !== null && _11 !== void 0 ? _11 : (_14 = (_13 = (_12 = resp.data) === null || _12 === void 0 ? void 0 : _12.details) === null || _13 === void 0 ? void 0 : _13.template) === null || _14 === void 0 ? void 0 : _14.headerURL)),
|
|
2727
|
+
paramHeader: (_17 = (_16 = (_15 = resp.data) === null || _15 === void 0 ? void 0 : _15.details) === null || _16 === void 0 ? void 0 : _16.template) === null || _17 === void 0 ? void 0 : _17.header,
|
|
2728
|
+
paramBody: (_20 = (_19 = (_18 = resp.data) === null || _18 === void 0 ? void 0 : _18.details) === null || _19 === void 0 ? void 0 : _19.template) === null || _20 === void 0 ? void 0 : _20.data,
|
|
2729
|
+
paramButton: (_23 = (_22 = (_21 = resp.data) === null || _21 === void 0 ? void 0 : _21.details) === null || _22 === void 0 ? void 0 : _22.template) === null || _23 === void 0 ? void 0 : _23.button,
|
|
2730
|
+
otpValue: (_28 = __spread((_27 = (_26 = (_25 = (_24 = resp.data) === null || _24 === void 0 ? void 0 : _24.details) === null || _25 === void 0 ? void 0 : _25.template) === null || _26 === void 0 ? void 0 : _26.data, (_27 !== null && _27 !== void 0 ? _27 : [])))) === null || _28 === void 0 ? void 0 : _28.pop(),
|
|
2574
2731
|
template: {
|
|
2575
|
-
ID: (
|
|
2576
|
-
name: (
|
|
2577
|
-
lang: (
|
|
2578
|
-
platform: (
|
|
2579
|
-
headerURL: (
|
|
2732
|
+
ID: (_31 = (_30 = (_29 = resp.data) === null || _29 === void 0 ? void 0 : _29.details) === null || _30 === void 0 ? void 0 : _30.template) === null || _31 === void 0 ? void 0 : _31.id,
|
|
2733
|
+
name: (_34 = (_33 = (_32 = resp.data) === null || _32 === void 0 ? void 0 : _32.details) === null || _33 === void 0 ? void 0 : _33.template) === null || _34 === void 0 ? void 0 : _34.name,
|
|
2734
|
+
lang: (_37 = (_36 = (_35 = resp.data) === null || _35 === void 0 ? void 0 : _35.details) === null || _36 === void 0 ? void 0 : _36.template) === null || _37 === void 0 ? void 0 : _37.lang,
|
|
2735
|
+
platform: (_38 = resp.data) === null || _38 === void 0 ? void 0 : _38.platform,
|
|
2736
|
+
headerURL: (_41 = (_40 = (_39 = resp.data) === null || _39 === void 0 ? void 0 : _39.details) === null || _40 === void 0 ? void 0 : _40.template) === null || _41 === void 0 ? void 0 : _41.headerURL,
|
|
2580
2737
|
header: {
|
|
2581
|
-
examples: (
|
|
2738
|
+
examples: (_44 = (_43 = (_42 = resp.data) === null || _42 === void 0 ? void 0 : _42.details) === null || _43 === void 0 ? void 0 : _43.template) === null || _44 === void 0 ? void 0 : _44.header,
|
|
2582
2739
|
},
|
|
2583
2740
|
body: {
|
|
2584
|
-
examples: (
|
|
2741
|
+
examples: (_47 = (_46 = (_45 = resp.data) === null || _45 === void 0 ? void 0 : _45.details) === null || _46 === void 0 ? void 0 : _46.template) === null || _47 === void 0 ? void 0 : _47.data,
|
|
2585
2742
|
},
|
|
2586
|
-
buttons: (
|
|
2587
|
-
ClientId: (
|
|
2588
|
-
ClientName: (
|
|
2743
|
+
buttons: (_50 = (_49 = (_48 = resp.data) === null || _48 === void 0 ? void 0 : _48.details) === null || _49 === void 0 ? void 0 : _49.template) === null || _50 === void 0 ? void 0 : _50.button,
|
|
2744
|
+
ClientId: (_51 = resp.data) === null || _51 === void 0 ? void 0 : _51.clientId,
|
|
2745
|
+
ClientName: (_52 = resp.data) === null || _52 === void 0 ? void 0 : _52.clientName,
|
|
2589
2746
|
},
|
|
2590
|
-
isUpload: ((
|
|
2591
|
-
fileId: (
|
|
2747
|
+
isUpload: ((_53 = resp.data) === null || _53 === void 0 ? void 0 : _53.fileId) !== '',
|
|
2748
|
+
fileId: (_54 = resp.data) === null || _54 === void 0 ? void 0 : _54.fileId,
|
|
2592
2749
|
};
|
|
2593
2750
|
localStorage.setItem('telin.campaign', JSON.stringify(__assign(__assign({}, _this.getCampaignStorage), {
|
|
2594
2751
|
generalInformation: {
|
|
2595
|
-
id: (
|
|
2752
|
+
id: (_55 = resp.data) === null || _55 === void 0 ? void 0 : _55.id,
|
|
2596
2753
|
form: generalInformation,
|
|
2597
2754
|
},
|
|
2598
|
-
failover: (
|
|
2599
|
-
targetAudience: (
|
|
2755
|
+
failover: (_56 = resp.data) === null || _56 === void 0 ? void 0 : _56.failover,
|
|
2756
|
+
targetAudience: (_57 = resp.data) === null || _57 === void 0 ? void 0 : _57.targets,
|
|
2600
2757
|
targetAudienceFile: {
|
|
2601
|
-
name: (
|
|
2602
|
-
targetURL: (
|
|
2758
|
+
name: (_58 = resp.data) === null || _58 === void 0 ? void 0 : _58.fileName,
|
|
2759
|
+
targetURL: (_59 = resp.data) === null || _59 === void 0 ? void 0 : _59.targetURL,
|
|
2603
2760
|
},
|
|
2604
2761
|
scheduler: {
|
|
2605
|
-
schedulerType: ((
|
|
2762
|
+
schedulerType: ((_60 = resp.data) === null || _60 === void 0 ? void 0 : _60.scheduleType) === 'MULTI'
|
|
2606
2763
|
? 'ONE_TIME'
|
|
2607
|
-
: (
|
|
2608
|
-
startDate: (
|
|
2609
|
-
startTime: (
|
|
2610
|
-
isRepeat: ((
|
|
2611
|
-
delivery: (
|
|
2764
|
+
: (_61 = resp.data) === null || _61 === void 0 ? void 0 : _61.scheduleType,
|
|
2765
|
+
startDate: (_63 = (_62 = resp.data) === null || _62 === void 0 ? void 0 : _62.startTime) === null || _63 === void 0 ? void 0 : _63.split(' ')[0],
|
|
2766
|
+
startTime: (_65 = (_64 = resp.data) === null || _64 === void 0 ? void 0 : _64.startTime) === null || _65 === void 0 ? void 0 : _65.split(' ')[1],
|
|
2767
|
+
isRepeat: ((_66 = resp.data) === null || _66 === void 0 ? void 0 : _66.scheduleType) === 'MULTI',
|
|
2768
|
+
delivery: (_67 = resp.data) === null || _67 === void 0 ? void 0 : _67.repeat,
|
|
2612
2769
|
},
|
|
2613
2770
|
})));
|
|
2614
|
-
_this.isLine = ((
|
|
2771
|
+
_this.isLine = ((_68 = resp.data) === null || _68 === void 0 ? void 0 : _68.platform) === 'LINE';
|
|
2615
2772
|
_this.isLoading = false;
|
|
2616
2773
|
_this.initWizard();
|
|
2617
2774
|
}, function () {
|
|
@@ -2958,11 +3115,11 @@ var GeneralInformationEmailComponent = /** @class */ (function () {
|
|
|
2958
3115
|
GeneralInformationEmailComponent.prototype.initForm = function () {
|
|
2959
3116
|
var _this = this;
|
|
2960
3117
|
this.form = new FormGroup({
|
|
2961
|
-
channel: new FormControl(null, Validators.required),
|
|
2962
|
-
from: new FormControl(null, Validators.required),
|
|
2963
|
-
text: new FormControl(null, Validators.required),
|
|
2964
|
-
template: new FormControl(null, Validators.required),
|
|
2965
|
-
paramBody: new FormArray([], Validators.required),
|
|
3118
|
+
channel: new FormControl(null, Validators$1.required),
|
|
3119
|
+
from: new FormControl(null, Validators$1.required),
|
|
3120
|
+
text: new FormControl(null, Validators$1.required),
|
|
3121
|
+
template: new FormControl(null, Validators$1.required),
|
|
3122
|
+
paramBody: new FormArray([], Validators$1.required),
|
|
2966
3123
|
isUpload: new FormControl(false),
|
|
2967
3124
|
fileId: new FormControl(''),
|
|
2968
3125
|
});
|
|
@@ -3019,16 +3176,16 @@ var GeneralInformationEmailComponent = /** @class */ (function () {
|
|
|
3019
3176
|
this.form.controls[key].clearValidators();
|
|
3020
3177
|
this.form.controls[key].updateValueAndValidity();
|
|
3021
3178
|
}
|
|
3022
|
-
this.form.get('channel').setValidators(Validators.required);
|
|
3023
|
-
this.form.get('from').setValidators(Validators.required);
|
|
3179
|
+
this.form.get('channel').setValidators(Validators$1.required);
|
|
3180
|
+
this.form.get('from').setValidators(Validators$1.required);
|
|
3024
3181
|
if (this.getIsTemplate) {
|
|
3025
|
-
this.form.get('template').setValidators(Validators.required);
|
|
3182
|
+
this.form.get('template').setValidators(Validators$1.required);
|
|
3026
3183
|
this.form.get('template').updateValueAndValidity();
|
|
3027
|
-
this.form.get('paramBody').setValidators(Validators.required);
|
|
3184
|
+
this.form.get('paramBody').setValidators(Validators$1.required);
|
|
3028
3185
|
this.form.get('paramBody').updateValueAndValidity();
|
|
3029
3186
|
}
|
|
3030
3187
|
else {
|
|
3031
|
-
this.form.get('text').setValidators(Validators.required);
|
|
3188
|
+
this.form.get('text').setValidators(Validators$1.required);
|
|
3032
3189
|
this.form.get('text').updateValueAndValidity();
|
|
3033
3190
|
}
|
|
3034
3191
|
};
|
|
@@ -3114,7 +3271,7 @@ var GeneralInformationEmailComponent = /** @class */ (function () {
|
|
|
3114
3271
|
value: value,
|
|
3115
3272
|
disabled: this.isReadOnlyMode ||
|
|
3116
3273
|
['UnsubscribeAccount'].includes(value),
|
|
3117
|
-
}, Validators.required),
|
|
3274
|
+
}, Validators$1.required),
|
|
3118
3275
|
});
|
|
3119
3276
|
return form;
|
|
3120
3277
|
};
|
|
@@ -3160,7 +3317,7 @@ var GeneralInformationEmailComponent = /** @class */ (function () {
|
|
|
3160
3317
|
return;
|
|
3161
3318
|
this.isHaveTemplateParam = ((_a = template.body.examples) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
3162
3319
|
((_b = template.body.examples) === null || _b === void 0 ? void 0 : _b.length) > 0
|
|
3163
|
-
? this.form.get('paramBody').setValidators(Validators.required)
|
|
3320
|
+
? this.form.get('paramBody').setValidators(Validators$1.required)
|
|
3164
3321
|
: this.form.get('paramBody').clearValidators();
|
|
3165
3322
|
this.form.get('paramBody').controls = [];
|
|
3166
3323
|
this.form.get('paramBody').reset();
|
|
@@ -3269,12 +3426,12 @@ var GeneralInformationLineComponent = /** @class */ (function () {
|
|
|
3269
3426
|
GeneralInformationLineComponent.prototype.initForm = function () {
|
|
3270
3427
|
var _this = this;
|
|
3271
3428
|
this.form = new FormGroup({
|
|
3272
|
-
channel: new FormControl(null, Validators.required),
|
|
3273
|
-
from: new FormControl(null, Validators.required),
|
|
3429
|
+
channel: new FormControl(null, Validators$1.required),
|
|
3430
|
+
from: new FormControl(null, Validators$1.required),
|
|
3274
3431
|
text: new FormControl(null),
|
|
3275
3432
|
template: new FormControl(null),
|
|
3276
3433
|
isJSON: new FormControl(false),
|
|
3277
|
-
paramBody: new FormArray([], Validators.required),
|
|
3434
|
+
paramBody: new FormArray([], Validators$1.required),
|
|
3278
3435
|
});
|
|
3279
3436
|
this.form.valueChanges.subscribe(function () {
|
|
3280
3437
|
setTimeout(function () {
|
|
@@ -3312,16 +3469,16 @@ var GeneralInformationLineComponent = /** @class */ (function () {
|
|
|
3312
3469
|
this.form.controls[key].clearValidators();
|
|
3313
3470
|
this.form.controls[key].updateValueAndValidity();
|
|
3314
3471
|
}
|
|
3315
|
-
this.form.get('channel').setValidators(Validators.required);
|
|
3316
|
-
this.form.get('from').setValidators(Validators.required);
|
|
3472
|
+
this.form.get('channel').setValidators(Validators$1.required);
|
|
3473
|
+
this.form.get('from').setValidators(Validators$1.required);
|
|
3317
3474
|
if (this.isText) {
|
|
3318
|
-
this.form.get('text').setValidators(Validators.required);
|
|
3475
|
+
this.form.get('text').setValidators(Validators$1.required);
|
|
3319
3476
|
this.form.get('text').updateValueAndValidity();
|
|
3320
3477
|
return;
|
|
3321
3478
|
}
|
|
3322
|
-
this.form.get('template').setValidators(Validators.required);
|
|
3479
|
+
this.form.get('template').setValidators(Validators$1.required);
|
|
3323
3480
|
this.form.get('template').updateValueAndValidity();
|
|
3324
|
-
this.form.get('paramBody').setValidators(Validators.required);
|
|
3481
|
+
this.form.get('paramBody').setValidators(Validators$1.required);
|
|
3325
3482
|
this.form.get('paramBody').updateValueAndValidity();
|
|
3326
3483
|
};
|
|
3327
3484
|
GeneralInformationLineComponent.prototype.formReset = function () {
|
|
@@ -3398,7 +3555,7 @@ var GeneralInformationLineComponent = /** @class */ (function () {
|
|
|
3398
3555
|
GeneralInformationLineComponent.prototype.initParameter = function (value) {
|
|
3399
3556
|
if (value === void 0) { value = ''; }
|
|
3400
3557
|
var form = new FormGroup({
|
|
3401
|
-
name: new FormControl({ value: value, disabled: this.isReadOnlyMode }, Validators.required),
|
|
3558
|
+
name: new FormControl({ value: value, disabled: this.isReadOnlyMode }, Validators$1.required),
|
|
3402
3559
|
});
|
|
3403
3560
|
return form;
|
|
3404
3561
|
};
|
|
@@ -3470,7 +3627,7 @@ var GeneralInformationLineComponent = /** @class */ (function () {
|
|
|
3470
3627
|
var findBrackets = (_a = bodyText) === null || _a === void 0 ? void 0 : _a.match(/{{/g);
|
|
3471
3628
|
var formStorage = (_c = (_b = this.getCampaignStorage) === null || _b === void 0 ? void 0 : _b.generalInformation) === null || _c === void 0 ? void 0 : _c.form;
|
|
3472
3629
|
((_d = findBrackets) === null || _d === void 0 ? void 0 : _d.length) > 0
|
|
3473
|
-
? this.form.get('paramBody').setValidators(Validators.required)
|
|
3630
|
+
? this.form.get('paramBody').setValidators(Validators$1.required)
|
|
3474
3631
|
: this.form.get('paramBody').clearValidators();
|
|
3475
3632
|
(_e = findBrackets) === null || _e === void 0 ? void 0 : _e.forEach(function (_, index) {
|
|
3476
3633
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -3572,11 +3729,11 @@ var GeneralInformationSMSComponent = /** @class */ (function () {
|
|
|
3572
3729
|
GeneralInformationSMSComponent.prototype.initForm = function () {
|
|
3573
3730
|
var _this = this;
|
|
3574
3731
|
this.form = new FormGroup({
|
|
3575
|
-
channel: new FormControl(null, Validators.required),
|
|
3576
|
-
from: new FormControl(null, Validators.required),
|
|
3577
|
-
text: new FormControl(null, Validators.required),
|
|
3578
|
-
template: new FormControl(null, Validators.required),
|
|
3579
|
-
paramBody: new FormArray([], Validators.required),
|
|
3732
|
+
channel: new FormControl(null, Validators$1.required),
|
|
3733
|
+
from: new FormControl(null, Validators$1.required),
|
|
3734
|
+
text: new FormControl(null, Validators$1.required),
|
|
3735
|
+
template: new FormControl(null, Validators$1.required),
|
|
3736
|
+
paramBody: new FormArray([], Validators$1.required),
|
|
3580
3737
|
isUpload: new FormControl(false),
|
|
3581
3738
|
fileId: new FormControl(''),
|
|
3582
3739
|
});
|
|
@@ -3632,16 +3789,16 @@ var GeneralInformationSMSComponent = /** @class */ (function () {
|
|
|
3632
3789
|
this.form.controls[key].clearValidators();
|
|
3633
3790
|
this.form.controls[key].updateValueAndValidity();
|
|
3634
3791
|
}
|
|
3635
|
-
this.form.get('channel').setValidators(Validators.required);
|
|
3636
|
-
this.form.get('from').setValidators(Validators.required);
|
|
3792
|
+
this.form.get('channel').setValidators(Validators$1.required);
|
|
3793
|
+
this.form.get('from').setValidators(Validators$1.required);
|
|
3637
3794
|
if (this.getIsTemplate) {
|
|
3638
|
-
this.form.get('template').setValidators(Validators.required);
|
|
3639
|
-
this.form.get('paramBody').setValidators(Validators.required);
|
|
3795
|
+
this.form.get('template').setValidators(Validators$1.required);
|
|
3796
|
+
this.form.get('paramBody').setValidators(Validators$1.required);
|
|
3640
3797
|
this.form.get('template').updateValueAndValidity();
|
|
3641
3798
|
this.form.get('paramBody').updateValueAndValidity();
|
|
3642
3799
|
}
|
|
3643
3800
|
else {
|
|
3644
|
-
this.form.get('text').setValidators(Validators.required);
|
|
3801
|
+
this.form.get('text').setValidators(Validators$1.required);
|
|
3645
3802
|
this.form.get('text').updateValueAndValidity();
|
|
3646
3803
|
}
|
|
3647
3804
|
};
|
|
@@ -3727,7 +3884,7 @@ var GeneralInformationSMSComponent = /** @class */ (function () {
|
|
|
3727
3884
|
value: value,
|
|
3728
3885
|
disabled: this.isReadOnlyMode ||
|
|
3729
3886
|
['UnsubscribeAccount'].includes(value),
|
|
3730
|
-
}, Validators.required),
|
|
3887
|
+
}, Validators$1.required),
|
|
3731
3888
|
});
|
|
3732
3889
|
return form;
|
|
3733
3890
|
};
|
|
@@ -3773,7 +3930,7 @@ var GeneralInformationSMSComponent = /** @class */ (function () {
|
|
|
3773
3930
|
return;
|
|
3774
3931
|
this.isHaveTemplateParam = ((_a = template.body.examples) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
3775
3932
|
((_b = template.body.examples) === null || _b === void 0 ? void 0 : _b.length) > 0
|
|
3776
|
-
? this.form.get('paramBody').setValidators(Validators.required)
|
|
3933
|
+
? this.form.get('paramBody').setValidators(Validators$1.required)
|
|
3777
3934
|
: this.form.get('paramBody').clearValidators();
|
|
3778
3935
|
this.form.get('paramBody').controls = [];
|
|
3779
3936
|
this.form.get('paramBody').reset();
|
|
@@ -3847,6 +4004,49 @@ var EnumData;
|
|
|
3847
4004
|
EnumData["SCHEDULER_TYPE_MULTIPLE"] = "MULTIPLE";
|
|
3848
4005
|
})(EnumData || (EnumData = {}));
|
|
3849
4006
|
|
|
4007
|
+
var maxValidator = function (max, message) {
|
|
4008
|
+
return function (AC) {
|
|
4009
|
+
var isError = Validators$1.max(max)(AC);
|
|
4010
|
+
if (isError)
|
|
4011
|
+
return {
|
|
4012
|
+
max: max,
|
|
4013
|
+
actual: AC.value,
|
|
4014
|
+
message: message || "Max Value equals to " + max,
|
|
4015
|
+
};
|
|
4016
|
+
return null;
|
|
4017
|
+
};
|
|
4018
|
+
};
|
|
4019
|
+
|
|
4020
|
+
var minValidator = function (min, message) {
|
|
4021
|
+
return function (AC) {
|
|
4022
|
+
var isError = Validators$1.min(min)(AC);
|
|
4023
|
+
if (isError)
|
|
4024
|
+
return {
|
|
4025
|
+
min: min,
|
|
4026
|
+
actual: AC.value,
|
|
4027
|
+
message: message || "Min Value equals to " + min,
|
|
4028
|
+
};
|
|
4029
|
+
return null;
|
|
4030
|
+
};
|
|
4031
|
+
};
|
|
4032
|
+
|
|
4033
|
+
var requiredValidator = function (message) {
|
|
4034
|
+
return function (ac) {
|
|
4035
|
+
var isError = Validators$1.required(ac);
|
|
4036
|
+
if (isError)
|
|
4037
|
+
return { message: message };
|
|
4038
|
+
return null;
|
|
4039
|
+
};
|
|
4040
|
+
};
|
|
4041
|
+
|
|
4042
|
+
var Validators = {
|
|
4043
|
+
compose: Validators$1.compose,
|
|
4044
|
+
composeAync: Validators$1.composeAsync,
|
|
4045
|
+
max: maxValidator,
|
|
4046
|
+
min: minValidator,
|
|
4047
|
+
required: requiredValidator,
|
|
4048
|
+
};
|
|
4049
|
+
|
|
3850
4050
|
var GeneralInformationWAComponent = /** @class */ (function () {
|
|
3851
4051
|
function GeneralInformationWAComponent(ngZone, mapsAPILoader, apiAdapterService, toastr) {
|
|
3852
4052
|
this.ngZone = ngZone;
|
|
@@ -3867,6 +4067,10 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
3867
4067
|
this.pageNoAccountOption = 1;
|
|
3868
4068
|
this.pageNoTemplateOption = 1;
|
|
3869
4069
|
this.subscribers = [];
|
|
4070
|
+
this.templates = [
|
|
4071
|
+
{ label: 'Create New', value: false },
|
|
4072
|
+
{ label: 'Use existing template', value: true },
|
|
4073
|
+
];
|
|
3870
4074
|
this.updateGeneralInformationForm = new EventEmitter();
|
|
3871
4075
|
}
|
|
3872
4076
|
Object.defineProperty(GeneralInformationWAComponent.prototype, "isTouchedForm", {
|
|
@@ -3915,7 +4119,7 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
3915
4119
|
GeneralInformationWAComponent.prototype.initForm = function () {
|
|
3916
4120
|
var _this = this;
|
|
3917
4121
|
this.form = new FormGroup({
|
|
3918
|
-
channel: new FormControl(null, Validators.required),
|
|
4122
|
+
channel: new FormControl(null, Validators$1.required),
|
|
3919
4123
|
media: new FormControl(null),
|
|
3920
4124
|
from: new FormControl(null),
|
|
3921
4125
|
text: new FormControl(null),
|
|
@@ -3926,9 +4130,9 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
3926
4130
|
latitude: new FormControl(null),
|
|
3927
4131
|
longitude: new FormControl(null),
|
|
3928
4132
|
template: new FormControl(null),
|
|
3929
|
-
paramHeader: new FormArray([], Validators.required),
|
|
3930
|
-
paramBody: new FormArray([], Validators.required),
|
|
3931
|
-
paramButton: new FormArray([], Validators.required),
|
|
4133
|
+
paramHeader: new FormArray([], Validators$1.required),
|
|
4134
|
+
paramBody: new FormArray([], Validators$1.required),
|
|
4135
|
+
paramButton: new FormArray([], Validators$1.required),
|
|
3932
4136
|
otpValue: new FormControl(''),
|
|
3933
4137
|
isUpload: new FormControl(false),
|
|
3934
4138
|
fileId: new FormControl(''),
|
|
@@ -3936,6 +4140,9 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
3936
4140
|
product: new FormControl(null),
|
|
3937
4141
|
catalogue: new FormControl(null),
|
|
3938
4142
|
body: new FormControl(null),
|
|
4143
|
+
isUseExistingTemplate: new FormControl(false),
|
|
4144
|
+
isNeedSave: new FormControl(false),
|
|
4145
|
+
ttl: new FormControl(null),
|
|
3939
4146
|
});
|
|
3940
4147
|
this.form.valueChanges.subscribe(function () {
|
|
3941
4148
|
setTimeout(function () {
|
|
@@ -3950,7 +4157,7 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
3950
4157
|
this.form.disable();
|
|
3951
4158
|
};
|
|
3952
4159
|
GeneralInformationWAComponent.prototype.initEdit = function () {
|
|
3953
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
4160
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
|
3954
4161
|
if (Object.entries(this.getCampaignStorage).length === 0 ||
|
|
3955
4162
|
((_c = (_b = (_a = this.getCampaignStorage) === null || _a === void 0 ? void 0 : _a.generalInformation) === null || _b === void 0 ? void 0 : _b.form) === null || _c === void 0 ? void 0 : _c.medium) !== 'WA')
|
|
3956
4163
|
return;
|
|
@@ -3976,35 +4183,42 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
3976
4183
|
this.form
|
|
3977
4184
|
.get('otpValue')
|
|
3978
4185
|
.setValue((_z = (_y = this.getCampaignStorage) === null || _y === void 0 ? void 0 : _y.generalInformation) === null || _z === void 0 ? void 0 : _z.form.otpValue);
|
|
4186
|
+
this.form
|
|
4187
|
+
.get('isUseExistingTemplate')
|
|
4188
|
+
.setValue(!!((_2 = (_1 = (_0 = this.getCampaignStorage) === null || _0 === void 0 ? void 0 : _0.generalInformation) === null || _1 === void 0 ? void 0 : _1.form) === null || _2 === void 0 ? void 0 : _2.templateName));
|
|
4189
|
+
this.form
|
|
4190
|
+
.get('isNeedSave')
|
|
4191
|
+
.setValue(!!((_5 = (_4 = (_3 = this.getCampaignStorage) === null || _3 === void 0 ? void 0 : _3.generalInformation) === null || _4 === void 0 ? void 0 : _4.form) === null || _5 === void 0 ? void 0 : _5.isNeedSave));
|
|
4192
|
+
this.form.get('ttl').setValue((_8 = (_7 = (_6 = this.getCampaignStorage) === null || _6 === void 0 ? void 0 : _6.generalInformation) === null || _7 === void 0 ? void 0 : _7.form) === null || _8 === void 0 ? void 0 : _8.ttl);
|
|
3979
4193
|
this.isHaveTemplateParam = this.form.get('isUpload').value;
|
|
3980
|
-
this.getTemplateOptionService(null, (
|
|
4194
|
+
this.getTemplateOptionService(null, (_9 = this.form.get('template').value) === null || _9 === void 0 ? void 0 : _9.name);
|
|
3981
4195
|
};
|
|
3982
4196
|
GeneralInformationWAComponent.prototype.initValidation = function () {
|
|
3983
4197
|
for (var key in this.form.controls) {
|
|
3984
4198
|
this.form.controls[key].clearValidators();
|
|
3985
4199
|
this.form.controls[key].updateValueAndValidity();
|
|
3986
4200
|
}
|
|
3987
|
-
this.form.get('channel').setValidators(Validators.required);
|
|
4201
|
+
this.form.get('channel').setValidators(Validators$1.required);
|
|
3988
4202
|
if (this.getIsText) {
|
|
3989
|
-
this.form.get('from').setValidators(Validators.required);
|
|
3990
|
-
this.form.get('text').setValidators(Validators.required);
|
|
4203
|
+
this.form.get('from').setValidators(Validators$1.required);
|
|
4204
|
+
this.form.get('text').setValidators(Validators$1.required);
|
|
3991
4205
|
this.form.get('from').updateValueAndValidity();
|
|
3992
4206
|
this.form.get('text').updateValueAndValidity();
|
|
3993
4207
|
}
|
|
3994
4208
|
else if (this.getIsMedia) {
|
|
3995
|
-
this.form.get('media').setValidators(Validators.required);
|
|
3996
|
-
this.form.get('from').setValidators(Validators.required);
|
|
3997
|
-
this.form.get('fileName').setValidators(Validators.required);
|
|
4209
|
+
this.form.get('media').setValidators(Validators$1.required);
|
|
4210
|
+
this.form.get('from').setValidators(Validators$1.required);
|
|
4211
|
+
this.form.get('fileName').setValidators(Validators$1.required);
|
|
3998
4212
|
this.form.get('media').updateValueAndValidity();
|
|
3999
4213
|
this.form.get('from').updateValueAndValidity();
|
|
4000
4214
|
this.form.get('fileName').updateValueAndValidity();
|
|
4001
4215
|
}
|
|
4002
4216
|
else if (this.getIsTemplate) {
|
|
4003
|
-
this.form.get('from').setValidators(Validators.required);
|
|
4004
|
-
this.form.get('template').setValidators(Validators.required);
|
|
4005
|
-
this.form.get('paramHeader').setValidators(Validators.required);
|
|
4006
|
-
this.form.get('paramBody').setValidators(Validators.required);
|
|
4007
|
-
this.form.get('paramButton').setValidators(Validators.required);
|
|
4217
|
+
this.form.get('from').setValidators(Validators$1.required);
|
|
4218
|
+
this.form.get('template').setValidators(Validators$1.required);
|
|
4219
|
+
this.form.get('paramHeader').setValidators(Validators$1.required);
|
|
4220
|
+
this.form.get('paramBody').setValidators(Validators$1.required);
|
|
4221
|
+
this.form.get('paramButton').setValidators(Validators$1.required);
|
|
4008
4222
|
this.form.get('from').updateValueAndValidity();
|
|
4009
4223
|
this.form.get('template').updateValueAndValidity();
|
|
4010
4224
|
this.form.get('paramHeader').updateValueAndValidity();
|
|
@@ -4012,20 +4226,33 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4012
4226
|
this.form.get('paramButton').updateValueAndValidity();
|
|
4013
4227
|
}
|
|
4014
4228
|
else if (this.getIsCatalogue) {
|
|
4015
|
-
this.form.get('from').setValidators(Validators.required);
|
|
4016
|
-
this.form.get('category').setValidators(Validators.required);
|
|
4017
|
-
this.form.get('catalogue').setValidators(Validators.required);
|
|
4018
|
-
this.form.get('product').setValidators(Validators.required);
|
|
4019
|
-
this.form.get('body').setValidators(Validators.maxLength(100));
|
|
4229
|
+
this.form.get('from').setValidators(Validators$1.required);
|
|
4230
|
+
this.form.get('category').setValidators(Validators$1.required);
|
|
4231
|
+
this.form.get('catalogue').setValidators(Validators$1.required);
|
|
4232
|
+
this.form.get('product').setValidators(Validators$1.required);
|
|
4233
|
+
this.form.get('body').setValidators(Validators$1.maxLength(100));
|
|
4020
4234
|
this.form.get('from').updateValueAndValidity();
|
|
4021
4235
|
this.form.get('category').updateValueAndValidity();
|
|
4022
4236
|
this.form.get('catalogue').updateValueAndValidity();
|
|
4023
4237
|
this.form.get('product').updateValueAndValidity();
|
|
4024
4238
|
this.form.get('body').updateValueAndValidity();
|
|
4025
4239
|
}
|
|
4240
|
+
else if (this.getIsUtility) {
|
|
4241
|
+
this.form.get('from').setValidators(Validators$1.required);
|
|
4242
|
+
this.form.get('text').setValidators([Validators$1.required, Validators$1.maxLength(1024)]);
|
|
4243
|
+
this.form
|
|
4244
|
+
.get('ttl')
|
|
4245
|
+
.setValidators([
|
|
4246
|
+
Validators.min(30, 'Minimum TTL 30'),
|
|
4247
|
+
Validators.max(43200, 'Maximum TTL 43200'),
|
|
4248
|
+
]);
|
|
4249
|
+
this.form.get('from').updateValueAndValidity();
|
|
4250
|
+
this.form.get('text').updateValueAndValidity();
|
|
4251
|
+
this.form.get('ttl').updateValueAndValidity();
|
|
4252
|
+
}
|
|
4026
4253
|
else {
|
|
4027
|
-
this.form.get('from').setValidators(Validators.required);
|
|
4028
|
-
this.form.get('text').setValidators(Validators.required);
|
|
4254
|
+
this.form.get('from').setValidators(Validators$1.required);
|
|
4255
|
+
this.form.get('text').setValidators(Validators$1.required);
|
|
4029
4256
|
this.form.get('from').updateValueAndValidity();
|
|
4030
4257
|
this.form.get('text').updateValueAndValidity();
|
|
4031
4258
|
}
|
|
@@ -4093,7 +4320,7 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4093
4320
|
if (event === void 0) { event = null; }
|
|
4094
4321
|
if (filter === void 0) { filter = ''; }
|
|
4095
4322
|
if (isInfinite === void 0) { isInfinite = false; }
|
|
4096
|
-
var _a, _b, _c;
|
|
4323
|
+
var _a, _b, _c, _d;
|
|
4097
4324
|
this.isLoadingTemplateOption = true;
|
|
4098
4325
|
var parameterList = [
|
|
4099
4326
|
this.initParam('pageNo', this.pageNoTemplateOption, 'number'),
|
|
@@ -4106,6 +4333,10 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4106
4333
|
];
|
|
4107
4334
|
if (this.isReadOnlyMode)
|
|
4108
4335
|
parameterList.push(this.initParam('summary', true, 'string'));
|
|
4336
|
+
var messageType = (_d = this.form.value) === null || _d === void 0 ? void 0 : _d.channel;
|
|
4337
|
+
if (messageType === 'utility') {
|
|
4338
|
+
parameterList.push(this.initParam('isDirectSend', true, 'string'));
|
|
4339
|
+
}
|
|
4109
4340
|
var subs = this.apiAdapterService
|
|
4110
4341
|
.executeApiRequest(parameterList, '/message/template', 'GET')
|
|
4111
4342
|
.subscribe(function (resp) {
|
|
@@ -4129,13 +4360,13 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4129
4360
|
if (value === void 0) { value = ''; }
|
|
4130
4361
|
var form = isButton
|
|
4131
4362
|
? new FormGroup({
|
|
4132
|
-
name: new FormArray([], Validators.required),
|
|
4363
|
+
name: new FormArray([], Validators$1.required),
|
|
4133
4364
|
})
|
|
4134
4365
|
: new FormGroup({
|
|
4135
4366
|
name: new FormControl({
|
|
4136
4367
|
value: value,
|
|
4137
4368
|
disabled: this.isReadOnlyMode || ['$UnsubscribeAccount'].includes(value),
|
|
4138
|
-
}, Validators.required),
|
|
4369
|
+
}, Validators$1.required),
|
|
4139
4370
|
});
|
|
4140
4371
|
return form;
|
|
4141
4372
|
};
|
|
@@ -4214,6 +4445,15 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4214
4445
|
enumerable: true,
|
|
4215
4446
|
configurable: true
|
|
4216
4447
|
});
|
|
4448
|
+
Object.defineProperty(GeneralInformationWAComponent.prototype, "getIsUtility", {
|
|
4449
|
+
get: function () {
|
|
4450
|
+
var _a;
|
|
4451
|
+
return (this.form.get('channel').value &&
|
|
4452
|
+
((_a = this.form.get('channel').value) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'utility');
|
|
4453
|
+
},
|
|
4454
|
+
enumerable: true,
|
|
4455
|
+
configurable: true
|
|
4456
|
+
});
|
|
4217
4457
|
GeneralInformationWAComponent.prototype.getNextAccountBatch = function () {
|
|
4218
4458
|
if (!this.isHaveNextAccountOption)
|
|
4219
4459
|
return;
|
|
@@ -4255,7 +4495,7 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4255
4495
|
this.form.get('file').setValue(file[0]);
|
|
4256
4496
|
this.form.get('fileType').setValue('image');
|
|
4257
4497
|
this.form.get('fileName').setValue(file[0].name);
|
|
4258
|
-
this.form.get('targetURL').setValidators(Validators.required);
|
|
4498
|
+
this.form.get('targetURL').setValidators(Validators$1.required);
|
|
4259
4499
|
this.form.get('targetURL').updateValueAndValidity();
|
|
4260
4500
|
if (file[0].type.indexOf('video') > -1)
|
|
4261
4501
|
this.form.get('fileType').setValue('video');
|
|
@@ -4302,13 +4542,13 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4302
4542
|
this.fileTypeChange((_t = (_s = (_r = template) === null || _r === void 0 ? void 0 : _r.header) === null || _s === void 0 ? void 0 : _s.type) === null || _t === void 0 ? void 0 : _t.toLowerCase());
|
|
4303
4543
|
}
|
|
4304
4544
|
((_u = template.header.examples) === null || _u === void 0 ? void 0 : _u.length) > 0
|
|
4305
|
-
? this.form.get('paramHeader').setValidators(Validators.required)
|
|
4545
|
+
? this.form.get('paramHeader').setValidators(Validators$1.required)
|
|
4306
4546
|
: this.form.get('paramHeader').clearValidators();
|
|
4307
4547
|
((_v = template.body.examples) === null || _v === void 0 ? void 0 : _v.length) > 0
|
|
4308
|
-
? this.form.get('paramBody').setValidators(Validators.required)
|
|
4548
|
+
? this.form.get('paramBody').setValidators(Validators$1.required)
|
|
4309
4549
|
: this.form.get('paramBody').clearValidators();
|
|
4310
4550
|
((_w = template.buttons) === null || _w === void 0 ? void 0 : _w.length) > 0
|
|
4311
|
-
? this.form.get('paramButton').setValidators(Validators.required)
|
|
4551
|
+
? this.form.get('paramButton').setValidators(Validators$1.required)
|
|
4312
4552
|
: this.form.get('paramButton').clearValidators();
|
|
4313
4553
|
this.form.get('paramHeader').controls = [];
|
|
4314
4554
|
this.form.get('paramHeader').reset();
|
|
@@ -4327,7 +4567,7 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4327
4567
|
this.form
|
|
4328
4568
|
.get('otpValue')
|
|
4329
4569
|
.setValue((_6 = (_0 = (_z = formStorage) === null || _z === void 0 ? void 0 : _z.otpValue, (_0 !== null && _0 !== void 0 ? _0 : (_5 = __spread((_4 = (_3 = (_2 = (_1 = formStorage) === null || _1 === void 0 ? void 0 : _1.template) === null || _2 === void 0 ? void 0 : _2.body) === null || _3 === void 0 ? void 0 : _3.examples, (_4 !== null && _4 !== void 0 ? _4 : [])))) === null || _5 === void 0 ? void 0 : _5.pop())), (_6 !== null && _6 !== void 0 ? _6 : '')));
|
|
4330
|
-
this.form.get('otpValue').setValidators(Validators.required);
|
|
4570
|
+
this.form.get('otpValue').setValidators(Validators$1.required);
|
|
4331
4571
|
this.form.get('otpValue').updateValueAndValidity();
|
|
4332
4572
|
}
|
|
4333
4573
|
(_7 = template.header.examples) === null || _7 === void 0 ? void 0 : _7.forEach(function (each, index) {
|
|
@@ -4450,6 +4690,28 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4450
4690
|
}
|
|
4451
4691
|
this.updateTemplate(this.form.get('template').value);
|
|
4452
4692
|
};
|
|
4693
|
+
GeneralInformationWAComponent.prototype.handleChangeTemplate = function (useExisting) {
|
|
4694
|
+
if (useExisting) {
|
|
4695
|
+
this.form.get('template').setValidators(Validators$1.required);
|
|
4696
|
+
this.form.get('text').reset();
|
|
4697
|
+
this.form.get('text').clearValidators();
|
|
4698
|
+
this.form.get('text').updateValueAndValidity();
|
|
4699
|
+
this.form.get('template').updateValueAndValidity();
|
|
4700
|
+
}
|
|
4701
|
+
else {
|
|
4702
|
+
this.form.get('template').reset();
|
|
4703
|
+
this.form.get('template').clearValidators();
|
|
4704
|
+
this.form.get('text').setValidators([Validators$1.required, Validators$1.max(1024)]);
|
|
4705
|
+
this.form.get('text').updateValueAndValidity();
|
|
4706
|
+
this.form.get('template').updateValueAndValidity();
|
|
4707
|
+
}
|
|
4708
|
+
};
|
|
4709
|
+
GeneralInformationWAComponent.prototype.handleChangeFrom = function (value) {
|
|
4710
|
+
var isUseExistingTemplate = this.form.value.isUseExistingTemplate;
|
|
4711
|
+
if (!isUseExistingTemplate)
|
|
4712
|
+
return;
|
|
4713
|
+
this.getTemplateOptionService(value);
|
|
4714
|
+
};
|
|
4453
4715
|
GeneralInformationWAComponent.prototype.ngOnDestroy = function () {
|
|
4454
4716
|
this.subscribers.forEach(function (each) { return each.unsubscribe(); });
|
|
4455
4717
|
};
|
|
@@ -4474,7 +4736,7 @@ var GeneralInformationWAComponent = /** @class */ (function () {
|
|
|
4474
4736
|
GeneralInformationWAComponent = __decorate([
|
|
4475
4737
|
Component({
|
|
4476
4738
|
selector: 'lib-general-information-wa',
|
|
4477
|
-
template: "<form autocomplete=\"off\"\r\n\t[formGroup]=\"form\">\r\n\t<div class=\"form-group\">\r\n\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\tfloatLabel=\"always\"\r\n\t\t\tclass=\"w-100\">\r\n\t\t\t<mat-label class=\"asterix--after\">Message Type</mat-label>\r\n\r\n\t\t\t<mat-select placeholder=\"Select message type\"\r\n\t\t\t\tformControlName=\"channel\">\r\n\t\t\t\t<mat-option *ngFor=\"let option of msgTypeWAOption\"\r\n\t\t\t\t\t[value]=\"option.code\"\r\n\t\t\t\t\t(click)=\"formReset()\">\r\n\t\t\t\t\t{{ option.name }}\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t</mat-form-field>\r\n\r\n\t\t<mat-error align=\"end\"\r\n\t\t\t*ngFor=\"let validation of validationMessages.channel\">\r\n\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t*ngIf=\"form.get('channel').touched \r\n\t\t\t\t\t&& form.get('channel').hasError(validation.type)\">\r\n\t\t\t\t{{ validation.message }}\r\n\t\t\t</p>\r\n\t\t</mat-error>\r\n\r\n\t\t<div *ngIf=\"!getIsTemplate\"\r\n\t\t\trole=\"alert\"\r\n\t\t\tclass=\"alert alert-warning d-flex align-items-center\"\r\n\t\t\tstyle=\"margin-top: 16px;border:1px solid rgb(243, 124, 44)\">\r\n\t\t\t<mat-icon style=\"margin-right: 10px !important;\">error_outline</mat-icon>\r\n\t\t\t<div>\r\n\t\t\t\tIf you select this channel, keep in mind that the message might not be delivered to\r\n\t\t\t\tall selected customers. This is because the customer must have had a conversation\r\n\t\t\t\tpreviously with BSP.\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<ng-container *ngIf=\"getIsText\">\r\n\t\t<div class=\"form-group\">\r\n\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\tclass=\"w-100\"\r\n\t\t\t\tstyle=\"margin-bottom: 20;\">\r\n\t\t\t\t<mat-label class=\"asterix--after\">From</mat-label>\r\n\r\n\t\t\t\t<mat-select matSelectInfiniteScroll\r\n\t\t\t\t\tformControlName=\"from\"\r\n\t\t\t\t\tplaceholder=\"Select from\"\r\n\t\t\t\t\t[complete]=\"isHaveNextAccountOption === false\"\r\n\t\t\t\t\t[compareWith]=\"accountSelectedDisplay\"\r\n\t\t\t\t\t(infiniteScroll)=\"getNextAccountBatch()\">\r\n\t\t\t\t\t<div style=\"margin: 20px\">\r\n\t\t\t\t\t\t<lib-search [placeholder]=\"'Search'\"\r\n\t\t\t\t\t\t\t[currentValue]=\"form?.get('from').value?.name\"\r\n\t\t\t\t\t\t\t(searchRes)=\"updateSearchAccount($event)\"></lib-search>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<mat-option *ngFor=\"let option of accountOption\"\r\n\t\t\t\t\t\t[value]=\"option\">\r\n\t\t\t\t\t\t{{ option.name + ' (' + option.accountNo + ')' }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t<mat-option *ngIf=\"isLoadingAccountOption\">Loading...</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\r\n\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t*ngFor=\"let validation of validationMessages.from\">\r\n\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t*ngIf=\"form.get('from').touched \r\n\t\t\t\t\t\t&& form.get('from').hasError(validation.type)\">\r\n\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t</p>\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"form-group\">\r\n\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\tfloatLabel=\"always\">\r\n\t\t\t\t<mat-label class=\"asterix--after\">Text</mat-label>\r\n\r\n\t\t\t\t<textarea matInput\r\n\t\t\t\t\trows=\"6\"\r\n\t\t\t\t\tcols=\"50\"\r\n\t\t\t\t\tcdkTextareaAutosize\r\n\t\t\t\t\tcdkAutosizeMinRows=\"2\"\r\n\t\t\t\t\tcdkAutosizeMaxRows=\"15\"\r\n\t\t\t\t\tformControlName=\"text\"\r\n\t\t\t\t\tplaceholder=\"Enter text\"\r\n\t\t\t\t\t#autosize=\"cdkTextareaAutosize\"></textarea>\r\n\t\t\t</mat-form-field>\r\n\r\n\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t*ngFor=\"let validation of validationMessages.text\">\r\n\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t*ngIf=\"form.get('text').touched \r\n\t\t\t\t\t\t&& form.get('text').hasError(validation.type)\">\r\n\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t</p>\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\t</ng-container>\r\n\r\n\t<ng-container *ngIf=\"getIsMedia\">\r\n\t\t<div class=\"form-group\">\r\n\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t<mat-label class=\"asterix--after\">Media Type</mat-label>\r\n\r\n\t\t\t\t<mat-select placeholder=\"Select media type\"\r\n\t\t\t\t\tformControlName=\"media\"\r\n\t\t\t\t\t(selectionChange)=\"updateMediaType($event.value)\">\r\n\t\t\t\t\t<mat-option *ngFor=\"let option of mediaTypeOption\"\r\n\t\t\t\t\t\t[value]=\"option.code\">\r\n\t\t\t\t\t\t{{ option.name }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\r\n\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t*ngFor=\"let validation of validationMessages.media\">\r\n\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t*ngIf=\"form.get('media').touched \r\n\t\t\t\t\t\t&& form.get('media').hasError(validation.type)\">\r\n\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t</p>\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"form-group\">\r\n\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\tclass=\"w-100\"\r\n\t\t\t\tstyle=\"margin-bottom: 20;\">\r\n\t\t\t\t<mat-label class=\"asterix--after\">From</mat-label>\r\n\r\n\t\t\t\t<mat-select matSelectInfiniteScroll\r\n\t\t\t\t\tformControlName=\"from\"\r\n\t\t\t\t\tplaceholder=\"Select from\"\r\n\t\t\t\t\t[complete]=\"isHaveNextAccountOption === false\"\r\n\t\t\t\t\t[compareWith]=\"accountSelectedDisplay\"\r\n\t\t\t\t\t(infiniteScroll)=\"getNextAccountBatch()\">\r\n\t\t\t\t\t<div style=\"margin: 20px\">\r\n\t\t\t\t\t\t<lib-search [placeholder]=\"'Search'\"\r\n\t\t\t\t\t\t\t[currentValue]=\"form?.get('from').value?.name\"\r\n\t\t\t\t\t\t\t(searchRes)=\"updateSearchAccount($event)\"></lib-search>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<mat-option *ngFor=\"let option of accountOption\"\r\n\t\t\t\t\t\t[value]=\"option\">\r\n\t\t\t\t\t\t{{ option.name + ' (' + option.accountNo + ')' }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t<mat-option *ngIf=\"isLoadingAccountOption\">Loading...</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\r\n\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t*ngFor=\"let validation of validationMessages.from\">\r\n\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t*ngIf=\"form.get('from').touched \r\n\t\t\t\t\t\t&& form.get('from').hasError(validation.type)\">\r\n\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t</p>\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\r\n\t\t<ng-container *ngIf=\"form.get('media').value?.toLowerCase() !== 'location'\">\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t<mat-label class=\"asterix--after\">File</mat-label>\r\n\r\n\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tautocomplete=\"off\"\r\n\t\t\t\t\t\t(click)=\"filePicker.click()\"\r\n\t\t\t\t\t\tformControlName=\"fileName\">\r\n\r\n\t\t\t\t\t<button mat-button\r\n\t\t\t\t\t\tmatSuffix\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\taria-label=\"Choose File\"\r\n\t\t\t\t\t\t(click)=\"filePicker.click()\">\r\n\t\t\t\t\t\t<mat-icon>attach_file</mat-icon>\r\n\t\t\t\t\t</button>\r\n\r\n\t\t\t\t\t<input #filePicker\r\n\t\t\t\t\t\thidden\r\n\t\t\t\t\t\ttype=\"file\"\r\n\t\t\t\t\t\t[accept]=\"extFileAccepted\"\r\n\t\t\t\t\t\t(change)=\"onFileSelected($event)\" />\r\n\t\t\t\t</mat-form-field>\r\n\r\n\t\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t\t*ngFor=\"let validation of validationMessages.fileName\">\r\n\t\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t\t*ngIf=\"form.get('fileName').touched \r\n\t\t\t\t\t\t\t&& form.get('fileName').hasError(validation.type)\">\r\n\t\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</mat-error>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\r\n\t\t<ng-container *ngIf=\"form.get('media').value?.toLowerCase() === 'location'\">\r\n\t\t\t<div class=\"w-100\">\r\n\t\t\t\t<h4 class=\"asterix--after\">Location</h4>\r\n\r\n\t\t\t\t<div class=\"w-100\">\r\n\t\t\t\t\t<agm-map style=\"width:100%; height:400px;\"\r\n\t\t\t\t\t\t[latitude]=\"maps.latitude\"\r\n\t\t\t\t\t\t[longitude]=\"maps.longitude\"\r\n\t\t\t\t\t\t[disableDoubleClickZoom]=\"maps.isDoubleClickZoom\"\r\n\t\t\t\t\t\t[zoom]=\"maps.zoom\">\r\n\t\t\t\t\t\t<agm-marker [latitude]=\"maps.latitude\"\r\n\t\t\t\t\t\t\t[longitude]=\"maps.longitude\"\r\n\t\t\t\t\t\t\t[markerDraggable]=\"maps.isDraggable\"\r\n\t\t\t\t\t\t\t(dragEnd)=\"markerDragEnd($event)\"></agm-marker>\r\n\t\t\t\t\t</agm-map>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t\t<mat-label>Location</mat-label>\r\n\r\n\t\t\t\t\t\t<input #mapSearch\r\n\t\t\t\t\t\t\tmatInput\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tmaxlength=\"100\"\r\n\t\t\t\t\t\t\tplaceholder=\"Enter location here\">\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</ng-container>\r\n\r\n\t<ng-container *ngIf=\"getIsTemplate\">\r\n\t\t<div class=\"form-group\">\r\n\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\tclass=\"w-100\"\r\n\t\t\t\tstyle=\"margin-bottom: 20;\">\r\n\t\t\t\t<mat-label class=\"asterix--after\">From</mat-label>\r\n\r\n\t\t\t\t<mat-select matSelectInfiniteScroll\r\n\t\t\t\t\tformControlName=\"from\"\r\n\t\t\t\t\tplaceholder=\"Select from\"\r\n\t\t\t\t\t[complete]=\"isHaveNextAccountOption === false\"\r\n\t\t\t\t\t[compareWith]=\"accountSelectedDisplay\"\r\n\t\t\t\t\t(infiniteScroll)=\"getNextAccountBatch()\"\r\n\t\t\t\t\t(selectionChange)=\"getTemplateOptionService($event.value)\">\r\n\t\t\t\t\t<div style=\"margin: 20px\">\r\n\t\t\t\t\t\t<lib-search [placeholder]=\"'Search'\"\r\n\t\t\t\t\t\t\t[currentValue]=\"form?.get('from').value?.name\"\r\n\t\t\t\t\t\t\t(searchRes)=\"updateSearchAccount($event)\"></lib-search>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<mat-option *ngFor=\"let option of accountOption\"\r\n\t\t\t\t\t\t[value]=\"option\">\r\n\t\t\t\t\t\t{{ option.name + ' (' + option.accountNo + ')' }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t<mat-option *ngIf=\"isLoadingAccountOption\">Loading...</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\r\n\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t*ngFor=\"let validation of validationMessages.from\">\r\n\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t*ngIf=\"form.get('from').touched \r\n\t\t\t\t\t\t&& form.get('from').hasError(validation.type)\">\r\n\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t</p>\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"form-group\">\r\n\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t<mat-label class=\"asterix--after\">Template</mat-label>\r\n\r\n\t\t\t\t<mat-select matSelectInfiniteScroll\r\n\t\t\t\t\tformControlName=\"template\"\r\n\t\t\t\t\tplaceholder=\"Select template\"\r\n\t\t\t\t\t[complete]=\"isHaveNextTemplateOption === false\"\r\n\t\t\t\t\t[compareWith]=\"templateSelectedDisplay\"\r\n\t\t\t\t\t(infiniteScroll)=\"getNextTemplateBatch()\"\r\n\t\t\t\t\t(selectionChange)=\"updateTemplate($event.value)\">\r\n\t\t\t\t\t<div style=\"margin: 20px\">\r\n\t\t\t\t\t\t<lib-search [placeholder]=\"'Search'\"\r\n\t\t\t\t\t\t\t[currentValue]=\"form?.get('template').value?.name\"\r\n\t\t\t\t\t\t\t(searchRes)=\"updateSearch($event)\"></lib-search>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<mat-option *ngFor=\"let option of templateOption\"\r\n\t\t\t\t\t\t[value]=\"option\">\r\n\t\t\t\t\t\t{{ option.name }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t<mat-option *ngIf=\"isLoadingTemplateOption\">Loading...</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\r\n\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t*ngFor=\"let validation of validationMessages.template\">\r\n\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t*ngIf=\"form.get('template').touched \r\n\t\t\t\t\t\t&& form.get('template').hasError(validation.type)\">\r\n\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t</p>\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\r\n\t\t<div *ngIf=\"isHaveTemplateParam\"\r\n\t\t\tclass=\"d-flex justify-content-end\">\r\n\t\t\t<mat-checkbox labelPosition=\"before\"\r\n\t\t\t\tformControlName=\"isUpload\"\r\n\t\t\t\t(change)=\"updateDownloadCSV($event.checked)\">\r\n\t\t\t\tUsing Download XLSX\r\n\t\t\t</mat-checkbox>\r\n\t\t</div>\r\n\r\n\t\t<ng-container *ngIf=\"!form.get('isUpload').value\">\r\n\t\t\t<div *ngIf=\"form.get('template').value?.category === 'AUTHENTICATION'\"\r\n\t\t\t\tclass=\"form-group\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t<mat-label> OTP Value </mat-label>\r\n\r\n\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tformControlName=\"otpValue\">\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\r\n\t\t\t<ng-container *ngIf=\"getParamHeader?.length > 0\">\r\n\t\t\t\t<p class=\"font-16px font-PoppinsBold\">Header Parameter</p>\r\n\r\n\t\t\t\t<div *ngFor=\"\r\n\t\t\t\t\tlet param of getParamHeader;\r\n\t\t\t\t\tlet paramHeaderIndex = index\r\n\t\t\t\t\"\r\n\t\t\t\t\tclass=\"form-group\">\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t\t<mat-label>Parameter {{ paramHeaderIndex + 1 }}</mat-label>\r\n\r\n\t\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t[placeholder]=\"'Parameter ' + (paramHeaderIndex + 1)\"\r\n\t\t\t\t\t\t\t[formControl]=\"param.get('name')\" />\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t</ng-container>\r\n\r\n\t\t\t<ng-container *ngIf=\"getParamBody?.length > 0\">\r\n\t\t\t\t<p class=\"font-16px font-PoppinsBold mt-3\">Body Parameter</p>\r\n\r\n\t\t\t\t<div *ngFor=\"\r\n\t\t\t\t\t\tlet param of getParamBody;\r\n\t\t\t\t\t\tlet paramBodyIndex = index\r\n\t\t\t\t\t\"\r\n\t\t\t\t\tclass=\"form-group\">\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t\t<mat-label>Parameter {{ paramBodyIndex + 1 }}</mat-label>\r\n\r\n\t\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t[placeholder]=\"'Parameter ' + (paramBodyIndex + 1)\"\r\n\t\t\t\t\t\t\t[formControl]=\"param.get('name')\" />\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t</ng-container>\r\n\r\n\t\t\t<ng-container *ngIf=\"isShowParameter\">\r\n\t\t\t\t<p class=\"font-16px font-PoppinsBold mt-3\">Button Parameter</p>\r\n\r\n\t\t\t\t<ng-container *ngFor=\"let button of getButton; let buttonIndex = index\">\r\n\t\t\t\t\t<ng-container *ngIf=\"getParamButton(buttonIndex)?.length > 0\">\r\n\t\t\t\t\t\t<p class=\"font-14px font-PoppinsBold mt-3\">Button {{ buttonIndex + 1 }}</p>\r\n\r\n\t\t\t\t\t\t<div *ngFor=\"let param of getParamButton(buttonIndex); let paramIndex = index\"\r\n\t\t\t\t\t\t\tclass=\"form-group\">\r\n\t\t\t\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t\t\t\t<mat-label>Parameter {{ paramIndex + 1 }}</mat-label>\r\n\r\n\t\t\t\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\t\t[placeholder]=\"'Parameter ' + (paramIndex + 1)\"\r\n\t\t\t\t\t\t\t\t\t[formControl]=\"param.get('name')\" />\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t</ng-container>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\r\n\t\t<ng-container\r\n\t\t\t*ngIf=\"['image','video','document'].includes(form.get('template').value?.header?.type?.toLowerCase())\">\r\n\t\t\t<p class=\"font-16px font-PoppinsBold mt-3\">File</p>\r\n\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t<mat-label class=\"asterix--after\">File</mat-label>\r\n\r\n\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tautocomplete=\"off\"\r\n\t\t\t\t\t\t(click)=\"filePicker.click()\"\r\n\t\t\t\t\t\tformControlName=\"fileName\">\r\n\r\n\t\t\t\t\t<button mat-button\r\n\t\t\t\t\t\tmatSuffix\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\taria-label=\"Choose File\"\r\n\t\t\t\t\t\t(click)=\"filePicker.click()\">\r\n\t\t\t\t\t\t<mat-icon>attach_file</mat-icon>\r\n\t\t\t\t\t</button>\r\n\r\n\t\t\t\t\t<input #filePicker\r\n\t\t\t\t\t\thidden\r\n\t\t\t\t\t\ttype=\"file\"\r\n\t\t\t\t\t\t[accept]=\"extFileAccepted\"\r\n\t\t\t\t\t\t(change)=\"onFileSelected($event)\" />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</ng-container>\r\n\r\n\t<ng-container *ngIf=\"getIsCatalogue\">\r\n\t\t<div class=\"form-group\">\r\n\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\tclass=\"w-100\"\r\n\t\t\t\tstyle=\"margin-bottom: 20;\">\r\n\t\t\t\t<mat-label class=\"asterix--after\">From</mat-label>\r\n\r\n\t\t\t\t<mat-select matSelectInfiniteScroll\r\n\t\t\t\t\tformControlName=\"from\"\r\n\t\t\t\t\tplaceholder=\"Select from\"\r\n\t\t\t\t\t[complete]=\"isHaveNextAccountOption === false\"\r\n\t\t\t\t\t[compareWith]=\"accountSelectedDisplay\"\r\n\t\t\t\t\t(infiniteScroll)=\"getNextAccountBatch()\">\r\n\t\t\t\t\t<div style=\"margin: 20px\">\r\n\t\t\t\t\t\t<lib-search [placeholder]=\"'Search'\"\r\n\t\t\t\t\t\t\t[currentValue]=\"form?.get('from').value?.name\"\r\n\t\t\t\t\t\t\t(searchRes)=\"updateSearchAccount($event)\"></lib-search>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<mat-option *ngFor=\"let option of accountOption\"\r\n\t\t\t\t\t\t[value]=\"option\">\r\n\t\t\t\t\t\t{{ option.name + ' (' + option.accountNo + ')' }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t<mat-option *ngIf=\"isLoadingAccountOption\">Loading...</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\r\n\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t*ngFor=\"let validation of validationMessages.from\">\r\n\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t*ngIf=\"form.get('from').touched \r\n\t\t\t\t\t\t&& form.get('from').hasError(validation.type)\">\r\n\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t</p>\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"form-group\">\r\n\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\tclass=\"w-100\"\r\n\t\t\t\tstyle=\"margin-bottom: 20;\">\r\n\t\t\t\t<mat-label class=\"asterix--after\">Category</mat-label>\r\n\r\n\t\t\t\t<mat-select formControlName=\"category\"\r\n\t\t\t\t\tplaceholder=\"Select category\">\r\n\t\t\t\t\t<mat-option *ngFor=\"let option of categoryOption\"\r\n\t\t\t\t\t\t[value]=\"option.value\">\r\n\t\t\t\t\t\t{{ option.label }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\r\n\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t*ngFor=\"let validation of validationMessages.category\">\r\n\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t*ngIf=\"form.get('category').touched \r\n\t\t\t\t\t\t&& form.get('category').hasError(validation.type)\">\r\n\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t</p>\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"form-group\">\r\n\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\tclass=\"w-100\"\r\n\t\t\t\tstyle=\"margin-bottom: 20;\">\r\n\t\t\t\t<mat-label class=\"asterix--after\">Catalog</mat-label>\r\n\r\n\t\t\t\t<mat-select formControlName=\"catalogue\"\r\n\t\t\t\t\tplaceholder=\"Select catalog\">\r\n\t\t\t\t\t<mat-option *ngFor=\"let option of accountOption\"\r\n\t\t\t\t\t\t[value]=\"option\">\r\n\t\t\t\t\t\t{{ option.name }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\r\n\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t*ngFor=\"let validation of validationMessages.catalogue\">\r\n\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t*ngIf=\"form.get('catalogue').touched \r\n\t\t\t\t\t\t&& form.get('catalogue').hasError(validation.type)\">\r\n\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t</p>\r\n\t\t\t</mat-error>\r\n\t\t</div>\r\n\r\n\t\t<div *ngIf=\"form.get('category').value === 'product'\"\r\n\t\t\tstyle=\"padding: 8px;border-radius: 8px;border: 1px solid #6177c4;\">\r\n\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t<mat-label class=\"asterix--after\">Product</mat-label>\r\n\r\n\t\t\t\t\t<mat-select formControlName=\"product\"\r\n\t\t\t\t\t\tplaceholder=\"Select product\">\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let option of accountOption\"\r\n\t\t\t\t\t\t\t[value]=\"option\">\r\n\t\t\t\t\t\t\t{{ option.name }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\r\n\t\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t\t*ngFor=\"let validation of validationMessages.product\">\r\n\t\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t\t*ngIf=\"form.get('product').touched \r\n\t\t\t\t\t\t\t&& form.get('product').hasError(validation.type)\">\r\n\t\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</mat-error>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t<mat-label>Body</mat-label>\r\n\r\n\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tmaxlength=\"100\"\r\n\t\t\t\t\t\tformControlName=\"body\"\r\n\t\t\t\t\t\tplaceholder=\"Enter body\">\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-container>\r\n</form>\r\n",
|
|
4739
|
+
template: "<form autocomplete=\"off\" [formGroup]=\"form\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label class=\"asterix--after\">Message Type</mat-label>\r\n\r\n <mat-select placeholder=\"Select message type\" formControlName=\"channel\">\r\n <mat-option\r\n *ngFor=\"let option of msgTypeWAOption\"\r\n [value]=\"option.code\"\r\n (click)=\"formReset()\"\r\n >\r\n {{ option.name }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.channel\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"\r\n form.get('channel')?.touched && form.get('channel')?.hasError(validation.type)\r\n \"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n\r\n <div\r\n *ngIf=\"!getIsTemplate\"\r\n role=\"alert\"\r\n class=\"alert alert-warning d-flex align-items-center\"\r\n style=\"margin-top: 16px; border: 1px solid rgb(243, 124, 44)\"\r\n >\r\n <mat-icon style=\"margin-right: 10px !important\">error_outline</mat-icon>\r\n <div>\r\n If you select this channel, keep in mind that the message might not be delivered to\r\n all selected customers. This is because the customer must have had a conversation\r\n previously with BSP.\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"getIsText\">\r\n <div class=\"form-group\">\r\n <mat-form-field\r\n appearance=\"outline\"\r\n floatLabel=\"always\"\r\n class=\"w-100\"\r\n style=\"margin-bottom: 20\"\r\n >\r\n <mat-label class=\"asterix--after\">From</mat-label>\r\n\r\n <mat-select\r\n matSelectInfiniteScroll\r\n formControlName=\"from\"\r\n placeholder=\"Select from\"\r\n [complete]=\"isHaveNextAccountOption === false\"\r\n [compareWith]=\"accountSelectedDisplay\"\r\n (infiniteScroll)=\"getNextAccountBatch()\"\r\n >\r\n <div style=\"margin: 20px\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n [currentValue]=\"form?.get('from').value?.name\"\r\n (searchRes)=\"updateSearchAccount($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option *ngFor=\"let option of accountOption\" [value]=\"option\">\r\n {{ option.name + ' (' + option.accountNo + ')' }}\r\n </mat-option>\r\n <mat-option *ngIf=\"isLoadingAccountOption\">Loading...</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.from\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"form.get('from').touched && form.get('from').hasError(validation.type)\"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\">\r\n <mat-label class=\"asterix--after\">Text</mat-label>\r\n\r\n <textarea\r\n matInput\r\n rows=\"6\"\r\n cols=\"50\"\r\n cdkTextareaAutosize\r\n cdkAutosizeMinRows=\"2\"\r\n cdkAutosizeMaxRows=\"15\"\r\n formControlName=\"text\"\r\n placeholder=\"Enter text\"\r\n #autosize=\"cdkTextareaAutosize\"\r\n ></textarea>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.text\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"form.get('text')?.touched && form.get('text')?.hasError(validation.type)\"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"getIsMedia\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label class=\"asterix--after\">Media Type</mat-label>\r\n\r\n <mat-select\r\n placeholder=\"Select media type\"\r\n formControlName=\"media\"\r\n (selectionChange)=\"updateMediaType($event.value)\"\r\n >\r\n <mat-option *ngFor=\"let option of mediaTypeOption\" [value]=\"option.code\">\r\n {{ option.name }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.media\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"form.get('media').touched && form.get('media').hasError(validation.type)\"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field\r\n appearance=\"outline\"\r\n floatLabel=\"always\"\r\n class=\"w-100\"\r\n style=\"margin-bottom: 20\"\r\n >\r\n <mat-label class=\"asterix--after\">From</mat-label>\r\n\r\n <mat-select\r\n matSelectInfiniteScroll\r\n formControlName=\"from\"\r\n placeholder=\"Select from\"\r\n [complete]=\"isHaveNextAccountOption === false\"\r\n [compareWith]=\"accountSelectedDisplay\"\r\n (infiniteScroll)=\"getNextAccountBatch()\"\r\n >\r\n <div style=\"margin: 20px\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n [currentValue]=\"form?.get('from').value?.name\"\r\n (searchRes)=\"updateSearchAccount($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option *ngFor=\"let option of accountOption\" [value]=\"option\">\r\n {{ option.name + ' (' + option.accountNo + ')' }}\r\n </mat-option>\r\n <mat-option *ngIf=\"isLoadingAccountOption\">Loading...</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.from\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"form.get('from').touched && form.get('from').hasError(validation.type)\"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <ng-container *ngIf=\"form.get('media').value?.toLowerCase() !== 'location'\">\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" class=\"w-100\">\r\n <mat-label class=\"asterix--after\">File</mat-label>\r\n\r\n <input\r\n matInput\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n (click)=\"filePicker.click()\"\r\n formControlName=\"fileName\"\r\n />\r\n\r\n <button\r\n mat-button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Choose File\"\r\n (click)=\"filePicker.click()\"\r\n >\r\n <mat-icon>attach_file</mat-icon>\r\n </button>\r\n\r\n <input\r\n #filePicker\r\n hidden\r\n type=\"file\"\r\n [accept]=\"extFileAccepted\"\r\n (change)=\"onFileSelected($event)\"\r\n />\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.fileName\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"\r\n form.get('fileName').touched &&\r\n form.get('fileName').hasError(validation.type)\r\n \"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"form.get('media').value?.toLowerCase() === 'location'\">\r\n <div class=\"w-100\">\r\n <h4 class=\"asterix--after\">Location</h4>\r\n\r\n <div class=\"w-100\">\r\n <agm-map\r\n style=\"width: 100%; height: 400px\"\r\n [latitude]=\"maps.latitude\"\r\n [longitude]=\"maps.longitude\"\r\n [disableDoubleClickZoom]=\"maps.isDoubleClickZoom\"\r\n [zoom]=\"maps.zoom\"\r\n >\r\n <agm-marker\r\n [latitude]=\"maps.latitude\"\r\n [longitude]=\"maps.longitude\"\r\n [markerDraggable]=\"maps.isDraggable\"\r\n (dragEnd)=\"markerDragEnd($event)\"\r\n ></agm-marker>\r\n </agm-map>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label>Location</mat-label>\r\n\r\n <input\r\n #mapSearch\r\n matInput\r\n type=\"text\"\r\n maxlength=\"100\"\r\n placeholder=\"Enter location here\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"getIsTemplate\">\r\n <div class=\"form-group\">\r\n <mat-form-field\r\n appearance=\"outline\"\r\n floatLabel=\"always\"\r\n class=\"w-100\"\r\n style=\"margin-bottom: 20\"\r\n >\r\n <mat-label class=\"asterix--after\">From</mat-label>\r\n\r\n <mat-select\r\n matSelectInfiniteScroll\r\n formControlName=\"from\"\r\n placeholder=\"Select from\"\r\n [complete]=\"isHaveNextAccountOption === false\"\r\n [compareWith]=\"accountSelectedDisplay\"\r\n (infiniteScroll)=\"getNextAccountBatch()\"\r\n (selectionChange)=\"getTemplateOptionService($event.value)\"\r\n >\r\n <div style=\"margin: 20px\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n [currentValue]=\"form?.get('from').value?.name\"\r\n (searchRes)=\"updateSearchAccount($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option *ngFor=\"let option of accountOption\" [value]=\"option\">\r\n {{ option.name + ' (' + option.accountNo + ')' }}\r\n </mat-option>\r\n <mat-option *ngIf=\"isLoadingAccountOption\">Loading...</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.from\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"form.get('from')?.touched && form.get('from')?.hasError(validation.type)\"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label class=\"asterix--after\">Template</mat-label>\r\n\r\n <mat-select\r\n matSelectInfiniteScroll\r\n formControlName=\"template\"\r\n placeholder=\"Select template\"\r\n [complete]=\"isHaveNextTemplateOption === false\"\r\n [compareWith]=\"templateSelectedDisplay\"\r\n (infiniteScroll)=\"getNextTemplateBatch()\"\r\n (selectionChange)=\"updateTemplate($event.value)\"\r\n >\r\n <div style=\"margin: 20px\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n [currentValue]=\"form?.get('template').value?.name\"\r\n (searchRes)=\"updateSearch($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option *ngFor=\"let option of templateOption\" [value]=\"option\">\r\n {{ option.name }}\r\n </mat-option>\r\n <mat-option *ngIf=\"isLoadingTemplateOption\">Loading...</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.template\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"\r\n form.get('template')?.touched &&\r\n form.get('template')?.hasError(validation.type)\r\n \"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <div *ngIf=\"isHaveTemplateParam\" class=\"d-flex justify-content-end\">\r\n <mat-checkbox\r\n labelPosition=\"before\"\r\n formControlName=\"isUpload\"\r\n (change)=\"updateDownloadCSV($event.checked)\"\r\n >\r\n Using Download XLSX\r\n </mat-checkbox>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!form.get('isUpload')?.value\">\r\n <div\r\n *ngIf=\"form.get('template')?.value?.category === 'AUTHENTICATION'\"\r\n class=\"form-group\"\r\n >\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label> OTP Value </mat-label>\r\n\r\n <input matInput type=\"text\" formControlName=\"otpValue\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngIf=\"getParamHeader?.length > 0\">\r\n <p class=\"font-16px font-PoppinsBold\">Header Parameter</p>\r\n\r\n <div\r\n *ngFor=\"let param of getParamHeader; let paramHeaderIndex = index\"\r\n class=\"form-group\"\r\n >\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label>Parameter {{ paramHeaderIndex + 1 }}</mat-label>\r\n\r\n <input\r\n matInput\r\n type=\"text\"\r\n [placeholder]=\"'Parameter ' + (paramHeaderIndex + 1)\"\r\n [formControl]=\"param.get('name')\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"getParamBody?.length > 0\">\r\n <p class=\"font-16px font-PoppinsBold mt-3\">Body Parameter</p>\r\n\r\n <div\r\n *ngFor=\"let param of getParamBody; let paramBodyIndex = index\"\r\n class=\"form-group\"\r\n >\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label>Parameter {{ paramBodyIndex + 1 }}</mat-label>\r\n\r\n <input\r\n matInput\r\n type=\"text\"\r\n [placeholder]=\"'Parameter ' + (paramBodyIndex + 1)\"\r\n [formControl]=\"param.get('name')\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"isShowParameter\">\r\n <p class=\"font-16px font-PoppinsBold mt-3\">Button Parameter</p>\r\n\r\n <ng-container *ngFor=\"let button of getButton; let buttonIndex = index\">\r\n <ng-container *ngIf=\"getParamButton(buttonIndex)?.length > 0\">\r\n <p class=\"font-14px font-PoppinsBold mt-3\">Button {{ buttonIndex + 1 }}</p>\r\n\r\n <div\r\n *ngFor=\"\r\n let param of getParamButton(buttonIndex);\r\n let paramIndex = index\r\n \"\r\n class=\"form-group\"\r\n >\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label>Parameter {{ paramIndex + 1 }}</mat-label>\r\n\r\n <input\r\n matInput\r\n type=\"text\"\r\n [placeholder]=\"'Parameter ' + (paramIndex + 1)\"\r\n [formControl]=\"param.get('name')\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container\r\n *ngIf=\"\r\n ['image', 'video', 'document'].includes(\r\n form.get('template')?.value?.header?.type?.toLowerCase()\r\n )\r\n \"\r\n >\r\n <p class=\"font-16px font-PoppinsBold mt-3\">File</p>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" class=\"w-100\">\r\n <mat-label class=\"asterix--after\">File</mat-label>\r\n\r\n <input\r\n matInput\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n (click)=\"filePicker.click()\"\r\n formControlName=\"fileName\"\r\n />\r\n\r\n <button\r\n mat-button\r\n matSuffix\r\n mat-icon-button\r\n aria-label=\"Choose File\"\r\n (click)=\"filePicker.click()\"\r\n >\r\n <mat-icon>attach_file</mat-icon>\r\n </button>\r\n\r\n <input\r\n #filePicker\r\n hidden\r\n type=\"file\"\r\n [accept]=\"extFileAccepted\"\r\n (change)=\"onFileSelected($event)\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"getIsCatalogue\">\r\n <div class=\"form-group\">\r\n <mat-form-field\r\n appearance=\"outline\"\r\n floatLabel=\"always\"\r\n class=\"w-100\"\r\n style=\"margin-bottom: 20\"\r\n >\r\n <mat-label class=\"asterix--after\">From</mat-label>\r\n\r\n <mat-select\r\n matSelectInfiniteScroll\r\n formControlName=\"from\"\r\n placeholder=\"Select from\"\r\n [complete]=\"isHaveNextAccountOption === false\"\r\n [compareWith]=\"accountSelectedDisplay\"\r\n (infiniteScroll)=\"getNextAccountBatch()\"\r\n >\r\n <div style=\"margin: 20px\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n [currentValue]=\"form?.get('from').value?.name\"\r\n (searchRes)=\"updateSearchAccount($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option *ngFor=\"let option of accountOption\" [value]=\"option\">\r\n {{ option.name + ' (' + option.accountNo + ')' }}\r\n </mat-option>\r\n <mat-option *ngIf=\"isLoadingAccountOption\">Loading...</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.from\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"form.get('from')?.touched && form.get('from')?.hasError(validation.type)\"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field\r\n appearance=\"outline\"\r\n floatLabel=\"always\"\r\n class=\"w-100\"\r\n style=\"margin-bottom: 20\"\r\n >\r\n <mat-label class=\"asterix--after\">Category</mat-label>\r\n\r\n <mat-select formControlName=\"category\" placeholder=\"Select category\">\r\n <mat-option *ngFor=\"let option of categoryOption\" [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.category\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"\r\n form.get('category')?.touched &&\r\n form.get('category')?.hasError(validation.type)\r\n \"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field\r\n appearance=\"outline\"\r\n floatLabel=\"always\"\r\n class=\"w-100\"\r\n style=\"margin-bottom: 20\"\r\n >\r\n <mat-label class=\"asterix--after\">Catalog</mat-label>\r\n\r\n <mat-select formControlName=\"catalogue\" placeholder=\"Select catalog\">\r\n <mat-option *ngFor=\"let option of accountOption\" [value]=\"option\">\r\n {{ option.name }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.catalogue\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"\r\n form.get('catalogue')?.touched &&\r\n form.get('catalogue')?.hasError(validation.type)\r\n \"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"form.get('category')?.value === 'product'\"\r\n style=\"padding: 8px; border-radius: 8px; border: 1px solid #6177c4\"\r\n >\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label class=\"asterix--after\">Product</mat-label>\r\n\r\n <mat-select formControlName=\"product\" placeholder=\"Select product\">\r\n <mat-option *ngFor=\"let option of accountOption\" [value]=\"option\">\r\n {{ option.name }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.product\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"\r\n form.get('product')?.touched &&\r\n form.get('product')?.hasError(validation.type)\r\n \"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label>Body</mat-label>\r\n\r\n <input\r\n matInput\r\n type=\"text\"\r\n maxlength=\"100\"\r\n formControlName=\"body\"\r\n placeholder=\"Enter body\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"getIsUtility\">\r\n <div style=\"display: grid; gap: 0.5rem\">\r\n <mat-label class=\"asterix--after\">Template</mat-label>\r\n <mat-radio-group\r\n style=\"display: flex; gap: 0.5rem; flex-wrap: wrap\"\r\n formControlName=\"isUseExistingTemplate\"\r\n (change)=\"handleChangeTemplate($event.value)\"\r\n >\r\n <mat-radio-button\r\n [value]=\"option.value\"\r\n *ngFor=\"let option of templates\"\r\n color=\"primary\"\r\n >\r\n {{ option.label }}\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field\r\n appearance=\"outline\"\r\n floatLabel=\"always\"\r\n class=\"w-100\"\r\n style=\"margin-bottom: 20\"\r\n >\r\n <mat-label class=\"asterix--after\">From</mat-label>\r\n\r\n <mat-select\r\n matSelectInfiniteScroll\r\n formControlName=\"from\"\r\n placeholder=\"Select from\"\r\n [complete]=\"isHaveNextAccountOption === false\"\r\n [compareWith]=\"accountSelectedDisplay\"\r\n (infiniteScroll)=\"getNextAccountBatch()\"\r\n (selectionChange)=\"handleChangeFrom($event.value)\"\r\n >\r\n <div style=\"margin: 20px\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n [currentValue]=\"form?.get('from').value?.name\"\r\n (searchRes)=\"updateSearchAccount($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option *ngFor=\"let option of accountOption\" [value]=\"option\">\r\n {{ option.name + ' (' + option.accountNo + ')' }}\r\n </mat-option>\r\n <mat-option *ngIf=\"isLoadingAccountOption\">Loading...</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.from\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"form.get('from')?.touched && form.get('from')?.hasError(validation.type)\"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <ng-container *ngIf=\"!form.get('isUseExistingTemplate')?.value; else existingTmpl\">\r\n <div\r\n role=\"alert\"\r\n class=\"alert alert-warning d-flex align-items-center\"\r\n style=\"margin-top: 8px; border: 1px solid rgb(243, 124, 44)\"\r\n >\r\n <mat-icon style=\"margin-right: 10px !important\">error_outline</mat-icon>\r\n <div>\r\n Direct Send access restricted for 30 days due to continued misuse. Final warning\r\n before permanent revocation.\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\">\r\n <mat-label class=\"asterix--after\">Body</mat-label>\r\n\r\n <textarea\r\n matInput\r\n rows=\"6\"\r\n cols=\"50\"\r\n cdkTextareaAutosize\r\n cdkAutosizeMinRows=\"2\"\r\n cdkAutosizeMaxRows=\"15\"\r\n formControlName=\"text\"\r\n placeholder=\"Enter text\"\r\n #autosize=\"cdkTextareaAutosize\"\r\n ></textarea>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.text\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"\r\n form.get('text').touched && form.get('text').hasError(validation.type)\r\n \"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <app-input\r\n type=\"numeric\"\r\n formControlName=\"ttl\"\r\n label=\"TTL\"\r\n placeholder=\"Enter ttl\"\r\n [trimLeadingZeros]=\"true\"\r\n ></app-input>\r\n </div>\r\n\r\n <div *ngIf=\"!isReadOnlyMode\">\r\n <mat-checkbox formControlName=\"isNeedSave\">\r\n Save this message as future template\r\n </mat-checkbox>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #existingTmpl>\r\n <div\r\n role=\"alert\"\r\n class=\"alert alert-warning d-flex align-items-center\"\r\n style=\"margin-top: 8px; border: 1px solid rgb(243, 124, 44)\"\r\n >\r\n <mat-icon style=\"margin-right: 10px !important\">error_outline</mat-icon>\r\n <div>\r\n Direct Send access restricted for 30 days due to continued misuse. Final warning\r\n before permanent revocation.\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label class=\"asterix--after\">Template</mat-label>\r\n\r\n <mat-select\r\n matSelectInfiniteScroll\r\n formControlName=\"template\"\r\n placeholder=\"Select template\"\r\n [complete]=\"isHaveNextTemplateOption === false\"\r\n [compareWith]=\"templateSelectedDisplay\"\r\n (infiniteScroll)=\"getNextTemplateBatch()\"\r\n (selectionChange)=\"updateTemplate($event.value)\"\r\n >\r\n <div style=\"margin: 20px\">\r\n <lib-search\r\n [placeholder]=\"'Search'\"\r\n [currentValue]=\"form?.get('template').value?.name\"\r\n (searchRes)=\"updateSearch($event)\"\r\n ></lib-search>\r\n </div>\r\n\r\n <mat-option *ngFor=\"let option of templateOption\" [value]=\"option\">\r\n {{ option.name }}\r\n </mat-option>\r\n <mat-option *ngIf=\"isLoadingTemplateOption\">Loading...</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.template\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"\r\n form.get('template')?.touched &&\r\n form.get('template')?.hasError(validation.type)\r\n \"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <app-input\r\n type=\"numeric\"\r\n formControlName=\"ttl\"\r\n label=\"TTL\"\r\n placeholder=\"Enter ttl\"\r\n [trimLeadingZeros]=\"true\"\r\n ></app-input>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n</form>\r\n",
|
|
4478
4740
|
styles: [".asterix--after:after{content:\"*\";color:red}"]
|
|
4479
4741
|
})
|
|
4480
4742
|
], GeneralInformationWAComponent);
|
|
@@ -4552,7 +4814,7 @@ var FailoverMechanismComponent = /** @class */ (function () {
|
|
|
4552
4814
|
FailoverMechanismComponent.prototype.initForm = function () {
|
|
4553
4815
|
var _this = this;
|
|
4554
4816
|
this.form = new FormGroup({
|
|
4555
|
-
active: new FormControl(false, Validators.required),
|
|
4817
|
+
active: new FormControl(false, Validators$1.required),
|
|
4556
4818
|
type: new FormControl(''),
|
|
4557
4819
|
interval: new FormControl(null),
|
|
4558
4820
|
accounts: new FormArray([]),
|
|
@@ -4602,7 +4864,7 @@ var FailoverMechanismComponent = /** @class */ (function () {
|
|
|
4602
4864
|
}
|
|
4603
4865
|
: (_g = (_f = data) === null || _f === void 0 ? void 0 : _f.accountId, (_g !== null && _g !== void 0 ? _g : '')),
|
|
4604
4866
|
disabled: this.isReadOnlyMode,
|
|
4605
|
-
}, Validators.required),
|
|
4867
|
+
}, Validators$1.required),
|
|
4606
4868
|
accountName: new FormControl((_j = (_h = data) === null || _h === void 0 ? void 0 : _h.accountName, (_j !== null && _j !== void 0 ? _j : ''))),
|
|
4607
4869
|
subject: new FormControl({
|
|
4608
4870
|
value: (_l = (_k = data) === null || _k === void 0 ? void 0 : _k.subject, (_l !== null && _l !== void 0 ? _l : '')),
|
|
@@ -4634,7 +4896,7 @@ var FailoverMechanismComponent = /** @class */ (function () {
|
|
|
4634
4896
|
};
|
|
4635
4897
|
FailoverMechanismComponent.prototype.initParameter = function () {
|
|
4636
4898
|
var form = new FormGroup({
|
|
4637
|
-
name: new FormControl('', Validators.required),
|
|
4899
|
+
name: new FormControl('', Validators$1.required),
|
|
4638
4900
|
});
|
|
4639
4901
|
return form;
|
|
4640
4902
|
};
|
|
@@ -4742,7 +5004,7 @@ var FailoverMechanismComponent = /** @class */ (function () {
|
|
|
4742
5004
|
this.form
|
|
4743
5005
|
.get('type')
|
|
4744
5006
|
.setValue((_c = (_b = (_a = this.getCampaignStorage) === null || _a === void 0 ? void 0 : _a.failover) === null || _b === void 0 ? void 0 : _b.type, (_c !== null && _c !== void 0 ? _c : '')));
|
|
4745
|
-
this.form.get('type').setValidators(Validators.required);
|
|
5007
|
+
this.form.get('type').setValidators(Validators$1.required);
|
|
4746
5008
|
this.form.get('type').updateValueAndValidity();
|
|
4747
5009
|
if (_active) {
|
|
4748
5010
|
var accounts_1 = (_f = (_e = (_d = this.getCampaignStorage) === null || _d === void 0 ? void 0 : _d.failover) === null || _e === void 0 ? void 0 : _e.accounts) === null || _f === void 0 ? void 0 : _f.filter(function (t) {
|
|
@@ -4780,7 +5042,7 @@ var FailoverMechanismComponent = /** @class */ (function () {
|
|
|
4780
5042
|
.setValue((_c = (_b = (_a = this.getCampaignStorage) === null || _a === void 0 ? void 0 : _a.failover) === null || _b === void 0 ? void 0 : _b.interval, (_c !== null && _c !== void 0 ? _c : null)));
|
|
4781
5043
|
this.form
|
|
4782
5044
|
.get('interval')
|
|
4783
|
-
.setValidators([Validators.required, intervalTimeValidator()]);
|
|
5045
|
+
.setValidators([Validators$1.required, intervalTimeValidator()]);
|
|
4784
5046
|
this.form.get('interval').updateValueAndValidity();
|
|
4785
5047
|
return;
|
|
4786
5048
|
}
|
|
@@ -4795,9 +5057,9 @@ var FailoverMechanismComponent = /** @class */ (function () {
|
|
|
4795
5057
|
var isChooseAccount = this.getAccount.filter(function (control) { return control.get('accountId').value; });
|
|
4796
5058
|
this.getAccount.forEach(function (control) {
|
|
4797
5059
|
var _a;
|
|
4798
|
-
control.get('accountId').setValidators(Validators.required);
|
|
4799
|
-
control.get('subject').setValidators(Validators.required);
|
|
4800
|
-
control.get('template').setValidators(Validators.required);
|
|
5060
|
+
control.get('accountId').setValidators(Validators$1.required);
|
|
5061
|
+
control.get('subject').setValidators(Validators$1.required);
|
|
5062
|
+
control.get('template').setValidators(Validators$1.required);
|
|
4801
5063
|
if (!control.get('accountId').value &&
|
|
4802
5064
|
((_a = isChooseAccount) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
4803
5065
|
control.get('accountId').clearValidators();
|
|
@@ -4906,10 +5168,10 @@ var GeneralInformationComponent = /** @class */ (function () {
|
|
|
4906
5168
|
this.form = new FormGroup({
|
|
4907
5169
|
id: new FormControl(null),
|
|
4908
5170
|
campaignName: new FormControl(null, [
|
|
4909
|
-
Validators.required,
|
|
4910
|
-
Validators.maxLength(100),
|
|
5171
|
+
Validators$1.required,
|
|
5172
|
+
Validators$1.maxLength(100),
|
|
4911
5173
|
]),
|
|
4912
|
-
medium: new FormControl(null, [Validators.required]),
|
|
5174
|
+
medium: new FormControl(null, [Validators$1.required]),
|
|
4913
5175
|
});
|
|
4914
5176
|
this.form.valueChanges.subscribe(function () {
|
|
4915
5177
|
_this.isTouchedWAForm = !_this.isTouchedWAForm;
|
|
@@ -5067,8 +5329,8 @@ var GeneralInformationComponent = /** @class */ (function () {
|
|
|
5067
5329
|
GeneralInformationComponent = __decorate([
|
|
5068
5330
|
Component({
|
|
5069
5331
|
selector: 'lib-new-campaign-general-information',
|
|
5070
|
-
template: "<form autocomplete=\"off\"\r\n\t[formGroup]=\"form\">\r\n\t<div class=\"campaign-info\">\r\n\t\t<div class=\"campaign-info-child\">\r\n\t\t\t<mat-card>\r\n\t\t\t\t<mat-card-content>\r\n\t\t\t\t\t<h3 class=\"font-22px font-PoppinsBold mb-4\">General Information</h3>\r\n\r\n\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t\t\t<mat-label class=\"asterix--after\">Broadcast Name</mat-label>\r\n\r\n\t\t\t\t\t\t\t<input matInput\r\n\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\tformControlName=\"campaignName\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Enter Broadcast name\">\r\n\r\n\t\t\t\t\t\t</mat-form-field>\r\n\r\n\t\t\t\t\t\t<div class=\"d-flex justify-content-between align-items-center w-100\">\r\n\t\t\t\t\t\t\t<mat-hint align=\"start\">\r\n\t\t\t\t\t\t\t\t{{form.get('campaignName').value?.length || 0}}/100\r\n\t\t\t\t\t\t\t</mat-hint>\r\n\r\n\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t\t\t\t\t\t*ngFor=\"let validation of validationMessages.campaignName\">\r\n\t\t\t\t\t\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t\t\t\t\t\t*ngIf=\"form.get('campaignName').touched\r\n\t\t\t\t\t\t\t\t\t\t&& form.get('campaignName').hasError(validation.type)\">\r\n\t\t\t\t\t\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\"\r\n\t\t\t\t\t\t\tfloatLabel=\"always\"\r\n\t\t\t\t\t\t\tclass=\"w-100\">\r\n\t\t\t\t\t\t\t<mat-label class=\"asterix--after\">Channel</mat-label>\r\n\r\n\t\t\t\t\t\t\t<mat-select placeholder=\"Select channel\"\r\n\t\t\t\t\t\t\t\tformControlName=\"medium\">\r\n\t\t\t\t\t\t\t\t<mat-option *ngFor=\"let option of channelOption\"\r\n\t\t\t\t\t\t\t\t\t[value]=\"option.value\">\r\n\t\t\t\t\t\t\t\t\t{{ option.label }}\r\n\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\r\n\t\t\t\t\t\t<mat-error align=\"end\"\r\n\t\t\t\t\t\t\t*ngFor=\"let validation of validationMessages.medium\">\r\n\t\t\t\t\t\t\t<p class=\"font-12px mb-0\"\r\n\t\t\t\t\t\t\t\t*ngIf=\"form.get('medium').touched\r\n\t\t\t\t\t\t\t\t\t\t&& form.get('medium').hasError(validation.type)\">\r\n\t\t\t\t\t\t\t\t{{ validation.message }}\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t</mat-error>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<ng-container *ngIf=\"form.get('medium').value === 'WA'\">\r\n\t\t\t\t\t\t<lib-general-information-wa [isTouchedForm]=\"isTouchedWAForm\"\r\n\t\t\t\t\t\t\t[isReadOnlyMode]=\"isReadOnlyMode\"\r\n\t\t\t\t\t\t\t(updateGeneralInformationForm)=\"updateGeneralInformationForm($event)\"></lib-general-information-wa>\r\n\t\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\t<ng-container *ngIf=\"form.get('medium').value === 'LINE'\">\r\n\t\t\t\t\t\t<lib-general-information-line [isTouchedForm]=\"isTouchedSMSForm\"\r\n\t\t\t\t\t\t\t[isReadOnlyMode]=\"isReadOnlyMode\"\r\n\t\t\t\t\t\t\t(updateGeneralInformationForm)=\"updateGeneralInformationForm($event)\"></lib-general-information-line>\r\n\t\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\t<ng-container *ngIf=\"form.get('medium').value === 'SMS'\">\r\n\t\t\t\t\t\t<lib-general-information-sms [isTouchedForm]=\"isTouchedSMSForm\"\r\n\t\t\t\t\t\t\t[isReadOnlyMode]=\"isReadOnlyMode\"\r\n\t\t\t\t\t\t\t(updateGeneralInformationForm)=\"updateGeneralInformationForm($event)\"></lib-general-information-sms>\r\n\t\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\t<ng-container *ngIf=\"form.get('medium').value === 'EMAIL'\">\r\n\t\t\t\t\t\t<lib-general-information-email [isTouchedForm]=\"isTouchedEmailForm\"\r\n\t\t\t\t\t\t\t[isReadOnlyMode]=\"isReadOnlyMode\"\r\n\t\t\t\t\t\t\t(updateGeneralInformationForm)=\"updateGeneralInformationForm($event)\"></lib-general-information-email>\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t</mat-card-content>\r\n\t\t\t</mat-card>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"campaign-info-child pl-20px\">\r\n\t\t\t<h3 class=\"font-22px font-PoppinsBold\">Broadcast Content</h3>\r\n\r\n\t\t\t<div\r\n\t\t\t\t[ngClass]=\"form.get('medium').value === 'SMS' || form.get('medium').value === 'EMAIL' ? 'campaign-border-preview' : 'campaign-preview'\">\r\n\t\t\t\t<section *ngIf=\"form.get('medium').value === 'SMS' || form.get('medium').value === 'EMAIL'\">\r\n\t\t\t\t\t<p *ngIf=\"getBody\"\r\n\t\t\t\t\t\tclass=\"body my-2\"\r\n\t\t\t\t\t\tstyle=\"max-width: 500px;word-wrap: break-word;\"\r\n\t\t\t\t\t\t[innerHTML]=\"getBody\"></p>\r\n\t\t\t\t</section>\r\n\r\n\t\t\t\t<section *ngIf=\"form.get('medium').value === 'WA'\"\r\n\t\t\t\t\tclass=\"campaign-preview__wa\">\r\n\t\t\t\t\t<div class=\"header-preview\">\r\n\t\t\t\t\t\t<div class=\"heading\">\r\n\t\t\t\t\t\t\t{{ getHeader }}\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"body-preview\">\r\n\t\t\t\t\t\t<section *ngIf=\"getBody || getMedia || displayFile\">\r\n\t\t\t\t\t\t\t<div class=\"chat\"\r\n\t\t\t\t\t\t\t\t[ngClass]=\"{'no-bottom-border': getTemplate?.buttons?.length > 0}\">\r\n\t\t\t\t\t\t\t\t<img *ngIf=\"(getMedia === 'IMAGE' || getTemplate?.header?.type?.toLowerCase() === 'image') && displayFile\"\r\n\t\t\t\t\t\t\t\t\tstyle=\"max-width: 100%;\"\r\n\t\t\t\t\t\t\t\t\talt=\"image\"\r\n\t\t\t\t\t\t\t\t\t[src]=\"displayFile\" />\r\n\r\n\t\t\t\t\t\t\t\t<video\r\n\t\t\t\t\t\t\t\t\t*ngIf=\"(getMedia === 'VIDEO' || getTemplate?.header?.type?.toLowerCase() === 'video') && displayFile\"\r\n\t\t\t\t\t\t\t\t\tid=\"video\"\r\n\t\t\t\t\t\t\t\t\tstyle=\"width: 100%;\"\r\n\t\t\t\t\t\t\t\t\t[src]=\"displayFile\"\r\n\t\t\t\t\t\t\t\t\tcontrols></video>\r\n\r\n\t\t\t\t\t\t\t\t<div *ngIf=\"getMedia === 'DOCUMENT'\"\r\n\t\t\t\t\t\t\t\t\tstyle=\"display: flex;\">\r\n\t\t\t\t\t\t\t\t\t<img style=\"width: 13px; height: 18px;\"\r\n\t\t\t\t\t\t\t\t\t\talt=\"document\"\r\n\t\t\t\t\t\t\t\t\t\tsrc=\"../../../../../assets/images/icon-file.png\">\r\n\r\n\t\t\t\t\t\t\t\t\t<span style=\"margin-left: 10px;\">Document</span>\r\n\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t<ng-container *ngIf=\"getMedia === 'LOCATION'\">\r\n\t\t\t\t\t\t\t\t\t<agm-map style=\"width:100%;height:200px;\"\r\n\t\t\t\t\t\t\t\t\t\t[disableDefaultUI]=\"true\"\r\n\t\t\t\t\t\t\t\t\t\t[latitude]=\"maps.latitude\"\r\n\t\t\t\t\t\t\t\t\t\t[longitude]=\"maps.longitude\"\r\n\t\t\t\t\t\t\t\t\t\t[zoom]=\"maps.zoom\">\r\n\t\t\t\t\t\t\t\t\t\t<agm-marker [latitude]=\"maps.latitude\"\r\n\t\t\t\t\t\t\t\t\t\t\t[longitude]=\"maps.longitude\"\r\n\t\t\t\t\t\t\t\t\t\t\t[markerDraggable]=\"false\"></agm-marker>\r\n\t\t\t\t\t\t\t\t\t</agm-map>\r\n\t\t\t\t\t\t\t\t\t<a\r\n\t\t\t\t\t\t\t\t\t\t[href]=\"'https://www.google.com/maps/search/?api=1&query='+ maps.latitude + ',' + maps.longitude\">\r\n\t\t\t\t\t\t\t\t\t\thttps://www.google.com/maps/search/?api=1&query={{maps.latitude}},{{maps.longitude}}\r\n\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t\t\t\t\t<p *ngIf=\"getBody\"\r\n\t\t\t\t\t\t\t\t\tclass=\"body my-2\"\r\n\t\t\t\t\t\t\t\t\t[innerHTML]=\"getBody\"></p>\r\n\r\n\t\t\t\t\t\t\t\t<p *ngIf=\"getTemplate?.footer\"\r\n\t\t\t\t\t\t\t\t\tclass=\"mb-2\"\r\n\t\t\t\t\t\t\t\t\tstyle=\"color: rgb(160, 160, 160);\">\r\n\t\t\t\t\t\t\t\t\t{{ getTemplate.footer }}\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t<section *ngIf=\"getTemplate?.buttons?.length > 0\">\r\n\t\t\t\t\t\t\t<div *ngFor=\"let button of getTemplateButton\"\r\n\t\t\t\t\t\t\t\tclass=\"params-btn pb-0 pointer\">\r\n\t\t\t\t\t\t\t\t<p class=\"mb-0\">\r\n\t\t\t\t\t\t\t\t\t{{ button?.text || button?.type }}\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t<div *ngIf=\"getTemplate?.buttons?.length > 3\"\r\n\t\t\t\t\t\t\t\tclass=\"params-btn pb-0 pointer\"\r\n\t\t\t\t\t\t\t\t(click)=\"isShowMore = !isShowMore\">\r\n\t\t\t\t\t\t\t\t<p class=\"mb-0\">\r\n\t\t\t\t\t\t\t\t\t<mat-icon>list</mat-icon> See all options\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</section>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</section>\r\n\r\n\t\t\t\t<section *ngIf=\"form.get('medium').value === 'LINE'\"\r\n\t\t\t\t\tclass=\"campaign-preview__line\">\r\n\t\t\t\t\t<div class=\"header-preview\">\r\n\t\t\t\t\t\t<div class=\"heading\">\r\n\t\t\t\t\t\t\t{{ getHeader }}\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"body-preview\">\r\n\t\t\t\t\t\t<!-- Template Line Text -->\r\n\t\t\t\t\t\t<section *ngIf=\"isText || !isJSON\"\r\n\t\t\t\t\t\t\tclass=\"chat\">\r\n\t\t\t\t\t\t\t<p class=\"body my-2\"\r\n\t\t\t\t\t\t\t\t[innerHTML]=\"getBody\"></p>\r\n\t\t\t\t\t\t</section>\r\n\r\n\t\t\t\t\t\t<!-- Template Line Button | Confirmation -->\r\n\t\t\t\t\t\t<section *ngIf=\"['buttons', 'confirm'].includes(getTemplateLine?.type)\"\r\n\t\t\t\t\t\t\tclass=\"chat\"\r\n\t\t\t\t\t\t\t[ngClass]=\"{'no-bottom-border': getTemplateLine?.actions?.length > 0}\">\r\n\t\t\t\t\t\t\t<img *ngIf=\"getTemplateLine?.thumbnailImageUrl\"\r\n\t\t\t\t\t\t\t\tstyle=\"max-width: 100%;\"\r\n\t\t\t\t\t\t\t\tclass=\"mb-1\"\r\n\t\t\t\t\t\t\t\t[src]=\"getTemplateLine?.thumbnailImageUrl\" />\r\n\r\n\t\t\t\t\t\t\t<p *ngIf=\"getTemplateLine?.title\"\r\n\t\t\t\t\t\t\t\tclass=\"font-PoppinsBold mb-1\"\r\n\t\t\t\t\t\t\t\t[innerHTML]=\"getTemplateLine?.title\"> </p>\r\n\r\n\t\t\t\t\t\t\t<p *ngIf=\"getTemplateLine?.text\"\r\n\t\t\t\t\t\t\t\tclass=\"mb-0\"\r\n\t\t\t\t\t\t\t\t[innerHTML]=\"getTemplateLine?.text\"> </p>\r\n\t\t\t\t\t\t</section>\r\n\r\n\t\t\t\t\t\t<!-- Template Line Carousel -->\r\n\t\t\t\t\t\t<div *ngIf=\"['carousel'].includes(getTemplateLine?.type)\"\r\n\t\t\t\t\t\t\tclass=\"d-flex gap-2 overflow-auto\">\r\n\t\t\t\t\t\t\t<div *ngFor=\"let column of getTemplateLine?.columns\">\r\n\t\t\t\t\t\t\t\t<section class=\"chat w-100\"\r\n\t\t\t\t\t\t\t\t\t[ngClass]=\"{'no-bottom-border': column?.actions?.length > 0}\">\r\n\t\t\t\t\t\t\t\t\t<img *ngIf=\"column.thumbnailImageUrl\"\r\n\t\t\t\t\t\t\t\t\t\tstyle=\"max-width: 100%;\"\r\n\t\t\t\t\t\t\t\t\t\tclass=\"mb-1\"\r\n\t\t\t\t\t\t\t\t\t\t[src]=\"column.thumbnailImageUrl\" />\r\n\r\n\t\t\t\t\t\t\t\t\t<p *ngIf=\"column.title\"\r\n\t\t\t\t\t\t\t\t\t\tclass=\"font-PoppinsBold mb-1\"\r\n\t\t\t\t\t\t\t\t\t\t[innerHTML]=\"column.title\"> </p>\r\n\r\n\t\t\t\t\t\t\t\t\t<p *ngIf=\"column.text\"\r\n\t\t\t\t\t\t\t\t\t\tclass=\"mb-0\"\r\n\t\t\t\t\t\t\t\t\t\t[innerHTML]=\"column.text\"> </p>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t\t<section *ngIf=\"column?.actions?.length > 0\">\r\n\t\t\t\t\t\t\t\t\t<div *ngFor=\"let button of column?.actions\"\r\n\t\t\t\t\t\t\t\t\t\tclass=\"params-btn mw-100 pb-0 pointer\">\r\n\t\t\t\t\t\t\t\t\t\t<p class=\"mb-0\">\r\n\t\t\t\t\t\t\t\t\t\t\t{{ button?.text }}\r\n\t\t\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<!-- Template Line Image Carousel -->\r\n\t\t\t\t\t\t<div *ngIf=\"['image_carousel'].includes(getTemplateLine?.type)\"\r\n\t\t\t\t\t\t\tclass=\"d-flex gap-2 overflow-auto\">\r\n\t\t\t\t\t\t\t<div *ngFor=\"let column of getTemplateLine?.columns\">\r\n\t\t\t\t\t\t\t\t<div class=\"image-container\">\r\n\t\t\t\t\t\t\t\t\t<img [src]=\"column.imageUrl\"\r\n\t\t\t\t\t\t\t\t\t\talt=\"image\">\r\n\r\n\t\t\t\t\t\t\t\t\t<div class=\"d-flex justify-content-center\">\r\n\t\t\t\t\t\t\t\t\t\t<p class=\"font-13px overlay-text\">{{ column.action.label }}</p>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<!-- Button Line -->\r\n\t\t\t\t\t\t<section *ngIf=\"getTemplateLine?.type !== 'confirm' && getTemplateLine?.actions?.length > 0\">\r\n\t\t\t\t\t\t\t<div *ngFor=\"let button of getTemplateLine?.actions\"\r\n\t\t\t\t\t\t\t\tclass=\"params-btn pb-0 pointer\">\r\n\t\t\t\t\t\t\t\t<p class=\"mb-0\">\r\n\t\t\t\t\t\t\t\t\t{{ button?.text }}\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t<section *ngIf=\"getTemplateLine?.type === 'confirm' && getTemplateLine?.actions?.length > 0\"\r\n\t\t\t\t\t\t\tclass=\"d-flex justify-content-around mw-70 bg-white\">\r\n\t\t\t\t\t\t\t<div *ngFor=\"let button of getTemplateLine?.actions\"\r\n\t\t\t\t\t\t\t\tclass=\"params-btn flex pb-0 pointer\">\r\n\t\t\t\t\t\t\t\t<p class=\"mb-0\">\r\n\t\t\t\t\t\t\t\t\t{{ button?.text }}\r\n\t\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t<!-- ./ Button Line -->\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</section>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"d-flex\"\r\n\t\t\t\tstyle=\"flex-direction: column;\">\r\n\t\t\t\t<span *ngIf=\"form.get('medium').value === 'SMS'\"\r\n\t\t\t\t\tstyle=\"text-align: right;width: 100%;\">\r\n\t\t\t\t\t{{ twilioResultCounter.fulltext }}\r\n\t\t\t\t</span>\r\n\t\t\t\t<span style=\"text-align: right;width: 100%;color: red\"\r\n\t\t\t\t\t*ngIf=\"twilioResultCounter.segments > 10 && form.get('medium').value === 'SMS'\">\r\n\t\t\t\t\tMaximum Segment is 10\r\n\t\t\t\t</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</form>\r\n\r\n<ng-template #isSpinner>\r\n\t<div class=\"text-center my-auto\">\r\n\t\t<img src=\"../../../../../assets/images/spinner.svg\">\r\n\t</div>\r\n</ng-template>\r\n",
|
|
5071
|
-
styles: [".campaign-info{display:flex}.campaign-info-child{flex:1}.campaign-info .asterix--after:after{content:\"*\";color:red}.campaign-info .pl-20px{padding-left:20px}.campaign-info .mw-70{max-width:70%}.campaign-info .campaign-preview{width:75%}.campaign-info .campaign-preview .header-preview{padding:15px;min-height:60px;border-radius:10px 10px 0 0}.campaign-info .campaign-preview .header-preview .heading{width:100%;color:#e0e0e0;margin-left:5px;font-size:20px}.campaign-info .campaign-preview .body-preview{padding:15px;min-height:470px}.campaign-info .campaign-preview .body-preview .chat{width:70%;padding:11px;font-size:14px;line-height:22px;color:#494949;border-radius:8px;background:#fff;overflow-wrap:break-word;white-space:pre-line;box-shadow:12px 12px 20px rgba(44,59,113,.04)}.campaign-info .campaign-preview .body-preview .chat .body{max-height:400px;overflow-y:auto;overscroll-behavior-y:contain}.campaign-info .campaign-preview .body-preview .chat.no-bottom-border{border-bottom-left-radius:0;border-bottom-right-radius:0}.campaign-info .campaign-preview__wa .header-preview{background:#065f54}.campaign-info .campaign-preview__wa .body-preview{border-bottom-left-radius:8px;border-bottom-right-radius:8px;background-image:url(
|
|
5332
|
+
template: "<form autocomplete=\"off\" [formGroup]=\"form\">\r\n <div class=\"campaign-info\">\r\n <div class=\"campaign-info-child\">\r\n <mat-card>\r\n <mat-card-content>\r\n <h3 class=\"font-22px font-PoppinsBold mb-4\">General Information</h3>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label class=\"asterix--after\">Broadcast Name</mat-label>\r\n\r\n <input\r\n matInput\r\n type=\"text\"\r\n formControlName=\"campaignName\"\r\n placeholder=\"Enter Broadcast name\"\r\n />\r\n </mat-form-field>\r\n\r\n <div class=\"d-flex justify-content-between align-items-center w-100\">\r\n <mat-hint align=\"start\">\r\n {{ form.get('campaignName').value?.length || 0 }}/100\r\n </mat-hint>\r\n\r\n <div>\r\n <mat-error\r\n align=\"end\"\r\n *ngFor=\"let validation of validationMessages.campaignName\"\r\n >\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"\r\n form.get('campaignName').touched &&\r\n form.get('campaignName').hasError(validation.type)\r\n \"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"form-group\">\r\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" class=\"w-100\">\r\n <mat-label class=\"asterix--after\">Channel</mat-label>\r\n\r\n <mat-select placeholder=\"Select channel\" formControlName=\"medium\">\r\n <mat-option\r\n *ngFor=\"let option of channelOption\"\r\n [value]=\"option.value\"\r\n >\r\n {{ option.label }}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n\r\n <mat-error align=\"end\" *ngFor=\"let validation of validationMessages.medium\">\r\n <p\r\n class=\"font-12px mb-0\"\r\n *ngIf=\"\r\n form.get('medium').touched &&\r\n form.get('medium').hasError(validation.type)\r\n \"\r\n >\r\n {{ validation.message }}\r\n </p>\r\n </mat-error>\r\n </div>\r\n\r\n <ng-container *ngIf=\"form.get('medium').value === 'WA'\">\r\n <lib-general-information-wa\r\n [isTouchedForm]=\"isTouchedWAForm\"\r\n [isReadOnlyMode]=\"isReadOnlyMode\"\r\n (updateGeneralInformationForm)=\"updateGeneralInformationForm($event)\"\r\n ></lib-general-information-wa>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"form.get('medium').value === 'LINE'\">\r\n <lib-general-information-line\r\n [isTouchedForm]=\"isTouchedSMSForm\"\r\n [isReadOnlyMode]=\"isReadOnlyMode\"\r\n (updateGeneralInformationForm)=\"updateGeneralInformationForm($event)\"\r\n ></lib-general-information-line>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"form.get('medium').value === 'SMS'\">\r\n <lib-general-information-sms\r\n [isTouchedForm]=\"isTouchedSMSForm\"\r\n [isReadOnlyMode]=\"isReadOnlyMode\"\r\n (updateGeneralInformationForm)=\"updateGeneralInformationForm($event)\"\r\n ></lib-general-information-sms>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"form.get('medium').value === 'EMAIL'\">\r\n <lib-general-information-email\r\n [isTouchedForm]=\"isTouchedEmailForm\"\r\n [isReadOnlyMode]=\"isReadOnlyMode\"\r\n (updateGeneralInformationForm)=\"updateGeneralInformationForm($event)\"\r\n ></lib-general-information-email>\r\n </ng-container>\r\n </mat-card-content>\r\n </mat-card>\r\n </div>\r\n\r\n <div class=\"campaign-info-child pl-20px\">\r\n <h3 class=\"font-22px font-PoppinsBold\">Broadcast Content</h3>\r\n\r\n <div\r\n [ngClass]=\"\r\n form.get('medium').value === 'SMS' || form.get('medium').value === 'EMAIL'\r\n ? 'campaign-border-preview'\r\n : 'campaign-preview'\r\n \"\r\n >\r\n <section\r\n *ngIf=\"\r\n form.get('medium').value === 'SMS' || form.get('medium').value === 'EMAIL'\r\n \"\r\n >\r\n <p\r\n *ngIf=\"getBody\"\r\n class=\"body my-2\"\r\n style=\"max-width: 500px; word-wrap: break-word\"\r\n [innerHTML]=\"getBody\"\r\n ></p>\r\n </section>\r\n\r\n <section *ngIf=\"form.get('medium').value === 'WA'\" class=\"campaign-preview__wa\">\r\n <div class=\"header-preview\">\r\n <div class=\"heading\">\r\n {{ getHeader }}\r\n </div>\r\n </div>\r\n <div class=\"body-preview\">\r\n <section *ngIf=\"getBody || getMedia || displayFile\">\r\n <div\r\n class=\"chat\"\r\n [ngClass]=\"{ 'no-bottom-border': getTemplate?.buttons?.length > 0 }\"\r\n >\r\n <img\r\n *ngIf=\"\r\n (getMedia === 'IMAGE' ||\r\n getTemplate?.header?.type?.toLowerCase() === 'image') &&\r\n displayFile\r\n \"\r\n style=\"max-width: 100%\"\r\n alt=\"image\"\r\n [src]=\"displayFile\"\r\n />\r\n\r\n <video\r\n *ngIf=\"\r\n (getMedia === 'VIDEO' ||\r\n getTemplate?.header?.type?.toLowerCase() === 'video') &&\r\n displayFile\r\n \"\r\n id=\"video\"\r\n style=\"width: 100%\"\r\n [src]=\"displayFile\"\r\n controls\r\n ></video>\r\n\r\n <div *ngIf=\"getMedia === 'DOCUMENT'\" style=\"display: flex\">\r\n <img\r\n style=\"width: 13px; height: 18px\"\r\n alt=\"document\"\r\n src=\"../../../../../assets/images/icon-file.png\"\r\n />\r\n\r\n <span style=\"margin-left: 10px\">Document</span>\r\n </div>\r\n\r\n <ng-container *ngIf=\"getMedia === 'LOCATION'\">\r\n <agm-map\r\n style=\"width: 100%; height: 200px\"\r\n [disableDefaultUI]=\"true\"\r\n [latitude]=\"maps.latitude\"\r\n [longitude]=\"maps.longitude\"\r\n [zoom]=\"maps.zoom\"\r\n >\r\n <agm-marker\r\n [latitude]=\"maps.latitude\"\r\n [longitude]=\"maps.longitude\"\r\n [markerDraggable]=\"false\"\r\n ></agm-marker>\r\n </agm-map>\r\n <a\r\n [href]=\"\r\n 'https://www.google.com/maps/search/?api=1&query=' +\r\n maps.latitude +\r\n ',' +\r\n maps.longitude\r\n \"\r\n >\r\n https://www.google.com/maps/search/?api=1&query={{\r\n maps.latitude\r\n }},{{ maps.longitude }}\r\n </a>\r\n </ng-container>\r\n\r\n <p *ngIf=\"getBody\" class=\"body my-2\" [innerHTML]=\"getBody\"></p>\r\n\r\n <p\r\n *ngIf=\"getTemplate?.footer\"\r\n class=\"mb-2\"\r\n style=\"color: rgb(160, 160, 160)\"\r\n >\r\n {{ getTemplate.footer }}\r\n </p>\r\n </div>\r\n </section>\r\n <section *ngIf=\"getTemplate?.buttons?.length > 0\">\r\n <div\r\n *ngFor=\"let button of getTemplateButton\"\r\n class=\"params-btn pb-0 pointer\"\r\n >\r\n <p class=\"mb-0\">\r\n {{ button?.text || button?.type }}\r\n </p>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"getTemplate?.buttons?.length > 3\"\r\n class=\"params-btn pb-0 pointer\"\r\n (click)=\"isShowMore = !isShowMore\"\r\n >\r\n <p class=\"mb-0\"><mat-icon>list</mat-icon> See all options</p>\r\n </div>\r\n </section>\r\n </div>\r\n </section>\r\n\r\n <section *ngIf=\"form.get('medium').value === 'LINE'\" class=\"campaign-preview__line\">\r\n <div class=\"header-preview\">\r\n <div class=\"heading\">\r\n {{ getHeader }}\r\n </div>\r\n </div>\r\n <div class=\"body-preview\">\r\n <!-- Template Line Text -->\r\n <section *ngIf=\"isText || !isJSON\" class=\"chat\">\r\n <p class=\"body my-2\" [innerHTML]=\"getBody\"></p>\r\n </section>\r\n\r\n <!-- Template Line Button | Confirmation -->\r\n <section\r\n *ngIf=\"['buttons', 'confirm'].includes(getTemplateLine?.type)\"\r\n class=\"chat\"\r\n [ngClass]=\"{ 'no-bottom-border': getTemplateLine?.actions?.length > 0 }\"\r\n >\r\n <img\r\n *ngIf=\"getTemplateLine?.thumbnailImageUrl\"\r\n style=\"max-width: 100%\"\r\n class=\"mb-1\"\r\n [src]=\"getTemplateLine?.thumbnailImageUrl\"\r\n />\r\n\r\n <p\r\n *ngIf=\"getTemplateLine?.title\"\r\n class=\"font-PoppinsBold mb-1\"\r\n [innerHTML]=\"getTemplateLine?.title\"\r\n ></p>\r\n\r\n <p\r\n *ngIf=\"getTemplateLine?.text\"\r\n class=\"mb-0\"\r\n [innerHTML]=\"getTemplateLine?.text\"\r\n ></p>\r\n </section>\r\n\r\n <!-- Template Line Carousel -->\r\n <div\r\n *ngIf=\"['carousel'].includes(getTemplateLine?.type)\"\r\n class=\"d-flex gap-2 overflow-auto\"\r\n >\r\n <div *ngFor=\"let column of getTemplateLine?.columns\">\r\n <section\r\n class=\"chat w-100\"\r\n [ngClass]=\"{ 'no-bottom-border': column?.actions?.length > 0 }\"\r\n >\r\n <img\r\n *ngIf=\"column.thumbnailImageUrl\"\r\n style=\"max-width: 100%\"\r\n class=\"mb-1\"\r\n [src]=\"column.thumbnailImageUrl\"\r\n />\r\n\r\n <p\r\n *ngIf=\"column.title\"\r\n class=\"font-PoppinsBold mb-1\"\r\n [innerHTML]=\"column.title\"\r\n ></p>\r\n\r\n <p\r\n *ngIf=\"column.text\"\r\n class=\"mb-0\"\r\n [innerHTML]=\"column.text\"\r\n ></p>\r\n </section>\r\n <section *ngIf=\"column?.actions?.length > 0\">\r\n <div\r\n *ngFor=\"let button of column?.actions\"\r\n class=\"params-btn mw-100 pb-0 pointer\"\r\n >\r\n <p class=\"mb-0\">\r\n {{ button?.text }}\r\n </p>\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n\r\n <!-- Template Line Image Carousel -->\r\n <div\r\n *ngIf=\"['image_carousel'].includes(getTemplateLine?.type)\"\r\n class=\"d-flex gap-2 overflow-auto\"\r\n >\r\n <div *ngFor=\"let column of getTemplateLine?.columns\">\r\n <div class=\"image-container\">\r\n <img [src]=\"column.imageUrl\" alt=\"image\" />\r\n\r\n <div class=\"d-flex justify-content-center\">\r\n <p class=\"font-13px overlay-text\">\r\n {{ column.action.label }}\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Button Line -->\r\n <section\r\n *ngIf=\"\r\n getTemplateLine?.type !== 'confirm' &&\r\n getTemplateLine?.actions?.length > 0\r\n \"\r\n >\r\n <div\r\n *ngFor=\"let button of getTemplateLine?.actions\"\r\n class=\"params-btn pb-0 pointer\"\r\n >\r\n <p class=\"mb-0\">\r\n {{ button?.text }}\r\n </p>\r\n </div>\r\n </section>\r\n <section\r\n *ngIf=\"\r\n getTemplateLine?.type === 'confirm' &&\r\n getTemplateLine?.actions?.length > 0\r\n \"\r\n class=\"d-flex justify-content-around mw-70 bg-white\"\r\n >\r\n <div\r\n *ngFor=\"let button of getTemplateLine?.actions\"\r\n class=\"params-btn flex pb-0 pointer\"\r\n >\r\n <p class=\"mb-0\">\r\n {{ button?.text }}\r\n </p>\r\n </div>\r\n </section>\r\n <!-- ./ Button Line -->\r\n </div>\r\n </section>\r\n </div>\r\n\r\n <div class=\"d-flex\" style=\"flex-direction: column\">\r\n <span\r\n *ngIf=\"form.get('medium').value === 'SMS'\"\r\n style=\"text-align: right; width: 100%\"\r\n >\r\n {{ twilioResultCounter.fulltext }}\r\n </span>\r\n <span\r\n style=\"text-align: right; width: 100%; color: red\"\r\n *ngIf=\"twilioResultCounter.segments > 10 && form.get('medium').value === 'SMS'\"\r\n >\r\n Maximum Segment is 10\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</form>\r\n\r\n<ng-template #isSpinner>\r\n <div class=\"text-center my-auto\">\r\n <img src=\"../../../../../assets/images/spinner.svg\" />\r\n </div>\r\n</ng-template>\r\n",
|
|
5333
|
+
styles: [".campaign-info{display:flex}.campaign-info-child{flex:1}.campaign-info .asterix--after:after{content:\"*\";color:red}.campaign-info .pl-20px{padding-left:20px}.campaign-info .mw-70{max-width:70%}.campaign-info .campaign-preview{width:75%}.campaign-info .campaign-preview .header-preview{padding:15px;min-height:60px;border-radius:10px 10px 0 0}.campaign-info .campaign-preview .header-preview .heading{width:100%;color:#e0e0e0;margin-left:5px;font-size:20px}.campaign-info .campaign-preview .body-preview{padding:15px;min-height:470px}.campaign-info .campaign-preview .body-preview .chat{width:70%;padding:11px;font-size:14px;line-height:22px;color:#494949;border-radius:8px;background:#fff;overflow-wrap:break-word;white-space:pre-line;box-shadow:12px 12px 20px rgba(44,59,113,.04)}.campaign-info .campaign-preview .body-preview .chat .body{max-height:400px;overflow-y:auto;overscroll-behavior-y:contain}.campaign-info .campaign-preview .body-preview .chat.no-bottom-border{border-bottom-left-radius:0;border-bottom-right-radius:0}.campaign-info .campaign-preview__wa .header-preview{background:#065f54}.campaign-info .campaign-preview__wa .body-preview{border-bottom-left-radius:8px;border-bottom-right-radius:8px;background-image:url(../../../../../assets/svg/whatsapp-bg.svg);background-position:center;background-repeat:no-repeat;background-size:cover}.campaign-info .campaign-preview__wa .body-preview .params-btn{width:auto;max-width:70%;color:#34b7f1;background:#fff;box-shadow:12px 12px 20px rgba(44,59,113,.04);border-radius:0;font-size:16px;line-height:43px;padding:0;text-align:center;font-family:Poppins;overflow-wrap:break-word}.campaign-info .campaign-preview__wa .body-preview .params-btn b{font-family:PoppinsBold}.campaign-info .campaign-preview__line .header-preview{background:#273046}.campaign-info .campaign-preview__line .body-preview{background:#7692bf;border-bottom-left-radius:8px;border-bottom-right-radius:8px}.campaign-info .campaign-preview__line .body-preview .params-btn{width:auto;max-width:70%;color:#34b7f1;background:#fff;box-shadow:12px 12px 20px rgba(44,59,113,.04);border-radius:0;font-size:16px;line-height:43px;padding:0;text-align:center;font-family:Poppins;overflow-wrap:break-word}.campaign-info .campaign-preview__line .body-preview .params-btn b{font-family:PoppinsBold}.campaign-info .campaign-preview__line .body-preview .image-container{position:relative;width:200px;height:200px}.campaign-info .campaign-preview__line .body-preview .image-container img{display:block;width:100%;height:100%}.campaign-info .campaign-preview__line .body-preview .image-container .overlay-text{top:170px;position:absolute;padding:2px 5px;color:#fff;background-color:rgba(49,57,60,.62);border-radius:10px}.campaign-info .campaign-border-preview{width:100%;min-height:100px;padding:32px;border:1px solid #e2e2e2;border-radius:8px}"]
|
|
5072
5334
|
})
|
|
5073
5335
|
], GeneralInformationComponent);
|
|
5074
5336
|
return GeneralInformationComponent;
|
|
@@ -5432,7 +5694,7 @@ var SchedulerComponent = /** @class */ (function () {
|
|
|
5432
5694
|
SchedulerComponent.prototype.initForm = function () {
|
|
5433
5695
|
var _this = this;
|
|
5434
5696
|
this.form = new FormGroup({
|
|
5435
|
-
schedulerType: new FormControl(null, Validators.required),
|
|
5697
|
+
schedulerType: new FormControl(null, Validators$1.required),
|
|
5436
5698
|
startDate: new FormControl(null),
|
|
5437
5699
|
startTime: new FormControl(null),
|
|
5438
5700
|
isRepeat: new FormControl(false),
|
|
@@ -5488,9 +5750,9 @@ var SchedulerComponent = /** @class */ (function () {
|
|
|
5488
5750
|
this.form.get('isRepeat').setValue(false);
|
|
5489
5751
|
return;
|
|
5490
5752
|
}
|
|
5491
|
-
this.form.get('startDate').setValidators(Validators.required);
|
|
5753
|
+
this.form.get('startDate').setValidators(Validators$1.required);
|
|
5492
5754
|
this.form.get('startDate').updateValueAndValidity();
|
|
5493
|
-
this.form.get('startTime').setValidators(Validators.required);
|
|
5755
|
+
this.form.get('startTime').setValidators(Validators$1.required);
|
|
5494
5756
|
this.form.get('startTime').updateValueAndValidity();
|
|
5495
5757
|
this.initEdit(false);
|
|
5496
5758
|
};
|
|
@@ -5506,7 +5768,7 @@ var SchedulerComponent = /** @class */ (function () {
|
|
|
5506
5768
|
};
|
|
5507
5769
|
SchedulerComponent.prototype.updateRepeat = function (isChecked) {
|
|
5508
5770
|
if (isChecked) {
|
|
5509
|
-
this.form.get('delivery').setValidators(Validators.required);
|
|
5771
|
+
this.form.get('delivery').setValidators(Validators$1.required);
|
|
5510
5772
|
this.form.get('delivery').updateValueAndValidity();
|
|
5511
5773
|
return;
|
|
5512
5774
|
}
|
|
@@ -5632,6 +5894,7 @@ var CampaignManagementModule = /** @class */ (function () {
|
|
|
5632
5894
|
MatSlideToggleModule,
|
|
5633
5895
|
DragDropModule,
|
|
5634
5896
|
CampaignIndexModule,
|
|
5897
|
+
InputNumericModule,
|
|
5635
5898
|
],
|
|
5636
5899
|
exports: [CampaignManagementComponent, SummaryComponent],
|
|
5637
5900
|
entryComponents: [PendingApprovalDialogViewComponent],
|
|
@@ -5687,5 +5950,5 @@ var ConfirmationModule = /** @class */ (function () {
|
|
|
5687
5950
|
* Generated bundle index. Do not edit.
|
|
5688
5951
|
*/
|
|
5689
5952
|
|
|
5690
|
-
export { AdlCampaignManagementLibraryInternalComponent, AdlCampaignManagementLibraryInternalModule,
|
|
5953
|
+
export { AdlCampaignManagementLibraryInternalComponent, AdlCampaignManagementLibraryInternalModule, CampaignIndexModule, CampaignManagementComponent, CampaignManagementModule, ConfirmationComponent, ConfirmationModule, DashboardModule, SearchModule, WizardComponent as ɵa, NewCampaignComponent as ɵb, GeneralInformationComponent as ɵc, SchedulerComponent as ɵd, SummaryComponent as ɵe, NewNumberBasesComponent as ɵf, GeneralInformationLineComponent as ɵg, GeneralInformationWAComponent as ɵh, GeneralInformationSMSComponent as ɵi, GeneralInformationEmailComponent as ɵj, PendingApprovalDialogViewComponent as ɵk, FailoverMechanismComponent as ɵl, DashboardComponent as ɵm, ApiAdapterServiceService as ɵn, SearchComponent as ɵo, ViewingListOfCampaignTableComponent as ɵp, FilterInListOfCampaignComponent as ɵq, CampaignIndexComponent as ɵr, ApiAdapterServiceService as ɵs, MatSelectInfiniteScrollDirective as ɵt, InputNumericModule as ɵu, InputNumericComponent as ɵv, CustomPaginator as ɵw, ConfirmationComponent as ɵx, ConfirmationModel as ɵy, SharedServicesService as ɵz };
|
|
5691
5954
|
//# sourceMappingURL=adlfe-campaign-management-library.js.map
|