@senior-agronegocio/angular-components 0.0.62 → 0.0.63
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/senior-agronegocio-angular-components.umd.js +34 -49
- package/bundles/senior-agronegocio-angular-components.umd.js.map +1 -1
- package/bundles/senior-agronegocio-angular-components.umd.min.js +1 -1
- package/bundles/senior-agronegocio-angular-components.umd.min.js.map +1 -1
- package/components/event-control-board/event-control-board.component.d.ts +3 -3
- package/components/event-control-board/service/event-control/event-control.service.d.ts +20 -0
- package/esm2015/components/event-control-board/event-control-board.component.js +31 -46
- package/esm2015/components/event-control-board/service/event-control/event-control.service.js +5 -1
- package/esm5/components/event-control-board/event-control-board.component.js +32 -51
- package/esm5/components/event-control-board/service/event-control/event-control.service.js +5 -1
- package/fesm2015/senior-agronegocio-angular-components.js +34 -45
- package/fesm2015/senior-agronegocio-angular-components.js.map +1 -1
- package/fesm5/senior-agronegocio-angular-components.js +34 -49
- package/fesm5/senior-agronegocio-angular-components.js.map +1 -1
- package/package.json +1 -1
|
@@ -4498,6 +4498,10 @@
|
|
|
4498
4498
|
_this.translate = translate;
|
|
4499
4499
|
return _this;
|
|
4500
4500
|
}
|
|
4501
|
+
EventControlService.prototype.getListEventControlWithFilters = function (listParams) {
|
|
4502
|
+
return this.http.post(this.queriesUrl + "/listEventControlWithFilters", listParams)
|
|
4503
|
+
.pipe(this.defaultCatch());
|
|
4504
|
+
};
|
|
4501
4505
|
EventControlService.ctorParameters = function () { return [
|
|
4502
4506
|
{ type: http.HttpClient },
|
|
4503
4507
|
{ type: api.MessageService },
|
|
@@ -4794,11 +4798,10 @@
|
|
|
4794
4798
|
if (listParams === void 0) { listParams = {}; }
|
|
4795
4799
|
this.currentListParams = __assign(__assign({}, this.currentListParams), listParams);
|
|
4796
4800
|
var _a = this.currentListParams, page = _a.page, size = _a.size;
|
|
4797
|
-
var
|
|
4798
|
-
var
|
|
4799
|
-
var displayFields = ["*", "eventControlItem"];
|
|
4801
|
+
var order = this.getSortedFields();
|
|
4802
|
+
var input = __assign(__assign({}, this.getInput()), { page: page, size: size, order: order });
|
|
4800
4803
|
this.eventControlBoardService.eventControlService
|
|
4801
|
-
.
|
|
4804
|
+
.getListEventControlWithFilters(input)
|
|
4802
4805
|
.pipe(operators.takeUntil(this.ngUnsubscribe), operators.catchError(function (err) {
|
|
4803
4806
|
_this.gridLoading = false;
|
|
4804
4807
|
throw err;
|
|
@@ -4864,38 +4867,35 @@
|
|
|
4864
4867
|
EventControlBoardComponent.prototype.getSortedFields = function () {
|
|
4865
4868
|
var _this = this;
|
|
4866
4869
|
var _a;
|
|
4867
|
-
var
|
|
4870
|
+
var order = '';
|
|
4868
4871
|
if (((_a = this.currentListParams.sort) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
});
|
|
4872
|
+
order = this.currentListParams.sort.map(function (sortItem) {
|
|
4873
|
+
return _this.getFieldNameForSortRequest(sortItem.field) + " " + (sortItem.order === exports.AGRO_NUMBERS.ONE ? 'asc' : 'desc');
|
|
4874
|
+
}).join(', ');
|
|
4873
4875
|
}
|
|
4874
4876
|
else if (this.standalone) {
|
|
4875
|
-
|
|
4877
|
+
order = 'createdDate asc';
|
|
4876
4878
|
}
|
|
4877
4879
|
else {
|
|
4878
|
-
|
|
4880
|
+
order = 'lastModifiedDate desc';
|
|
4879
4881
|
}
|
|
4880
|
-
return
|
|
4882
|
+
return order;
|
|
4881
4883
|
};
|
|
4882
|
-
EventControlBoardComponent.prototype.
|
|
4883
|
-
var
|
|
4884
|
+
EventControlBoardComponent.prototype.getInput = function () {
|
|
4885
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4884
4886
|
var filterData = this.currentListParams.filterData;
|
|
4885
|
-
var
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
.filter(function (filter) { return filter !== null && filter !== '' && filter !== undefined; })
|
|
4898
|
-
.join(' and ');
|
|
4887
|
+
var controlCode = filterData['controlCode'] && Array.isArray(filterData['controlCode']) ? filterData['controlCode'] : null;
|
|
4888
|
+
var filter = {
|
|
4889
|
+
companyId: (_b = (_a = filterData['e070emp']) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null,
|
|
4890
|
+
branchId: (_d = (_c = filterData['e070fil']) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : null,
|
|
4891
|
+
controlCode: controlCode ? controlCode.map(function (code) { return parseInt(code); }) : null,
|
|
4892
|
+
externalId: (_e = filterData['externalId']) !== null && _e !== void 0 ? _e : null,
|
|
4893
|
+
eventOrigin: (_f = filterData['eventOrigin']) !== null && _f !== void 0 ? _f : null,
|
|
4894
|
+
eventStatus: (_g = filterData['status']) !== null && _g !== void 0 ? _g : null,
|
|
4895
|
+
createdDateStart: filterData['createdDate'] ? this.getStartDate(filterData['createdDate']) : null,
|
|
4896
|
+
createdDateEnd: filterData['createdDate'] ? this.getEndDate(filterData['createdDate']) : null,
|
|
4897
|
+
};
|
|
4898
|
+
return filter;
|
|
4899
4899
|
};
|
|
4900
4900
|
EventControlBoardComponent.prototype.getFieldNameForSortRequest = function (name) {
|
|
4901
4901
|
switch (name) {
|
|
@@ -4907,28 +4907,13 @@
|
|
|
4907
4907
|
return name;
|
|
4908
4908
|
}
|
|
4909
4909
|
};
|
|
4910
|
-
EventControlBoardComponent.prototype.
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
var filterParts_1 = [];
|
|
4914
|
-
value.forEach(function (val) { return filterParts_1.push("controlCode eq '" + val + "'"); });
|
|
4915
|
-
return "(" + filterParts_1.join(' or ') + ")";
|
|
4916
|
-
}
|
|
4917
|
-
if (name === 'status') {
|
|
4918
|
-
return "eventControlItem.status eq '" + value + "'";
|
|
4919
|
-
}
|
|
4920
|
-
return this.createFilterStringFromType(name, type, value, lookupFieldName);
|
|
4910
|
+
EventControlBoardComponent.prototype.getEndDate = function (value) {
|
|
4911
|
+
var endDate = moment(value).endOf('day').format("YYYY-MM-DDTHH:mm:ss") + 'Z';
|
|
4912
|
+
return endDate;
|
|
4921
4913
|
};
|
|
4922
|
-
EventControlBoardComponent.prototype.
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
}
|
|
4926
|
-
if (type === angularComponents.FieldType.Date) {
|
|
4927
|
-
var startOfDay = moment(value).startOf('day').format("YYYY-MM-DDTHH:mm:ss") + 'Z';
|
|
4928
|
-
var endOfDay = moment(value).endOf('day').format("YYYY-MM-DDTHH:mm:ss") + 'Z';
|
|
4929
|
-
return name + " ge '" + startOfDay + "' and " + name + " le '" + endOfDay + "'";
|
|
4930
|
-
}
|
|
4931
|
-
return name + " eq '" + value + "'";
|
|
4914
|
+
EventControlBoardComponent.prototype.getStartDate = function (value) {
|
|
4915
|
+
var startDate = moment(value).startOf('day').format("YYYY-MM-DDTHH:mm:ss") + 'Z';
|
|
4916
|
+
return startDate;
|
|
4932
4917
|
};
|
|
4933
4918
|
EventControlBoardComponent.prototype.onGridChange = function (event) {
|
|
4934
4919
|
var size = event === null || event === void 0 ? void 0 : event.rows;
|