diff --git a/assets/css/list.page.css b/assets/css/list.page.css index 80830c8..861e3f4 100644 --- a/assets/css/list.page.css +++ b/assets/css/list.page.css @@ -1,284 +1,477 @@ -@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap'); +@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap"); :root { - --topNavHeight: 75px; - --rtrWidth: 50px; - --lftWidth: 275px; - --tpMenuPad: 30px; - --icnPadng: 10px 0px; - --prmBgColor: rgb(244, 244, 221); - --secdBgColor: #fafaf3; - --secdSubColor: #f4f4f3; - --lstPgArc: 15px; + --topNavHeight: 75px; + --rtrWidth: 60px; + --lftWidth: 275px; + --tpMenuPad: 30px; + --icnPadng: 10px 0px; + --prmBgColor: rgb(244, 244, 221); + --secdBgColor: #fafaf3; + --secdSubColor: #f4f4f3; + --lstPgArc: 15px; + --frmIfrmeWidth: 500px; + --frmIfrmeHeight: 550px; + --frmIfrmeHeightPopUp: 80%; +} +a { + color: #000 !important; + text-decoration: none !important; } - body { - margin: 0px; - padding: 0px; - font-family: 'Poppins', sans-serif; + margin: 0px; + padding: 0px; + font-family: "Poppins", sans-serif; } ul, li { - margin: 0px; - padding: 0px; - margin-left: 0px; - margin-right: 0px; - padding-left: 0px; - padding-right: 0px; - list-style: none; + margin: 0px; + padding: 0px; + margin-left: 0px; + margin-right: 0px; + padding-left: 0px; + padding-right: 0px; + list-style: none; } .list-page { - display: flex; - flex-direction: column; + padding: 0px !important; + display: flex; + flex-direction: column; } .tp-bar { - width: 100%; - position: fixed; - top: 0px; - left: 0px; - height: var(--topNavHeight); - display: flex; - flex-direction: row; - list-style: none; - align-items: center; - padding-left: 0px !important; - padding-right: 0px !important; - z-index: 1000; + width: 100%; + top: 0px; + left: 0px; + height: var(--topNavHeight); + display: flex; + flex-direction: row; + list-style: none; + align-items: center; + padding-left: 0px !important; + padding-right: 0px !important; + z-index: 1000; + margin-bottom: 0px; } ul.tp-bar li { - margin: 0px 16px; + margin: 0px 16px; } li.logo-li { - display: flex; - flex-direction: row; - align-items: center; - width: calc(var(--lftWidth) - var(--tpMenuPad)); + display: flex; + flex-direction: row; + align-items: center; + width: calc(var(--lftWidth)); + margin-left: 0px !important; } -.logo { - font-size: 25px; - margin-left: 25px; +.logo-li .logo-img { + height: 50px; + margin-left: 15px; + padding: 8px; } .btm-bar { - position: fixed; - top: var(--topNavHeight); - left: 0; - height: calc(100vh -var(--topNavHeight)); - width: 100%; - height: 100%; - display: flex; - flex-direction: row; + top: var(--topNavHeight); + left: 0; + height: calc(100vh - var(--topNavHeight)); + width: 100%; + height: 100%; + display: flex; + flex-direction: row; } .lft-nav-bar { - position: fixed; - left: 0; - width: var(--lftWidth); - height: inherit; - display: flex; - flex-direction: row; + position: fixed; + left: 0; + width: var(--lftWidth); + height: inherit; + display: flex; + flex-direction: row; } .lft-nav-bar .lft-nav-bar-1, .lft-nav-bar .lft-nav-bar-2 { - list-style: none; - margin-bottom: 0px !important; - padding-left: 0px !important; + list-style: none; + margin-bottom: 0px !important; + padding-left: 0px; } - .lft-nav-bar-1 { - width: var(--rtrWidth); - display: flex; - flex-direction: column; - align-items: center; - background-color: var(--prmBgColor); + padding: 0px 5px !important; + width: var(--rtrWidth); + display: flex; + flex-direction: column; + align-items: center; + background-color: var(--prmBgColor); } -.lft-nav-bar-1 li, -.lft-nav-bar-2 li { - margin: var(--icnPadng); +.lft-nav-bar-1 li { + margin: 4px 0px; } - .lft-nav-bar-2 li { - font-size: 16px; - padding: 0px 15px; + margin: 6px 0px; +} +.lft-nav-bar-2 li { + font-size: 16px; + padding: 0px 15px; } .lft-nav-bar-2 { - width: calc(var(--lftWidth) - var(--rtrWidth)); - display: flex; - flex-direction: column; - background-color: var(--secdBgColor); - transition: width 0.3s; + width: calc(var(--lftWidth) - var(--rtrWidth)); + display: flex; + flex-direction: column; + background-color: var(--secdBgColor); + transition: width 0.3s; } .rtr-nav-bar { - position: fixed; - right: 0; - width: var(--rtrWidth); - height: inherit; - background-color: var(--prmBgColor); - list-style: none; - display: flex; - flex-direction: column; - align-items: center; + position: fixed; + right: 0; + width: var(--rtrWidth); + height: inherit; + background-color: var(--prmBgColor); + list-style: none; + display: flex; + flex-direction: column; + align-items: center; } .rtr-nav-bar span { - margin: var(--icnPadng); + margin: var(--icnPadng); } .ctr-lst-pge { - position: fixed; - z-index: 2; - left: var(--lftWidth); - right: var(--rtrWidth); - height: inherit; - margin: 0px 20px; - background-color: var(--secdSubColor); - border-top-left-radius: var(--lstPgArc); - border-top-right-radius: var(--lstPgArc); + position: fixed; + z-index: -1; + left: var(--lftWidth); + right: var(--rtrWidth); + height: inherit; + margin: 0px 20px; + background-color: var(--secdSubColor); + border-top-left-radius: var(--lstPgArc); + border-top-right-radius: var(--lstPgArc); } .srch-bar { - width: 35%; + width: 35%; } .form-control#searchBar { - padding: 10px; - box-shadow: none; - width: 100%; + padding: 10px; + box-shadow: none; + width: 100%; } .ml-auto { - margin-left: auto !important; + margin-left: auto !important; } .mr-auto { - margin-right: auto !important; + margin-right: auto !important; } .mt-auto { - margin-top: auto !important; + margin-top: auto !important; } .mb-auto { - margin-bottom: auto !important; + margin-bottom: auto !important; } -.la { - font-size: 20px; - color: black; +.la, +[class^="ri-"] { + font-size: 1.2em; + color: black; +} +.lft-nav-bar-2 [class^="ri-"] { + font-size: 1.35em; + color: black; } .icn-circle:hover { - color: white; + color: white; } .icn-circle { - background-color: firebrick; - color: white; - padding: 10px; - text-decoration: none; + font-size: 12px; + background-color: firebrick; + color: white; + padding: 8px; + text-decoration: none; } .hdr { - font-size: 16px; - padding: 10px 5px; - font-weight: 600; - text-transform: capitalize; - background-color: #e3e3e3; + font-size: 16px; + padding: 10px 5px; + font-weight: 600; + text-transform: capitalize; + background-color: #e3e3e3; } .mnNvIcn, .mnNvIcn:focus { - box-shadow: none !important; + box-shadow: none !important; +} +.mnNvIcn-div { + width: var(--rtrWidth); + display: flex; + justify-content: center; + align-items: center; +} +.mnNvIcn { + text-decoration: none; + margin: 0px 5px; +} +.mnNvIcn:hover { + /* background-color: var(--prmBgColor); */ + background-color: #e8eaed; + padding: 3px 7px; + border-radius: 50%; } .lft-nav-bar.lft-nav-bar-Wrap { - width: var(--rtrWidth); - transition: width 0.3s; + width: var(--rtrWidth); + transition: width 0.3s; } .lft-nav-bar.lft-nav-bar-Wrap .lft-nav-bar-2 { - display: none; - transition: display 0.3s; + display: none; + transition: display 0.3s; } .bdy-ul { - height: 100%; - overflow-y: scroll; + height: 100%; + overflow-y: scroll; } .ctr-lst-pge.lft-nav-bar-Wrap { - left: var(--rtrWidth); - transition: left 0.3s; + left: var(--rtrWidth); + transition: left 0.3s; } a.badge { - font-size: 14px; - font-weight: 500; - color: inherit; - text-decoration: none; + font-size: 14px; + font-weight: 500; + color: inherit; + text-decoration: none; } .badge.badge-soft-green, .badge.badge-soft-success { - background: #E6FBF2; - color: #00D67F; + background: #e6fbf2; + color: #00d67f; } - /* scroll bar start here*/ ::-webkit-scrollbar { - width: 6px; + width: 6px; } - /* Track */ - ::-webkit-scrollbar-track { - background: #f1f1f1; +::-webkit-scrollbar-track { + background: #f1f1f1; } - /* Handle */ - ::-webkit-scrollbar-thumb { - background: #888; +::-webkit-scrollbar-thumb { + background: #888; } - /* Handle on hover */ - ::-webkit-scrollbar-thumb:hover { - background: #555; +::-webkit-scrollbar-thumb:hover { + background: #555; } - /* Scroll bar End Here */ .accordion-button::after { - background-size: 0.9rem !important; - ; + background-size: 0.9rem !important; } a[role="button"]:focus { - box-shadow: none !important; + box-shadow: none !important; } #notifi-list .item-li:first .accordion-button:not(.collapsed) { - border-top-left-radius: var(--lstPgArc); - border-top-right-radius: var(--lstPgArc); + border-top-left-radius: var(--lstPgArc); + border-top-right-radius: var(--lstPgArc); } input[type="checkbox"] { - box-shadow: none !important; - border-radius: 2px; -} \ No newline at end of file + box-shadow: none !important; + border-radius: 2px; +} + +.snd-fd-biz { + border-top: 1px solid rgba(0, 0, 0, 0.15); +} +.tp-bar li a { + padding: 3px 7px; + margin-top: 3px; +} +.nav-lft-item { + padding: 3px 7px; + display: flex; + flex-direction: column; + align-items: center; +} +.nav-lft-item span:nth-child(1) { + padding: 3px 7px; +} +.nav-lft-item span:nth-child(2) { + font-size: 13px; + color: #000; + font-weight: 400; +} +.tp-bar li a.nav-lft-item:hover { + padding-bottom: 5px !important; + padding: 8px; + background-color: #e8eaed; + border-radius: 50%; +} +button { + box-shadow: none !important; +} +button:focus { + box-shadow: none !important; +} +.plus { + color: #000; + margin-right: 8px; +} +.plus + span { + margin-right: 8px; + margin-bottom: 2px; +} +.create { + display: flex !important; + align-items: center; + color: #000 !important; + padding: 8px 8px !important; + background-color: var(--prmBgColor) !important; + border-color: var(--prmBgColor) !important; + border-top-left-radius: 18px !important; + border-bottom-left-radius: 18px !important; + border-top-right-radius: 18px !important; + border-bottom-right-radius: 18px !important; +} +.sub-nav-item { + display: flex; + align-items: center; + padding: 4px 10px !important; + font-size: 14px; + text-decoration: none; + color: #000; +} +.sub-nav-item.active, +.sub-nav-item:hover { + color: #000; + background-color: var(--prmBgColor); + border-top-left-radius: 16px; + border-top-right-radius: 16px; + border-bottom-left-radius: 16px; + border-bottom-right-radius: 16px; +} +.sub-nav-item span { + margin-right: 10px; +} +.nav-lft-item.active span:nth-child(1), +.nav-lft-item:hover span:nth-child(1) { + background-color: var(--secdBgColor); + border-radius: 50%; + padding: 3px 7px; +} +ul.ul-drpdown li { + padding: 0px !important; +} +ul.hdr-ul { + display: flex; + flex-direction: row; + align-items: center; + background-color: var(--secdBgColor); + border-top-left-radius: var(--lstPgArc); + border-top-right-radius: var(--lstPgArc); + height: 50px; +} +.chk-box-btn { + background-color: unset; + box-shadow: none; +} +ul.hdr-ul li { + margin: 0px 8px; +} +.pggtn { + padding: 0px 8px; + display: flex; + flex-direction: row; + align-items: center; +} +.li-pgn { + display: flex; + flex-direction: row; + align-items: center; + margin-left: auto !important; +} +.pggtn .lss-than, +.pggtn .grtr-than { + margin: 0px 8px; +} +.nt-actve .la, +.nt-actve [class^="ri-"] { + color: #e3e3e3 !important; +} +.rtr-nav-bar .rtr-item { + margin: 4px; + padding: 6px 12px; +} +.rtr-nav-bar .rtr-item:hover { + background-color: var(--secdBgColor); + border-radius: 50%; + padding: 6px 10px; +} +.frm-ifre { + width: var(--frmIfrmeWidth); + z-index: 1; + background-color: #f3f3f3; + height: var(--frmIfrmeHeight); + position: absolute; + bottom: 0px; + right: calc(var(--rtrWidth) + 20px); + border: 1px solid #dadada; + border-radius: 3px; +} +.frm-hdr { + padding: 0px 10px; + height: 40px; + display: flex; + flex-direction: row; + align-items: center; +} +.frm-hdr .ctrl { + margin-left: auto; + height: 40px; + display: flex; + flex-direction: row; + align-items: center; +} +.frm-hdr .ctrl .la { + font-size: 16px; + color: #000; +} +.frm-hdr .ctrl a { + margin: 0px 8px; +} +.ld-frm-src { + width: var(--frmIfrmeWidth); + height: calc(var(--frmIfrmeHeight) - 42px); +} +#crte-btn-lst { + height: 400px; + overflow-y: scroll; +} diff --git a/assets/css/login.css b/assets/css/login.css index 45e83c2..b467dba 100644 --- a/assets/css/login.css +++ b/assets/css/login.css @@ -1,4 +1,4 @@ -@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap'); +@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap"); html, body, @@ -13,282 +13,281 @@ h6, p, a, input { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; } body { - margin: 0; - font-family: 'Poppins', sans-serif; - color: #3d3d3d; + margin: 0; + font-family: "Poppins", sans-serif; + color: #3d3d3d; } .d-none { - display: none; + display: none; } .biz-login-wrap { - width: 100%; - display: flex; - align-items: center; - height: 100vh; - margin: 0; + width: 100%; + display: flex; + align-items: center; + height: 100vh; + margin: 0; } .biz-login-wrap .form-container { - width: 375px; - height: auto; - margin: auto; - position: relative; - padding: 40px; - border: 1px solid #dadce0; - border-radius: 5px; - overflow: hidden; + width: 375px; + height: auto; + margin: auto; + position: relative; + padding: 40px; + border: 1px solid #dadce0; + border-radius: 5px; + overflow: hidden; } .biz-login-wrap .form-group { - position: relative; + position: relative; } .biz-login-wrap .form-group input { - width: 100%; - box-sizing: border-box; - border: 1px solid #d0d0d0; - background-color: transparent; - border-radius: 4px; - color: #202124; - font-size: 16px; - margin: 1px 1px 0 1px; - padding: 13px 15px; - z-index: 1; + width: 100%; + box-sizing: border-box; + border: 1px solid #d0d0d0; + background-color: transparent; + border-radius: 4px; + color: #202124; + font-size: 16px; + margin: 1px 1px 0 1px; + padding: 13px 15px; + z-index: 1; } .biz-login-wrap .form-group input.error { - border-color: #d93025; + border-color: #d93025; } .biz-login-wrap .form-group label { - position: absolute; - left: 10px; - top: 50%; - transform: translateY(-50%); - color: #a5a5a5; - font-size: 16px; - padding: 0px 4px; - background-color: white; - transition-property: transform; - transition-duration: 500ms; - z-index: -1; + position: absolute; + left: 10px; + top: 50%; + transform: translateY(-50%); + color: #a5a5a5; + font-size: 16px; + padding: 0px 4px; + background-color: white; + transition-property: transform; + transition-duration: 500ms; + z-index: -1; } .biz-login-wrap .form-link a { - color: #1a73e8; - font-size: 16px; - font-weight: 500; + color: #1a73e8; + font-size: 16px; + font-weight: 500; } .biz-login-wrap .form-link label { - color: #5f6368; - font-size: 14px; - display: inline-block; + color: #5f6368; + font-size: 14px; + display: inline-block; } -.email-input:focus+label { - transform: translate3d(0, -175%, 0); - z-index: 1; - color: #1a73e8; +.email-input:focus + label { + transform: translate3d(0, -175%, 0); + z-index: 1; + color: #1a73e8; } -.biz-login-wrap .password-input:focus+label { - transform: translate3d(0, -175%, 0); - z-index: 1; - color: #1a73e8; +.biz-login-wrap .password-input:focus + label { + transform: translate3d(0, -175%, 0); + z-index: 1; + color: #1a73e8; } -.biz-login-wrap .form-group input.error:focus+label { - color: #d93025; +.biz-login-wrap .form-group input.error:focus + label { + color: #d93025; } .biz-login-wrap .form-group label.password-fixed { - transform: translate3d(0, -175%, 0); - z-index: 1 !important; - color: #1a73e8; + transform: translate3d(0, -175%, 0); + z-index: 1 !important; + color: #1a73e8; } .biz-login-wrap .form-header { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - row-gap: 20px; - margin-bottom: 40px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + row-gap: 20px; + margin-bottom: 40px; } .biz-login-wrap .form-header h2 { - margin: 0; - font-size: 24px; - font-weight: 500; + margin: 0; + font-size: 24px; + font-weight: 500; } .biz-login-wrap .form-header h4 { - font-size: 16px; - font-weight: 500; + font-size: 16px; + font-weight: 500; } .biz-login-wrap .form-body { - display: flex; - flex-direction: column; - row-gap: 30px; + display: flex; + flex-direction: column; + row-gap: 30px; } .biz-login-wrap .password-form-box { - row-gap: 60px; + row-gap: 60px; } .biz-login-wrap .login-logo { - width: 150px; - margin: 0 auto; + width: 150px; + margin: 0 auto; } .biz-login-wrap .btn { - float: right; - color: white; - background: #1a73e8; - border: 0; - padding: 8px 22px; - border-radius: 4px; - font-weight: 500; - font-size: 16px; - cursor: pointer; + float: right; + color: white; + background: #1a73e8; + border: 0; + padding: 8px 22px; + border-radius: 4px; + font-weight: 500; + font-size: 16px; + cursor: pointer; } .biz-login-wrap a { - text-decoration: none; + text-decoration: none; } .biz-login-wrap .flex-between-center { - display: flex; - align-items: center; - justify-content: space-between; + display: flex; + align-items: center; + justify-content: space-between; } .biz-login-wrap .mt-5 { - margin-top: 5px; + margin-top: 5px; } .biz-login-wrap .mt-10 { - margin-top: 10px; + margin-top: 10px; } .biz-login-wrap .password-checkbox { - width: 20px; - height: 20px; - margin-right: 5px; + width: 20px; + height: 20px; + margin-right: 5px; } .biz-login-wrap .show-password-link { - display: flex; - align-items: center; - column-gap: 10px; - margin-top: 15px; + display: flex; + align-items: center; + column-gap: 10px; + margin-top: 15px; } .biz-login-wrap .show-password-link label { - font-size: 16px; - font-weight: 500; + font-size: 16px; + font-weight: 500; } .biz-login-wrap .err-msg:not(:empty) { - color: #d93025; - font-size: 12px; - margin-top: 5px; + color: #d93025; + font-size: 12px; + margin-top: 5px; } .biz-login-wrap h4 { - font-size: 16px; - font-weight: 500; + font-size: 16px; + font-weight: 500; } -.biz-login-wrap #txt_PhoneorMail:focus+label { - transform: translate3d(0, -175%, 0); - z-index: 1; - color: #1a73e8; +.biz-login-wrap #txt_PhoneorMail:focus + label { + transform: translate3d(0, -175%, 0); + z-index: 1; + color: #1a73e8; } -.biz-login-wrap #txt_Code:focus+label { - transform: translate3d(0, -175%, 0); - z-index: 1; - color: #1a73e8; +.biz-login-wrap #txt_Code:focus + label { + transform: translate3d(0, -175%, 0); + z-index: 1; + color: #1a73e8; } -.biz-login-wrap #txt_NewPassword:focus+label { - transform: translate3d(0, -175%, 0); - z-index: 1; - color: #1a73e8; +.biz-login-wrap #txt_NewPassword:focus + label { + transform: translate3d(0, -175%, 0); + z-index: 1; + color: #1a73e8; } -#txt_ConfirmPassword:focus+label { - transform: translate3d(0, -175%, 0); - z-index: 1; - color: #1a73e8; +#txt_ConfirmPassword:focus + label { + transform: translate3d(0, -175%, 0); + z-index: 1; + color: #1a73e8; } .back-btn { - text-align: right; - margin: 0px 20px; + text-align: right; + margin: 0px 20px; } .btn-block { - margin-top: 10px; - margin-bottom: 20px; + margin-top: 10px; + margin-bottom: 20px; } .btn-block { - width: 100%; + width: 100%; } .opt-text { - text-align: center; - margin: 10px 0px; + text-align: center; + margin: 10px 0px; } .verify-block { - margin: 10px 0px; + margin: 10px 0px; } .verify-block .btn { - margin-left: 5px; + margin-left: 5px; } .biz-login-wrap h2 { - margin: 0; - font-size: 24px; - font-weight: 500; - text-align: center; + margin: 0; + font-size: 24px; + font-weight: 500; + text-align: center; } .reset-success { - text-align: center; - margin: 20px 0px; + text-align: center; + margin: 20px 0px; } .conformPassword { - margin-top: 30px; + margin-top: 30px; } -.error-warning{ - font-weight:700 ; - color: white; - margin-right: 5px; +.error-warning { + font-weight: 700; + color: white; + margin-right: 5px; } div#div_ValidationSummary { - background: #ce1717; - color: white; - + background: #ce1717; + color: white; +} +.p-2 { + padding: 5px; } -.p-2{ - padding: 5px; -} \ No newline at end of file diff --git a/assets/js/base.js b/assets/js/base.js index 07de321..e5b97de 100644 --- a/assets/js/base.js +++ b/assets/js/base.js @@ -1,80 +1,90 @@ -import { - decrypt -} from "./cookiehelper.js"; -import { - _serverUrl -} from "./setting.js"; +import {decrypt} from "./cookiehelper.js"; +import {_serverUrl} from "./setting.js"; let serverUrl = _serverUrl(); -let baseUserInfo = decrypt(document.cookie.split('=')[1]); +let baseUserInfo = decrypt(document.cookie.split("=")[1]); let baseSessionId = baseUserInfo.sessionId; export function getData(url) { - var datastr = null; - var method = "GET"; - let serviceurl = serverUrl + url; + var datastr = null; + var method = "GET"; + let serviceurl = serverUrl + url; - return $.ajax({ - type: method, - url: serviceurl, - crossDomain: true, - contentType: "application/json", - cache: true, - jsonp: false, - data: datastr, - beforeSend: function(xhr) { - if (baseUserInfo != undefined && baseUserInfo != null) { - xhr.setRequestHeader("Authorization", "Basic " + JSON.parse(baseUserInfo).sessionId); - xhr.setRequestHeader('geoposition', 0 + ':' + 0); - } - } - }); + return $.ajax({ + type: method, + url: serviceurl, + crossDomain: true, + contentType: "application/json", + cache: true, + jsonp: false, + data: datastr, + beforeSend: function (xhr) { + if (baseUserInfo != undefined && baseUserInfo != null) { + xhr.setRequestHeader( + "Authorization", + "Basic " + JSON.parse(baseUserInfo).sessionId + ); + xhr.setRequestHeader("geoposition", 0 + ":" + 0); + } + }, + }); } -export function getDataObj(url, data, async, type) { //url, data, true, "POST" +export function getDataObj(url, data, async, type) { + //url, data, true, "POST" - let serviceurl = serverUrl + url; - return $.ajax({ - type: type, - url: serviceurl, - data: JSON.stringify(data), - contentType: 'application/json', - traditional: true, - crossDomain: true, - async: async, - beforeSend: function(xhr) { - if (baseUserInfo != undefined && baseUserInfo != null) { - xhr.setRequestHeader('Authorization', 'Basic ' + JSON.parse(baseUserInfo).sessionId); - xhr.setRequestHeader('geoposition', 0 + ':' + 0); - } - } - }); + let serviceurl = serverUrl + url; + return $.ajax({ + type: type, + url: serviceurl, + data: JSON.stringify(data), + contentType: "application/json", + traditional: true, + crossDomain: true, + async: async, + beforeSend: function (xhr) { + if (baseUserInfo != undefined && baseUserInfo != null) { + xhr.setRequestHeader( + "Authorization", + "Basic " + JSON.parse(baseUserInfo).sessionId + ); + xhr.setRequestHeader("geoposition", 0 + ":" + 0); + } + }, + }); } export function formatLocal(dateTime) { - var hou = new Date(dateTime).getHours(), - sec, min, day, month, years; - if (hou < 24) { - min = new Date(dateTime).getMinutes(); - if (min < 60) { - sec = new Date(dateTime).getSeconds(); - if (sec < 60) { - return sec + ' Seconds'; - } - } else { - return min + ' Minutes'; - } - return hou + ' Hours'; - } else { //24 > - day = new Date(dateTime).getHours(); - if (day > 31) { // 31 day - month = new Date(dateTime).getMonth(); - if (month > 12) { // 12 months - years = new Date(dateTime).getFullYear(); - return years + ' Years'; - } - return month + ' month'; - } - return day + ' day'; + var hou = new Date(dateTime).getHours(), + sec, + min, + day, + month, + years; + if (hou < 24) { + min = new Date(dateTime).getMinutes(); + if (min < 60) { + sec = new Date(dateTime).getSeconds(); + if (sec < 60) { + return sec + " Seconds"; + } + } else { + return min + " Minutes"; } -} \ No newline at end of file + return hou + " Hours"; + } else { + //24 > + day = new Date(dateTime).getHours(); + if (day > 31) { + // 31 day + month = new Date(dateTime).getMonth(); + if (month > 12) { + // 12 months + years = new Date(dateTime).getFullYear(); + return years + " Years"; + } + return month + " month"; + } + return day + " day"; + } +} diff --git a/assets/js/cookiehelper.js b/assets/js/cookiehelper.js index ef926a6..84976d8 100644 --- a/assets/js/cookiehelper.js +++ b/assets/js/cookiehelper.js @@ -1,6 +1,6 @@ -const cryptoProvider = window['CryptoJS']; -const cryptoAlgorithm = window['CryptoJS'].AES; -const _secretKey = 'unibase'; +const cryptoProvider = window["CryptoJS"]; +const cryptoAlgorithm = window["CryptoJS"].AES; +const _secretKey = "unibase"; export function encrypt(content) { return cryptoAlgorithm.encrypt(content, _secretKey).toString(); @@ -13,29 +13,29 @@ export function decrypt(encoded) { } export function setCookie(cname, cvalue, exdays) { - let _cookievalue = ''; + let _cookievalue = ""; if (cvalue) { _cookievalue = encrypt(cvalue); } var d = new Date(); d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000); - var expires = 'expires=' + d.toUTCString(); + var expires = "expires=" + d.toUTCString(); document.cookie = cname + - '=' + + "=" + _cookievalue + - ';' + + ";" + expires + - ';path=/;samesite=none;secure=true'; + ";path=/;samesite=none;secure=true"; } export function getCookie(cname) { - var name = cname + '='; + var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); - var ca = decodedCookie.split(';'); + var ca = decodedCookie.split(";"); for (var i = 0; i < ca.length; i++) { var c = ca[i]; - while (c.charAt(0) === ' ') { + while (c.charAt(0) === " ") { c = c.substring(1); } @@ -45,11 +45,11 @@ export function getCookie(cname) { return cookie_decrypt; } } - return ''; + return ""; } export function isAuthenticated() { - if (getCookie('_idty')) { + if (getCookie("_idty")) { return true; } return false; diff --git a/assets/js/forgotpassword.js b/assets/js/forgotpassword.js index 674da5e..0c6e2d8 100644 --- a/assets/js/forgotpassword.js +++ b/assets/js/forgotpassword.js @@ -1,142 +1,147 @@ -const serverUrl = 'http://localhost:3086/'; +const serverUrl = "http://localhost:3086/"; let otpid; let sendotp; let unibaseid; async function showOtpBox() { - let inputdetails = document.getElementById('txt_PhoneorMail').value; + let inputdetails = document.getElementById("txt_PhoneorMail").value; - let sendnumber = await fetch(serverUrl + 'account/getuserbyphoneormail/' + inputdetails + '/' + inputdetails) - let textdata = await sendnumber.json(); - if (textdata.result != null) { - unibaseid = textdata.result.unibaseId; - var myHeaders = new Headers(); - myHeaders.append("Content-Type", "application/json"); + let sendnumber = await fetch( + serverUrl + + "account/getuserbyphoneormail/" + + inputdetails + + "/" + + inputdetails + ); + let textdata = await sendnumber.json(); + if (textdata.result != null) { + unibaseid = textdata.result.unibaseId; + var myHeaders = new Headers(); + myHeaders.append("Content-Type", "application/json"); - var raw = JSON.stringify({ - "FirstName": "", - "LastName": "", - "ContactNumber": "", - "Email": "", - "TenantName": "", - "ContactOrEmail": inputdetails, - "IsSignup": false, - "IsRegisterUser": false, - "IsForgotPswd": true, - "UnibaseId": unibaseid, - "OtpId": 0, - "UserOtp": "" - }); + var raw = JSON.stringify({ + FirstName: "", + LastName: "", + ContactNumber: "", + Email: "", + TenantName: "", + ContactOrEmail: inputdetails, + IsSignup: false, + IsRegisterUser: false, + IsForgotPswd: true, + UnibaseId: unibaseid, + OtpId: 0, + UserOtp: "", + }); - var requestOptions = { - method: 'POST', - headers: myHeaders, - body: raw, - redirect: 'follow' - }; + var requestOptions = { + method: "POST", + headers: myHeaders, + body: raw, + redirect: "follow", + }; - fetch(serverUrl + 'account/sendotp', requestOptions) - .then(response => response.text()) - .then(function(result) { - optid = result; - document.getElementById('div_ForgotPswd').style.display = 'none'; - document.getElementById('modal_Otp').style.display = 'block'; - document.getElementById('div_ValidationSummary').innerHTML = ""; - }) - .catch(error => console.log('error', error)); - } else { - let html = '