@po-ui/ng-templates 5.21.0 → 5.22.0
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/po-ui-ng-templates.umd.js +167 -29
- package/bundles/po-ui-ng-templates.umd.js.map +1 -1
- package/esm2015/lib/components/po-page-job-scheduler/interfaces/po-job-scheduler-internal.interface.js +1 -1
- package/esm2015/lib/components/po-page-job-scheduler/po-page-job-scheduler-base.component.js +7 -3
- package/esm2015/lib/components/po-page-job-scheduler/po-page-job-scheduler-execution/po-page-job-scheduler-execution.component.js +44 -3
- package/esm2015/lib/components/po-page-job-scheduler/po-page-job-scheduler-internal.js +2 -1
- package/esm2015/lib/components/po-page-job-scheduler/po-page-job-scheduler-literals.js +43 -7
- package/esm2015/lib/components/po-page-job-scheduler/po-page-job-scheduler-summary/po-page-job-scheduler-summary.component.js +26 -15
- package/esm2015/lib/components/po-page-job-scheduler/po-page-job-scheduler.service.js +39 -6
- package/fesm2015/po-ui-ng-templates.js +155 -29
- package/fesm2015/po-ui-ng-templates.js.map +1 -1
- package/lib/components/po-page-job-scheduler/interfaces/po-job-scheduler-internal.interface.d.ts +3 -0
- package/lib/components/po-page-job-scheduler/po-page-job-scheduler-base.component.d.ts +10 -5
- package/lib/components/po-page-job-scheduler/po-page-job-scheduler-execution/po-page-job-scheduler-execution.component.d.ts +10 -0
- package/lib/components/po-page-job-scheduler/po-page-job-scheduler-internal.d.ts +1 -0
- package/lib/components/po-page-job-scheduler/po-page-job-scheduler-literals.d.ts +36 -0
- package/lib/components/po-page-job-scheduler/po-page-job-scheduler-summary/po-page-job-scheduler-summary.component.d.ts +4 -0
- package/lib/components/po-page-job-scheduler/po-page-job-scheduler.component.d.ts +9 -0
- package/lib/components/po-page-job-scheduler/po-page-job-scheduler.service.d.ts +4 -2
- package/package.json +4 -4
- package/po-ui-ng-templates-5.22.0.tgz +0 -0
- package/po-ui-ng-templates.metadata.json +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/po-ui-ng-templates-5.21.0.tgz +0 -0
|
@@ -5607,6 +5607,7 @@
|
|
|
5607
5607
|
this.firstExecution = new Date();
|
|
5608
5608
|
this.firstExecutionHour = this.getCurrentHour(this.firstExecution);
|
|
5609
5609
|
this.recurrent = true;
|
|
5610
|
+
this.frequency = {};
|
|
5610
5611
|
}
|
|
5611
5612
|
PoPageJobSchedulerInternal.prototype.getCurrentHour = function (date) {
|
|
5612
5613
|
var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
|
|
@@ -5630,8 +5631,8 @@
|
|
|
5630
5631
|
};
|
|
5631
5632
|
// Cria um recurso
|
|
5632
5633
|
PoPageJobSchedulerService.prototype.createResource = function (resource) {
|
|
5633
|
-
var
|
|
5634
|
-
return this.http.post("" + this.endpoint,
|
|
5634
|
+
var newResouce = this.convertToJobScheduler(resource);
|
|
5635
|
+
return this.http.post("" + this.endpoint, newResouce, { headers: this.headers });
|
|
5635
5636
|
};
|
|
5636
5637
|
PoPageJobSchedulerService.prototype.getHeadProcesses = function () {
|
|
5637
5638
|
var headers = { 'X-PO-No-Error': 'true' };
|
|
@@ -5661,8 +5662,8 @@
|
|
|
5661
5662
|
};
|
|
5662
5663
|
// Atualiza um recurso
|
|
5663
5664
|
PoPageJobSchedulerService.prototype.updateResource = function (id, resource) {
|
|
5664
|
-
var
|
|
5665
|
-
return this.http.put(this.endpoint + "/" + id,
|
|
5665
|
+
var newResouce = this.convertToJobScheduler(resource);
|
|
5666
|
+
return this.http.put(this.endpoint + "/" + id, newResouce, { headers: this.headers });
|
|
5666
5667
|
};
|
|
5667
5668
|
PoPageJobSchedulerService.prototype.convertToJobScheduler = function (jobSchedulerInternal) {
|
|
5668
5669
|
var jobScheduler = Object.assign({}, jobSchedulerInternal);
|
|
@@ -5677,6 +5678,21 @@
|
|
|
5677
5678
|
if (jobSchedulerInternal.firstExecutionHour) {
|
|
5678
5679
|
jobScheduler.firstExecution = this.replaceHourFirstExecution(jobSchedulerInternal.firstExecution, jobSchedulerInternal.firstExecutionHour);
|
|
5679
5680
|
}
|
|
5681
|
+
if (jobSchedulerInternal.frequency && jobSchedulerInternal.frequency.type) {
|
|
5682
|
+
jobScheduler.rangeExecutions = {
|
|
5683
|
+
frequency: Object.assign({}, jobSchedulerInternal.frequency)
|
|
5684
|
+
};
|
|
5685
|
+
if (jobSchedulerInternal.rangeLimitHour) {
|
|
5686
|
+
var splitRangeLimitHour = jobSchedulerInternal.rangeLimitHour.split(':');
|
|
5687
|
+
jobScheduler.rangeExecutions.rangeLimit = {
|
|
5688
|
+
hour: parseInt(splitRangeLimitHour[0], 10),
|
|
5689
|
+
minute: parseInt(splitRangeLimitHour[1], 10)
|
|
5690
|
+
};
|
|
5691
|
+
}
|
|
5692
|
+
if (jobSchedulerInternal.rangeLimitDay) {
|
|
5693
|
+
jobScheduler.rangeExecutions.rangeLimit = Object.assign(Object.assign({}, jobScheduler.rangeExecutions.rangeLimit), { day: jobSchedulerInternal.rangeLimitDay });
|
|
5694
|
+
}
|
|
5695
|
+
}
|
|
5680
5696
|
if (!Object.keys(this.returnValidExecutionParameter(jobScheduler.executionParameter)).length) {
|
|
5681
5697
|
delete jobScheduler.executionParameter;
|
|
5682
5698
|
}
|
|
@@ -5690,6 +5706,18 @@
|
|
|
5690
5706
|
jobSchedulerInternal.firstExecutionHour = this.getHourFirstExecution(jobScheduler.firstExecution);
|
|
5691
5707
|
}
|
|
5692
5708
|
Object.assign(jobSchedulerInternal, this.convertToPeriodicityInternal(jobScheduler));
|
|
5709
|
+
if (jobScheduler.rangeExecutions) {
|
|
5710
|
+
jobSchedulerInternal.rangeLimitHour = (jobScheduler.rangeExecutions.rangeLimit.hour < 10
|
|
5711
|
+
? '0' + jobScheduler.rangeExecutions.rangeLimit.hour
|
|
5712
|
+
: jobScheduler.rangeExecutions.rangeLimit.hour) + ":" + (jobScheduler.rangeExecutions.rangeLimit.minute < 10
|
|
5713
|
+
? '0' + jobScheduler.rangeExecutions.rangeLimit.minute
|
|
5714
|
+
: jobScheduler.rangeExecutions.rangeLimit.minute);
|
|
5715
|
+
jobSchedulerInternal.rangeLimitDay = jobScheduler.rangeExecutions.rangeLimit.day;
|
|
5716
|
+
jobSchedulerInternal.frequency = {
|
|
5717
|
+
type: jobScheduler.rangeExecutions.frequency.type,
|
|
5718
|
+
value: jobScheduler.rangeExecutions.frequency.value
|
|
5719
|
+
};
|
|
5720
|
+
}
|
|
5693
5721
|
this.removeInvalidKeys(jobSchedulerInternal, ['weekly', 'monthly', 'daily']);
|
|
5694
5722
|
return jobSchedulerInternal;
|
|
5695
5723
|
};
|
|
@@ -5753,12 +5781,18 @@
|
|
|
5753
5781
|
'day',
|
|
5754
5782
|
'daysOfWeek',
|
|
5755
5783
|
'dayOfMonth',
|
|
5756
|
-
'firstExecutionHour'
|
|
5784
|
+
'firstExecutionHour',
|
|
5785
|
+
'frequency',
|
|
5786
|
+
'rangeLimitHour',
|
|
5787
|
+
'rangeLimitDay'
|
|
5757
5788
|
];
|
|
5758
5789
|
Object.keys(value).forEach(function (key) {
|
|
5759
5790
|
if (invalidKeys.includes(key)) {
|
|
5760
5791
|
delete value[key];
|
|
5761
5792
|
}
|
|
5793
|
+
else if (key === 'rangeExecutions' && value['periodicity'] === 'single') {
|
|
5794
|
+
delete value[key];
|
|
5795
|
+
}
|
|
5762
5796
|
});
|
|
5763
5797
|
};
|
|
5764
5798
|
PoPageJobSchedulerService.prototype.replaceHourFirstExecution = function (date, time) {
|
|
@@ -5813,13 +5847,20 @@
|
|
|
5813
5847
|
this.model = new PoPageJobSchedulerInternal();
|
|
5814
5848
|
this._subscription = new rxjs.Subscription();
|
|
5815
5849
|
}
|
|
5850
|
+
Object.defineProperty(PoPageJobSchedulerBaseComponent.prototype, "value", {
|
|
5851
|
+
set: function (value) {
|
|
5852
|
+
this.model = this.poPageJobSchedulerService.convertToJobSchedulerInternal(value);
|
|
5853
|
+
},
|
|
5854
|
+
enumerable: false,
|
|
5855
|
+
configurable: true
|
|
5856
|
+
});
|
|
5816
5857
|
PoPageJobSchedulerBaseComponent.prototype.ngOnDestroy = function () {
|
|
5817
5858
|
this._subscription.unsubscribe();
|
|
5818
5859
|
};
|
|
5819
5860
|
PoPageJobSchedulerBaseComponent.prototype.loadData = function (id) {
|
|
5820
5861
|
var _this = this;
|
|
5821
5862
|
if (!id) {
|
|
5822
|
-
this.model = new PoPageJobSchedulerInternal();
|
|
5863
|
+
this.model = this.model || new PoPageJobSchedulerInternal();
|
|
5823
5864
|
return;
|
|
5824
5865
|
}
|
|
5825
5866
|
this._subscription.add(this.poPageJobSchedulerService.getResource(id).subscribe(function (response) {
|
|
@@ -5850,7 +5891,8 @@
|
|
|
5850
5891
|
breadcrumb: [{ type: i0.Input, args: ['p-breadcrumb',] }],
|
|
5851
5892
|
serviceApi: [{ type: i0.Input, args: ['p-service-api',] }],
|
|
5852
5893
|
title: [{ type: i0.Input, args: ['p-title',] }],
|
|
5853
|
-
parameters: [{ type: i0.Input, args: ['p-parameters',] }]
|
|
5894
|
+
parameters: [{ type: i0.Input, args: ['p-parameters',] }],
|
|
5895
|
+
value: [{ type: i0.Input, args: ['p-value',] }]
|
|
5854
5896
|
};
|
|
5855
5897
|
|
|
5856
5898
|
var poPageJobSchedulerLiteralsDefault = {
|
|
@@ -5871,8 +5913,14 @@
|
|
|
5871
5913
|
parameterization: 'Parameterization',
|
|
5872
5914
|
conclude: 'Conclude',
|
|
5873
5915
|
firstExecution: 'First Execution',
|
|
5916
|
+
startTime: 'Start time',
|
|
5917
|
+
endTime: 'End time',
|
|
5918
|
+
time: 'Time',
|
|
5874
5919
|
hour: 'Hour',
|
|
5920
|
+
minute: 'Minute',
|
|
5875
5921
|
day: 'Day',
|
|
5922
|
+
endDay: 'End day',
|
|
5923
|
+
startDay: 'Start day',
|
|
5876
5924
|
weekDays: 'Week days',
|
|
5877
5925
|
sunday: 'Sunday',
|
|
5878
5926
|
monday: 'Monday',
|
|
@@ -5891,7 +5939,10 @@
|
|
|
5891
5939
|
confirmUpdateMessage: 'Are you sure you want to update this schedule?',
|
|
5892
5940
|
saveNotificationSuccessUpdate: 'Successfully updated scheduling',
|
|
5893
5941
|
saveNotificationSuccessSave: 'Successfully saved scheduling',
|
|
5894
|
-
parametersNotFound: 'Parameters not found.'
|
|
5942
|
+
parametersNotFound: 'Parameters not found.',
|
|
5943
|
+
frequency: 'Frequency',
|
|
5944
|
+
to: 'to',
|
|
5945
|
+
from: 'from'
|
|
5895
5946
|
},
|
|
5896
5947
|
es: {
|
|
5897
5948
|
at: 'a las',
|
|
@@ -5910,8 +5961,14 @@
|
|
|
5910
5961
|
parameterization: 'Parametrización',
|
|
5911
5962
|
conclude: 'Completar',
|
|
5912
5963
|
firstExecution: 'Primera ejecución',
|
|
5913
|
-
|
|
5964
|
+
startTime: 'Hora de inicio',
|
|
5965
|
+
endTime: 'Hora de finalización',
|
|
5966
|
+
time: 'Horário',
|
|
5967
|
+
hour: 'Hora',
|
|
5968
|
+
minute: 'Minute',
|
|
5914
5969
|
day: 'Día',
|
|
5970
|
+
endDay: 'Último Día',
|
|
5971
|
+
startDay: 'Día de inicio',
|
|
5915
5972
|
weekDays: 'Dias de la semana',
|
|
5916
5973
|
sunday: 'Domingo',
|
|
5917
5974
|
monday: 'Lunes',
|
|
@@ -5930,7 +5987,10 @@
|
|
|
5930
5987
|
confirmUpdateMessage: '¿Está seguro de que desea cambiar esta programación de proceso?',
|
|
5931
5988
|
saveNotificationSuccessUpdate: 'Programación de proceso actualizada con éxito.',
|
|
5932
5989
|
saveNotificationSuccessSave: 'Programación de proceso salvo con éxito.',
|
|
5933
|
-
parametersNotFound: 'No se encontraron parámetros.'
|
|
5990
|
+
parametersNotFound: 'No se encontraron parámetros.',
|
|
5991
|
+
frequency: 'Frecuencia',
|
|
5992
|
+
to: 'de',
|
|
5993
|
+
from: 'a'
|
|
5934
5994
|
},
|
|
5935
5995
|
pt: {
|
|
5936
5996
|
at: 'às',
|
|
@@ -5949,8 +6009,14 @@
|
|
|
5949
6009
|
parameterization: 'Parametrização',
|
|
5950
6010
|
conclude: 'Concluir',
|
|
5951
6011
|
firstExecution: 'Primeira execução',
|
|
5952
|
-
|
|
6012
|
+
startTime: 'Horário inicial',
|
|
6013
|
+
endTime: 'Horário final',
|
|
6014
|
+
time: 'Horário',
|
|
6015
|
+
hour: 'Hora',
|
|
6016
|
+
minute: 'Minuto',
|
|
5953
6017
|
day: 'Dia',
|
|
6018
|
+
endDay: 'Dia final',
|
|
6019
|
+
startDay: 'Dia inicial',
|
|
5954
6020
|
weekDays: 'Dias de semana',
|
|
5955
6021
|
sunday: 'Domingo',
|
|
5956
6022
|
monday: 'Segunda-feira',
|
|
@@ -5969,7 +6035,10 @@
|
|
|
5969
6035
|
confirmUpdateMessage: 'Tem certeza que deseja alterar este agendamento de processo?',
|
|
5970
6036
|
saveNotificationSuccessUpdate: 'Agendamento de processo atualizado com sucesso.',
|
|
5971
6037
|
saveNotificationSuccessSave: 'Agendamento de processo salvo com sucesso.',
|
|
5972
|
-
parametersNotFound: 'Parâmetros não foram encontrados.'
|
|
6038
|
+
parametersNotFound: 'Parâmetros não foram encontrados.',
|
|
6039
|
+
frequency: 'Frequência',
|
|
6040
|
+
to: 'das',
|
|
6041
|
+
from: 'até'
|
|
5973
6042
|
},
|
|
5974
6043
|
ru: {
|
|
5975
6044
|
at: 'в',
|
|
@@ -5988,8 +6057,14 @@
|
|
|
5988
6057
|
parameterization: 'Параметризация',
|
|
5989
6058
|
conclude: 'Завершить',
|
|
5990
6059
|
firstExecution: 'Первичное выполнение',
|
|
6060
|
+
startTime: 'начальное время',
|
|
6061
|
+
endTime: 'время окончания',
|
|
6062
|
+
time: 'расписание',
|
|
5991
6063
|
hour: 'Час',
|
|
5992
6064
|
day: 'День',
|
|
6065
|
+
minute: 'минута',
|
|
6066
|
+
endDay: 'последний день',
|
|
6067
|
+
startDay: 'день начала',
|
|
5993
6068
|
weekDays: 'Рабочие дни',
|
|
5994
6069
|
sunday: 'Воскресенье',
|
|
5995
6070
|
monday: 'Понедельник',
|
|
@@ -6008,7 +6083,10 @@
|
|
|
6008
6083
|
confirmUpdateMessage: 'Вы уверены, что хотите обновить это расписание?',
|
|
6009
6084
|
saveNotificationSuccessUpdate: 'Расписание успешно обновлено',
|
|
6010
6085
|
saveNotificationSuccessSave: 'Расписание успешно сохранено ',
|
|
6011
|
-
parametersNotFound: 'Параметры не найдены'
|
|
6086
|
+
parametersNotFound: 'Параметры не найдены',
|
|
6087
|
+
frequency: 'Частота',
|
|
6088
|
+
to: 'с',
|
|
6089
|
+
from: 'до'
|
|
6012
6090
|
}
|
|
6013
6091
|
};
|
|
6014
6092
|
|
|
@@ -6271,6 +6349,9 @@
|
|
|
6271
6349
|
this.periodicityOptions = [];
|
|
6272
6350
|
this.timePattern = '^(2[0-3]|[01][0-9]):?([0-5][0-9])$';
|
|
6273
6351
|
this.weekDays = [];
|
|
6352
|
+
this.frequencyOptions = [];
|
|
6353
|
+
this.containsFrequency = false;
|
|
6354
|
+
this.frequency = 'hour';
|
|
6274
6355
|
this._value = {};
|
|
6275
6356
|
}
|
|
6276
6357
|
Object.defineProperty(PoPageJobSchedulerExecutionComponent.prototype, "value", {
|
|
@@ -6279,6 +6360,7 @@
|
|
|
6279
6360
|
},
|
|
6280
6361
|
set: function (value) {
|
|
6281
6362
|
this._value = value && isTypeof(value, 'object') ? value : {};
|
|
6363
|
+
this.containsFrequency = this._value.frequency && this._value.frequency.value ? true : false;
|
|
6282
6364
|
},
|
|
6283
6365
|
enumerable: false,
|
|
6284
6366
|
configurable: true
|
|
@@ -6290,10 +6372,27 @@
|
|
|
6290
6372
|
enumerable: false,
|
|
6291
6373
|
configurable: true
|
|
6292
6374
|
});
|
|
6375
|
+
Object.defineProperty(PoPageJobSchedulerExecutionComponent.prototype, "hourLabel", {
|
|
6376
|
+
get: function () {
|
|
6377
|
+
return this.containsFrequency ? this.literals.startTime : this.literals.time;
|
|
6378
|
+
},
|
|
6379
|
+
enumerable: false,
|
|
6380
|
+
configurable: true
|
|
6381
|
+
});
|
|
6382
|
+
Object.defineProperty(PoPageJobSchedulerExecutionComponent.prototype, "dayLabel", {
|
|
6383
|
+
get: function () {
|
|
6384
|
+
return this.containsFrequency ? this.literals.startDay : this.literals.day;
|
|
6385
|
+
},
|
|
6386
|
+
enumerable: false,
|
|
6387
|
+
configurable: true
|
|
6388
|
+
});
|
|
6293
6389
|
PoPageJobSchedulerExecutionComponent.prototype.ngAfterViewInit = function () {
|
|
6294
6390
|
var _this = this;
|
|
6295
6391
|
setTimeout(function () {
|
|
6296
6392
|
_this.subscribeProcessIdValueChanges();
|
|
6393
|
+
if (_this.value.periodicity) {
|
|
6394
|
+
_this.frequencyOptions = _this.frequencyOptions.map(function (frequencyOption) { return (Object.assign(Object.assign({}, frequencyOption), { disabled: frequencyOption.value === 'day' && _this.value.periodicity !== 'monthly' })); });
|
|
6395
|
+
}
|
|
6297
6396
|
});
|
|
6298
6397
|
};
|
|
6299
6398
|
PoPageJobSchedulerExecutionComponent.prototype.ngOnInit = function () {
|
|
@@ -6302,9 +6401,30 @@
|
|
|
6302
6401
|
monthly: this.monthlyTemplate,
|
|
6303
6402
|
weekly: this.weeklyTempalte
|
|
6304
6403
|
};
|
|
6305
|
-
this.
|
|
6404
|
+
if (this.noParameters) {
|
|
6405
|
+
this.checkExistsProcessesAPI();
|
|
6406
|
+
}
|
|
6306
6407
|
this.periodicityOptions = this.getPeriodicityOptions();
|
|
6307
6408
|
this.weekDays = this.getWeekDays();
|
|
6409
|
+
this.frequencyOptions = this.getFrequencyOptions();
|
|
6410
|
+
};
|
|
6411
|
+
PoPageJobSchedulerExecutionComponent.prototype.onChangeContainsFrequency = function (containsFrequency) {
|
|
6412
|
+
if (containsFrequency) {
|
|
6413
|
+
this.value.frequency = { type: 'hour', value: null };
|
|
6414
|
+
}
|
|
6415
|
+
else {
|
|
6416
|
+
this.value.frequency = {};
|
|
6417
|
+
}
|
|
6418
|
+
this.value.rangeLimitHour = null;
|
|
6419
|
+
this.value.rangeLimitDay = null;
|
|
6420
|
+
this.value.dayOfMonth = null;
|
|
6421
|
+
};
|
|
6422
|
+
PoPageJobSchedulerExecutionComponent.prototype.onChangePeriodicityOptions = function (periodicity) {
|
|
6423
|
+
this.frequencyOptions = this.frequencyOptions.map(function (frequencyOption) { return (Object.assign(Object.assign({}, frequencyOption), { disabled: frequencyOption.value === 'day' && periodicity !== 'monthly' })); });
|
|
6424
|
+
this.value.frequency.type = null;
|
|
6425
|
+
};
|
|
6426
|
+
PoPageJobSchedulerExecutionComponent.prototype.onChangeFrequencyOptions = function () {
|
|
6427
|
+
this.value.rangeLimitHour = null;
|
|
6308
6428
|
};
|
|
6309
6429
|
PoPageJobSchedulerExecutionComponent.prototype.checkExistsProcessesAPI = function () {
|
|
6310
6430
|
var _this = this;
|
|
@@ -6320,6 +6440,13 @@
|
|
|
6320
6440
|
{ label: this.literals.monthly, value: 'monthly' }
|
|
6321
6441
|
];
|
|
6322
6442
|
};
|
|
6443
|
+
PoPageJobSchedulerExecutionComponent.prototype.getFrequencyOptions = function () {
|
|
6444
|
+
return [
|
|
6445
|
+
{ label: this.literals.day, value: 'day' },
|
|
6446
|
+
{ label: this.literals.hour, value: 'hour' },
|
|
6447
|
+
{ label: this.literals.minute, value: 'minute' }
|
|
6448
|
+
];
|
|
6449
|
+
};
|
|
6323
6450
|
PoPageJobSchedulerExecutionComponent.prototype.getWeekDays = function () {
|
|
6324
6451
|
return [
|
|
6325
6452
|
{ label: this.literals.sunday, value: 'Sunday' },
|
|
@@ -6343,7 +6470,7 @@
|
|
|
6343
6470
|
PoPageJobSchedulerExecutionComponent.decorators = [
|
|
6344
6471
|
{ type: i0.Component, args: [{
|
|
6345
6472
|
selector: 'po-page-job-scheduler-execution',
|
|
6346
|
-
template: "<form #formExecution=\"ngForm\">\n <div class=\"po-row\">\n <ng-container *ngIf=\"existProcessAPI; then lookupProcessesID; else inputProcessesID\"></ng-container>\n </div>\n\n <div class=\"po-row\">\n <po-divider class=\"po-md-12\" [p-label]=\"literals.firstExecution\"></po-divider>\n\n <po-datepicker\n class=\"po-md-4\"\n name=\"firstExecution\"\n [(ngModel)]=\"value.firstExecution\"\n p-placeholder=\"dd/mm/aaaa\"\n p-required\n [p-disabled]=\"isEdit\"\n [p-label]=\"literals.day\"\n [p-min-date]=\"startDateFirstExecution\"\n >\n </po-datepicker>\n\n <po-input\n class=\"po-md-2\"\n name=\"firstExecutionHour\"\n [(ngModel)]=\"value.firstExecutionHour\"\n p-mask=\"99:99\"\n p-mask-format-model\n p-placeholder=\"HH:mm\"\n p-required\n [p-disabled]=\"isEdit\"\n [p-label]=\"literals.
|
|
6473
|
+
template: "<form #formExecution=\"ngForm\">\n <div class=\"po-row\">\n <ng-container *ngIf=\"existProcessAPI; then lookupProcessesID; else inputProcessesID\"></ng-container>\n </div>\n\n <div class=\"po-row\">\n <po-divider class=\"po-md-12\" [p-label]=\"literals.firstExecution\"></po-divider>\n\n <po-datepicker\n class=\"po-md-4\"\n name=\"firstExecution\"\n [(ngModel)]=\"value.firstExecution\"\n p-placeholder=\"dd/mm/aaaa\"\n p-required\n [p-disabled]=\"isEdit\"\n [p-label]=\"literals.day\"\n [p-min-date]=\"startDateFirstExecution\"\n >\n </po-datepicker>\n\n <po-input\n class=\"po-md-2\"\n name=\"firstExecutionHour\"\n [(ngModel)]=\"value.firstExecutionHour\"\n p-mask=\"99:99\"\n p-mask-format-model\n p-placeholder=\"HH:mm\"\n p-required\n [p-disabled]=\"isEdit\"\n [p-label]=\"literals.time\"\n [p-pattern]=\"timePattern\"\n >\n </po-input>\n </div>\n\n <hr />\n\n <div class=\"po-row\">\n <po-radio-group\n class=\"po-sm-12\"\n name=\"periodicity\"\n [(ngModel)]=\"value.periodicity\"\n p-columns=\"4\"\n p-required\n [p-label]=\"literals.periodicity\"\n [p-options]=\"periodicityOptions\"\n (p-change)=\"onChangePeriodicityOptions($event)\"\n >\n </po-radio-group>\n\n <ng-container *ngIf=\"value.periodicity !== 'single'\">\n <div class=\"po-row\">\n <po-switch\n class=\"po-md-12\"\n name=\"containsFrequency\"\n [(ngModel)]=\"containsFrequency\"\n [p-label]=\"literals.frequency\"\n [p-label-off]=\"literals.no\"\n [p-label-on]=\"literals.yes\"\n (p-change)=\"onChangeContainsFrequency($event)\"\n >\n </po-switch>\n <ng-container *ngIf=\"containsFrequency\">\n <po-radio-group\n class=\"po-md-10\"\n name=\"frequencyType\"\n p-required\n [(ngModel)]=\"value.frequency.type\"\n [p-columns]=\"3\"\n [p-options]=\"frequencyOptions\"\n (p-change)=\"onChangeFrequencyOptions()\"\n >\n </po-radio-group>\n\n <po-number class=\"po-md-2\" name=\"frequencyValue\" p-required [(ngModel)]=\"value.frequency.value\"> </po-number>\n </ng-container>\n </div>\n\n <div class=\"po-row\">\n <po-divider class=\"po-md-12\" [p-label]=\"literals.periodicityData\"> </po-divider>\n\n <ng-container *ngTemplateOutlet=\"periodicityTemplates[value.periodicity]\"> </ng-container>\n </div>\n\n <div class=\"po-row\">\n <po-switch\n class=\"po-md-3\"\n name=\"recurrent\"\n [(ngModel)]=\"value.recurrent\"\n [p-label]=\"literals.recurrent\"\n [p-label-off]=\"literals.no\"\n [p-label-on]=\"literals.yes\"\n >\n </po-switch>\n </div>\n </ng-container>\n </div>\n\n <ng-template #lookupProcessesID>\n <po-lookup\n *ngIf=\"noParameters\"\n class=\"po-md-12\"\n name=\"processID\"\n [(ngModel)]=\"value.processID\"\n p-field-label=\"description\"\n p-field-value=\"processID\"\n p-required\n [p-disabled]=\"isEdit\"\n [p-filter-service]=\"poPageJobSchedulerLookup\"\n [p-label]=\"literals.process\"\n [p-placeholder]=\"literals.enterProcess\"\n >\n </po-lookup>\n </ng-template>\n\n <ng-template #inputProcessesID>\n <po-input\n class=\"po-md-12\"\n name=\"processID\"\n [(ngModel)]=\"value.processID\"\n p-required\n [p-disabled]=\"isEdit\"\n [p-label]=\"literals.process\"\n [p-placeholder]=\"literals.enterProcess\"\n >\n </po-input>\n </ng-template>\n\n <ng-template #dailyTemplate>\n <ng-container *ngTemplateOutlet=\"inputHourTemplate\"> </ng-container>\n </ng-template>\n\n <ng-template #weeklyTemplate>\n <div class=\"po-row\">\n <ng-container *ngTemplateOutlet=\"inputHourTemplate\"> </ng-container>\n </div>\n\n <po-checkbox-group\n class=\"po-md-12\"\n name=\"daysOfWeek\"\n [(ngModel)]=\"value.daysOfWeek\"\n p-columns=\"4\"\n p-required\n [p-label]=\"literals.weekDays\"\n [p-options]=\"weekDays\"\n >\n </po-checkbox-group>\n </ng-template>\n\n <ng-template #monthlyTemplate>\n <po-number\n class=\"po-md-3\"\n name=\"dayOfMonth\"\n [(ngModel)]=\"value.dayOfMonth\"\n p-required\n [p-error-pattern]=\"'Dia inv\u00E1lido'\"\n [p-label]=\"dayLabel\"\n [p-max]=\"31\"\n [p-pattern]=\"dayPattern\"\n >\n </po-number>\n\n <po-number\n *ngIf=\"containsFrequency\"\n class=\"po-md-3\"\n name=\"rangeLimitDay\"\n [(ngModel)]=\"value.rangeLimitDay\"\n p-required\n [p-error-pattern]=\"'Dia inv\u00E1lido'\"\n [p-label]=\"literals.endDay\"\n [p-max]=\"31\"\n [p-pattern]=\"dayPattern\"\n >\n </po-number>\n\n <ng-container *ngTemplateOutlet=\"inputHourTemplate\"> </ng-container>\n </ng-template>\n\n <ng-template #inputHourTemplate>\n <po-input\n class=\"po-md-2\"\n name=\"hour\"\n [(ngModel)]=\"value.hour\"\n p-mask=\"99:99\"\n p-mask-format-model\n p-placeholder=\"HH:mm\"\n p-required\n [p-label]=\"hourLabel\"\n [p-pattern]=\"timePattern\"\n >\n </po-input>\n\n <po-input\n *ngIf=\"containsFrequency && value.frequency.type !== 'day'\"\n class=\"po-md-2\"\n name=\"rangeLimitHour\"\n [(ngModel)]=\"value.rangeLimitHour\"\n p-mask=\"99:99\"\n p-mask-format-model\n p-placeholder=\"HH:mm\"\n p-required\n [p-label]=\"literals.endTime\"\n [p-pattern]=\"timePattern\"\n >\n </po-input>\n </ng-template>\n</form>\n"
|
|
6347
6474
|
},] }
|
|
6348
6475
|
];
|
|
6349
6476
|
PoPageJobSchedulerExecutionComponent.ctorParameters = function () { return [
|
|
@@ -6405,23 +6532,34 @@
|
|
|
6405
6532
|
this.firstExecutionValue = '';
|
|
6406
6533
|
this.infoOrientation = i2.PoInfoOrientation.Horizontal;
|
|
6407
6534
|
this.periodicityValue = '';
|
|
6535
|
+
this.frequencyValue = '';
|
|
6536
|
+
this.rangeLimitHour = '';
|
|
6537
|
+
this.rangeLimitDay = '';
|
|
6408
6538
|
this.recurrentValue = '';
|
|
6409
6539
|
}
|
|
6410
6540
|
PoPageJobSchedulerSummaryComponent.prototype.ngOnInit = function () {
|
|
6411
|
-
var _a = this.value, periodicity = _a.periodicity, hour = _a.hour, dayOfMonth = _a.dayOfMonth, daysOfWeek = _a.daysOfWeek, recurrent = _a.recurrent, firstExecution = _a.firstExecution, firstExecutionHour = _a.firstExecutionHour;
|
|
6541
|
+
var _a = this.value, periodicity = _a.periodicity, hour = _a.hour, dayOfMonth = _a.dayOfMonth, daysOfWeek = _a.daysOfWeek, recurrent = _a.recurrent, firstExecution = _a.firstExecution, firstExecutionHour = _a.firstExecutionHour, frequency = _a.frequency, rangeLimitHour = _a.rangeLimitHour, rangeLimitDay = _a.rangeLimitDay;
|
|
6412
6542
|
this.periodicityValue = this.getPeriodicityLabel(periodicity);
|
|
6413
|
-
|
|
6543
|
+
if (frequency) {
|
|
6544
|
+
this.frequencyValue = this.getFrequencyValue(frequency, periodicity);
|
|
6545
|
+
}
|
|
6546
|
+
this.executionValue = this.getExecutionValue(periodicity, hour, daysOfWeek, dayOfMonth, rangeLimitHour, rangeLimitDay);
|
|
6414
6547
|
this.firstExecutionValue = this.getFirstExecutionLabel(firstExecution, firstExecutionHour);
|
|
6415
6548
|
this.recurrentValue = this.getRecurrentValue(recurrent);
|
|
6416
6549
|
};
|
|
6417
|
-
PoPageJobSchedulerSummaryComponent.prototype.
|
|
6550
|
+
PoPageJobSchedulerSummaryComponent.prototype.getFrequencyValue = function (frequency, periodicity) {
|
|
6551
|
+
return frequency['value'] && frequency['type'] && periodicity !== 'single'
|
|
6552
|
+
? frequency['value'] + " - " + frequency['type']
|
|
6553
|
+
: '';
|
|
6554
|
+
};
|
|
6555
|
+
PoPageJobSchedulerSummaryComponent.prototype.getExecutionValue = function (periodicity, hour, daysOfWeek, dayOfMonth, rangeLimitHour, rangeLimitDay) {
|
|
6418
6556
|
switch (periodicity) {
|
|
6419
6557
|
case 'daily':
|
|
6420
|
-
return this.getHourLabel(hour);
|
|
6558
|
+
return this.getHourLabel(hour, rangeLimitHour);
|
|
6421
6559
|
case 'monthly':
|
|
6422
|
-
return this.getMonthlyLabelExecution(dayOfMonth, hour);
|
|
6560
|
+
return this.getMonthlyLabelExecution(dayOfMonth, hour, rangeLimitHour, rangeLimitDay);
|
|
6423
6561
|
case 'weekly':
|
|
6424
|
-
return this.getWeeklyLabelExecution(daysOfWeek, hour);
|
|
6562
|
+
return this.getWeeklyLabelExecution(daysOfWeek, hour, rangeLimitHour);
|
|
6425
6563
|
default:
|
|
6426
6564
|
return this.literals.notReported;
|
|
6427
6565
|
}
|
|
@@ -6435,12 +6573,12 @@
|
|
|
6435
6573
|
return this.literals.notReported;
|
|
6436
6574
|
}
|
|
6437
6575
|
};
|
|
6438
|
-
PoPageJobSchedulerSummaryComponent.prototype.getHourLabel = function (hour) {
|
|
6439
|
-
return this.literals.at + " " + (hour || '00:00') + "
|
|
6576
|
+
PoPageJobSchedulerSummaryComponent.prototype.getHourLabel = function (hour, rangeLimitHour) {
|
|
6577
|
+
return (rangeLimitHour ? this.literals.from : this.literals.at) + " " + (hour || '00:00') + " " + (rangeLimitHour ? this.literals.to + ' ' + rangeLimitHour : '');
|
|
6440
6578
|
};
|
|
6441
|
-
PoPageJobSchedulerSummaryComponent.prototype.getMonthlyLabelExecution = function (dayOfMonth, hour) {
|
|
6442
|
-
var hourLabel = this.getHourLabel(hour);
|
|
6443
|
-
return this.literals.
|
|
6579
|
+
PoPageJobSchedulerSummaryComponent.prototype.getMonthlyLabelExecution = function (dayOfMonth, hour, rangeLimitHour, rangeLimitDay) {
|
|
6580
|
+
var hourLabel = this.getHourLabel(hour, rangeLimitHour);
|
|
6581
|
+
return (rangeLimitDay ? this.literals.from : '') + " " + dayOfMonth + " " + (rangeLimitDay ? this.literals.to : '') + " " + (rangeLimitDay ? rangeLimitDay : '') + " " + hourLabel;
|
|
6444
6582
|
};
|
|
6445
6583
|
PoPageJobSchedulerSummaryComponent.prototype.getPeriodicityLabel = function (periodicity) {
|
|
6446
6584
|
switch (periodicity) {
|
|
@@ -6486,9 +6624,9 @@
|
|
|
6486
6624
|
var weekDaysSorted = this.sortWeekDays(days);
|
|
6487
6625
|
return weekDaysSorted.map(function (day) { return _this.getTranslateWeekDay(day); }).join(', ');
|
|
6488
6626
|
};
|
|
6489
|
-
PoPageJobSchedulerSummaryComponent.prototype.getWeeklyLabelExecution = function (daysOfWeek, hour) {
|
|
6627
|
+
PoPageJobSchedulerSummaryComponent.prototype.getWeeklyLabelExecution = function (daysOfWeek, hour, rangeLimitHour) {
|
|
6490
6628
|
if (daysOfWeek && Array.isArray(daysOfWeek)) {
|
|
6491
|
-
return this.getWeekDaysLabel(daysOfWeek) + " " + this.getHourLabel(hour);
|
|
6629
|
+
return this.getWeekDaysLabel(daysOfWeek) + " " + this.getHourLabel(hour, rangeLimitHour);
|
|
6492
6630
|
}
|
|
6493
6631
|
else {
|
|
6494
6632
|
return this.literals.notReported;
|
|
@@ -6508,7 +6646,7 @@
|
|
|
6508
6646
|
PoPageJobSchedulerSummaryComponent.decorators = [
|
|
6509
6647
|
{ type: i0.Component, args: [{
|
|
6510
6648
|
selector: 'po-page-job-scheduler-summary',
|
|
6511
|
-
template: "<div class=\"po-md-12\">\n <po-info\n *ngIf=\"noParameters\"\n [p-label]=\"literals.process\"\n [p-orientation]=\"infoOrientation\"\n [p-value]=\"value.processID\"\n >\n </po-info>\n\n <po-info [p-label]=\"literals.periodicity\" [p-orientation]=\"infoOrientation\" [p-value]=\"periodicityValue\"> </po-info>\n\n <po-info\n *ngIf=\"value.periodicity !== 'single'\"\n [p-label]=\"literals.execution\"\n [p-orientation]=\"infoOrientation\"\n [p-value]=\"executionValue\"\n >\n </po-info>\n\n <po-info [p-label]=\"literals.recurrent\" [p-orientation]=\"infoOrientation\" [p-value]=\"recurrentValue\"> </po-info>\n\n <po-info [p-label]=\"literals.firstExecution\" [p-orientation]=\"infoOrientation\" [p-value]=\"firstExecutionValue\">\n </po-info>\n</div>\n\n<po-widget *ngIf=\"parameters && parameters.length\" class=\"po-pt-1 po-pb-1 po-md-12\" [p-title]=\"literals.parameters\">\n <po-dynamic-view [p-fields]=\"parameters\" [p-value]=\"value.executionParameter\"> </po-dynamic-view>\n</po-widget>\n"
|
|
6649
|
+
template: "<div class=\"po-md-12\">\n <po-info\n *ngIf=\"noParameters\"\n [p-label]=\"literals.process\"\n [p-orientation]=\"infoOrientation\"\n [p-value]=\"value.processID\"\n >\n </po-info>\n\n <po-info [p-label]=\"literals.periodicity\" [p-orientation]=\"infoOrientation\" [p-value]=\"periodicityValue\"> </po-info>\n\n <po-info\n *ngIf=\"frequencyValue !== ''\"\n [p-label]=\"literals.frequency\"\n [p-orientation]=\"infoOrientation\"\n [p-value]=\"frequencyValue\"\n >\n </po-info>\n\n <po-info\n *ngIf=\"value.periodicity !== 'single'\"\n [p-label]=\"literals.execution\"\n [p-orientation]=\"infoOrientation\"\n [p-value]=\"executionValue\"\n >\n </po-info>\n\n <po-info [p-label]=\"literals.recurrent\" [p-orientation]=\"infoOrientation\" [p-value]=\"recurrentValue\"> </po-info>\n\n <po-info [p-label]=\"literals.firstExecution\" [p-orientation]=\"infoOrientation\" [p-value]=\"firstExecutionValue\">\n </po-info>\n</div>\n\n<po-widget *ngIf=\"parameters && parameters.length\" class=\"po-pt-1 po-pb-1 po-md-12\" [p-title]=\"literals.parameters\">\n <po-dynamic-view [p-fields]=\"parameters\" [p-value]=\"value.executionParameter\"> </po-dynamic-view>\n</po-widget>\n"
|
|
6512
6650
|
},] }
|
|
6513
6651
|
];
|
|
6514
6652
|
PoPageJobSchedulerSummaryComponent.ctorParameters = function () { return [
|