Skip to content

Commit

Permalink
[5.1] MSPB-261: Avoid duplicated holidays after edited (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
masmerino13 authored Jul 16, 2022
1 parent 65cbdd2 commit fc88d48
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion submodules/strategy/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4282,7 +4282,6 @@ define(function(require) {
$template.on('submit', function(event) {
event.preventDefault();

console.log(holidayRule);
var formData = monster.ui.getFormData('form_add_edit_office_holidays'),
$optionDiv = $template.find('.row-fluid.' + formData.type + ' select:not(.hide)'),
endYear = $template.find('.optional-year.show .select-year').val(),
Expand Down
2 changes: 1 addition & 1 deletion submodules/strategyHolidays/strategyHolidays.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ define(function(require) {
callback: function(err, data) {
/*Compare old holidayData with new holidayData if it's recurring*/
var isOldRecurring = _.get(holidayRule, 'holidayData.recurring', false),
isNewRecurring = _.get(holidayRule, 'data.recurring', false);
isNewRecurring = _.get(data, 'holidayData.recurring', false);

if (isOldRecurring && (isOldRecurring !== isNewRecurring)) {
/* update existing rule */
Expand Down

0 comments on commit fc88d48

Please sign in to comment.