@adlfe/campaign-management-library 2.10.5 → 2.10.6
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 +28 -4
- 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/environments/environment.js +3 -3
- package/esm2015/lib/campaign-management/modules/campaign-index/component/filter-in-list-of-campaign/filter-in-list-of-campaign.component.js +21 -3
- package/esm5/environments/environment.js +3 -3
- package/esm5/lib/campaign-management/modules/campaign-index/component/filter-in-list-of-campaign/filter-in-list-of-campaign.component.js +27 -3
- package/fesm2015/adlfe-campaign-management-library.js +22 -4
- package/fesm2015/adlfe-campaign-management-library.js.map +1 -1
- package/fesm5/adlfe-campaign-management-library.js +28 -4
- package/fesm5/adlfe-campaign-management-library.js.map +1 -1
- package/lib/campaign-management/modules/campaign-index/component/filter-in-list-of-campaign/filter-in-list-of-campaign.component.d.ts +6 -0
- package/package.json +2 -11
|
@@ -850,11 +850,11 @@
|
|
|
850
850
|
}
|
|
851
851
|
// 4. Cek Demo Dev secara spesifik
|
|
852
852
|
else if (origin.includes('demo-dev')) {
|
|
853
|
-
API_CONST = 'https://
|
|
853
|
+
API_CONST = 'https://api-staging.neuapix.com';
|
|
854
854
|
}
|
|
855
855
|
// 5. Default (Localhost atau lainnya)
|
|
856
856
|
else {
|
|
857
|
-
API_CONST = 'https://
|
|
857
|
+
API_CONST = 'https://api-staging.neuapix.com';
|
|
858
858
|
}
|
|
859
859
|
var environment = {
|
|
860
860
|
production: false,
|
|
@@ -1620,8 +1620,11 @@
|
|
|
1620
1620
|
function FilterInListOfCampaignComponent(apiAdapterService) {
|
|
1621
1621
|
this.apiAdapterService = apiAdapterService;
|
|
1622
1622
|
this.channelOption = PlatformOptionConst;
|
|
1623
|
+
this.filteredChannelOption = [];
|
|
1623
1624
|
this.businessNameOption = [];
|
|
1625
|
+
this.filteredBusinessNameOption = [];
|
|
1624
1626
|
this.statusOption = [];
|
|
1627
|
+
this.filteredStatusOption = [];
|
|
1625
1628
|
this.templateOption = [];
|
|
1626
1629
|
this.isHaveNextTemplateOption = true;
|
|
1627
1630
|
this.isLoadingTemplateOption = false;
|
|
@@ -1632,6 +1635,8 @@
|
|
|
1632
1635
|
}
|
|
1633
1636
|
FilterInListOfCampaignComponent.prototype.ngOnInit = function () {
|
|
1634
1637
|
this.statusOption = generateEnumOption(StatusCampaignEnum);
|
|
1638
|
+
this.filteredStatusOption = __spread(this.statusOption);
|
|
1639
|
+
this.filteredChannelOption = __spread(this.channelOption);
|
|
1635
1640
|
this.initForm();
|
|
1636
1641
|
this.getBusinessNameOptionService();
|
|
1637
1642
|
};
|
|
@@ -1656,6 +1661,7 @@
|
|
|
1656
1661
|
.executeApiRequest([], '/admin/client/all-with-child?pageNo=1&rowPerPage=1000', 'GET')
|
|
1657
1662
|
.subscribe(function (res) {
|
|
1658
1663
|
_this.businessNameOption = res.data;
|
|
1664
|
+
_this.filteredBusinessNameOption = __spread(_this.businessNameOption);
|
|
1659
1665
|
});
|
|
1660
1666
|
this.subscribers.push(subs);
|
|
1661
1667
|
};
|
|
@@ -1704,6 +1710,24 @@
|
|
|
1704
1710
|
this.pageNoTemplateOption = 1;
|
|
1705
1711
|
this.getTemplateOptionService(searchValue);
|
|
1706
1712
|
};
|
|
1713
|
+
FilterInListOfCampaignComponent.prototype.businessNameSearch = function (searchValue) {
|
|
1714
|
+
var value = searchValue.toLowerCase();
|
|
1715
|
+
this.filteredBusinessNameOption = this.businessNameOption.filter(function (option) {
|
|
1716
|
+
return option.name.toLowerCase().includes(value);
|
|
1717
|
+
});
|
|
1718
|
+
};
|
|
1719
|
+
FilterInListOfCampaignComponent.prototype.channelSearch = function (searchValue) {
|
|
1720
|
+
var value = searchValue.toLowerCase();
|
|
1721
|
+
this.filteredChannelOption = this.channelOption.filter(function (option) {
|
|
1722
|
+
return option.label.toLowerCase().includes(value);
|
|
1723
|
+
});
|
|
1724
|
+
};
|
|
1725
|
+
FilterInListOfCampaignComponent.prototype.statusSearch = function (searchValue) {
|
|
1726
|
+
var value = searchValue.toLowerCase();
|
|
1727
|
+
this.filteredStatusOption = this.statusOption.filter(function (option) {
|
|
1728
|
+
return option.label.toLowerCase().includes(value);
|
|
1729
|
+
});
|
|
1730
|
+
};
|
|
1707
1731
|
FilterInListOfCampaignComponent.prototype.clearDate = function () {
|
|
1708
1732
|
this.form.get('startDate').setValue(null);
|
|
1709
1733
|
this.form.get('endDate').setValue(null);
|
|
@@ -1742,8 +1766,8 @@
|
|
|
1742
1766
|
FilterInListOfCampaignComponent = __decorate([
|
|
1743
1767
|
core.Component({
|
|
1744
1768
|
selector: 'lib-filter-in-list-of-campaign',
|
|
1745
|
-
template: "<p class=\"font-16px font-bold\">Filter</p>\r\n\r\n<form [formGroup]=\"form\"
|
|
1746
|
-
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)}"]
|
|
1769
|
+
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",
|
|
1770
|
+
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}"]
|
|
1747
1771
|
}),
|
|
1748
1772
|
core.Injectable({
|
|
1749
1773
|
providedIn: 'root',
|