SUPPORT-8810: fix

This commit is contained in:
Alexandr Shalaginov 2024-12-19 08:24:53 +03:00
parent 9f8662c580
commit f18734f057
3 changed files with 15 additions and 9 deletions

View file

@ -51,11 +51,15 @@ export class ConfigExecuteBtn extends AbstractButton {
.map(id => id.trim().replace(/"/g, ''));
let configExecuteRequest: ConfigExecuteRequest = new ConfigExecuteRequest();
let withDate = false;
configExecuteRequest.ids = ids;
configExecuteRequest.startDate = this.startDate ? this.startDate.getDateValue() : null;
configExecuteRequest.endDate = this.endDate ? this.endDate.getDateValue() : null;
if (this.startDate || this.endDate) {
withDate = true;
configExecuteRequest.startDate = this.startDate ? this.startDate.getDateValue() : null;
configExecuteRequest.endDate = this.endDate ? this.endDate.getDateValue() : null;
}
return this.script.callConfigExecutor(this.methodPath, configExecuteRequest, true)
return this.script.callConfigExecutor(this.methodPath, configExecuteRequest, withDate, true)
.then(successMsg => this.messagesService.success(successMsg))
.catch(error => Promise.reject(error));
}