From d02dccac23186cc3770518e2ce06397e87b483ae Mon Sep 17 00:00:00 2001 From: Sai Sudheer Date: Fri, 10 Mar 2023 09:54:46 +0530 Subject: [PATCH] Latesy changes are commited --- assets/css/list.page.css | 316 +++++++++++++++-- assets/js/list.index.js | 688 ++++++++++++++++++++++---------------- authentication/index.html | 58 ++-- login/index.html | 8 +- 4 files changed, 726 insertions(+), 344 deletions(-) diff --git a/assets/css/list.page.css b/assets/css/list.page.css index 3d95f59..756a5e5 100644 --- a/assets/css/list.page.css +++ b/assets/css/list.page.css @@ -1,5 +1,6 @@ @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap"); :root { + --topNavHeightMob:65px; --topNavHeight: 75px; --rtrWidth: 60px; --lftWidth: 275px; @@ -38,12 +39,10 @@ li { padding: 0px !important; display: flex; flex-direction: column; + margin: 0px !important; } .tp-bar { - width: 100%; - top: 0px; - left: 0px; height: var(--topNavHeight); display: flex; flex-direction: row; @@ -53,11 +52,13 @@ li { padding-right: 0px !important; z-index: 1; margin-bottom: 0px; - position: fixed; } ul.tp-bar li { - margin: 0px 16px; + margin: 0px 5px; +} +ul.tp-bar li:last-child { + margin-right: 20px; } li.logo-li { @@ -75,13 +76,9 @@ li.logo-li { } .btm-bar { - top: var(--topNavHeight); - left: 0; - width: 100%; height: calc(100vh - var(--topNavHeight)); display: flex; flex-direction: row; - position: fixed; } .lft-nav-bar { @@ -149,6 +146,7 @@ li.logo-li { position: fixed; overflow-y: hidden; z-index: 0; + width: calc(); left: var(--lftWidth); right: 0px; height: calc(100vh - var(--topNavHeight)); @@ -160,6 +158,7 @@ li.logo-li { .srch-bar { width: 35%; + margin-left: 15px !important; } .form-control#searchBar { @@ -504,17 +503,6 @@ ul.hdr-ul li { display: flex; flex-direction: row; } -.ctrl-vrtl { - display: flex; - flex-direction: column; - margin-left: -30px; - z-index: 1; - background-color: var(--prmBgColor); - height: 100%; -} -.ctrl-vrtl a { - margin: 5px; -} .ChtAppIfrme { margin-left: var(--rtrWidth); height: calc(100vh - var(--topNavHeight)); @@ -534,12 +522,6 @@ ul.hdr-ul li { white-space: nowrap; text-align: right; } -.w-mes { - width: 90%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} .apps-list { width: 360px; max-height: 450px; @@ -551,9 +533,289 @@ ul.hdr-ul li { display: flex; flex-direction: column; margin: 8px !important; - width: 70px; + width: 72px; + justify-content: center; + align-items: center; } .appsBind .appTitle { font-size: 14px; text-align: center; } + +/* dont delete start here */ +.ctr-lst-pge .bdy-ul .pdng { + font-size: 14px; + display: flex; + flex-direction: row; + align-items: center; + padding: 6px 15px 6px 20px !important; + cursor: pointer; + border-bottom: 1px solid #bebcbc; + position: relative; +} + +.ctr-lst-pge .bdy-ul .pdng.lst-Notifi:hover { + -webkit-box-shadow: 0px 2px 3px 1px rgba(0, 0, 0, 0.75); + -moz-box-shadow: 0px 2px 3px 1px rgba(0, 0, 0, 0.75); + box-shadow: 0px 2px 3px 1px rgba(0, 0, 0, 0.75); +} +.ctr-lst-pge .bdy-ul .pdng:hover .hover { + display: block; +} + +.wi-chck { + width: 60px; + display: flex; + align-items: center; + flex-direction: row; +} +.wi-chck .wi-item { + margin: 0px 8px; +} +.wi-sbjt-msge { + display: flex; + align-items: center; + flex-direction: row; + min-width: 0; + width: 100%; +} +.wi-msge { + flex-basis: 0; + box-flex: 1; + flex-grow: 1; + flex-shrink: 1; + text-align: left; +} + +.wi-time { + text-align: right; + font-size: 12px; + font-weight: 500; +} +.hdr-ul .dropdown-toggle-split { + padding: 4px !important; +} +.ctr-lst-pge .bdy-ul .pdng .hover { + display: none; + position: absolute; + right: 10px; + padding-right: 20px; + background-color: var(--secdSubColor); +} +.ctr-lst-pge .bdy-ul .pdng .hover ul li.hover-item { + float: left; +} +.lst-Notifi[data-isreaded="2"], +.ctr-lst-pge .bdy-ul .pdng.lst-Notifi[data-isreaded="2"] .hover { + background-color: #cbceca; + opacity: 0.8; +} +.ctr-lst-pge .bdy-ul .pdng.lst-Notifi:hover .wi-time.time { + display: none !important; +} +.svg-icons { + width: 30px; +} +.apps-loading { + width: 330px; + height: 100vh; + background-color: var(--secdSubColor); + position: fixed; + right: 0; +} +#list-page { + height: 100vh; +} +.appsBind:hover { + cursor: pointer; +} +.wi-from.wi-item span { + text-transform: capitalize; +} +.lst-Notifi[data-isreaded="8"] span { + font-weight: 500; +} +.lst-Notifi[data-isreaded="2"] span { + font-weight: 400; + color: #6c757d !important; +} +.lst-Notifi[data-isreaded="8"] .wi-msge span, +.lst-Notifi[data-isreaded="2"] .wi-msge span { + color: #6c757d !important; + font-weight: 400; +} +.pdng.lst-Notifi .ri-star-line { + color: #6c757d; + opacity: 0.5; +} +.pdng.lst-Notifi:hover .ri-star-line, +.pdng.lst-Notifi:hover .wi-item .form-check-input { + opacity: 1; +} +.pdng.lst-Notifi .wi-item .form-check-input { + border: 1px solid#6c757d !important; + border-radius: 4px; + opacity: 0.5; +} + +.pdng.lst-Notifi .wi-item .form-check-input:checked { + opacity: 1; + background-color: #b2b2b2; +} +.ml-0 { + margin-left: 0px !important; +} +.chck-box-ul.dropdown-menu.show { + border: 0px; +} +.dropdown-item.active, +.dropdown-item:active, +.dropdown-item:hover { + background-color: var(--prmBgColor) !important; +} +.ctr-lst-pge.apps-loaded { + width: calc(100% - var(--rtrWidth) - 330px - 48px) !important; +} +.ctr-lst-pge.apps-loaded-tr { + width: calc(100% - var(--lftWidth) - 330px - 48px) !important; +} +.frm_hdr[data-frm_hdr="true"]{ + display: none !important; +} +/* Mobile, tab View start here */ + +@media only screen and (max-width: 1024px) { + .btm-bar .lft-nav-bar{ + display: none; + } + .btm-bar .ctr-lst-pge{ + left:0px !important; + } + .sdr-nme{ + width: 45px; + height: 45px; + border-radius: 50%; + background-color: #00d67f; + } + .hdr-ul{ + display: none !important; + } + .ctr-lst-pge{ + border-top-left-radius:0px; + border-top-right-radius:0px; + } + .ctr-lst-pge .bdy-ul .pdng{ + padding: 8px !important; + } + .wi-chck{ + width: unset; + } + .wi-item:first-of-type{ + display: none; + } +} + +@media only screen and (max-width: 600px) { + .srch-bar{ + display: none; + } + .ctr-lst-pge{ + margin: 0px !important; + } + ul.tp-bar li:last-child{ + margin-right: 10px; + } + .mnNvIcn{ + margin:0px !important; + padding: 0px !important; + } + .mnNvIcn-div{ + justify-content: unset; + margin-left: 10px; + flex-basis: content; + } + .tp-bar{ + height: 65px; + } + .tp-bar .logo-li{ + flex-basis: content; + } + .wi-chck{ + flex-basis: content; + } + .apps-loading{ + width: 100%; + top: var(--topNavHeightMob); + } + .frm-ifre{ + width: 100%; + } +} +/* Mobile, tab View End here */ + + +/*common Class start Here*/ +.w-5p{ + width: 5px; +}.w-10p{ + width: 10px; +}.w-15p{ + width: 15px; +}.w-20p{ + width: 20px; +}.w-25p{ + width: 25px; +}.w-30p{ + width: 30px; +}.w-35p{ + width: 35px; +}.w-40p{ + width: 40px; +}.w-45p{ + width: 45px; +}.w-50p{ + width: 50px; +}.w-55p{ + width: 55px; +}.w-60p{ + width: 60px; +}.w-65p{ + width: 65px; +}.w-70p{ + width: 70px; +}.fw-400{ + font-weight: 400; +}.fw-500{ + font-weight: 500; +}.fw-600{ + font-weight: 600; +}.fw-700{ + font-weight: 700; +}.font-10{ + font-size: 10px; +}.font-11{ + font-size: 11px; +}.font-12{ + font-size: 12px; +}.font-13{ + font-size: 13px; +}.font-14{ + font-size: 14px; +}.font-15{ + font-size: 15px; +}.font-16{ + font-size: 16px; +}.font-17{ + font-size: 17px; +}.font-18{ + font-size: 18px; +}.font-19{ + font-size: 19px; +}.font-20{ + font-size: 20px; +}.font-21{ + font-size: 21px; +}.font-22{ + font-size: 22px; +} +/*common Class End Here*/ diff --git a/assets/js/list.index.js b/assets/js/list.index.js index d623c2e..58910fe 100644 --- a/assets/js/list.index.js +++ b/assets/js/list.index.js @@ -40,10 +40,10 @@ function createLoad(data) { const {unibaseId, tenantId, userId} = JSON.parse(cookie); fomrhtml = `
-
+
    -
  • +
  • ${appName}
    @@ -53,13 +53,7 @@ function createLoad(data) {
  • -
    - - - - -
    - +
@@ -79,11 +73,11 @@ function hdrCrtnClckEvnt(number) { let isPopUpState = $(this).attr("data-ispopup"); let height = $(`.frm-ifre-${id}`).find(".frm-hdr").height(); $(".list-page").css({filter: "unset", opacity: 1}); - $(`.frm-ifre-${id} .frm-hdr`).toggleClass("d-none"); $(`.frm-ifre-${id} .frm-bdy`).toggleClass("d-none"); if (isPopUpState == "true") { // popup large $(this).attr("data-ispopup", "false"); + $(this).parents('.frm-hdr').removeClass('d-none').attr('data-frm_hdr', 'false'); $(`.frm-ifre-${id} .maximum`).addClass("d-none"); $(`.frm-ifre-${id} .minimize`).attr("data-ispopup", "false"); $(`.frm-ifre-${id}`).parent().removeClass("wrap-iframe"); @@ -96,6 +90,7 @@ function hdrCrtnClckEvnt(number) { } else { // popup small $(this).attr("data-ispopup", "true"); + $(this).parents('.frm-hdr').addClass('d-none').attr('data-frm_hdr', 'true'); $(`.frm-ifre-${id} .maximum`).removeClass("d-none"); $(`.frm-ifre-${id} .minimize`).attr("data-ispopup", "true"); $(`.frm-ifre-${id}`).attr("data-ispop_up", "true"); @@ -104,6 +99,9 @@ function hdrCrtnClckEvnt(number) { height: "", bottom: "", }); + if($(this).parents('.frm-hdr').attr("data-saveform") == 'true'){ + $(this).parents('.frm-hdr').removeClass('d-none') + } } resetwidth(); }); @@ -136,264 +134,90 @@ function hdrCrtnClckEvnt(number) { resetwidth(); }); } -function loadData() { - $(".bdy-ul").empty(); - $('[class="refrsh"]') - .unbind() - .on("click", function () { - loadData(); - }); - $('[data-clck="ri-grid-fill"]').on("click", function () { - $(".apps-list").toggleClass("d-flex"); - }); - getData("apis/v4/unibase/platform/apps/myapps").then(function (response) { - let result = JSON.parse(response.result); - let html = ""; - for (var i = 0; i < result.length; i++) { - html += `
  • ${result[i].AppTitle}
  • `; - } - $("#apps-list").html(html); - $("li.appsBind").on("click", function () { - $(".apps-list").removeClass("d-flex"); - }); - }); - getData( - "apis/v4/unibase/reminders/platform/getunreadreminders/ReminderType/6/PageSize/20" - ).then(function (result) { - let response = JSON.parse(result.result); +function loadData(ApiPath, isSentBy) { + $(".bdy-ul").empty().removeClass("d-none"); + $(".hdr-ul").removeClass("d-none"); + getData(ApiPath).then(function (result) { + let response = JSON.parse(result.result), + html = ""; + const cookie = getCookie("_idty"); if (response.length != 0) { - // Notifcations - let bdyUI = '
    '; - for (var i = 0; i < response.length; i++) { - bdyUI += `
  • -
    - -
    -
    - -
    -
    -
    -
  • `; - } - bdyUI += "
    "; - $(".bdy-ul").append(bdyUI); - $('.sub-nav-item[data-buttonType="inbox"] .length').remove(); - $('.sub-nav-item[data-buttonType="inbox"]').append( - `` - ); - $(".notifiListItms").on("click", function () { - let _this = $(this).parents(".item-li"); - let obj = { - FromDate: "2022/11/30", - InstalledAppId: Number($(_this).attr("data-installedAppId")), - RecordId: Number($(_this).attr("data-ref")), - ToDate: "2022/11/30", - }; - //let obj = { "FromDate": "2022/11/30", "InstalledAppId": 102530270000109, "RecordId": 102533490346298, "ToDate": "2022/11/30" }; - getDataObj( - "apis/v4/unibase/platform/widgets/getdefaultwidget", - obj, - true, - "POST" - ).then(function (response) { - let res = JSON.parse(response.result), - html = ""; - if (response.message == "200" && response.errors == null) { - html = `
      `; - if ( - res.AppConfigurations != null && - res.AppConfigurations.length > 0 - ) { - for (var k = 0; k < res.AppConfigurations.length; k++) { - html += `
    • ${res.AppConfigurations[k].SettingName}
    • `; - } - } else { - html += ``; - } - if (res.Stages != null) { - for (var x = 0; x < res.Stages.length; x++) { - if (res.Stages[x].IsDefault) { - html += `
    • - -
    • "; - } else { - html += ``; - } - html += `
    • Details-Page
    `; - } else { - html += ``; - } - $(_this).find(".accordion-body").html(html); - detailClick(); - }); - }); - } - }); - getData( - "apis/v4/unibase/reminders/platform/getunreadreminders/ReminderType/1/PageSize/20" - ).then(function (tskResp) { - let response = JSON.parse(tskResp.result); - if (response.length != 0) { - let _tskhtml = '
    '; - for (var i = 0; i < response.length; i++) { - _tskhtml += `
  • -
    - -
    -
    -
      -
    • Confirm
    • -
    • Reject
    • -
    • Close
    • -
    • Details-Page
    • -
    -
    -
    -
    -
  • `; - } - _tskhtml += "
    "; - $(".bdy-ul").append(_tskhtml); - detailClick(); - } - }); - - // create button apps load - let appName = []; - getData("apis/v4/unibase/platform/apps/myapps").then(function (res) { - let response = JSON.parse(res.result); - jQuery.each(response, async function (index, item) { - let installedAppId = Number(item.MyAppId); - await getData( - `apis/v4/unibase/platform/apps/listappconfigurations/installedappid/${installedAppId}` - ).then(function (result) { - if ( - result.result != null && - result.result != "" && - result.result != "[]" - ) { - let _data = JSON.parse(result.result); - let data = _data.filter((x) => x.SettingUrlType == 1); - if (data.length != 0) { - appName.push({ - SettingUrlType: data[0].SettingUrlType, - AppTitle: data[0].AppTitle, - FormId: data[0].FormId, - InstalledAppId: data[0].InstalledAppId, - RoleSettingAppId: data[0].RoleSettingAppId, - InstalledAppGuid: data[0].InstalledAppGuid, - AppConfigurationId: data[0].AppConfigurationId, - AppPermissionId: data[0].AppPermissionId, - AppConfigType: data[0].AppConfigType, - }); - } + response.forEach(function (Item, index) { + let isSent = false; + if (Item.FromUserName == JSON.parse(cookie).name) { + isSent = true; } + if (Item.FromUserName == null) { + Item.FromUserName = 'Please check it Notification Team'; + } + //if(window.innerWidth >1024){ // Desktop Width + html += `
  • `; + html += `
    `; + if (Item.ReminderTypeId == 1) { + html += ``; + } else { + html += ``; + } + html += `
    `; // check-box + html += `
    `; + html += `
    ${Item.FromUserName}
    `; + html += `
    ${Item.Subject}
    -
    `; // Subject + html += `
    ${Item.Message}
    `; // Message + html += `
    `; + html += `
    ${dateTimeFormat( + Item.ReminderDate + )}
    `; + html += `
    +
      `; + if (Item.RedirectOptions.CreateFormId != 0) { + html += `
    • `; + } else { + html += `
    • `; + } + html += `
    +
    `; + html += "
  • "; + /* }else{ // Mobile Width card view + html += `
  • ` + html += `
    S
    +
    +
    + ${Item.FromUserName} + ${dateTimeFormat( + Item.ReminderDate + )} +
    +
    ${Item.Subject}
    +
    ${Item.Message}`; + if (Item.ReminderTypeId == 1) { + html += ``; + } else { + html += ``; + } + html += `
    +
    ` + html +=`
  • ` + }*/ + }); - await createLoad(appName); - }); + $(".ctr-lst-pge .bdy-ul").html(html); + if (isSentBy) { + $(".pdng.lst-Notifi").addClass("d-none"); + $(".pdng.lst-Notifi[data-issentby='true']").removeClass("d-none"); + } + detailClick(); + //stagesLoad(); + } }); getData("apis/v4/unibase/reminders/platform/getunreadreminderscount").then( function (response) { let result = JSON.parse(response.result); let count = Number(result.NotificationCount) + Number(result.TasksCount); - $('[data-buttontype="inbox"] .length').text(count); + $('[data-buttontype="inbox"] .length.rounded-pill').remove(); + $('[data-buttontype="inbox"]').append( + `${count}` + ); $('[data-notification="count"]').text(count); if (count > 40) { $('[data-paggtn="true"]').text(`1-40`); @@ -402,10 +226,15 @@ function loadData() { } } ); + if(window.innerWidth() < 1024){ + $('.ctr-lst-pge').on('click', function(){ + $('.mnNvIcn').click() + }) + } } function iFrmeWdth() { let width = 0, - erwdth = 32; + erwdth = 15; $(".frm-ifre").each(function (i, e) { if ($(this).length == 0) { erwdth = 0; @@ -418,7 +247,7 @@ function iFrmeWdth() { } function resetwidth() { let width = 0, - erwdth = 32; + erwdth = 15; $(".frm-ifre").each(function (i, e) { if (i == 0) { $(this).css("right", width + "px"); @@ -432,22 +261,74 @@ function resetwidth() { }); } export function detailClick() { - $(".detailBtn").click(function () { - let serverUrl = _serverUrl(); - $(".bdy-ul").addClass("d-none"); - let installedAppId = +$(this).attr("data-appId"); - let recordId = +$(this).attr("data-recordId"); - // Unibase.Themes.Compact.Components.Notification.Instance().loadReminderDetails(105013010001972,105010260000090,'Details','null',6,0,null) - const cookie = getCookie("_idty"); - if (cookie) { - const {unibaseId, tenantId, userId} = JSON.parse(cookie); + // Details Popup Abihram popup page + $(".wi-sbjt-msge").on("click", function (e) { + e.stopPropagation(); + detailsPage(this, true, "Details-page"); + }); + // Details Page Loading + $(".detailBtn[data-urltype='Details']").click(function (e) { + e.stopPropagation(); + detailsPage(this, false, "Details-page"); + }); + //Form Page Loading + $(".formBtn[data-urltype='Form']").on("click", function (e) { + e.stopPropagation(); + detailsPage(this, true, "Form-page"); + }); + //List Page Loading + $("[data-urltype='List']").on("click", function (e) { + e.stopPropagation(); + detailsPage(this, true, "List-page"); + }); + // get stages +} +export function detailsPage(e, ifrmPopup, isPage) { + let serverUrl = _serverUrl(); + $(".bdy-ul").addClass("d-none"); + $(".hdr-ul").addClass("d-none"); + let installedAppId = $(e) + .parents(".pdng.lst-Notifi") + .attr("data-instlledappid"); + let recordId = $(e).parents(".pdng.lst-Notifi").attr("data-refid"); + let reminderid = $(e).parents(".pdng.lst-Notifi").attr("data-reminderid"); + let remindertype = $(e) + .parents(".pdng.lst-Notifi") + .attr("data-remindertypeid"); + // Unibase.Themes.Compact.Components.Notification.Instance().loadReminderDetails(105013010001972,105010260000090,'Details','null',6,0,null) + const cookie = getCookie("_idty"); + if (cookie) { + const {unibaseId, tenantId, userId} = JSON.parse(cookie); + if (isPage == "Details-page") { $("#detailIframe").html( `` + ).height()}px)"  name="srcframe" id="srcframe" class="srcframe" src="${serverUrl}#/${unibaseId}/${tenantId}/${userId}/${recordId}/${installedAppId}/${remindertype}/${reminderid}/${ifrmPopup}/loadDetail">` + ); + } else if (isPage == "Form-page") { + getData( + `apis/v4/unibase/platform/apps/listappconfigurations/installedappid/${installedAppId}` + ).then(function (result) { + let _data = JSON.parse(result.result); + let data = _data.filter((x) => x.SettingUrlType == 1); + $("#detailIframe").html( + `` + ); + }); + } else if (isPage == "List-page") { + $("#detailIframe").html( + `` ); } - }); + } } export function signaRInit() { var huburl = _serverUrl() + "notificationhub"; @@ -459,7 +340,10 @@ export function signaRInit() { export async function register() { connection.on("sendnotification", (obj) => { $(".ctr-lst-pge .bdy-ul").empty(); - loadData(); + loadData( + "apis/v4/unibase/reminders/platform/getuserreminders/PageSize/0", + false + ); }); const cookie = getCookie("_idty"); const {unibaseId, tenantId, userId, sessionId, name} = JSON.parse(cookie); @@ -486,16 +370,16 @@ export function resetClckEvnt() { } export function initListIndex() { - let _userInfo = atob(document.cookie.split("=")[1]); - let userInfo = " JSON.parse(_userInfo).result"; - let sessionId = "userInfo.sessionId"; + let userInfo = JSON.parse(getCookie("_idty")); + let sessionId = userInfo.sessionId; + signaRInit(); - let usrinfoHTML = `
  • ${userInfo.name}
  • -
  • Cloud Settings
  • -
  • Help
  • + let usrinfoHTML = `
  • ${userInfo.name}
  • +
  • Help
  • Logoff
  • `; $(".icn-circle").text(userInfo?.name?.charAt(0)?.toUpperCase()); $(".uindtls").html(usrinfoHTML); + $('[data-btn="logoff"]').on("click", function () { document.cookie = "_idty=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; window.location = "../login"; @@ -526,8 +410,17 @@ export function initListIndex() { } ); $(".mnNvIcn").click(function () { - $(".lft-nav-bar").toggleClass("lft-nav-bar-Wrap"); - $(".ctr-lst-pge").toggleClass("lft-nav-bar-Wrap"); + $(".lft-nav-bar").toggleClass("lft-nav-bar-Wrap"); + $(".ctr-lst-pge").toggleClass("lft-nav-bar-Wrap"); + if ($(".apps-loading:visible").length != 0) { + $(".ctr-lst-pge").css("width", ""); + $(".ctr-lst-pge").toggleClass("apps-loaded"); + $(".ctr-lst-pge").toggleClass("apps-loaded-tr"); + } + if(window.innerWidth < 1025){ + $(".ctr-lst-pge").toggleClass('d-block'); + $(".lft-nav-bar").toggleClass("lft-nav-bar-Wrap d-flex w-100").css('background-color','rgb(0 0 0 / 50%)'); + } }); $(".mre-drp a.sub-nav-item.more").on("click", function () { $(".sub-nav-item").removeClass("active"); @@ -547,9 +440,240 @@ export function initListIndex() { $(this).addClass("active"); }); + $('[data-buttontype="inbox"], [data-application="Mail Application"]').on( + "click", + function () { + $("#detailIframe").empty(); + loadData( + "apis/v4/unibase/reminders/platform/getuserreminders/PageSize/0", + false + ); + } + ); + window.addEventListener("message", function (e) { + if (e.data != undefined) { + if(e.data == "Edit-form"){ + $('.frm-hdr').addClass('d-none') + } + if (e.data == "closeForm") { + $("#detailIframe").empty(); + $(".hdr-ul, .bdy-ul").removeClass("d-none"); + $('.frm-bdy [class="close"]')[0].click(); + } + if (e.data == "clickToBack") { + $("#detailIframe").empty(); + loadData( + "apis/v4/unibase/reminders/platform/getuserreminders/PageSize/0", + false + ); + } + if (e.data.includes("save-form")) { + let spilt = e.data.split("/"); + $(`.frm-ifre[data-formid="${spilt[1]}"] .frm-hdr`).removeClass( + "d-none" + ).attr('data-frm_hdr','false'); + } + if (e.data == "close apps") { + $("body").removeClass("d-flex flex-row"); + $("#detailIframe").empty(); + $(".hdr-ul, .bdy-ul").removeClass("d-none"); + $(".apps-loading").remove(); + $("#list-page").css("width", "100%"); + $(".lft-nav-bar").removeClass(".lft-nav-bar-Wrap"); + $(".ctr-lst-pge").removeClass("apps-loaded"); + $(".ctr-lst-pge").removeClass("apps-loaded-tr"); + } + if (e.data.includes("/")) { + let spilt = e.data.split("/"); + $( + `.frm-ifre[data-formid="${spilt[1]}"] .frm-hdr .ctrl .${spilt[0]}` + ).click(); + if(spilt[0].includes('success')){ + $(`.frm-ifre[data-formid="${spilt[1]}"] .frm-hdr`).removeClass("d-none").attr({'data-frm_hdr': 'false', 'data-saveform':'true'}); + } + if(!spilt[0].includes('maximum') && !spilt[0].includes('compress')){ + $(`.frm-ifre[data-formid="${spilt[1]}"] .frm-hdr`).removeClass("d-none").attr({'data-frm_hdr': 'false'}); + } + } + if (e.data == "closeForm_detailIframe") { + $("#detailIframe").empty(); + $(".hdr-ul, .bdy-ul").removeClass("d-none"); + } + } + }); + $('[class="refrsh"]').on("click", function () { + loadData( + "apis/v4/unibase/reminders/platform/getuserreminders/PageSize/0", + false + ); + }); + + getData("apis/v4/unibase/platform/apps/myapps").then(function (response) { + if(response.message.includes("User Authentication Failed")){ + window.location = "../login"; + }else{ + let result = JSON.parse(response.result); + let html = "
    • "; + for (var i = 0; i < result.length; i++) { + html += `
    • `; + if ( + result[i].SvgIconUrl != undefined && + result[i].SvgIconUrl != null && + result[i].SvgIconUrl != "" + ) { + html += `${result[i].SvgIconUrl}`; + } else { + html += + ' '; + } + html += `${result[i].AppTitle}
    • `; + } + html += "
  • "; + $("#apps-list").html(html); + $(".appsBind").on("click", function () { + let width = "330px"; + if(window.innerWidth> 1024){ + $("#list-page").css("width", `calc(100% - ${width})`); + } + if( $('.lft-nav-bar-2:visible').length !=0 ){ + $(".ctr-lst-pge").addClass("apps-loaded-tr"); + }else{ + $(".ctr-lst-pge").addClass("apps-loaded lft-nav-bar-Wrap") + } + let installedAppId = $(this).attr("data-myappid"); + const cookie = getCookie("_idty"); + if (cookie) { + let serverUrl = _serverUrl(); + const {unibaseId, tenantId, userId} = JSON.parse(cookie); + $("body").addClass("d-flex flex-row"); + $(".apps-loading").remove(); + $("#list-page").after( + `
    ` + ); + } + }); + } + }); + $(".btn.dropdown-toggle.create").on("click", function () { + let appName = []; + getData("apis/v4/unibase/platform/apps/myapps").then(async function (res) { + let response = await JSON.parse(res.result); + jQuery.each(response, async function (index, item) { + let installedAppId = Number(item.MyAppId); + await getData( + `apis/v4/unibase/platform/apps/listappconfigurations/installedappid/${installedAppId}` + ).then(function (result) { + if ( + result.result != null && + result.result != "" && + result.result != "[]" + ) { + let _data = JSON.parse(result.result); + let data = _data.filter((x) => x.SettingUrlType == 1); + if (data.length != 0) { + appName.push({ + SettingUrlType: data[0].SettingUrlType, + AppTitle: data[0].AppTitle, + FormId: data[0].FormId, + InstalledAppId: data[0].InstalledAppId, + RoleSettingAppId: data[0].RoleSettingAppId, + InstalledAppGuid: data[0].InstalledAppGuid, + AppConfigurationId: data[0].AppConfigurationId, + AppPermissionId: data[0].AppPermissionId, + AppConfigType: data[0].AppConfigType, + }); + } + } + }); + await appName.sort(function (a, b) { + var a1 = a.AppTitle.toLowerCase().trim(), b1 = b.AppTitle.toLowerCase().trim(); + if (a1 == b1) return 0; + return a1 > b1 ? 1 : -1; + }); + await createLoad(appName); + }); + }); + }); + $('[data-buttontype="Starred"]').on("click", function () { + let count = 20; + if ( + $('[data-buttontype="inbox"] .length').attr("data-taskscount") != + undefined + ) { + count = $('[data-buttontype="inbox"] .length').attr("data-taskscount"); + } + loadData( + `apis/v4/unibase/reminders/platform/getunreadreminders/ReminderType/1/PageSize/${count}`, + false + ); + }); + + $('[data-buttontype="unstarred"]').on("click", function () { + let count = 20; + if ( + $('[data-buttontype="inbox"] .length').attr("data-notificount") != + undefined + ) { + count = $('[data-buttontype="inbox"] .length').attr("data-notificount"); + } + loadData( + `apis/v4/unibase/reminders/platform/getunreadreminders/ReminderType/6/PageSize/${count}`, + false + ); + }); + $('[data-buttontype="all"]').on("click", function () { + loadData( + "apis/v4/unibase/reminders/platform/getuserreminders/PageSize/0", + false + ); + }); + $('[data-buttontype="read"]').on("click", function () { + $(".pdng.lst-Notifi").addClass("d-none"); + $(".pdng.lst-Notifi[data-isreaded='2']").removeClass("d-none"); + }); + $('[data-buttontype="unread"]').on("click", function () { + $(".pdng.lst-Notifi").addClass("d-none"); + $(".pdng.lst-Notifi[data-isreaded='8']").removeClass("d-none"); + }); + $('[data-buttontype="sent"]').on("click", function () { + loadData( + "apis/v4/unibase/reminders/platform/getuserreminders/PageSize/0", + true + ); + }); try { - loadData(); + loadData( + "apis/v4/unibase/reminders/platform/getuserreminders/PageSize/0", + false + ); } catch (error) { console.log("LoadData Method is not loading, and getting error"); } } + +export function stagesLoad() { + $(".stgs-li").each(function () { + let html = ""; + let InstalledAppId = $(this).attr("data-installedappid"); + getData( + `apis/v4/unibase/platform/apps/getallchangestageroles/installedappid/${InstalledAppId}` + ).then(function (stg_rslt) { + let data = JSON.parse(stg_rslt.result); + let _stage = data.filter(function (o) { + return o.IsDefault == true; + }); + html += ` + "; + $(`.stgs-li[data-installedappid='${InstalledAppId}']`).html(html); + }); + }); +} diff --git a/authentication/index.html b/authentication/index.html index 7c6148a..ee046c8 100644 --- a/authentication/index.html +++ b/authentication/index.html @@ -36,7 +36,7 @@
  • -
  • +
  • @@ -48,13 +48,13 @@
  • -
  • +
  • -
  • - @@ -88,14 +88,14 @@
  • -
  • +
  • Drive
  • -
  • +
  • Meet @@ -112,10 +112,6 @@ Create
  • @@ -126,30 +122,30 @@
  • - + Starred
  • -
  • +
  • Snoozed
  • - + Sent
  • -
  • +
  • Draft
  • -
  • +
  • More @@ -206,12 +202,23 @@ data-bs-toggle="dropdown" aria-expanded="false"> Toggle Dropdown -
  • @@ -265,14 +272,5 @@ - \ No newline at end of file diff --git a/login/index.html b/login/index.html index cd12daf..2b5daba 100644 --- a/login/index.html +++ b/login/index.html @@ -25,7 +25,7 @@
    - +
    @@ -43,7 +43,6 @@
    -
    @@ -52,9 +51,9 @@
    +
    - +
    @@ -73,7 +72,6 @@
    -