Skip to content
Merged

Dev #2595

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ private static void AddBackgroundJobSettingDefinition(ISettingDefinitionContext
{ SettingsConstants.BackgroundJobs.DataHealthCheckMonitor_Expression, "0 0 * 1/1 * ? *" },
// 2 AM PST = 10 AM UTC
{ SettingsConstants.BackgroundJobs.ApplicantTenantMapReconciliation_Expression, "0 0 10 1/1 * ? *" },
// 2 AM UTC = Date-based scheduled notifications check
{ SettingsConstants.BackgroundJobs.DateBasedNotificationSchedule_Expression, "0 */10 * * * ?" } //"0 0 2 1/1 * ? *"
// 2 AM PST = 10 AM UTC
{ SettingsConstants.BackgroundJobs.DateBasedNotificationSchedule_Expression, "0 0 10 1/1 * ? *" }
};

foreach (var setting in backGroundSchedules)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
var enableEmailDelay = Model.EnableEmailDelay;
var scheduleEmailGranted = await PermissionChecker.IsGrantedAsync("Notifications.Email.Schedule");
var enableScheduleSend = enableEmailDelay && scheduleEmailGranted;

}

<div id=" emails-div@(Model.ApplicationId)" class="mt-2 emails-container" data-count="0" data-counttag="application_emails_count">
Expand Down Expand Up @@ -95,7 +94,7 @@
Send
</button>

<button id="btn-send-dropdown" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" abp-if="@enableEmailDelay">
<button id="btn-send-dropdown" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" abp-if="@enableScheduleSend">
<i class="fa fa-chevron-down"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="btn-send-dropdown">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@
width: 100%;
height: 36px;
padding: 6px 8px !important;
display: inline-block;
position: relative;
flex-grow: 1;
padding-right: 75px !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,32 @@
editor?.mode.set('design');
}


function validateScheduleDate() {
const dateStr = UIElements.scheduleDateInput.val();
// Clear any previous validation messages and error toasts
UIElements.scheduleDateValidation.removeClass('text-success').removeClass('text-danger').text('').hide();

if (dateStr?.length === 10) {
const [month, day, year] = dateStr.split('/').map(Number);
if (isValidDate(month, day, year)) {
scheduleState.selectedDate = new Date(year, month - 1, day);
scheduleState.currentMonth = month - 1;
scheduleState.currentYear = year;
renderCalendarGrid(scheduleState);
UIElements.scheduleDateValidation.text('✓ Valid date').removeClass('text-danger').addClass('text-success').show();
} else {
const errorMsg = '✗ Invalid date';
UIElements.scheduleDateValidation.text(errorMsg).removeClass('text-success').addClass('text-danger').show();
showValidationErrorToast([errorMsg]);
}
} else if (dateStr) {
const errorMsg = '✗ Invalid date format (use MM/DD/YYYY)';
UIElements.scheduleDateValidation.text(errorMsg).removeClass('text-success').addClass('text-danger').show();
showValidationErrorToast([errorMsg]);
} else {
UIElements.scheduleDateValidation.hide();
}
}

function bindDelayModeEvents() {
// Use global scheduleState
Expand Down Expand Up @@ -307,34 +332,7 @@
UIElements.scheduleDateValidation.hide();
}
});

function validateScheduleDate() {
const dateStr = UIElements.scheduleDateInput.val();
// Clear any previous validation messages and error toasts
UIElements.scheduleDateValidation.removeClass('text-success').removeClass('text-danger').text('').hide();

if (dateStr?.length === 10) {
const [month, day, year] = dateStr.split('/').map(Number);
if (isValidDate(month, day, year)) {
scheduleState.selectedDate = new Date(year, month - 1, day);
scheduleState.currentMonth = month - 1;
scheduleState.currentYear = year;
renderCalendarGrid(scheduleState);
UIElements.scheduleDateValidation.text('✓ Valid date').removeClass('text-danger').addClass('text-success').show();
} else {
const errorMsg = '✗ Invalid date';
UIElements.scheduleDateValidation.text(errorMsg).removeClass('text-success').addClass('text-danger').show();
showValidationErrorToast([errorMsg]);
}
} else if (dateStr) {
const errorMsg = '✗ Invalid date format (use MM/DD/YYYY)';
UIElements.scheduleDateValidation.text(errorMsg).removeClass('text-success').addClass('text-danger').show();
showValidationErrorToast([errorMsg]);
} else {
UIElements.scheduleDateValidation.hide();
}
}


UIElements.scheduleDateInput.on('blur', function () {
validateScheduleDate();
});
Expand Down
Loading