@adlfe/campaign-management-library 2.11.10 → 2.11.11
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/bundles/adlfe-campaign-management-library.umd.js +10 -54
- package/bundles/adlfe-campaign-management-library.umd.js.map +1 -1
- package/bundles/adlfe-campaign-management-library.umd.min.js +2 -2
- package/bundles/adlfe-campaign-management-library.umd.min.js.map +1 -1
- package/esm2015/lib/campaign-management/modules/new-campaign/new-campaign.component.js +3 -44
- package/esm5/lib/campaign-management/modules/new-campaign/new-campaign.component.js +12 -59
- package/fesm2015/adlfe-campaign-management-library.js +2 -40
- package/fesm2015/adlfe-campaign-management-library.js.map +1 -1
- package/fesm5/adlfe-campaign-management-library.js +11 -55
- package/fesm5/adlfe-campaign-management-library.js.map +1 -1
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ import { AngularEditorModule } from '@kolkov/angular-editor';
|
|
|
33
33
|
import { NgbPaginationModule, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
|
34
34
|
import * as echarts from 'echarts';
|
|
35
35
|
import { Subject, fromEvent, of } from 'rxjs';
|
|
36
|
-
import { debounceTime, takeUntil, tap
|
|
36
|
+
import { debounceTime, takeUntil, tap } from 'rxjs/operators';
|
|
37
37
|
import { MatChipsModule } from '@angular/material/chips';
|
|
38
38
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
39
39
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
@@ -2849,62 +2849,18 @@ var NewCampaignComponent = /** @class */ (function () {
|
|
|
2849
2849
|
configurable: true
|
|
2850
2850
|
});
|
|
2851
2851
|
NewCampaignComponent.prototype.saveGeneralInformationService = function () {
|
|
2852
|
-
var _a, _b;
|
|
2853
2852
|
return __awaiter(this, void 0, void 0, function () {
|
|
2854
|
-
var bodyReq, payloadValue
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
this.toastr.error('Segment cannot more than 10');
|
|
2861
|
-
this.isSubmit = false;
|
|
2862
|
-
return [2 /*return*/];
|
|
2863
|
-
}
|
|
2864
|
-
bodyReq = new GeneralInformationWAReqModel().clone(__assign({}, this.generalInformationData));
|
|
2865
|
-
payloadValue = bodyReq.convert();
|
|
2866
|
-
isDirectSendEnable = (_b = (_a = this.generalInformationData) === null || _a === void 0 ? void 0 : _a.from) === null || _b === void 0 ? void 0 : _b.directSendEnabled;
|
|
2867
|
-
if (!isDirectSendEnable) {
|
|
2868
|
-
this.saveGeneralInformation(payloadValue);
|
|
2869
|
-
return [2 /*return*/];
|
|
2870
|
-
}
|
|
2871
|
-
headers = new HttpHeaders()
|
|
2872
|
-
.set('Authorization', 'Bearer ' + localStorage.getItem('telin.accessToken'))
|
|
2873
|
-
.set('Access-Control-Allow-Origin', '*');
|
|
2874
|
-
return [4 /*yield*/, this.httpClient
|
|
2875
|
-
.post(environment.api + "/message/direct-send/" + bodyReq.accountId, {
|
|
2876
|
-
type: 'text',
|
|
2877
|
-
text: { body: bodyReq.text },
|
|
2878
|
-
}, { headers: headers })
|
|
2879
|
-
.pipe(map(function (response) { var _a; return ((_a = response) === null || _a === void 0 ? void 0 : _a.category) === 'UTILITY'; }), catchError$1(function () { return of(true); }))
|
|
2880
|
-
.toPromise()];
|
|
2881
|
-
case 1:
|
|
2882
|
-
isUtility = _c.sent();
|
|
2883
|
-
if (isUtility) {
|
|
2884
|
-
this.saveGeneralInformation(payloadValue);
|
|
2885
|
-
return [2 /*return*/];
|
|
2886
|
-
}
|
|
2887
|
-
confirmation = new ConfirmationModel();
|
|
2888
|
-
confirmation.title = 'Not Utility Content';
|
|
2889
|
-
confirmation.content = 'Content mismatch. This content is not Utility content';
|
|
2890
|
-
confirmation.btnSubmitRed = 'Continue';
|
|
2891
|
-
confirmation.btnCancel = 'Cancel';
|
|
2892
|
-
this.dialog
|
|
2893
|
-
.open(ConfirmationComponent, {
|
|
2894
|
-
autoFocus: false,
|
|
2895
|
-
backdropClass: 'overlay-backdrop-dialog',
|
|
2896
|
-
data: confirmation,
|
|
2897
|
-
})
|
|
2898
|
-
.afterClosed()
|
|
2899
|
-
.subscribe(function (isContinue) {
|
|
2900
|
-
if (isContinue) {
|
|
2901
|
-
_this.saveGeneralInformation(payloadValue);
|
|
2902
|
-
return;
|
|
2903
|
-
}
|
|
2904
|
-
_this.isSubmit = false;
|
|
2905
|
-
});
|
|
2906
|
-
return [2 /*return*/];
|
|
2853
|
+
var bodyReq, payloadValue;
|
|
2854
|
+
return __generator(this, function (_a) {
|
|
2855
|
+
if (!this.onCheckTwilioCounterValid()) {
|
|
2856
|
+
this.toastr.error('Segment cannot more than 10');
|
|
2857
|
+
this.isSubmit = false;
|
|
2858
|
+
return [2 /*return*/];
|
|
2907
2859
|
}
|
|
2860
|
+
bodyReq = new GeneralInformationWAReqModel().clone(__assign({}, this.generalInformationData));
|
|
2861
|
+
payloadValue = bodyReq.convert();
|
|
2862
|
+
this.saveGeneralInformation(payloadValue);
|
|
2863
|
+
return [2 /*return*/];
|
|
2908
2864
|
});
|
|
2909
2865
|
});
|
|
2910
2866
|
};
|