New Changes
This commit is contained in:
@@ -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");
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -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();
|
||||
@@ -31,7 +31,13 @@
|
||||
<span><i class="la la-question-circle"></i></span>
|
||||
</li>
|
||||
<li>
|
||||
<span class="rounded-circle icn-circle">SS</span>
|
||||
<a href="javascript:void(0);" class="rounded-circle icn-circle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
SS
|
||||
</a>
|
||||
<ul class="dropdown-menu uindtls">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btm-bar">
|
||||
@@ -60,24 +66,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="ctr-lst-pge">
|
||||
<div class="row m-0 hdr">
|
||||
<div class="col-2">Code-1</div>
|
||||
<div class="col-3">
|
||||
name
|
||||
</div>
|
||||
<div class="col-4">Subject</div>
|
||||
<div class="col-2">Stages</div>
|
||||
<div class="col-1"></div>
|
||||
</div>
|
||||
<div class="row m-0 hdr">
|
||||
<div class="col-2">Code</div>
|
||||
<div class="col-3">
|
||||
name
|
||||
</div>
|
||||
<div class="col-4">Subject</div>
|
||||
<div class="col-2">Stages</div>
|
||||
<div class="col-1"></div>
|
||||
</div>
|
||||
|
||||
<ul class="m-0 p-0 bdy-ul">
|
||||
<li class="row m-0 bdy">
|
||||
<div class="col-2">TS10875</div>
|
||||
@@ -122,6 +111,7 @@
|
||||
</section>
|
||||
</body>
|
||||
<script src="../assets/js/jquery/jquery-3.6.1.min.js"></script>
|
||||
<script src="../assets/js/bootstrap/bootstrap.bundle.min.js"></script>
|
||||
<script src="../assets/js/base.js"></script>
|
||||
<script src="../assets/js/list.index.js"></script>
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="../assets/js/common.js"></script>
|
||||
<script src="./assets/js/common.js"></script>
|
||||
<script>
|
||||
if (isAuthenticated()) {
|
||||
window.location = './authentication';
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user