New Changes
This commit is contained in:
1 parent
b57b33189c
commit
24ebe8e8bd
7 files changed
+197
-140
No files matched your search
+11
-15
@@ -8,6 +8,7 @@
|
||||
--prmBgColor: rgb(244, 244, 221);
|
||||
--secdBgColor: #fafaf3;
|
||||
--secdSubColor: #f4f4f3;
|
||||
--lstPgArc: 15px;
|
||||
}
|
||||
|
||||
body {
|
||||
@@ -24,6 +25,7 @@ li {
|
||||
margin-right: 0px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.list-page {
|
||||
@@ -43,6 +45,7 @@ li {
|
||||
align-items: center;
|
||||
padding-left: 0px !important;
|
||||
padding-right: 0px !important;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
ul.tp-bar li {
|
||||
@@ -137,6 +140,8 @@ li.logo-li {
|
||||
height: inherit;
|
||||
margin: 0px 20px;
|
||||
background-color: var(--secdSubColor);
|
||||
border-top-left-radius: var(--lstPgArc);
|
||||
border-top-right-radius: var(--lstPgArc);
|
||||
}
|
||||
|
||||
.srch-bar {
|
||||
@@ -170,10 +175,15 @@ li.logo-li {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.icn-circle:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.icn-circle {
|
||||
background-color: firebrick;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.hdr {
|
||||
@@ -184,15 +194,6 @@ li.logo-li {
|
||||
background-color: #e3e3e3;
|
||||
}
|
||||
|
||||
.bdy {
|
||||
font-size: 16px;
|
||||
padding: 10px 5px;
|
||||
font-weight: 400;
|
||||
text-transform: capitalize;
|
||||
border-bottom: 1px solid white;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mnNvIcn,
|
||||
.mnNvIcn:focus {
|
||||
box-shadow: none !important;
|
||||
@@ -260,9 +261,4 @@ a.badge {
|
||||
}
|
||||
|
||||
|
||||
/* Scroll bar End Here */
|
||||
|
||||
.pgnt {
|
||||
border-top-left-radius: 50px;
|
||||
border-top-right-radius: 50px;
|
||||
}
|
||||
/* Scroll bar End Here */
|
||||
+31
-10
@@ -1,15 +1,36 @@
|
||||
function getDataObj(obj) {
|
||||
const serverUrl = 'https://test.bizgaze.app/';
|
||||
let _baseUserInfo = atob(document.cookie.split('=')[1]);
|
||||
let baseUserInfo = JSON.parse(_baseUserInfo).result;
|
||||
let baseSessionId = baseUserInfo.sessionId;
|
||||
|
||||
function getData(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 " + baseSessionId);
|
||||
xhr.setRequestHeader('geoposition', 0 + ':' + 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getData() {
|
||||
|
||||
}
|
||||
|
||||
function postDataObj(obj) {
|
||||
|
||||
}
|
||||
|
||||
function postData() {
|
||||
function formatLocal(dateTime) {
|
||||
var date = moment.utc(dateTime).local();
|
||||
var difmonths = moment().diff(date, 'months');
|
||||
|
||||
if (difmonths == 0) {
|
||||
return this.formatPeriod(date);
|
||||
}
|
||||
return date.format("DD MMM, YYYY HH:mm");
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t="transitionend",e=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},i=t=>{const i=e(t);return i&&document.querySelector(i)?i:null},n=t=>{const i=e(t);return i?document.querySelector(i):null},s=e=>{e.dispatchEvent(new Event(t))},o=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),r=t=>o(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,a=t=>{if(!o(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},l=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),c=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?c(t.parentNode):null},h=()=>{},d=t=>{t.offsetHeight},u=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,f=[],p=()=>"rtl"===document.documentElement.dir,g=t=>{var e;e=()=>{const e=u();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of f)t()})),f.push(e)):e()},m=t=>{"function"==typeof t&&t()},_=(e,i,n=!0)=>{if(!n)return void m(e);const o=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(i)+5;let r=!1;const a=({target:n})=>{n===i&&(r=!0,i.removeEventListener(t,a),m(e))};i.addEventListener(t,a),setTimeout((()=>{r||s(i)}),o)},b=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},v=/[^.]*(?=\..*)\.|.*/,y=/\..*/,w=/::\d+$/,A={};let E=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},C=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${E++}`||t.uidEvent||E++}function x(t){const e=O(t);return t.uidEvent=e,A[e]=A[e]||{},A[e]}function k(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function L(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=N(t);return C.has(o)||(o=t),[n,s,o]}function D(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=L(e,i,n);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=x(t),c=l[a]||(l[a]={}),h=k(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=O(r,e.replace(v,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return j(s,{delegateTarget:r}),n.oneOff&&P.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return j(n,{delegateTarget:t}),i.oneOff&&P.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function S(t,e,i,n,s){const o=k(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function I(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];S(t,e,i,n.callable,n.delegationSelector)}}function N(t){return t=t.replace(y,""),T[t]||t}const P={on(t,e,i,n){D(t,e,i,n,!1)},one(t,e,i,n){D(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=L(e,i,n),a=r!==e,l=x(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))I(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(w,"");if(!a||e.includes(n)){const
Line truncated
|
||||
//# sourceMappingURL=bootstrap.bundle.min.js.map
|
||||
@@ -0,0 +1,43 @@
|
||||
/*Data loading start here*/
|
||||
|
||||
let _userInfo = atob(document.cookie.split('=')[1]);
|
||||
let userInfo = JSON.parse(_userInfo).result;
|
||||
let sessionId = userInfo.sessionId;
|
||||
|
||||
let usrinfoHTML = `<li><a class="dropdown-item" href="javascript:void(0);">${userInfo.name}</a></li>
|
||||
<li><a class="dropdown-item" href="javascript:void(0);">Cloud Settings</a></li>
|
||||
<li><a class="dropdown-item" href="javascript:void(0);">Help</a></li>
|
||||
<li><a class="dropdown-item" href="javascript:void(0);">Logoff</a></li>`;
|
||||
$('.icn-circle').text(userInfo.name.charAt(0).toUpperCase())
|
||||
$('.uindtls').html(usrinfoHTML)
|
||||
|
||||
// List Page loading
|
||||
getData('apis/v4/unibase/reminders/platform/getunreadreminders/ReminderType/6/PageSize/20').then(function(result) {
|
||||
let response = JSON.parse(result.result);
|
||||
let bdyUI = '';
|
||||
for (var i = 0; i < response.length; i++) {
|
||||
bdyUI += `<li class="d-flex flex-row m-0 p-0 bg-white border-bottom" data-installedAppId="${response[i].RedirectOptions.InstalledAppId}" data-formId="${response[i].RedirectOptions.CreateFormId}">
|
||||
<img src="../assets/imgs/notification.png" class="img-fluid h-75 p-1" >
|
||||
<div class="d-flex flex-column">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="d-flex flex-column">
|
||||
<span>${response[i].Subject}</span>
|
||||
<span>${response[i].Message}</span>
|
||||
</div>
|
||||
<input class="form-check-input" type="checkbox" value="" id="flexCheckDefault">
|
||||
</div>
|
||||
<div class="d-flex justify-content-between mt-2">
|
||||
<span>21 days</span>
|
||||
<span>Mark as read</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>`;
|
||||
}
|
||||
$('.bdy-ul').html(bdyUI);
|
||||
})
|
||||
|
||||
/*Data loading start here*/
|
||||
$('.mnNvIcn').click(function() {
|
||||
$('.lft-nav-bar').toggleClass('lft-nav-bar-Wrap');
|
||||
$('.ctr-lst-pge').toggleClass('lft-nav-bar-Wrap');
|
||||
});
|
||||
+95
-95
@@ -1,4 +1,4 @@
|
||||
const serverUrl = 'http://localhost:3088/';
|
||||
const serverUrl = 'https://test.bizgaze.app/';
|
||||
const emailInputEl = document.getElementById('email');
|
||||
const passwordInputEl = document.getElementById('password');
|
||||
const emailErrEl = document.getElementById('emailErrMsg');
|
||||
@@ -14,134 +14,134 @@ passwordContainerEl.style.display = 'none';
|
||||
emailInputEl.focus();
|
||||
|
||||
function showPasswordBox() {
|
||||
const email = emailInputEl.value;
|
||||
if (validateEmailOrPhone()) {
|
||||
emailContainerEl.style.display = 'none';
|
||||
passwordContainerEl.style.display = 'block';
|
||||
document.getElementById('entered-email').innerHTML = email;
|
||||
passwordInputEl.focus();
|
||||
emailInputEl.classList.remove('error');
|
||||
emailErrEl.innerText = '';
|
||||
} else {
|
||||
emailInputEl.classList.add('error');
|
||||
emailErrEl.innerText = 'Please enter valid email or phone';
|
||||
}
|
||||
const email = emailInputEl.value;
|
||||
if (validateEmailOrPhone()) {
|
||||
emailContainerEl.style.display = 'none';
|
||||
passwordContainerEl.style.display = 'block';
|
||||
document.getElementById('entered-email').innerHTML = email;
|
||||
passwordInputEl.focus();
|
||||
emailInputEl.classList.remove('error');
|
||||
emailErrEl.innerText = '';
|
||||
} else {
|
||||
emailInputEl.classList.add('error');
|
||||
emailErrEl.innerText = 'Please enter valid email or phone';
|
||||
}
|
||||
}
|
||||
|
||||
function validateEmailOrPhone() {
|
||||
const value = emailInputEl.value.trim();
|
||||
const regx = /^[6-9]\d{9}$/;
|
||||
if (value.includes('@') || regx.test(value)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
const value = emailInputEl.value.trim();
|
||||
const regx = /^[6-9]\d{9}$/;
|
||||
if (value.includes('@') || regx.test(value)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function togglePassword() {
|
||||
const ele = document.getElementById('showPassword');
|
||||
const password = passwordInputEl;
|
||||
const ele = document.getElementById('showPassword');
|
||||
const password = passwordInputEl;
|
||||
|
||||
if (password.value.length > 0) {
|
||||
passwordInputEl.value = password.value;
|
||||
password.focus();
|
||||
if (ele.checked) {
|
||||
password.setAttribute('type', 'text');
|
||||
} else {
|
||||
password.setAttribute('type', 'password');
|
||||
if (password.value.length > 0) {
|
||||
passwordInputEl.value = password.value;
|
||||
password.focus();
|
||||
if (ele.checked) {
|
||||
password.setAttribute('type', 'text');
|
||||
} else {
|
||||
password.setAttribute('type', 'password');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onPasswordFocusOut() {
|
||||
const passwordLabel = document.getElementById('passwordLabel');
|
||||
if (passwordInputEl.value.length > 0) {
|
||||
passwordLabel.classList.add('password-fixed');
|
||||
} else {
|
||||
passwordLabel.classList.remove('password-fixed');
|
||||
}
|
||||
const passwordLabel = document.getElementById('passwordLabel');
|
||||
if (passwordInputEl.value.length > 0) {
|
||||
passwordLabel.classList.add('password-fixed');
|
||||
} else {
|
||||
passwordLabel.classList.remove('password-fixed');
|
||||
}
|
||||
}
|
||||
|
||||
function onEmailFocusOut() {
|
||||
const emailLabel = document.getElementById('emailLabel');
|
||||
if (emailInputEl.value.trim()) {
|
||||
emailLabel.classList.add('password-fixed');
|
||||
} else {
|
||||
emailLabel.classList.remove('password-fixed');
|
||||
}
|
||||
const emailLabel = document.getElementById('emailLabel');
|
||||
if (emailInputEl.value.trim()) {
|
||||
emailLabel.classList.add('password-fixed');
|
||||
} else {
|
||||
emailLabel.classList.remove('password-fixed');
|
||||
}
|
||||
}
|
||||
|
||||
function setCookie(name, value, days) {
|
||||
var expires = '';
|
||||
if (days) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
||||
expires = '; expires=' + date.toUTCString();
|
||||
}
|
||||
document.cookie = name + '=' + (value || '') + expires + '; path=/';
|
||||
var expires = '';
|
||||
if (days) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
||||
expires = '; expires=' + date.toUTCString();
|
||||
}
|
||||
document.cookie = name + '=' + (value || '') + expires + '; path=/';
|
||||
}
|
||||
|
||||
function loginUser(email, password) {
|
||||
const postData = JSON.stringify({
|
||||
UserName: email,
|
||||
Password: password,
|
||||
UnibaseId: '',
|
||||
RememberMe: false,
|
||||
});
|
||||
|
||||
const requestOptions = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: postData,
|
||||
redirect: 'follow',
|
||||
};
|
||||
|
||||
fetch(serverUrl + 'account/login', requestOptions)
|
||||
.then((response) => response.text())
|
||||
.then((result) => {
|
||||
const data = JSON.parse(result);
|
||||
if (data.status === 0) {
|
||||
setCookie('authentication', data.result.sessionId, 1);
|
||||
window.location = '../authentication';
|
||||
} else {
|
||||
passwordErrEl.innerText = data.message;
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
passwordErrEl.innerText = error;
|
||||
const postData = JSON.stringify({
|
||||
UserName: email,
|
||||
Password: password,
|
||||
UnibaseId: '',
|
||||
RememberMe: false,
|
||||
});
|
||||
|
||||
const requestOptions = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: postData,
|
||||
redirect: 'follow',
|
||||
};
|
||||
|
||||
fetch(serverUrl + 'account/login', requestOptions)
|
||||
.then((response) => response.text())
|
||||
.then((result) => {
|
||||
const data = JSON.parse(result);
|
||||
if (data.status === 0) {
|
||||
setCookie('_idty', btoa(result), 1);
|
||||
window.location = '../authentication';
|
||||
} else {
|
||||
passwordErrEl.innerText = data.message;
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
passwordErrEl.innerText = error;
|
||||
});
|
||||
}
|
||||
|
||||
function validateLogin() {
|
||||
const email = emailInputEl.value;
|
||||
const password = passwordInputEl.value;
|
||||
if (password.trim().length !== 0) {
|
||||
loginUser(email, password);
|
||||
} else {
|
||||
passwordInputEl.classList.add('error');
|
||||
passwordErrEl.innerText = 'Please enter valid password';
|
||||
}
|
||||
const email = emailInputEl.value;
|
||||
const password = passwordInputEl.value;
|
||||
if (password.trim().length !== 0) {
|
||||
loginUser(email, password);
|
||||
} else {
|
||||
passwordInputEl.classList.add('error');
|
||||
passwordErrEl.innerText = 'Please enter valid password';
|
||||
}
|
||||
}
|
||||
|
||||
function reEnterEmailClickHandler() {
|
||||
emailContainerEl.style.display = 'block';
|
||||
passwordContainerEl.style.display = 'none';
|
||||
emailInputEl.focus();
|
||||
emailContainerEl.style.display = 'block';
|
||||
passwordContainerEl.style.display = 'none';
|
||||
emailInputEl.focus();
|
||||
}
|
||||
|
||||
function initializeEventListeners() {
|
||||
emailNextBtn.addEventListener('click', showPasswordBox);
|
||||
emailNextBtn.addEventListener('click', showPasswordBox);
|
||||
|
||||
showPasswordChk.addEventListener('click', togglePassword);
|
||||
showPasswordChk.addEventListener('click', togglePassword);
|
||||
|
||||
passwordInputEl.addEventListener('focusout', onPasswordFocusOut);
|
||||
passwordInputEl.addEventListener('focusout', onPasswordFocusOut);
|
||||
|
||||
emailInputEl.addEventListener('focusout', onEmailFocusOut);
|
||||
emailInputEl.addEventListener('focusout', onEmailFocusOut);
|
||||
|
||||
loginSubmitBtn.addEventListener('click', validateLogin);
|
||||
loginSubmitBtn.addEventListener('click', validateLogin);
|
||||
|
||||
renterEmailLink.addEventListener('click', reEnterEmailClickHandler);
|
||||
renterEmailLink.addEventListener('click', reEnterEmailClickHandler);
|
||||
}
|
||||
|
||||
initializeEventListeners();
|
||||
initializeEventListeners();
|
||||
Reference in new issue
Block a user