<\/div>')}var e=Number(`${i.length}`),o=`

You don't have any Notifications yet.
Will notify you when Something arrives'
`,s=`
View AllClear (0)`;t=="tab-view"?($(".clearall-checkbox").removeClass("d-none"),e==0?(u.loadNotificationsTask(o,"notification",0),$(".clear_alldiv").addClass("d-none"),$(".notification-footer").addClass("d-none"),$(".clearall-checkbox").addClass("d-none")):(u.loadNotificationsTask(r,"notification",0),$(".clear_alldiv").removeClass("d-none"),$(".notification-footer").removeClass("d-none").html(s))):e==0?($(".clearall-checkbox").addClass("d-none"),$(".clear_alldiv").addClass("d-none"),$("#settings-panel-body").html(o).addClass("no-data"),$(".notification-footer").addClass("d-none")):($(".clear_alldiv").removeClass("d-none"),$(".clearall-checkbox").removeClass("d-none"),$("#settings-panel-body").html(r).removeClass("no-data"),$(".notification-footer").removeClass("d-none").html(s));$(".biz-settings-panel #notification_count").text(n.Themes.Compact.Components.Notification.UnReadNotificationsCount);$(".biz-settings-panel #tasks_count").text(n.Themes.Compact.Components.Notification.UnReadTasksCount);n.Themes.Compact.Components.Index.Instance().layoutIndex==1&&$(".biz-settings-panel").addClass("layout-1");n.Themes.Compact.Components.Index.Instance().layoutIndex==2&&$(".biz-settings-panel").addClass("layout-2");$(".biz-settings-panel").addClass("notifications-tasks-panel");$(".biz-settings-panel .notification-subject").each(function(n,t){$(t).prop("scrollWidth")<$(t).outerWidth()+2&&$(t).removeAttr("title")});$(".notify_check").on("click",function(){var n=!0;$(".notify_check").each(function(){if($(this).is(":checked"))n=!0;else return n=!1,!1});n?$(".clearall-checkbox").prop("checked",!0):$(".clearall-checkbox").prop("checked",!1);$(".notify_check").is(":checked")?($(".task-litab").addClass("d-none"),$("#notificationsViewAllBtn").addClass("d-none"),$("#clearNotificationCount").text($(".notify_check:checked").length),$("#notificationClearBtn").removeClass("d-none")):($(".task-litab").removeClass("d-none"),$(".clearall-checkbox").prop("checked",!1),$("#notificationsViewAllBtn").removeClass("d-none"),$("#notificationClearBtn").addClass("d-none"))});$(".clearall-checkbox").click(function(){$(".clearall-checkbox").is(":checked")?($(".task-litab").addClass("d-none"),$(".check_allreminders").prop("checked",!0),$("#notificationsViewAllBtn").addClass("d-none"),$("#clearNotificationCount").text($(".notify_check:checked").length),$("#notificationClearBtn").removeClass("d-none")):($(".task-litab").removeClass("d-none"),$(".check_allreminders").prop("checked",!1),$("#notificationsViewAllBtn").removeClass("d-none"),$("#notificationClearBtn").addClass("d-none"))})})})}markAsReadUnReadReminders(t){var i=[],r;$(".check_allreminders").each(function(){if($(this).is(":checked")){var n=$(this).attr("id"),t=n.split("_")[1];i.push(t)}});r={Reminders:i};n.Platform.Communications.Managers.ReminderManager.Instance().markAsReadUnreadReminders(r).then(function(i){if(i.status==n.Data.Status.Success){var r=undefined;t&&(r="tab-view");n.Themes.Compact.Components.Notification.Instance().loadReminders(r,null)}})}GetUnreadRemindersCount(){const t=this;let i=n.Platform.Membership.Infos.Identity.getCurrentUser();n.Platform.Communications.Managers.ReminderManager.Instance().getUnreadRemindersCountByUserId().then(function(i){var r=i.result;n.Themes.Compact.Components.Notification.UnReadNotificationsCount=r.NotificationCount;n.Themes.Compact.Components.Notification.UnReadTasksCount=r.TasksCount;const u=Number(r.NotificationCount),f=Number(r.TasksCount);if(n.Themes.Compact.Components.Index.Instance().tabMode)t.bindCountHtml(u,"#notificatonIconBadge"),t.bindCountHtml(f,"#taskIconBadge");else{let n=u+f;t.bindCountHtml(n,"#notificatonIconBadge")}$(".biz-settings-panel #notification_count").text(r.NotificationCount);$(".biz-settings-panel #tasks_count").text(r.TasksCount)})}bindCountHtml(n,t){if(n>0){let i=n.toString();if(n>99&&(i='99
<\/sup>'),n>9||n>99){let i="count-double-digit";n>99&&(i="count-overflow");$(t).closest(".dropdown-notifications").addClass(i)}$(t).html(i).removeClass("d-none")}else $(t).empty().addClass("d-none")}loadTasks(t){return __awaiter(this,void 0,void 0,function*(){let i=this;$("#settingsPanelBodyWrap").removeClass("d-none");$("#chatPanelBodyWrap").addClass("d-none");$("#settings-panel-head-title").addClass("d-flex flex-row align-items-center py-1").empty().append('Tasks<\/span>0<\/span>').parent().addClass("px-3 border-bottom").removeClass("py-10");$(".biz-settings-panel").css("background","#fff9f9");$(".settings-panel-head").removeClass("py-2 mobileChat-view d-none");$("#settings-panel-body").removeClass("px-3").addClass("biz-body-height");let r=n.Platform.Communications.Enums.ReminderType.Task;return n.Themes.Compact.Components.Notification.Instance().GetUnreadRemindersCount(!1),yield n.Platform.Communications.Managers.ReminderManager.Instance().getReminders(r,20).then(function(u){let f="";for(let t=0;t'+`
${u[t].Subject}
${u[t].Message}
${n.Platform.Helpers.DateTimeHelper.Instance().formatLocal(u[t].ReminderDate)}
`+'
`;t!=u.length-1&&(f+='<\/div>')}$(".biz-settings-panel #tasks_count").text(n.Themes.Compact.Components.Notification.UnReadTasksCount);var e=Number(`${u.length}`),o=`

You don't have any Tasks Right Now.
Will notify you when Something arrives'
`,s=`
View All`;t=="tab-view"?e==0?(i.loadNotificationsTask(o,"task",1),$(".notification-footer").addClass("d-none")):(i.loadNotificationsTask(f,"task",1),$(".notification-footer").removeClass("d-none").html(s)):($(".biz-settings-panel").toggleClass("show"),e==0?($("#settings-panel-body").html(o).addClass("no-data"),$(".notification-footer").addClass("d-none")):($("#settings-panel-body").html(f).removeClass("no-data"),$(".notification-footer").removeClass("d-none").html(s)));$(".biz-settings-panel .task-subject").each(function(n,t){$(t).prop("scrollWidth")<$(t).outerWidth()+2&&$(t).removeAttr("title")});n.Themes.Compact.Components.Index.Instance().layoutIndex==1&&$(".biz-settings-panel").addClass("layout-1");n.Themes.Compact.Components.Index.Instance().layoutIndex==2&&$(".biz-settings-panel").addClass("layout-2");$(".biz-settings-panel").addClass("notifications-tasks-panel");$(".clear-all-checkbox").addClass("d-none")})})}LoadApprovals(t,i,r){var u="";if($(`#manageBtnWrap_${i}`).length){$("#collapseManageBtn_"+i).collapse("toggle");return}n.Platform.Communications.Managers.TaskManager.Instance().getTaskByRefId(t,r).then(function(n){if(n.result!=null){var t="Approve",f="Reject",e="Unibase.Themes.Compact.Components.Notification.Instance().SaveTaskReason('"+i+"',"+n.result.TaskId+",'Reject');";n.result.ConfirmKeyText!=null&&n.result.ConfirmKeyText!=undefined&&n.result.ConfirmKeyText!=""&&(t=n.result.ConfirmKeyText);n.result.RejectKeyText!=null&&n.result.RejectKeyText!=undefined&&n.result.RejectKeyText!=""&&(f=n.result.RejectKeyText);Number(n.result.RejectFormId)!=0&&(e="Unibase.Themes.Compact.Components.Notification.Instance().ChangeApprovalStatus('"+i+"',"+n.result.TaskId+",'Reject',"+n.result.RejectFormId+","+n.result.RejectFormPkId+")");u+=`