@adlfe/campaign-management-library 2.11.9 → 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 +14 -58
- 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 -41
- package/fesm2015/adlfe-campaign-management-library.js.map +1 -1
- package/fesm5/adlfe-campaign-management-library.js +11 -56
- package/fesm5/adlfe-campaign-management-library.js.map +1 -1
- package/package.json +1 -1
|
@@ -33,14 +33,13 @@ 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';
|
|
40
40
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
41
41
|
import { catchError } from 'rxjs/internal/operators/catchError';
|
|
42
42
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
43
|
-
import { environment as environment$1 } from 'projects/adl-campaign-management-library-internal/src/environments/environment';
|
|
44
43
|
import { SegmentedMessage } from 'sms-segments-calculator';
|
|
45
44
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
46
45
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
@@ -2850,62 +2849,18 @@ var NewCampaignComponent = /** @class */ (function () {
|
|
|
2850
2849
|
configurable: true
|
|
2851
2850
|
});
|
|
2852
2851
|
NewCampaignComponent.prototype.saveGeneralInformationService = function () {
|
|
2853
|
-
var _a, _b;
|
|
2854
2852
|
return __awaiter(this, void 0, void 0, function () {
|
|
2855
|
-
var bodyReq, payloadValue
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
this.toastr.error('Segment cannot more than 10');
|
|
2862
|
-
this.isSubmit = false;
|
|
2863
|
-
return [2 /*return*/];
|
|
2864
|
-
}
|
|
2865
|
-
bodyReq = new GeneralInformationWAReqModel().clone(__assign({}, this.generalInformationData));
|
|
2866
|
-
payloadValue = bodyReq.convert();
|
|
2867
|
-
isDirectSendEnable = (_b = (_a = this.generalInformationData) === null || _a === void 0 ? void 0 : _a.from) === null || _b === void 0 ? void 0 : _b.directSendEnabled;
|
|
2868
|
-
if (!isDirectSendEnable) {
|
|
2869
|
-
this.saveGeneralInformation(payloadValue);
|
|
2870
|
-
return [2 /*return*/];
|
|
2871
|
-
}
|
|
2872
|
-
headers = new HttpHeaders()
|
|
2873
|
-
.set('Authorization', 'Bearer ' + localStorage.getItem('telin.accessToken'))
|
|
2874
|
-
.set('Access-Control-Allow-Origin', '*');
|
|
2875
|
-
return [4 /*yield*/, this.httpClient
|
|
2876
|
-
.post(environment$1.api + "/message/direct-send/" + bodyReq.accountId, {
|
|
2877
|
-
type: 'text',
|
|
2878
|
-
text: { body: bodyReq.text },
|
|
2879
|
-
}, { headers: headers })
|
|
2880
|
-
.pipe(map(function (response) { var _a; return ((_a = response) === null || _a === void 0 ? void 0 : _a.category) === 'UTILITY'; }), catchError$1(function () { return of(true); }))
|
|
2881
|
-
.toPromise()];
|
|
2882
|
-
case 1:
|
|
2883
|
-
isUtility = _c.sent();
|
|
2884
|
-
if (isUtility) {
|
|
2885
|
-
this.saveGeneralInformation(payloadValue);
|
|
2886
|
-
return [2 /*return*/];
|
|
2887
|
-
}
|
|
2888
|
-
confirmation = new ConfirmationModel();
|
|
2889
|
-
confirmation.title = 'Not Utility Content';
|
|
2890
|
-
confirmation.content = 'Content mismatch. This content is not Utility content';
|
|
2891
|
-
confirmation.btnSubmitRed = 'Continue';
|
|
2892
|
-
confirmation.btnCancel = 'Cancel';
|
|
2893
|
-
this.dialog
|
|
2894
|
-
.open(ConfirmationComponent, {
|
|
2895
|
-
autoFocus: false,
|
|
2896
|
-
backdropClass: 'overlay-backdrop-dialog',
|
|
2897
|
-
data: confirmation,
|
|
2898
|
-
})
|
|
2899
|
-
.afterClosed()
|
|
2900
|
-
.subscribe(function (isContinue) {
|
|
2901
|
-
if (isContinue) {
|
|
2902
|
-
_this.saveGeneralInformation(payloadValue);
|
|
2903
|
-
return;
|
|
2904
|
-
}
|
|
2905
|
-
_this.isSubmit = false;
|
|
2906
|
-
});
|
|
2907
|
-
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*/];
|
|
2908
2859
|
}
|
|
2860
|
+
bodyReq = new GeneralInformationWAReqModel().clone(__assign({}, this.generalInformationData));
|
|
2861
|
+
payloadValue = bodyReq.convert();
|
|
2862
|
+
this.saveGeneralInformation(payloadValue);
|
|
2863
|
+
return [2 /*return*/];
|
|
2909
2864
|
});
|
|
2910
2865
|
});
|
|
2911
2866
|
};
|