Iniit
This commit is contained in:
@@ -0,0 +1,151 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class MobilRegister extends Unibase.Platform.Core.BaseComponent {
|
||||
submit() {
|
||||
}
|
||||
jsFiles() {
|
||||
return ["tenants/themes/compact/index.anonymous.js", "platform/membership/managers/accountmanager.js", "platform/core/helpers/navigation/navigationhelper.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
}
|
||||
cssFiles() {
|
||||
return ["libs/passwordrequirement/passwordrequirement.css"];
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
const html = `<div>
|
||||
<form id="frm_Register">
|
||||
<div id="bizgaze_SpiltErrorMessages"></div>
|
||||
<div id="div_CreatePswd">
|
||||
<h1 class="display-4 mb-30 text-dark-100 text-center">Register</h1>
|
||||
<div class="alert alert-primary">We will send link to your <a href=""><u>Email</u></a> to create your password.</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" id="lbl_Email">Email Address</label>
|
||||
<input id="signupEmail" value="" class="form-control input-lg text-dark" disabled="disabled">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label w-100">New Password</label>
|
||||
<input type="password" id="signupPassword" placeholder="Type a password" class="pr-password signupPassword form-control input-lg" autocomplete="off">
|
||||
<span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
|
||||
<div class="showpwsdreq"></div>
|
||||
</div>
|
||||
<div class="form-group ">
|
||||
<label class="control-label w-100">Confirm Password</label>
|
||||
<input type="password" id="ConfirmPassword" placeholder="Type a password" class="ConfirmPassword form-control input-lg" autocomplete="new-password">
|
||||
<span toggle="#InputPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
|
||||
</div>
|
||||
<button class="btn btn-primary btn-block mb-20"
|
||||
type="button" id="btnSignUp">Register</button><p class="text-right"><a href="Index.html#/login">
|
||||
Back to login</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="div_SuccessMsg" class="d-none">
|
||||
<div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i>
|
||||
</div>
|
||||
<h1 class="display-4 mb-20 text-center">Password Created Successfully</h1>
|
||||
<p class="text-center"><a href="Index.html#/login">Click here to Login</a></p>
|
||||
</div>
|
||||
</form>`;
|
||||
return html;
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
var _fileCacheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#div_modalbody").removeAttr("style");
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
$(".pr-password").click(function () {
|
||||
var signUpPswd = $(".pr-password");
|
||||
signUpPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
$("#PasswordHide").click(function () {
|
||||
var input = $('#signupPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$("#PasswordHide").toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#confirmPasswordHide").click(function () {
|
||||
var input = $('#ConfirmPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#confirmPasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$(".btn-outline-secondary").addClass('hidden');
|
||||
}
|
||||
register(obj) {
|
||||
var instance = this;
|
||||
$("#signupEmail").val(obj.email);
|
||||
$(document).bind('keypress', function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
$('#btnSignUp').trigger('click');
|
||||
}
|
||||
});
|
||||
$("#btnSignUp").click(function () {
|
||||
instance.signupregister(obj.userid, obj.tenant, obj.email, obj.phonenumber);
|
||||
});
|
||||
}
|
||||
signupregister(unibseid, tenantid, email, phonenumber) {
|
||||
var instance = this;
|
||||
var ConfirmPassword = $(".ConfirmPassword").val().toString();
|
||||
var password = $(".signupPassword").val().toString();
|
||||
var tenantid = tenantid;
|
||||
var unibaseid = unibseid;
|
||||
var email = email;
|
||||
var phonenumber = phonenumber;
|
||||
if (password == '' || ConfirmPassword == '') {
|
||||
MessageHelper.Instance().showError("Password cannot be empty", "bizgaze_SpiltErrorMessages");
|
||||
return false;
|
||||
}
|
||||
if ($(".signupPassword").val().toString().length < 8 || $(".ConfirmPassword").val().toString().length < 8) {
|
||||
MessageHelper.Instance().showError("Password must be atleast 8 characters !", "bizgaze_SpiltErrorMessages");
|
||||
return false;
|
||||
}
|
||||
if (password != ConfirmPassword) {
|
||||
MessageHelper.Instance().showError("New and Confirm passwords does not match", "bizgaze_SpiltErrorMessages");
|
||||
return false;
|
||||
}
|
||||
var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
|
||||
var checkpassword = password.match(decimal) ? true : false;
|
||||
if (checkpassword == true) {
|
||||
var postData = {
|
||||
ConfirmPassword: ConfirmPassword,
|
||||
Password: password,
|
||||
UserId: unibaseid,
|
||||
TenantId: Number(tenantid),
|
||||
UserName: unibaseid,
|
||||
Email: email,
|
||||
ContactNumber: phonenumber
|
||||
};
|
||||
}
|
||||
else {
|
||||
$(".pr-password").focus();
|
||||
MessageHelper.Instance().showError("Please Match the Password in requested Format", "bizgaze_SpiltErrorMessages");
|
||||
}
|
||||
instance._accountManager.register(postData).then(function (response) {
|
||||
$("#div_CreatePswd").addClass('d-none');
|
||||
$("#div_SuccessMsg").removeClass('d-none');
|
||||
MessageHelper.Instance().showSuccess("Password Created Successfully", 'bizgaze_SpiltErrorMessages');
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
return new MobilRegister();
|
||||
}
|
||||
}
|
||||
Components.MobilRegister = MobilRegister;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mobilregister.js","sourceRoot":"","sources":["mobilregister.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAwKhB;AAxKD,WAAU,OAAO;IACb,IAAiB,MAAM,CAsKtB;IAtKD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAoKvB;QApKD,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAkK1B;YAlKD,WAAiB,UAAU;gBACvB,MAAa,aAAc,SAAQ,QAAA,QAAQ,CAAC,IAAI,CAAC,aAAa;oBAM1D,MAAM;oBAEN,CAAC;oBACD,OAAO;wBACH,OAAO,CAAC,2CAA2C,EAAE,gDAAgD,EAAE,sDAAsD,EAAE,iDAAiD,CAAC,CAAC;oBACtN,CAAC;oBACD,QAAQ;wBACJ,OAAO,CAAC,kDAAkD,CAAC,CAAC;oBAChE,CAAC;oBACD,IAAI,CAAC,EAAE,EAAE,WAAW;wBAEhB,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;4BACvC,IAAI,KAAK,GAAG,IAAI,WAAA,eAAe,EAAE,CAAC;4BAClC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;yBACpB;wBAED,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiC7B,CAAC;wBAEe,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,IAAI,CAAC,EAAO,EAAE,WAAmB,EAAE,QAAkB;wBACjD,IAAI,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;wBAC3E,MAAM,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;wBACnD,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;wBACxD,MAAM,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;wBAC3D,CAAC,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;wBACxC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;wBACtF,CAAC,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC;4BACpB,IAAI,UAAU,GAAQ,CAAC,CAAC,cAAc,CAAC,CAAC;4BACxC,UAAU,CAAC,oBAAoB,CAAC;gCAC5B,aAAa,EAAE,CAAC;gCAChB,YAAY,EAAE,IAAI;gCAClB,YAAY,EAAE,IAAI;gCAClB,UAAU,EAAE,IAAI;gCAChB,UAAU,EAAE,IAAI;6BACnB,CAAC,CAAC;wBACP,CAAC,CAAC,CAAC;wBACH,CAAC,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC;4BACrB,IAAI,KAAK,GAAG,CAAC,CAAC,iBAAiB,CAAC,CAAC;4BACjC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;4BAC/F,CAAC,CAAC,eAAe,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;wBAC1D,CAAC,CAAC,CAAC;wBACH,CAAC,CAAC,sBAAsB,CAAC,CAAC,KAAK,CAAC;4BAC5B,IAAI,KAAK,GAAG,CAAC,CAAC,kBAAkB,CAAC,CAAC;4BAClC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;4BAC/F,CAAC,CAAC,sBAAsB,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;wBACjE,CAAC,CAAC,CAAC;wBAEH,CAAC,CAAC,wBAAwB,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;oBACnD,CAAC;oBAED,QAAQ,CAAC,GAAoD;wBACzD,IAAI,QAAQ,GAAG,IAAI,CAAC;wBACpB,CAAC,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;wBACjC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;4BACpC,IAAI,CAAC,CAAC,OAAO,IAAI,EAAE,EAAE;gCAEjB,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;6BACpC;wBACL,CAAC,CAAC,CAAC;wBAEH,CAAC,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC;4BAElB,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;wBAChF,CAAC,CAAC,CAAC;oBACP,CAAC;oBACD,cAAc,CAAC,QAAgB,EAAE,QAAgB,EAAE,KAAa,EAAE,WAAmB;wBAEjF,IAAI,QAAQ,GAAG,IAAI,CAAC;wBACpB,IAAI,eAAe,GAAG,CAAC,CAAC,kBAAkB,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;wBAC7D,IAAI,QAAQ,GAAG,CAAC,CAAC,iBAAiB,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;wBACrD,IAAI,QAAQ,GAAG,QAAQ,CAAC;wBACxB,IAAI,SAAS,GAAG,QAAQ,CAAC;wBACzB,IAAI,KAAK,GAAG,KAAK,CAAC;wBAClB,IAAI,WAAW,GAAG,WAAW,CAAC;wBAG9B,IAAI,QAAQ,IAAI,EAAE,IAAI,eAAe,IAAI,EAAE,EAAE;4BAEzC,aAAa,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,0BAA0B,EAAE,4BAA4B,CAAC,CAAC;4BAC7F,OAAO,KAAK,CAAC;yBAChB;wBACD,IAAI,CAAC,CAAC,iBAAiB,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;4BACvG,aAAa,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,yCAAyC,EAAE,4BAA4B,CAAC,CAAC;4BAC5G,OAAO,KAAK,CAAC;yBAChB;wBAED,IAAI,QAAQ,IAAI,eAAe,EAAE;4BAC7B,aAAa,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,0CAA0C,EAAE,4BAA4B,CAAC,CAAC;4BAC7G,OAAO,KAAK,CAAC;yBAChB;wBACD,IAAI,OAAO,GAAG,mEAAmE,CAAC;wBAClF,IAAI,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;wBAC3D,IAAI,aAAa,IAAI,IAAI,EAAE;4BACvB,IAAI,QAAQ,GAAkD;gCAC1D,eAAe,EAAE,eAAe;gCAChC,QAAQ,EAAE,QAAQ;gCAClB,MAAM,EAAE,SAAS;gCACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;gCAC1B,QAAQ,EAAE,SAAS;gCACnB,KAAK,EAAE,KAAK;gCACZ,aAAa,EAAE,WAAW;6BAC7B,CAAC;yBACL;6BACI;4BACD,CAAC,CAAC,cAAc,CAAC,CAAC,KAAK,EAAE,CAAC;4BAC1B,aAAa,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,+CAA+C,EAAE,4BAA4B,CAAC,CAAC;yBACrH;wBAED,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;4BAE/D,CAAC,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;4BACxC,CAAC,CAAC,iBAAiB,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;4BAC3C,aAAa,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC,+BAA+B,EAAE,4BAA4B,CAAC,CAAC;wBACxG,CAAC,CAAC,CAAC;oBAEP,CAAC;oBAED,MAAM,CAAC,QAAQ;wBACX,OAAO,IAAI,aAAa,EAAE,CAAC;oBAC/B,CAAC;iBACJ;gBAhKY,wBAAa,gBAgKzB,CAAA;YACL,CAAC,EAlKgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAkK1B;QACL,CAAC,EApKgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAoKvB;IACL,CAAC,EAtKgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAsKtB;AACL,CAAC,EAxKS,OAAO,KAAP,OAAO,QAwKhB"}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{submit(){}jsFiles(){return["tenants/themes/compact/index.anonymous.js","platform/membership/managers/accountmanager.js","platform/core/helpers/navigation/navigationhelper.js","libs/passwordrequirement/passwordrequirement.js"]}cssFiles(){return["libs/passwordrequirement/passwordrequirement.css"]}html(){if(jQuery("#external-form").length===0){var n=new t.Index_Anonymous;n.init(null)}return`<div>
|
||||
<form id="frm_Register">
|
||||
<div id="bizgaze_SpiltErrorMessages"></div>
|
||||
<div id="div_CreatePswd">
|
||||
<h1 class="display-4 mb-30 text-dark-100 text-center">Register</h1>
|
||||
<div class="alert alert-primary">We will send link to your <a href=""><u>Email</u></a> to create your password.</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" id="lbl_Email">Email Address</label>
|
||||
<input id="signupEmail" value="" class="form-control input-lg text-dark" disabled="disabled">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label w-100">New Password</label>
|
||||
<input type="password" id="signupPassword" placeholder="Type a password" class="pr-password signupPassword form-control input-lg" autocomplete="off">
|
||||
<span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
|
||||
<div class="showpwsdreq"></div>
|
||||
</div>
|
||||
<div class="form-group ">
|
||||
<label class="control-label w-100">Confirm Password</label>
|
||||
<input type="password" id="ConfirmPassword" placeholder="Type a password" class="ConfirmPassword form-control input-lg" autocomplete="new-password">
|
||||
<span toggle="#InputPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
|
||||
</div>
|
||||
<button class="btn btn-primary btn-block mb-20"
|
||||
type="button" id="btnSignUp">Register</button><p class="text-right"><a href="Index.html#/login">
|
||||
Back to login</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="div_SuccessMsg" class="d-none">
|
||||
<div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i>
|
||||
</div>
|
||||
<h1 class="display-4 mb-20 text-center">Password Created Successfully</h1>
|
||||
<p class="text-center"><a href="Index.html#/login">Click here to Login</a></p>
|
||||
</div>
|
||||
</form>`}load(){var t=n.Platform.Helpers.FileCacheHelper.Instance();jQuery(".preloader-it").delay(500).fadeOut("slow");jQuery("#external-container").delay(500).fadeIn("slow");jQuery("#bizgaze_body").css("background-color","#f4f6f7");$("#div_modalbody").removeAttr("style");this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance();$(".pr-password").click(function(){var n=$(".pr-password");n.passwordRequirements({numCharacters:8,useLowercase:!0,useUppercase:!0,useNumbers:!0,useSpecial:!0})});$("#PasswordHide").click(function(){var n=$("#signupPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#PasswordHide").toggleClass("fa-eye-slash fa-eye")});$("#confirmPasswordHide").click(function(){var n=$("#ConfirmPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#confirmPasswordHide").toggleClass("fa-eye-slash fa-eye")});$(".btn-outline-secondary").addClass("hidden")}register(n){var t=this;$("#signupEmail").val(n.email);$(document).bind("keypress",function(n){n.keyCode==13&&$("#btnSignUp").trigger("click")});$("#btnSignUp").click(function(){t.signupregister(n.userid,n.tenant,n.email,n.phonenumber)})}signupregister(n,t,i,r){var c=this,f=$(".ConfirmPassword").val().toString(),u=$(".signupPassword").val().toString(),t=t,e=n,i=i,r=r,o,s,h;if(u==""||f=="")return MessageHelper.Instance().showError("Password cannot be empty","bizgaze_SpiltErrorMessages"),!1;if($(".signupPassword").val().toString().length<8||$(".ConfirmPassword").val().toString().length<8)return MessageHelper.Instance().showError("Password must be atleast 8 characters !","bizgaze_SpiltErrorMessages"),!1;if(u!=f)return MessageHelper.Instance().showError("New and Confirm passwords does not match","bizgaze_SpiltErrorMessages"),!1;o=/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;s=u.match(o)?!0:!1;s==!0?h={ConfirmPassword:f,Password:u,UserId:e,TenantId:Number(t),UserName:e,Email:i,ContactNumber:r}:($(".pr-password").focus(),MessageHelper.Instance().showError("Please Match the Password in requested Format","bizgaze_SpiltErrorMessages"));c._accountManager.register(h).then(function(){$("#div_CreatePswd").addClass("d-none");$("#div_SuccessMsg").removeClass("d-none");MessageHelper.Instance().showSuccess("Password Created Successfully","bizgaze_SpiltErrorMessages")})}static Instance(){return new i}}t.MobilRegister=i})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,132 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class Register extends Unibase.Platform.Core.BaseComponent {
|
||||
submit() {
|
||||
}
|
||||
jsFiles() {
|
||||
return ["tenants/themes/compact/index.anonymous.js", "platform/membership/managers/accountmanager.js", "platform/core/helpers/navigation/navigationhelper.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
}
|
||||
cssFiles() {
|
||||
return ["libs/passwordrequirement/passwordrequirement.css"];
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
const html = `<div>
|
||||
<form id="frm_Register">
|
||||
<div id="bizgaze_SpiltErrorMessages"></div>
|
||||
<div id="div_CreatePswd">
|
||||
<h1 class="display-4 mb-30 text-dark-100 text-center">Register</h1>
|
||||
<div class="alert alert-primary">We will send link to your <a href=""><u>Email</u></a> to create your password.</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" id="lbl_Email">Email Address</label>
|
||||
<input id="signupEmail" value="" class="form-control input-lg text-dark" disabled="disabled">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Password</label>
|
||||
<input type="password" id="signupPassword" placeholder="Type a password" class="pr-password signupPassword form-control input-lg" autocomplete="new-password">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">Confirm Password</label>
|
||||
<input type="password" id="ConfirmPassword" placeholder="Type a password" class="ConfirmPassword form-control input-lg" autocomplete="new-password">
|
||||
</div>
|
||||
|
||||
|
||||
<button class="btn btn-primary btn-block mb-20"
|
||||
type="button" id="btnSignUp">Register</button><p class="text-right"><a href="Index.html#/login">
|
||||
Back to login</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="div_SuccessMsg" class="d-none">
|
||||
<div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i>
|
||||
</div>
|
||||
<h1 class="display-4 mb-20 text-center">Password Created Successfully</h1>
|
||||
<p class="text-center"><a href="Index.html#/login">Click here to Login</a></p>
|
||||
</div>
|
||||
</form>`;
|
||||
return html;
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
var _fileCacheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#div_modalbody").removeAttr("style");
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
$(".pr-password").click(function () {
|
||||
var signUpPswd = $(".pr-password");
|
||||
signUpPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
}
|
||||
register(obj) {
|
||||
var instance = this;
|
||||
$("#signupEmail").val(obj.email);
|
||||
$(document).bind('keypress', function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
$('#btnSignUp').trigger('click');
|
||||
}
|
||||
});
|
||||
$("#btnSignUp").click(function () {
|
||||
instance.signupregister(obj.userid, obj.tenant, obj.email, obj.phonenumber);
|
||||
});
|
||||
}
|
||||
signupregister(unibseid, tenantid, email, phonenumber) {
|
||||
var instance = this;
|
||||
var ConfirmPassword = $(".ConfirmPassword").val().toString();
|
||||
var password = $(".signupPassword").val().toString();
|
||||
var tenantid = tenantid;
|
||||
var unibaseid = unibseid;
|
||||
var email = email;
|
||||
var phonenumber = phonenumber;
|
||||
if (password == '' || ConfirmPassword == '') {
|
||||
MessageHelper.Instance().showError("Password cannot be empty", "bizgaze_SpiltErrorMessages");
|
||||
return false;
|
||||
}
|
||||
if ($(".signupPassword").val().toString().length < 6 || $(".ConfirmPassword").val().toString().length < 6) {
|
||||
MessageHelper.Instance().showError("Password must be atleast 6 characters !", "bizgaze_SpiltErrorMessages");
|
||||
return false;
|
||||
}
|
||||
if (password != ConfirmPassword) {
|
||||
MessageHelper.Instance().showError("New and Confirm passwords does not match", "bizgaze_SpiltErrorMessages");
|
||||
return false;
|
||||
}
|
||||
var postData = {
|
||||
ConfirmPassword: ConfirmPassword,
|
||||
Password: password,
|
||||
UserId: unibaseid,
|
||||
TenantId: Number(tenantid),
|
||||
UserName: unibaseid,
|
||||
Email: email,
|
||||
ContactNumber: phonenumber
|
||||
};
|
||||
instance._accountManager.register(postData).then(function (response) {
|
||||
$("#div_CreatePswd").addClass('d-none');
|
||||
$("#div_SuccessMsg").removeClass('d-none');
|
||||
MessageHelper.Instance().showSuccess("Password Created Successfully", 'bizgaze_SpiltErrorMessages');
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
return new Register();
|
||||
}
|
||||
}
|
||||
Components.Register = Register;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"register.js","sourceRoot":"","sources":["register.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAyJhB;AAzJD,WAAU,OAAO;IACb,IAAiB,MAAM,CAuJtB;IAvJD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAqJvB;QArJD,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAmJ1B;YAnJD,WAAiB,UAAU;gBACvB,MAAa,QAAS,SAAQ,QAAA,QAAQ,CAAC,IAAI,CAAC,aAAa;oBAMrD,MAAM;oBAEN,CAAC;oBACD,OAAO;wBACH,OAAO,CAAC,2CAA2C,EAAE,gDAAgD,EAAE,sDAAsD,EAAC,iDAAiD,CAAC,CAAC;oBACrN,CAAC;oBACD,QAAQ;wBACJ,OAAO,CAAC,kDAAkD,CAAC,CAAC;oBAChE,CAAC;oBACD,IAAI,CAAC,EAAE,EAAE,WAAW;wBAEhB,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;4BACvC,IAAI,KAAK,GAAG,IAAI,WAAA,eAAe,EAAE,CAAC;4BAClC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;yBACpB;wBAED,MAAM,IAAI,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiC5B,CAAC;wBAIe,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,IAAI,CAAC,EAAO,EAAE,WAAmB,EAAE,QAAkB;wBACjD,IAAI,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;wBAC3E,MAAM,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;wBACnD,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;wBACxD,MAAM,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;wBAC3D,CAAC,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;wBACxC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;wBACtF,CAAC,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC;4BACpB,IAAI,UAAU,GAAQ,CAAC,CAAC,cAAc,CAAC,CAAC;4BACxC,UAAU,CAAC,oBAAoB,CAAC;gCAC5B,aAAa,EAAE,CAAC;gCAChB,YAAY,EAAE,IAAI;gCAClB,YAAY,EAAE,IAAI;gCAClB,UAAU,EAAE,IAAI;gCAChB,UAAU,EAAE,IAAI;6BACnB,CAAC,CAAC;wBACP,CAAC,CAAC,CAAC;oBACP,CAAC;oBAED,QAAQ,CAAC,GAA+C;wBACpD,IAAI,QAAQ,GAAG,IAAI,CAAC;wBACpB,CAAC,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;wBACjC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC;4BACpC,IAAI,CAAC,CAAC,OAAO,IAAI,EAAE,EAAE;gCAEjB,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;6BACpC;wBACL,CAAC,CAAC,CAAC;wBAEH,CAAC,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC;4BAElB,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;wBAChF,CAAC,CAAC,CAAC;oBACP,CAAC;oBACD,cAAc,CAAC,QAAgB,EAAE,QAAgB,EAAE,KAAa,EAAC,WAAkB;wBAE/E,IAAI,QAAQ,GAAG,IAAI,CAAC;wBACpB,IAAI,eAAe,GAAG,CAAC,CAAC,kBAAkB,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;wBAC7D,IAAI,QAAQ,GAAG,CAAC,CAAC,iBAAiB,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;wBACrD,IAAI,QAAQ,GAAG,QAAQ,CAAC;wBACxB,IAAI,SAAS,GAAG,QAAQ,CAAC;wBACzB,IAAI,KAAK,GAAG,KAAK,CAAC;wBAClB,IAAI,WAAW,GAAG,WAAW,CAAC;wBAG9B,IAAI,QAAQ,IAAI,EAAE,IAAI,eAAe,IAAI,EAAE,EAAE;4BAEzC,aAAa,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,0BAA0B,EAAE,4BAA4B,CAAC,CAAC;4BAC7F,OAAO,KAAK,CAAC;yBAChB;wBACD,IAAI,CAAC,CAAC,iBAAiB,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;4BACvG,aAAa,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,yCAAyC,EAAE,4BAA4B,CAAC,CAAC;4BAC5G,OAAO,KAAK,CAAC;yBAChB;wBAED,IAAI,QAAQ,IAAI,eAAe,EAAE;4BAC7B,aAAa,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,0CAA0C,EAAE,4BAA4B,CAAC,CAAC;4BAC7G,OAAO,KAAK,CAAC;yBAChB;wBAED,IAAI,QAAQ,GAAkD;4BAC1D,eAAe,EAAE,eAAe;4BAChC,QAAQ,EAAE,QAAQ;4BAClB,MAAM,EAAE,SAAS;4BACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;4BAC1B,QAAQ,EAAE,SAAS;4BACnB,KAAK,EAAE,KAAK;4BACZ,aAAa,EAAE,WAAW;yBAC7B,CAAC;wBAEF,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;4BAE/D,CAAC,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;4BACxC,CAAC,CAAC,iBAAiB,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;4BAC3C,aAAa,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC,+BAA+B,EAAE,4BAA4B,CAAC,CAAC;wBACxG,CAAC,CAAC,CAAC;oBAEP,CAAC;oBAID,MAAM,CAAC,QAAQ;wBACX,OAAO,IAAI,QAAQ,EAAE,CAAC;oBAC1B,CAAC;iBACJ;gBAjJY,mBAAQ,WAiJpB,CAAA;YACL,CAAC,EAnJgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAmJ1B;QACL,CAAC,EArJgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAqJvB;IACL,CAAC,EAvJgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAuJtB;AACL,CAAC,EAzJS,OAAO,KAAP,OAAO,QAyJhB"}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{submit(){}jsFiles(){return["tenants/themes/compact/index.anonymous.js","platform/membership/managers/accountmanager.js","platform/core/helpers/navigation/navigationhelper.js","libs/passwordrequirement/passwordrequirement.js"]}cssFiles(){return["libs/passwordrequirement/passwordrequirement.css"]}html(){if(jQuery("#external-form").length===0){var n=new t.Index_Anonymous;n.init(null)}return`<div>
|
||||
<form id="frm_Register">
|
||||
<div id="bizgaze_SpiltErrorMessages"></div>
|
||||
<div id="div_CreatePswd">
|
||||
<h1 class="display-4 mb-30 text-dark-100 text-center">Register</h1>
|
||||
<div class="alert alert-primary">We will send link to your <a href=""><u>Email</u></a> to create your password.</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" id="lbl_Email">Email Address</label>
|
||||
<input id="signupEmail" value="" class="form-control input-lg text-dark" disabled="disabled">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Password</label>
|
||||
<input type="password" id="signupPassword" placeholder="Type a password" class="pr-password signupPassword form-control input-lg" autocomplete="new-password">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">Confirm Password</label>
|
||||
<input type="password" id="ConfirmPassword" placeholder="Type a password" class="ConfirmPassword form-control input-lg" autocomplete="new-password">
|
||||
</div>
|
||||
|
||||
|
||||
<button class="btn btn-primary btn-block mb-20"
|
||||
type="button" id="btnSignUp">Register</button><p class="text-right"><a href="Index.html#/login">
|
||||
Back to login</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="div_SuccessMsg" class="d-none">
|
||||
<div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i>
|
||||
</div>
|
||||
<h1 class="display-4 mb-20 text-center">Password Created Successfully</h1>
|
||||
<p class="text-center"><a href="Index.html#/login">Click here to Login</a></p>
|
||||
</div>
|
||||
</form>`}load(){var t=n.Platform.Helpers.FileCacheHelper.Instance();jQuery(".preloader-it").delay(500).fadeOut("slow");jQuery("#external-container").delay(500).fadeIn("slow");jQuery("#bizgaze_body").css("background-color","#f4f6f7");$("#div_modalbody").removeAttr("style");this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance();$(".pr-password").click(function(){var n=$(".pr-password");n.passwordRequirements({numCharacters:8,useLowercase:!0,useUppercase:!0,useNumbers:!0,useSpecial:!0})})}register(n){var t=this;$("#signupEmail").val(n.email);$(document).bind("keypress",function(n){n.keyCode==13&&$("#btnSignUp").trigger("click")});$("#btnSignUp").click(function(){t.signupregister(n.userid,n.tenant,n.email,n.phonenumber)})}signupregister(n,t,i,r){var s=this,u=$(".ConfirmPassword").val().toString(),f=$(".signupPassword").val().toString(),t=t,e=n,i=i,r=r,o;if(f==""||u=="")return MessageHelper.Instance().showError("Password cannot be empty","bizgaze_SpiltErrorMessages"),!1;if($(".signupPassword").val().toString().length<6||$(".ConfirmPassword").val().toString().length<6)return MessageHelper.Instance().showError("Password must be atleast 6 characters !","bizgaze_SpiltErrorMessages"),!1;if(f!=u)return MessageHelper.Instance().showError("New and Confirm passwords does not match","bizgaze_SpiltErrorMessages"),!1;o={ConfirmPassword:u,Password:f,UserId:e,TenantId:Number(t),UserName:e,Email:i,ContactNumber:r};s._accountManager.register(o).then(function(){$("#div_CreatePswd").addClass("d-none");$("#div_SuccessMsg").removeClass("d-none");MessageHelper.Instance().showSuccess("Password Created Successfully","bizgaze_SpiltErrorMessages")})}static Instance(){return new i}}t.Register=i})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,986 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class Dashboard extends Unibase.Platform.Core.BaseComponent {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.firstLoad = true;
|
||||
this.filterClickBtn = true;
|
||||
this.jsindex = 0;
|
||||
this.htmlindex = 0;
|
||||
this.evalExecuted = 0;
|
||||
this._bizgaze_core_activeinstalledappId = 0;
|
||||
this._bizgaze_core_activeportletid = 0;
|
||||
this._dashboard_first_load = 0;
|
||||
}
|
||||
jsFiles() {
|
||||
return ["platform/bundle/dashboard.min.js"];
|
||||
}
|
||||
cssFiles() {
|
||||
return [];
|
||||
}
|
||||
html(id, containerid) {
|
||||
var _a;
|
||||
let width = $(window).width(), mx;
|
||||
if (width <= 576) {
|
||||
mx = 'mx-2';
|
||||
}
|
||||
else {
|
||||
mx = 'mx-20';
|
||||
}
|
||||
let isRestrictHidden = '', isSupportHidden = '';
|
||||
if (Unibase.Platform.Membership.Infos.Identity.currentUser.isRestrictedUser == true) {
|
||||
isRestrictHidden = 'd-none';
|
||||
}
|
||||
let isSupportHeader = window.location.hash;
|
||||
if (isSupportHeader.includes('ticket')) {
|
||||
isSupportHidden = 'd-none';
|
||||
}
|
||||
var html = `<input type="hidden" id="hf_DashboardPortletId" value="" />
|
||||
<input type="hidden" id="hf_DashboardPortletName" value="0" />
|
||||
<input type="hidden" id="hf_PortletId" />
|
||||
<input type="hidden" id="hf_App_DefaultWidgetId" value="0" />
|
||||
<input type="hidden" id="hf_AppUniqueId" value="0" />
|
||||
<div class="biz-db-header pt-10 pb-2 pb-sm-15 px-sm-0 ${mx} invisible" id="bizDbHeader">
|
||||
<div class="db-top-header d-flex justify-content-between align-items-center position-relative px-0 pb-5" id="dbTopHeader"><div class="db-header-left dashboard-tab d-flex align-items-center w-85">
|
||||
<div class="d-flex align-items-center biz-highlight-bg-color text-truncate biz-dropdown db-dropdown-wrap">
|
||||
<span id="lblDbGroup_Title" class="db-group-title font-20 font-weight-600 font-sm-20 text-truncate ${isSupportHidden}">No Dashboards</span><a class="dp-toggle-icon btn btn-icon btn-flush-biz-theme btn-rounded flush-soft-hover d-xl-none flex-shrink-0 ${isRestrictHidden}" href="javascript:;" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="btn-icon-wrap"><i class="fa fa-caret-down"></i></span></a>
|
||||
<div class="dropdown-menu biz-custom-dropdown biz-custom-scrollbar biz-db-groups-dropdown" id="dbGroupsDropdownMenu"><ul id="dbGroupsDropdownList" class="custom-dropdown-body biz-custom-scrollbar db-groups-dropdown-list row mx-0"></ul></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="db-header-right d-flex align-items-center" id="dbHeaderRight"><div class="dashboard-fav exclude-tab"><a href="javascript:;" class="biz-highlight-bg-color ml-10" onclick="bizgaze.extensions.web.themes.compact.nav.setAsFavorite();" id="Biz_favorite"><span class="glyphicon glyphicon-heart"></span></a><a href="javascript:;" class="hidden ml-10" id="Biz_Unfavorite" onclick="bizgaze.extensions.web.themes.compact.nav.removeFromFavorite();"><span class="glyphicon glyphicon-heart"></span></a>
|
||||
</div>
|
||||
<a id="filter_toggle_btn${containerid}" class="btn btn-outline-light border d-flex align-items-center rounded biz-highlight-bg-color common-filter-dp-btn line-height-0 order-last ${isRestrictHidden}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-tooltip="true" title="Common Filters"><i class="la la-filter font-weight-700" style="height:auto"></i></a>
|
||||
<div class="dropdown-menu biz-custom-dropdown biz-common-filter-dropdown" id="bizCmnFilterDp_${containerid}" onclick="event.stopPropagation();"><div class="cmn-filter-content-wrap position-relative"><div class="custom-dropdown-body biz-custom-scrollbar row mx-0 common-filter-dropdown-body cmn-filters-body" id="dynamic-filters${containerid}"></div><div class="common-filter-footer mt-10" id="commonfilter_footerbuttons${containerid}"></div><div class="cmn-filter-errmsg text-center d-none" id="cmnFilterErrMsg_${containerid}"><p class="text-danger">No Filters Found!</p><a class="btn btn-outline-primary btn-sm mt-10" href="javascript:;" id="btnCreateCommonFilter" onclick="Unibase.Platform.Analytics.Components._CommonFilter.Instance().loadCommonFilterForm(0)">Create Filter</a></div><a href="javascript:;" class="btn btn-icon btn-flush-biz-theme btn-rounded flush-soft-hover h-30p w-30p shadow cmn-filter-panel-pin d-none" id="cmnFilterPanelPin_${containerid}" onclick="Unibase.Themes.Compact.Components.Dashboard.Instance().loadCommonFilterPanel('${containerid}');" data-tooltip="true" title="Pin Filters"><span class="btn-icon-wrap"><i class="las la-thumbtack font-18"></i></span></a></div></div>
|
||||
<div class="admin-user-only d-none d-xl-block mr-10">
|
||||
<div class="btn-group dropdown dashboard-setting-dp ${!((_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.isAdmin) ? 'd-none' : ''}" id="dashboardSettingsDp">
|
||||
<a class="btn btn-outline-light border d-flex align-items-center rounded biz-highlight-bg-color line-height-0 dashboard-settings-btn" data-tooltip="true" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="javascript:void(0);" data-tooltip="true" title="Dashboard Settings"><i class="la la-cog"></i></a>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="javascript:;" onclick="Unibase.Themes.Compact.Components.Nav.Instance().addWidget()"><i class="la la-pencil mr-1"></i>Edit Dashboard</a>
|
||||
<a class="dropdown-item " href="javascript:;" onclick="Unibase.Themes.Compact.Components.Nav.Instance().manageDashboards()" ><i class="la la-newspaper-o mr-1"></i>Manage Dashboard</a>
|
||||
</div></div></div>
|
||||
</div></div>
|
||||
<div class="layout-dashboard-tab" id="layout-dashboard-tabs">
|
||||
<div class="dashboard-tab card-header-filters" id="card-header-filters${containerid}">
|
||||
<ul class="biz-report-filters dashboard-options-list" id="filters-list${containerid}"></ul>
|
||||
<a href="javascript:;" class="filter-left-icon filter-nav-icon biz-highlight-bg-color hidden" onclick="Unibase.Themes.Compact.Components.Nav.Instance().changeFilterScroll(this,'${containerid}')" data-operation="-"><i class="fa fa-chevron-left"></i></a>
|
||||
<a href="javascript:;" class="filter-right-icon filter-nav-icon biz-highlight-bg-color hidden" onclick="Unibase.Themes.Compact.Components.Nav.Instance().changeFilterScroll(this,'${containerid}')" data-operation="+"><i class="fa fa-chevron-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboardfooter hidden" id="dashboardfooter">
|
||||
<a class="btn btn-outline-primary bg-white dashboardcreatewidgetbtn mr-10" href="javascript:;" id="AddWidget_btnCreateWidget" onclick="Unibase.Platform.Widgets.Components.Widget.Instance().createWidget(` + id + `)">Create Widget</a>
|
||||
<div class="Dashboard_SaveChanges pull-right">
|
||||
<a href="javascript:;" class="btn btn-outline-danger mr-10" onclick="Unibase.Platform.Widgets.Components.Widget.Instance().loadportlet();">Close</a>
|
||||
<a href="javascript:;" class="btn btn-primary" onclick="Unibase.Platform.Widgets.Components.Widget.Instance().SaveScreen();" data-dismiss="modal">Save changes</a>
|
||||
<a class="btn btn-sm btn-success hidden" href="javascript:;" data-toggle="modal" data-target="#SaveEditScreen" onclick="Unibase.Themes.Compact.Components.Dashboard.Instance().confirmSave();" id="AddWidget_btnSelectWidget">Done</a>
|
||||
</div></div>
|
||||
</div>
|
||||
<div id="dashboardwidget-container-outer" class="px-0 flex-grow-1 overflow-auto"><div data-simplebar class="simple-scroll-bar container-fluid scrollable pb-15 px-0" id="dashboardwidget-container-scroll"><div id="dashboardwidget-container" class="row dashboardwidget-container px-2 px-sm-2 px-md-20 px-lg-20 mx-0 mx-sm-1" data-id="dashboardwidget-container"></div></div>
|
||||
</div>`;
|
||||
return html;
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().addCacheFiles([
|
||||
"tenants/themes/compact/widgets/kpiwidgets/manager/kpimanager.js", "tenants/themes/compact/widgets/kpiwidgets/manager/interfaces/ikpimanager.js", "tenants/themes/compact/widgets/reportwidgets/default.js", "tenants/themes/compact/widgets/kpiwidgets/default.js", "tenants/themes/compact/widgets/detailwidgets/default.js", "tenants/themes/compact/widgets/detailwidgets/singledata.js", "tenants/themes/compact/widgets/detailwidgets/singlecolumn.js", "tenants/themes/compact/widgets/detailwidgets/singlecolumn_noborder.js", "tenants/themes/compact/widgets/kpiwidgets/comparision.js", "tenants/themes/compact/widgets/kpiwidgets/icon.js", "tenants/themes/compact/widgets/kpiwidgets/valuewithpercentage.js", "tenants/themes/compact/widgets/kpiwidgets/twovalue.js", "tenants/themes/compact/widgets/reportwidgets/withnoheaderandfooter.js", "platform/widgets/components/widgetpermission.js", "tenants/themes/compact/widgets/kpiwidgets/twovaluebgcolor.js", "tenants/themes/compact/widgets/kpiwidgets/valuewithpercentagebgcolor.js", "tenants/themes/compact/widgets/kpiwidgets/twovaluecenterline.js", "tenants/themes/compact/widgets/kpiwidgets/owlcarouselslider.js", "tenants/themes/compact/widgets/kpiwidgets/valuewithpercentageprogressbar.js", "tenants/themes/compact/widgets/kpiwidgets/kpi_fulfillment.js", "tenants/themes/compact/widgets/kpiwidgets/carouselslider.js", "tenants/themes/compact/widgets/kpiwidgets/carouselsliderbgcolor.js", "platform/analytics/components/reportviewer/reportviewer.js", "tenants/themes/compact/widgets/detailwidgets/customdesign.js", "tenants/themes/compact/widgets/kpiwidgets/comparisionrightbarcolor.js", "tenants/themes/compact/widgets/kpiwidgets/comparisionbottombarcolor.js", "tenants/themes/compact/widgets/kpiwidgets/singlevalueborder.js", "tenants/themes/compact/widgets/kpiwidgets/twovaluebottombarcolor.js", "tenants/themes/compact/widgets/kpiwidgets/singlevaluepiechart.js", "tenants/themes/compact/widgets/kpiwidgets/iconbgcolor.js", "tenants/themes/compact/widgets/kpiwidgets/iconcolor.js", "tenants/themes/compact/widgets/kpiwidgets/iconleftbarcolor.js", "tenants/themes/compact/components/dashboard/walkthrough.js"
|
||||
]);
|
||||
let instance = this;
|
||||
if ($(window).outerWidth() <= 575) {
|
||||
$("#dashboardwidget-container-outer").css("margin-left", "-15px").css("margin-right", "-15px");
|
||||
$("#dashboardwidget-container-scroll").removeClass("px-0");
|
||||
}
|
||||
$(`#filter_toggle_btn${containerid}`).click(function () {
|
||||
if ($(`#bizCmnFilterDp_${containerid}`).hasClass('show')) {
|
||||
return;
|
||||
}
|
||||
let portleId = Number($("#hf_PortletId").val());
|
||||
Unibase.Platform.Analytics.Components._CommonFilter.Instance().commonFilter(portleId, containerid);
|
||||
});
|
||||
$(document).on("click", ".daterangepicker", function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
$('#dbHeaderRight').on('shown.bs.dropdown', function () {
|
||||
if ($(this).hasClass('show')) {
|
||||
$(`#filter_toggle_btn${containerid}`).find('.la-filter').removeClass('la-filter').addClass('la-times');
|
||||
}
|
||||
});
|
||||
$('#dbHeaderRight').on('hide.bs.dropdown', function () {
|
||||
$(`#filter_toggle_btn${containerid}`).find('.la-times').removeClass('la-times').addClass('la-filter');
|
||||
});
|
||||
Unibase.Platform.Analytics.Components._CommonFilter.Instance().commonFilter(0, containerid);
|
||||
if (isMobileApp()) {
|
||||
eval(`jquerySwipeHandler.handleSwipe("#dashboardwidget-container-outer", [jquerySwipeHandler.SWIPE_LEFT, jquerySwipeHandler.SWIPE_RIGHT], function (direction) {
|
||||
if(direction == 'SWIPE_LEFT' || direction == 'SWIPE_RIGHT'){
|
||||
Unibase.Themes.Compact.Components.Dashboard.Instance().DashBoardSwipe(direction);
|
||||
}
|
||||
});`);
|
||||
}
|
||||
}
|
||||
init(containerid) {
|
||||
}
|
||||
loadDashboard(dashboardid, containerid, callback) {
|
||||
var instance = this;
|
||||
}
|
||||
loadCreateDashboard() {
|
||||
var instance = this;
|
||||
instance.fileCacheHelper.loadJsFile('platform/dashboards/components/createdashboard.js', function () {
|
||||
instance.navigationHelper.popup(0, "", Unibase.Platform.Dashboards.Components.CreateDashboard.Instance(), null, Unibase.Platform.Helpers.Size.DockLeft);
|
||||
});
|
||||
}
|
||||
confirmSave() {
|
||||
var html = '<div class="modal fade" id="SaveEditScreen" tabindex="-1" role="dialog" aria-labelledby="SaveEditScreenLabel" style="display: none;" aria-hidden="true">' +
|
||||
'<div class="modal-dialog" role = "document" >' +
|
||||
'<div class="modal-content">' +
|
||||
'<div class="modal-header d-none">' +
|
||||
'<h5 class="modal-title" id="SaveEditScreenLabel"></h5>' +
|
||||
'<button type="button" class="close" data-dismiss="modal" aria-label="Close">' +
|
||||
'<span aria-hidden="true">×</span>' +
|
||||
'</button>' +
|
||||
'</div>' +
|
||||
'<div class="modal-body">' +
|
||||
'<p>Do you want to Save Changes?</p >' +
|
||||
'</div>' +
|
||||
'<div class="modal-footer">' +
|
||||
'<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>' +
|
||||
'<button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="Unibase.Platform.Widgets.Components.Widget.Instance().loadportlet()">Discard Changes</button>' +
|
||||
'<button type="button" class="btn btn-primary" onclick="Unibase.Platform.Widgets.Components.Widget.Instance().SaveScreen(true)" data-dismiss="modal">Save changes</button>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div >';
|
||||
$("#_bizgaze_modal").before(html);
|
||||
$("#SaveEditScreen").modal();
|
||||
}
|
||||
sortportletWidgets(a, b) {
|
||||
const sortA = a.PortletWidgetId;
|
||||
const sortB = b.PortletWidgetId;
|
||||
let comparison = 0;
|
||||
if (sortA > sortB) {
|
||||
comparison = 1;
|
||||
}
|
||||
else if (sortA < sortB) {
|
||||
comparison = -1;
|
||||
}
|
||||
return comparison;
|
||||
}
|
||||
loadWidgetData(portletWidgetdata) {
|
||||
let data;
|
||||
if (portletWidgetdata != undefined) {
|
||||
data = portletWidgetdata.sort(this.sortStructureWidgets);
|
||||
}
|
||||
if (data != null && data != undefined) {
|
||||
var html = "";
|
||||
var instance = this;
|
||||
var datalength = data.length;
|
||||
var isFirstTime = true;
|
||||
for (let i = 0; i < datalength; i++) {
|
||||
var model = data[i];
|
||||
var widgetUrl = model.WidgetUrl;
|
||||
var Width = model.Width;
|
||||
var WidgetName = "";
|
||||
if (model.DisplayText == "" || model.displayText == null) {
|
||||
WidgetName = model.WidgetName;
|
||||
}
|
||||
else {
|
||||
WidgetName = model.DisplayText;
|
||||
}
|
||||
var IsFiltarable = model.IsFilterable;
|
||||
var filterhtml = "";
|
||||
if (IsFiltarable == null || IsFiltarable == false || IsFiltarable == "") {
|
||||
filterhtml = "hidden";
|
||||
}
|
||||
var widgetdata = '<div class="widgetdataHere w-100 mb-2 mb-sm-15 widgetid-' + model.WidgetId + '" id ="widgetid-' + model.WidgetId + '" data-strctwidgetindex="' + model.StrctWidgetIndex + '" data-boxid="' + model.StructureDesignId + '"><div class="rounded portlet dashboardwidget-item dashboardwidget-addeditem widgetItem-' + model.PortletWidgetId + ' widgetid-' + model.WidgetId + '" id=' + model.WidgetId + '>' +
|
||||
'<div class="Border bg-transparent mb-1 mb-sm-3" >' +
|
||||
'<div class="Border1 hidden">' +
|
||||
'<div class="editwidget card-action-wrap editwidget-' + model.WidgetId + ' pull-right m-t-sm m-r-lg" id="editwidget">' +
|
||||
'<a href="javascript:;" data-tooltip="true" title="Edit Widget" onclick="Unibase.Themes.Compact.Components.Dashboard.Instance().EditWidget(' + model.WidgetId + ',' + 0 + ',' + model.PortletWidgetId + ')" ><i class="ti-pencil text-info mr-3" id = "EditWidget-' + model.PortletWidgetId + '" ></i></a>' +
|
||||
'<a href="javascript:;" id="WidgetSettings-' + model.PortletWidgetId + '" data-tooltip="true" title="Settings" ><i class="ti-settings mr-3" id = "EditWidget-' + model.PortletWidgetId + '"></i></a>' +
|
||||
'<a href = "javascript:;" data-tooltip="true" title="Permissions" onclick = "Unibase.Themes.Compact.Components.Dashboard.Instance().ShowWidgetPermissions(' + model.PortletWidgetId + ')";><i class="ti-key mr-2" id = "ShowWidgetPermissions-' + model.PortletWidgetId + '"></i></a>' +
|
||||
'<a href="javascript:;" data-tooltip="true" title="delete widget" onclick="Unibase.Platform.Widgets.Components.Widget.Instance().deletePortletWidgets(' + model.PortletWidgetId + ')"> <i class="ti-trash text-danger mr-2" id = "EditWidget-' + model.PortletWidgetId + '"></i></a>' +
|
||||
'<a href="javascript:;" title = "Export Widget" onclick = "Unibase.Platform.Widgets.Components.Widget.Instance().exportWidgetByWidgetId(' + model.WidgetId + ')" > <i class="fa fa-download text-info mr-2" id = "ExportWidget-' + model.PortletWidgetId + '" > </i></a >' +
|
||||
'</div>' +
|
||||
'<div class="dragWidget dargwidget-' + model.WidgetId + ' pull-left" id="dragWidget">' +
|
||||
'<a class="pull-left btn btn-sm">' +
|
||||
'<i class="ti-fullscreen"></i>' +
|
||||
'</a>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<input type="hidden" id="hf_widgetId" value="' + model.WidgetId + '" />' +
|
||||
'<input type="hidden" id="hf_widgetId_' + model.WidgetId + '" value="' + model.WidgetId + '" />' +
|
||||
'<input type="hidden" id="hf_widgetName_' + model.PortletWidgetId + '" value="' + WidgetName + '" />' +
|
||||
'<input type="hidden" id="hf_widgetUniqueId_' + model.PortletWidgetId + '" value="' + model.UniqueId + '" />' +
|
||||
'<input type="hidden" class="hf_portletwidgetId" id="hf_portletwidgetId" value="' + model.PortletWidgetId + '" />' +
|
||||
'<input type="hidden" class="hf_portletwidgetheight" id="hf_portletwidgetheight" value="' + model.PortletWidgetHeight + 'px" />' +
|
||||
'<input type="hidden"id="hf_PortletId" value="' + model.PortletId + '"/>';
|
||||
if (model.WidgetLayoutName == 'KPI') {
|
||||
widgetdata += '<div class="bg-white d-block position-relative h-90p line-loader"></div><div id="div_dashboardportletwidget_' + model.PortletWidgetId + '" class="widgetsstructure hidden div_dashboardwidget_' + model.PortletWidgetId + ' div_dashboardportletwidget_' + model.PortletWidgetId + '" />';
|
||||
}
|
||||
else {
|
||||
widgetdata += '<div id="div_dashboardportletwidget_' + model.PortletWidgetId + '" class="widgetsstructure div_dashboardwidget_' + model.PortletWidgetId + ' div_dashboardportletwidget_' + model.PortletWidgetId + '" />';
|
||||
}
|
||||
widgetdata += '</div></div></div></div>';
|
||||
let afterchild, beforechild;
|
||||
if ($('#structureId_' + model.StructureDesignId).length != 0) {
|
||||
if (model.StrctWidgetIndex == 1 || model.StrctWidgetIndex == 0) {
|
||||
$('#structureId_' + model.StructureDesignId).find('.widgetplace').first().prepend(widgetdata);
|
||||
}
|
||||
else {
|
||||
afterchild = model.StrctWidgetIndex - 1;
|
||||
beforechild = model.StrctWidgetIndex + 1;
|
||||
if (($('#structureId_' + model.StructureDesignId + ' .widgetplace').find('[data-strctwidgetindex="' + afterchild + '"][data-boxid="' + model.StructureDesignId + '"]').length) > 0) {
|
||||
$('#structureId_' + model.StructureDesignId + ' .widgetplace').find('[data-strctwidgetindex="' + afterchild + '"][data-boxid="' + model.StructureDesignId + '"]').after(widgetdata);
|
||||
}
|
||||
else if (($('#structureId_' + model.StructureDesignId + ' .widgetplace').find('[data-strctwidgetindex="' + beforechild + '"][data-boxid="' + model.StructureDesignId + '"]').length) > 0) {
|
||||
$('#structureId_' + model.StructureDesignId + ' .widgetplace').find('[data-strctwidgetindex="' + beforechild + '"][data-boxid="' + model.StructureDesignId + '"]').before(widgetdata);
|
||||
}
|
||||
else if (model.StrctWidgetIndex < Number($('#structureId_' + model.StructureDesignId + ' [data-boxid="' + model.StructureDesignId + '"]').attr('data-strctwidgetindex'))) {
|
||||
$('#structureId_' + model.StructureDesignId + ' [data-boxid="' + model.StructureDesignId + '"]').before(widgetdata);
|
||||
}
|
||||
else if (model.StrctWidgetIndex > Number($('#structureId_' + model.StructureDesignId + ' [data-boxid="' + model.StructureDesignId + '"]').attr('data-strctwidgetindex'))) {
|
||||
$('#structureId_' + model.StructureDesignId + ' [data-boxid="' + model.StructureDesignId + '"]').after(widgetdata);
|
||||
}
|
||||
else {
|
||||
$('#structureId_' + model.StructureDesignId + ' .widgetplace').append(widgetdata);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$('[data-divstructureid="default-structure"]').find('.widgetplace').append(widgetdata);
|
||||
}
|
||||
var StrWidgetID = '.widgetdataHere.widgetid-' + model.WidgetId + '';
|
||||
var FindStrutreLength = $(StrWidgetID).length;
|
||||
if (FindStrutreLength >= 2) {
|
||||
$('#dashboardwidget-container .widgetdataHere.widgetid-' + model.WidgetId + '').not(':last').remove();
|
||||
}
|
||||
$(widgetdata).addClass("mb-2");
|
||||
$(".structureToDelete .structureToDelete").find(".PaddingMoveRight").addClass("p-0 pr-1").removeClass("p-1");
|
||||
$(".structureToDelete .structureToDelete").find(".PaddingMoveLeft").addClass("p-0 pl-1").removeClass("p-1");
|
||||
$(".structureToDelete .structureToDelete").find(".PaddingMoveX").addClass("p-0 px-1").removeClass("p-1");
|
||||
$(".structureToDelete ").find(".PaddingMoveRight").addClass("p-0 pr-1").removeClass("p-1");
|
||||
$(".structureToDelete ").find(".PaddingMoveLeft").addClass("p-0 pl-1").removeClass("p-1");
|
||||
$(".structureToDelete ").find(".PaddingMoveX").addClass("p-0 px-1").removeClass("p-1");
|
||||
$("#deleteWidget-" + model.PortletWidgetId).click(function () {
|
||||
instance.fileCacheHelper.loadJsFile("platform/widgets/components/widget.js", function () {
|
||||
Unibase.Platform.Widgets.Components.Widget.Instance().deletePortletWidgets(model.PortletWidgetId);
|
||||
});
|
||||
});
|
||||
}
|
||||
var _fileCacheHelper = this.fileCacheHelper;
|
||||
this.models = data;
|
||||
this.jsindex = 0;
|
||||
this.htmlindex = 0;
|
||||
this.evalExecuted = 0;
|
||||
instance.evaluateJs(data);
|
||||
$("#section_bizgaze_main").removeClass("hidden");
|
||||
}
|
||||
}
|
||||
ShowWidgetPermissions(PortletWidgetId) {
|
||||
var instance = this;
|
||||
$('.btn_addportlt').addClass('hidden');
|
||||
$('.btnEdit_portlet').addClass('hidden');
|
||||
$('.manage_pPermissions').addClass('hidden');
|
||||
$('.btn_dltportlet').addClass('hidden');
|
||||
instance.navigationHelper.popup(0, "", Unibase.Platform.Widgets.Components.WidgetPermission.Instance(), function () {
|
||||
$("#chkIsWidgetViewable").change(function () {
|
||||
Unibase.Platform.Widgets.Components.WidgetPermission.Instance().setViewable();
|
||||
});
|
||||
Unibase.Platform.Widgets.Components.WidgetPermission.Instance().showPermissions(PortletWidgetId, 'widget', Unibase.Platform.Widgets.WidgetHiddenFields.Instance().unix_pwid);
|
||||
}, Unibase.Platform.Helpers.Size.Medium);
|
||||
}
|
||||
EditWidget(Wid, x, PortletWidgetId, isFromAddWidget) {
|
||||
var instance = this;
|
||||
$(".biz-submenu").css({ "z-index": "1040" });
|
||||
$(".biz-layout-3-left-nav").css({ "z-index": "1040" });
|
||||
$(".toplayout-structures-panel").css({ "z-index": "1040" });
|
||||
instance.fileCacheHelper.loadJsFile("platform/widgets/components/widget.js", function () {
|
||||
Unibase.Platform.Widgets.Components.Widget.Instance().loadWidgetData(Wid, 0, true, PortletWidgetId, isFromAddWidget);
|
||||
});
|
||||
}
|
||||
filterStructures(data, containerid, parentId) {
|
||||
let myStructures, instance = this;
|
||||
let VisibleContainerId = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
|
||||
if (VisibleContainerId.includes('_viewall')) {
|
||||
VisibleContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 2];
|
||||
}
|
||||
$('#' + VisibleContainerId).find('#' + containerid).attr({ 'data-isedit': 'false' });
|
||||
if (!parentId) {
|
||||
var myStructuresSort = data.filter(structure => structure.ParentId == 0);
|
||||
}
|
||||
else {
|
||||
var myStructuresSort = data.filter(structure => structure.ParentId == parentId);
|
||||
}
|
||||
if (myStructuresSort.length)
|
||||
myStructures = myStructuresSort.sort(this.sortStructureWidgets);
|
||||
let width, innerHtml = '', outerHtml = '', ParentDiv, binding, mobileWidth = [], tabWidth = [], _tabWidth = '', _mobileWidth = '', desktopPdng = '', tabPdng = '', MobilePdng = '';
|
||||
if (myStructures != undefined) {
|
||||
for (var i = 0; i < myStructures.length; i++) {
|
||||
if (myStructures[i].ParentId == 0) {
|
||||
ParentDiv = containerid;
|
||||
outerHtml = '<div class="d-flex flex-wrap structureToDelete w-100 structureDiv" data-divstructureid=' + myStructures[i].StructureId + ' data-clone="clonestruct" data-parent=' + ParentDiv + ' id="divStructure_' + myStructures[i].ParentId + '-' + myStructures[i].StructureId + '-' + myStructures[i].StructureVIndex + '" data-isEdit="false" data-strctwidgetindex=' + myStructures[i].StrctWidgetIndex + ' data-boxid="' + myStructures[i].ParentId + '" data-ParentIndex="' + myStructures[i].ParentId + '"></div>';
|
||||
if (myStructures[i].StructureHIndex == 0) {
|
||||
$('#' + VisibleContainerId).find('#' + ParentDiv).append(outerHtml);
|
||||
}
|
||||
}
|
||||
else {
|
||||
ParentDiv = 'structureId_' + myStructures[i].ParentId;
|
||||
outerHtml = '<div class="d-flex flex-wrap structureToDelete w-100 structureDiv" data-divstructureid=' + myStructures[i].StructureId + ' data-clone="clonestruct" data-parent="' + ParentDiv + '" id="divStructure_' + myStructures[i].ParentId + '-' + myStructures[i].StructureId + '-' + myStructures[i].StructureVIndex + '" data-isEdit="false" data-strctwidgetindex=' + myStructures[i].StrctWidgetIndex + ' data-boxid="' + myStructures[i].ParentId + '" data-ParentIndex="' + myStructures[i].ParentId + '"></div>';
|
||||
if (myStructures[i].StructureHIndex == 0) {
|
||||
$('#' + VisibleContainerId).find('#structureId_' + myStructures[i].ParentId).find('.widgetplace ').first().append(outerHtml);
|
||||
}
|
||||
}
|
||||
width = myStructures[i].StructureWidth.split('|'), _mobileWidth = '', _tabWidth = '';
|
||||
let desktopWidth = width[myStructures[i].StructureHIndex];
|
||||
if (myStructures[i].StructureMobileWidth != '' && myStructures[i].StructureMobileWidth != null && myStructures[i].StructureMobileWidth != undefined) {
|
||||
mobileWidth = myStructures[i].StructureMobileWidth.split('|');
|
||||
if (mobileWidth == null || mobileWidth[myStructures[i].StructureHIndex] == '' || mobileWidth[myStructures[i].StructureHIndex] == '0' || mobileWidth[myStructures[i].StructureHIndex] == undefined) {
|
||||
_mobileWidth = '';
|
||||
}
|
||||
else {
|
||||
_mobileWidth = ' col-' + mobileWidth[myStructures[i].StructureHIndex] + ' col-xs-' + mobileWidth[myStructures[i].StructureHIndex] + ' col-sm-' + mobileWidth[myStructures[i].StructureHIndex];
|
||||
}
|
||||
}
|
||||
if (myStructures[i].StructureTabWidth != '' && myStructures[i].StructureTabWidth != null && myStructures[i].StructureTabWidth != undefined) {
|
||||
tabWidth = myStructures[i].StructureTabWidth.split('|');
|
||||
if (tabWidth == null || tabWidth[myStructures[i].StructureHIndex] == '' || tabWidth[myStructures[i].StructureHIndex] == '0' || tabWidth[myStructures[i].StructureHIndex] == undefined) {
|
||||
_tabWidth = '';
|
||||
}
|
||||
else {
|
||||
_tabWidth = ' col-md-' + tabWidth[myStructures[i].StructureHIndex] + ' col-lg-' + tabWidth[myStructures[i].StructureHIndex];
|
||||
}
|
||||
}
|
||||
desktopPdng = instance.pdng_Algn(myStructures[i].StructureWidth, myStructures[i].StructureHIndex, "Desktop", myStructures[i].StrctWidgetIndex);
|
||||
tabPdng = instance.pdng_Algn(myStructures[i].StructureTabWidth, myStructures[i].StructureHIndex, "Tab", myStructures[i].StrctWidgetIndex);
|
||||
MobilePdng = instance.pdng_Algn(myStructures[i].StructureMobileWidth, myStructures[i].StructureHIndex, "Mobile", myStructures[i].StrctWidgetIndex);
|
||||
innerHtml = '<div class="' + _mobileWidth + ' ' + _tabWidth + ' col-xl-' + desktopWidth + ' droppablePlaceCol ui-sortable-handle ' + desktopPdng + ' ' + tabPdng + ' ' + MobilePdng + '" data-isblock="1" data-structureindex="' + myStructures[i].StructureHIndex + '" data-parent="divStructure_' + myStructures[i].ParentId + '-' + myStructures[i].StructureId + '-' + myStructures[i].StructureVIndex + '" id="structureId_' + myStructures[i].StructureDesignId + '" data-mobile_settingwidth="' + myStructures[i].StructureMobileWidth + '" data-tab_settingwidth="' + myStructures[i].StructureTabWidth + '" data-parentIndex="' + myStructures[i].ParentId + '"><div class="blocks-droppable-items-place ui-sortable-handle widgetplace ui-sortable" id="12"></div></div>';
|
||||
if (myStructures[i].StructureHIndex == 0) {
|
||||
binding = 'divStructure_' + myStructures[i].ParentId + '-' + myStructures[i].StructureId + '-' + myStructures[i].StructureVIndex;
|
||||
$('#' + VisibleContainerId).find('#divStructure_' + myStructures[i].ParentId + '-' + myStructures[i].StructureId + '-' + myStructures[i].StructureVIndex).append(innerHtml);
|
||||
}
|
||||
else {
|
||||
$('#' + VisibleContainerId).find('#' + binding).append(innerHtml);
|
||||
}
|
||||
}
|
||||
myStructures.forEach(structure => {
|
||||
this.filterStructures(data, containerid, structure.StructureDesignId);
|
||||
});
|
||||
}
|
||||
}
|
||||
pdng_Algn(width, HIndex, resolution, WSIndex) {
|
||||
let instance = this, padding;
|
||||
let curIndex = instance.padding(width, HIndex, WSIndex);
|
||||
if (resolution == "Desktop") {
|
||||
if (width != '') {
|
||||
if (curIndex == 0) {
|
||||
padding = 'px-xl-0';
|
||||
}
|
||||
if (curIndex == 1) {
|
||||
padding = 'pl-xl-0 pr-xl-10';
|
||||
}
|
||||
if (curIndex == 2) {
|
||||
padding = 'px-xl-10';
|
||||
}
|
||||
if (curIndex == 3) {
|
||||
padding = 'pl-xl-10 pr-xl-0';
|
||||
}
|
||||
}
|
||||
else {
|
||||
padding = 'px-xl-0';
|
||||
}
|
||||
}
|
||||
if (resolution == "Tab") {
|
||||
if (width != '') {
|
||||
if (curIndex == 0) {
|
||||
padding = 'px-lg-0 px-md-0';
|
||||
}
|
||||
if (curIndex == 1) {
|
||||
padding = 'pl-md-0 pr-md-10 pl-lg-0 pr-lg-10';
|
||||
}
|
||||
if (curIndex == 2) {
|
||||
padding = 'px-lg-10 px-md-10';
|
||||
}
|
||||
if (curIndex == 3) {
|
||||
padding = 'pl-md-10 pr-md-0 pl-lg-10 pr-lg-0';
|
||||
}
|
||||
}
|
||||
else {
|
||||
padding = 'px-md-0 px-lg-0';
|
||||
}
|
||||
}
|
||||
if (resolution == "Mobile") {
|
||||
if (width != '') {
|
||||
if (curIndex == 0) {
|
||||
padding = 'px-0 px-sm-0';
|
||||
}
|
||||
if (curIndex == 1) {
|
||||
padding = 'pl-0 pr-10 pl-sm-0 pr-sm-10';
|
||||
}
|
||||
if (curIndex == 2) {
|
||||
padding = 'px-10 px-sm-10';
|
||||
}
|
||||
if (curIndex == 3) {
|
||||
padding = 'pl-10 pr-0 pl-sm-10 pr-sm-0';
|
||||
}
|
||||
}
|
||||
else {
|
||||
padding = 'px-0 px-sm-0';
|
||||
}
|
||||
}
|
||||
return padding;
|
||||
}
|
||||
padding(width, AcutalIndex, WSIndex) {
|
||||
let ElmntWidth = width.split('|'), currentIndex, breakIndex, breakarray = [], _breakarray = [], isBreak = false, sumWidth = ElmntWidth.reduce((x, y) => parseInt(x) + parseInt(y), 0), preBreakIndex = [], sliceWidth = ElmntWidth.slice(0, AcutalIndex + 1), _sliceWidth, _sumSliceWidth, sumSliceWidth = sliceWidth.reduce((x, y) => parseInt(x) + parseInt(y), 0);
|
||||
if (parseInt(ElmntWidth[AcutalIndex]) == 12) {
|
||||
currentIndex = 0;
|
||||
}
|
||||
else {
|
||||
if (sumSliceWidth < 12 && AcutalIndex == 0) {
|
||||
currentIndex = 1;
|
||||
}
|
||||
if (sumSliceWidth < 12 && AcutalIndex != 0) {
|
||||
currentIndex = 2;
|
||||
}
|
||||
if (sumSliceWidth == 12) {
|
||||
currentIndex = 3;
|
||||
}
|
||||
if (sumSliceWidth > 12) {
|
||||
if (parseInt(ElmntWidth[AcutalIndex]) == 12) {
|
||||
currentIndex = 0;
|
||||
}
|
||||
else {
|
||||
currentIndex = 1;
|
||||
for (let i = 0; i < ElmntWidth.length; i++) {
|
||||
breakarray.push(parseInt(ElmntWidth[i]));
|
||||
let sumbreakarray = breakarray.reduce((x, y) => parseInt(x) + parseInt(y), 0);
|
||||
if (sumbreakarray > 12 && !isBreak) {
|
||||
isBreak = true;
|
||||
breakIndex = i;
|
||||
preBreakIndex.push({ "breakIndex": breakIndex, "isBreak": isBreak, "AcutalIndex": AcutalIndex });
|
||||
}
|
||||
}
|
||||
_sliceWidth = ElmntWidth.slice((breakIndex), (AcutalIndex + 1));
|
||||
_sumSliceWidth = _sliceWidth.reduce((x, y) => parseInt(x) + parseInt(y), 0);
|
||||
if (_sumSliceWidth < 12 && AcutalIndex == breakIndex) {
|
||||
currentIndex = 1;
|
||||
}
|
||||
if (_sumSliceWidth < 12 && AcutalIndex != breakIndex) {
|
||||
currentIndex = 2;
|
||||
}
|
||||
if (_sumSliceWidth == 12) {
|
||||
currentIndex = 3;
|
||||
}
|
||||
if (_sumSliceWidth > 12) {
|
||||
currentIndex = 1;
|
||||
isBreak = false;
|
||||
for (let k = 0; k < _sliceWidth.length; k++) {
|
||||
_breakarray.push(parseInt(_sliceWidth[k]));
|
||||
let sumbreakarray = _breakarray.reduce((x, y) => parseInt(x) + parseInt(y), 0);
|
||||
if (sumbreakarray > 12 && !isBreak) {
|
||||
isBreak = true;
|
||||
breakIndex = k;
|
||||
preBreakIndex.push({ "breakIndex": breakIndex, "isBreak": isBreak, "AcutalIndex": AcutalIndex });
|
||||
}
|
||||
}
|
||||
_sliceWidth = _sliceWidth.slice((breakIndex), (AcutalIndex + 1));
|
||||
_sumSliceWidth = _sliceWidth.reduce((x, y) => parseInt(x) + parseInt(y), 0);
|
||||
if (_sumSliceWidth < 12 && _sliceWidth.length == 1) {
|
||||
currentIndex = 1;
|
||||
}
|
||||
if (_sumSliceWidth < 12 && _sliceWidth.length != 1) {
|
||||
currentIndex = 2;
|
||||
}
|
||||
if (_sumSliceWidth == 12) {
|
||||
currentIndex = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return currentIndex;
|
||||
}
|
||||
sortStructureWidgets(a, b) {
|
||||
const sortA = a.StrctWidgetIndex;
|
||||
const sortB = b.StrctWidgetIndex;
|
||||
let comparison = 0;
|
||||
if (sortA > sortB) {
|
||||
comparison = 1;
|
||||
}
|
||||
else if (sortA < sortB) {
|
||||
comparison = -1;
|
||||
}
|
||||
return comparison;
|
||||
}
|
||||
navigationClickEvent(dashboards, groupid, dashboardOptionList, dashboardId) {
|
||||
const instance = this;
|
||||
const modalContainerId = instance.navigationHelper.getLastContainerId();
|
||||
let optionTemplate = Components.Nav_Template.Instance().DashboardItemTemplate();
|
||||
$('li.li-dashboard-item.active-item').removeClass('active-item');
|
||||
$('.liDashboardGroup_' + groupid).addClass('active-item');
|
||||
let groupTitle = dashboards[0].DashboardGroupName;
|
||||
$('#lblDbGroup_Title').text(groupTitle);
|
||||
const dbOptionEl = $(dashboardOptionList);
|
||||
dbOptionEl.html('');
|
||||
dashboards.forEach(function (dashboard, index) {
|
||||
let context = dashboard;
|
||||
let optiontemplatescript = Handlebars.compile(optionTemplate);
|
||||
let optionhtml = optiontemplatescript(context);
|
||||
dbOptionEl.append(optionhtml);
|
||||
});
|
||||
let filterEl;
|
||||
if (dashboardId) {
|
||||
filterEl = dbOptionEl.find(`#filterItem_${dashboardId}`);
|
||||
}
|
||||
else {
|
||||
filterEl = dbOptionEl.find('.filter-item').first();
|
||||
}
|
||||
filterEl.addClass("active");
|
||||
if (filterEl.attr('data-pincmnfilters') === 'true') {
|
||||
instance.loadCommonFilterPanel(modalContainerId);
|
||||
}
|
||||
if (groupTitle == "") {
|
||||
$('#lblDbGroup_Title').text($(`.liDashboardGroup_${groupid} .nav-link`).first().text());
|
||||
}
|
||||
Unibase.Themes.Compact.Components.Nav.Instance().removeToolTipForFilterItem(dbOptionEl);
|
||||
$('.biz-wrapper').removeClass('biz__nav__toggle');
|
||||
$('.biz-nav-fullwidth').addClass('hidden');
|
||||
}
|
||||
loadDashboards(dashboards, dashboardId, IsEvent) {
|
||||
const instance = this;
|
||||
if (IsEvent) {
|
||||
var groupid = dashboards[0].DashboardGroupId, dashboardOptionList = '.dashboard-options-list';
|
||||
this.navigationClickEvent(dashboards, groupid, dashboardOptionList, dashboardId);
|
||||
}
|
||||
$(".layout-dashboard-tabs").removeClass('hidden');
|
||||
$(".layout-dashboard-tabs").find('.filter-nav-icon').addClass('hidden');
|
||||
if (dashboards.length == 0) {
|
||||
$(".layout-dashboard-tabs .tab-addeditem").empty();
|
||||
$("#dashboardwidget-container").empty();
|
||||
}
|
||||
else {
|
||||
var html = "";
|
||||
$(".tab-addeditem").remove();
|
||||
if (this._bizgaze_core_activeinstalledappId != 0) {
|
||||
this._bizgaze_core_activeportletid = 0;
|
||||
}
|
||||
this._bizgaze_core_activeinstalledappId = 0;
|
||||
if (dashboardId) {
|
||||
this._bizgaze_core_activeportletid = dashboardId;
|
||||
}
|
||||
var firstdashboardid = this._bizgaze_core_activeportletid;
|
||||
var firstdashboardname = "";
|
||||
$("#layout-dashboard-tabs").find('.dashboard-tab').first().before(html);
|
||||
if (firstdashboardid == 0) {
|
||||
var dashboard = dashboards[0];
|
||||
var dashboardId = dashboard.DashboardId;
|
||||
var dashboardName = dashboard.DashboardName;
|
||||
firstdashboardid = dashboardId;
|
||||
firstdashboardname = dashboardName;
|
||||
}
|
||||
$(".tabid-" + firstdashboardid).find(".nav-link").addClass("active");
|
||||
this._bizgaze_core_activeportletid = firstdashboardid;
|
||||
if (firstdashboardid != 0 && this.firstLoad) {
|
||||
this.firstLoad = false;
|
||||
let dbContainerId = instance.navigationHelper.getLastContainerId();
|
||||
let rvInsArray = Unibase.Platform.Helpers.NavigationHelper.reportViewerInstance.filter(x => x.parentcontainerid == dbContainerId);
|
||||
let cmnFilIns = Unibase.Platform.Analytics.Components._CommonFilter.Instance();
|
||||
cmnFilIns.appliedFilters = [];
|
||||
for (var i = 0; i < rvInsArray.length; i++) {
|
||||
rvInsArray[i].instance.inputParameters = [];
|
||||
rvInsArray[i].instance.Filter = [];
|
||||
rvInsArray[i].instance.dynamicFilters = [];
|
||||
}
|
||||
cmnFilIns.cascadingFilters = [];
|
||||
cmnFilIns.selectedCommonFilters = [];
|
||||
cmnFilIns.commonFilter(0, dbContainerId);
|
||||
if (!Unibase.Themes.Compact.Components.Nav.Instance().isDshboardBck) {
|
||||
Unibase.Themes.Compact.Components.Nav.Instance().isDshboardBckArray.push({
|
||||
"DashbaordId": firstdashboardid, "DashboardName": firstdashboardname, "isBack": "Dashboard"
|
||||
});
|
||||
}
|
||||
else {
|
||||
Unibase.Themes.Compact.Components.Nav.Instance().isDshboardBck = false;
|
||||
}
|
||||
this.loadWidgets(firstdashboardid, firstdashboardname);
|
||||
}
|
||||
$("#collapsed").find("a").removeClass("nav-link").addClass("h-30p");
|
||||
$("#div-layout-report").addClass('hidden');
|
||||
}
|
||||
}
|
||||
loadWidgets(portalid, portletName) {
|
||||
if ($('.dashboard-options-list .filter-item.active').length) {
|
||||
$('.dashboard-options-list .filter-item.active').removeClass('active');
|
||||
$(`.dashboard-options-list #filterItem_${portalid}`).addClass('active');
|
||||
$(`#nav-dashboards .ligrp-item.active-item`).removeClass('active-item');
|
||||
$(`#nav-dashboards .UlItem_${portalid}`).addClass('active-item');
|
||||
}
|
||||
$(".tabid-" + portalid).find(".nav-link").addClass("active");
|
||||
$("#hfLayout_InstalledPageId").val(0);
|
||||
$("#hf_DashboardPortletId").val(portalid);
|
||||
$("#hf_DashboardPortletName").val(portletName);
|
||||
$("#hf_PortletId").val(portalid);
|
||||
$("#Stage").removeClass('hidden');
|
||||
$(".EditPortlets").addClass('hidden');
|
||||
$(".Detail_Configurations").removeClass('hidden');
|
||||
$(".portletmenu-addeditem").remove();
|
||||
$("#AddPortlet").addClass("hidden");
|
||||
$("#SavePortlet").addClass("hidden");
|
||||
$("#chkLayout_PortletsSelector").addClass("hidden");
|
||||
$("#layout-list").hide();
|
||||
$("#layout-dashboard").show();
|
||||
$("#layout-report").hide();
|
||||
this._bizgaze_core_activeportletid = portalid;
|
||||
$("#dashboard-title").html(portletName);
|
||||
$("#txt_global_search").val('');
|
||||
$("#txt_global_clearSearch").addClass("hidden");
|
||||
var instance = this;
|
||||
if (this._dashboard_first_load == 0) {
|
||||
if ($('.skelton_loader').length == 0) {
|
||||
let skelHtml = '<div class="skelton_loader biz-secondary-color position-absolute px-2 px-sm-15 px-md-20 w-100 z-index-10">';
|
||||
skelHtml += Unibase.Themes.Compact.Components.Nav_Template.Instance().skelTonDashboardStructure();
|
||||
skelHtml += '</div>';
|
||||
$("#bizDbHeader").after(skelHtml);
|
||||
if (window.innerWidth < 575) {
|
||||
$('.skelton_loader').removeClass('px-2');
|
||||
}
|
||||
}
|
||||
$(".dashboardwidget-container").html("");
|
||||
$(".dashboardwidget-container").addClass('invisible');
|
||||
Unibase.Platform.Portlets.Managers.PortletManager.Instance().getPortletStructureDesign(portalid).then(function (response) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var data = response.result;
|
||||
if (data.length == 0) {
|
||||
let VisibleContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
|
||||
let divStructure = 'divStructure_' + Math.floor(Math.random() * Date.now());
|
||||
let boxId = 'structureId_' + Math.floor(Math.random() * Date.now());
|
||||
let html = `<div class="d-flex flex-wrap structureToDelete w-100 structureDiv" data-divstructureid="default-structure" data-clone="clonestruct" data-parent="dashboardwidget-container" id="${divStructure}" data-isedit="true" data-strctwidgetindex="0" data-parentindex="0"> <div class="col-lg-12 droppablePlaceCol ui-sortable-handle px-md-0 px-0" data-isblock="1" data-structureindex="0" data-parent="${divStructure}" id="${boxId}" data-mobile_settingwidth="" data-tab_settingwidth="" data-parentindex="0"> <div class="blocks-droppable-items-place ui-sortable-handle widgetplace ui-sortable d-flex flex-wrap" id="12"></div></div></div>`;
|
||||
$('#' + VisibleContainerId).find('.dashboardwidget-container').html(html);
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
|
||||
}
|
||||
else {
|
||||
if (data != null) {
|
||||
yield instance.filterStructures(data, 'dashboardwidget-container');
|
||||
yield Unibase.Platform.Portlets.Managers.PortletManager.Instance().getPortletWidgets(portalid, 0).then(function (response) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
var data = response.result;
|
||||
yield instance.loadWidgetData(data);
|
||||
});
|
||||
});
|
||||
$('#dashboardwidget-container-scroll').css('background-color', 'unset');
|
||||
yield instance.navigationHelper.hideLoading();
|
||||
}
|
||||
else {
|
||||
return MessageHelper.Instance().showError(response.message, 'bizgaze_message');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
if (this._dashboard_first_load == 1)
|
||||
this._dashboard_first_load = 0;
|
||||
this.Biz_FavoriteStatus();
|
||||
this.trackPortlet(portalid);
|
||||
}
|
||||
DashBoardSwipe(direction) {
|
||||
let VisibleContainerId = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
|
||||
const dbFiltersEl = $(`#${VisibleContainerId} .dashboard-options-list`);
|
||||
const filtersLength = dbFiltersEl.find('.filter-item').length;
|
||||
let activeIndex = dbFiltersEl.find('.filter-item.active').index();
|
||||
if (direction == 'SWIPE_RIGHT') {
|
||||
let pos = activeIndex < 1 ? filtersLength - 1 : activeIndex - 1;
|
||||
dbFiltersEl.find('.filter-link').eq(pos).trigger('click');
|
||||
}
|
||||
if (direction == 'SWIPE_LEFT') {
|
||||
let pos = activeIndex < filtersLength - 1 ? activeIndex + 1 : 0;
|
||||
dbFiltersEl.find('.filter-link').eq(pos).trigger('click');
|
||||
}
|
||||
}
|
||||
Biz_FavoriteStatus() {
|
||||
var installedPageaId = $('#hfLayout_InstalledPageId').val();
|
||||
var portletId = $('#hf_DashboardPortletId').val();
|
||||
if (installedPageaId == 0 && portletId !== null) {
|
||||
var url = "/api/v3/Portlets/UserPortletStatus/" + portletId;
|
||||
}
|
||||
}
|
||||
trackPortlet(portletid) {
|
||||
var url = "/api/v3/Portlets/SavePortletTrack/" + portletid;
|
||||
}
|
||||
evaluateJs(data) {
|
||||
var currentinstance = this, url;
|
||||
this.evalExecuted = 1;
|
||||
let k = 0;
|
||||
var staticfileaarry = [];
|
||||
var staticwidetfiles = data.filter(function (o) { return o.WidgetUrl !== '' && o.WidgetUrl !== null; });
|
||||
if (staticwidetfiles != null && staticwidetfiles != '') {
|
||||
for (var i = 0; i < staticwidetfiles.length; i++) {
|
||||
var staticjs = staticwidetfiles[i].WidgetUrl.split(',');
|
||||
staticfileaarry.push(staticjs[0]);
|
||||
}
|
||||
}
|
||||
currentinstance.fileCacheHelper.loadJsFiles(staticfileaarry, function () {
|
||||
for (const model of data) {
|
||||
let containerid = "div_dashboardportletwidget_" + model.PortletWidgetId;
|
||||
if (model.WidgetUrl != null && model.WidgetUrl != '') {
|
||||
url = model.WidgetUrl.split(',');
|
||||
currentinstance.fileCacheHelper.loadJsFile(url[0], function () {
|
||||
eval(url[1] + '.init("' + containerid + '")');
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (model != null) {
|
||||
if (model.StaticJsPath != null) {
|
||||
var instance1 = eval(model.StaticJsPath);
|
||||
}
|
||||
if (model.Js != null) {
|
||||
if (model.JsPath != null && model.Js != "") {
|
||||
currentinstance.fileCacheHelper.loadJsFile(model.JsPath, function () {
|
||||
var instance = eval(model.Js);
|
||||
var wclist = [];
|
||||
var wc = instance;
|
||||
var DetailContainerId = currentinstance._dashboard_container;
|
||||
wclist.push({ PortletWidgetId: model.PortletWidgetId, WidgetId: model.WidgetId, WidgetParameters: model.Parameter, WidgetName: model.WidgetName, InstalledAppId: 0, DetailContainerId: DetailContainerId, StaticJsPath: model.StaticJsPath, ReportId: model.ReportId, StructureDesignId: 'structureId_' + model.StructureDesignId, IsFilterable: model.IsFilterable, WidgetDesignName: model.WidgetDesignName, CustomHtml: model.CustomHtml });
|
||||
currentinstance.navigationHelper.loadSection(wclist, containerid, instance, null, null);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
k++;
|
||||
if (k == data.length) {
|
||||
if (Unibase.Themes.Compact.Components.Index.Instance().isIframe) {
|
||||
Unibase.Themes.Compact.Components.Nav.Instance().loadChat();
|
||||
$("#bizgaze_body").removeClass('invisible');
|
||||
}
|
||||
if (!Unibase.Platform.Membership.Infos.Identity.currentUser.tenant.isLoggedIn) {
|
||||
Unibase.Themes.Compact.Components.Nav.Instance().wizard();
|
||||
}
|
||||
else {
|
||||
if (Unibase.Platform.Membership.Infos.Identity.currentUser.settings.filter(function (x) { return x.settingName == "isloginfirsttime"; })[0].settingValue != undefined && Unibase.Platform.Membership.Infos.Identity.currentUser.settings.filter(function (x) { return x.settingName == "isloginfirsttime"; })[0].settingValue == true) {
|
||||
currentinstance.appTourGuide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
replaceWidgetParameterValues(Parameter, Installedappid) {
|
||||
let installedappid = Installedappid;
|
||||
let ReplaceText = [];
|
||||
if (Parameter != "" && Parameter != null) {
|
||||
let identityparameter = [];
|
||||
let appparameter = [];
|
||||
let Parameters = Parameter.split('|');
|
||||
if (Parameters.length > 0) {
|
||||
let len = Parameters.length;
|
||||
for (let i = 0; i < Parameters.length; i++) {
|
||||
if (Parameters[i].includes('identity_'))
|
||||
identityparameter.push(Parameters[i]);
|
||||
else
|
||||
appparameter.push(Parameters[i]);
|
||||
}
|
||||
}
|
||||
if (identityparameter.length > 0) {
|
||||
for (let x = 0; x < identityparameter.length; x++) {
|
||||
let split = identityparameter[x].split(':');
|
||||
ReplaceText.push({
|
||||
Key: split[0],
|
||||
Value: (Unibase.Themes.Compact.Components.Dashboard.inputparameters[split[2].split('_')[1]]).toString(),
|
||||
DataType: split[4]
|
||||
});
|
||||
}
|
||||
}
|
||||
if (appparameter.length > 0) {
|
||||
for (let x = 0; x < appparameter.length; x++) {
|
||||
let split = appparameter[x].split(':');
|
||||
if (split[3] == 2) {
|
||||
ReplaceText.push({
|
||||
Key: split[0],
|
||||
Value: split[2],
|
||||
DataType: split[4]
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (installedappid != 0) {
|
||||
for (let obj of Unibase.Themes.Compact.Components.Details.inputparameters) {
|
||||
if (obj.Key === "hf_" + installedappid + "_" + split[2])
|
||||
ReplaceText.push({
|
||||
Key: split[0],
|
||||
Value: obj.Value.toString(),
|
||||
DataType: obj.DataType.toString()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ReplaceText;
|
||||
}
|
||||
loadIdentity() {
|
||||
var identityinfo = Unibase.Platform.Membership.Infos.Identity.getCurrentUser();
|
||||
var keys = Object.keys(identityinfo);
|
||||
for (let i = 0; i < keys.length; i++) {
|
||||
let val = identityinfo[keys[i]];
|
||||
Unibase.Themes.Compact.Components.Dashboard.inputparameters[keys[i]] = val;
|
||||
}
|
||||
}
|
||||
exportPortlet(portletId) {
|
||||
var instance = this;
|
||||
if (portletId == 0) {
|
||||
portletId = $("#hf_PortletId").val();
|
||||
portletId = Number(portletId);
|
||||
}
|
||||
instance.fileCacheHelper.loadJsFile("platform/dashboards/managers/dashboardmanager.js", function () {
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().showLoading();
|
||||
Unibase.Platform.Dashboards.Managers.DashboardManager.Instance().getDashboard(portletId).then(function (portletresponse) {
|
||||
if (portletresponse.result != null && portletresponse.result != undefined) {
|
||||
Unibase.Platform.Dashboards.Managers.DashboardManager.Instance().exportPortlet(portletId).then((response) => {
|
||||
if (response.status == Unibase.Data.Status.Error) {
|
||||
instance.navigationHelper.hideLoading();
|
||||
MessageHelper.Instance().showError(response.message, "div_permissionsimportmessage");
|
||||
}
|
||||
else if (response.result != null && response.result != undefined && portletresponse.result != null && portletresponse.result != undefined) {
|
||||
var filename = portletresponse.result.DashboardName + " - Dashboard.xml";
|
||||
var xmltext = response.result;
|
||||
var pom = document.createElement('a');
|
||||
var bb = new Blob([xmltext], { type: 'text/plain' });
|
||||
pom.setAttribute('href', window.URL.createObjectURL(bb));
|
||||
pom.setAttribute('download', filename);
|
||||
pom.dataset.downloadurl = ['text/plain', pom.download, pom.href].join(':');
|
||||
pom.draggable = true;
|
||||
pom.classList.add('dragout');
|
||||
pom.click();
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().hideLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
appTourGuide() {
|
||||
let instance = this;
|
||||
var _fileCacheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();
|
||||
_fileCacheHelper.loadCssFile("libs/tourguide/tour.min.css", null);
|
||||
_fileCacheHelper.loadJsFiles(["libs/tourguide/tour.min.js", "tenants/themes/compact/components/dashboard/walkthrough.js"], function () {
|
||||
let layouts = Unibase.Platform.Membership.Infos.Identity.getCurrentUser().settings.filter(function (o) { return o.settingName === "themeobj"; });
|
||||
let type, data = [];
|
||||
let JSONdata = JSON.parse(layouts[0].settingValue.layoutSettings.settingValue);
|
||||
let LayoutName = layouts[0].settingValue.layoutName.replace(/\s/g, '');
|
||||
if (Unibase.Themes.Providers.DetailHelper.installedAppId == 0) {
|
||||
let detailContid = 'card-header-filters' + Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
|
||||
let listContid = 'filters-list' + Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
|
||||
if ($('#' + listContid).length == 1 && $('#' + detailContid).length == 1 && $('#' + detailContid).hasClass('dashboard-tab')) {
|
||||
type = `Unibase.Themes.Compact.Components.WalkThrough.Instance().${LayoutName}()`;
|
||||
data = eval(type);
|
||||
}
|
||||
else if ($('#' + listContid).length == 1) {
|
||||
type = `Unibase.Themes.Compact.Components.WalkThrough.Instance().app()`;
|
||||
data = eval(type);
|
||||
}
|
||||
}
|
||||
else if (Unibase.Themes.Providers.DetailHelper.installedAppId != 0) {
|
||||
type = `Unibase.Themes.Compact.Components.WalkThrough.Instance().details()`;
|
||||
data = eval(type);
|
||||
}
|
||||
if (JSONdata.dashboards.IsEnabled == false) {
|
||||
data.splice(data.findIndex(obj => obj.title == 'DashBoard'), 1);
|
||||
}
|
||||
if (JSONdata.apps.IsEnabled == false) {
|
||||
data.splice(data.findIndex(obj => obj.title == "Apps"), 1);
|
||||
}
|
||||
if (JSONdata.reports.IsEnabled == false) {
|
||||
data.splice(data.findIndex(obj => obj.title == "Reports"), 1);
|
||||
}
|
||||
let _data = JSON.stringify(data);
|
||||
let script = '';
|
||||
script += `window.tour = new Tour({
|
||||
padding: 0,
|
||||
nextText: 'More',
|
||||
doneText: 'Finito',
|
||||
prevText: 'Less',
|
||||
tipClasses: 'tip-class active',
|
||||
steps:${_data}
|
||||
});
|
||||
$('#bizgaze_body').css('pointer-events', 'none').find('.hk-wrapper').css('z-index','0');
|
||||
tour.override('showStep', function(self, step) {
|
||||
self(step);
|
||||
$('.ttour-header').addClass('d-flex justify-content-between align-items-center').find('h1').addClass('list-item-main-title');
|
||||
$('.ttour-header').append('<a href="javascript:;" onclick="tour.end()" title="skip" class="btn btn-flush-biz-theme btn-icon btn-rounded flush-soft-hover"><span class="btn-icon-wrap"><i class="fa fa-fast-forward" ></span></i></a>');
|
||||
$('.ttour-footer button').addClass('btn btn-flush-biz-theme btn-icon btn-rounded flush-soft-hover shadow-none');
|
||||
$('.ttour-footer .next').html('<span class="btn-icon-wrap" title="Next"><i class="font-20 la la-angle-right"></i></span>')
|
||||
$('.ttour-footer .prev').html('<span class="btn-icon-wrap" title="Prev"><i class="font-20 la la-angle-left"></i></span>')
|
||||
$('.ttour-bullets').append('<span>(<span class="current_step"></span> Of <span class="total_steps"></span>)</span>');
|
||||
let noOfSteps = $('.ttour-bullet').length;
|
||||
let currentStep = $('.ttour-bullet.active').index() + 1;
|
||||
$('.current_step').html(currentStep);
|
||||
$('.total_steps').html(noOfSteps);
|
||||
})
|
||||
|
||||
tour.override('end', function(self, step) {
|
||||
self(step);
|
||||
$("#bizgaze_body").css("pointer-events", "auto").find('.hk-wrapper').removeAttr('style');
|
||||
})
|
||||
tour.start();
|
||||
if($('#layoutMainNavbar li.nav-group-container:not(.d-none)').length == 1){
|
||||
let offHeight = $("[data-target='#dash_drp']").offset().top - 15;
|
||||
// let innerHeight = $("[data-target='#dash_drp']").height() + 20;
|
||||
$('.ttour-tip.bottom').css('top', offHeight +'px');
|
||||
}`;
|
||||
eval(script);
|
||||
});
|
||||
}
|
||||
loadCommonFilterPanel(containerid) {
|
||||
const indexInstance = Unibase.Themes.Compact.Components.Index.Instance();
|
||||
$(`#bizCmnFilterDp_${containerid}`).removeClass('show');
|
||||
$(`#filter_toggle_btn${containerid}`).removeClass('d-flex').addClass('d-none');
|
||||
$(`#dynamic-filters${containerid}`).empty();
|
||||
$('.biz-pg-wrapper').first().addClass('has-cmn-filter-panel');
|
||||
$('#bizCmnFilterPanel').html(`<div class="cmn-filter-panel-wrap h-100 d-flex flex-column pa-0"><div class="cmn-filter-panel-head d-flex justify-content-between align-items-center border-bottom pa-10"><span class="cmn-filter-panel-head-title biz-secondary-text-color font-16">Common Filters</span><a href="javascript:void(0);" id="cmnFilterPanelClose" class="cmn-filter-panel-close btn btn-icon btn-flush-danger btn-rounded flush-soft-hover h-30p w-30p" onclick="Unibase.Themes.Compact.Components.Dashboard.Instance().closeCmnFilterPanel('${containerid}');" data-tooltip="true" title="Unpin Filters"><span class="btn-icon-wrap"><img src="tenants/themes/compact/imgs/unpin.png" class="img-fluid w-75" style="padding:3px;"/></span></a></div><div data-simplebar id="cmnFilterPanelBodyWrap" class="simple-scroll-bar cmn-filter-panel-body-wrap flex-grow-1"><div class="cmn-filter-panel-body cmn-filters-body pb-10" id="dynamic-filters_CmnFilterPanel_${containerid}"></div></div><div class="cmn-filter-panel-footer pa-10 pb-15 border-top" id="commonfilter_footerbuttons_CmnFilterPanel_${containerid}"></div>`).addClass('show');
|
||||
if (indexInstance.isTopLeftLayout()) {
|
||||
$('.biz-layout-3-top-navbar,.biz-layout-3-biz-pg-wrapper').addClass('hk-nav-toggle');
|
||||
$('.biz-layout-3-left-nav').addClass('biz__nav__toggle');
|
||||
}
|
||||
const portletId = +$("#hf_PortletId").val();
|
||||
Unibase.Platform.Analytics.Components._CommonFilter.Instance().commonFilter(portletId, `_CmnFilterPanel_${containerid}`);
|
||||
setTimeout(() => {
|
||||
Unibase.Themes.Compact.Components.Nav.Instance().showHideFilterNavIcons(containerid);
|
||||
}, 400);
|
||||
}
|
||||
closeCmnFilterPanel(containerid) {
|
||||
const indexInstance = Unibase.Themes.Compact.Components.Index.Instance();
|
||||
$('.biz-pg-wrapper').first().removeClass('has-cmn-filter-panel');
|
||||
$('#bizCmnFilterPanel').empty().removeClass('show');
|
||||
$(`.common-filter-dp-btn`).removeClass('d-none').addClass('d-flex');
|
||||
$('.common-filter-dropdown-body').removeClass('d-none');
|
||||
if (indexInstance.isTopLeftLayout()) {
|
||||
}
|
||||
let cls_fnav = $("#bizgaze_body").find('.biz-layout-3-top-navbar').hasClass("hk-nav-toggle");
|
||||
let cls_nav = $("#bizgaze_body").find('.biz-layout-3-top-navbar').hasClass("biz__nav__toggle");
|
||||
if (cls_fnav == true && cls_nav == false) {
|
||||
$('.biz-layout-3-top-navbar,.biz-layout-3-biz-pg-wrapper').removeClass('hk-nav-toggle');
|
||||
}
|
||||
setTimeout(() => {
|
||||
Unibase.Themes.Compact.Components.Nav.Instance().showHideFilterNavIcons(containerid);
|
||||
}, 400);
|
||||
}
|
||||
static Instance() {
|
||||
return new Dashboard();
|
||||
}
|
||||
}
|
||||
Dashboard.inputparameters = {};
|
||||
Components.Dashboard = Dashboard;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+66
File diff suppressed because one or more lines are too long
@@ -0,0 +1,335 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class WalkThrough {
|
||||
constructor() {
|
||||
this.dashboardObj = {
|
||||
des: 'You can view your Dashboard Groups and Dashboards here',
|
||||
title: "DashBoard"
|
||||
};
|
||||
this.reportObj = {
|
||||
des: 'You can view your Report Groups and Reports list here',
|
||||
title: "Reports",
|
||||
};
|
||||
this.appObj = {
|
||||
des: 'You can view your App Groups and Apps list here',
|
||||
title: "Apps",
|
||||
};
|
||||
this.dateObj = {
|
||||
des: 'Select the default date range that need to applied for Dashboards and Reports',
|
||||
title: "Date Filter",
|
||||
};
|
||||
this.branchObj = {
|
||||
des: 'You can switch your Branch ,Fisical Year and Data access related information',
|
||||
title: "Branch",
|
||||
};
|
||||
this.notificationsObj = {
|
||||
des: 'You can view your related notifcations list and clear them',
|
||||
title: "Notifications",
|
||||
};
|
||||
this.taskObj = {
|
||||
des: 'You can view your related tasks and manage them',
|
||||
title: "Tasks",
|
||||
};
|
||||
this.profileObj = {
|
||||
des: 'To view your Profile info, Application Help ,Themes and User Logoff',
|
||||
title: "Profile",
|
||||
};
|
||||
this.dashboardSettingsObj = {
|
||||
des: 'You can configure dashboard layout here and manage dashboard permissions to the users',
|
||||
title: "Dashbaord Settings",
|
||||
};
|
||||
this.commonFiltersObj = {
|
||||
des: 'You can select filters to be applied to a Dashbaord',
|
||||
title: "Common filters",
|
||||
};
|
||||
}
|
||||
LeftNavigation() {
|
||||
let steps = [{
|
||||
element: '[data-buttontype="nav-button-dashboards"]',
|
||||
title: this.dashboardObj.title,
|
||||
description: this.dashboardObj.des,
|
||||
position: "bottom"
|
||||
},
|
||||
{
|
||||
element: '[data-buttontype="nav-button-apps"]',
|
||||
title: this.appObj.title,
|
||||
description: this.appObj.des,
|
||||
position: "bottom"
|
||||
},
|
||||
{
|
||||
element: '[data-buttontype="nav-button-reports"]',
|
||||
title: this.reportObj.title,
|
||||
description: this.reportObj.des,
|
||||
position: "bottom"
|
||||
},
|
||||
{
|
||||
element: '[title="Dashboard Settings"]',
|
||||
title: this.dashboardSettingsObj.title,
|
||||
description: this.dashboardSettingsObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="Common Filters"]',
|
||||
title: this.commonFiltersObj.title,
|
||||
description: this.commonFiltersObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '#right_side_menu_userdetails',
|
||||
title: this.profileObj.title,
|
||||
description: this.profileObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '#navCmnDateFilterDp',
|
||||
title: this.dateObj.title,
|
||||
description: this.dateObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '.usertheme',
|
||||
title: 'Theme',
|
||||
description: 'You can choose your theme here.',
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '.right-side-menu-content-wrap #lnk_nav_changebranch',
|
||||
title: this.branchObj.title,
|
||||
description: this.branchObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="Notifications"]',
|
||||
title: this.notificationsObj.title,
|
||||
description: this.notificationsObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="Tasks"]',
|
||||
title: this.taskObj.title,
|
||||
description: this.taskObj.des,
|
||||
position: "left"
|
||||
},
|
||||
];
|
||||
return steps;
|
||||
}
|
||||
TopNavigation() {
|
||||
let steps = [{
|
||||
element: '.nav-dashboards-item',
|
||||
title: this.dashboardObj.title,
|
||||
description: this.dashboardObj.des,
|
||||
position: "bottom"
|
||||
},
|
||||
{
|
||||
element: '.nav-apps-item',
|
||||
title: this.appObj.title,
|
||||
description: this.appObj.des,
|
||||
position: "bottom"
|
||||
},
|
||||
{
|
||||
element: '.nav-reports-item',
|
||||
title: this.reportObj.title,
|
||||
description: this.reportObj.des,
|
||||
position: "bottom"
|
||||
},
|
||||
{
|
||||
element: '#report-daterange_navCmnDateFilter-0',
|
||||
title: this.dateObj.title,
|
||||
description: this.dateObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '#lnk_nav_changebranch',
|
||||
title: this.branchObj.title,
|
||||
description: this.branchObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="Notifications"]',
|
||||
title: this.notificationsObj.title,
|
||||
description: this.notificationsObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="Tasks"]',
|
||||
title: this.taskObj.title,
|
||||
description: this.taskObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '#nav-profile-dropdown',
|
||||
title: this.profileObj.title,
|
||||
description: this.profileObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="Dashboard Settings"]',
|
||||
title: this.dashboardSettingsObj.title,
|
||||
description: this.dashboardSettingsObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="Common Filters"]',
|
||||
title: this.commonFiltersObj.title,
|
||||
description: this.commonFiltersObj.des,
|
||||
position: "left"
|
||||
},
|
||||
];
|
||||
return steps;
|
||||
}
|
||||
TopandLeftNavigation() {
|
||||
let steps = [{
|
||||
element: '.nav-dashboards-item',
|
||||
title: this.dashboardObj.title,
|
||||
description: this.dashboardObj.des,
|
||||
position: "bottom"
|
||||
},
|
||||
{
|
||||
element: '.nav-apps-item',
|
||||
title: this.appObj.title,
|
||||
description: this.appObj.des,
|
||||
position: "bottom"
|
||||
},
|
||||
{
|
||||
element: '.nav-reports-item',
|
||||
title: this.reportObj.title,
|
||||
description: this.reportObj.des,
|
||||
position: "bottom"
|
||||
},
|
||||
{
|
||||
element: '#report-daterange_navCmnDateFilter-0',
|
||||
title: this.dateObj.title,
|
||||
description: this.dateObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '#lnk_nav_changebranch',
|
||||
title: this.branchObj.title,
|
||||
description: this.branchObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="Notifications"]',
|
||||
title: this.notificationsObj.title,
|
||||
description: this.notificationsObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="Tasks"]',
|
||||
title: this.taskObj.title,
|
||||
description: this.taskObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '#nav-profile-dropdown',
|
||||
title: this.profileObj.title,
|
||||
description: this.profileObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="Dashboard Settings"]',
|
||||
title: this.dashboardSettingsObj.title,
|
||||
description: this.dashboardSettingsObj.des,
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="Common Filters"]',
|
||||
title: this.commonFiltersObj.title,
|
||||
description: this.commonFiltersObj.des,
|
||||
position: "left"
|
||||
},
|
||||
];
|
||||
return steps;
|
||||
}
|
||||
app() {
|
||||
let steps = [{
|
||||
element: '.report-title-dp-wrapper',
|
||||
title: "App Report",
|
||||
description: 'To View connected reports of the app.',
|
||||
position: "right"
|
||||
},
|
||||
{
|
||||
element: '#ListSearch',
|
||||
title: "Search",
|
||||
description: 'You can search the app realted information by entering keywords.',
|
||||
position: "right"
|
||||
},
|
||||
{
|
||||
element: '[title="Dynamic Filters"]',
|
||||
title: "Dynamic Filters",
|
||||
description: 'You can apply filters here to load relevant data.',
|
||||
position: "right"
|
||||
},
|
||||
{
|
||||
element: '.create-btn',
|
||||
title: "Create",
|
||||
description: 'You can click here to open new creation form.',
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '[title="More"]',
|
||||
title: "App More",
|
||||
description: 'To open connected child Apps and Manage more settings of the app like notifications, permissions, Stages and other settings.',
|
||||
position: "left"
|
||||
}
|
||||
];
|
||||
steps = steps.filter(function (e) {
|
||||
return $(e.element).is(":visible") == true;
|
||||
});
|
||||
return steps;
|
||||
}
|
||||
details() {
|
||||
let steps = [
|
||||
{
|
||||
element: '.btnChangeStage',
|
||||
title: "Stages",
|
||||
description: 'You can click here to update stage of the record.',
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '.Detail_Configurations_' + Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId() + ' a[onclick*="loadForm("]',
|
||||
title: "Edit",
|
||||
description: 'You can click here to edit the current record.',
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '.select.div_configurationsetting',
|
||||
title: "More",
|
||||
description: 'You can click here to view more options.',
|
||||
position: "left"
|
||||
},
|
||||
{
|
||||
element: '#layout-detail-tabs',
|
||||
title: "Tabs",
|
||||
description: 'You can switch tabs here to view relevant data.',
|
||||
position: "bottom"
|
||||
},
|
||||
{
|
||||
element: '#detail-close',
|
||||
title: "Back",
|
||||
description: 'You can click here to load previous page.',
|
||||
position: "right"
|
||||
}
|
||||
];
|
||||
steps = steps.filter(function (e) {
|
||||
return $(e.element).is(":visible") == true;
|
||||
});
|
||||
return steps;
|
||||
}
|
||||
static Instance() {
|
||||
if (this._instance === undefined)
|
||||
this._instance = new Unibase.Themes.Compact.Components.WalkThrough;
|
||||
return this._instance;
|
||||
}
|
||||
}
|
||||
Components.WalkThrough = WalkThrough;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"walkthrough.js","sourceRoot":"","sources":["walkthrough.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CA0HhB;AA1HD,WAAU,OAAO;IACb,IAAiB,MAAM,CAwHtB;IAxHD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAsHvB;QAtHD,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAoH1B;YApHD,WAAiB,UAAU;gBACvB,MAAa,WAAW;oBAEpB,cAAc;wBACV,IAAI,KAAK,GAAG,CAAC;gCACO,OAAO,EAAE,wBAAwB;gCACjC,KAAK,EAAE,WAAW;gCAClB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,OAAO;6BACpB;4BACD;gCACI,OAAO,EAAE,kBAAkB;gCAC3B,KAAK,EAAE,MAAM;gCACb,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,OAAO;6BACpB;4BACD;gCACI,OAAO,EAAE,qBAAqB;gCAC9B,KAAK,EAAE,SAAS;gCAChB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,OAAO;6BACpB;4BACD;gCACI,OAAO,EAAE,wBAAwB;gCACjC,KAAK,EAAE,SAAS;gCAChB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,KAAK;6BAClB;4BACD;gCACI,OAAO,EAAE,8BAA8B;gCACvC,KAAK,EAAE,SAAS;gCAChB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,MAAM;6BACnB;yBACJ,CAAC;wBACd,OAAO,KAAK,CAAC;oBACjB,CAAC;oBAED,aAAa;wBACT,IAAI,KAAK,GAAG,CAAC;gCACO,OAAO,EAAE,sBAAsB;gCAC/B,KAAK,EAAE,WAAW;gCAClB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,QAAQ;6BACrB;4BACD;gCACI,OAAO,EAAE,gBAAgB;gCACzB,KAAK,EAAE,MAAM;gCACb,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,QAAQ;6BACrB;4BACD;gCACI,OAAO,EAAE,mBAAmB;gCAC5B,KAAK,EAAE,SAAS;gCAChB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,QAAQ;6BACrB;4BACD;gCACI,OAAO,EAAE,uBAAuB;gCAChC,KAAK,EAAE,SAAS;gCAChB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,MAAM;6BACnB;4BACD;gCACI,OAAO,EAAE,qBAAqB;gCAC9B,KAAK,EAAE,aAAa;gCACpB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,MAAM;6BACnB;yBACJ,CAAC;wBACd,OAAO,KAAK,CAAC;oBAEjB,CAAC;oBAED,oBAAoB;wBACQ,IAAI,KAAK,GAAG,CAAC;gCACjB,OAAO,EAAE,mCAAmC;gCAC5C,KAAK,EAAE,WAAW;gCAClB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,QAAQ;6BACrB;4BACD;gCACI,OAAO,EAAE,6BAA6B;gCACtC,KAAK,EAAE,MAAM;gCACb,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,QAAQ;6BACrB;4BACD;gCACI,OAAO,EAAE,gCAAgC;gCACzC,KAAK,EAAE,SAAS;gCAChB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,QAAQ;6BACrB;4BACD;gCACI,OAAO,EAAE,oCAAoC;gCAC7C,KAAK,EAAE,cAAc;gCACrB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,MAAM;6BACnB;4BACD;gCACI,OAAO,EAAE,kCAAkC;gCAC3C,KAAK,EAAE,aAAa;gCACpB,WAAW,EAAE,gBAAgB;gCAC7B,QAAQ,EAAE,MAAM;6BACnB;yBACJ,CAAC;wBACd,OAAO,KAAK,CAAC;oBAEjB,CAAC;oBAED,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;4BAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;wBACvE,OAAO,IAAI,CAAC,SAAS,CAAC;oBAC1B,CAAC;iBACJ;gBAlHY,sBAAW,cAkHvB,CAAA;YACL,CAAC,EApHgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAoH1B;QACL,CAAC,EAtHgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAsHvB;IACL,CAAC,EAxHgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAwHtB;AACL,CAAC,EA1HS,OAAO,KAAP,OAAO,QA0HhB"}
|
||||
@@ -0,0 +1,52 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class Wizard {
|
||||
wizardApp() {
|
||||
let instance = this;
|
||||
let html = ` <!--Wizard div start popup -->
|
||||
<a href="javascript:;" class="btn btn-sm btn-primary hidden" data-toggle="modal" data-target="#wizard-multi-step"></a>
|
||||
<div id="wizard-multi-step" class="multi-step" data-wizard="Multi-step-form">
|
||||
</div><!--Wizard div end popup -->`;
|
||||
var _fileCacheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();
|
||||
let result = Unibase.Themes.Compact.Components.Index.Instance().currentTheme;
|
||||
let css = `<style id="wizard"> .multi-step .modal-header .modal-steps .step.completed .dot:before { background: ${result.primaryColor} !important; }.multi-step .modal-header .modal-steps .step.current .dot {border-color: ${result.primaryColor} !important;} .multi-step .modal-header .modal-steps .step.completed:after { border-color: ${result.primaryColor} !important; }.multi-step .modal-header .modal-steps .step.current:after { border-color: ${result.primaryColor} !important; }.multi-step .modal-header .modal-steps .step.completed .dot { border-color: ${result.primaryColor} !important; }
|
||||
</style>`;
|
||||
$('head').append(css);
|
||||
$('#bizgaze_body').after(html);
|
||||
_fileCacheHelper.loadJsFile("libs/wizard/js/MultiStep.js", function () {
|
||||
_fileCacheHelper.loadCssFiles(["libs/wizard/css/MultiStep.min.css", "libs/wizard/css/MultiStep-theme.min.css"], null);
|
||||
eval(`$(document).ready(function () {
|
||||
$('.modal').MultiStep({
|
||||
data:[{
|
||||
label:'Company Details',
|
||||
content:'<ul class="d-flex flex-column font-weight-600"><li class="d-flex flex-column li_CompanyName pt-1 pb-20" id="li_CompanyName"><label for="txt_companyName" class="" id="lbl">Company Name<span class="text-danger"> *</span></label> <input type="text" id="txt_companyName" class="form-control floating-label-control shadow-none" placeholder="Company Name *" data-placeholder="Enter Company Name" data-validatename="Company Name" data-label="Company Name *"></li><li class="d-flex flex-column li_ShortCode pt-1 pb-20" id="li_ShortCode"><label for="txt_cmpyShortCode" class="" id="lbl">Company Short Code<span class="text-danger"> *</span></label> <input type="text" id="txt_cmpyShortCode" class="form-control floating-label-control shadow-none" placeholder="Company Short Code *" data-placeholder="Enter Company Short Code" data-validatename="Company Short Code" data-label="Company Short Code *"></li><li class="d-flex flex-column li_gst-number pt-1 pb-20" id="li_gst-number"><label for="txt_gstNumber" class="" id="lbl">GST Number<span class="text-danger"> *</span></label> <input type="text" id="txt_gstNumber" class="form-control floating-label-control shadow-none" placeholder="GST Number *" data-placeholder="Enter GST Number" data-validatename="GST Number" data-label="GST Number *"></li><li><ul class="p-2 d-flex flex-column"><li><p class="font-16 text-center text-dark">Upload Company Logo</p></li><li class="d-flex flex-column mx-auto"><div class="file position-relative d-flex justify-content-center mt-2" id="div_logo-File"><label for="txt_logoFile" id="lbl_logo" class="d-flex "><span class="w-50p"><img src="tenants/themes/compact/imgs/cloud.svg" class="img-fluid"></span></label><input type="file" class="d-none" id="txt_logoFile"></div><div style="margin-top:-15px;"><span class="text-dark" id="lblLogoFileName"></span><span class="text-dark hidden" for="txt_logoFile" id="lbl-logo-path"></span><input type="hidden" id="hf_logoPath" value=""></div></li></ul></li></ul>'
|
||||
},{
|
||||
label:'Address Details',
|
||||
content:'<ul class="d-flex flex-column"><li class="d-flex flex-column li_BranchName pt-1 pb-20" id="li_BranchName"><label for="txt_BranchName" class="font-weight-600" id="lbl">Branch Name<span class="text-danger"> *</span></label> <input type="text" id="txt_BranchName" class="form-control floating-label-control shadow-none" placeholder="Branch Name *" data-placeholder="Enter Branch Name" data-validatename="Branch Name" data-label="Branch Name *"></li><li class="d-flex flex-column li_ShortCode pt-1 pb-20" id="li_ShortCode"><label for="txt_ShortCode" class="font-weight-600" id="lbl">Short Code<span class="text-danger"> *</span></label> <input type="text" id="txt_ShortCode" class="form-control floating-label-control shadow-none" placeholder="Short Code *" data-placeholder="Enter Short Code" data-validatename="Short Code" data-label="Short Code *"></li><li class="d-flex flex-column li_Address pt-1 pb-20" id="li_Address"><label for="txt_Address" class="font-weight-600" id="lbl">Address<span class="text-danger"> *</span></label> <input type="text" id="txt_Address" class="form-control floating-label-control shadow-none" placeholder="Address *" data-placeholder="Enter Address" data-validatename="Address" data-label="Address *"></li><li><ul class="d-flex justify-content-between"><li class="d-flex flex-column li_CityName pt-1 pb-20 mr-20" id="li_CityName"><label for="txt_CityName" class="font-weight-600" id="lbl">City Name<span class="text-danger"> *</span></label> <input type="text" id="txt_CityName" class="form-control floating-label-control shadow-none" placeholder="City Name *" data-placeholder="Enter City Name" data-validatename="City Name" data-label="City Name *"></li><li class="d-flex flex-column li_PinCode pt-1 pb-20" id="li_PinCode"><label for="txt_PinCode" class="font-weight-600" id="lbl">Pin-Code<span class="text-danger"> *</span></label> <input type="text" id="txt_PinCode" class="form-control floating-label-control shadow-none" placeholder="Pin Code *" data-placeholder="Enter Pin Code" data-validatename="Pin Code" data-label="Pin Code *"></li></ul></li></ul>'
|
||||
}],
|
||||
finalLabel:'Confirmation',
|
||||
final:'<ul class="w-100 d-flex align-items-center flex-column justify-content-center"><li class="w-100 d-flex justify-content-center"><i class="fa-4x fa fa-check-circle text-success"></i></li><li class="mt-20 mb-1 text-center">Your Company information is successfully updated for more help<a class="ml-1" href="javascript:;">Click here</a></li></ul>',
|
||||
modalSize:'md'
|
||||
});
|
||||
$('[data-target="#wizard-multi-step"]').click();
|
||||
});`);
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
if (this._instance === undefined)
|
||||
this._instance = new Unibase.Themes.Compact.Components.Wizard;
|
||||
return this._instance;
|
||||
}
|
||||
}
|
||||
Components.Wizard = Wizard;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
//# sourceMappingURL=wizard.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"wizard.js","sourceRoot":"","sources":["wizard.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CA+ChB;AA/CD,WAAU,OAAO;IACb,IAAiB,MAAM,CA6CtB;IA7CD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CA2CvB;QA3CD,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAyC1B;YAzCD,WAAiB,UAAU;gBACvB,MAAa,MAAM;oBACf,SAAS;wBACL,IAAI,QAAQ,GAAG,IAAI,CAAC;wBACpB,IAAI,IAAI,GAAG;;;uCAGI,CAAC;wBAChB,IAAI,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;wBAC3E,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,YAAY,CAAC;wBAC7E,IAAI,GAAG,GAAG,wGAAwG,MAAM,CAAC,YAAY,0FAA0F,MAAM,CAAC,YAAY,8FAA8F,MAAM,CAAC,YAAY,4FAA4F,MAAM,CAAC,YAAY,6FAA6F,MAAM,CAAC,YAAY;4CAC9iB,CAAC;wBACrB,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;wBACtB,CAAC,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;wBAC/B,gBAAgB,CAAC,UAAU,CAAC,6BAA6B,EAAE;4BACvD,gBAAgB,CAAC,YAAY,CAAC,CAAC,mCAAmC,EAAE,yCAAyC,CAAC,EAAE,IAAI,CAAC,CAAC;4BACrH,IAAI,CAAC;;;;;;;;;;;;;;oCAcE,CAAC,CAAC;wBACd,CAAC,CAAC,CAAC;oBAEP,CAAC;oBAED,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;4BAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;wBAClE,OAAO,IAAI,CAAC,SAAS,CAAC;oBAC1B,CAAC;iBACJ;gBAvCY,iBAAM,SAuClB,CAAA;YACL,CAAC,EAzCgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAyC1B;QACL,CAAC,EA3CgB,OAAO,GAAP,cAAO,KAAP,cAAO,QA2CvB;IACL,CAAC,EA7CgB,MAAM,GAAN,cAAM,KAAN,cAAM,QA6CtB;AACL,CAAC,EA/CS,OAAO,KAAP,OAAO,QA+ChB"}
|
||||
@@ -0,0 +1,65 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Wizard;
|
||||
(function (Wizard) {
|
||||
let Manager;
|
||||
(function (Manager) {
|
||||
class WizardManager extends Unibase.Platform.Core.BaseManager {
|
||||
getCityName() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/bizgaze/cities/crm/cityautocomplete';
|
||||
return yield this.dataHelper().getAsync(url).then(function (response) {
|
||||
if (response.result != null) {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
saveCompanyDetails(obj) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = 'apis/v4/bizgaze/crm/Companies/updatecompanydetails';
|
||||
return yield this.dataHelper().postAsync(url, obj).then(function (response) {
|
||||
if (response.result !== null) {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
saveBranchDetails(obj) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const url = '/apis/v4/bizgaze/crm/Branches/updateBranchdetails';
|
||||
return yield this.dataHelper().postAsync(url, obj).then(function (response) {
|
||||
if (response.result !== null) {
|
||||
response.result = JSON.parse(response.result);
|
||||
}
|
||||
return response;
|
||||
});
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
if (this._instance === undefined)
|
||||
this._instance = new WizardManager();
|
||||
return this._instance;
|
||||
}
|
||||
}
|
||||
Manager.WizardManager = WizardManager;
|
||||
})(Manager = Wizard.Manager || (Wizard.Manager = {}));
|
||||
})(Wizard = Compact.Wizard || (Compact.Wizard = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"wizardmanager.js","sourceRoot":"","sources":["wizardmanager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAU,OAAO,CA6ChB;AA7CD,WAAU,OAAO;IACb,IAAiB,MAAM,CA2CtB;IA3CD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAyCvB;QAzCD,WAAiB,OAAO;YACpB,IAAiB,MAAM,CAsCtB;YAtCD,WAAiB,MAAM;gBACnB,IAAiB,OAAO,CAoCvB;gBApCD,WAAiB,OAAO;oBACpB,MAAa,aAAc,SAAQ,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW;wBAClD,WAAW;;gCACb,MAAM,GAAG,GAAG,6CAA6C,CAAC;gCAC1D,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;oCAChE,IAAI,QAAQ,CAAC,MAAM,IAAI,IAAI,EAAE;wCACzB,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;qCACjD;oCACD,OAAO,QAAQ,CAAC;gCACpB,CAAC,CAAC,CAAC;4BACP,CAAC;yBAAA;wBACK,kBAAkB,CAAC,GAAyD;;gCAC9E,MAAM,GAAG,GAAG,oDAAoD,CAAC;gCACjE,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;oCACtE,IAAI,QAAQ,CAAC,MAAM,KAAK,IAAI,EAAE;wCAC1B,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;qCACjD;oCACD,OAAO,QAAQ,CAAC;gCACpB,CAAC,CAAC,CAAC;4BACP,CAAC;yBAAA;wBACK,iBAAiB,CAAC,GAAwD;;gCAC5E,MAAM,GAAG,GAAG,mDAAmD,CAAC;gCAChE,OAAO,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;oCACtE,IAAI,QAAQ,CAAC,MAAM,KAAK,IAAI,EAAE;wCAC1B,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;qCACjD;oCACD,OAAO,QAAQ,CAAC;gCACpB,CAAC,CAAC,CAAC;4BACP,CAAC;yBAAA;wBAED,MAAM,CAAC,QAAQ;4BACX,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;gCAC5B,IAAI,CAAC,SAAS,GAAG,IAAI,aAAa,EAAE,CAAC;4BACzC,OAAO,IAAI,CAAC,SAAS,CAAC;wBAC1B,CAAC;qBACJ;oBAlCY,qBAAa,gBAkCzB,CAAA;gBACL,CAAC,EApCgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAoCvB;YACL,CAAC,EAtCgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAsCtB;QAEL,CAAC,EAzCgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAyCvB;IACL,CAAC,EA3CgB,MAAM,GAAN,cAAM,KAAN,cAAM,QA2CtB;AACL,CAAC,EA7CS,OAAO,KAAP,OAAO,QA6ChB"}
|
||||
@@ -0,0 +1,21 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Wizard;
|
||||
(function (Wizard) {
|
||||
let Request;
|
||||
(function (Request) {
|
||||
class CompanyDetails {
|
||||
}
|
||||
Request.CompanyDetails = CompanyDetails;
|
||||
class BranchDetails {
|
||||
}
|
||||
Request.BranchDetails = BranchDetails;
|
||||
})(Request = Wizard.Request || (Wizard.Request = {}));
|
||||
})(Wizard = Compact.Wizard || (Compact.Wizard = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"wizardrequest.js","sourceRoot":"","sources":["wizardrequest.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAuBhB;AAvBD,WAAU,OAAO;IACb,IAAiB,MAAM,CAqBtB;IArBD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAmBvB;QAnBD,WAAiB,OAAO;YACpB,IAAiB,MAAM,CAiBtB;YAjBD,WAAiB,MAAM;gBACnB,IAAiB,OAAO,CAevB;gBAfD,WAAiB,OAAO;oBACpB,MAAa,cAAc;qBAI1B;oBAJY,sBAAc,iBAI1B,CAAA;oBACD,MAAa,aAAa;qBAQzB;oBARY,qBAAa,gBAQzB,CAAA;gBACL,CAAC,EAfgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAevB;YACL,CAAC,EAjBgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAiBtB;QACL,CAAC,EAnBgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAmBvB;IACL,CAAC,EArBgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAqBtB;AACL,CAAC,EAvBS,OAAO,KAAP,OAAO,QAuBhB"}
|
||||
@@ -0,0 +1,275 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
let Wizard;
|
||||
(function (Wizard_1) {
|
||||
class Wizard {
|
||||
constructor() {
|
||||
this.logoFileData = {};
|
||||
}
|
||||
wizardApp() {
|
||||
let instance = this;
|
||||
let html = ` <!--Wizard div start popup -->
|
||||
<a href="javascript:;" class="btn btn-sm btn-primary hidden" data-toggle="modal" data-target="#wizard-multi-step"></a>
|
||||
<div id="wizard-multi-step" class="multi-step" data-wizard="Multi-step-form">
|
||||
</div><!--Wizard div end popup -->`;
|
||||
var _fileCacheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();
|
||||
let result = Unibase.Themes.Compact.Components.Index.Instance().currentTheme;
|
||||
let css = `<style id="wizard"> .multi-step .modal-header .modal-steps .step.completed .dot:before { background: ${result.primaryColor} !important; }.multi-step .modal-header .modal-steps .step.current .dot {border-color: ${result.primaryColor} !important;} .multi-step .modal-header .modal-steps .step.completed:after { border-color: ${result.primaryColor} !important; }.multi-step .modal-header .modal-steps .step.current:after { border-color: ${result.primaryColor} !important; }.multi-step .modal-header .modal-steps .step.completed .dot { border-color: ${result.primaryColor} !important; }
|
||||
</style>`;
|
||||
$('head').append(css);
|
||||
$('#bizgaze_body + [data-target="#wizard-multi-step"]').remove();
|
||||
$('#bizgaze_body + [id="wizard-multi-step"]').remove();
|
||||
$('#bizgaze_body').after(html);
|
||||
_fileCacheHelper.loadJsFile("libs/wizard/js/MultiStep.js", function () {
|
||||
_fileCacheHelper.loadCssFiles(["libs/wizard/css/MultiStep.min.css", "libs/wizard/css/MultiStep-theme.min.css"], null);
|
||||
eval(`$(document).ready(function () {
|
||||
$('#wizard-multi-step').MultiStep({
|
||||
data:[{
|
||||
label:'Company Details',
|
||||
content:'<ul class="d-flex flex-column"><li class="d-flex flex-column li_CompanyName pt-1 pb-20" id="li_CompanyName"><label for="txt_companyName" class="" id="lbl">Company Name<span class="text-danger"> *</span></label> <input type="text" id="txt_companyName" class="form-control floating-label-control shadow-none" data-validation="true" placeholder="Company Name *" data-placeholder="Enter Company Name" data-validatename="Company Name" data-label="Company Name *" required></li><li class="d-flex flex-column li_ShortCode pt-1 pb-20" id="li_ShortCode"><label for="txt_cmpyShortCode" class="" id="lbl">Company Short Code<span class="text-danger"> *</span></label> <input type="text" id="txt_cmpyShortCode" class="form-control floating-label-control shadow-none" placeholder="Company Short Code *" data-validation="true" data-placeholder="Enter Company Short Code" data-validatename="Company Short Code" data-label="Company Short Code *" required></li><li class="d-flex flex-column li_gst-number pt-1 pb-20" id="li_gst-number"><label for="txt_gstNumber" class="" id="lbl">GST Number<span class="text-danger"> *</span></label> <input type="text" id="txt_gstNumber" class="form-control floating-label-control shadow-none" data-validation="true" placeholder="GST Number *" data-placeholder="Enter GST Number" data-validatename="GST Number" data-label="GST Number *" required maxlength="15"></li><li><ul class="p-2 d-flex flex-column"><li><p class="font-16 text-center text-dark">Upload Company Logo</p></li><li class="d-flex flex-column mx-auto" onchange="Unibase.Themes.Compact.Components.Wizard.Wizard.Instance().uploadlogo(this);"><div class="file position-relative d-flex justify-content-center mt-2" id="div_logo-File"><label for="txt_logoFile" id="lbl_logo" class="d-flex "><span class="w-50p"><img src="tenants/themes/compact/imgs/cloud.svg" class="img-fluid"></span></label><input type="file" class="d-none" id="txt_logoFile"></div><div style="margin-top:-15px;"><span class="text-dark" id="lblLogoFileName"></span><span class="text-dark hidden" for="txt_logoFile" id="lbl-logo-path"></span><input type="hidden" id="hf_logoPath" value=""></div></li></ul></li></ul>'
|
||||
},{
|
||||
label:'Address Details',
|
||||
content:'<ul class="d-flex flex-column"><li class="d-flex flex-column li_BranchName pt-1 pb-20" id="li_BranchName"><label for="txt_BranchName" class="" id="lbl">Branch Name<span class="text-danger"> *</span></label> <input type="text" id="txt_BranchName" class="form-control floating-label-control shadow-none" data-validation="true" placeholder="Branch Name *" data-placeholder="Enter Branch Name" data-validatename="Branch Name" data-label="Branch Name *"></li><li class="d-flex flex-column li_ShortCode pt-1 pb-20" id="li_ShortCode"><label for="txt_ShortCode" class="" id="lbl">Short Code<span class="text-danger"> *</span></label> <input type="text" id="txt_ShortCode" class="form-control floating-label-control shadow-none" data-validation="true" placeholder="Short Code *" data-placeholder="Enter Short Code" data-validatename="Short Code" data-label="Short Code *"></li><li class="d-flex flex-column li_Address pt-1 pb-20" id="li_Address"><label for="txt_Address" class="" id="lbl">Address<span class="text-danger"> *</span></label> <input type="text" id="txt_Address" class="form-control floating-label-control shadow-none" placeholder="Address *" data-validation="true"data-placeholder="Enter Address" data-validatename="Address" data-label="Address *"></li><li><ul class="d-flex justify-content-between"><li class="w-45 d-flex flex-column li_CityName pt-1 pb-20 mr-20" id="li_CityName"><label for="txt_CityName" class="" id="lbl">City Name<span class="text-danger"> *</span></label> <select type="text" id="txt_CityName" class="form-control floating-label-control shadow-none" data-validation="true" placeholder="City Name *" data-placeholder="Enter City Name" data-validatename="City Name" data-label="City Name *"></select></li><li class="w-45 d-flex flex-column li_PinCode pt-1 pb-20" id="li_PinCode"><label for="txt_PinCode" class="" id="lbl">Pin-Code<span class="text-danger"> *</span></label> <input type="number" id="txt_PinCode" class="form-control floating-label-control shadow-none" placeholder="Pin Code *" data-validation="true" data-placeholder="Enter Pin Code" data-validatename="Pin Code" min="0" max="6" data-label="Pin Code *"></li></ul></li></ul>'
|
||||
}],
|
||||
finalLabel:'Confirmation',
|
||||
final:'<ul class="w-100 d-flex align-items-center flex-column justify-content-center"><li class="w-100 d-flex justify-content-center"><i class="fa-4x fa fa-check-circle text-success"></i></li><li class="mt-20 mb-1 text-center">Your Company information is successfully updated for more help<a class="ml-1" href="javascript:;">Click here</a></li></ul>',
|
||||
modalSize:'md'
|
||||
});
|
||||
Unibase.Themes.Compact.Components.Wizard.Wizard.Instance().logoFileData = {};
|
||||
Unibase.Themes.Compact.Components.Wizard.Wizard.Instance().autoComplete();
|
||||
$('[data-target="#wizard-multi-step"]').click();
|
||||
$('[data-isNext="true"]').on('click', function(){
|
||||
Unibase.Themes.Compact.Components.Wizard.Wizard.Instance().validation();
|
||||
});
|
||||
Unibase.Themes.Compact.Components.Wizard.Wizard.Instance().clickEvent();
|
||||
$('#txt_gstNumber').on('keydown', function(){
|
||||
$(this).addClass('text-uppercase');
|
||||
let gst_val = $(this).val();
|
||||
if(gst_val.length < 2){
|
||||
return numericOnly(event);
|
||||
}
|
||||
else if((gst_val.length >= 2) && (gst_val.length < 7)){
|
||||
return alphaOnly(event);
|
||||
}
|
||||
else if((gst_val.length >= 7) && (gst_val.length < 11)){
|
||||
return numericOnly(event);
|
||||
}
|
||||
else if((gst_val.length >= 11) && (gst_val.length < 12)){
|
||||
return alphaOnly(event);
|
||||
}
|
||||
else if((gst_val.length >= 12) && (gst_val.length < 13)){
|
||||
return numericOnly(event);
|
||||
}
|
||||
else if((gst_val.length >= 13) && (gst_val.length < 14)){
|
||||
return alphaOnly(event);
|
||||
}
|
||||
else if((gst_val.length >= 14) && (gst_val.length < 15)){
|
||||
return alphaNumeric(event);
|
||||
}
|
||||
})
|
||||
|
||||
function alphaOnly(event) {
|
||||
var key = event.keyCode;
|
||||
if(((key >= 65 && key <= 90) || key == 8) == false){
|
||||
MessageHelper.Instance().showError("Please Enter valid GST Number", "div_errroMessage");
|
||||
}
|
||||
else if((key >= 65 && key <= 90) || key == 8){
|
||||
if ($('#Bizgaze-messageInfo')) {
|
||||
$('#Bizgaze-messageInfo').click()
|
||||
}
|
||||
}
|
||||
return ((key >= 65 && key <= 90) || key == 8);
|
||||
};
|
||||
function numericOnly(event) {
|
||||
var key = event.keyCode;
|
||||
if(((key >= 47 && key <= 58) || key == 8 || (key > 95 && key < 106)) == false){
|
||||
MessageHelper.Instance().showError("Please Enter valid GST Number", "div_errroMessage");
|
||||
}
|
||||
else if((key >= 47 && key <= 58) || key == 8 || (key > 95 && key < 106)){
|
||||
if ($('#Bizgaze-messageInfo')) {
|
||||
$('#Bizgaze-messageInfo').click()
|
||||
}
|
||||
}
|
||||
return ((key > 47 && key < 58) || key == 8 || (key > 95 && key < 106));
|
||||
};
|
||||
function alphaNumeric(event) {
|
||||
var key = event.keyCode;
|
||||
return ((key > 47 && key < 58) || key == 8 || (key >= 65 && key <= 90));
|
||||
};
|
||||
});
|
||||
|
||||
`);
|
||||
});
|
||||
}
|
||||
validation() {
|
||||
let instance = Unibase.Themes.Compact.Components.Wizard.Wizard.Instance().logoFileData;
|
||||
let validation = true;
|
||||
$('.step-content.active').find('[data-validation="true"]').each(function () {
|
||||
if ($(this).val() == '') {
|
||||
$(this).attr('style', 'border-bottom:1px solid rgb(251, 107, 91) !important');
|
||||
$(this).on('click', function () {
|
||||
$(this).attr('style', '');
|
||||
});
|
||||
validation = false;
|
||||
MessageHelper.Instance().showError("Please Enter manadatory", "div_errroMessage");
|
||||
}
|
||||
else if ($('.step-content.active').find('#div_logo-File').length > 0) {
|
||||
var regex = /^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$/;
|
||||
if (instance == undefined || instance.FileData == undefined || instance.FileName == undefined) {
|
||||
validation = false;
|
||||
MessageHelper.Instance().showError("Please Upload Company Logo", "div_errroMessage");
|
||||
}
|
||||
else if (regex.test($("#txt_gstNumber").val().toString()) == false) {
|
||||
validation = false;
|
||||
MessageHelper.Instance().showError("Please Enter valid GST Number", "div_errroMessage");
|
||||
}
|
||||
}
|
||||
});
|
||||
if (validation) {
|
||||
if ($('#Bizgaze-messageInfo')) {
|
||||
$('#Bizgaze-messageInfo').click();
|
||||
}
|
||||
let i = Number($('.step-content.active').attr('data-step'));
|
||||
let j = i + 1;
|
||||
if (i == 3) {
|
||||
$('a.close-btn').click();
|
||||
Unibase.Platform.Membership.Infos.Identity.currentUser.settings.filter(function (x) { return x.settingName == "isloginfirsttime"; })[0].settingValue == false;
|
||||
Unibase.Themes.Compact.Components.Dashboard.Instance().appTourGuide();
|
||||
}
|
||||
if (i != 3) {
|
||||
$('[id="multi_Step-next"]').click();
|
||||
}
|
||||
}
|
||||
}
|
||||
uploadlogo(e) {
|
||||
let instance = this;
|
||||
const inputEl = document.getElementById('txt_logoFile');
|
||||
const fileType = inputEl.files[0].type.split('/').pop().toLowerCase();
|
||||
if (fileType != "jpeg" && fileType != "jpg" && fileType != "png" && fileType != "bmp" && fileType != "gif") {
|
||||
MessageHelper.Instance().showError('Please select a valid image file', 'layoutBuilderErrMsg');
|
||||
$("#logoUploadInput").val('');
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
const [file] = inputEl.files;
|
||||
let name;
|
||||
if (file) {
|
||||
const reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
reader.onloadend = function () {
|
||||
var base64String = reader.result.toString().replace(/^data:.+;base64,/, '');
|
||||
var fileReq = {
|
||||
FileData: base64String,
|
||||
FileName: inputEl.files[0].name,
|
||||
FileType: fileType,
|
||||
ByteData: null
|
||||
};
|
||||
instance.logoFileData = fileReq;
|
||||
$('[data-span_file="true"]').remove();
|
||||
$(inputEl).parents('#div_logo-File').after('<span data-span_file="true">' + inputEl.files[0].name + '</span>');
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
clickEvent() {
|
||||
let instance = this;
|
||||
instance.multiStep();
|
||||
$('#multi_Step-prev').on('click', function () {
|
||||
instance.multiStep();
|
||||
});
|
||||
}
|
||||
autoComplete() {
|
||||
Unibase.Themes.Compact.Wizard.Manager.WizardManager.Instance().getCityName().then(function (res) {
|
||||
let response = res.result, data = [];
|
||||
response.forEach(function (item, index) {
|
||||
data.push({ id: item.cityid, text: item.cityname });
|
||||
});
|
||||
$('#txt_CityName').select2({
|
||||
placeholder: "Select City",
|
||||
data: data
|
||||
});
|
||||
});
|
||||
}
|
||||
multiStep() {
|
||||
$('.step-content').each(function (index, item) {
|
||||
if (index == 0 && $(this).hasClass("active")) {
|
||||
$('#multi_Step-next').attr('onclick', 'Unibase.Themes.Compact.Components.Wizard.Wizard.Instance().companyDetails()');
|
||||
}
|
||||
else if (index == 1 && $(this).hasClass("active")) {
|
||||
$('#multi_Step-next').attr('onclick', 'Unibase.Themes.Compact.Components.Wizard.Wizard.Instance().BranchDetails()');
|
||||
}
|
||||
else if (index == 2 && $(this).hasClass("active")) {
|
||||
$('#multi_Step-next').attr('onclick', 'Unibase.Themes.Compact.Components.Wizard.Wizard.Instance().emptyMultiStep()');
|
||||
}
|
||||
});
|
||||
}
|
||||
emptyMultiStep() {
|
||||
$('a.close-btn').click();
|
||||
$('[id="wizard-multi-step"]').remove();
|
||||
$('[data-target="#wizard-multi-step"]').remove();
|
||||
}
|
||||
companyDetails() {
|
||||
let instance = this;
|
||||
if ($('#txt_companyName').val() != "" && $('#txt_cmpyShortCode').val() != "" && $('#txt_gstNumber').val() != 0) {
|
||||
let obj;
|
||||
obj = {
|
||||
CompanyName: $('#txt_companyName').val(),
|
||||
ShortCode: $('#txt_cmpyShortCode').val(),
|
||||
GstInNo: $('#txt_gstNumber').val(),
|
||||
FileName: instance.logoFileData.FileName,
|
||||
FileData: instance.logoFileData.FileData
|
||||
};
|
||||
Unibase.Themes.Compact.Wizard.Manager.WizardManager.Instance().saveCompanyDetails(obj).then(function (response) {
|
||||
if (response.status == 0) {
|
||||
instance.multiStep();
|
||||
}
|
||||
else {
|
||||
MessageHelper.Instance().showError(response.code, "div_errroMessage");
|
||||
$("p:nth-child(0)").addClass('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
}
|
||||
}
|
||||
BranchDetails() {
|
||||
let instance = this;
|
||||
console.log("Branch Details");
|
||||
let obj;
|
||||
obj = {
|
||||
AliasName: $('#txt_BranchName').val(),
|
||||
ShortCode: $('#txt_ShortCode').val(),
|
||||
PinCode: Number($('#txt_PinCode').val()),
|
||||
AddressName: $('#txt_Address').val(),
|
||||
CityName: $('#txt_CityName option:selected').text(),
|
||||
Addressline1: " ",
|
||||
CityId: Number($('#txt_CityName option:selected').val())
|
||||
};
|
||||
Unibase.Themes.Compact.Wizard.Manager.WizardManager.Instance().saveBranchDetails(obj).then(function (response) {
|
||||
if (response.status == 0) {
|
||||
instance.multiStep();
|
||||
}
|
||||
else {
|
||||
$('.step-content').removeClass('active');
|
||||
$("p:nth-child(1)").addClass('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
if (this._instance === undefined)
|
||||
this._instance = new Unibase.Themes.Compact.Components.Wizard.Wizard;
|
||||
return this._instance;
|
||||
}
|
||||
}
|
||||
Wizard_1.Wizard = Wizard;
|
||||
})(Wizard = Components.Wizard || (Components.Wizard = {}));
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+60
File diff suppressed because one or more lines are too long
@@ -0,0 +1,238 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class ForgotPassword extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
var jsfiles = ["tenants/themes/compact/index.anonymous.js", "platform/membership/managers/accountmanager.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
return jsfiles;
|
||||
}
|
||||
cssFiles() {
|
||||
return ["libs/passwordrequirement/passwordrequirement.css"];
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
$(".pr-password").click(function () {
|
||||
var signUpPswd = $(".pr-password");
|
||||
signUpPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#div_modalbody").removeAttr("style");
|
||||
$('#passwordHide').click(function () {
|
||||
var input = $('#txt_NewPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#passwordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$('#confirmPasswordHide').click(function () {
|
||||
var input = $('#txt_ConfirmPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#confirmPasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
var instance = this;
|
||||
$("#txt_PhoneorMail").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_SendCode").click();
|
||||
});
|
||||
$("#txt_Code").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_VerifyCode").click();
|
||||
});
|
||||
$("#txt_NewPassword,#txt_ConfirmPassword").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_ResetPswd").click();
|
||||
});
|
||||
$("#btn_SendCode").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
$("#btn_VerifyCode").click(function () {
|
||||
instance.verifyOtp();
|
||||
});
|
||||
$("#btn_ResendCode").click(function () {
|
||||
instance.sendOtp(instance.OtpId);
|
||||
});
|
||||
$("#btn_ResetPswd").click(function () {
|
||||
instance.resetPassword();
|
||||
});
|
||||
if (callback != null)
|
||||
callback();
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
const html = `<div id="div_ForgotPassword"><form id="frm_ForgotPassword" data-validate="parsley" data-isdynamic="false" autocomplete="off"><div id="div_ValidationSummary"></div><div id="div_ForgotPswd" class=""><h1 class="display-5 mb-10 text-center">Need help with your Password?</h1><p class="mb-30 text-center">We will send new code to your recovery Email or Phone to reset your password.</p><div class="form-group"><input class="form-control" required autocomplete="off" placeholder="Enter Registered Email or Mobile" id="txt_PhoneorMail" type="text"></div><button class="btn btn-primary btn-block mb-20" id="btn_SendCode" type="button">Send</button><p class="text-right"><a href="index.html#/login">Back to login</a></p></div><div id="div_ResetPswd" class="d-none"><h1 class="display-5 mb-30 text-center">Please reset your password</h1><div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off"><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span><div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="off"><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><button class="btn btn-primary btn-block mb-20" id="btn_ResetPswd" type="button">Reset Password</button><p class="text-right"><a href="/Index.html">Back to login</a></p></div><div id="div_SuccessMsg" class="d-none"><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div><h1 class="display-4 mb-20 text-center">Password Updated Successfully</h1><p class="text-center"><a href="index.html#/login">Click here to Login</a></p></div></form><div id="modal_Otp" class="modal fade hide"><div class="modal-dialog"><div class="modal-content"><div class="modal-header mt-2 mb-2"><h5 class="modal-title pull-left">Mobile or Email Verification</h5><button type="button" class="close pull-right" data-dismiss="modal" aria-hidden="true" >×</button></div><div class="modal-body" id="div_modalbody"><div class="mb-10"><p class="lbl_Otp">We have sent OTP on your Mobile Number and Email!</p></div><div class="floating-label-form-group mb-2"><input class="form-control" id ="txt_Code" placeholder="Enter Mobile OTP/Email OTP" type="text"></div></div><div class="modal-footer mb-2" style="display:block"><button type = "button" class="btn btn-primary pull-left" id="btn_ResendCode">Resend</button><button type = "button" class="btn btn-primary pull-right" id="btn_VerifyCode">Verify</button></div></div></div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
validate() {
|
||||
var instance = this;
|
||||
if ($("#txt_PhoneorMail").val() == "") {
|
||||
MessageHelper.Instance().showError("Email or Phone cannot be Empty!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
else if ($("#txt_PhoneorMail").val() != "") {
|
||||
$(".preloader-it").fadeIn();
|
||||
var phoneOrMail = $("#txt_PhoneorMail").val();
|
||||
instance._accountManager.getUser(phoneOrMail, phoneOrMail).then(function (response) {
|
||||
if (response.result != null) {
|
||||
instance.UserName = response.result.userName;
|
||||
$(".lbl_Otp").removeClass('text-danger text-success').text("We have sent OTP on your Mobile Number and Email !");
|
||||
$("#txt_Code").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
instance.sendOtp(0);
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Enter valid Email/Phone!", "div_ValidationSummary");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
}
|
||||
sendOtp(IsResend) {
|
||||
var instance = this;
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: $("#txt_PhoneorMail").val(),
|
||||
IsSignup: false,
|
||||
IsRegisterUser: false,
|
||||
IsForgotPswd: true,
|
||||
UnibaseId: instance.UserName,
|
||||
OtpId: IsResend,
|
||||
UserOtp: ""
|
||||
};
|
||||
instance._accountManager.sendOtp(postData).then(function (response) {
|
||||
if (IsResend != 0)
|
||||
$(".lbl_Otp").text("OTP has been Resent!").removeClass('text-danger', '').addClass('text-success', '');
|
||||
if (response == 0) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
}
|
||||
else if (response == 2) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("User Is InActive (or) Relieved!", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
instance.OtpId = response;
|
||||
$("#modal_Otp").modal("show");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
verifyOtp() {
|
||||
var instance = this;
|
||||
if ($("#txt_Code").val() == "")
|
||||
$(".lbl_Otp").text("Please Enter OTP!").addClass('text-danger', '');
|
||||
else {
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: "",
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: false,
|
||||
IsSignup: true,
|
||||
UnibaseId: "",
|
||||
OtpId: instance.OtpId,
|
||||
UserOtp: $("#txt_Code").val(),
|
||||
};
|
||||
instance._accountManager.verifyOtp(postData).then(function (response) {
|
||||
if (response.code.toString() == "2") {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass('text-danger', '');
|
||||
$("#txt_Code").val('');
|
||||
}
|
||||
else if (response.result != null) {
|
||||
if (response.result.contactConfirmed == false && response.result.emailConfirmed == false) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Invalid OTP!").addClass('text-danger', '');
|
||||
$("#txt_Code").val("");
|
||||
}
|
||||
else {
|
||||
$("#div_ForgotPswd").addClass('d-none');
|
||||
$("#modal_Otp").modal("hide");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#div_ResetPswd").removeClass('d-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
resetPassword() {
|
||||
var instance = this;
|
||||
$("#div_ValidationSummary").empty();
|
||||
var confirmPswd = $("#txt_ConfirmPassword").val();
|
||||
var pswd = $("#txt_NewPassword").val();
|
||||
if (pswd.length == 0 || confirmPswd.length == 0) {
|
||||
MessageHelper.Instance().showError("Password fields cannot be empty!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if ((pswd.length < 8 || confirmPswd.length < 8) || (pswd.length > 15 || confirmPswd.length > 15)) {
|
||||
MessageHelper.Instance().showError("Your password length is " + pswd.length + ", Password must be atleast minimum 8 characters and maximum 15 characters!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (pswd != confirmPswd) {
|
||||
MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
var password = $("#txt_NewPassword").val();
|
||||
var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
|
||||
var checkpassword = password.match(decimal) ? true : false;
|
||||
if (checkpassword == false) {
|
||||
$(".pr-password").focus();
|
||||
MessageHelper.Instance().showError("Please Match the Password in requested Format", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
$(".preloader-it").fadeIn();
|
||||
var postData = {
|
||||
Password: $("#txt_NewPassword").val(),
|
||||
UserName: instance.UserName,
|
||||
};
|
||||
instance._accountManager.updatePassword(postData).then(function (response) {
|
||||
if (response.errors == null) {
|
||||
$("#div_ResetPswd").addClass('d-none');
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#div_SuccessMsg").removeClass('d-none');
|
||||
MessageHelper.Instance().showSuccess("Password Updated Successfully", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError(response.errors[0], "div_ValidationSummary");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", "div_ValidationSummary");
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
return new ForgotPassword();
|
||||
}
|
||||
}
|
||||
Components.ForgotPassword = ForgotPassword;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
+1
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+331
@@ -0,0 +1,331 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class HomeAffairsForgotPassword extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
var jsfiles = ["tenants/themes/compact/index.mobil_anonymous.js", "platform/membership/managers/accountmanager.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
return jsfiles;
|
||||
}
|
||||
cssFiles() {
|
||||
return ["tenants/themes/compact/css/style.ext.css", 'libs/passwordrequirement/passwordrequirement.css'];
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
$(".biz-pg-wrapper").addClass("mt-0");
|
||||
$(".pr-password").focus(function () {
|
||||
var resetPswd = $(".pr-password");
|
||||
resetPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
$("#txt_NewPassword").click(function () {
|
||||
$(this).removeAttr("readonly");
|
||||
});
|
||||
$("#txt_NewPassword").keyup(function (e) {
|
||||
if (e.keyCode == 8) {
|
||||
let check = $(this).val();
|
||||
if (check == "" || check == null || check == 0) {
|
||||
$("#txt_NewPassword").attr("readonly");
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#txt_ConfirmPassword").click(function () {
|
||||
$(this).removeAttr("readonly");
|
||||
});
|
||||
$("#txt_ConfirmPassword").keyup(function (e) {
|
||||
if (e.keyCode == 8) {
|
||||
let check = $(this).val();
|
||||
if (check == "" || check == null || check == 0) {
|
||||
$("#txt_NewPassword").attr("readonly");
|
||||
}
|
||||
}
|
||||
});
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#div_modalbody").removeAttr("style");
|
||||
$('#passwordHide').click(function () {
|
||||
var input = $('#txt_NewPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#passwordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$('#confirmPasswordHide').click(function () {
|
||||
var input = $('#txt_ConfirmPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#confirmPasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
var instance = this;
|
||||
$("#txt_PhoneorMail").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_SendCode").click();
|
||||
});
|
||||
$(".txt_Code:last").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
$("#btn_VerifyCode").click();
|
||||
});
|
||||
$("#txt_NewPassword,#txt_ConfirmPassword").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_ResetPswd").click();
|
||||
});
|
||||
$("#btn_SendCode").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
$("#btn_VerifyCode").click(function () {
|
||||
instance.verifyOtp();
|
||||
});
|
||||
$("#btn_ResendCode").click(function () {
|
||||
instance.sendOtp(instance.OtpId);
|
||||
});
|
||||
$("#btn_ResetPswd").click(function () {
|
||||
instance.resetPassword();
|
||||
});
|
||||
$('.floating-label-form-group .txt_Code').on('input', function (e) {
|
||||
const inputEl = this;
|
||||
inputEl.value = inputEl.value.replace(/[^0-9]/g, '');
|
||||
});
|
||||
$(".txt_Code").click(function () {
|
||||
$(".lbl_Otp").empty();
|
||||
});
|
||||
if (callback != null)
|
||||
callback();
|
||||
}
|
||||
otpInputTabChange(val) {
|
||||
const ele = $('.txt_Code');
|
||||
if (ele[val - 1].value != '') {
|
||||
if (ele[val])
|
||||
ele[val].focus();
|
||||
}
|
||||
else if (ele[val - 1].value == '') {
|
||||
if (ele[val - 2])
|
||||
ele[val - 2].focus();
|
||||
}
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Mobil_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
let assesturl = _appsettings.asset_url();
|
||||
let html = '';
|
||||
if (($(window).width()) > 1200) {
|
||||
html += `<div class="row h-100" style="background:url('` + assesturl + `tenants/themes/compact/imgs/homeaffairs/homeaffariesdesktopbg.jpg');background-size:cover;"> <div class="col-xl-5"> <div class="banner-img-container h-100 d-flex align-items-center justify-content-center pl-145"><img src="` + assesturl + `tenants/themes/compact/imgs/homeaffairs/aa.png" alt="img" class="img-fluid"> </div></div> <div class="col-xl-7 desktop-view"><div id="div_ForgotPassword" class="mt-150"><form id="frm_ForgotPassword" class="align-items-center d-flex justify-content-center " data-validate="parsley" data-isdynamic="false" style="" autocomplete="off"><div id="div_ValidationSummary"></div> <div id="div_ForgotPswd" class=""> <h1 class="display-5 mb-10 text-center text-white">Forgot your Password?</h1><p class="mb-30 text-center text-white">Enter your Phone Number to receive OTP.</p> <div class="form-group"><input class="form-control" required autocomplete="off" placeholder="Enter your Phone Number/Email Address" id="txt_PhoneorMail" type="text"></div><button class="btn text-white btn-block mb-20" id="btn_SendCode" type="button" style="background:#001F5D;">Send OTP</button><p class="text-right"><a href="index.html#/login" class="text-white">Back to login</a></p></div> <div id="div_ResetPswd" class="d-none"><h1 class="display-5 mb-30 text-center">Please reset your password</h1><div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off" readonly><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
|
||||
<div class="showpwsdreq"></div> </div> <div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="new-password" readonly><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><button class="btn btn-block mb-20 text-white" id="btn_ResetPswd" type="button" style="background:#001F5D;">Reset Password</button>
|
||||
<p class="text-right"><a href="/Index.html">Back to login</a></p></div> <div id="div_SuccessMsg" class="d-none"><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div><h1 class="display-4 mb-20 text-center">Password Updated Successfully</h1><p class="text-center"><a href="index.html#/login">Click here to Login</a></p></div> </form></div></div> </div>`;
|
||||
}
|
||||
else {
|
||||
html += `<div id="div_ForgotPassword"> <form id="frm_ForgotPassword" data-validate="parsley" data-isdynamic="false" style="background: url(` + assesturl + `tenants/themes/compact/imgs/homeaffairs/homeaffariesmobilebg.jpg)!important;" autocomplete="off"> <div id="div_ValidationSummary" class="position-fixed w-100"></div> <div id="div_ForgotPswd" class="" style="color:#686b70"> <div class="d-flex flex-column justify-content-around p-3 " style="height:100vh"><div class="logo_img mx-auto"> <img src="tenants/themes/compact/imgs/homeaffairs/aa.png" class="img-fluid w-100"></div><div class="forgot_pass_header">
|
||||
<div class=""><h1 class="display-5 mb-10 text-center font-weight-bold">ForgotPassword?</h1><p class="mb-30 text-center font-11">Enter your Phone Number to receive OTP.</p></div> <div class="form-group "><input class="form-control" required autocomplete="off" placeholder="Phone Number/Email Address" id="txt_PhoneorMail" type="text"></div> <p class="text-right"><a href="index.html#/login" class="" style="color:#686b70">Back to login</a></p> </div>
|
||||
<div class="forgot_pass_register"><button class="btn btn-block mb-20 rounded-10 text-white" id="btn_SendCode" type="button" style="background:#001F5D; padding: 10px !important;">Send OTP</button></div> </div></div> <div id="div_ResetPswd" class="d-none"><div class="d-flex flex-column justify-content-around p-3 " style="height:100vh"> <div class="pass_fields mt-70"><h1 class=" text-white display-5 mb-30 text-center text-white font-weight-bold">Please reset your password</h1>
|
||||
<div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off" readonly><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
|
||||
<div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="new-password" readonly><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div> <p class="text-right"><a href="/Index.html" class="text-white">Back to login</a></p> </div>
|
||||
<div class="pass_footer"><button class="btn btn-primary btn-block mb-20 rounded-10" id="btn_ResetPswd" type="button" style="background:#001F5D; padding: 10px !important;">Reset Password</button></div>
|
||||
<div id="div_SuccessMsg" class="d-none">
|
||||
<div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div>
|
||||
<h1 class="display-4 mb-20 text-center text-white">Password Updated Successfully</h1>
|
||||
<p class="text-center"><a href="index.html#/login" class="text-white">Click here to Login</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>`;
|
||||
}
|
||||
html += `<div id="modal_Otp" class="modal fade hide">
|
||||
<div class="modal-dialog modal-dialog-centered ">
|
||||
<div class="modal-content ">
|
||||
<div class="modal-header border-0 d-block"><button type="button" class="btn btn-link pull-right font-16 text-secondary p-0" data-dismiss="modal" aria-hidden="true">×</button></div>
|
||||
<div class="modal-body text-center" id="div_modalbody">
|
||||
<img src="tenants/themes/compact/imgs/otp-verify-img.png" class="img-fluid h-100p mx-auto my-10">
|
||||
<h4 class="modal-title font-weight-600">Mobile or Email Verification</h4>
|
||||
|
||||
<div class="lbl_Otp"></div>
|
||||
<div class="otpdiv my-10">
|
||||
<div class="floating-label-form-group mb-2 p-0">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(1)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(2)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(3)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(4)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(5)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(6)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input type="hidden" class="form-control optmsg" id="otpMsg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer py-10" style="display:block"><button type="button" class="btn btn-outline-primary pull-left" id="btn_ResendCode">Resend</button><button type="button" class="btn btn-outline-primary pull-right" id="btn_VerifyCode">Verify</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
return html;
|
||||
}
|
||||
validate() {
|
||||
var instance = this;
|
||||
if ($("#txt_PhoneorMail").val() == "") {
|
||||
MessageHelper.Instance().showError("Email or Phone cannot be Empty!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
else if ($("#txt_PhoneorMail").val() != "") {
|
||||
$(".preloader-it").fadeIn();
|
||||
var phoneOrMail = $("#txt_PhoneorMail").val();
|
||||
instance._accountManager.getUser(phoneOrMail, phoneOrMail).then(function (response) {
|
||||
if (response.result != null) {
|
||||
instance.UserName = response.result.userName;
|
||||
$(".lbl_Otp").removeClass('text-danger text-success').text("We have sent OTP on your Mobile Number and Email !").addClass("h6 position-relative py-3");
|
||||
$("#txt_Code").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
instance.sendOtp(0);
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Enter valid Email/Phone!", "div_ValidationSummary");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
}
|
||||
sendOtp(IsResend) {
|
||||
var instance = this;
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: $("#txt_PhoneorMail").val(),
|
||||
IsSignup: false,
|
||||
IsRegisterUser: false,
|
||||
IsForgotPswd: true,
|
||||
UnibaseId: instance.UserName,
|
||||
OtpId: IsResend,
|
||||
UserOtp: ""
|
||||
};
|
||||
instance._accountManager.sendOtp(postData).then(function (response) {
|
||||
if (IsResend != 0)
|
||||
$(".lbl_Otp").text("OTP has been Resent!").removeClass('text-danger', '').addClass('text-success', '');
|
||||
if (response == 0) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
instance.OtpId = response;
|
||||
$("#modal_Otp").modal("show");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
verifyOtp() {
|
||||
var otpMsg = "";
|
||||
$(".floating-label-form-group .txt_Code").each(function () {
|
||||
otpMsg += $(this).val();
|
||||
});
|
||||
parseInt(otpMsg);
|
||||
$(".floating-label-form-group").find('#otpMsg').attr("value", otpMsg);
|
||||
var instance = this;
|
||||
if ($("#otpMsg").val() == "")
|
||||
$(".lbl_Otp").text("Please Enter OTP!").addClass('text-danger', '');
|
||||
else {
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: "",
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: false,
|
||||
IsSignup: true,
|
||||
UnibaseId: "",
|
||||
OtpId: instance.OtpId,
|
||||
UserOtp: $("#otpMsg").val()
|
||||
};
|
||||
instance._accountManager.verifyOtp(postData).then(function (response) {
|
||||
if (response.code.toString() == "2") {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass('text-danger', '');
|
||||
$("#otpMsg").val('');
|
||||
}
|
||||
else if (response.result != null) {
|
||||
if (response.result.contactConfirmed == false && response.result.emailConfirmed == false) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Invalid OTP!").addClass('text-danger', '');
|
||||
$("#otpMsg").val('');
|
||||
}
|
||||
else {
|
||||
$("#div_ForgotPswd").addClass('d-none');
|
||||
$("#modal_Otp").modal("hide");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#div_ResetPswd").removeClass('d-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
resetPassword() {
|
||||
var instance = this;
|
||||
$("#div_ValidationSummary").empty();
|
||||
var confirmPswd = $("#txt_ConfirmPassword").val();
|
||||
var pswd = $("#txt_NewPassword").val();
|
||||
if (pswd.length == 0 || confirmPswd.length == 0) {
|
||||
MessageHelper.Instance().showError("Password fields cannot be empty!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (pswd.length < 8 || confirmPswd.length < 8) {
|
||||
MessageHelper.Instance().showError("Password must be atleast 8 characters!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
var password = $("#txt_NewPassword").val();
|
||||
var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
|
||||
var checkpassword = password.match(decimal) ? true : false;
|
||||
if (checkpassword == false) {
|
||||
$(".pr-password").focus();
|
||||
MessageHelper.Instance().showError("Please Match the Password in requested Format", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (pswd != confirmPswd) {
|
||||
MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
$(".preloader-it").fadeIn();
|
||||
var postData = {
|
||||
Password: $("#txt_NewPassword").val(),
|
||||
UserName: instance.UserName,
|
||||
};
|
||||
instance._accountManager.updatePassword(postData).then(function (response) {
|
||||
if (response.errors == null) {
|
||||
$("#div_ResetPswd").addClass('d-none');
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#div_SuccessMsg").removeClass('d-none');
|
||||
MessageHelper.Instance().showSuccess("Password Updated Successfully", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError(response.errors[0], "div_ValidationSummary");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", "div_ValidationSummary");
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
return new HomeAffairsForgotPassword();
|
||||
}
|
||||
}
|
||||
Components.HomeAffairsForgotPassword = HomeAffairsForgotPassword;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
Executable
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,308 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class MobilForgotPassword extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
var jsfiles = ["tenants/themes/compact/index.anonymous.js", "platform/membership/managers/accountmanager.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
return jsfiles;
|
||||
}
|
||||
cssFiles() {
|
||||
return ["tenants/themes/compact/css/style.ext.css", 'libs/passwordrequirement/passwordrequirement.css'];
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
$(".pr-password").focus(function () {
|
||||
var resetPswd = $(".pr-password");
|
||||
resetPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
$("#txt_NewPassword").click(function () {
|
||||
$(this).removeAttr("readonly");
|
||||
});
|
||||
$("#txt_NewPassword").keyup(function (e) {
|
||||
if (e.keyCode == 8) {
|
||||
let check = $(this).val();
|
||||
if (check == "" || check == null || check == 0) {
|
||||
$("#txt_NewPassword").attr("readonly");
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#txt_ConfirmPassword").click(function () {
|
||||
$(this).removeAttr("readonly");
|
||||
});
|
||||
$("#txt_ConfirmPassword").keyup(function (e) {
|
||||
if (e.keyCode == 8) {
|
||||
let check = $(this).val();
|
||||
if (check == "" || check == null || check == 0) {
|
||||
$("#txt_NewPassword").attr("readonly");
|
||||
}
|
||||
}
|
||||
});
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#div_modalbody").removeAttr("style");
|
||||
$('#passwordHide').click(function () {
|
||||
var input = $('#txt_NewPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#passwordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$('#confirmPasswordHide').click(function () {
|
||||
var input = $('#txt_ConfirmPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#confirmPasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
var instance = this;
|
||||
$("#txt_PhoneorMail").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_SendCode").click();
|
||||
});
|
||||
$(".txt_Code:last").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
$("#btn_VerifyCode").click();
|
||||
});
|
||||
$("#txt_NewPassword,#txt_ConfirmPassword").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_ResetPswd").click();
|
||||
});
|
||||
$("#btn_SendCode").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
$("#btn_VerifyCode").click(function () {
|
||||
instance.verifyOtp();
|
||||
});
|
||||
$("#btn_ResendCode").click(function () {
|
||||
instance.sendOtp(instance.OtpId);
|
||||
});
|
||||
$("#btn_ResetPswd").click(function () {
|
||||
instance.resetPassword();
|
||||
});
|
||||
$('.floating-label-form-group .txt_Code').on('input', function (e) {
|
||||
const inputEl = this;
|
||||
inputEl.value = inputEl.value.replace(/[^0-9]/g, '');
|
||||
});
|
||||
$(".txt_Code").click(function () {
|
||||
$(".lbl_Otp").empty();
|
||||
});
|
||||
if (callback != null)
|
||||
callback();
|
||||
}
|
||||
otpInputTabChange(val) {
|
||||
const ele = $('.txt_Code');
|
||||
if (ele[val - 1].value != '') {
|
||||
if (ele[val])
|
||||
ele[val].focus();
|
||||
}
|
||||
else if (ele[val - 1].value == '') {
|
||||
if (ele[val - 2])
|
||||
ele[val - 2].focus();
|
||||
}
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
const html = `<div id="div_ForgotPassword"><form id="frm_ForgotPassword" data-validate="parsley" data-isdynamic="false" style="" autocomplete="off">
|
||||
<div id="div_ValidationSummary"></div><div id="div_ForgotPswd" class=""><h1 class="display-5 mb-10 text-center">Forgot your Password?</h1><p class="mb-30 text-center">Enter your Phone Number to receive OTP.</p><div class="form-group"><input class="form-control" required autocomplete="off" placeholder="Enter your Phone Number/Email Address" id="txt_PhoneorMail" type="text"></div><button class="btn btn-primary btn-block mb-20" id="btn_SendCode" type="button">Send OTP</button><p class="text-right"><a href="index.html#/login">Back to login</a></p></div><div id="div_ResetPswd" class="d-none"><h1 class="display-5 mb-30 text-center">Please reset your password</h1><div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off" readonly><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span><div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="new-password" readonly><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div>
|
||||
<button class="btn btn-primary btn-block mb-20" id="btn_ResetPswd" type="button">Reset Password</button><p class="text-right"><a href="/Index.html">Back to login</a></p></div><div id="div_SuccessMsg" class="d-none"><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div><h1 class="display-4 mb-20 text-center">Password Updated Successfully</h1><p class="text-center"><a href="index.html#/login">Click here to Login</a></p></div></form><div id="modal_Otp" class="modal fade hide">
|
||||
<div class="modal-dialog modal-dialog-centered ">
|
||||
<div class="modal-content ">
|
||||
<div class="modal-header border-0 d-block"><button type="button" class="btn btn-link pull-right font-16 text-secondary p-0" data-dismiss="modal" aria-hidden="true" >×</button></div>
|
||||
<div class="modal-body text-center" id="div_modalbody">
|
||||
<img src="tenants/themes/compact/imgs/otp-verify-img.png" class="img-fluid h-100p mx-auto my-10" >
|
||||
<h4 class="modal-title font-weight-600">Mobile or Email Verification</h4>
|
||||
|
||||
<div class="lbl_Otp"></div>
|
||||
<div class="otpdiv my-10">
|
||||
<div class="floating-label-form-group mb-2 p-0">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(1)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(2)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(3)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(4)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(5)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(6)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input type="hidden" class="form-control optmsg" id="otpMsg" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer py-10" style="display:block"><button type = "button" class="btn btn-outline-primary pull-left" id="btn_ResendCode">Resend</button><button type = "button" class="btn btn-outline-primary pull-right" id="btn_VerifyCode">Verify</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
return html;
|
||||
}
|
||||
validate() {
|
||||
var instance = this;
|
||||
if ($("#txt_PhoneorMail").val() == "") {
|
||||
MessageHelper.Instance().showError("Email or Phone cannot be Empty!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
else if ($("#txt_PhoneorMail").val() != "") {
|
||||
$(".preloader-it").fadeIn();
|
||||
var phoneOrMail = $("#txt_PhoneorMail").val();
|
||||
instance._accountManager.getUser(phoneOrMail, phoneOrMail).then(function (response) {
|
||||
if (response.result != null) {
|
||||
instance.UserName = response.result.userName;
|
||||
$(".lbl_Otp").removeClass('text-danger text-success').text("We have sent OTP on your Mobile Number and Email !").addClass("h6 position-relative py-3");
|
||||
$("#txt_Code").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
instance.sendOtp(0);
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Enter valid Email/Phone!", "div_ValidationSummary");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
}
|
||||
sendOtp(IsResend) {
|
||||
var instance = this;
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: $("#txt_PhoneorMail").val(),
|
||||
IsSignup: false,
|
||||
IsRegisterUser: false,
|
||||
IsForgotPswd: true,
|
||||
UnibaseId: instance.UserName,
|
||||
OtpId: IsResend,
|
||||
UserOtp: ""
|
||||
};
|
||||
instance._accountManager.sendOtp(postData).then(function (response) {
|
||||
if (IsResend != 0)
|
||||
$(".lbl_Otp").text("OTP has been Resent!").removeClass('text-danger', '').addClass('text-success', '');
|
||||
if (response == 0) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
instance.OtpId = response;
|
||||
$("#modal_Otp").modal("show");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
verifyOtp() {
|
||||
var otpMsg = "";
|
||||
$(".floating-label-form-group .txt_Code").each(function () {
|
||||
otpMsg += $(this).val();
|
||||
});
|
||||
parseInt(otpMsg);
|
||||
$(".floating-label-form-group").find('#otpMsg').attr("value", otpMsg);
|
||||
var instance = this;
|
||||
if ($("#otpMsg").val() == "")
|
||||
$(".lbl_Otp").text("Please Enter OTP!").addClass('text-danger', '');
|
||||
else {
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: "",
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: false,
|
||||
IsSignup: true,
|
||||
UnibaseId: "",
|
||||
OtpId: instance.OtpId,
|
||||
UserOtp: $("#otpMsg").val(),
|
||||
};
|
||||
instance._accountManager.verifyOtp(postData).then(function (response) {
|
||||
if (response.code.toString() == "2") {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass('text-danger', '');
|
||||
$("#otpMsg").val('');
|
||||
}
|
||||
else if (response.result != null) {
|
||||
if (response.result.contactConfirmed == false && response.result.emailConfirmed == false) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Invalid OTP!").addClass('text-danger', '');
|
||||
$("#otpMsg").val('');
|
||||
}
|
||||
else {
|
||||
$("#div_ForgotPswd").addClass('d-none');
|
||||
$("#modal_Otp").modal("hide");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#div_ResetPswd").removeClass('d-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
resetPassword() {
|
||||
var instance = this;
|
||||
$("#div_ValidationSummary").empty();
|
||||
var confirmPswd = $("#txt_ConfirmPassword").val();
|
||||
var pswd = $("#txt_NewPassword").val();
|
||||
if (pswd.length == 0 || confirmPswd.length == 0) {
|
||||
MessageHelper.Instance().showError("Password fields cannot be empty!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (pswd.length < 8 || confirmPswd.length < 8) {
|
||||
MessageHelper.Instance().showError("Password must be atleast 8 characters!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
var password = $("#txt_NewPassword").val();
|
||||
var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
|
||||
var checkpassword = password.match(decimal) ? true : false;
|
||||
if (checkpassword == false) {
|
||||
$(".pr-password").focus();
|
||||
MessageHelper.Instance().showError("Please Match the Password in requested Format", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (pswd != confirmPswd) {
|
||||
MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
$(".preloader-it").fadeIn();
|
||||
var postData = {
|
||||
Password: $("#txt_NewPassword").val(),
|
||||
UserName: instance.UserName,
|
||||
};
|
||||
instance._accountManager.updatePassword(postData).then(function (response) {
|
||||
if (response.errors == null) {
|
||||
$("#div_ResetPswd").addClass('d-none');
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#div_SuccessMsg").removeClass('d-none');
|
||||
MessageHelper.Instance().showSuccess("Password Updated Successfully", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError(response.errors[0], "div_ValidationSummary");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", "div_ValidationSummary");
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
return new MobilForgotPassword();
|
||||
}
|
||||
}
|
||||
Components.MobilForgotPassword = MobilForgotPassword;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
+1
File diff suppressed because one or more lines are too long
Vendored
Executable
+29
@@ -0,0 +1,29 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{jsFiles(){return["tenants/themes/compact/index.anonymous.js","platform/membership/managers/accountmanager.js","libs/passwordrequirement/passwordrequirement.js"]}cssFiles(){return["tenants/themes/compact/css/style.ext.css","libs/passwordrequirement/passwordrequirement.css"]}load(t,i,r){$(".pr-password").focus(function(){var n=$(".pr-password");n.passwordRequirements({numCharacters:8,useLowercase:!0,useUppercase:!0,useNumbers:!0,useSpecial:!0})});$("#txt_NewPassword").click(function(){$(this).removeAttr("readonly")});$("#txt_NewPassword").keyup(function(n){if(n.keyCode==8){let n=$(this).val();(n==""||n==null||n==0)&&$("#txt_NewPassword").attr("readonly")}});$("#txt_ConfirmPassword").click(function(){$(this).removeAttr("readonly")});$("#txt_ConfirmPassword").keyup(function(n){if(n.keyCode==8){let n=$(this).val();(n==""||n==null||n==0)&&$("#txt_NewPassword").attr("readonly")}});this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance();jQuery(".preloader-it").delay(500).fadeOut("slow");jQuery("#external-container").delay(500).fadeIn("slow");jQuery("#bizgaze_body").css("background-color","#f4f6f7");$("#div_modalbody").removeAttr("style");$("#passwordHide").click(function(){var n=$("#txt_NewPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#passwordHide").toggleClass("fa-eye-slash fa-eye")});$("#confirmPasswordHide").click(function(){var n=$("#txt_ConfirmPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#confirmPasswordHide").toggleClass("fa-eye-slash fa-eye")});var u=this;$("#txt_PhoneorMail").keypress(function(n){n.which==13&&document.getElementById("btn_SendCode").click()});$(".txt_Code:last").keypress(function(n){n.which==13&&$("#btn_VerifyCode").click()});$("#txt_NewPassword,#txt_ConfirmPassword").keypress(function(n){n.which==13&&document.getElementById("btn_ResetPswd").click()});$("#btn_SendCode").click(function(){u.validate()});$("#btn_VerifyCode").click(function(){u.verifyOtp()});$("#btn_ResendCode").click(function(){u.sendOtp(u.OtpId)});$("#btn_ResetPswd").click(function(){u.resetPassword()});$(".floating-label-form-group .txt_Code").on("input",function(){const n=this;n.value=n.value.replace(/[^0-9]/g,"")});$(".txt_Code").click(function(){$(".lbl_Otp").empty()});r!=null&&r()}otpInputTabChange(n){const t=$(".txt_Code");t[n-1].value!=""?t[n]&&t[n].focus():t[n-1].value==""&&t[n-2]&&t[n-2].focus()}html(){if(jQuery("#external-form").length===0){var n=new t.Index_Anonymous;n.init(null)}return`<div id="div_ForgotPassword"><form id="frm_ForgotPassword" data-validate="parsley" data-isdynamic="false" style="" autocomplete="off">
|
||||
<div id="div_ValidationSummary"></div><div id="div_ForgotPswd" class=""><h1 class="display-5 mb-10 text-center">Forgot your Password?</h1><p class="mb-30 text-center">Enter your Phone Number to receive OTP.</p><div class="form-group"><input class="form-control" required autocomplete="off" placeholder="Enter your Phone Number/Email Address" id="txt_PhoneorMail" type="text"></div><button class="btn btn-primary btn-block mb-20" id="btn_SendCode" type="button">Send OTP</button><p class="text-right"><a href="index.html#/login">Back to login</a></p></div><div id="div_ResetPswd" class="d-none"><h1 class="display-5 mb-30 text-center">Please reset your password</h1><div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off" readonly><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span><div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="new-password" readonly><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div>
|
||||
<button class="btn btn-primary btn-block mb-20" id="btn_ResetPswd" type="button">Reset Password</button><p class="text-right"><a href="/Index.html">Back to login</a></p></div><div id="div_SuccessMsg" class="d-none"><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div><h1 class="display-4 mb-20 text-center">Password Updated Successfully</h1><p class="text-center"><a href="index.html#/login">Click here to Login</a></p></div></form><div id="modal_Otp" class="modal fade hide">
|
||||
<div class="modal-dialog modal-dialog-centered ">
|
||||
<div class="modal-content ">
|
||||
<div class="modal-header border-0 d-block"><button type="button" class="btn btn-link pull-right font-16 text-secondary p-0" data-dismiss="modal" aria-hidden="true" >×</button></div>
|
||||
<div class="modal-body text-center" id="div_modalbody">
|
||||
<img src="tenants/themes/compact/imgs/otp-verify-img.png" class="img-fluid h-100p mx-auto my-10" >
|
||||
<h4 class="modal-title font-weight-600">Mobile or Email Verification</h4>
|
||||
|
||||
<div class="lbl_Otp"></div>
|
||||
<div class="otpdiv my-10">
|
||||
<div class="floating-label-form-group mb-2 p-0">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(1)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(2)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(3)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(4)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(5)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(6)' id ="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input type="hidden" class="form-control optmsg" id="otpMsg" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer py-10" style="display:block"><button type = "button" class="btn btn-outline-primary pull-left" id="btn_ResendCode">Resend</button><button type = "button" class="btn btn-outline-primary pull-right" id="btn_VerifyCode">Verify</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`}validate(){var n=this,t;if($("#txt_PhoneorMail").val()=="")return MessageHelper.Instance().showError("Email or Phone cannot be Empty!","div_ValidationSummary"),!1;$("#txt_PhoneorMail").val()!=""&&($(".preloader-it").fadeIn(),t=$("#txt_PhoneorMail").val(),n._accountManager.getUser(t,t).then(function(t){t.result!=null?(n.UserName=t.result.userName,$(".lbl_Otp").removeClass("text-danger text-success").text("We have sent OTP on your Mobile Number and Email !").addClass("h6 position-relative py-3"),$("#txt_Code").val(""),$("#div_ValidationSummary").empty(),n.sendOtp(0)):($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError("Enter valid Email/Phone!","div_ValidationSummary"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")}))}sendOtp(n){var t=this,i={FirstName:"",LastName:"",ContactNumber:"",Email:"",TenantName:"",ContactOrEmail:$("#txt_PhoneorMail").val(),IsSignup:!1,IsRegisterUser:!1,IsForgotPswd:!0,UnibaseId:t.UserName,OtpId:n,UserOtp:""};t._accountManager.sendOtp(i).then(function(i){n!=0&&$(".lbl_Otp").text("OTP has been Resent!").removeClass("text-danger","").addClass("text-success","");i==0?($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")):(t.OtpId=i,$("#modal_Otp").modal("show"),$(".preloader-it").delay(200).fadeOut("slow"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")})}verifyOtp(){var n="",t,i;$(".floating-label-form-group .txt_Code").each(function(){n+=$(this).val()});parseInt(n);$(".floating-label-form-group").find("#otpMsg").attr("value",n);t=this;$("#otpMsg").val()==""?$(".lbl_Otp").text("Please Enter OTP!").addClass("text-danger",""):(i={FirstName:"",LastName:"",ContactNumber:"",Email:"",TenantName:"",ContactOrEmail:"",IsForgotPswd:!1,IsRegisterUser:!1,IsSignup:!0,UnibaseId:"",OtpId:t.OtpId,UserOtp:$("#otpMsg").val()},t._accountManager.verifyOtp(i).then(function(n){n.code.toString()=="2"?($(".preloader-it").delay(200).fadeOut("slow"),$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass("text-danger",""),$("#otpMsg").val("")):n.result!=null&&(n.result.contactConfirmed==!1&&n.result.emailConfirmed==!1?($(".preloader-it").delay(200).fadeOut("slow"),$(".lbl_Otp").text("Invalid OTP!").addClass("text-danger",""),$("#otpMsg").val("")):($("#div_ForgotPswd").addClass("d-none"),$("#modal_Otp").modal("hide"),$(".preloader-it").delay(200).fadeOut("slow"),$("#div_ResetPswd").removeClass("d-none")))}))}resetPassword(){var i=this,n,t,r;if($("#div_ValidationSummary").empty(),n=$("#txt_ConfirmPassword").val(),t=$("#txt_NewPassword").val(),t.length==0||n.length==0)return MessageHelper.Instance().showError("Password fields cannot be empty!","div_ValidationSummary"),!1;if(t.length<8||n.length<8)return MessageHelper.Instance().showError("Password must be atleast 8 characters!","div_ValidationSummary"),!1;var u=$("#txt_NewPassword").val(),f=u.match(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/)?!0:!1;if(f==!1)return $(".pr-password").focus(),MessageHelper.Instance().showError("Please Match the Password in requested Format","div_ValidationSummary"),!1;if(t!=n)return MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!","div_ValidationSummary"),!1;$(".preloader-it").fadeIn();r={Password:$("#txt_NewPassword").val(),UserName:i.UserName};i._accountManager.updatePassword(r).then(function(n){n.errors==null?($("#div_ResetPswd").addClass("d-none"),$(".preloader-it").delay(200).fadeOut("slow"),$("#div_SuccessMsg").removeClass("d-none"),MessageHelper.Instance().showSuccess("Password Updated Successfully","div_ValidationSummary")):($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError(n.errors[0],"div_ValidationSummary"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")})}static Instance(){return new i}}t.MobilForgotPassword=i})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,329 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class MobilNewForgotPassword extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
var jsfiles = ["tenants/themes/compact/index.mobil_anonymous.js", "platform/membership/managers/accountmanager.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
return jsfiles;
|
||||
}
|
||||
cssFiles() {
|
||||
return ["tenants/themes/compact/css/style.ext.css", 'libs/passwordrequirement/passwordrequirement.css'];
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
$(".pr-password").focus(function () {
|
||||
var resetPswd = $(".pr-password");
|
||||
resetPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
$("#txt_NewPassword").click(function () {
|
||||
$(this).removeAttr("readonly");
|
||||
});
|
||||
$("#txt_NewPassword").keyup(function (e) {
|
||||
if (e.keyCode == 8) {
|
||||
let check = $(this).val();
|
||||
if (check == "" || check == null || check == 0) {
|
||||
$("#txt_NewPassword").attr("readonly");
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#txt_ConfirmPassword").click(function () {
|
||||
$(this).removeAttr("readonly");
|
||||
});
|
||||
$("#txt_ConfirmPassword").keyup(function (e) {
|
||||
if (e.keyCode == 8) {
|
||||
let check = $(this).val();
|
||||
if (check == "" || check == null || check == 0) {
|
||||
$("#txt_NewPassword").attr("readonly");
|
||||
}
|
||||
}
|
||||
});
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#div_modalbody").removeAttr("style");
|
||||
$('#passwordHide').click(function () {
|
||||
var input = $('#txt_NewPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#passwordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$('#confirmPasswordHide').click(function () {
|
||||
var input = $('#txt_ConfirmPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#confirmPasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
var instance = this;
|
||||
$("#txt_PhoneorMail").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_SendCode").click();
|
||||
});
|
||||
$(".txt_Code:last").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
$("#btn_VerifyCode").click();
|
||||
});
|
||||
$("#txt_NewPassword,#txt_ConfirmPassword").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_ResetPswd").click();
|
||||
});
|
||||
$("#btn_SendCode").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
$("#btn_VerifyCode").click(function () {
|
||||
instance.verifyOtp();
|
||||
});
|
||||
$("#btn_ResendCode").click(function () {
|
||||
instance.sendOtp(instance.OtpId);
|
||||
});
|
||||
$("#btn_ResetPswd").click(function () {
|
||||
instance.resetPassword();
|
||||
});
|
||||
$('.floating-label-form-group .txt_Code').on('input', function (e) {
|
||||
const inputEl = this;
|
||||
inputEl.value = inputEl.value.replace(/[^0-9]/g, '');
|
||||
});
|
||||
$(".txt_Code").click(function () {
|
||||
$(".lbl_Otp").empty();
|
||||
});
|
||||
if (callback != null)
|
||||
callback();
|
||||
}
|
||||
otpInputTabChange(val) {
|
||||
const ele = $('.txt_Code');
|
||||
if (ele[val - 1].value != '') {
|
||||
if (ele[val])
|
||||
ele[val].focus();
|
||||
}
|
||||
else if (ele[val - 1].value == '') {
|
||||
if (ele[val - 2])
|
||||
ele[val - 2].focus();
|
||||
}
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Mobil_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
let html = '';
|
||||
if (($(window).width()) > 1200) {
|
||||
html += `<div class="row h-100"> <div class="col-xl-5"> <div class="banner-img-container h-100"><img src="tenants/themes/compact/imgs/mobil-desktop-view-bg.png" alt="img" class="h-100 w-100"> </div></div> <div class="col-xl-7 desktop-view"><div id="div_ForgotPassword" class="mt-100"><form id="frm_ForgotPassword" data-validate="parsley" data-isdynamic="false" style="" autocomplete="off"><div id="div_ValidationSummary"></div> <div id="div_ForgotPswd" class=""> <h1 class="display-5 mb-10 text-center">Forgot your Password?</h1><p class="mb-30 text-center">Enter your Phone Number to receive OTP.</p> <div class="form-group"><input class="form-control" required autocomplete="off" placeholder="Enter your Phone Number/Email Address" id="txt_PhoneorMail" type="text"></div><button class="btn text-white btn-block mb-20" id="btn_SendCode" type="button" style="background:#001F5D;">Send OTP</button><p class="text-right"><a href="index.html#/login">Back to login</a></p></div> <div id="div_ResetPswd" class="d-none"><h1 class="display-5 mb-30 text-center">Please reset your password</h1><div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off" readonly><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
|
||||
<div class="showpwsdreq"></div> </div> <div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="new-password" readonly><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><button class="btn btn-block mb-20 text-white" id="btn_ResetPswd" type="button" style="background:#001F5D;">Reset Password</button>
|
||||
<p class="text-right"><a href="/Index.html">Back to login</a></p></div> <div id="div_SuccessMsg" class="d-none"><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div><h1 class="display-4 mb-20 text-center">Password Updated Successfully</h1><p class="text-center"><a href="index.html#/login">Click here to Login</a></p></div> </form></div></div> </div>`;
|
||||
}
|
||||
else {
|
||||
html += `<div id="div_ForgotPassword"> <form id="frm_ForgotPassword" data-validate="parsley" data-isdynamic="false" style="background: url(tenants/themes/compact/imgs/mobil-background.png) no-repeat;" autocomplete="off"> <div id="div_ValidationSummary" class="position-fixed w-100"></div> <div id="div_ForgotPswd" class=""> <div class="d-flex flex-column justify-content-around p-3 " style="height:100vh"><div class="forgot_pass_header mt-100">
|
||||
<div class=""><h1 class="display-5 mb-10 text-center text-white font-weight-bold">ForgotPassword?</h1><p class="mb-30 text-center text-white font-11">Enter your Phone Number to receive OTP.</p></div> <div class="form-group "><input class="form-control" required autocomplete="off" placeholder="Phone Number/Email Address" id="txt_PhoneorMail" type="text"></div> <p class="text-right"><a href="index.html#/login" class="text-white">Back to login</a></p> </div>
|
||||
<div class="forgot_pass_register"><button class="btn btn-block mb-20 rounded-10 text-white" id="btn_SendCode" type="button" style="background:#001F5D; padding: 10px !important;">Send OTP</button></div> </div></div> <div id="div_ResetPswd" class="d-none"><div class="d-flex flex-column justify-content-around p-3 " style="height:100vh"> <div class="pass_fields mt-70"><h1 class="display-5 mb-30 text-center text-white font-weight-bold">Please reset your password</h1>
|
||||
<div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off" readonly><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
|
||||
<div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="new-password" readonly><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div> <p class="text-right"><a href="/Index.html" class="text-white">Back to login</a></p> </div>
|
||||
<div class="pass_footer"><button class="btn btn-primary btn-block mb-20 rounded-10" id="btn_ResetPswd" type="button" style="background:#001F5D; padding: 10px !important;">Reset Password</button></div>
|
||||
<div id="div_SuccessMsg" class="d-none">
|
||||
<div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div>
|
||||
<h1 class="display-4 mb-20 text-center">Password Updated Successfully</h1>
|
||||
<p class="text-center"><a href="index.html#/login">Click here to Login</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>`;
|
||||
}
|
||||
html += `<div id="modal_Otp" class="modal fade hide">
|
||||
<div class="modal-dialog modal-dialog-centered ">
|
||||
<div class="modal-content ">
|
||||
<div class="modal-header border-0 d-block"><button type="button" class="btn btn-link pull-right font-16 text-secondary p-0" data-dismiss="modal" aria-hidden="true">×</button></div>
|
||||
<div class="modal-body text-center" id="div_modalbody">
|
||||
<img src="tenants/themes/compact/imgs/otp-verify-img.png" class="img-fluid h-100p mx-auto my-10">
|
||||
<h4 class="modal-title font-weight-600">Mobile or Email Verification</h4>
|
||||
|
||||
<div class="lbl_Otp"></div>
|
||||
<div class="otpdiv my-10">
|
||||
<div class="floating-label-form-group mb-2 p-0">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(1)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(2)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(3)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(4)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(5)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(6)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input type="hidden" class="form-control optmsg" id="otpMsg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer py-10" style="display:block"><button type="button" class="btn btn-outline-primary pull-left" id="btn_ResendCode">Resend</button><button type="button" class="btn btn-outline-primary pull-right" id="btn_VerifyCode">Verify</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
return html;
|
||||
}
|
||||
validate() {
|
||||
var instance = this;
|
||||
if ($("#txt_PhoneorMail").val() == "") {
|
||||
MessageHelper.Instance().showError("Email or Phone cannot be Empty!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
else if ($("#txt_PhoneorMail").val() != "") {
|
||||
$(".preloader-it").fadeIn();
|
||||
var phoneOrMail = $("#txt_PhoneorMail").val();
|
||||
instance._accountManager.getUser(phoneOrMail, phoneOrMail).then(function (response) {
|
||||
if (response.result != null) {
|
||||
instance.UserName = response.result.userName;
|
||||
$(".lbl_Otp").removeClass('text-danger text-success').text("We have sent OTP on your Mobile Number and Email !").addClass("h6 position-relative py-3");
|
||||
$("#txt_Code").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
instance.sendOtp(0);
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Enter valid Email/Phone!", "div_ValidationSummary");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
}
|
||||
sendOtp(IsResend) {
|
||||
var instance = this;
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: $("#txt_PhoneorMail").val(),
|
||||
IsSignup: false,
|
||||
IsRegisterUser: false,
|
||||
IsForgotPswd: true,
|
||||
UnibaseId: instance.UserName,
|
||||
OtpId: IsResend,
|
||||
UserOtp: ""
|
||||
};
|
||||
instance._accountManager.sendOtp(postData).then(function (response) {
|
||||
if (IsResend != 0)
|
||||
$(".lbl_Otp").text("OTP has been Resent!").removeClass('text-danger', '').addClass('text-success', '');
|
||||
if (response == 0) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
instance.OtpId = response;
|
||||
$("#modal_Otp").modal("show");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
verifyOtp() {
|
||||
var otpMsg = "";
|
||||
$(".floating-label-form-group .txt_Code").each(function () {
|
||||
otpMsg += $(this).val();
|
||||
});
|
||||
parseInt(otpMsg);
|
||||
$(".floating-label-form-group").find('#otpMsg').attr("value", otpMsg);
|
||||
var instance = this;
|
||||
if ($("#otpMsg").val() == "")
|
||||
$(".lbl_Otp").text("Please Enter OTP!").addClass('text-danger', '');
|
||||
else {
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: "",
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: false,
|
||||
IsSignup: true,
|
||||
UnibaseId: "",
|
||||
OtpId: instance.OtpId,
|
||||
UserOtp: $("#otpMsg").val()
|
||||
};
|
||||
instance._accountManager.verifyOtp(postData).then(function (response) {
|
||||
if (response.code.toString() == "2") {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass('text-danger', '');
|
||||
$("#otpMsg").val('');
|
||||
}
|
||||
else if (response.result != null) {
|
||||
if (response.result.contactConfirmed == false && response.result.emailConfirmed == false) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Invalid OTP!").addClass('text-danger', '');
|
||||
$("#otpMsg").val('');
|
||||
}
|
||||
else {
|
||||
$("#div_ForgotPswd").addClass('d-none');
|
||||
$("#modal_Otp").modal("hide");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#div_ResetPswd").removeClass('d-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
resetPassword() {
|
||||
var instance = this;
|
||||
$("#div_ValidationSummary").empty();
|
||||
var confirmPswd = $("#txt_ConfirmPassword").val();
|
||||
var pswd = $("#txt_NewPassword").val();
|
||||
if (pswd.length == 0 || confirmPswd.length == 0) {
|
||||
MessageHelper.Instance().showError("Password fields cannot be empty!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (pswd.length < 8 || confirmPswd.length < 8) {
|
||||
MessageHelper.Instance().showError("Password must be atleast 8 characters!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
var password = $("#txt_NewPassword").val();
|
||||
var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
|
||||
var checkpassword = password.match(decimal) ? true : false;
|
||||
if (checkpassword == false) {
|
||||
$(".pr-password").focus();
|
||||
MessageHelper.Instance().showError("Please Match the Password in requested Format", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (pswd != confirmPswd) {
|
||||
MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
$(".preloader-it").fadeIn();
|
||||
var postData = {
|
||||
Password: $("#txt_NewPassword").val(),
|
||||
UserName: instance.UserName,
|
||||
};
|
||||
instance._accountManager.updatePassword(postData).then(function (response) {
|
||||
if (response.errors == null) {
|
||||
$("#div_ResetPswd").addClass('d-none');
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#div_SuccessMsg").removeClass('d-none');
|
||||
MessageHelper.Instance().showSuccess("Password Updated Successfully", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError(response.errors[0], "div_ValidationSummary");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", "div_ValidationSummary");
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
return new MobilNewForgotPassword();
|
||||
}
|
||||
}
|
||||
Components.MobilNewForgotPassword = MobilNewForgotPassword;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
+1
File diff suppressed because one or more lines are too long
Vendored
Executable
+43
@@ -0,0 +1,43 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{jsFiles(){return["tenants/themes/compact/index.mobil_anonymous.js","platform/membership/managers/accountmanager.js","libs/passwordrequirement/passwordrequirement.js"]}cssFiles(){return["tenants/themes/compact/css/style.ext.css","libs/passwordrequirement/passwordrequirement.css"]}load(t,i,r){$(".pr-password").focus(function(){var n=$(".pr-password");n.passwordRequirements({numCharacters:8,useLowercase:!0,useUppercase:!0,useNumbers:!0,useSpecial:!0})});$("#txt_NewPassword").click(function(){$(this).removeAttr("readonly")});$("#txt_NewPassword").keyup(function(n){if(n.keyCode==8){let n=$(this).val();(n==""||n==null||n==0)&&$("#txt_NewPassword").attr("readonly")}});$("#txt_ConfirmPassword").click(function(){$(this).removeAttr("readonly")});$("#txt_ConfirmPassword").keyup(function(n){if(n.keyCode==8){let n=$(this).val();(n==""||n==null||n==0)&&$("#txt_NewPassword").attr("readonly")}});this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance();jQuery(".preloader-it").delay(500).fadeOut("slow");jQuery("#external-container").delay(500).fadeIn("slow");jQuery("#bizgaze_body").css("background-color","#f4f6f7");$("#div_modalbody").removeAttr("style");$("#passwordHide").click(function(){var n=$("#txt_NewPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#passwordHide").toggleClass("fa-eye-slash fa-eye")});$("#confirmPasswordHide").click(function(){var n=$("#txt_ConfirmPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#confirmPasswordHide").toggleClass("fa-eye-slash fa-eye")});var u=this;$("#txt_PhoneorMail").keypress(function(n){n.which==13&&document.getElementById("btn_SendCode").click()});$(".txt_Code:last").keypress(function(n){n.which==13&&$("#btn_VerifyCode").click()});$("#txt_NewPassword,#txt_ConfirmPassword").keypress(function(n){n.which==13&&document.getElementById("btn_ResetPswd").click()});$("#btn_SendCode").click(function(){u.validate()});$("#btn_VerifyCode").click(function(){u.verifyOtp()});$("#btn_ResendCode").click(function(){u.sendOtp(u.OtpId)});$("#btn_ResetPswd").click(function(){u.resetPassword()});$(".floating-label-form-group .txt_Code").on("input",function(){const n=this;n.value=n.value.replace(/[^0-9]/g,"")});$(".txt_Code").click(function(){$(".lbl_Otp").empty()});r!=null&&r()}otpInputTabChange(n){const t=$(".txt_Code");t[n-1].value!=""?t[n]&&t[n].focus():t[n-1].value==""&&t[n-2]&&t[n-2].focus()}html(){if(jQuery("#external-form").length===0){var i=new t.Index_Mobil_Anonymous;i.init(null)}let n="";return n+=$(window).width()>1200?`<div class="row h-100"> <div class="col-xl-5"> <div class="banner-img-container h-100"><img src="tenants/themes/compact/imgs/mobil-desktop-view-bg.png" alt="img" class="h-100 w-100"> </div></div> <div class="col-xl-7 desktop-view"><div id="div_ForgotPassword" class="mt-100"><form id="frm_ForgotPassword" data-validate="parsley" data-isdynamic="false" style="" autocomplete="off"><div id="div_ValidationSummary"></div> <div id="div_ForgotPswd" class=""> <h1 class="display-5 mb-10 text-center">Forgot your Password?</h1><p class="mb-30 text-center">Enter your Phone Number to receive OTP.</p> <div class="form-group"><input class="form-control" required autocomplete="off" placeholder="Enter your Phone Number/Email Address" id="txt_PhoneorMail" type="text"></div><button class="btn text-white btn-block mb-20" id="btn_SendCode" type="button" style="background:#001F5D;">Send OTP</button><p class="text-right"><a href="index.html#/login">Back to login</a></p></div> <div id="div_ResetPswd" class="d-none"><h1 class="display-5 mb-30 text-center">Please reset your password</h1><div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off" readonly><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
|
||||
<div class="showpwsdreq"></div> </div> <div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="new-password" readonly><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><button class="btn btn-block mb-20 text-white" id="btn_ResetPswd" type="button" style="background:#001F5D;">Reset Password</button>
|
||||
<p class="text-right"><a href="/Index.html">Back to login</a></p></div> <div id="div_SuccessMsg" class="d-none"><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div><h1 class="display-4 mb-20 text-center">Password Updated Successfully</h1><p class="text-center"><a href="index.html#/login">Click here to Login</a></p></div> </form></div></div> </div>`:`<div id="div_ForgotPassword"> <form id="frm_ForgotPassword" data-validate="parsley" data-isdynamic="false" style="background: url(tenants/themes/compact/imgs/mobil-background.png) no-repeat;" autocomplete="off"> <div id="div_ValidationSummary" class="position-fixed w-100"></div> <div id="div_ForgotPswd" class=""> <div class="d-flex flex-column justify-content-around p-3 " style="height:100vh"><div class="forgot_pass_header mt-100">
|
||||
<div class=""><h1 class="display-5 mb-10 text-center text-white font-weight-bold">ForgotPassword?</h1><p class="mb-30 text-center text-white font-11">Enter your Phone Number to receive OTP.</p></div> <div class="form-group "><input class="form-control" required autocomplete="off" placeholder="Phone Number/Email Address" id="txt_PhoneorMail" type="text"></div> <p class="text-right"><a href="index.html#/login" class="text-white">Back to login</a></p> </div>
|
||||
<div class="forgot_pass_register"><button class="btn btn-block mb-20 rounded-10 text-white" id="btn_SendCode" type="button" style="background:#001F5D; padding: 10px !important;">Send OTP</button></div> </div></div> <div id="div_ResetPswd" class="d-none"><div class="d-flex flex-column justify-content-around p-3 " style="height:100vh"> <div class="pass_fields mt-70"><h1 class="display-5 mb-30 text-center text-white font-weight-bold">Please reset your password</h1>
|
||||
<div class="form-group"><input class="form-control pr-password" required id="txt_NewPassword" placeholder="New password" type="password" autocomplete="off" readonly><span toggle="#txt_NewPassword" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
|
||||
<div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control" required id="txt_ConfirmPassword" placeholder="Re-enter new password" type="password" autocomplete="new-password" readonly><span toggle="#txt_ConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div> <p class="text-right"><a href="/Index.html" class="text-white">Back to login</a></p> </div>
|
||||
<div class="pass_footer"><button class="btn btn-primary btn-block mb-20 rounded-10" id="btn_ResetPswd" type="button" style="background:#001F5D; padding: 10px !important;">Reset Password</button></div>
|
||||
<div id="div_SuccessMsg" class="d-none">
|
||||
<div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div>
|
||||
<h1 class="display-4 mb-20 text-center">Password Updated Successfully</h1>
|
||||
<p class="text-center"><a href="index.html#/login">Click here to Login</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>`,n+`<div id="modal_Otp" class="modal fade hide">
|
||||
<div class="modal-dialog modal-dialog-centered ">
|
||||
<div class="modal-content ">
|
||||
<div class="modal-header border-0 d-block"><button type="button" class="btn btn-link pull-right font-16 text-secondary p-0" data-dismiss="modal" aria-hidden="true">×</button></div>
|
||||
<div class="modal-body text-center" id="div_modalbody">
|
||||
<img src="tenants/themes/compact/imgs/otp-verify-img.png" class="img-fluid h-100p mx-auto my-10">
|
||||
<h4 class="modal-title font-weight-600">Mobile or Email Verification</h4>
|
||||
|
||||
<div class="lbl_Otp"></div>
|
||||
<div class="otpdiv my-10">
|
||||
<div class="floating-label-form-group mb-2 p-0">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(1)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(2)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(3)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(4)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(5)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Code" onkeyup='Unibase.Themes.Compact.Components.MobilForgotPassword.Instance().otpInputTabChange(6)' id="txt_Code" type="text" maxlength="1" autocomplete="off">
|
||||
<input type="hidden" class="form-control optmsg" id="otpMsg">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer py-10" style="display:block"><button type="button" class="btn btn-outline-primary pull-left" id="btn_ResendCode">Resend</button><button type="button" class="btn btn-outline-primary pull-right" id="btn_VerifyCode">Verify</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`}validate(){var n=this,t;if($("#txt_PhoneorMail").val()=="")return MessageHelper.Instance().showError("Email or Phone cannot be Empty!","div_ValidationSummary"),!1;$("#txt_PhoneorMail").val()!=""&&($(".preloader-it").fadeIn(),t=$("#txt_PhoneorMail").val(),n._accountManager.getUser(t,t).then(function(t){t.result!=null?(n.UserName=t.result.userName,$(".lbl_Otp").removeClass("text-danger text-success").text("We have sent OTP on your Mobile Number and Email !").addClass("h6 position-relative py-3"),$("#txt_Code").val(""),$("#div_ValidationSummary").empty(),n.sendOtp(0)):($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError("Enter valid Email/Phone!","div_ValidationSummary"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")}))}sendOtp(n){var t=this,i={FirstName:"",LastName:"",ContactNumber:"",Email:"",TenantName:"",ContactOrEmail:$("#txt_PhoneorMail").val(),IsSignup:!1,IsRegisterUser:!1,IsForgotPswd:!0,UnibaseId:t.UserName,OtpId:n,UserOtp:""};t._accountManager.sendOtp(i).then(function(i){n!=0&&$(".lbl_Otp").text("OTP has been Resent!").removeClass("text-danger","").addClass("text-success","");i==0?($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")):(t.OtpId=i,$("#modal_Otp").modal("show"),$(".preloader-it").delay(200).fadeOut("slow"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")})}verifyOtp(){var n="",t,i;$(".floating-label-form-group .txt_Code").each(function(){n+=$(this).val()});parseInt(n);$(".floating-label-form-group").find("#otpMsg").attr("value",n);t=this;$("#otpMsg").val()==""?$(".lbl_Otp").text("Please Enter OTP!").addClass("text-danger",""):(i={FirstName:"",LastName:"",ContactNumber:"",Email:"",TenantName:"",ContactOrEmail:"",IsForgotPswd:!1,IsRegisterUser:!1,IsSignup:!0,UnibaseId:"",OtpId:t.OtpId,UserOtp:$("#otpMsg").val()},t._accountManager.verifyOtp(i).then(function(n){n.code.toString()=="2"?($(".preloader-it").delay(200).fadeOut("slow"),$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass("text-danger",""),$("#otpMsg").val("")):n.result!=null&&(n.result.contactConfirmed==!1&&n.result.emailConfirmed==!1?($(".preloader-it").delay(200).fadeOut("slow"),$(".lbl_Otp").text("Invalid OTP!").addClass("text-danger",""),$("#otpMsg").val("")):($("#div_ForgotPswd").addClass("d-none"),$("#modal_Otp").modal("hide"),$(".preloader-it").delay(200).fadeOut("slow"),$("#div_ResetPswd").removeClass("d-none")))}))}resetPassword(){var i=this,n,t,r;if($("#div_ValidationSummary").empty(),n=$("#txt_ConfirmPassword").val(),t=$("#txt_NewPassword").val(),t.length==0||n.length==0)return MessageHelper.Instance().showError("Password fields cannot be empty!","div_ValidationSummary"),!1;if(t.length<8||n.length<8)return MessageHelper.Instance().showError("Password must be atleast 8 characters!","div_ValidationSummary"),!1;var u=$("#txt_NewPassword").val(),f=u.match(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/)?!0:!1;if(f==!1)return $(".pr-password").focus(),MessageHelper.Instance().showError("Please Match the Password in requested Format","div_ValidationSummary"),!1;if(t!=n)return MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!","div_ValidationSummary"),!1;$(".preloader-it").fadeIn();r={Password:$("#txt_NewPassword").val(),UserName:i.UserName};i._accountManager.updatePassword(r).then(function(n){n.errors==null?($("#div_ResetPswd").addClass("d-none"),$(".preloader-it").delay(200).fadeOut("slow"),$("#div_SuccessMsg").removeClass("d-none"),MessageHelper.Instance().showSuccess("Password Updated Successfully","div_ValidationSummary")):($(".preloader-it").delay(200).fadeOut("slow"),MessageHelper.Instance().showError(n.errors[0],"div_ValidationSummary"))},function(){$(".preloader-it").delay(200).fadeOut("slow");MessageHelper.Instance().showError("Some Error has occurred!","div_ValidationSummary")})}static Instance(){return new i}}t.MobilNewForgotPassword=i})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,71 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class List extends Unibase.Platform.Core.BaseComponent {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.isListRefresh = false;
|
||||
}
|
||||
jsFiles() {
|
||||
return [];
|
||||
}
|
||||
cssFiles() {
|
||||
return [];
|
||||
}
|
||||
html(id, containerid) {
|
||||
return "";
|
||||
}
|
||||
load(installedappid, containerid, callback) {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().addCacheFiles([
|
||||
"platform/analytics/managers/reportmanager.js",
|
||||
"platform/analytics/components/reportviewer/reportviewerhiddenfields.js",
|
||||
"platform/analytics/components/reportbuilder/reportbuilderhiddenfields.js",
|
||||
"platform/analytics/enums/reporttype.js",
|
||||
"platform/analytics/enums/viewertype.js",
|
||||
"platform/analytics/components/tableviewer/tableviewer.js",
|
||||
"platform/analytics/components/reportviewer/linkreport.js",
|
||||
"libs/jquery/pagination/jquery.pagination.js"
|
||||
]);
|
||||
this.InstalledAppId = installedappid;
|
||||
var instance = this;
|
||||
Unibase.Platform.Apps.Managers.AppManager.Instance().getInstallApp(installedappid).then(function (response) {
|
||||
let reportId = response.result.ReportId;
|
||||
Unibase.Platform.Helpers.NavigationHelper.installedAppId = 0;
|
||||
let details_ins = Unibase.Themes.Compact.Components.Details.Instance();
|
||||
const reportIns = Unibase.Platform.Analytics.Components.ReportViewer.Instance();
|
||||
var obj = reportIns;
|
||||
Unibase.Platform.Helpers.NavigationHelper.installedAppId = installedappid;
|
||||
if (details_ins.lastReportInstance && details_ins.isDetailsUpdated) {
|
||||
obj = details_ins.lastReportInstance;
|
||||
obj.PageSize = reportIns.PageSize;
|
||||
obj.isShowAll = false;
|
||||
reportId = obj.ReportId;
|
||||
}
|
||||
if (instance.isListRefresh) {
|
||||
obj.isListRefresh = instance.isListRefresh;
|
||||
}
|
||||
obj.InstalledAppId = installedappid;
|
||||
Unibase.Themes.Compact.Components.Nav.Instance().isList = true;
|
||||
instance.navigationHelper.popin(reportId, containerid, obj, callback);
|
||||
});
|
||||
}
|
||||
loadDetail(id, installedappid) {
|
||||
this.navigationHelper.loadDetail(id, installedappid, null);
|
||||
}
|
||||
static Instance() {
|
||||
if (this.instance === undefined) {
|
||||
this.instance = new List();
|
||||
}
|
||||
return this.instance;
|
||||
}
|
||||
}
|
||||
Components.List = List;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"list.js","sourceRoot":"","sources":["list.ts"],"names":[],"mappings":"AAGA,IAAU,OAAO,CA6EhB;AA7ED,WAAU,OAAO;IACb,IAAiB,MAAM,CA2EtB;IA3ED,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAyEvB;QAzED,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAuE1B;YAvED,WAAiB,UAAU;gBACvB,MAAa,IAAK,SAAQ,QAAA,QAAQ,CAAC,IAAI,CAAC,aAAa;oBAArD;;wBAOI,kBAAa,GAAY,KAAK,CAAC;oBA8DnC,CAAC;oBA7DG,OAAO;wBACH,OAAO;4BACH,oCAAoC;yBAGvC,CAAC;oBACN,CAAC;oBAED,QAAQ;wBACJ,OAAO,EAAE,CAAC;oBACd,CAAC;oBAED,IAAI,CAAC,EAAE,EAAE,WAAW;wBAChB,OAAO,EAAE,CAAC;oBACd,CAAC;oBAED,IAAI,CAAC,cAAsB,EAAE,WAAmB,EAAE,QAAkB;wBAChE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,aAAa,CAAC;4BAC9D,8CAA8C;4BAC9C,wEAAwE;4BACxE,0EAA0E;4BAC1E,wCAAwC;4BACxC,wCAAwC;4BACxC,0DAA0D;4BAC1D,0DAA0D;4BAC1D,6CAA6C;yBAChD,CAAC,CAAC;wBACH,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;wBACrC,IAAI,QAAQ,GAAG,IAAI,CAAC;wBAEpB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,UAAU,QAAQ;4BACtG,IAAI,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC;4BACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,cAAc,GAAG,CAAC,CAAC;4BAC7D,IAAI,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;4BACvE,IAAI,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;4BACxE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,cAAc,GAAG,cAAc,CAAC;4BAC1E,IAAI,WAAW,CAAC,kBAAkB,IAAI,WAAW,CAAC,gBAAgB,EAAE;gCAChE,GAAG,GAAG,WAAW,CAAC,kBAAkB,CAAC;gCACrC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;6BAC3B;4BACD,IAAI,QAAQ,CAAC,aAAa,EAAE;gCACxB,GAAG,CAAC,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC;6BAC9C;4BACD,GAAG,CAAC,cAAc,GAAG,cAAc,CAAC;4BACpC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC;4BAC/D,QAAQ,CAAC,gBAAgB,CAAC,KAAK,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;wBAC1E,CAAC,CAAC,CAAC;oBACP,CAAC;oBAED,UAAU,CAAC,EAAE,EAAE,cAAc;wBACzB,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;oBAC/D,CAAC;oBAGD,MAAM,CAAC,QAAQ;wBACX,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;4BAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC;yBAC9B;wBACD,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACzB,CAAC;iBAEJ;gBArEY,eAAI,OAqEhB,CAAA;YACL,CAAC,EAvEgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAuE1B;QACL,CAAC,EAzEgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAyEvB;IACL,CAAC,EA3EgB,MAAM,GAAN,cAAM,KAAN,cAAM,QA2EtB;AACL,CAAC,EA7ES,OAAO,KAAP,OAAO,QA6EhB"}
|
||||
+1
@@ -0,0 +1 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{constructor(){super(...arguments);this.isListRefresh=!1}jsFiles(){return["tenants/themes/compact/list.min.js"]}cssFiles(){return[]}html(){return""}load(t,i,r){n.Platform.Helpers.FileCacheHelper.Instance().addCacheFiles(["platform/analytics/managers/reportmanager.js","platform/analytics/components/reportviewer/reportviewerhiddenfields.js","platform/analytics/components/reportbuilder/reportbuilderhiddenfields.js","platform/analytics/enums/reporttype.js","platform/analytics/enums/viewertype.js","platform/analytics/components/tableviewer/tableviewer.js","platform/analytics/components/reportviewer/linkreport.js","libs/jquery/pagination/jquery.pagination.js"]);this.InstalledAppId=t;var u=this;n.Platform.Apps.Managers.AppManager.Instance().getInstallApp(t).then(function(f){let s=f.result.ReportId;n.Platform.Helpers.NavigationHelper.installedAppId=0;let o=n.Themes.Compact.Components.Details.Instance();const h=n.Platform.Analytics.Components.ReportViewer.Instance();var e=h;n.Platform.Helpers.NavigationHelper.installedAppId=t;o.lastReportInstance&&o.isDetailsUpdated&&(e=o.lastReportInstance,e.PageSize=h.PageSize,e.isShowAll=!1,s=e.ReportId);u.isListRefresh&&(e.isListRefresh=u.isListRefresh);e.InstalledAppId=t;n.Themes.Compact.Components.Nav.Instance().isList=!0;u.navigationHelper.popin(s,i,e,r)})}loadDetail(n,t){this.navigationHelper.loadDetail(n,t,null)}static Instance(){return this.instance===undefined&&(this.instance=new i),this.instance}}t.List=i})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,139 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class Login extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
var jsfiles = ["platform/bundle/default.login.min.js"];
|
||||
return jsfiles;
|
||||
}
|
||||
cssFiles() {
|
||||
return [];
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(null);
|
||||
var instance = this;
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#InputEmail,#InputPassword").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("BtnLogin").click();
|
||||
});
|
||||
$('#PasswordHide').click(function () {
|
||||
var input = $('#InputPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#PasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#btnClearcache").click(function () {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().openSettings();
|
||||
}
|
||||
});
|
||||
jQuery("#InputEmail,#InputPassword").on("input", function () {
|
||||
let username = $("#InputEmail").val().toString().trim();
|
||||
let password = $("#InputPassword").val();
|
||||
let validData = true;
|
||||
if (username == '' || username == undefined || password == '' || password == undefined)
|
||||
validData = false;
|
||||
if (validData) {
|
||||
jQuery("#BtnLogin").removeClass("disabled");
|
||||
}
|
||||
else {
|
||||
jQuery("#BtnLogin").addClass("disabled");
|
||||
}
|
||||
});
|
||||
jQuery("#BtnLogin").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
if (callback != null) {
|
||||
callback();
|
||||
}
|
||||
jQuery("#btn_loginhelp").click(function () {
|
||||
var instance = this;
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["apps/support/components/loginhelp.component.js"], function () {
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().popin(0, "external-form", Bizgaze.Apps.Support.Components.LoginHelp.Instance(), null);
|
||||
});
|
||||
});
|
||||
}
|
||||
loadDomainLogo(imagerurl) {
|
||||
if (imagerurl != null && imagerurl != undefined && imagerurl != "") {
|
||||
this.imageurl = imagerurl;
|
||||
}
|
||||
else {
|
||||
this.imageurl = "tenants/themes/compact/imgs/bg_1.png";
|
||||
}
|
||||
}
|
||||
validate(username, password, remember) {
|
||||
MessageHelper.Instance().hideMessage();
|
||||
if (!isMobileApp() || (username == undefined && password == undefined)) {
|
||||
username = $("#InputEmail").val().toString().trim();
|
||||
password = $("#InputPassword").val().toString();
|
||||
remember = $("#InputRemember").prop("checked");
|
||||
}
|
||||
else {
|
||||
remember = true;
|
||||
}
|
||||
let validData = true;
|
||||
if (username == '' || username == undefined || password == '' || password == undefined)
|
||||
validData = false;
|
||||
if (validData) {
|
||||
jQuery("#BtnLogin").addClass("disabled");
|
||||
jQuery("#BtnLogin").text("Validating");
|
||||
var request = new Unibase.Platform.Membership.Requests.Login(username, password, "", remember);
|
||||
if (this._accountManager == undefined) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
}
|
||||
this._accountManager.validateLogin(request).then(function (response) {
|
||||
var identity = response.result;
|
||||
if (identity === null) {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials('', '');
|
||||
}
|
||||
MessageHelper.Instance().showError(response.message, 'validation-summary');
|
||||
jQuery("#BtnLogin").removeClass("disabled");
|
||||
jQuery("#BtnLogin").text("Login");
|
||||
}
|
||||
else {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials(username, password);
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().saveUserDevice(identity.sessionId);
|
||||
}
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
window.location.href = '#/welcome';
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().SendUserDetails(JSON.stringify(identity));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials('', '');
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().redirectToLogin();
|
||||
}
|
||||
MessageHelper.Instance().showError("Mandatory fields are missing", 'validation-summary');
|
||||
}
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Compact.Components.Index_Anonymous();
|
||||
index.init(null, this.imageurl);
|
||||
}
|
||||
const html = `<form id="Frm_Login" default="" data-validate="parsley" data-isdynamic="false"><h1 class="display-4 mb-10">Login</h1><p class="mb-30">Sign in to your account and enjoy unlimited perks.</p><div id="validation-summary"></div><div class="form-group"><input class="form-control" id="InputEmail" placeholder="Phone or Email" type="text"></div><div class="form-group mb-20"><input class="form-control" id="InputPassword" placeholder="Password" type="password" autocomplete="new-password"><span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><div class="input-group mb-20"><div class="custom-control custom-checkbox col-xs"><input class="custom-control-input" id="InputRemember" type="checkbox"><label class="custom-control-label font-14" for="InputRemember">Keep me logged in</label></div><div class="col-xs ml-auto"><p class="text-right"><a href="index.html#/forgotpassword">Forgot Password?</a></p></div></div><a class="btn btn-primary btn-block text-white disabled" id="BtnLogin">Login</a><div class="col-2 mt-5" id="btn_loginhelp"><a href="#" style="text-decoration:underline">Help</a></div></form><div class="option-sep">or</div><div class="row"><div class="text-center col-sm-6 pa-5">Already an existing user? <a href="index.html#/registeruser">Register</a></div><div class="text-center col-sm-6 pa-5">Don’t have an account yet? <a href="index.html#/createcustomer">Create a Contact</a></div><div class="text-center col-sm p-2"></div></div>`;
|
||||
return html;
|
||||
}
|
||||
static Instance() {
|
||||
return new Login();
|
||||
}
|
||||
}
|
||||
Components.Login = Login;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,173 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class HomeAffairsLogin extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
var jsfiles = ["tenants/themes/compact/index.mobil_anonymous.js", "platform/membership/managers/accountmanager.js", "platform/membership/infos/identity.js", "platform/membership/requests/login.js", "platform/core/helpers/cookies/cookiehelper.js", "tenants/themes/compact/components/notifications/notification.js", "platform/core/enums/rowstatus.js"];
|
||||
return jsfiles;
|
||||
}
|
||||
cssFiles() {
|
||||
return [];
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(null);
|
||||
var instance = this;
|
||||
$(".biz-pg-wrapper").addClass("mt-0");
|
||||
$('#BtnLogin_nav').click(function () {
|
||||
$('.first-display').addClass('d-none');
|
||||
$('.login-display').removeClass('d-none');
|
||||
});
|
||||
$('.back-btn').click(function () {
|
||||
$('.first-display').removeClass('d-none');
|
||||
$('.login-display').addClass('d-none');
|
||||
});
|
||||
if (isMobileApp()) {
|
||||
$('#Frm_Login').find('.register-div').addClass('d-none');
|
||||
}
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#InputEmail,#InputPassword").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("BtnLogin").click();
|
||||
});
|
||||
$('#PasswordHide').click(function () {
|
||||
var input = $('#InputPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#PasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#btnClearcache").click(function () {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().openSettings();
|
||||
}
|
||||
});
|
||||
jQuery("#InputEmail,#InputPassword").on("input", function () {
|
||||
let username = $("#InputEmail").val().toString().trim();
|
||||
let password = $("#InputPassword").val();
|
||||
let validData = true;
|
||||
if (username == '' || username == undefined || password == '' || password == undefined)
|
||||
validData = false;
|
||||
if (validData) {
|
||||
jQuery("#BtnLogin").removeClass("disabled");
|
||||
}
|
||||
else {
|
||||
jQuery("#BtnLogin").addClass("disabled");
|
||||
}
|
||||
});
|
||||
$(".btn-outline-secondary").addClass('hidden');
|
||||
jQuery("#BtnLogin").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
if (callback != null) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
loadDomainLogo(imagerurl) {
|
||||
if (imagerurl != null && imagerurl != undefined && imagerurl != "") {
|
||||
this.imageUrl = imagerurl;
|
||||
}
|
||||
else {
|
||||
this.imageUrl = "tenants/themes/compact/imgs/bg_1.png";
|
||||
}
|
||||
}
|
||||
validate(username, password, remember) {
|
||||
MessageHelper.Instance().hideMessage();
|
||||
if (!isMobileApp() || (username == undefined && password == undefined)) {
|
||||
username = $("#InputEmail").val().toString().trim();
|
||||
password = $("#InputPassword").val().toString();
|
||||
remember = $("#InputRemember").prop("checked");
|
||||
}
|
||||
else {
|
||||
remember = true;
|
||||
}
|
||||
let validData = true;
|
||||
if (username == '' || username == undefined || password == '' || password == undefined)
|
||||
validData = false;
|
||||
if (validData) {
|
||||
jQuery("#BtnLogin").addClass("disabled");
|
||||
jQuery("#BtnLogin").text("Validating");
|
||||
var request = new Unibase.Platform.Membership.Requests.Login(username, password, '', remember);
|
||||
if (this._accountManager == undefined) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
}
|
||||
this._accountManager.validateLogin(request).then(function (response) {
|
||||
var identity = response.result;
|
||||
if (identity === null) {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials('', '');
|
||||
}
|
||||
MessageHelper.Instance().showError(response.message, 'validation-summary');
|
||||
jQuery("#BtnLogin").removeClass("disabled");
|
||||
jQuery("#BtnLogin").text("Login");
|
||||
}
|
||||
else {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials(username, password);
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().saveUserDevice(identity.sessionId);
|
||||
}
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
window.location.href = '#/welcome';
|
||||
if (isMobileApp()) {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials('', '');
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().redirectToLogin();
|
||||
}
|
||||
MessageHelper.Instance().showError("Mandatory fields are missing", 'validation-summary');
|
||||
}
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Compact.Components.Index_Mobil_Anonymous();
|
||||
index.init(null, this.imageUrl);
|
||||
}
|
||||
let assesturl = _appsettings.asset_url();
|
||||
let html = '';
|
||||
if (($(window).width()) > 1200) {
|
||||
html += `<div class="row h-100" style="background:url('` + assesturl + `tenants/themes/compact/imgs/homeaffairs/homeaffariesdesktopbg.jpg');background-size:cover;"><div class="col-xl-5"><div class="banner-img-container h-100 d-flex align-items-center justify-content-center pl-145"><img src="` + assesturl + `tenants/themes/compact/imgs/homeaffairs/aa.png" alt="img" class="img-fluid"> </div></div><div class="col-xl-7 desktop-view d-flex align-items-center justify-content-center flex-column pr-140 text-white"><form id="Frm_Login" default="" data-validate="parsley" data-isdynamic="false"><h1 class="display-4 mb-10 text-white">Login</h1><p class="mb-30">Sign in to your account and enjoy unlimited perks.</p><div id="validation-summary"></div><div class="form-group"><input class="form-control" id="InputEmail" placeholder="Phone or Email" type="text"></div><div class="form-group mb-20"><input class="form-control" id="InputPassword" placeholder="Password" type="password" autocomplete="new-password"><span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><div class="input-group mb-20"><div class="custom-control custom-checkbox col-xs"><input class="custom-control-input" id="InputRemember" type="checkbox"><label class="custom-control-label font-14" for="InputRemember">Keep me logged in</label></div><div class="col-xs ml-auto"><p class="text-right"><a href="index.html#/forgotpassword" class="text-white">Forgot Password?</a></p></div></div><a class="btn btn-block text-white disabled" id="BtnLogin" style="background:#001F5D;">Login</a></form><div class="option-sep">or</div><div class="row"><div class="text-center pa-5">Already an existing user? <a href="index.html#/registeruser">Register</a></div><div class="text-center col-sm p-2"></div></div></div></div>`;
|
||||
}
|
||||
else {
|
||||
html = `<form id="Frm_Login" default="" class="p-4 login-display d-flex biz-custom-scrollbar" data - validate="parsley" data - isdynamic="false" style="background:url('` + assesturl + `tenants/themes/compact/imgs/homeaffairs/homeaffariesmobilebg.jpg')!important;background-size:cover;">
|
||||
<div id="validation-summary" class="position-fixed w-85"> </div>
|
||||
<div class="d-flex flex-column justify-content-between p-3">
|
||||
<div class="logo_img mx-auto"> <img src="tenants/themes/compact/imgs/homeaffairs/aa.png" class="img-fluid w-100">
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<div class="form-group"> <input class="form-control login-input bg-white" id="InputEmail" placeholder="Phone or Email" type="text"></div>
|
||||
<div class="form-group mb-20"> <input class="form-control login-input" id="InputPassword" placeholder="Password" type="password" autocomplete="new- password"> <span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span> </div>
|
||||
<div class="input-group mb-20"><div class="custom-control custom-checkbox col-xs"><input class="custom-control-input" id="InputRemember" type="checkbox"><label class="custom-control-label font-14 text-charcoal-dark-3" for="InputRemember">Keep me logged in</label></div><div class="col-xs ml-auto"><p class="text-right"><a href="index.html#/forgotpassword" class="text-white">Forgot Password?</a></p></div></div>
|
||||
<div class="input-group mb-20 flex-column">
|
||||
<a class="btn btn-block rounded-10 text-white w-70 mt-25 mx-auto shadow-lg-blue" style="background:#001F5D; padding: 10px!important;" id="BtnLogin"> Login </a>
|
||||
</div>
|
||||
<div class="register-div">
|
||||
<div class="option-sep">or</div>
|
||||
<div class="row"><div class="text-center text-brown col-sm-6 pa-5 text-dark">Already an existing user? <a href="index.html#/registeruser" class="text-white">Register</a></div><div class="text-center col-sm p-2"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>`;
|
||||
}
|
||||
return html;
|
||||
}
|
||||
static Instance() {
|
||||
return new HomeAffairsLogin();
|
||||
}
|
||||
}
|
||||
Components.HomeAffairsLogin = HomeAffairsLogin;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,133 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class MobilLogin extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
var jsfiles = ["tenants/themes/compact/index.anonymous.js", "platform/membership/managers/accountmanager.js", "platform/membership/infos/identity.js", "platform/membership/requests/login.js", "platform/core/helpers/cookies/cookiehelper.js", "tenants/themes/compact/components/notifications/notification.js", "platform/core/enums/rowstatus.js"];
|
||||
return jsfiles;
|
||||
}
|
||||
cssFiles() {
|
||||
return [];
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(null);
|
||||
var instance = this;
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#InputEmail,#InputPassword").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("BtnLogin").click();
|
||||
});
|
||||
$('#PasswordHide').click(function () {
|
||||
var input = $('#InputPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#PasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#btnClearcache").click(function () {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().openSettings();
|
||||
}
|
||||
});
|
||||
jQuery("#InputEmail,#InputPassword").on("input", function () {
|
||||
let username = $("#InputEmail").val().toString().trim();
|
||||
let password = $("#InputPassword").val();
|
||||
let validData = true;
|
||||
if (username == '' || username == undefined || password == '' || password == undefined)
|
||||
validData = false;
|
||||
if (validData) {
|
||||
jQuery("#BtnLogin").removeClass("disabled");
|
||||
}
|
||||
else {
|
||||
jQuery("#BtnLogin").addClass("disabled");
|
||||
}
|
||||
});
|
||||
$(".btn-outline-secondary").addClass('hidden');
|
||||
jQuery("#BtnLogin").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
if (callback != null) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
loadDomainLogo(imagerurl) {
|
||||
if (imagerurl != null && imagerurl != undefined && imagerurl != "") {
|
||||
this.imageUrl = imagerurl;
|
||||
}
|
||||
else {
|
||||
this.imageUrl = "tenants/themes/compact/imgs/bg_1.png";
|
||||
}
|
||||
}
|
||||
validate(username, password, remember) {
|
||||
MessageHelper.Instance().hideMessage();
|
||||
if (!isMobileApp() || (username == undefined && password == undefined)) {
|
||||
username = $("#InputEmail").val().toString().trim();
|
||||
password = $("#InputPassword").val().toString();
|
||||
remember = $("#InputRemember").prop("checked");
|
||||
}
|
||||
else {
|
||||
remember = true;
|
||||
}
|
||||
let validData = true;
|
||||
if (username == '' || username == undefined || password == '' || password == undefined)
|
||||
validData = false;
|
||||
if (validData) {
|
||||
jQuery("#BtnLogin").addClass("disabled");
|
||||
jQuery("#BtnLogin").text("Validating");
|
||||
var request = new Unibase.Platform.Membership.Requests.Login(username, password, '', remember);
|
||||
if (this._accountManager == undefined) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
}
|
||||
this._accountManager.validateLogin(request).then(function (response) {
|
||||
var identity = response.result;
|
||||
if (identity === null) {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials('', '');
|
||||
}
|
||||
MessageHelper.Instance().showError(response.message, 'validation-summary');
|
||||
jQuery("#BtnLogin").removeClass("disabled");
|
||||
jQuery("#BtnLogin").text("Login");
|
||||
}
|
||||
else {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials(username, password);
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().saveUserDevice(identity.sessionId);
|
||||
}
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
window.location.href = '#/welcome';
|
||||
if (isMobileApp()) {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials('', '');
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().redirectToLogin();
|
||||
}
|
||||
MessageHelper.Instance().showError("Mandatory fields are missing", 'validation-summary');
|
||||
}
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Compact.Components.Index_Anonymous();
|
||||
index.init(null, this.imageUrl);
|
||||
}
|
||||
const html = `<form id="Frm_Login" default="" data-validate="parsley" data-isdynamic="false"><h1 class="display-4 mb-10">Login</h1><p class="mb-30">Sign in to your account and enjoy unlimited perks.</p><div id="validation-summary"></div><div class="form-group"><input class="form-control" id="InputEmail" placeholder="Phone or Email" type="text"></div><div class="form-group mb-20"><input class="form-control" id="InputPassword" placeholder="Password" type="password" autocomplete="new-password"><span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><div class="input-group mb-20"><div class="custom-control custom-checkbox col-xs"><input class="custom-control-input" id="InputRemember" type="checkbox"><label class="custom-control-label font-14" for="InputRemember">Keep me logged in</label></div><div class="col-xs ml-auto"><p class="text-right"><a href="index.html#/forgotpassword">Forgot Password?</a></p></div></div><a class="btn btn-primary btn-block text-white disabled" id="BtnLogin">Login</a></form><div class="option-sep">or</div><div class="row"><div class="text-center col-sm-12 pa-5"> First time user, <a href="index.html#/registeruser">Click here</a></div><div class="text-center col-sm p-2"></div></div>`;
|
||||
return html;
|
||||
}
|
||||
static Instance() {
|
||||
return new MobilLogin();
|
||||
}
|
||||
}
|
||||
Components.MobilLogin = MobilLogin;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(i){class r extends n.Platform.Core.BaseComponent{jsFiles(){return["tenants/themes/compact/index.anonymous.js","platform/membership/managers/accountmanager.js","platform/membership/infos/identity.js","platform/membership/requests/login.js","platform/core/helpers/cookies/cookiehelper.js","tenants/themes/compact/components/notifications/notification.js","platform/core/enums/rowstatus.js"]}cssFiles(){return[]}load(t,i,r){this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance();n.Platform.Membership.Infos.Identity.setCurrentUser(null);var u=this;jQuery(".preloader-it").delay(500).fadeOut("slow");jQuery("#external-container").delay(500).fadeIn("slow");jQuery("#bizgaze_body").css("background-color","#f4f6f7");$("#InputEmail,#InputPassword").keypress(function(n){n.which==13&&document.getElementById("BtnLogin").click()});$("#PasswordHide").click(function(){var n=$("#InputPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#PasswordHide").toggleClass("fa-eye-slash fa-eye")});$("#btnClearcache").click(function(){isMobileApp()&&n.Platform.Helpers.MobileHelper.Instance().openSettings()});jQuery("#InputEmail,#InputPassword").on("input",function(){let n=$("#InputEmail").val().toString().trim(),t=$("#InputPassword").val(),i=!0;(n==""||n==undefined||t==""||t==undefined)&&(i=!1);i?jQuery("#BtnLogin").removeClass("disabled"):jQuery("#BtnLogin").addClass("disabled")});$(".btn-outline-secondary").addClass("hidden");jQuery("#BtnLogin").click(function(){u.validate()});r!=null&&r()}loadDomainLogo(n){this.imageUrl=n!=null&&n!=undefined&&n!=""?n:"tenants/themes/compact/imgs/bg_1.png"}validate(t,i,r){MessageHelper.Instance().hideMessage();isMobileApp()&&(t!=undefined||i!=undefined)?r=!0:(t=$("#InputEmail").val().toString().trim(),i=$("#InputPassword").val().toString(),r=$("#InputRemember").prop("checked"));let u=!0;if((t==""||t==undefined||i==""||i==undefined)&&(u=!1),u){jQuery("#BtnLogin").addClass("disabled");jQuery("#BtnLogin").text("Validating");var f=new n.Platform.Membership.Requests.Login(t,i,"",r);this._accountManager==undefined&&(this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance());this._accountManager.validateLogin(f).then(function(r){var u=r.result;u===null?(isMobileApp()&&n.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials("",""),MessageHelper.Instance().showError(r.message,"validation-summary"),jQuery("#BtnLogin").removeClass("disabled"),jQuery("#BtnLogin").text("Login")):(isMobileApp()&&(n.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials(t,i),n.Platform.Helpers.MobileHelper.Instance().saveUserDevice(u.sessionId)),n.Platform.Membership.Infos.Identity.setCurrentUser(u),window.location.href="#/welcome",isMobileApp())})}else isMobileApp()&&(n.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials("",""),n.Platform.Helpers.MobileHelper.Instance().redirectToLogin()),MessageHelper.Instance().showError("Mandatory fields are missing","validation-summary")}html(){if(jQuery("#external-form").length===0){var n=new t.Components.Index_Anonymous;n.init(null,this.imageUrl)}return`<form id="Frm_Login" default="" data-validate="parsley" data-isdynamic="false"><h1 class="display-4 mb-10">Login</h1><p class="mb-30">Sign in to your account and enjoy unlimited perks.</p><div id="validation-summary"></div><div class="form-group"><input class="form-control" id="InputEmail" placeholder="Phone or Email" type="text"></div><div class="form-group mb-20"><input class="form-control" id="InputPassword" placeholder="Password" type="password" autocomplete="new-password"><span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><div class="input-group mb-20"><div class="custom-control custom-checkbox col-xs"><input class="custom-control-input" id="InputRemember" type="checkbox"><label class="custom-control-label font-14" for="InputRemember">Keep me logged in</label></div><div class="col-xs ml-auto"><p class="text-right"><a href="index.html#/forgotpassword">Forgot Password?</a></p></div></div><a class="btn btn-primary btn-block text-white disabled" id="BtnLogin">Login</a></form><div class="option-sep">or</div><div class="row"><div class="text-center col-sm-12 pa-5"> First time user, <a href="index.html#/registeruser">Click here</a></div><div class="text-center col-sm p-2"></div></div>`}static Instance(){return new r}}i.MobilLogin=r})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,236 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class MobilDms extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
var jsfiles = ["tenants/themes/compact/index.anonymous.js", "platform/membership/managers/accountmanager.js", "platform/membership/infos/identity.js", "platform/membership/requests/login.js", "platform/core/helpers/cookies/cookiehelper.js", "tenants/themes/compact/components/notifications/notification.js", "platform/core/enums/rowstatus.js"];
|
||||
return jsfiles;
|
||||
}
|
||||
cssFiles() {
|
||||
return [];
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(null);
|
||||
var instance = this;
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#InputEmail,#InputPassword").keypress(function (e) {
|
||||
});
|
||||
$('#PasswordHide').click(function () {
|
||||
var input = $('#InputPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#PasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#btnClearcache").click(function () {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().openSettings();
|
||||
}
|
||||
});
|
||||
$("#Bizgaze_AgreeTermsServices").click(function () {
|
||||
$("#modal_termsandconditionslogin").modal("show");
|
||||
});
|
||||
jQuery("#btn_loginhelp").click(function () {
|
||||
var instance = this;
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["apps/support/components/loginhelp.component.js"], function () {
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().popin(0, "external-form", Bizgaze.Apps.Support.Components.LoginHelp.Instance(), null);
|
||||
});
|
||||
});
|
||||
jQuery("#InputEmail,#InputPassword").on("input", function (e) {
|
||||
let username = $("#InputEmail").val().toString().trim();
|
||||
let password = $("#InputPassword").val();
|
||||
let validData = true;
|
||||
if (username == '' || username == undefined || password == '' || password == undefined)
|
||||
validData = false;
|
||||
if (validData) {
|
||||
}
|
||||
else {
|
||||
}
|
||||
});
|
||||
$(".btn-outline-secondary").addClass('hidden');
|
||||
jQuery("#BtnLogin").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
if (callback != null) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
loadDomainLogo(imagerurl) {
|
||||
if (imagerurl != null && imagerurl != undefined && imagerurl != "") {
|
||||
this.imageUrl = imagerurl;
|
||||
}
|
||||
else {
|
||||
this.imageUrl = "tenants/themes/compact/imgs/bg_1.png";
|
||||
}
|
||||
}
|
||||
validate(username, password, remember) {
|
||||
MessageHelper.Instance().hideMessage();
|
||||
if (!isMobileApp() || (username == undefined && password == undefined)) {
|
||||
username = $("#InputEmail").val().toString().trim();
|
||||
password = $("#InputPassword").val().toString();
|
||||
remember = $("#InputRemember").prop("checked");
|
||||
}
|
||||
else {
|
||||
remember = true;
|
||||
}
|
||||
let validData = true;
|
||||
if (username == '' || username == undefined || password == '' || password == undefined)
|
||||
validData = false;
|
||||
var termsncond = $("#termsofservice").prop("checked");
|
||||
if (!termsncond) {
|
||||
if (!isMobileApp()) {
|
||||
validData = false;
|
||||
}
|
||||
}
|
||||
if (validData) {
|
||||
jQuery("#BtnLogin").addClass("disabled");
|
||||
jQuery("#BtnLogin").text("Validating");
|
||||
var request = new Unibase.Platform.Membership.Requests.Login(username, password, '', remember);
|
||||
if (this._accountManager == undefined) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
}
|
||||
this._accountManager.validateLogin(request).then(function (response) {
|
||||
var identity = response.result;
|
||||
if (identity === null) {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials('', '');
|
||||
}
|
||||
MessageHelper.Instance().showError(response.message, 'validation-summary');
|
||||
jQuery("#BtnLogin").removeClass("disabled");
|
||||
jQuery("#BtnLogin").text("Login");
|
||||
}
|
||||
else {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials(username, password);
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().saveUserDevice(identity.sessionId);
|
||||
}
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
window.location.href = '#/welcome';
|
||||
if (isMobileApp()) {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials('', '');
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().redirectToLogin();
|
||||
}
|
||||
if (termsncond == false) {
|
||||
MessageHelper.Instance().showError("Accept Terms of Service to proceed to log in!", 'validation-summary');
|
||||
jQuery("#BtnLogin").removeClass("disabled");
|
||||
jQuery("#BtnLogin").text("Login");
|
||||
}
|
||||
else if (validData == false)
|
||||
MessageHelper.Instance().showError("Mandatory fields are missing", 'validation-summary');
|
||||
}
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Compact.Components.Index_Anonymous();
|
||||
index.init(null, this.imageUrl);
|
||||
}
|
||||
const html = `<form id="Frm_Login" default="" data-validate="parsley" data-isdynamic="false"><h1 class="display-4 mb-10">Login</h1><p class="mb-30">Sign in to your account and enjoy unlimited perks.</p>
|
||||
<div id="validation-summary"></div><div class="form-group"><input class="form-control" id="InputEmail"placeholder="Phone or Email" type="text"></div><div class="form-group mb-20">
|
||||
<input class="form-control" id="InputPassword" placeholder="Password" type="password" autocomplete="new-password"><span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div>
|
||||
<div class="input-group mb-20">
|
||||
<div class="custom-control d-flex align-items-center custom-checkbox col-xs pl-0">
|
||||
<input name="termsofservice" id="termsofservice" type="checkbox"><p class="pl-1 font-14" style="color:#33C0FF;">Agree <a href="javascript:;" id="Bizgaze_AgreeTermsServices">Terms of Service</a></p></div>
|
||||
<div class="col-xs ml-auto"><p class="text-right"><a href="index.html#/forgotpassword">Forgot Password? </a></p></div></div>
|
||||
<a class="btn btn-primary btn-block text-white" id="BtnLogin">Login</a></form>
|
||||
<div class="d-flex justify-content-between mt-25">
|
||||
<div class="col-sm-6 pa-10">Don't have an account! <a href="index.html#/registeruser">Register</a></div>
|
||||
<div class="col-2 mt-5" id="btn_loginhelp"><a href="#" style="text-decoration:underline">Help</a></div>
|
||||
</div><div><div class="align-items-center pa-10 d-flex">
|
||||
<div id="modal_termsandconditionslogin" class="modal fade hide"><div class="modal-dialog"><div class="modal-content"><div class="modal-header py-1"><h6 class="modal-title pull-left">Terms of Use</h6><a href="javascript:void(0);" class="font-26 pull-right text-danger" data-dismiss="modal" aria-hidden="true">×</a></div>
|
||||
<div class="modal-body biz-custom-scrollbar pt-1" style="overflow-y:auto;height: 87vh;" id="div_modalbody">
|
||||
<div class="mb-25">
|
||||
<p class="lbl_content pb-1">Please read and review these Terms of Use terms and conditions (T&C) carefully before accessing or using this Distributor Management System Application (Application). By accessing or using this Application, you acknowledge that you have read, understood and agreed to the T&C. If you do not agree to the T&C, you may not access or use the Application and are advised to stop proceeding immediately. If you choose to continue, it shall be deemed that you have hereby read, understood and accepted these T&C along with the terms and conditions and privacy policy of this Application.</p>
|
||||
<p class="lbl_content py-1"><b>Meaning of Terms</b>:<br>
|
||||
The term ”DMS” refers to Distributor Management System.<br>
|
||||
The term ”ExxonMobil” refers solely and exclusively to ExxonMobil Lubricants Pvt. Ltd. , 1st Main Road, Whitefield Main Road, 5th Floor, Prestige Shantiniketan Complex Road, Bengaluru, Karnataka 560048, India and/or its successors in interest and may include its directors, employees and authorised personnel.<br>
|
||||
The term “Application” refers to DMS or any related digital or online platform built specifically for you or to which you have been given access due to and in furtherance of any contract, agreement or understanding with ExxonMobil.
|
||||
Content. The user agrees that access to and use of this Application and the content thereof is at his/her own risk. ExxonMobil shall not be liable for any damages, including without limitation, consequential, indirect, direct, incidental, arising out of access to, use of or inability to use the Application, or any errors or omissions in the content thereof. This limitation includes damages to, or for any viruses that infect your computer equipment.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Submission of Information</b><br> By submitting information via this Application:</p>
|
||||
<ul>
|
||||
<li>(a) user acknowledges that he/she is over 18 years of age, of sound mind, not a declared insolvent and have not been convicted of any offence involving moral turpitude.</li>
|
||||
|
||||
<li>(b) user warrants that he/she has all legal, moral, and other rights that may be necessary to publish the information;</li>
|
||||
|
||||
<li>(c) user acknowledges and agrees that ExxonMobil shall have the right (but not obligation), at its sole discretion, to refuse to publish or to remove or block access to any content provided at any time and for any reason, with or without notice to the user and that ExxonMobil shall the right to assimilate, collect, reproduce and use the information provided by the user in any manner we deem fit.</li>
|
||||
|
||||
<li>(d) ExxonMobil, by way of this Application, will collect your personal/business information (Name, address, ID Number, Date of Birth and your customer contact details such as Name, Contact details, Location, Organization Address) for the purpose of facilitating your registration and participation the DMS program. For avoidance of doubt, the user confirms that it has the right to provide the customer contact details.</li>
|
||||
|
||||
<li>(e) ExxonMobil can further use the collected personal/business information to update about any future promotions information related to DMS, sending Mobil product related marketing/promotional materials and to facilitate/execute marketing program redemptions. The service under Application may include certain communications from ExxonMobil, such as service announcements, administrative messages, and newsletters. You understand that these communications shall be considered part of using the Application. Use of Application. Your access to and use of the content contained in this Application is subject to the T&C. By accessing and using this Application, you accept, without limitation or qualification, these T&C.</li></ul>
|
||||
|
||||
<b>User Sign up Obligations</b>: You need to sign up for a user account by providing all required information in order to access or use the Application. If you represent an organization and wish to use the Application for corporate use, we recommend that you, sign up for user accounts by providing your corporate contact information. In particular, we recommend that you use your corporate email address. You agree to: a) provide true, accurate, current and complete information about yourself as prompted by the sign-up process; and b) maintain and promptly update the information provided during sign up to keep it true, accurate, current, and complete.
|
||||
|
||||
<p class="lbl_content py-1">Your Conduct: User agrees not to upload, transmit, post, comment, email or otherwise make available to the Application/site, any content, information or other material in any format that:</p>
|
||||
<ul>
|
||||
<li>(a) is false, inaccurate, unlawful, harmful, threatening, abusive, harassing, tortious, defamatory, vulgar, obscene, invasive of another’s privacy, libelous, hurts religious or national sentiment, against public policy and/or otherwise objectionable;</li>
|
||||
|
||||
<li>(b) contains viruses, worms, corrupted files, or any other similar software or programs designed to interrupt, destroy or limit the functionality of any computer software or hardware or telecommunications equipment.</li>
|
||||
|
||||
<li>(c) infringes any third party's intellectual property;</li>
|
||||
|
||||
<li>(d) User agrees that he/she will not transmit or access any data that infringes any patent, trademark,
|
||||
trade secret, copyright or other proprietary rights of any party</li></ul>
|
||||
|
||||
<p class="lbl_content py-1">Indemnification. User agrees to indemnify, defend and hold harmless ExxonMobil, its officers, directors, employees, agents, suppliers and third party partners from and against all losses, expenses, damages and costs, including reasonable attorneys' fee, resulting from any violation by user of these T&C.</p>
|
||||
|
||||
<p class="lbl_content py-1">Disclaimer of Warranties You expressly understand and agree that the use of the services is at your sole risk. The services are provided on an as-is-and-as-available basis.</p>
|
||||
|
||||
<p class="lbl_content py-1">ExxonMobil expressly disclaims all warranties of any kind, whether express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. ExxonMobil makes no warranty that the services will be uninterrupted, timely, secure, or error free. Use of any material downloaded or obtained through the use of the services/Application shall be at your own discretion and risk and you will be solely responsible for any damage to your computer system, mobile telephone, wireless device or data that results from the use of the services or the download of any such material.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Privacy</b>. ExxonMobil respects the privacy of its website users. Please refer to both mobil.co.in Privacy Policy and your organization's Privacy Policy, as applicable, for users' rights and responsibilities with respect to information that is disclosed on this Application. Users understand that under some limited circumstances, ExxonMobil may be required by law to disclose their personal information and any other submitted information by them. Participants thereby authorize ExxonMobil or its affiliates in this regard. Any personal data relating to entrants will be used solely in accordance with current India data protection legislation and best practice. Please see the mobil.co.in Privacy Policy for further details</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Confidential Information</b>.Subject to any applicable terms and conditions set forth in our Privacy Policy, your Privacy Policy, or any non-disclosure agreements, any communication or other material that you submit or post via this Application will not be deemed to be confidential information unless so specified by ExxonMobil in advance.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Trademarks</b>. All ExxonMobil product names, whether or not appearing in large print or with the trademark symbol, are trademarks of ExxonMobil, its affiliates, related companies or its licensors or joint venture partners, unless otherwise noted. The use or misuse of these trademarks or any other materials, except as permitted herein, is expressly prohibited and may be in violation of copyright law, trademark law, the law of privacy and publicity, and communications regulations and statutes. Please be advised that ExxonMobil actively and aggressively enforces its intellectual property rights to the fullest extent of the law. By submitting any trademarked Content via this Application, you warrant and represent that you have all legal, moral, and other rights that may be necessary to publish, republish or distribute the content and will comply to any and all trademark law with respect to that content.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Third Party Websites and Links</b>. The content in this Application may contain links or references to other websites maintained by your organization or by third parties over whom ExxonMobil has no control. ExxonMobil makes no warranties or representations of any kind as to the accuracy, currency, or completeness of any information contained in such websites and shall have no liability for any damages or injuries of any kind arising from such content or information. Inclusion of any external or third party link does not imply an endorsement or recommendation by ExxonMobil.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Copyrights</b>. The entire Contents of this Application are subject to copyright protection. Any ExxonMobil proprietary Content in this Application may not be copied other than for noncommercial individual reference with all copyright or other proprietary notices retained, and thereafter may not be recopied, reproduced or otherwise redistributed. Except as expressly provided above, you may not otherwise copy, display, download, distribute, modify, reproduce, republish or retransmit any information, text or documents contained in this Application or any portion thereof in any electronic medium or in hard copy, or create any derivative work based on such images, text or documents, without the express written consent of ExxonMobil. Nothing contained herein shall be construed as conferring by implication, estoppel or otherwise any license or right under any patent or trademark of ExxonMobil, or any third party. By submitting any copyrighted Content via this Application, you warrant and represent that you have all legal, moral, and other rights that may be necessary to publish, republish or distribute the Content and will comply to any and all copyright law with respect to that Content.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Void Where Prohibited</b>. This Application and its Contents are intended to comply with the laws and regulations in India. Although the information on this Application may be accessible to users outside of India, the information pertaining to ExxonMobil Catalog is intended for use only by residents of India. ExxonMobil reserves to right to limit provision of its products or services to any person, geographic region or jurisdiction and/or to limit the quantities or any products or services we provide. Any offer for any product or service made on this Application is void where prohibited.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Governing Laws</b>. This Terms of Use Agreement / T&C and your use of the Application shall be governed by the laws of India without regard to its conflicts of laws principles. Any legal action or proceeding related to this Application shall be brought exclusively in a court at Bangalore.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Miscellaneous</b>. If any provision of this Terms of Use Agreement/ T&C is held to be unlawful, void or unenforceable, then such provision shall be severable without affecting the enforceability of all remaining provisions. ExxonMobil reserves the right to alter or delete materials from this Application at any time at its discretion. ExxonMobil may modify the T&C at any time through a service announcement or by sending email to your primary email address.</p>
|
||||
|
||||
<p class="lbl_content py-1 pb-5">Suspension and Termination ExxonMobil may suspend your user account or temporarily disable access to whole or part of any service in the event of any suspected illegal activity, extended periods of inactivity or requests by law enforcement or other government agencies.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer fixed-bottom p-0 py-3 bg-white rounded hidden">
|
||||
<div class="input-group">
|
||||
<div class="custom-control terms-conditions custom-checkbox col-xs btn btn-outline-success btn-rounded mx-auto d-flex justify-content-center text-center w-30 my-5 py-2 font-weight-500">
|
||||
<input class="custom-control-input " id="InputTermsandConditionsAcceptlogin" type="checkbox">
|
||||
<label class="custom-control-label font-14" for="InputTermsandConditionsAcceptlogin">I Accept</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="text-center col-sm-6 pa-5 d-none">Do have an account yet? <a href="index.html#/registeruser">Register</a></div><div class="text-center col-sm p-2"></div>
|
||||
</div>`;
|
||||
return html;
|
||||
}
|
||||
static Instance() {
|
||||
return new MobilDms();
|
||||
}
|
||||
}
|
||||
Components.MobilDms = MobilDms;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+87
@@ -0,0 +1,87 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(i){class r extends n.Platform.Core.BaseComponent{jsFiles(){return["tenants/themes/compact/index.anonymous.js","platform/membership/managers/accountmanager.js","platform/membership/infos/identity.js","platform/membership/requests/login.js","platform/core/helpers/cookies/cookiehelper.js","tenants/themes/compact/components/notifications/notification.js","platform/core/enums/rowstatus.js"]}cssFiles(){return[]}load(t,i,r){this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance();n.Platform.Membership.Infos.Identity.setCurrentUser(null);var u=this;jQuery(".preloader-it").delay(500).fadeOut("slow");jQuery("#external-container").delay(500).fadeIn("slow");jQuery("#bizgaze_body").css("background-color","#f4f6f7");$("#InputEmail,#InputPassword").keypress(function(){});$("#PasswordHide").click(function(){var n=$("#InputPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#PasswordHide").toggleClass("fa-eye-slash fa-eye")});$("#btnClearcache").click(function(){isMobileApp()&&n.Platform.Helpers.MobileHelper.Instance().openSettings()});$("#Bizgaze_AgreeTermsServices").click(function(){$("#modal_termsandconditionslogin").modal("show")});jQuery("#btn_loginhelp").click(function(){var t=this;n.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["apps/support/components/loginhelp.component.js"],function(){n.Platform.Helpers.NavigationHelper.Instance().popin(0,"external-form",Bizgaze.Apps.Support.Components.LoginHelp.Instance(),null)})});jQuery("#InputEmail,#InputPassword").on("input",function(){let n=$("#InputEmail").val().toString().trim(),t=$("#InputPassword").val(),i=!0;(n==""||n==undefined||t==""||t==undefined)&&(i=!1);i});$(".btn-outline-secondary").addClass("hidden");jQuery("#BtnLogin").click(function(){u.validate()});r!=null&&r()}loadDomainLogo(n){this.imageUrl=n!=null&&n!=undefined&&n!=""?n:"tenants/themes/compact/imgs/bg_1.png"}validate(t,i,r){var f,e;MessageHelper.Instance().hideMessage();isMobileApp()&&(t!=undefined||i!=undefined)?r=!0:(t=$("#InputEmail").val().toString().trim(),i=$("#InputPassword").val().toString(),r=$("#InputRemember").prop("checked"));let u=!0;(t==""||t==undefined||i==""||i==undefined)&&(u=!1);f=$("#termsofservice").prop("checked");f||isMobileApp()||(u=!1);u?(jQuery("#BtnLogin").addClass("disabled"),jQuery("#BtnLogin").text("Validating"),e=new n.Platform.Membership.Requests.Login(t,i,"",r),this._accountManager==undefined&&(this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance()),this._accountManager.validateLogin(e).then(function(r){var u=r.result;u===null?(isMobileApp()&&n.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials("",""),MessageHelper.Instance().showError(r.message,"validation-summary"),jQuery("#BtnLogin").removeClass("disabled"),jQuery("#BtnLogin").text("Login")):(isMobileApp()&&(n.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials(t,i),n.Platform.Helpers.MobileHelper.Instance().saveUserDevice(u.sessionId)),n.Platform.Membership.Infos.Identity.setCurrentUser(u),window.location.href="#/welcome",isMobileApp())})):(isMobileApp()&&(n.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials("",""),n.Platform.Helpers.MobileHelper.Instance().redirectToLogin()),f==!1?(MessageHelper.Instance().showError("Accept Terms of Service to proceed to log in!","validation-summary"),jQuery("#BtnLogin").removeClass("disabled"),jQuery("#BtnLogin").text("Login")):u==!1&&MessageHelper.Instance().showError("Mandatory fields are missing","validation-summary"))}html(){if(jQuery("#external-form").length===0){var n=new t.Components.Index_Anonymous;n.init(null,this.imageUrl)}return`<form id="Frm_Login" default="" data-validate="parsley" data-isdynamic="false"><h1 class="display-4 mb-10">Login</h1><p class="mb-30">Sign in to your account and enjoy unlimited perks.</p>
|
||||
<div id="validation-summary"></div><div class="form-group"><input class="form-control" id="InputEmail"placeholder="Phone or Email" type="text"></div><div class="form-group mb-20">
|
||||
<input class="form-control" id="InputPassword" placeholder="Password" type="password" autocomplete="new-password"><span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div>
|
||||
<div class="input-group mb-20">
|
||||
<div class="custom-control d-flex align-items-center custom-checkbox col-xs pl-0">
|
||||
<input name="termsofservice" id="termsofservice" type="checkbox"><p class="pl-1 font-14" style="color:#33C0FF;">Agree <a href="javascript:;" id="Bizgaze_AgreeTermsServices">Terms of Service</a></p></div>
|
||||
<div class="col-xs ml-auto"><p class="text-right"><a href="index.html#/forgotpassword">Forgot Password? </a></p></div></div>
|
||||
<a class="btn btn-primary btn-block text-white" id="BtnLogin">Login</a></form>
|
||||
<div class="d-flex justify-content-between mt-25">
|
||||
<div class="col-sm-6 pa-10">Don't have an account! <a href="index.html#/registeruser">Register</a></div>
|
||||
<div class="col-2 mt-5" id="btn_loginhelp"><a href="#" style="text-decoration:underline">Help</a></div>
|
||||
</div><div><div class="align-items-center pa-10 d-flex">
|
||||
<div id="modal_termsandconditionslogin" class="modal fade hide"><div class="modal-dialog"><div class="modal-content"><div class="modal-header py-1"><h6 class="modal-title pull-left">Terms of Use</h6><a href="javascript:void(0);" class="font-26 pull-right text-danger" data-dismiss="modal" aria-hidden="true">×</a></div>
|
||||
<div class="modal-body biz-custom-scrollbar pt-1" style="overflow-y:auto;height: 87vh;" id="div_modalbody">
|
||||
<div class="mb-25">
|
||||
<p class="lbl_content pb-1">Please read and review these Terms of Use terms and conditions (T&C) carefully before accessing or using this Distributor Management System Application (Application). By accessing or using this Application, you acknowledge that you have read, understood and agreed to the T&C. If you do not agree to the T&C, you may not access or use the Application and are advised to stop proceeding immediately. If you choose to continue, it shall be deemed that you have hereby read, understood and accepted these T&C along with the terms and conditions and privacy policy of this Application.</p>
|
||||
<p class="lbl_content py-1"><b>Meaning of Terms</b>:<br>
|
||||
The term ”DMS” refers to Distributor Management System.<br>
|
||||
The term ”ExxonMobil” refers solely and exclusively to ExxonMobil Lubricants Pvt. Ltd. , 1st Main Road, Whitefield Main Road, 5th Floor, Prestige Shantiniketan Complex Road, Bengaluru, Karnataka 560048, India and/or its successors in interest and may include its directors, employees and authorised personnel.<br>
|
||||
The term “Application” refers to DMS or any related digital or online platform built specifically for you or to which you have been given access due to and in furtherance of any contract, agreement or understanding with ExxonMobil.
|
||||
Content. The user agrees that access to and use of this Application and the content thereof is at his/her own risk. ExxonMobil shall not be liable for any damages, including without limitation, consequential, indirect, direct, incidental, arising out of access to, use of or inability to use the Application, or any errors or omissions in the content thereof. This limitation includes damages to, or for any viruses that infect your computer equipment.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Submission of Information</b><br> By submitting information via this Application:</p>
|
||||
<ul>
|
||||
<li>(a) user acknowledges that he/she is over 18 years of age, of sound mind, not a declared insolvent and have not been convicted of any offence involving moral turpitude.</li>
|
||||
|
||||
<li>(b) user warrants that he/she has all legal, moral, and other rights that may be necessary to publish the information;</li>
|
||||
|
||||
<li>(c) user acknowledges and agrees that ExxonMobil shall have the right (but not obligation), at its sole discretion, to refuse to publish or to remove or block access to any content provided at any time and for any reason, with or without notice to the user and that ExxonMobil shall the right to assimilate, collect, reproduce and use the information provided by the user in any manner we deem fit.</li>
|
||||
|
||||
<li>(d) ExxonMobil, by way of this Application, will collect your personal/business information (Name, address, ID Number, Date of Birth and your customer contact details such as Name, Contact details, Location, Organization Address) for the purpose of facilitating your registration and participation the DMS program. For avoidance of doubt, the user confirms that it has the right to provide the customer contact details.</li>
|
||||
|
||||
<li>(e) ExxonMobil can further use the collected personal/business information to update about any future promotions information related to DMS, sending Mobil product related marketing/promotional materials and to facilitate/execute marketing program redemptions. The service under Application may include certain communications from ExxonMobil, such as service announcements, administrative messages, and newsletters. You understand that these communications shall be considered part of using the Application. Use of Application. Your access to and use of the content contained in this Application is subject to the T&C. By accessing and using this Application, you accept, without limitation or qualification, these T&C.</li></ul>
|
||||
|
||||
<b>User Sign up Obligations</b>: You need to sign up for a user account by providing all required information in order to access or use the Application. If you represent an organization and wish to use the Application for corporate use, we recommend that you, sign up for user accounts by providing your corporate contact information. In particular, we recommend that you use your corporate email address. You agree to: a) provide true, accurate, current and complete information about yourself as prompted by the sign-up process; and b) maintain and promptly update the information provided during sign up to keep it true, accurate, current, and complete.
|
||||
|
||||
<p class="lbl_content py-1">Your Conduct: User agrees not to upload, transmit, post, comment, email or otherwise make available to the Application/site, any content, information or other material in any format that:</p>
|
||||
<ul>
|
||||
<li>(a) is false, inaccurate, unlawful, harmful, threatening, abusive, harassing, tortious, defamatory, vulgar, obscene, invasive of another’s privacy, libelous, hurts religious or national sentiment, against public policy and/or otherwise objectionable;</li>
|
||||
|
||||
<li>(b) contains viruses, worms, corrupted files, or any other similar software or programs designed to interrupt, destroy or limit the functionality of any computer software or hardware or telecommunications equipment.</li>
|
||||
|
||||
<li>(c) infringes any third party's intellectual property;</li>
|
||||
|
||||
<li>(d) User agrees that he/she will not transmit or access any data that infringes any patent, trademark,
|
||||
trade secret, copyright or other proprietary rights of any party</li></ul>
|
||||
|
||||
<p class="lbl_content py-1">Indemnification. User agrees to indemnify, defend and hold harmless ExxonMobil, its officers, directors, employees, agents, suppliers and third party partners from and against all losses, expenses, damages and costs, including reasonable attorneys' fee, resulting from any violation by user of these T&C.</p>
|
||||
|
||||
<p class="lbl_content py-1">Disclaimer of Warranties You expressly understand and agree that the use of the services is at your sole risk. The services are provided on an as-is-and-as-available basis.</p>
|
||||
|
||||
<p class="lbl_content py-1">ExxonMobil expressly disclaims all warranties of any kind, whether express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. ExxonMobil makes no warranty that the services will be uninterrupted, timely, secure, or error free. Use of any material downloaded or obtained through the use of the services/Application shall be at your own discretion and risk and you will be solely responsible for any damage to your computer system, mobile telephone, wireless device or data that results from the use of the services or the download of any such material.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Privacy</b>. ExxonMobil respects the privacy of its website users. Please refer to both mobil.co.in Privacy Policy and your organization's Privacy Policy, as applicable, for users' rights and responsibilities with respect to information that is disclosed on this Application. Users understand that under some limited circumstances, ExxonMobil may be required by law to disclose their personal information and any other submitted information by them. Participants thereby authorize ExxonMobil or its affiliates in this regard. Any personal data relating to entrants will be used solely in accordance with current India data protection legislation and best practice. Please see the mobil.co.in Privacy Policy for further details</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Confidential Information</b>.Subject to any applicable terms and conditions set forth in our Privacy Policy, your Privacy Policy, or any non-disclosure agreements, any communication or other material that you submit or post via this Application will not be deemed to be confidential information unless so specified by ExxonMobil in advance.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Trademarks</b>. All ExxonMobil product names, whether or not appearing in large print or with the trademark symbol, are trademarks of ExxonMobil, its affiliates, related companies or its licensors or joint venture partners, unless otherwise noted. The use or misuse of these trademarks or any other materials, except as permitted herein, is expressly prohibited and may be in violation of copyright law, trademark law, the law of privacy and publicity, and communications regulations and statutes. Please be advised that ExxonMobil actively and aggressively enforces its intellectual property rights to the fullest extent of the law. By submitting any trademarked Content via this Application, you warrant and represent that you have all legal, moral, and other rights that may be necessary to publish, republish or distribute the content and will comply to any and all trademark law with respect to that content.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Third Party Websites and Links</b>. The content in this Application may contain links or references to other websites maintained by your organization or by third parties over whom ExxonMobil has no control. ExxonMobil makes no warranties or representations of any kind as to the accuracy, currency, or completeness of any information contained in such websites and shall have no liability for any damages or injuries of any kind arising from such content or information. Inclusion of any external or third party link does not imply an endorsement or recommendation by ExxonMobil.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Copyrights</b>. The entire Contents of this Application are subject to copyright protection. Any ExxonMobil proprietary Content in this Application may not be copied other than for noncommercial individual reference with all copyright or other proprietary notices retained, and thereafter may not be recopied, reproduced or otherwise redistributed. Except as expressly provided above, you may not otherwise copy, display, download, distribute, modify, reproduce, republish or retransmit any information, text or documents contained in this Application or any portion thereof in any electronic medium or in hard copy, or create any derivative work based on such images, text or documents, without the express written consent of ExxonMobil. Nothing contained herein shall be construed as conferring by implication, estoppel or otherwise any license or right under any patent or trademark of ExxonMobil, or any third party. By submitting any copyrighted Content via this Application, you warrant and represent that you have all legal, moral, and other rights that may be necessary to publish, republish or distribute the Content and will comply to any and all copyright law with respect to that Content.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Void Where Prohibited</b>. This Application and its Contents are intended to comply with the laws and regulations in India. Although the information on this Application may be accessible to users outside of India, the information pertaining to ExxonMobil Catalog is intended for use only by residents of India. ExxonMobil reserves to right to limit provision of its products or services to any person, geographic region or jurisdiction and/or to limit the quantities or any products or services we provide. Any offer for any product or service made on this Application is void where prohibited.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Governing Laws</b>. This Terms of Use Agreement / T&C and your use of the Application shall be governed by the laws of India without regard to its conflicts of laws principles. Any legal action or proceeding related to this Application shall be brought exclusively in a court at Bangalore.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Miscellaneous</b>. If any provision of this Terms of Use Agreement/ T&C is held to be unlawful, void or unenforceable, then such provision shall be severable without affecting the enforceability of all remaining provisions. ExxonMobil reserves the right to alter or delete materials from this Application at any time at its discretion. ExxonMobil may modify the T&C at any time through a service announcement or by sending email to your primary email address.</p>
|
||||
|
||||
<p class="lbl_content py-1 pb-5">Suspension and Termination ExxonMobil may suspend your user account or temporarily disable access to whole or part of any service in the event of any suspected illegal activity, extended periods of inactivity or requests by law enforcement or other government agencies.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer fixed-bottom p-0 py-3 bg-white rounded hidden">
|
||||
<div class="input-group">
|
||||
<div class="custom-control terms-conditions custom-checkbox col-xs btn btn-outline-success btn-rounded mx-auto d-flex justify-content-center text-center w-30 my-5 py-2 font-weight-500">
|
||||
<input class="custom-control-input " id="InputTermsandConditionsAcceptlogin" type="checkbox">
|
||||
<label class="custom-control-label font-14" for="InputTermsandConditionsAcceptlogin">I Accept</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="text-center col-sm-6 pa-5 d-none">Do have an account yet? <a href="index.html#/registeruser">Register</a></div><div class="text-center col-sm p-2"></div>
|
||||
</div>`}static Instance(){return new r}}i.MobilDms=r})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,189 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class MobilNewLogin extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
var jsfiles = ["tenants/themes/compact/index.mobil_anonymous.js", "platform/membership/managers/accountmanager.js", "platform/membership/infos/identity.js", "platform/membership/requests/login.js", "platform/core/helpers/cookies/cookiehelper.js", "tenants/themes/compact/components/notifications/notification.js", "platform/core/enums/rowstatus.js"];
|
||||
return jsfiles;
|
||||
}
|
||||
cssFiles() {
|
||||
return [];
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(null);
|
||||
var instance = this;
|
||||
$('#BtnLogin_nav').click(function () {
|
||||
$('.first-display').addClass('d-none');
|
||||
$('.login-display').removeClass('d-none');
|
||||
});
|
||||
$('.back-btn').click(function () {
|
||||
$('.first-display').removeClass('d-none');
|
||||
$('.login-display').addClass('d-none');
|
||||
});
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#InputEmail,#InputPassword").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("BtnLogin").click();
|
||||
});
|
||||
$('#PasswordHide').click(function () {
|
||||
var input = $('#InputPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#PasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#btnClearcache").click(function () {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().openSettings();
|
||||
}
|
||||
});
|
||||
jQuery("#InputEmail,#InputPassword").on("input", function () {
|
||||
let username = $("#InputEmail").val().toString().trim();
|
||||
let password = $("#InputPassword").val();
|
||||
let validData = true;
|
||||
if (username == '' || username == undefined || password == '' || password == undefined)
|
||||
validData = false;
|
||||
if (validData) {
|
||||
jQuery("#BtnLogin").removeClass("disabled");
|
||||
}
|
||||
else {
|
||||
jQuery("#BtnLogin").addClass("disabled");
|
||||
}
|
||||
});
|
||||
$(".btn-outline-secondary").addClass('hidden');
|
||||
jQuery("#BtnLogin").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
if (callback != null) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
loadDomainLogo(imagerurl) {
|
||||
if (imagerurl != null && imagerurl != undefined && imagerurl != "") {
|
||||
this.imageUrl = imagerurl;
|
||||
}
|
||||
else {
|
||||
this.imageUrl = "tenants/themes/compact/imgs/bg_1.png";
|
||||
}
|
||||
}
|
||||
validate(username, password, remember) {
|
||||
MessageHelper.Instance().hideMessage();
|
||||
if (!isMobileApp() || (username == undefined && password == undefined)) {
|
||||
username = $("#InputEmail").val().toString().trim();
|
||||
password = $("#InputPassword").val().toString();
|
||||
remember = $("#InputRemember").prop("checked");
|
||||
}
|
||||
else {
|
||||
remember = true;
|
||||
}
|
||||
let validData = true;
|
||||
if (username == '' || username == undefined || password == '' || password == undefined)
|
||||
validData = false;
|
||||
if (validData) {
|
||||
jQuery("#BtnLogin").addClass("disabled");
|
||||
jQuery("#BtnLogin").text("Validating");
|
||||
var request = new Unibase.Platform.Membership.Requests.Login(username, password, '', remember);
|
||||
if (this._accountManager == undefined) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
}
|
||||
this._accountManager.validateLogin(request).then(function (response) {
|
||||
var identity = response.result;
|
||||
if (identity === null) {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials('', '');
|
||||
}
|
||||
MessageHelper.Instance().showError(response.message, 'validation-summary');
|
||||
jQuery("#BtnLogin").removeClass("disabled");
|
||||
jQuery("#BtnLogin").text("Login");
|
||||
}
|
||||
else {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials(username, password);
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().saveUserDevice(identity.sessionId);
|
||||
}
|
||||
Unibase.Platform.Membership.Infos.Identity.setCurrentUser(identity);
|
||||
window.location.href = '#/welcome';
|
||||
if (isMobileApp()) {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (isMobileApp()) {
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials('', '');
|
||||
Unibase.Platform.Helpers.MobileHelper.Instance().redirectToLogin();
|
||||
}
|
||||
MessageHelper.Instance().showError("Mandatory fields are missing", 'validation-summary');
|
||||
}
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Compact.Components.Index_Mobil_Anonymous();
|
||||
index.init(null, this.imageUrl);
|
||||
}
|
||||
let html = '';
|
||||
if (($(window).width()) > 1200) {
|
||||
html += `<div class="row h-100"><div class="col-xl-5"><div class="banner-img-container h-100"><img src="tenants/themes/compact/imgs/mobil-desktop-view-bg.png" alt="img" class="h-100 w-100 "> </div></div><div class="col-xl-7 desktop-view"><form id="Frm_Login" default="" data-validate="parsley" data-isdynamic="false"><h1 class="display-4 mb-10">Login</h1><p class="mb-30">Sign in to your account and enjoy unlimited perks.</p><div id="validation-summary"></div><div class="form-group"><input class="form-control" id="InputEmail" placeholder="Phone or Email" type="text"></div><div class="form-group mb-20"><input class="form-control" id="InputPassword" placeholder="Password" type="password" autocomplete="new-password"><span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><div class="input-group mb-20"><div class="custom-control custom-checkbox col-xs"><input class="custom-control-input" id="InputRemember" type="checkbox"><label class="custom-control-label font-14" for="InputRemember">Keep me logged in</label></div><div class="col-xs ml-auto"><p class="text-right"><a href="index.html#/forgotpassword">Forgot Password?</a></p></div></div><a class="btn btn-block text-white disabled" id="BtnLogin" style="background:#001F5D;">Login</a></form><div class="option-sep">or</div><div class="row"><div class="text-center col-sm-12 pa-5">Don't have an account? <a href="index.html#/registeruser">Register</a></div></div></div></div>`;
|
||||
}
|
||||
else {
|
||||
html = `<div class="">
|
||||
<form id="Frm_navgator" default="" class="p-4 first-display" data - validate="parsley" data - isdynamic="false" >
|
||||
<div class="d-flex flex-column h-100 justify-content-around p-3">
|
||||
<div class="logo_img mx-auto "> <img src="tenants/themes/compact/imgs/mobil-logo.png" class="img-fluid w-60">
|
||||
<h5 class="text-white font-weight-bold"> Connect </h5>
|
||||
</div>
|
||||
<div>
|
||||
<div class="footer-login ">
|
||||
<div class="mb-25"> <a class="btn btn-block rounded-10 text-white w-70 mx-auto shadow-lg-blue" style="background:#001F5D ;padding: 10px !important;" id="BtnLogin_nav"> Login </a></div>
|
||||
<div class="mb-25 "> <a class="btn btn-block rounded-10 border w-70 mx-auto bg-white text-dark" href="${_appsettings.server_url()}/index.html#/registeruser" style="padding: 10px !important;" id="RegisterLogin"> Register </a></div>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="">
|
||||
<form id="Frm_Login" default="" class="p-4 d-none login-display" data - validate="parsley" data - isdynamic="false" >
|
||||
<div class=" text-left">
|
||||
<a class="text-secondary mr-auto mt-25p back-btn"> <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="#ffff" class="bi bi-arrow-left" viewBox="0 0 16 16"> <path fill - rule="evenodd" d = "M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z" /> </svg></a>
|
||||
</div>
|
||||
<div id="validation-summary" class="position-fixed w-85"> </div>
|
||||
<div class="d-flex flex-column h-100 justify-content-around p-3">
|
||||
<div class="logo_img mx-auto"> <img src="tenants/themes/compact/imgs/mobil-logo.png" class="img-fluid w-40">
|
||||
<h5 class="text-white font-weight- bold"> Connect </h5>
|
||||
</div>
|
||||
<div>
|
||||
<div class="form-group"> <input class="form-control login-input bg-white" id="InputEmail" placeholder="Phone or Email" type="text"></div>
|
||||
<div class="form-group mb-20"> <input class="form-control login-input" id="InputPassword" placeholder="Password" type="password" autocomplete="new- password"> <span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span> </div>
|
||||
<div class="input-group mb-20">
|
||||
<div class="col-xs mx-auto">
|
||||
<p class="text-center ">
|
||||
<a class="text-white" href="${_appsettings.server_url()} /index.html#/forgotpassword"> <small class="font-11"> Forgot Password ? </small></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-login">
|
||||
<div class="mb-25"> <a class="btn btn-block rounded-10 text-white w-70 mx-auto shadow-lg-blue" style="background:#001F5D; padding: 10px!important;" id="BtnLogin"> Login </a></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>`;
|
||||
}
|
||||
return html;
|
||||
}
|
||||
static Instance() {
|
||||
return new MobilNewLogin();
|
||||
}
|
||||
}
|
||||
Components.MobilNewLogin = MobilNewLogin;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+43
@@ -0,0 +1,43 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(i){class r extends n.Platform.Core.BaseComponent{jsFiles(){return["tenants/themes/compact/index.mobil_anonymous.js","platform/membership/managers/accountmanager.js","platform/membership/infos/identity.js","platform/membership/requests/login.js","platform/core/helpers/cookies/cookiehelper.js","tenants/themes/compact/components/notifications/notification.js","platform/core/enums/rowstatus.js"]}cssFiles(){return[]}load(t,i,r){this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance();n.Platform.Membership.Infos.Identity.setCurrentUser(null);var u=this;$("#BtnLogin_nav").click(function(){$(".first-display").addClass("d-none");$(".login-display").removeClass("d-none")});$(".back-btn").click(function(){$(".first-display").removeClass("d-none");$(".login-display").addClass("d-none")});jQuery(".preloader-it").delay(500).fadeOut("slow");jQuery("#external-container").delay(500).fadeIn("slow");jQuery("#bizgaze_body").css("background-color","#f4f6f7");$("#InputEmail,#InputPassword").keypress(function(n){n.which==13&&document.getElementById("BtnLogin").click()});$("#PasswordHide").click(function(){var n=$("#InputPassword");n.attr("type")=="password"?n.attr("type","text"):n.attr("type","password");$("#PasswordHide").toggleClass("fa-eye-slash fa-eye")});$("#btnClearcache").click(function(){isMobileApp()&&n.Platform.Helpers.MobileHelper.Instance().openSettings()});jQuery("#InputEmail,#InputPassword").on("input",function(){let n=$("#InputEmail").val().toString().trim(),t=$("#InputPassword").val(),i=!0;(n==""||n==undefined||t==""||t==undefined)&&(i=!1);i?jQuery("#BtnLogin").removeClass("disabled"):jQuery("#BtnLogin").addClass("disabled")});$(".btn-outline-secondary").addClass("hidden");jQuery("#BtnLogin").click(function(){u.validate()});r!=null&&r()}loadDomainLogo(n){this.imageUrl=n!=null&&n!=undefined&&n!=""?n:"tenants/themes/compact/imgs/bg_1.png"}validate(t,i,r){MessageHelper.Instance().hideMessage();isMobileApp()&&(t!=undefined||i!=undefined)?r=!0:(t=$("#InputEmail").val().toString().trim(),i=$("#InputPassword").val().toString(),r=$("#InputRemember").prop("checked"));let u=!0;if((t==""||t==undefined||i==""||i==undefined)&&(u=!1),u){jQuery("#BtnLogin").addClass("disabled");jQuery("#BtnLogin").text("Validating");var f=new n.Platform.Membership.Requests.Login(t,i,"",r);this._accountManager==undefined&&(this._accountManager=n.Platform.Membership.Managers.AccountManager.Instance());this._accountManager.validateLogin(f).then(function(r){var u=r.result;u===null?(isMobileApp()&&n.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials("",""),MessageHelper.Instance().showError(r.message,"validation-summary"),jQuery("#BtnLogin").removeClass("disabled"),jQuery("#BtnLogin").text("Login")):(isMobileApp()&&(n.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials(t,i),n.Platform.Helpers.MobileHelper.Instance().saveUserDevice(u.sessionId)),n.Platform.Membership.Infos.Identity.setCurrentUser(u),window.location.href="#/welcome",isMobileApp())})}else isMobileApp()&&(n.Platform.Helpers.MobileHelper.Instance().cacheUserCredantials("",""),n.Platform.Helpers.MobileHelper.Instance().redirectToLogin()),MessageHelper.Instance().showError("Mandatory fields are missing","validation-summary")}html(){if(jQuery("#external-form").length===0){var i=new t.Components.Index_Mobil_Anonymous;i.init(null,this.imageUrl)}let n="";return $(window).width()>1200?n+=`<div class="row h-100"><div class="col-xl-5"><div class="banner-img-container h-100"><img src="tenants/themes/compact/imgs/mobil-desktop-view-bg.png" alt="img" class="h-100 w-100 "> </div></div><div class="col-xl-7 desktop-view"><form id="Frm_Login" default="" data-validate="parsley" data-isdynamic="false"><h1 class="display-4 mb-10">Login</h1><p class="mb-30">Sign in to your account and enjoy unlimited perks.</p><div id="validation-summary"></div><div class="form-group"><input class="form-control" id="InputEmail" placeholder="Phone or Email" type="text"></div><div class="form-group mb-20"><input class="form-control" id="InputPassword" placeholder="Password" type="password" autocomplete="new-password"><span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><div class="input-group mb-20"><div class="custom-control custom-checkbox col-xs"><input class="custom-control-input" id="InputRemember" type="checkbox"><label class="custom-control-label font-14" for="InputRemember">Keep me logged in</label></div><div class="col-xs ml-auto"><p class="text-right"><a href="index.html#/forgotpassword">Forgot Password?</a></p></div></div><a class="btn btn-block text-white disabled" id="BtnLogin" style="background:#001F5D;">Login</a></form><div class="option-sep">or</div><div class="row"><div class="text-center col-sm-12 pa-5">Don't have an account? <a href="index.html#/registeruser">Register</a></div></div></div></div>`:n=`<div class="">
|
||||
<form id="Frm_navgator" default="" class="p-4 first-display" data - validate="parsley" data - isdynamic="false" >
|
||||
<div class="d-flex flex-column h-100 justify-content-around p-3">
|
||||
<div class="logo_img mx-auto "> <img src="tenants/themes/compact/imgs/mobil-logo.png" class="img-fluid w-60">
|
||||
<h5 class="text-white font-weight-bold"> Connect </h5>
|
||||
</div>
|
||||
<div>
|
||||
<div class="footer-login ">
|
||||
<div class="mb-25"> <a class="btn btn-block rounded-10 text-white w-70 mx-auto shadow-lg-blue" style="background:#001F5D ;padding: 10px !important;" id="BtnLogin_nav"> Login </a></div>
|
||||
<div class="mb-25 "> <a class="btn btn-block rounded-10 border w-70 mx-auto bg-white text-dark" href="${_appsettings.server_url()}/index.html#/registeruser" style="padding: 10px !important;" id="RegisterLogin"> Register </a></div>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="">
|
||||
<form id="Frm_Login" default="" class="p-4 d-none login-display" data - validate="parsley" data - isdynamic="false" >
|
||||
<div class=" text-left">
|
||||
<a class="text-secondary mr-auto mt-25p back-btn"> <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" fill="#ffff" class="bi bi-arrow-left" viewBox="0 0 16 16"> <path fill - rule="evenodd" d = "M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z" /> </svg></a>
|
||||
</div>
|
||||
<div id="validation-summary" class="position-fixed w-85"> </div>
|
||||
<div class="d-flex flex-column h-100 justify-content-around p-3">
|
||||
<div class="logo_img mx-auto"> <img src="tenants/themes/compact/imgs/mobil-logo.png" class="img-fluid w-40">
|
||||
<h5 class="text-white font-weight- bold"> Connect </h5>
|
||||
</div>
|
||||
<div>
|
||||
<div class="form-group"> <input class="form-control login-input bg-white" id="InputEmail" placeholder="Phone or Email" type="text"></div>
|
||||
<div class="form-group mb-20"> <input class="form-control login-input" id="InputPassword" placeholder="Password" type="password" autocomplete="new- password"> <span toggle="#InputPassword" id="PasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span> </div>
|
||||
<div class="input-group mb-20">
|
||||
<div class="col-xs mx-auto">
|
||||
<p class="text-center ">
|
||||
<a class="text-white" href="${_appsettings.server_url()} /index.html#/forgotpassword"> <small class="font-11"> Forgot Password ? </small></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-login">
|
||||
<div class="mb-25"> <a class="btn btn-block rounded-10 text-white w-70 mx-auto shadow-lg-blue" style="background:#001F5D; padding: 10px!important;" id="BtnLogin"> Login </a></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>`,n}static Instance(){return new r}}i.MobilNewLogin=r})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+462
File diff suppressed because one or more lines are too long
@@ -0,0 +1,20 @@
|
||||
|
||||
#layout-nav .bl-nav-small {
|
||||
width: 50px;
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
#reportdatepicker {
|
||||
/*right: auto !important;
|
||||
top: 213px !important;
|
||||
right: 20px !important;*/
|
||||
z-index: 99999;
|
||||
}
|
||||
/*.hk-wrapper.hk-vertical-nav .hk-nav{
|
||||
left:54px;
|
||||
}
|
||||
.hk-wrapper.hk-vertical-nav .hk-pg-wrapper{
|
||||
margin-left:294px;
|
||||
}*/
|
||||
@@ -0,0 +1,370 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class Nav_Template {
|
||||
DashboardGroupsTemplate() {
|
||||
let html = `<li class="nav-item li-dashboard-item liDashboardGroup_{{DashboardGroupId}}" id="liDashboardGroup_{{DashboardGroupId}}">
|
||||
<a class="nav-link nav-hover-link" href ="javascript:void(0);" onclick = "javascript:Unibase.Themes.Compact.Components.Nav.Instance().loadDashboardsInDashboard({{DashboardGroupId}},0,'true');"><span class="text-truncate">{{DashboardGroupName}}</span></a>
|
||||
<div class='dashboard_active_group_id d-none' data-value ='{{DashboardGroupId}}'></div><div class="dashboard_active_group_name d-none" data-value='{{DashboardGroupName}}'></div>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
DashboardGroupsTemplate2() {
|
||||
let html = `<li class="nav-item li-dashboard-item liDashboardGroup_{{DashboardGroupId}} mega-nav-li-list" id="liDashboardGroup_{{DashboardGroupId}}"><a class="nav-link nav-hover-link mega-sub-head-nav-link" href="javascript:;" onclick = "javascript:Unibase.Themes.Compact.Components.Nav.Instance().loadDashboardsInDashboard({{DashboardGroupId}},0,'true');"><span class="text-truncate">{{DashboardGroupName}}</span></a> <div class='dashboard_active_group_id d-none' data-value ='{{DashboardGroupId}}'></div><div class="dashboard_active_group_name d-none" data-value='{{DashboardGroupName}}'></div><ul class="flex-column dashboard-drp-{{DashboardGroupId}} w-100 drp-list" id="dashboard-drp-{{DashboardGroupId}}"></ul></li> `;
|
||||
return html;
|
||||
}
|
||||
DashboardGroupsTemplate3() {
|
||||
let html = `<li class="li-dashboard-item col-lg-4 col-md-6 px-0 px-sm-10 mb-5 liDashboardGroup_{{DashboardGroupId}}" id="liDashboardGroup_{{DashboardGroupId}}">
|
||||
<a class="dropdown-item text-truncate" href="javascript:;" onclick="Unibase.Themes.Compact.Components.Nav.Instance().loadDashboardsInDashboard({{DashboardGroupId}},0,'true');">{{DashboardGroupName}}</a>
|
||||
<div class='dashboard_active_group_id d-none' data-value ='{{DashboardGroupId}}'></div><div class="dashboard_active_group_name d-none" data-value='{{DashboardGroupName}}'></div>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
DashboardGroupsTemplate4() {
|
||||
let html = `<li class="nav-item li-dashboard-item layout-4 collapsed liDashboardGroup_{{DashboardGroupId}}" id="liDashboardGroup_{{DashboardGroupId}}"><a class="nav-link nav-hover-link mega-sub-head-nav-link" href="javascript:void(0);" data-toggle="collapse" data-target="#dashboard-drp-{{DashboardGroupId}}" aria-expanded="false"><span class="text-truncate mr-10">{{DashboardGroupName}}</span></a><ul class="flex-column collapse collapse-level-1 dashboard-drp-{{DashboardGroupId}} w-100 drp-list" id="dashboard-drp-{{DashboardGroupId}}" name={{DashboardGroupId}} data-parent="#dash_drp"><li class="lidashboardgrp-item hidden" id="lidashboardGroup_{{DashboardGroupId}}_item"></li></ul></li>`;
|
||||
return html;
|
||||
}
|
||||
UnGroupedDashboards() {
|
||||
let html = `<li class="nav-item" id="liDashboardUnGroup_{{DashboardGroupId}}">
|
||||
<a class="nav-link" href="javascript:void(0);" onclick="javascript:Unibase.Themes.Compact.Components.Nav.Instance().loadDashboard({{DashboardId}},\'{{DashboardName}}\');"
|
||||
data-target="#group-drp-{{DashboardId}}1" aria-expanded="false">
|
||||
<span>{{DashboardName}}</span></a>
|
||||
<ul class="nav flex-column collapse collapse-level-1 group-drp-{{DashboardId}}"
|
||||
id="group-drp-{{DashboardId}}" name={{DashboardId}}><li class="ligrp-item hidden"></li></ul></li>`;
|
||||
return html;
|
||||
}
|
||||
DashboardsTemplate() {
|
||||
let html = `<li id='{{DashboardId}}' class="nav-item ligrp-item ligrp-addeditem UlItem_{{DashboardId}}"
|
||||
Dashboardindex="{{DashboardIndex}}"><input type="hidden" id="hf_Dashboard_DashboardId"
|
||||
value="{{DashboardId}}"><input type="hidden" id="hf_Dashboard_DashboardName" data-Dashboardname="{{DashboardName}}" value="{{DashboardName}}">
|
||||
<a href="javascript:;" class="nav-link" data-Dashboardname="{{DashboardName}}" onclick="javascript:Unibase.Themes.Compact.Components.Nav.Instance().loadDashboard({{DashboardId}},\'{{DashboardName}}\')">
|
||||
<span class="mega-nav-item">{{DashboardName}}</span></a></li>`;
|
||||
return html;
|
||||
}
|
||||
DashboardItemTemplate() {
|
||||
return `<li class="filter-item btn" id="filterItem_{{DashboardId}}" data-pincmnfilters="{{PinCommonFilters}}"><a class="filter-link" href="javascript:;" onclick="Unibase.Themes.Compact.Components.Nav.Instance().loadDashboard({{DashboardId}},\'{{DashboardName}}\')" data-tooltip="true" title="{{DashboardName}}"><span class="filter-name">{{DashboardName}}</span></a>`;
|
||||
}
|
||||
UserDashboards1() {
|
||||
let html = `<li class="Dashboardid-{{DashboardId}} nav-item ligrp-addeditem" id="{{DashboardId}}"><input type="hidden" id="hf_Dashboard_DashboardId" value="{{DashboardId}}"><input type="hidden" id="hf_Dashboard_DashboardName" value="{{DashboardName}}">
|
||||
<a class="nav-link" href="javascript:;" onclick="javascript: Unibase.Themes.Compact.Components.Nav.Instance().loadDashboardsInDashboard(0,{{DashboardId}});">
|
||||
<span>{{DashboardName}}</span></a></li>`;
|
||||
return html;
|
||||
}
|
||||
appGroupTemplate() {
|
||||
let html = ` <li class="nav-item nav-AppGroup collapsed mega-nav-li-list" id="liAppGroup_{{AppGroupId}}">
|
||||
<a class="nav-link nav-hover-link mega-sub-head-nav-link" href ="javascript:void(0);" data-toggle="collapse" data-target="#appgroup-drp-{{AppGroupId}}" aria-expanded="false"><span class="text-truncate mr-10">{{AppGroupName}}</span></a>
|
||||
<ul class="flex-column collapse collapse-level-1 appgroup-drp-{{AppGroupId}} w-100 drp-list" id="appgroup-drp-{{AppGroupId}}" name={{AppGroupId}} data-parent="#nav-apps">
|
||||
<li class="liappgrp-item hidden" id="liAppGroup_{{AppGroupId}}_item"></li>
|
||||
</ul>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
appGroupTemplate2() {
|
||||
let html = `<li class="nav-item" id="liAppGroup_{{AppGroupId}}">
|
||||
<a class="nav-link" href="javascript:void(0);" data-toggle="collapse" data-target="#appgroup-drp-{{AppGroupId}}" data-parent="#nav-apps">
|
||||
{{AppGroupName}}
|
||||
</a>
|
||||
<ul id="appgroup-drp-{{AppGroupId}}" class="nav flex-column collapse collapse-level-2 hidden appgroup-drp-{{AppGroupId}}" id="appgroup-drp-{{AppGroupId}}" >
|
||||
<li class="nav-item">
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item liappgrp-item hidden" id="liAppGroup_{{AppGroupId}}_item"></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
createAppGroupTemplate() {
|
||||
let html = `<li class="nav-item collapsed" id="licreateAppGroup_{{AppGroupId}}">
|
||||
<a class="nav-link nav-hover-link" href ="javascript:void(0);" data-toggle="collapse" data-target="#appgroup-create-drp-{{AppGroupId}}" aria-expanded="false" ><span>{{AppGroupName}}</span></a>
|
||||
<ul class="nav flex-column collapse collapse-level-1 hidden appgroup-create-drp-{{AppGroupId}}" id="appgroup-create-drp-{{AppGroupId}}" name={{AppGroupId}} data-parent="#nav-create">
|
||||
<li class="liappgrp-create-item " id="licreateAppGroup_{{AppGroupId}}_item"></li>
|
||||
</ul>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
createAppGroupTemplate2() {
|
||||
let html = `<li class="nav-item" id="licreateAppGroup_{{AppGroupId}}">
|
||||
<a class="nav-link" href="javascript:void(0);" data-toggle="collapse" data-target="#appgroup-create-drp-{{AppGroupId}}">
|
||||
{{AppGroupName}}
|
||||
</a>
|
||||
<ul id="appgroup-create-drp-{{AppGroupId}}" class="nav flex-column collapse collapse-level-2 hidden appgroup-create-drp-{{AppGroupId}}" data-parent="#nav-create">
|
||||
<li class="nav-item">
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item liappgrp-create-item hidden" id="licreateAppGroup_{{AppGroupId}}_item"></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
appTemplate() {
|
||||
let html = `<li id='{{MyAppId}}' class="nav-item liappgrp-item nav-app-link nav-hover-link liappgrp-addeditem UlItem_{{MyAppId}}"Appindex="{{AppIndex}}"><input type="hidden" id="hf_Apps_InstalledAppId" value="{{MyAppId}}"><input type="hidden" id="hf_Apps_InstalledAppName" data-installedappname="{{InstalledAppName}}" value="{{InstalledAppName}}">
|
||||
<ul class="d-flex list-inline justify-content-between align-items-center w-100"><li class="w-90 drp-list-text"><a href="javascript:;" class="nav-link nav-anchor biz_anchor text-truncate w-100" data-installedappname="{{InstalledAppName}}" onclick="Unibase.Themes.Compact.Components.Nav.Instance().loadList({{MyAppId}})"><span class="text-truncate mega-nav-item">{{AppTitle}}</span></a></li><li class="w-10 drp-list-form-icon"><a class="createform hidden " createid="{{CanCreate}}" href="javascript:;" onclick="Unibase.Themes.Compact.Components.Nav.Instance().loadCreateHtml({{MyAppId}})" data-toggle="tooltip" data-placement="right" title="Create" >+</a></li></ul>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
createAppTemplate() {
|
||||
let html = `<li id='{{MyAppId}}' class="nav-item liappgrp-item liappgrp-addeditem UlItem_{{MyAppId}}"
|
||||
Appindex="{{AppIndex}}"><input type="hidden" id="hf_Apps_InstalledAppId"
|
||||
value="{{MyAppId}}"><input type="hidden" id="hf_Apps_InstalledAppName" data-installedappname="{{InstalledAppName}}" value="{{InstalledAppName}}">
|
||||
<a href="javascript:;" class="nav-link biz_anchor text-truncate" data-installedappname="{{InstalledAppName}}" onclick="Unibase.Themes.Compact.Components.Nav.Instance().loadCreateHtml({{MyAppId}})">
|
||||
<span class="text-truncate">{{AppTitle}}</span></a></li>`;
|
||||
return html;
|
||||
}
|
||||
reportGroupTemplate() {
|
||||
let html;
|
||||
html = `<li class="nav-item nav-ReportGroup mega-nav-li-list" id="liReportGroup_{{ReportGroupId}}">
|
||||
<a class="nav-link nav-hover-link mega-sub-head-nav-link collapsed" href ="javascript:void(0);" data-toggle="collapse" data-target="#reportgroup-drp-{{ReportGroupId}}" aria-expanded="false"><span class="text-truncate mr-10">{{ReportGroupName}}</span></a>
|
||||
<ul class="flex-column collapse collapse-level-1 group-drp-{{ReportGroupId}} drp-list" id="reportgroup-drp-{{ReportGroupId}}" name={{ReportGroupId}} data-parent="#nav-reports">
|
||||
</ul>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
reportGroupTemplate2() {
|
||||
let html = `<li class="nav-item collapsed" id="liReportGroup_{{ReportGroupId}}">
|
||||
<a class="nav-link" href="javascript:void(0);" data-toggle="collapse" data-target="#reportgroup-drp-{{ReportGroupId}}">
|
||||
{{ReportGroupName}}
|
||||
</a>
|
||||
<ul id="reportgroup-drp-{{ReportGroupId}}" class="nav flex-column collapse collapse-level-2 hidden reportgroup-drp-{{ReportGroupId}}" id="appgroup-drp-{{ReportGroupId}}" >
|
||||
<li class="nav-item">
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item lireportgrp-item hidden" id="liReportGroup_{{ReportGroupId}}_item" data-parent="#nav-reports"></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
reportTemplate() {
|
||||
let html = `<li id='{{ReportId}}' class="nav-item lireportgrp-item lireportgrp-addeditem UlItem_{{ReportId}}" title="{{DisplayName}}"><input type="hidden" id="hf_Analytics_ReportId"
|
||||
value="{{ReportId}}"><input type="hidden" id="hf_Analytics_ReportName" data-reportname="{{DisplayName}}" value="{{DisplayName}}">
|
||||
<a href="javascript:;" class="nav-link nav-hover-link nav-anchor biz_anchor text-truncate" data-reportname="{{DisplayName}}" onclick="javascript: Unibase.Themes.Compact.Components.Nav.Instance().loadReport({{ReportId}});">
|
||||
<span class="text-truncate mega-nav-item" id="ReportName_{{ReportId}}">{{DisplayName}}</span></a></li>`;
|
||||
return html;
|
||||
}
|
||||
userProfile() {
|
||||
var html = `<li class="nav-item"><a class="nav-link" href="javascript:;">
|
||||
<i class="dropdown-icon zmdi zmdi-card"></i>
|
||||
<span>My balance</span>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;">
|
||||
<i class="dropdown-icon zmdi zmdi-email"></i>
|
||||
<span>Inbox</span>
|
||||
</a></li>
|
||||
<li class="nav-item">
|
||||
<div class="divider"></div>
|
||||
</li>
|
||||
<li class="nav-item nav-item-designmode">
|
||||
<a class="nav-link" href="javascript:;" id="btn_bizgaze_designmode"><i class="dropdown-icon zmdi zmdi-laptop-mac"></i><span>Design mode</span></a>
|
||||
</a></li>
|
||||
<li class="nav-item hidden nav-item-close-designmode">
|
||||
<a class="nav-link" href="javascript:;" id="btn_bizgaze_normalmode"><i class="dropdown-icon zmdi zmdi-close"></i><span>Close design mode</span></a>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;">
|
||||
<i class="dropdown-icon zmdi zmdi-settings"></i>
|
||||
<span>Settings</span>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;" id="btnLogoff">
|
||||
<i class="dropdown-icon zmdi zmdi-power"></i>
|
||||
<span>Log out</span>
|
||||
</a></li>`;
|
||||
return html;
|
||||
}
|
||||
settings() {
|
||||
var html = `<li class="nav-item"><a class="nav-link" href="javascript:;" id="btnrefresh_dataapis">
|
||||
<i class=" dropdown-icon fa fa-refresh"></i>
|
||||
<span>Refresh DataApis</span>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;" id="btnrefresh_datalists">
|
||||
<i class=" dropdown-icon fa fa-refresh"></i>
|
||||
<span>Refresh DataLists</span>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;" id="btnrefresh_actionproviders">
|
||||
<i class=" dropdown-icon fa fa-refresh"></i>
|
||||
<span>Refresh Action Providers</span>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;" id="btnrefresh_integrationproviders">
|
||||
<i class=" dropdown-icon fa fa-refresh"></i>
|
||||
<span>Refresh Integration Providers</span>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;" id="btnrefresh_reports">
|
||||
<i class=" dropdown-icon fa fa-refresh"></i>
|
||||
<span>Refresh Reports</span>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;" id="btnrefresh_Controls">
|
||||
<i class=" dropdown-icon fa fa-refresh"></i>
|
||||
<span>Refresh Controls</span>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;" id="btnrefresh_Forms">
|
||||
<i class=" dropdown-icon fa fa-refresh"></i>
|
||||
<span>Refresh Forms</span>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;" id="btnrefresh">
|
||||
<i class=" dropdown-icon fa fa-refresh"></i>
|
||||
<span>Refresh Apps</span>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;" id="btnrefresh_Widgetlayouts">
|
||||
<i class=" dropdown-icon fa fa-refresh"></i>
|
||||
<span>Refresh WidgetLayouts</span>
|
||||
</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="javascript:;" id="btnrefresh_Widgets">
|
||||
<i class=" dropdown-icon fa fa-refresh"></i>
|
||||
<span>Refresh Widgets</span>
|
||||
</a></li>`;
|
||||
return html;
|
||||
}
|
||||
notifications() {
|
||||
var html = `<div class=""><ul class="nav nav-pills nav-fill layout-Notification-tabs" role="tablist" id="layout-Notification-tabs1"><li class="nav-item tab-item tab-pane"><a id="Active_Notification" href="javascript:;" class="align-items-center nav-link active"><i class="dripicons dripicons-alarm"></i></a></li><li class="nav-item tab-item tab-pane"><a id="Active_Process" href="javascript:;" class="align-items-center nav-link"><i class="dripicons dripicons-hourglass"></i></a></li><li class="nav-item tab-item tab-pane"><a id="Active_Tasks" href="javascript:;" class="align-items-center nav-link"><i class="dripicons dripicons-checklist"></i></a></li></ul></div>`;
|
||||
return html;
|
||||
}
|
||||
filterSample() {
|
||||
var html = `<div class="ma-10">
|
||||
<input type="text" class="form-control-sm mt-15" placeholder="Input Box"></input>
|
||||
<select class="form-control-sm custom-select mt-15">
|
||||
<option selected="">Select</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
<input type="text" class="form-control-sm mt-15" placeholder="Readonly Input Box" value="Readonly Input Box" readonly=""></input>
|
||||
<select class="form-control-sm custom-select mt-15">
|
||||
<option selected="">Readonly Select</option>
|
||||
<option value="1" disabled="">One</option>
|
||||
<option value="2" disabled="">Two</option>
|
||||
<option value="3" disabled="">Three</option>
|
||||
</select>
|
||||
<input type="text" class="form-control-sm mt-15" placeholder="Disabled Input Box" disabled=""></input>
|
||||
<select class="form-control-sm custom-select mt-15" disabled="">
|
||||
<option selected="">Disabled Select</option>
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
</select>
|
||||
</div>`;
|
||||
return html;
|
||||
}
|
||||
branchTemplate() {
|
||||
let html;
|
||||
html = `<li class="nav-item collapsed" id="liBranch_{{BranchId}}">
|
||||
<a class="nav-link" href ="javascript:void(0);" onclick = "Unibase.Themes.Compact.Components.Nav.Instance().changeBranch({{BranchId}});" aria-expanded="false"><span>{{BranchName}}</span></a></li>`;
|
||||
return html;
|
||||
}
|
||||
navGroupTemplate() {
|
||||
let html = ` <li class="nav-item nav-NavGroup collapsed " id = "liNavGroup_{{NavGroupId}}" >
|
||||
<a class="nav-link nav-hover-link" href ="javascript:void(0);" data-toggle="collapse" data-target="#navgroup-drp-{{NavGroupId}}" aria-expanded="false" ><span class="text-truncate w-165p">{{NavGroupName}}</span></a>
|
||||
<ul class="flex-column collapse collapse-level-1 navgroup-drp-{{NavGroupId}} w-100" id="navgroup-drp-{{NavGroupId}}" name={{NavGroupId}} data-parent="#nav-navgroups">
|
||||
<li class="linavgrp-item hidden" id="liNavGroup_{{NavGroupId}}_item"></li>
|
||||
</ul>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
navDashboardTemplate() {
|
||||
let html = `<li id='{{ItemId}}' class="nav-item ligrp-item nav-parent-item li-dashboard-item ligrp-addeditem UlItem_{{ItemId}}"
|
||||
Dashboardindex="{{DashboardIndex}}"><input type="hidden" id="hf_Dashboard_DashboardId"
|
||||
value="{{ItemId}}"><input type="hidden" id="hf_Dashboard_DashboardName" data-Dashboardname="{{ItemName}}" value="{{ItemName}}">
|
||||
<a href="javascript:;" class="nav-link nav-hover-link" data-Dashboardname="{{ItemName}}" onclick="javascript:Unibase.Themes.Compact.Components.Nav.Instance().loadNavDashBoard({{ItemId}},\'{{ItemName}}\')">
|
||||
<span class="text-truncate">{{ItemName}}</span></a></li>`;
|
||||
return html;
|
||||
}
|
||||
navDashboardGroupTemplate() {
|
||||
let html = `
|
||||
<li class="nav-item nav-parent-item li-dashboard-item liDashboardGroup_{{ItemId}}" id="liDashboardGroup_{{ItemId}}">
|
||||
<a class="nav-link nav-hover-link" href="javascript:;" onclick = "javascript:Unibase.Themes.Compact.Components.Nav.Instance().loadDashboardsInDashboard({{ItemId}},0,true);"><span class="text-truncate">{{ItemName}}</span></a>
|
||||
</li>
|
||||
`;
|
||||
return html;
|
||||
}
|
||||
navAppTemplate() {
|
||||
let html = `<li id='{{ItemId}}' class="nav-item liappgrp-item nav-hover-link nav-app-link liappgrp-addeditem UlItem_{{ItemId}}"><input type="hidden" id="hf_Apps_InstalledAppId"
|
||||
value="{{ItemId}}"><input type="hidden" id="hf_Apps_InstalledAppName" data-installedappname="{{ItemName}}" value="{{ItemName}}">
|
||||
<ul class="d-flex list-inline justify-content-between align-items-center w-100"><li class="w-90"><a href="javascript:;" class="nav-link nav-anchor biz_anchor text-truncate nav-hover-link w-100" data-installedappname="{{ItemName}}" onclick="Unibase.Themes.Compact.Components.Nav.Instance().loadList({{ItemId}})"><span class="text-truncate">{{ItemName}}</span></a></li><li class="w-10"><a class="createform hidden " createid="{{CanCreate}}" href="javascript:;" onclick="Unibase.Themes.Compact.Components.Nav.Instance().loadCreateHtml({{ItemId}})" data-toggle="tooltip" data-placement="right" title="Create">+</a></li></ul>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
navAppGroupTemplate() {
|
||||
let html = ` <li class="nav-item nav-AppGroup collapsed" id = "liAppGroup_{{ItemId}}">
|
||||
<a class="nav-link nav-hover-link" href ="javascript:void(0);" data-toggle="collapse" data-target="#appgroup-drp-{{ItemId}}" aria-expanded="false"><span class="text-truncate w-165p">{{ItemName}}</span></a>
|
||||
<ul class="flex-column collapse collapse-level-1 appgroup-drp-{{AppGroupId}} w-100" id="appgroup-drp-{{ItemId}}" name={{ItemId}} data-parent="#nav-apps">
|
||||
<li class="liappgrp-item hidden" id="liAppGroup_{{ItemId}}_item"></li>
|
||||
</ul>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
navReportTemplate() {
|
||||
let html = `<li id='{{ItemId}}' class="nav-item lireportgrp-item lireportgrp-addeditem UlItem_{{ItemId}}" title="{{ItemName}}"><input type="hidden" id="hf_Analytics_ReportId"
|
||||
value="{{ItemId}}"><input type="hidden" id="hf_Analytics_ReportName" data-reportname="{{ItemName}}" value="{{ItemName}}">
|
||||
<a href="javascript:;" class="nav-link nav-anchor nav-hover-link biz_anchor text-truncate" data-reportname="{{ItemName}}" onclick="javascript: Unibase.Themes.Compact.Components.Nav.Instance().loadReport({{ItemId}});">
|
||||
<span class="text-truncate" id="ReportName_{{ItemId}}">{{ItemName}}</span></a></li>`;
|
||||
return html;
|
||||
}
|
||||
navReportGroupTemplate() {
|
||||
let html;
|
||||
html = `<li class="nav-item nav-ReportGroup" id="liReportGroup_{{ItemId}}">
|
||||
<a class="nav-link nav-hover-link collapsed" href ="javascript:void(0);" data-toggle="collapse" data-target="#reportgroup-drp-{{ItemId}}" aria-expanded="false"><span class="text-truncate mr-10">{{ItemName}}</span></a>
|
||||
<ul class="flex-column collapse collapse-level-1 group-drp-{{ItemId}}" id="reportgroup-drp-{{ItemId}}" name={{ItemId}} data-parent="#nav-reports">
|
||||
</ul>
|
||||
</li>`;
|
||||
return html;
|
||||
}
|
||||
skelTonDashboardHeader() {
|
||||
let html;
|
||||
html = `<div class="container-skel bg-transparent py-3 pl-2 pl-sm-0"> <div class="placeholder-skel no-dashboard-skel"></div><div class="skelton-row mt-20"> <div class="placeholder-skel filter-skel w-70p mr-2"></div><div class="placeholder-skel filter-skel mx-2 w-65p"></div><div class="placeholder-skel w-100p filter-skel mx-2"></div><div class="placeholder-skel filter-skel w-90p mx-2"></div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
skelTonDashboardStructure() {
|
||||
let html;
|
||||
html = `<div class="container-skel bg-transparent py-2"> <div class="skelton-row kpi px-sm-0 px-2"> <div class="col-4 pr-2 pl-0"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 px-2"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 pl-2 pr-0"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-6 pr-2 pl-0"> <div class="placeholder-skel chart-skel-2"></div></div><div class="col-6 pl-2 pr-0"> <div class="placeholder-skel chart-skel-2"></div></div><div class="col-4 pr-2 pl-0"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 px-2"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 pl-2 pr-0"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 pr-2 pl-0"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 px-2"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 pl-2 pr-0"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-6 pr-2 pl-0"> <div class="placeholder-skel chart-skel-2"></div></div><div class="col-6 pl-2 pr-0"> <div class="placeholder-skel chart-skel-2"></div></div><div class="col-4 pr-2 pl-0"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 px-2"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 pl-2 pr-0"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 pr-2 pl-0"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 px-2"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 pl-2 pr-0"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-6 pr-2 pl-0"> <div class="placeholder-skel chart-skel-2"></div></div><div class="col-6 pl-2 pr-0"><div class="placeholder-skel chart-skel-2"></div></div><div class="col-4 pr-2 pl-0"><div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 px-2"> <div class="placeholder-skel kpi-skel-1"></div></div><div class="col-4 pl-2 pr-0"> <div class="placeholder-skel kpi-skel-1"></div></div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
skelTonListPage() {
|
||||
let html;
|
||||
html = `<div class="mx-3 my-2" data-skelTonPage="list-page"> <div class="container-skel bg-transparent" data-skelTonPage="listHeader-page"> <div class="skelton-row justify-content-between my-20"> <div class="placeholder-skel w-20 h-30p ml-0 no-dashboard-skel" style="padding:10px;"> </div><div class="placeholder-skel h-30p w-35 no-dashboard-skel"></div><div class="placeholder-skel h-30p w-20 no-dashboard-skel" style="padding:10px;"></div></div><div class="skelton-row"> <div class="placeholder-skel w-70p ml-0 filter-skel mr-2"></div><div class="placeholder-skel w-80p filter-skel mr-2"></div><div class="placeholder-skel w-60p filter-skel mr-2"></div><div class="placeholder-skel filter-skel w-90p mr-2"></div></div></div><div class="container-skel biz-secondary-color mt-40 p-0" data-skelTonPage="listBody-page"> <div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div><div class="placeholder-skel list-report mr-2"></div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
skelTonDetailsHDRPage() {
|
||||
let html;
|
||||
html = ` <div class="d-flex flex-row align-items-center mt-3">
|
||||
<div class="d-flex flex-row align-items-center">
|
||||
<div class="placeholder-skel h-25p w-25p mr-2"></div>
|
||||
<div class="placeholder-skel h-55p w-55p rounded-circle placeholder-skel">
|
||||
|
||||
</div>
|
||||
<div class="d-flex flex-column ml-2">
|
||||
<div class="placeholder-skel h-30p w-50p w-sm-120p"></div>
|
||||
<div class="placeholder-skel h-25p w-80p w-sm-180p mt-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-auto">
|
||||
<div class="d-flex flex-row align-items-center">
|
||||
<div class="placeholder-skel h-30p w-40p w-sm-120p mx-1"></div>
|
||||
<div class="placeholder-skel h-30p w-40p w-sm-120p mx-1"></div>
|
||||
<div class="placeholder-skel h-30p w-40p w-sm-120p mx-1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
return html;
|
||||
}
|
||||
skelTonDetailsbBDYPage() {
|
||||
let html;
|
||||
html = `<div class="skelton-row row mx-0 py-1"><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-6 pl-0"> <div class="placeholder-skel chart-skel-2 w-100 h-240p mx-0 my-2"></div></div><div class="col-6 pr-0"> <div class="placeholder-skel chart-skel-2 w-100 h-240px mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-3 pl-0"> <div class="placeholder-skel kpi-skel-1 w-100 h-90p my-2 mx-0"></div></div><div class="col-3"> <div class="placeholder-skel kpi-skel-1 w-100 h-90p my-2 mx-0"></div></div><div class="col-3"> <div class="placeholder-skel kpi-skel-1 w-100 h-90p my-2 mx-0"></div></div><div class="col-3 pr-0"> <div class="placeholder-skel kpi-skel-1 w-100 h-90p my-2 mx-0"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-6 pl-0"> <div class="placeholder-skel chart-skel-2 w-100 h-240p mx-0 my-2"></div></div><div class="col-6 pr-0"> <div class="placeholder-skel chart-skel-2 w-100 h-240px mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-3 pl-0"> <div class="placeholder-skel kpi-skel-1 w-100 h-90p my-2 mx-0"></div></div><div class="col-3"> <div class="placeholder-skel kpi-skel-1 w-100 h-90p my-2 mx-0"></div></div><div class="col-3"> <div class="placeholder-skel kpi-skel-1 w-100 h-90p my-2 mx-0"></div></div><div class="col-3 pr-0"> <div class="placeholder-skel kpi-skel-1 w-100 h-90p my-2 mx-0"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-6 pl-0"> <div class="placeholder-skel chart-skel-2 w-100 h-240p mx-0 my-2"></div></div><div class="col-6 pr-0"> <div class="placeholder-skel chart-skel-2 w-100 h-240px mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div><div class="col-6 pl-0"> <div class="placeholder-skel chart-skel-2 w-100 h-240p mx-0 my-2"></div></div><div class="col-6 pr-0"> <div class="placeholder-skel chart-skel-2 w-100 h-240px mx-0 my-2"></div></div><div class="col-12 px-0"> <div class="placeholder-skel report-1 w-100 h-70p mx-0 my-2"></div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
skelTonHorizontal() {
|
||||
let html = `<div class="mx-3" data-skeltonpage="list-page"> <div class="container-skel biz-secondary-color p-0" data-skeltonpage="horizontal-loading"> <div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div><div class="placeholder-skel list-report"></div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
static Instance() {
|
||||
return new Nav_Template();
|
||||
}
|
||||
}
|
||||
Components.Nav_Template = Nav_Template;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"nav.template.js","sourceRoot":"","sources":["nav.template.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAoahB;AApaD,WAAU,OAAO;IACb,IAAiB,MAAM,CAkatB;IAlaD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAgavB;QAhaD,WAAiB,OAAO;YACpB,IAAiB,UAAU,CA8Z1B;YA9ZD,WAAiB,UAAU;gBACvB,MAAa,YAAY;oBACrB,uBAAuB;wBAEnB,IAAI,IAAI,GAAG;;;sCAGG,CAAC;wBACf,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAID,wBAAwB;wBACpB,IAAI,IAAI,GAAG,usBAAusB,CAAA;wBACltB,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,wBAAwB;wBACpB,IAAI,IAAI,GAAG;;;sCAGG,CAAC;wBACf,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,wBAAwB;wBACpB,IAAI,IAAI,GAAG,wqBAAwqB,CAAA;wBACnrB,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,mBAAmB;wBAEf,IAAI,IAAI,GAAG;;;;;sHAKmF,CAAC;wBAC/F,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,kBAAkB;wBAEd,IAAI,IAAI,GAAG;;;;kFAI+C,CAAC;wBAC3D,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,qBAAqB;wBACjB,OAAO,uWAAuW,CAAA;oBAClX,CAAC;oBAED,eAAe;wBAEX,IAAI,IAAI,GAAG;;4DAEyB,CAAC;wBACrC,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,gBAAgB;wBAEZ,IAAI,IAAI,GAAG;;;;;sCAKG,CAAC;wBACf,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,iBAAiB;wBACb,IAAI,IAAI,GAAG;;;;;;;;;;;0CAWO,CAAC;wBACnB,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,sBAAsB;wBAClB,IAAI,IAAI,GAAG;;;;;sCAKG,CAAC;wBACf,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,uBAAuB;wBACnB,IAAI,IAAI,GAAG;;;;;;;;;;;0CAWO,CAAC;wBACnB,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,WAAW;wBAEP,IAAI,IAAI,GAAG;;wBAEX,CAAC;wBACD,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,iBAAiB;wBAEb,IAAI,IAAI,GAAG;;;;6EAI0C,CAAC;wBACtD,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,mBAAmB;wBAEf,IAAI,IAAS,CAAC;wBACd,IAAI,GAAG;;;;sCAIO,CAAC;wBAEf,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,oBAAoB;wBAChB,IAAI,IAAI,GAAG;;;;;;;;;;;0CAWO,CAAC;wBACnB,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,cAAc;wBACV,IAAI,IAAI,GAAG;;;2HAGwF,CAAC;wBAIpG,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAGD,WAAW;wBACP,IAAI,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;gBAwBnB,CAAC;wBACO,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,QAAQ;wBAEJ,IAAI,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAuCnB,CAAC;wBACO,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,aAAa;wBACT,IAAI,IAAI,GAAG,+oBAA+oB,CAAC;wBAC3pB,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,YAAY;wBACR,IAAI,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;YAsBvB,CAAC;wBACW,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAID,cAAc;wBAEV,IAAI,IAAS,CAAC;wBACd,IAAI,GAAG;wOACyM,CAAC;wBAEjN,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,gBAAgB;wBAEZ,IAAI,IAAI,GAAG;;;;;sCAKG,CAAC;wBACf,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,oBAAoB;wBAEhB,IAAI,IAAI,GAAG;;;;6EAI0C,CAAC;wBACtD,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,yBAAyB;wBACrB,IAAI,IAAI,GAAG;;;;iCAIF,CAAA;wBACT,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,cAAc;wBAEV,IAAI,IAAI,GAAG;;;wBAGX,CAAC;wBACD,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,mBAAmB;wBAEf,IAAI,IAAI,GAAG;;;;;sCAKG,CAAC;wBACf,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,iBAAiB;wBACb,IAAI,IAAI,GAAG;;;wGAGqE,CAAC;wBACjF,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,sBAAsB;wBAElB,IAAI,IAAS,CAAC;wBACd,IAAI,GAAG;;;;sCAIO,CAAC;wBAEf,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,sBAAsB;wBAClB,IAAI,IAAS,CAAC;wBACd,IAAI,GAAG,+YAA+Y,CAAC;wBACvZ,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,yBAAyB;wBACrB,IAAI,IAAS,CAAC;wBACd,IAAI,GAAG,8hEAA8hE,CAAC;wBACtiE,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,eAAe;wBACX,IAAI,IAAS,CAAC;wBACd,IAAI,GAAG,yzEAAyzE,CAAC;wBAEj0E,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,qBAAqB;wBACjB,IAAI,IAAS,CAAC;wBACd,IAAI,GAAG;;;;;;;;;;;;;;;;;;mBAkBZ,CAAC;wBAEI,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAED,sBAAsB;wBAClB,IAAI,IAAS,CAAC;wBACd,IAAI,GAAG,uqGAAuqG,CAAC;wBAC/qG,OAAO,IAAI,CAAC;oBAChB,CAAC;oBACD,iBAAiB;wBACb,IAAI,IAAI,GAAG,ylCAAylC,CAAC;wBACrmC,OAAO,IAAI,CAAC;oBAChB,CAAC;oBAGD,MAAM,CAAC,QAAQ;wBACX,OAAO,IAAI,YAAY,EAAE,CAAC;oBAC9B,CAAC;iBACJ;gBA5ZY,uBAAY,eA4ZxB,CAAA;YACL,CAAC,EA9ZgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QA8Z1B;QACL,CAAC,EAhagB,OAAO,GAAP,cAAO,KAAP,cAAO,QAgavB;IACL,CAAC,EAlagB,MAAM,GAAN,cAAM,KAAN,cAAM,QAkatB;AACL,CAAC,EApaS,OAAO,KAAP,OAAO,QAoahB"}
|
||||
+206
File diff suppressed because one or more lines are too long
@@ -0,0 +1,32 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class TaskParms {
|
||||
static Instance() {
|
||||
if (this.instance == undefined) {
|
||||
this.instance = new TaskParms();
|
||||
}
|
||||
return this.instance;
|
||||
}
|
||||
SaveTaskParameters(TaskParameters) {
|
||||
var index = TaskParms.TaskParameters.findIndex(x => x.TaskId = TaskParameters.TaskId);
|
||||
var result = (index == -1) ? TaskParms.TaskParameters.push(TaskParameters) : null;
|
||||
}
|
||||
RemoveTaskParameters(taskid) {
|
||||
TaskParms.TaskParameters = TaskParms.TaskParameters.filter(x => x.TaskId != taskid);
|
||||
}
|
||||
GetTaskParameters(TaskId) {
|
||||
return TaskParms.TaskParameters.find(x => x.TaskId = TaskId);
|
||||
}
|
||||
}
|
||||
TaskParms.TaskParameters = [];
|
||||
Components.TaskParms = TaskParms;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"TaskParams.js","sourceRoot":"","sources":["TaskParams.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CA+BhB;AA/BD,WAAU,OAAO;IACb,IAAiB,MAAM,CA6BtB;IA7BD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CA2BvB;QA3BD,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAyB1B;YAzBD,WAAiB,UAAU;gBACvB,MAAa,SAAS;oBAGjB,MAAM,CAAC,QAAQ;wBACZ,IAAI,IAAI,CAAC,QAAQ,IAAI,SAAS,EAAE;4BAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,SAAS,EAAE,CAAC;yBACnC;wBACD,OAAO,IAAI,CAAC,QAAQ,CAAC;oBACxB,CAAC;oBACF,kBAAkB,CAAC,cAAc;wBAE7B,IAAI,KAAK,GAAG,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;wBACtF,IAAI,MAAM,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;oBACtF,CAAC;oBACD,oBAAoB,CAAC,MAAM;wBAEvB,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC;oBACxF,CAAC;oBACD,iBAAiB,CAAC,MAAM;wBAEpB,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;oBACjE,CAAC;;gBApBc,wBAAc,GAAG,EAAE,CAAC;gBAD1B,oBAAS,YAuBrB,CAAA;YACL,CAAC,EAzBgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAyB1B;QACL,CAAC,EA3BgB,OAAO,GAAP,cAAO,KAAP,cAAO,QA2BvB;IACL,CAAC,EA7BgB,MAAM,GAAN,cAAM,KAAN,cAAM,QA6BtB;AACL,CAAC,EA/BS,OAAO,KAAP,OAAO,QA+BhB"}
|
||||
@@ -0,0 +1,804 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class Notification extends Unibase.Platform.Core.BaseComponent {
|
||||
static Instance() {
|
||||
return new Notification();
|
||||
}
|
||||
init(containerid) {
|
||||
Unibase.Themes.Compact.Components.Notification.containerid = containerid;
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().GetUnreadRemindersCount();
|
||||
let remindersuniqueid = "Unibase_Platform_Communications_Reminders_App_Reminders";
|
||||
Unibase.Platform.Apps.Managers.AppManager.Instance().getInstallAppId(remindersuniqueid).then(function (response) {
|
||||
if (response.result != null) {
|
||||
Unibase.Themes.Compact.Components.Notification.ReminderAppid = response.result.InstalledAppId;
|
||||
}
|
||||
});
|
||||
let taskremindersuniqueid = "Unibase_Platform_Communications_Reminders_App_TaskReminders";
|
||||
Unibase.Platform.Apps.Managers.AppManager.Instance().getInstallAppId(taskremindersuniqueid).then(function (response) {
|
||||
if (response.result != null) {
|
||||
Unibase.Themes.Compact.Components.Notification.TaskReminderAppid = response.result.InstalledAppId;
|
||||
}
|
||||
});
|
||||
$("#Active_Process").click(function () {
|
||||
$("#Active_Process").addClass("active");
|
||||
$("#Active_Notification").removeClass("active");
|
||||
$("#Active_Tasks").removeClass("active");
|
||||
$(".Reminders").remove();
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().GetRunnningProcess();
|
||||
});
|
||||
}
|
||||
tabView(id) {
|
||||
var viewallbtn = `<a class="btn btn-outline-primary mr-auto ml-auto px-3 py-1" href="javascript:;" onclick="Unibase.Themes.Compact.Components.Notification.Instance().ViewAll(6)" id="AddWidget_btnCreateWidget">View All</a>`;
|
||||
var viewallbtntask = `<a class="btn btn-outline-primary mr-auto ml-auto px-3 py-1" onclick="Unibase.Themes.Compact.Components.Notification.Instance().ViewAll(1)" href="javascript:;" id="AddWidget_btnCreateWidget">View All</a>`;
|
||||
let instance = this;
|
||||
$('.tab-view').removeClass('biz-notification-mobile-view border');
|
||||
$("#" + id).addClass('biz-notification-mobile-view border-0');
|
||||
if (id == 'notification-tab') {
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().loadReminders('tab-view');
|
||||
$(".biz-settings-panel").css("background", "#fff9f9");
|
||||
}
|
||||
if (id == 'task-tab') {
|
||||
$('.clearall-checkbox').addClass('d-none');
|
||||
$('.clear_alldiv').addClass('d-none');
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().loadTasks('tab-view');
|
||||
$(".biz-settings-panel").css("background", "#fff9f9");
|
||||
$(".notification-footer").html(viewallbtntask);
|
||||
}
|
||||
else {
|
||||
if (Unibase.Themes.Compact.Components.Notification.UnReadNotificationsCount == 0) {
|
||||
$('.clearall-checkbox').addClass('d-none');
|
||||
$('.clear_alldiv').addClass('d-none');
|
||||
}
|
||||
else {
|
||||
$('.clearall-checkbox').removeClass('d-none');
|
||||
$('.clear_alldiv').removeClass('d-none');
|
||||
}
|
||||
$(".biz-settings-panel").css("background", "#f7fbff");
|
||||
$(".notification-footer").html(viewallbtn);
|
||||
if ($('#notificationTabView .rem-item-wrap').length) {
|
||||
$(".notification-footer").removeClass('d-none');
|
||||
}
|
||||
else {
|
||||
$(".notification-footer").addClass('d-none');
|
||||
}
|
||||
}
|
||||
}
|
||||
loadNotificationsTask(html, tabType, binding) {
|
||||
let tabViewHeaderHTML = `
|
||||
<ul class="nav nav-tabs border-0 text-center mr-auto" id="myTab" role="tablist">
|
||||
<li class="nav-item task-litab">
|
||||
<a class="nav-link tab-view active biz-notification-mobile-view border-0" id="task-tab" data-toggle="tab" href="#taskTabView" id="task-tab" onclick="Unibase.Themes.Compact.Components.Notification.Instance().tabView('task-tab')" role="tab" aria-controls="profile" aria-selected="false"><span>Tasks</span><span class="badge badge-link badge-sm border font-12 ml-2 rounded-circle" id="tasks_count">0</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link border-0 tab-view" id="notification-tab" data-toggle="tab" href="#notificationTabView" onclick="Unibase.Themes.Compact.Components.Notification.Instance().tabView('notification-tab')" role="tab" aria-controls="home" aria-selected="true"><span>Notification</span><span class="badge badge-link badge-sm border font-12 ml-2 rounded-circle" id="notification_count">0</span></a>
|
||||
</li>
|
||||
<li class="nav-item clear_alldiv mt-10 d-none" style="position:absolute;right:32px"><a class="reminderstatus" onclick="Unibase.Themes.Compact.Components.Notification.Instance().changeReminderStatusAsRead()">Clear All</a></li>
|
||||
</ul><ul class="clear-all-checkbox"><input type="checkbox" class="mb-1 clearall-checkbox" style="position:absolute;right:12px;top:13px"></ul>`;
|
||||
let tabViewBodyHTML = `
|
||||
<div class="tab-content m-0" id="myTabContent">
|
||||
<div class="tab-pane show active" id="taskTabView" role="tabpanel" aria-labelledby="profile-tab"></div>
|
||||
<div class="tab-pane " id="notificationTabView" role="tabpanel" aria-labelledby="home-tab"></div>
|
||||
</div>`;
|
||||
if (binding == 1) {
|
||||
$('#settings-panel-head-title').remove();
|
||||
$('#myTab').remove();
|
||||
$('#settings_panel_close').after(tabViewHeaderHTML);
|
||||
$("#settings-panel-body").html(tabViewBodyHTML).parent().addClass('p-0');
|
||||
$('.settings-panel-head').removeClass('px-3').addClass('pr-3 pl-1');
|
||||
}
|
||||
if (tabType == 'notification') {
|
||||
$('#notificationTabView').html(html);
|
||||
}
|
||||
if (tabType == 'task') {
|
||||
$('#taskTabView').html(html);
|
||||
this.GetUnreadRemindersCount(false);
|
||||
}
|
||||
}
|
||||
changeReminderStatusAsRead() {
|
||||
bootbox.confirm({
|
||||
title: "<span class='dstry' style='color:red'>Clear All Notifications?</span>",
|
||||
message: "Are you sure! Do you want to clear all notifications? ",
|
||||
buttons: {
|
||||
cancel: {
|
||||
label: '<i class="fa fa-times"></i> Cancel'
|
||||
},
|
||||
confirm: {
|
||||
label: '<i class="fa fa-check"></i> Confirm'
|
||||
}
|
||||
},
|
||||
callback: function (result) {
|
||||
if (result) {
|
||||
Unibase.Platform.Communications.Managers.ReminderManager.Instance().ChangeAllReminderStatusAsRead().then(function (response) {
|
||||
if (response.status == Unibase.Data.Status.Success) {
|
||||
var html = Unibase.Themes.Compact.Components.Notification.Instance().noremaindershtml();
|
||||
var finalcount = 0;
|
||||
var checkboxclass = "clearall-checkbox";
|
||||
if (isMobileApp()) {
|
||||
checkboxclass = "clear-all-checkbox";
|
||||
var count = Number($('#notificatonIconBadge').text());
|
||||
var tabcount = Number($('#notification_count').text());
|
||||
finalcount = count - tabcount;
|
||||
$('#notificationTabView').html(html);
|
||||
}
|
||||
else {
|
||||
$("#settings-panel-body").html(html).addClass('no-data');
|
||||
}
|
||||
if (finalcount <= 0) {
|
||||
$('#notificatonIconBadge').addClass('d-none');
|
||||
finalcount = 0;
|
||||
}
|
||||
$('#notificatonIconBadge').text(finalcount);
|
||||
$('.clear_alldiv').addClass('d-none');
|
||||
$('.' + checkboxclass).addClass('d-none');
|
||||
$('#notification_count').text(0);
|
||||
$('#notificationsViewAllBtn').addClass('d-none');
|
||||
}
|
||||
else {
|
||||
alert("failed to clear notifications");
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
loadReminders(tabview, count) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
$('.clear-all-checkbox').removeClass('d-none');
|
||||
$('#settingsPanelBodyWrap').removeClass('d-none');
|
||||
$('#chatPanelBodyWrap').addClass('d-none');
|
||||
if ($('.biz__nav__toggle').is(':visible')) {
|
||||
$('#biz_nav_close').click();
|
||||
}
|
||||
let instance = this, html = "";
|
||||
if (count != null) {
|
||||
count = '<span class="badge border rounded-circle badge-sm badge-link mr-4 font-14 " id="notification_count">0</span>';
|
||||
}
|
||||
else {
|
||||
count = '<span class="badge border rounded-circle badge-sm badge-link mr-4 font-14 " id="notification_count"></span>';
|
||||
}
|
||||
$(".biz-settings-panel").css("background", "#f7fbff");
|
||||
$(".settings-panel-head").removeClass("d-none py-2");
|
||||
$('#settings-panel-head-title').addClass('d-flex flex-row align-items-center py-1').empty().append(`<span class="notification_header my-2 mr-2 font-16 font-weight-400">Notifications</span>${count}<div class="clear_alldiv d-none" style="position:absolute;right:40px"><a class="reminderstatus" onclick="Unibase.Themes.Compact.Components.Notification.Instance().changeReminderStatusAsRead()">Clear All</a></div><input type="checkbox" class="clearall-checkbox ml-2" style="position:absolute;right:10px">`).parent().addClass('px-3 border-bottom').removeClass('py-10');
|
||||
$('#settings-panel-body').removeClass('px-3').addClass("biz-body-height");
|
||||
$(".notification-footer").removeClass("d-none");
|
||||
let remindertype = Unibase.Platform.Communications.Enums.ReminderType.Notification;
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().GetUnreadRemindersCount(true);
|
||||
return yield Unibase.Platform.Communications.Managers.ReminderManager.Instance().getReminders(remindertype, 20).then(function (response) {
|
||||
html = "";
|
||||
for (let i = 0; i < response.length; i++) {
|
||||
let createformid = 0, installedappid = 0, refid = 0;
|
||||
if (response[i].RedirectOptions == null || response[i].RedirectOptions == undefined) {
|
||||
installedappid = response[i].InstalledAppId;
|
||||
refid = response[i].RefId;
|
||||
}
|
||||
else {
|
||||
createformid = response[i].RedirectOptions.CreateFormId;
|
||||
installedappid = response[i].RedirectOptions.InstalledAppId;
|
||||
refid = response[i].RedirectOptions.RefId;
|
||||
}
|
||||
let ReminderUrl = response[i].ReminderUrl;
|
||||
let IconUrl = response[i].IconUrl;
|
||||
if (IconUrl == undefined || IconUrl == null) {
|
||||
IconUrl = "tenants/themes/compact/imgs/defaultnotification.png";
|
||||
}
|
||||
if (IconUrl == "") {
|
||||
IconUrl = "tenants/themes/compact/imgs/notification.png";
|
||||
}
|
||||
let ReminderId = response[i].ReminderId;
|
||||
if (ReminderUrl == "") {
|
||||
ReminderUrl = null;
|
||||
}
|
||||
html += `<div class="rem-item-wrap">
|
||||
<div class="d-flex w-100">
|
||||
<a href="javascript:void(0);" class="w-100 px-2 text-dark" id="Rem-item-${ReminderId}" data-id="${ReminderId}" onclick="Unibase.Themes.Compact.Components.Notification.Instance().loadReminderDetails(${refid},${installedappid},'${response[i].UrlType}','${ReminderUrl}',${remindertype},${createformid},null)"
|
||||
class="text-dark py-1 w-90">
|
||||
<div class="d-flex w-100">
|
||||
<div class="w-60p p-2 mr-2 flex-shrink-0">
|
||||
<img src="${IconUrl}" data-dynamic="1" onerror="ReloadImage(event)" class="img-fluid" data-loaded="0">
|
||||
</div>
|
||||
<div class="flex-grow-1 overflow-hide">
|
||||
<div class="notifications-text word-break">
|
||||
<div class="d-flex justify-content-between">
|
||||
<span class="w-90">
|
||||
<p class="text-dark text-capitalize font-12 font-weight-600 text-truncate w-95 notification-subject" title="${response[i].Subject}">${response[i].Subject}</p>
|
||||
</span><span>
|
||||
<div class="d-flex pb-0 px-2">
|
||||
<div class="checkbox_div w-10 "><input type="checkbox" class="check_allreminders notify_check" style="position:relative;left:5px;top:5px" id="checkid_${ReminderId}"></div>
|
||||
</div>
|
||||
</div> </div>
|
||||
<div><span class="font-12 font-weight-400 word-break notifi_message_overflow">${response[i].Message}</span></div>
|
||||
<div class="d-flex align-items-center justify-content-between z-index-10">
|
||||
<div class="notifications-time font-12 font-weight-600">${Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocal(response[i].ReminderDate)}</div>
|
||||
<span class="font-12 font-weight-600 text-dark py-1 z-index-2" data-id="${ReminderId}" onclick="Unibase.Themes.Compact.Components.Notification.Instance().UpdateReminderStatus('${ReminderId}','Read');event.stopPropagation();">Mark as read</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div></div>`;
|
||||
if (i != response.length - 1)
|
||||
html += '<div class="dropdown-divider mx-3 m-0 p-0"></div>';
|
||||
}
|
||||
var checkcount = Number(`${response.length}`);
|
||||
var noreminders = Unibase.Themes.Compact.Components.Notification.Instance().noremaindershtml();
|
||||
var viewallbtn = `<a class="btn btn-outline-primary mr-auto ml-auto px-3 py-1 " href="javascript:;" onclick="Unibase.Themes.Compact.Components.Notification.Instance().ViewAll(6)" id="notificationsViewAllBtn">View All</a><a class="btn btn-outline-danger mr-auto ml-auto px-3 py-1 d-none" href="javascript:;" onclick=" Unibase.Themes.Compact.Components.Notification.Instance().markAsReadUnReadReminders();" id="notificationClearBtn">Clear <span class="d-inline-flex align-items-center font-14">(<span id="clearNotificationCount">0</span>)</span></a>`;
|
||||
if (tabview == 'tab-view') {
|
||||
$('.clearall-checkbox').removeClass('d-none');
|
||||
if (checkcount == 0) {
|
||||
instance.loadNotificationsTask(noreminders, 'notification', 0);
|
||||
$('.clear_alldiv').addClass('d-none');
|
||||
$(".notification-footer").addClass("d-none");
|
||||
$('.clearall-checkbox').addClass('d-none');
|
||||
}
|
||||
else {
|
||||
instance.loadNotificationsTask(html, 'notification', 0);
|
||||
$('.clear_alldiv').removeClass('d-none');
|
||||
$(".notification-footer").removeClass("d-none").html(viewallbtn);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (checkcount == 0) {
|
||||
$('.clearall-checkbox').addClass('d-none');
|
||||
$('.clear_alldiv').addClass('d-none');
|
||||
$("#settings-panel-body").html(noreminders).addClass('no-data');
|
||||
$(".notification-footer").addClass("d-none");
|
||||
}
|
||||
else {
|
||||
$('.clear_alldiv').removeClass('d-none');
|
||||
$('.clearall-checkbox').removeClass('d-none');
|
||||
$("#settings-panel-body").html(html).removeClass('no-data');
|
||||
$(".notification-footer").removeClass("d-none").html(viewallbtn);
|
||||
}
|
||||
}
|
||||
$('.biz-settings-panel #notification_count').text(Unibase.Themes.Compact.Components.Notification.UnReadNotificationsCount);
|
||||
$('.biz-settings-panel #tasks_count').text(Unibase.Themes.Compact.Components.Notification.UnReadTasksCount);
|
||||
if (Unibase.Themes.Compact.Components.Index.Instance().layoutIndex == 1) {
|
||||
$('.biz-settings-panel').addClass('layout-1');
|
||||
}
|
||||
if (Unibase.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 (i, e) {
|
||||
if ($(e).prop('scrollWidth') < $(e).outerWidth() + 2) {
|
||||
$(e).removeAttr('title');
|
||||
}
|
||||
});
|
||||
$('.notify_check').on('click', function (e) {
|
||||
e.stopPropagation();
|
||||
var ischecked = true;
|
||||
$('.notify_check').each(function () {
|
||||
if ($(this).is(':checked')) {
|
||||
ischecked = true;
|
||||
}
|
||||
else {
|
||||
ischecked = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if (ischecked) {
|
||||
$('.clearall-checkbox').prop('checked', true);
|
||||
}
|
||||
else {
|
||||
$('.clearall-checkbox').prop('checked', false);
|
||||
}
|
||||
if ($('.notify_check').is(":checked")) {
|
||||
$('.task-litab').addClass('d-none');
|
||||
$('#notificationsViewAllBtn').addClass('d-none');
|
||||
$('#clearNotificationCount').text($('.notify_check:checked').length);
|
||||
$('#notificationClearBtn').removeClass('d-none');
|
||||
}
|
||||
else {
|
||||
$('.task-litab').removeClass('d-none');
|
||||
$('.clearall-checkbox').prop("checked", false);
|
||||
$('#notificationsViewAllBtn').removeClass('d-none');
|
||||
$('#notificationClearBtn').addClass('d-none');
|
||||
}
|
||||
});
|
||||
$('.clearall-checkbox').click(function () {
|
||||
if ($('.clearall-checkbox').is(":checked")) {
|
||||
$('.task-litab').addClass('d-none');
|
||||
$('.check_allreminders').prop("checked", true);
|
||||
$('#notificationsViewAllBtn').addClass('d-none');
|
||||
$('#clearNotificationCount').text($('.notify_check:checked').length);
|
||||
$('#notificationClearBtn').removeClass('d-none');
|
||||
}
|
||||
else {
|
||||
$('.task-litab').removeClass('d-none');
|
||||
$('.check_allreminders').prop("checked", false);
|
||||
$('#notificationsViewAllBtn').removeClass('d-none');
|
||||
$('#notificationClearBtn').addClass('d-none');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
markAsReadUnReadReminders(ismobile) {
|
||||
var Reminders = [];
|
||||
$('.check_allreminders').each(function () {
|
||||
if ($(this).is(":checked")) {
|
||||
var id = $(this).attr("id");
|
||||
var reminderid = id.split("_")[1];
|
||||
Reminders.push(reminderid);
|
||||
}
|
||||
});
|
||||
var Reminder = { Reminders };
|
||||
Unibase.Platform.Communications.Managers.ReminderManager.Instance().markAsReadUnreadReminders(Reminder).then(function (response) {
|
||||
if (response.status == Unibase.Data.Status.Success) {
|
||||
var tab = undefined;
|
||||
if (ismobile) {
|
||||
tab = 'tab-view';
|
||||
}
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().loadReminders(tab, null);
|
||||
}
|
||||
});
|
||||
}
|
||||
GetUnreadRemindersCount(isnotification) {
|
||||
const instance = this;
|
||||
let user = Unibase.Platform.Membership.Infos.Identity.getCurrentUser();
|
||||
Unibase.Platform.Communications.Managers.ReminderManager.Instance().getUnreadRemindersCountByUserId().then(function (response) {
|
||||
var obj = response.result;
|
||||
Unibase.Themes.Compact.Components.Notification.UnReadNotificationsCount = obj.NotificationCount;
|
||||
Unibase.Themes.Compact.Components.Notification.UnReadTasksCount = obj.TasksCount;
|
||||
const notificationCount = Number(obj.NotificationCount);
|
||||
const taskCount = Number(obj.TasksCount);
|
||||
if (Unibase.Themes.Compact.Components.Index.Instance().tabMode) {
|
||||
instance.bindCountHtml(notificationCount, '#notificatonIconBadge');
|
||||
instance.bindCountHtml(taskCount, '#taskIconBadge');
|
||||
}
|
||||
else {
|
||||
let totalCount = notificationCount + taskCount;
|
||||
instance.bindCountHtml(totalCount, '#notificatonIconBadge');
|
||||
}
|
||||
$(".biz-settings-panel #notification_count").text(obj.NotificationCount);
|
||||
$(".biz-settings-panel #tasks_count").text(obj.TasksCount);
|
||||
});
|
||||
}
|
||||
bindCountHtml(count, countEl) {
|
||||
if (count > 0) {
|
||||
let countHtml = count.toString();
|
||||
if (count > 99) {
|
||||
countHtml = '99<sup class="fa fa-plus" style="font-size: 8px;"></sup>';
|
||||
}
|
||||
if (count > 9 || count > 99) {
|
||||
let countClass = 'count-double-digit';
|
||||
if (count > 99) {
|
||||
countClass = 'count-overflow';
|
||||
}
|
||||
$(countEl).closest('.dropdown-notifications').addClass(countClass);
|
||||
}
|
||||
$(countEl).html(countHtml).removeClass("d-none");
|
||||
}
|
||||
else {
|
||||
$(countEl).empty().addClass("d-none");
|
||||
}
|
||||
}
|
||||
loadTasks(tabView) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let instance = 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('<span class="my-2 font-16 font-weight-400">Tasks</span><span class="ml-2 px-2 border rounded-circle font-14" id="tasks_count">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 remindertype = Unibase.Platform.Communications.Enums.ReminderType.Task;
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().GetUnreadRemindersCount(false);
|
||||
return yield Unibase.Platform.Communications.Managers.ReminderManager.Instance().getReminders(remindertype, 20).then(function (response) {
|
||||
let html = "";
|
||||
for (let i = 0; i < response.length; i++) {
|
||||
let createformid = 0, installedappid = 0, refid = 0;
|
||||
if (response[i].RedirectOptions == null || response[i].RedirectOptions == undefined) {
|
||||
installedappid = response[i].InstalledAppId;
|
||||
refid = response[i].RefId;
|
||||
}
|
||||
else {
|
||||
createformid = response[i].RedirectOptions.CreateFormId;
|
||||
installedappid = response[i].RedirectOptions.InstalledAppId;
|
||||
refid = response[i].RedirectOptions.RefId;
|
||||
}
|
||||
let ReminderUrl = response[i].ReminderUrl;
|
||||
let IconUrl = response[i].IconUrl;
|
||||
if (IconUrl == "" || IconUrl == null) {
|
||||
IconUrl = "tenants/themes/compact/imgs/task.png";
|
||||
}
|
||||
let ReminderId = response[i].ReminderId;
|
||||
if (ReminderUrl == "") {
|
||||
ReminderUrl = null;
|
||||
}
|
||||
html += '<div id="Taskmedia_' + ReminderId + '" data-refid="' + response[i].RefGuid + '" class="task-list-item TaskLi_' + response[i].TaskId + '">' +
|
||||
'<div class="cursor-pointer d-flex pr-3 py-1 w-100" id="Rem-item-' + ReminderId + '" data-id="' + ReminderId + '" onclick="Unibase.Themes.Compact.Components.Notification.Instance().loadReminderDetails(' + refid + ',' + installedappid + ',\'' + response[i].UrlType + '\',\'' + ReminderUrl + '\',' + remindertype + ',' + createformid + ',null)">' +
|
||||
`<div class="w-60p p-2 mr-2 flex-shrink-0"><img src="${IconUrl}" data-dynamic="1" onerror="ReloadImage(event)" class="img-fluid" data-loaded="0"></div>
|
||||
<div class="notifications-text flex-grow-1 overflow-hide word-break">
|
||||
<p class="text-dark text-capitalize font-12 font-weight-600 w-95 text-truncate word-break task-subject" title="${response[i].Subject}">${response[i].Subject}</p>
|
||||
<p class="font-12 text-dark notifi_message_overflow"> ${response[i].Message}</p>
|
||||
<div class="d-flex align-items-center justify-content-between my-2">
|
||||
<div class="notifications-time font-12">${Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocal(response[i].ReminderDate)}</div>` +
|
||||
'<div><a class="pull-right text-primary Collapse_Manage' + ReminderId + ' font-12" style="text-decoration: none;" data-toggle="collapse" onclick="Unibase.Themes.Compact.Components.Notification.Instance().LoadApprovals(\'' + response[i].RefGuid + '\',\'' + ReminderId + '\',' + response[i].TaskId + ');event.stopPropagation();"> Manage <i class="text-dark fa fa-angle-down"></i>' +
|
||||
`</a></div></div></div></div>
|
||||
<div class="box collaps" id="collapseManageBtn_${ReminderId}">
|
||||
</div>
|
||||
</div>`;
|
||||
if (i != response.length - 1)
|
||||
html += '<div class="dropdown-divider mx-3 m-0 p-0"></div>';
|
||||
}
|
||||
$('.biz-settings-panel #tasks_count').text(Unibase.Themes.Compact.Components.Notification.UnReadTasksCount);
|
||||
var checkcount = Number(`${response.length}`);
|
||||
var noreminders = Unibase.Themes.Compact.Components.Notification.Instance().notaskshtml();
|
||||
var viewallbtntask = `<a class="btn btn-outline-primary mr-auto ml-auto px-3 py-1" onclick="Unibase.Themes.Compact.Components.Notification.Instance().ViewAll(1)" href="javascript:;" id="AddWidget_btnCreateWidget">View All</a>`;
|
||||
if (tabView == 'tab-view') {
|
||||
if (checkcount == 0) {
|
||||
instance.loadNotificationsTask(noreminders, 'task', 1);
|
||||
$(".notification-footer").addClass("d-none");
|
||||
}
|
||||
else {
|
||||
instance.loadNotificationsTask(html, 'task', 1);
|
||||
$(".notification-footer").removeClass("d-none").html(viewallbtntask);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$(".biz-settings-panel").toggleClass("show");
|
||||
if (checkcount == 0) {
|
||||
$("#settings-panel-body").html(noreminders).addClass('no-data');
|
||||
$(".notification-footer").addClass("d-none");
|
||||
}
|
||||
else {
|
||||
$("#settings-panel-body").html(html).removeClass('no-data');
|
||||
$(".notification-footer").removeClass("d-none").html(viewallbtntask);
|
||||
}
|
||||
}
|
||||
$('.biz-settings-panel .task-subject').each(function (i, e) {
|
||||
if ($(e).prop('scrollWidth') < $(e).outerWidth() + 2) {
|
||||
$(e).removeAttr('title');
|
||||
}
|
||||
});
|
||||
if (Unibase.Themes.Compact.Components.Index.Instance().layoutIndex == 1) {
|
||||
$('.biz-settings-panel').addClass('layout-1');
|
||||
}
|
||||
if (Unibase.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(RefId, ReminderId, TaskId) {
|
||||
var html = "";
|
||||
if ($(`#manageBtnWrap_${ReminderId}`).length) {
|
||||
$("#collapseManageBtn_" + ReminderId).collapse('toggle');
|
||||
return;
|
||||
}
|
||||
Unibase.Platform.Communications.Managers.TaskManager.Instance().getTaskByRefId(RefId, TaskId).then(function (response) {
|
||||
if (response.result != null) {
|
||||
var Approvedbtn = "Approve";
|
||||
var Rejectbtn = "Reject";
|
||||
var rejectonclick = 'Unibase.Themes.Compact.Components.Notification.Instance().SaveTaskReason(\'' + ReminderId + '\',' + response.result.TaskId + ',\'Reject\');';
|
||||
if (response.result.ConfirmKeyText != null && response.result.ConfirmKeyText != undefined && response.result.ConfirmKeyText != "") {
|
||||
Approvedbtn = response.result.ConfirmKeyText;
|
||||
}
|
||||
if (response.result.RejectKeyText != null && response.result.RejectKeyText != undefined && response.result.RejectKeyText != "") {
|
||||
Rejectbtn = response.result.RejectKeyText;
|
||||
}
|
||||
if (Number(response.result.RejectFormId) != 0) {
|
||||
rejectonclick = 'Unibase.Themes.Compact.Components.Notification.Instance().ChangeApprovalStatus(\'' + ReminderId + '\',' + response.result.TaskId + ',\'Reject\',' + response.result.RejectFormId + ',' + response.result.RejectFormPkId + ')';
|
||||
}
|
||||
html += `<div class="d-flex justify-content-center align-items-center mb-2 mt-1 ml-3 accordion-header" id="manageBtnWrap_${ReminderId}">` +
|
||||
'<button class="btn btn-outline-success mr-2 ml-auto px-4 py-1 font-12" onclick="Unibase.Themes.Compact.Components.Notification.Instance().ChangeApprovalStatus(\'' + ReminderId + '\',' + response.result.TaskId + ',\'Accept\',' + response.result.ApprovalFormId + ',' + response.result.ApprovalFormPkId + ')">' + Approvedbtn + '</button>' +
|
||||
'<button class="btn btn-outline-danger mr-2 ml-auto px-4 py-1 font-12 collapsed" data-toggle="collapse" href="#collapseReject_' + ReminderId + '">' + Rejectbtn + '</button>' +
|
||||
'<button class="btn btn-outline-primary mr-auto ml-auto px-4 py-1 font-12" onclick = "Unibase.Themes.Compact.Components.Notification.Instance().confirmclosetask(' + TaskId + ',\'' + ReminderId + '\')">Close</button>' +
|
||||
'</div>' +
|
||||
'<div class="collapse py-1" id="collapseReject_' + ReminderId + '" data-parent="#collapseManageBtn_' + ReminderId + '">' +
|
||||
'<div class="d-flex justify-content-start mt-1 px-3">' +
|
||||
'<input type="text" id="Reason_' + TaskId + '" class="form-control focus_blue border-0 w-75 p-0 pl-1 mr-2" placeholder="Add Comment">' +
|
||||
'<a href="javascript:void(0);" class="btn-sm btn-success px-3 ml-2 p-0 d-flex flex-row align-items-center" onclick="' + rejectonclick + '">' +
|
||||
'<i class="fa fa-send-o font-11"></i>' +
|
||||
'</a>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
$("#collapseManageBtn_" + ReminderId).html(html).collapse('show');
|
||||
}
|
||||
});
|
||||
}
|
||||
ChangeApprovalStatus(reminderid, taskid, status, formid, formpkid) {
|
||||
var reason = status == "Reject" ? $("#Reason_" + taskid).val().toString() : "Accepted";
|
||||
var obj = {
|
||||
TaskId: taskid, Reason: reason, Status: status
|
||||
};
|
||||
if (formid != 0) {
|
||||
Unibase.Themes.Compact.Components.Notification.TaskId = taskid;
|
||||
Unibase.Themes.Compact.Components.Notification.TaskReminderId = reminderid;
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().loadForm(formid, formpkid, 0, 0, function (response) {
|
||||
if (response != null) {
|
||||
Unibase.Platform.Communications.Managers.TaskManager.Instance().changeApprovalStatus(obj).then(function (response) {
|
||||
Unibase.Themes.Compact.Components.Notification.TaskId = 0;
|
||||
Unibase.Themes.Compact.Components.Notification.TaskReminderId = '';
|
||||
Unibase.Themes.Compact.Components.Notification.UnReadTasksCount = Unibase.Themes.Compact.Components.Notification.UnReadTasksCount - 1;
|
||||
var refguid = $('.TaskLi_' + taskid).attr('data-refid');
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().reloadPage(refguid);
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().removetask(taskid);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
Unibase.Platform.Communications.Managers.TaskManager.Instance().changeApprovalStatus(obj).then(function (response) {
|
||||
Unibase.Themes.Compact.Components.Notification.UnReadTasksCount = Unibase.Themes.Compact.Components.Notification.UnReadTasksCount - 1;
|
||||
var refguid = $('.TaskLi_' + taskid).attr('data-refid');
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().reloadPage(refguid);
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().removetask(taskid);
|
||||
});
|
||||
}
|
||||
}
|
||||
SaveTaskReason(reminderid, taskid, status) {
|
||||
let reason = $("#Reason_" + taskid).val().toString();
|
||||
var obj = { TaskId: taskid, Reason: reason, Status: status };
|
||||
Unibase.Platform.Communications.Managers.TaskManager.Instance().changeApprovalStatus(obj).then(function (response) {
|
||||
Unibase.Themes.Compact.Components.Notification.UnReadTasksCount = Unibase.Themes.Compact.Components.Notification.UnReadTasksCount - 1;
|
||||
var refguid = $('.TaskLi_' + taskid).attr('data-refid');
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().reloadPage(refguid);
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().removetask(taskid);
|
||||
});
|
||||
}
|
||||
GetRunnningProcess() {
|
||||
$(".notifications-nicescroll-bar").html("");
|
||||
}
|
||||
loadReminderDetails(id, installedappid, urltype, reminderurl, remindertype, CreateFormId, callback) {
|
||||
let reminderid = $(event.currentTarget).attr('id').split('-')[2], instance = this;
|
||||
let status = "Read";
|
||||
if (remindertype != Number(Unibase.Platform.Communications.Enums.ReminderType.Task)) {
|
||||
Unibase.Platform.Communications.Managers.ReminderManager.Instance().changeReminderStatus(reminderid, status).then(function (response) {
|
||||
$(".Reminders").remove();
|
||||
if (remindertype == Number(Unibase.Platform.Communications.Enums.ReminderType.Notification)) {
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().loadReminders();
|
||||
}
|
||||
else if (remindertype == Number(Unibase.Platform.Communications.Enums.ReminderType.Task)) {
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().loadTasks();
|
||||
}
|
||||
else if (remindertype == Number(Unibase.Platform.Communications.Enums.ReminderType.Process)) {
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().GetRunnningProcess();
|
||||
}
|
||||
});
|
||||
}
|
||||
if (urltype == "List") {
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().loadList(installedappid, null);
|
||||
}
|
||||
else if (urltype == "Details") {
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().loadDetail(id, installedappid, null);
|
||||
}
|
||||
else if (urltype == "FileDownload") {
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().Downloadfile(reminderurl);
|
||||
}
|
||||
else if (urltype == "FilePreview") {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/collaboration/components/unicloud.js", function () {
|
||||
Unibase.Apps.Collaboration.Components.UniCloud.Instance().notificationFilePreview(id);
|
||||
});
|
||||
}
|
||||
else if (urltype == "FolderPreview") {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/collaboration/components/unicloud.js", function () {
|
||||
Unibase.Apps.Collaboration.Components.UniCloud.Instance().notificationFolderPreview(id, installedappid);
|
||||
});
|
||||
}
|
||||
else if (urltype == "Create") {
|
||||
this.fileCacheHelper.loadJsFile("platform/forms/managers/formmanager.js", function () {
|
||||
Unibase.Platform.Forms.Managers.FormManager.Instance().getFormRoleByAppConfiguration(Number(CreateFormId)).then(function (response) {
|
||||
if (response.result != null) {
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().loadForm(response.result.FormId, 0, Number(CreateFormId), 0, null);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
else if (urltype == "Link") {
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().openLink(reminderurl);
|
||||
}
|
||||
instance.closeClickEvent();
|
||||
}
|
||||
closeClickEvent() {
|
||||
$('.settings-panel-head').find('.notification-viewall').html("");
|
||||
$(".biz-wrapper").removeClass("biz-settings-toggle");
|
||||
$(".hk-wrapper").removeClass("biz-settings-toggle");
|
||||
$('.hk-settings-panel').removeClass('show');
|
||||
$('.right-side-menu-content-wrap').find('.nav-item').removeClass('right-sunbnav-active');
|
||||
$('.biz-nav-fullwidth').addClass('hidden');
|
||||
}
|
||||
loadReminder_mobile(params) {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(['platform/communications/enums/reminders/remindertype.js', 'platform/communications/managers/reminders/remindermanager.js'], function () {
|
||||
let id = 0;
|
||||
let installedappid = 0;
|
||||
let createformid = 0;
|
||||
if (params.RedirectOptions == null || params.RedirectOptions == undefined) {
|
||||
installedappid = Number(params.installedappid);
|
||||
id = Number(params.recordid);
|
||||
}
|
||||
else {
|
||||
var redirectoption = params.RedirectOptions;
|
||||
if (typeof (params.RedirectOptions) == 'string') {
|
||||
if (redirectoption.includes('CreateFormId'))
|
||||
params.RedirectOptions = JSON.parse(params.RedirectOptions);
|
||||
}
|
||||
installedappid = Number(params.RedirectOptions.InstalledAppId);
|
||||
createformid = Number(params.RedirectOptions.CreateFormId);
|
||||
id = Number(params.RedirectOptions.RefId);
|
||||
}
|
||||
let urltype = params.urltype;
|
||||
let reminderurl = params.reminderurl;
|
||||
let remindertype = Number(params.remindertype);
|
||||
let reminderid = params.reminderid;
|
||||
let status = "Read";
|
||||
if (urltype == "List") {
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().closeAllModals();
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().loadList(installedappid, null);
|
||||
}
|
||||
else if (urltype == "Details") {
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().closeAllModals();
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().loadDetail(id, installedappid, null);
|
||||
}
|
||||
else if (urltype == "FileDownload") {
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().Downloadfile(reminderurl);
|
||||
}
|
||||
else if (urltype == "FilePreview") {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/collaboration/components/unicloud.js", function () {
|
||||
Unibase.Apps.Collaboration.Components.UniCloud.Instance().notificationFilePreview(id);
|
||||
});
|
||||
}
|
||||
else if (urltype == "FolderPreview") {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/collaboration/components/unicloud.js", function () {
|
||||
Unibase.Apps.Collaboration.Components.UniCloud.Instance().notificationFolderPreview(id, installedappid);
|
||||
});
|
||||
}
|
||||
else if (urltype == "Create") {
|
||||
this.fileCacheHelper.loadJsFile("platform/forms/managers/formmanager.js", function () {
|
||||
Unibase.Platform.Forms.Managers.FormManager.Instance().getFormRoleByAppConfiguration(createformid).then(function (response) {
|
||||
if (response.result != null) {
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().loadForm(response.result.FormId, 0, Number(createformid), 0, null);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
else if (urltype == "Link") {
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().openLink(reminderurl);
|
||||
}
|
||||
});
|
||||
}
|
||||
confirmclosetask(taskid, reminderid) {
|
||||
bootbox.confirm({
|
||||
title: "<span class='dstry' style='color:red'>Close Task?</span>",
|
||||
message: "Are you sure? If you are deleting this task.Then work flow will override",
|
||||
buttons: {
|
||||
cancel: {
|
||||
label: '<i class="fa fa-times"></i> Cancel'
|
||||
},
|
||||
confirm: {
|
||||
label: '<i class="fa fa-check"></i> Confirm'
|
||||
}
|
||||
},
|
||||
callback: function (result) {
|
||||
if (result) {
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().CloseTask(taskid, reminderid, "Completed");
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
CloseTask(taskid, reminderid, status) {
|
||||
var username = Unibase.Platform.Membership.Infos.Identity.currentUser.name;
|
||||
let reason = "Task is Closed by " + username;
|
||||
var obj = { TaskId: taskid, Reason: reason, Status: status };
|
||||
Unibase.Platform.Communications.Managers.TaskManager.Instance().changeApprovalStatus(obj).then(function (response) {
|
||||
Unibase.Themes.Compact.Components.Notification.UnReadTasksCount = Unibase.Themes.Compact.Components.Notification.UnReadTasksCount - 1;
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().removetask(taskid);
|
||||
});
|
||||
}
|
||||
UpdateReminderStatus(reminderid, status) {
|
||||
Unibase.Platform.Communications.Managers.ReminderManager.Instance().changeReminderStatus(reminderid, status).then(function (response) {
|
||||
var tab = undefined;
|
||||
if (isMobileApp()) {
|
||||
tab = 'tab-view';
|
||||
}
|
||||
Unibase.Themes.Compact.Components.Notification.Instance().loadReminders(tab, null);
|
||||
});
|
||||
}
|
||||
Downloadfile(url) {
|
||||
Unibase.Platform.Helpers.AssetHelper.Instance().download(url);
|
||||
}
|
||||
ViewAll(Type) {
|
||||
let installedappid = 0, instance = this;
|
||||
if (Type === Number(Unibase.Platform.Communications.Enums.ReminderType.Notification)) {
|
||||
installedappid = Unibase.Themes.Compact.Components.Notification.ReminderAppid;
|
||||
}
|
||||
else {
|
||||
installedappid = Unibase.Themes.Compact.Components.Notification.TaskReminderAppid;
|
||||
}
|
||||
if (installedappid != 0) {
|
||||
Unibase.Platform.Helpers.NavigationHelper.Instance().loadList(installedappid, null);
|
||||
}
|
||||
instance.closeClickEvent();
|
||||
}
|
||||
GetInstalledAppId(uniqueid) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result;
|
||||
Unibase.Platform.Apps.Managers.AppManager.Instance().getInstallAppId(uniqueid).then(function (response) {
|
||||
result = response;
|
||||
});
|
||||
return yield result;
|
||||
});
|
||||
}
|
||||
notaskshtml() {
|
||||
return `<div class="card text-center border-0 shadow-none w-100 notification-empty-card mb-0 bg-transparent" style="z-index:99"><div class="card-body mt-50 text-center" ><img src="tenants/themes/compact/imgs/task.png" onerror="ReloadImage(event)" class="h-200p w-200p"><p class="text-dark my-1 font-weight-600">You don't have any Tasks Right Now.</p><p class="font-14">Will notify you when Something arrives'</p> </div> <div class="card-footer text-center border-0 mb-10"><a class="btn btn-outline-primary mr-auto ml-auto" onclick="Unibase.Themes.Compact.Components.Notification.Instance().ViewAll(1)" href = "javascript:;" id = "AddWidget_btnCreateWidget">View Earlier Tasks</a></div></div>`;
|
||||
}
|
||||
noremaindershtml() {
|
||||
return `<div class="card text-center border-0 shadow-none w-100 notification-empty-card mb-0 bg-transparent" style = "z-index:99" > <div class="card-body mt-50 text-center"><img src="tenants/themes/compact/imgs/notification.png" onerror = "ReloadImage(event)" class="h-200p w-200p"><p class="text-dark my-1 font-weight-600">You don't have any Notifications yet.</p><p class="font-14">Will notify you when Something arrives'</p></div><div class="card-footer text-center border-0 mb-10"><a class="btn btn-outline-primary mr-auto ml-auto" href = "javascript:;" onclick = "Unibase.Themes.Compact.Components.Notification.Instance().ViewAll(6)" id = "AddWidget_btnCreateWidget">View Earlier Notifications</a></div></div>`;
|
||||
}
|
||||
reloadPage(refguid) {
|
||||
if (Unibase.Themes.Providers.DetailHelper.installedAppId != 0) {
|
||||
var versionguid = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_versionguid").Value;
|
||||
if (refguid == versionguid) {
|
||||
var obj = Unibase.Themes.Compact.Components.Details.Instance();
|
||||
obj._recordId = Unibase.Themes.Providers.DetailHelper.recordId;
|
||||
obj._installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
|
||||
Unibase.Themes.Compact.Components.Details.Instance().loadPortlets(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
removetask(taskid) {
|
||||
var count = 0;
|
||||
var html = Unibase.Themes.Compact.Components.Notification.Instance().notaskshtml();
|
||||
if (isMobileApp()) {
|
||||
count = Number($('#notificatonIconBadge').text()) - 1;
|
||||
$('#notificatonIconBadge').text(count);
|
||||
if (count == 0) {
|
||||
$('#notificatonIconBadge').addClass('d-none');
|
||||
$('#taskTabView').html(html);
|
||||
$(".notification-footer").addClass("d-none");
|
||||
}
|
||||
}
|
||||
else {
|
||||
count = Number($('#taskIconBadge').text()) - 1;
|
||||
$('#taskIconBadge').text(count);
|
||||
if (count == 0) {
|
||||
$('#taskIconBadge').addClass('d-none');
|
||||
$("#settings-panel-body").html(html).addClass('no-data');
|
||||
$(".notification-footer").addClass("d-none");
|
||||
}
|
||||
}
|
||||
$('#tasks_count').text(count);
|
||||
$('#notification_list_' + taskid).remove();
|
||||
$('.TaskLi_' + taskid).remove();
|
||||
}
|
||||
openLink(link) {
|
||||
var linkelement = document.createElement('a');
|
||||
linkelement.href = link;
|
||||
$(linkelement).attr("target", "_blank");
|
||||
linkelement.click();
|
||||
}
|
||||
}
|
||||
Notification.Status = "Accept";
|
||||
Notification.Reason = "Accepted";
|
||||
Notification.TaskId = 0;
|
||||
Notification.TaskReminderId = '';
|
||||
Notification.UnReadNotificationsCount = 0;
|
||||
Notification.UnReadTasksCount = 0;
|
||||
Components.Notification = Notification;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+154
@@ -0,0 +1,154 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class NotificationWidget extends Unibase.Platform.Core.BaseComponent {
|
||||
load(id, containerid, callback) {
|
||||
var instance = this;
|
||||
}
|
||||
jsFiles() {
|
||||
return ['tenants/themes/compact/components/notifications/userdesignnotificationwidget.js'];
|
||||
}
|
||||
cssFiles() {
|
||||
return [];
|
||||
}
|
||||
html(id, containerid) {
|
||||
var instance = this;
|
||||
let html = ``;
|
||||
return html;
|
||||
}
|
||||
init(containerid) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let instance = this;
|
||||
yield instance.loadnotificationDetails(containerid);
|
||||
yield instance.loadReminders(null, containerid);
|
||||
});
|
||||
}
|
||||
loadnotificationDetails(containerid) {
|
||||
let instance = this;
|
||||
let html = `<div class="card mb-0 border-0 BindData_` + containerid + ` findcontainer h-100" style="background:0 0">
|
||||
<div class="card-header py-2 px-2 border-bottom search-bar-main-wrapper viewer-header position-sticky t-0 bg-white z-index-2" id="ViewerHeader_` + containerid + `">
|
||||
<div class="card-header-top line-loader-container p-relative">
|
||||
<div class=line-loader></div>
|
||||
<div id=div_ErrorMessage class=form-error-message style=margin-left:-5px;z-index:100></div>
|
||||
<div class="d-flex align-items-center biz-highlight-bg-color widget-font text-truncate">Notifications</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body px-1 py-0 border-removed border-white-removed show userDesignWidgetCardBody simple-scroll-bar" id="Viewer_` + containerid + `" data-iscollapseapplied=false>
|
||||
<ul class="UserdesignNotifiactionDetails" id="UserdesignNotifiactionDetails"></ul>
|
||||
</div>
|
||||
<div class="border-0 card-footer d-flex justify-content-center position-sticky pt-10 z-index-2 bg-white ">
|
||||
<a class="btn btn-outline-primary btn-xs rounded-4" href="javascript:;" onclick="Unibase.Themes.Compact.Components.Notification.Instance().ViewAll(6)" id="AddWidget_btnCreateWidget"> View Earlier Notifications </a>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#' + containerid).html(html);
|
||||
if (screen.width > 1120) {
|
||||
$('#' + containerid).find(".userDesignWidgetCardBody").css("height", "308px");
|
||||
}
|
||||
}
|
||||
loadReminders(tabview, count) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let remindertype = Unibase.Platform.Communications.Enums.ReminderType.Notification;
|
||||
return yield Unibase.Platform.Communications.Managers.ReminderManager.Instance().getReminders(remindertype, 10).then(function (response) {
|
||||
let html = "";
|
||||
if (response.length != '' || response.length != 0) {
|
||||
for (let i = 0; i < response.length; i++) {
|
||||
let createformid = 0, installedappid = 0, refid = 0;
|
||||
if (response[i].RedirectOptions == null || response[i].RedirectOptions == undefined) {
|
||||
installedappid = response[i].InstalledAppId;
|
||||
refid = response[i].RefId;
|
||||
}
|
||||
else {
|
||||
createformid = response[i].RedirectOptions.CreateFormId;
|
||||
installedappid = response[i].RedirectOptions.InstalledAppId;
|
||||
refid = response[i].RedirectOptions.RefId;
|
||||
}
|
||||
let ReminderUrl = response[i].ReminderUrl;
|
||||
let IconUrl = response[i].IconUrl;
|
||||
if (IconUrl == undefined || IconUrl == null) {
|
||||
IconUrl = "tenants/themes/compact/imgs/defaultnotification.png";
|
||||
}
|
||||
if (IconUrl == "") {
|
||||
IconUrl = "tenants/themes/compact/imgs/notification.png";
|
||||
}
|
||||
let ReminderId = response[i].ReminderId;
|
||||
if (ReminderUrl == "") {
|
||||
ReminderUrl = null;
|
||||
}
|
||||
html = `<div class="rem-item-wrap notification_card widget-card p-0">
|
||||
<div class="d-flex w-100">
|
||||
<a href="javascript:void(0);" class="w-100 text-dark notification_click" id="Rem-item-${ReminderId}" data-id="${ReminderId}" onclick="Unibase.Themes.Compact.Components.Notification.Instance().loadReminderDetails(${refid},${installedappid},'${response[i].UrlType}','${ReminderUrl}',${remindertype},${createformid},null)" class="text-dark py-1 w-90">
|
||||
<div class="d-flex w-100">
|
||||
<div class="flex-grow-1 overflow-hide">
|
||||
<div class="notifications-text word-break">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="w-60p p-2 mr-1 flex-shrink-0">
|
||||
<img src="${IconUrl}" data-dynamic="1" onerror="ReloadImage(event)" class="img-fluid" data-loaded="0">
|
||||
</div>
|
||||
<div class="w-90">
|
||||
<div class="text-dark text-capitalize font-12 font-weight-600 text-truncate w-95 notification-subject" title="${response[i].Subject}">${response[i].Subject}</div>
|
||||
<div class=" word-break notifi_message_overflow">${response[i].Message} <span class="notifications-time text-secondary">-</span> <span class="notifications-time text-secondary"> ${Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocal(response[i].ReminderDate)}</div>
|
||||
</div>
|
||||
<span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>`;
|
||||
$(".UserdesignNotifiactionDetails").append(html);
|
||||
}
|
||||
}
|
||||
else {
|
||||
let emptyhtml = `<div class="card-body text-center h-295p px-0">
|
||||
<div class="biz-custom-scrollbar" style="height: -webkit-fill-available;">
|
||||
<img src="tenants/themes/compact/imgs/notification.png" onerror="ReloadImage(event)" class="h-125p w-125p">
|
||||
<p class="text-dark my-1 font-weight-600">You don't have any Notifications yet.</p>
|
||||
<p class="font-14">Will notify you when Something arrives'</p>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
$(".UserdesignNotifiactionDetails").html(emptyhtml);
|
||||
}
|
||||
$(".notification_click").click(function () {
|
||||
$(this).parents(".notification_card").remove();
|
||||
if ($(".UserdesignNotifiactionDetails").html().length == 0) {
|
||||
let emptyhtml = `<div class="card-body text-center">
|
||||
<img src="tenants/themes/compact/imgs/notification.png" onerror="ReloadImage(event)" class="h-125p w-125p">
|
||||
<p class="text-dark my-1 font-weight-600">You don't have any Notifications yet.</p>
|
||||
<p class="font-14">Will notify you when Something arrives'</p>
|
||||
</div>`;
|
||||
$(".UserdesignNotifiactionDetails").html(emptyhtml);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
if (this.instance === undefined)
|
||||
this.instance = new NotificationWidget();
|
||||
return this.instance;
|
||||
}
|
||||
}
|
||||
Components.NotificationWidget = NotificationWidget;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1,181 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class TaskWidget extends Unibase.Platform.Core.BaseComponent {
|
||||
load(id, containerid, callback) {
|
||||
var instance = this;
|
||||
}
|
||||
jsFiles() {
|
||||
return [];
|
||||
}
|
||||
cssFiles() {
|
||||
return [];
|
||||
}
|
||||
html(id, containerid) {
|
||||
var instance = this;
|
||||
let html = ``;
|
||||
return html;
|
||||
}
|
||||
init(containerid) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let instance = this;
|
||||
yield instance.loadnotificationDetails(containerid);
|
||||
yield instance.loadReminders(null, containerid);
|
||||
});
|
||||
}
|
||||
loadnotificationDetails(containerid) {
|
||||
let instance = this;
|
||||
let html = `<div class="card mb-0 border-0 BindData_` + containerid + ` findcontainer h-100" style="background:0 0">
|
||||
<div class="card-header py-2 px-2 border-bottom search-bar-main-wrapper viewer-header position-sticky t-0 bg-white z-index-2" id="ViewerHeader_` + containerid + `">
|
||||
<div class="card-header-top line-loader-container p-relative">
|
||||
<div class=line-loader></div>
|
||||
<div id=div_ErrorMessage class=form-error-message style=margin-left:-5px;z-index:100></div>
|
||||
<div class="d-flex align-items-center biz-highlight-bg-color widget-font text-truncate">Tasks</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body px-1 py-0 border-removed border-white-removed show userDesignWidgetCardBody taskDetailsCardBody simple-scroll-bar" id="Viewer_` + containerid + `" data-iscollapseapplied=false>
|
||||
<ul class="UserdesignTaskDetails" id="UserdesignTaskDetails"></ul>
|
||||
</div>
|
||||
<div class="border-0 card-footer d-flex justify-content-center position-sticky pt-10 bg-white z-index-2">
|
||||
<a class="btn btn-xs rounded-4 btn-outline-primary" onclick="Unibase.Themes.Compact.Components.Notification.Instance().ViewAll(1)" href="javascript:;" id="AddWidget_btnCreateWidget">View Earlier Tasks</a>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#' + containerid).html(html);
|
||||
if (screen.width > 1120) {
|
||||
$('#' + containerid).find(".userDesignWidgetCardBody").css("height", "308px");
|
||||
}
|
||||
}
|
||||
loadReminders(tabview, count) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let remindertype = Unibase.Platform.Communications.Enums.ReminderType.Task;
|
||||
return yield Unibase.Platform.Communications.Managers.ReminderManager.Instance().getReminders(remindertype, 10).then(function (response) {
|
||||
let html = "";
|
||||
if (response.length != '' || response.length != 0) {
|
||||
for (let i = 0; i < response.length; i++) {
|
||||
let createformid = 0, installedappid = 0, refid = 0;
|
||||
if (response[i].RedirectOptions == null || response[i].RedirectOptions == undefined) {
|
||||
installedappid = response[i].InstalledAppId;
|
||||
refid = response[i].RefId;
|
||||
}
|
||||
else {
|
||||
createformid = response[i].RedirectOptions.CreateFormId;
|
||||
installedappid = response[i].RedirectOptions.InstalledAppId;
|
||||
refid = response[i].RedirectOptions.RefId;
|
||||
}
|
||||
let ReminderUrl = response[i].ReminderUrl;
|
||||
let IconUrl = response[i].IconUrl;
|
||||
if (IconUrl == undefined || IconUrl == null) {
|
||||
IconUrl = "tenants/themes/compact/imgs/defaultnotification.png";
|
||||
}
|
||||
if (IconUrl == "") {
|
||||
IconUrl = "tenants/themes/compact/imgs/notification.png";
|
||||
}
|
||||
let ReminderId = response[i].ReminderId;
|
||||
if (ReminderUrl == "") {
|
||||
ReminderUrl = null;
|
||||
}
|
||||
html = '<div id="Taskmedia_' + ReminderId + '" class="task-list-item border-bottom border-2">' +
|
||||
'<div class="cursor-pointer d-flex pr-3 py-1 w-100" id="Rem-item-' + ReminderId + '" data-id="' + ReminderId + '" onclick="Unibase.Themes.Compact.Components.Notification.Instance().loadReminderDetails(' + refid + ',' + installedappid + ',\'' + response[i].UrlType + '\',\'' + ReminderUrl + '\',' + remindertype + ',' + createformid + ',null)">' +
|
||||
`<div class="w-60p p-2 mr-2 flex-shrink-0"><img src="${IconUrl}" data-dynamic="1" onerror="ReloadImage(event)" class="img-fluid" data-loaded="0"></div>
|
||||
<div class="notifications-text flex-grow-1 overflow-hide word-break">
|
||||
<p class="text-dark text-capitalize font-12 font-weight-600 w-95 text-truncate word-break task-subject" title="${response[i].Subject}">${response[i].Subject}</p>
|
||||
<p class="font-12 text-dark notifi_message_overflow"> ${response[i].Message}</p>
|
||||
<div class="d-flex align-items-center justify-content-between ">
|
||||
<div class="notifications-time font-12">${Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocal(response[i].ReminderDate)}</div>` +
|
||||
'<div class="btn btn-outline-primary btn-xs p-2 line-height-10" onclick="Unibase.Themes.Compact.Components.TaskWidget.Instance().LoadApprovals(\'' + response[i].RefGuid + '\',\'' + ReminderId + '\',' + response[i].TaskId + ');event.stopPropagation();"><a class="pull-right TaskCollapse_Manage' + ReminderId + ' font-12" style="text-decoration: none;" data-toggle="collapse" > Manage <i class="text-dark fa fa-angle-down"></i>' +
|
||||
`</a></div></div></div></div>
|
||||
<div class="box collaps" id="TaskcollapseManageBtn_${ReminderId}">
|
||||
</div>
|
||||
</div>`;
|
||||
$(".UserdesignTaskDetails").append(html);
|
||||
}
|
||||
}
|
||||
else {
|
||||
let emptyhtml = `
|
||||
<div class="card-body text-center h-295p px-0">
|
||||
<div class="biz-custom-scrollbar" style="height: -webkit-fill-available;">
|
||||
<img src="tenants/themes/compact/imgs/task.png" onerror="ReloadImage(event)" class="h-125p w-125p">
|
||||
<p class="text-dark my-1 font-weight-600">You don't have any Tasks Right Now.</p>
|
||||
<p class="font-14">Will notify you when Something arrives'</p>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
$(".UserdesignTaskDetails").html(emptyhtml);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
LoadApprovals(RefId, ReminderId, TaskId) {
|
||||
var html = "";
|
||||
if ($(`#taskManageBtnWrap_${ReminderId}`).length) {
|
||||
$("#TaskcollapseManageBtn_" + ReminderId).collapse('toggle');
|
||||
return;
|
||||
}
|
||||
Unibase.Platform.Communications.Managers.TaskManager.Instance().getTaskByRefId(RefId, TaskId).then(function (response) {
|
||||
if (response.result != null) {
|
||||
var Approvedbtn = "Approve";
|
||||
var Rejectbtn = "Reject";
|
||||
var rejectonclick = 'Unibase.Themes.Compact.Components.Notification.Instance().SaveTaskReason(\'' + ReminderId + '\',' + response.result.TaskId + ',\'Reject\');';
|
||||
if (response.result.ConfirmKeyText != null && response.result.ConfirmKeyText != undefined && response.result.ConfirmKeyText != "") {
|
||||
Approvedbtn = response.result.ConfirmKeyText;
|
||||
}
|
||||
if (response.result.RejectKeyText != null && response.result.RejectKeyText != undefined && response.result.RejectKeyText != "") {
|
||||
Rejectbtn = response.result.RejectKeyText;
|
||||
}
|
||||
if (Number(response.result.RejectFormId) != 0) {
|
||||
rejectonclick = 'Unibase.Themes.Compact.Components.Notification.Instance().ChangeApprovalStatus(\'' + ReminderId + '\',' + response.result.TaskId + ',\'Reject\',' + response.result.RejectFormId + ',' + response.result.RejectFormPkId + ')';
|
||||
}
|
||||
html += `<div class="d-flex justify-content-between align-items-center mb-2 mt-1 ml-3 accordion-header" id="taskManageBtnWrap_${ReminderId}">` +
|
||||
`<div>` +
|
||||
'<button class="btn btn-outline-success taskbtn_conform mr-2 ml-auto px-4 py-1 font-12" onclick="Unibase.Themes.Compact.Components.Notification.Instance().ChangeApprovalStatus(\'' + ReminderId + '\',' + response.result.TaskId + ',\'Accept\',' + response.result.ApprovalFormId + ',' + response.result.ApprovalFormPkId + ')">' + Approvedbtn + '</button>' +
|
||||
'<button class="btn btn-outline-danger mr-2 ml-auto px-4 py-1 font-12 collapsed" data-toggle="collapse" href="#collapseReject_' + ReminderId + '">' + Rejectbtn + '</button></div>' +
|
||||
'<a class="py-1 font-12 text-danger pr-25 taskbtn_end" onclick = "Unibase.Themes.Compact.Components.Notification.Instance().confirmclosetask(' + TaskId + ',\'' + ReminderId + '\')">Close</a>' +
|
||||
'</div>' +
|
||||
'<div class="collapse py-1" id="collapseReject_' + ReminderId + '" data-parent="#TaskcollapseManageBtn_' + ReminderId + '">' +
|
||||
'<div class="d-flex justify-content-start mt-1 px-3">' +
|
||||
'<input type="text" id="Reason_' + TaskId + '" class="form-control focus_blue border-0 w-75 p-0 pl-1 mr-2" placeholder="Add Comment">' +
|
||||
'<a href="javascript:void(0);" class="btn-sm btn-success px-3 ml-2 p-0 d-flex flex-row align-items-center taskbtn_send" onclick="' + rejectonclick + '">' +
|
||||
'<i class="fa fa-send-o font-11"></i>' +
|
||||
'</a>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
$(".taskDetailsCardBody #TaskcollapseManageBtn_" + ReminderId).html(html).collapse('show');
|
||||
$(".taskbtn_conform,.taskbtn_send").click(function () {
|
||||
$(this).parents(".task-list-item").remove();
|
||||
if ($(".UserdesignTaskDetails").html().length == 0) {
|
||||
let emptyhtml = `<div class="card-body text-center">
|
||||
<img src="tenants/themes/compact/imgs/task.png" onerror="ReloadImage(event)" class="h-125p w-125p">
|
||||
<p class="text-dark my-1 font-weight-600">You don't have any Tasks Right Now.</p>
|
||||
<p class="font-14">Will notify you when Something arrives'</p>
|
||||
</div>`;
|
||||
$(".UserdesignTaskDetails").html(emptyhtml);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
if (this.instance === undefined)
|
||||
this.instance = new TaskWidget();
|
||||
return this.instance;
|
||||
}
|
||||
}
|
||||
Components.TaskWidget = TaskWidget;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1,311 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Platform;
|
||||
(function (Platform) {
|
||||
let Membership;
|
||||
(function (Membership) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class PopupDetails extends Platform.Core.BaseComponent {
|
||||
init(containerid) {
|
||||
let instance = this;
|
||||
instance.load(null, containerid, null);
|
||||
}
|
||||
loadPopupDetails(containerid) {
|
||||
let instance = this;
|
||||
let invisible = "d-none";
|
||||
if (Unibase.Themes.Compact.Components.Index.Instance().isIframeObj.isDetailsPage) {
|
||||
invisible = '';
|
||||
}
|
||||
let html = `<div class="modal-content popupDetailsModal" id="popupDetailsModal">
|
||||
<div class="modal-header pb-0 border-0 ${invisible}">
|
||||
|
||||
</div>
|
||||
<div data-simplebar class="modal-body pt-0 simple-scroll-bar Create-New-Form-body-popup-body bg-white" style="height:100vh">
|
||||
<div id="div_message" class="details-err-msg"></div>
|
||||
<div class="d-flex flex-column alert alert-success mt-2 w-100">
|
||||
<div class="d-flex align-items-center justify-content-between w-100">`;
|
||||
if (!Unibase.Themes.Compact.Components.Index.Instance().isIframeObj.isForm) {
|
||||
html += `<div><a href="javascript:;" id="close-btn" class="close-btn btn btn-icon btn-flush-biz-theme btn-rounded flush-soft-hover w-30p h-30p mr-10 text-dark" data-tooltip="true" title="Close"><span class="btn-icon-wrap"><i data-icon="l"></i></span></a></div>`;
|
||||
}
|
||||
html += `<div class="alert alert-success w-100 px-0 d-flex align-items-center mb-0" role="alert"> <span><i class="la la-check-circle fa-flip la-2x"></i></span> <span class="responseMessage ml-2"></span></div>
|
||||
<a class="btn ml-3 btn-sm btn-primary popupdetails_btn_CreateTask" href="javascript:;" onclick="" id="popupdetails_btn_CreateTask"> <span class="fa fa-plus font-10 mr-1"> </span> Create </a>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between px-0 w-100 mt-20">
|
||||
<div class="popupdetails_app_defaultwidget"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card mt-10 border-0 shadow-none " style="background:#f5f5f5">
|
||||
<div class="card-header border-0 px-2 py-1 d-none">
|
||||
<span class="font-weight-500 border-bottom border-2 pb-2">Actions</span>
|
||||
</div>
|
||||
<div class="card-body d-flex align-items-center flex-wrap p-1" >
|
||||
<div class="d-flex align-items-center py-2">
|
||||
<a class="btn btn-outline-light border d-flex align-items-center mr-10 biz-highlight-bg-color font-14 popup-Edit-Form" href="javascript:;" onclick="Unibase.Platform.Helpers.NavigationHelper.Instance().loadForm(106451640000085, 100011350002141, 106450060000316)" id="btn_Edit"> <span class="fa fa-pencil line-height-0"></span><span class="ml-1 d-none d-sm-block">Edit</span></a>
|
||||
<a class="btn btn-outline-light border d-flex align-items-center mr-10 biz-highlight-bg-color font-14 popup-Details-Page" href="javascript:;" onclick="Unibase.Platform.Helpers.NavigationHelper.Instance().loadForm(106451640000085, 100011350002141, 106450060000316)" id="btn_Edit"> <span class="fa fa-pencil line-height-0"></span><span class="ml-1 d-none d-sm-block">View Details </span></a>
|
||||
<div class="div_details_stages">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<ul class=" div_detailconfigurations_headerbtns d-flex flex-wrap align-items-center">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="popupdetails-task"></div>
|
||||
|
||||
|
||||
<div class="card border-0 shadow-none mt-25 alert alert-info">
|
||||
<div class="card-header border-0 px-2 py-1 d-none">
|
||||
<span class="font-weight-500 border-bottom border-2 pb-2">Controls</span>
|
||||
</div>
|
||||
<div class=" d-flex align-items-center mt-15" >
|
||||
<div class="d-flex align-items-center c-gap-10 timeline-nav-btns" id="">
|
||||
<a href="javascript:;" class="btn btn-icon-circle btn-outline-primary btn-sm" data-tooltip="true" id="activity_comment_btn" >Comment </a>
|
||||
<a href="javascript:;" class="btn btn-icon btn-icon-circle btn-outline-primary btn-sm" data-tooltip="true" title="Call" onclick="Unibase.Platform.TimeLine.Components.TimeLine.Instance().loadform(3)"><span class="btn-icon-wrap"><i class="las la-phone font-20"></i></span></a><a href="javascript:;" class="btn btn-icon btn-icon-circle btn-outline-primary btn-sm" data-tooltip="true" title="Mail" onclick="Unibase.Platform.TimeLine.Components.TimeLine.Instance().loadform(0)"><span class="btn-icon-wrap"><i class="las la-envelope font-20"></i></span></a><a href="javascript:;" class="btn btn-icon btn-icon-circle btn-outline-primary btn-sm" data-tooltip="true" title="To Do" onclick="Unibase.Platform.TimeLine.Components.TimeLine.Instance().loadform(1)"><span class="btn-icon-wrap"><i class="las la-list font-20"></i></span></a>
|
||||
<a href="javascript:;" class="btn btn-icon btn-icon-circle btn-outline-primary btn-sm" data-tooltip="true" title="Sms" onclick="Unibase.Platform.TimeLine.Components.TimeLine.Instance().loadform(2)"><span class="btn-icon-wrap"><i class="las la-comment font-20"></i></span></a>
|
||||
<a href="javascript:;" class="btn btn-icon btn-icon-circle btn-outline-primary btn-sm" data-tooltip="true" title="Meetings" onclick="Unibase.Platform.TimeLine.Components.TimeLine.Instance().loadform(4)"><span class="btn-icon-wrap"><i class="las la-users font-20"></i></span></a></div>
|
||||
</div>
|
||||
<div class="comments_section d-none">
|
||||
<div id="timelineCommentInputWrap_div_portletwidget_106450500000046__modal_bizgaze_edit_1670578866" class="mt-20 align-items-center c-gap-10 flex-grow-1"><div class="d-flex position-relative c-gap-10 flex-grow-1"><input type="text" id="timelineCommentInput_div_portletwidget_106450500000046__modal_bizgaze_edit_1670578866" class="form-control timeline-comment-input pr-70 shadow-none" placeholder="Type Comments here....">
|
||||
<div class="d-flex align-items-center c-gap-5 absolute-top-center r-5"><a href="javascript:;" class="btn btn-flush-biz-theme btn-icon btn-file btn-rounded btn-sm flush-soft-hover d-30" data-tooltip="true" title="Upload file"><span class="btn-icon-wrap"><i class="las la-file-upload font-20"></i></span><input type="file" name="comment-file-upload"></a><a href="javascript:;" class="btn btn-flush-biz-theme btn-icon btn-rounded btn-sm flush-soft-hover d-30 save-comment-btn" data-tooltip="true" title="Save"><span class="btn-icon-wrap"><i class="las la-paper-plane font-20"></i></span></a></div></div><a href="javascript:;" id="closeCommentSearchBtn_div_portletwidget_106450500000046__modal_bizgaze_edit_1670578866" class="btn btn-icon btn-icon-circle btn-outline-danger btn-sm d-md-none"><span class="btn-icon-wrap"><i class="las la-times font-20"></i></span></a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>`;
|
||||
html += `<div class="modal-footer pa-10 ${invisible}"> <button type="button" id="newAccountFormCloseBtn" class="btn btn-light btn-sm mr-auto">Close</button>
|
||||
<button type="button" id="newAccountFormSaveBtn" class="btn btn-primary hidden btn-sm">Save</button> </div>`;
|
||||
html += `</div></div>`;
|
||||
$('#' + containerid).html(html);
|
||||
$("#activity_comment_btn").click(function () {
|
||||
$(".comments_section").removeClass("d-none");
|
||||
});
|
||||
}
|
||||
loadDetailsIfrme() {
|
||||
let instance = this;
|
||||
}
|
||||
loadDetailsForPopup(Pk_Value, installedappid, message, formid, appconfigid) {
|
||||
let instance = this;
|
||||
if (message != null) {
|
||||
$(".popupDetailsModal").find(".responseMessage").html(message);
|
||||
}
|
||||
if ((formid != null || formid != undefined) && (appconfigid != null || appconfigid != undefined)) {
|
||||
let onclickbtn = `Unibase.Platform.Helpers.NavigationHelper.Instance().loadForm(` + formid + `, 0, ` + appconfigid + `, 0, null)`;
|
||||
$("#popupdetails_btn_CreateTask").attr("onclick", onclickbtn);
|
||||
}
|
||||
var fromDate = "";
|
||||
var toDate = "";
|
||||
var cf_fromDate = Unibase.Platform.Helpers.NavigationHelper.commonFilter_FromDate;
|
||||
var cf_toDate = Unibase.Platform.Helpers.NavigationHelper.commonFilter_ToDate;
|
||||
if (cf_fromDate != null && cf_toDate != null) {
|
||||
fromDate = cf_fromDate.toString();
|
||||
toDate = cf_toDate.toString();
|
||||
}
|
||||
var expObj = {
|
||||
InstalledAppId: installedappid,
|
||||
RecordId: Pk_Value,
|
||||
FromDate: fromDate,
|
||||
ToDate: toDate
|
||||
};
|
||||
instance.fileCacheHelper.loadJsFile("platform/widgets/managers/widgetmanager.js", function () {
|
||||
Unibase.Platform.Widgets.Managers.WidgetManager.Instance().getDefaultWidget(expObj).then(function (response) {
|
||||
let data1 = response.result.Data;
|
||||
let template = response.result.TemplateText;
|
||||
let model = JSON.parse(data1);
|
||||
let containerId = Unibase.Platform.Helpers.NavigationHelper.Instance().getLastContainerId();
|
||||
let formData = response.result.AppConfigurations.filter(function (o) { return o.SettingUrlType == 1; })[0];
|
||||
let editformbtn = `Unibase.Platform.Helpers.NavigationHelper.Instance().loadForm(` + formData.FormId + `, ` + model[0].pk_id + `, ` + formData.AppConfigurationId + `, 0, null)`;
|
||||
$('#' + containerId).find(".popup-Edit-Form").attr("onclick", editformbtn);
|
||||
$('#' + containerId).on('click', function () {
|
||||
window.parent.postMessage('Edit-Form', '*');
|
||||
});
|
||||
let html = '', stagehtml = '';
|
||||
for (var i = 0; i < response.result.Stages.length; i++) {
|
||||
let data = response.result.Stages[i];
|
||||
if (data.IsDefault) {
|
||||
stagehtml += `<button class="border btn btn-outline-light font-weight-500 no-caret font-14 btn btnChangeStage mr-10 text-dark h-100 d-flex align-items-center" data-toggle="dropdown" style="padding: 0px 15px;"><i class="fa fa-check-circle-o statuscircle pull-left " style="color: cyan;"></i>${data.StageName}<i class="fa fa-angle-down pull-right font-16"></i></button>`;
|
||||
}
|
||||
if (Unibase.Platform.Membership.Infos.Identity.getCurrentUser().isAdmin) {
|
||||
html += `<a class="dropdown-item" onclick="Unibase.Themes.Compact.Components.Details.Instance().change(${data.StageId}, ${data.InstalledAppId})" data-stageindex="${data.StageIndex}" data-stageid="${data.StageId}" data-stageList_Name="${data.StageName}" data-inastalledappid="${data.InstalledAppId}" href="javascript:void();">${data.StageName}</a>`;
|
||||
}
|
||||
else {
|
||||
if (data.ChangeAll && data.StageRoles == null) {
|
||||
html += `<a class="dropdown-item" onclick="Unibase.Themes.Compact.Components.Details.Instance().change(${data.StageId}, ${data.InstalledAppId})" data-stageindex="${data.StageIndex}" data-stageid="${data.StageId}" data-stageList_Name="${data.StageName}" data-inastalledappid="${data.InstalledAppId}" href="javascript:void();">${data.StageName}</a>`;
|
||||
}
|
||||
if (data.StageRoles != null && data.StageRoles.length != 0) {
|
||||
for (var j = 0; j < data.StageRoles.length; j++) {
|
||||
if (data.ChangeAll && (!data.StageRoles[j].ExcludeChangeRole)) {
|
||||
html += `<a class="dropdown-item" onclick="Unibase.Themes.Compact.Components.Details.Instance().change(${data.StageId}, ${data.InstalledAppId})" data-stageindex="${data.StageIndex}" data-stageid="${data.StageId}" data-stageList_Name="${data.StageName}" data-inastalledappid="${data.InstalledAppId}" href="javascript:void();">${data.StageName}</a>`;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (data.ChangeAll == false && data.StageRoles != null && data.StageRoles.length > 0) {
|
||||
html += `<a class="dropdown-item" onclick="Unibase.Themes.Compact.Components.Details.Instance().change(${data.StageId}, ${data.InstalledAppId})" data-stageindex="${data.StageIndex}" data-stageid="${data.StageId}" data-stageList_Name="${data.StageName}" data-inastalledappid="${data.InstalledAppId}" href="javascript:void();">${data.StageName}</a>`;
|
||||
}
|
||||
}
|
||||
}
|
||||
$('#' + containerId).find('.div_details_stages').html(`${stagehtml}<div class="layout-details-stages dropdown-menu dropdown-menu-right">${html}</div>`);
|
||||
let inptParamter = JSON.parse(response.result.Data)[0];
|
||||
Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters = [];
|
||||
for (const property in inptParamter) {
|
||||
Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.push({
|
||||
Key: "hf_" + installedappid + "_" + property.toLowerCase(),
|
||||
Value: inptParamter[property],
|
||||
DataType: typeof (inptParamter[property])
|
||||
});
|
||||
}
|
||||
Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.push({
|
||||
Key: "hf_" + installedappid + "_" + "recordid",
|
||||
Value: Pk_Value.toString(),
|
||||
DataType: typeof (Pk_Value)
|
||||
});
|
||||
instance.fileCacheHelper.loadJsFile("platform/core/helpers/token/tokenhelper.js", function () {
|
||||
let htmlcontent = Unibase.Core.Helpers.TokenHelper.Instance().replace(template, model[0]);
|
||||
$('#' + containerId).find(".popupdetails_app_defaultwidget").html(htmlcontent);
|
||||
$('#' + containerId).find(".popupdetails_app_defaultwidget .biz-detail-avatar").remove();
|
||||
if ($('#' + containerId).find(".popupdetails_app_defaultwidget .biz-header-sub-text").hasClass("d-flex")) {
|
||||
$('#' + containerId).find(".popupdetails_app_defaultwidget .biz-header-sub-text").addClass("flex-column").removeClass("flex-row flex-wrap");
|
||||
$('#' + containerId).find(".popupdetails_app_defaultwidget .biz-header-sub-text .fa-rupee").addClass("font-10");
|
||||
}
|
||||
$('#' + containerId).find(".popupdetails_app_defaultwidget .app_defaultwidget").find(".ml-2").removeClass("ml-2");
|
||||
$('#' + containerId).find(".popupdetails_app_defaultwidget .app_defaultwidget").find(".d-none.d-sm-block").removeClass("d-none d-sm-block");
|
||||
});
|
||||
var obj = Unibase.Themes.Compact.Components.Details.Instance();
|
||||
if (response.status != Unibase.Data.Status.Error) {
|
||||
if (response.result != null) {
|
||||
var data = response.result.Data;
|
||||
var templatetext = response.result.TemplateText;
|
||||
var stages = response.result.Stages;
|
||||
var installedappinfo = response.result.InstalledApp;
|
||||
var statusinfo = response.result.Status;
|
||||
var permission = response.result.EditScreenPermission;
|
||||
if (data != null && data != "") {
|
||||
if (templatetext != null) {
|
||||
var icon = '';
|
||||
if (response.result.AppConfigurations.length > 0) {
|
||||
var confightml = "";
|
||||
$('#popupDetailsModal').find('.div_detailconfigurations_headerbtns').html('');
|
||||
var appconfigurations = response.result.AppConfigurations;
|
||||
for (var i = 0; i < appconfigurations.length; i++) {
|
||||
if (appconfigurations[i].AppConfigType == Unibase.Platform.Apps.Enums.AppConfigeType.DetailSetting) {
|
||||
instance.settingsURL = appconfigurations[i].SettingUrl;
|
||||
instance.functionURL = appconfigurations[i].JsFunction;
|
||||
confightml = "";
|
||||
var onclickurl = "";
|
||||
var settingname = appconfigurations[i].SettingName;
|
||||
var description = appconfigurations[i].Description;
|
||||
var sname = settingname.replace(/ /g, '');
|
||||
if (description != null && description != "" && description != undefined) {
|
||||
description = appconfigurations[i].Description;
|
||||
}
|
||||
else {
|
||||
description = appconfigurations[i].SettingName;
|
||||
}
|
||||
icon = appconfigurations[i].Icon;
|
||||
if (appconfigurations[i].SettingUrlType == Unibase.Platform.Apps.Enums.SettingUrlType.Form && appconfigurations[i].AppConfigType == Unibase.Platform.Apps.Enums.AppConfigeType.DetailSetting) {
|
||||
onclickurl = "onclick='Unibase.Platform.Helpers.NavigationHelper.Instance().loadDetailSettingForm(" + appconfigurations[i].FormId + ", " + obj._recordId + ", " + appconfigurations[i].AppConfigurationId + ")'";
|
||||
}
|
||||
if (appconfigurations[i].SettingUrlType == Unibase.Platform.Apps.Enums.SettingUrlType.JsFunction) {
|
||||
onclickurl = "";
|
||||
}
|
||||
if (appconfigurations[i].Icon != null && appconfigurations[i].Icon != "null" && appconfigurations[i].Icon != "") {
|
||||
confightml += '<li class="mt-5 mb-5 mr-2 li_DetailSetting_' + installedappid + '_' + sname + '" id="li_DetailSetting_' + installedappid + '_' + sname + '"><a href="javascript:;" class="font-12 font-md-14 btn btn-sm';
|
||||
confightml += ' btn-outline-primary ';
|
||||
confightml += ' DetailSetting_' + installedappid + '_' + sname + '" id="DetailSetting_' + installedappid + '_' + sname + '" ' + onclickurl + '">' + '<span class="' + appconfigurations[i].Icon + ' line-height-0" > </span> ' + settingname + '</a></li>';
|
||||
}
|
||||
else {
|
||||
confightml += '<li class="mt-5 mb-5 mr-2 li_DetailSetting_' + installedappid + '_' + sname + '" id="li_DetailSetting_' + obj._installedAppId + '_' + sname + '"><a href="javascript:;" class="font-12 font-md-14 btn btn-sm';
|
||||
confightml += ' btn-outline-primary ';
|
||||
confightml += ' DetailSetting_' + installedappid + '_' + sname + '" id="DetailSetting_' + obj._installedAppId + '_' + sname + '" ' + onclickurl + '">' + settingname + '</a></li>';
|
||||
}
|
||||
$('#popupDetailsModal').find('.div_detailconfigurations_headerbtns').append(confightml);
|
||||
}
|
||||
}
|
||||
instance.fileCacheHelper.loadJsFile(instance.settingsURL, function () { });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
let detailpage = `Unibase.Platform.Helpers.NavigationHelper.Instance().loadDetail(` + Pk_Value + `, ` + installedappid + `, null, null)`;
|
||||
$(".popup-Details-Page").attr("onclick", detailpage);
|
||||
$(".popup-Edit-Form, .popup-Details-Page").click(function () {
|
||||
instance.navigationHelper.closePopUp();
|
||||
});
|
||||
debugger;
|
||||
instance.fileCacheHelper.loadJsFile("platform/widgets/managers/widgetmanager.js", function () { });
|
||||
}
|
||||
LoadApprovals(id, InstalledAppId) {
|
||||
var VersionGuid = "";
|
||||
for (let obj of Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters) {
|
||||
if (obj.Key === "hf_" + InstalledAppId + "_versionguid") {
|
||||
VersionGuid = obj.Value.toString();
|
||||
}
|
||||
}
|
||||
Unibase.Platform.Communications.Managers.TaskManager.Instance().getTasksByRefId(VersionGuid).then(function (response) {
|
||||
var data = response.result;
|
||||
if (data != null && data.length != 0) {
|
||||
$('#div_App_DefaultWidgetSettings').parent().addClass('bg-white');
|
||||
var html = '';
|
||||
var confirmtext = "";
|
||||
var rejecttext = "";
|
||||
var rejectonclick = "";
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var j = i + 1;
|
||||
confirmtext = "Confirm";
|
||||
rejecttext = "Reject";
|
||||
rejectonclick = 'Unibase.Themes.Compact.Components.Details.Instance().SaveTaskReason(' + data[i].TaskId + ',\'Reject\')';
|
||||
if (data[i].ConfirmKeyText != null && data[i].ConfirmKeyText != undefined && data[i].ConfirmKeyText != "") {
|
||||
confirmtext = data[i].ConfirmKeyText;
|
||||
}
|
||||
if (data[i].RejectKeyText != null && data[i].RejectKeyText != undefined && data[i].RejectKeyText != "") {
|
||||
rejecttext = data[i].RejectKeyText;
|
||||
}
|
||||
if (Number(data[i].RejectFormId) != 0) {
|
||||
rejectonclick = 'Unibase.Themes.Compact.Components.Details.Instance().ChangeApprovalStatus(' + data[i].TaskId + ', \'Reject\',' + data[i].RejectFormId + ',' + data[i].RejectFormPkId + ')';
|
||||
}
|
||||
html += '<li class="task rounded mb-2 font-14 pb-10" id="notification_list_' + data[i].TaskId + '"style="background-color:rgb(252 250 247);border-left: 3px solid #ff6060;padding:0.5rem 1rem 1rem;">' +
|
||||
'<div class="d-flex flex-column"><div class="d-flex justify-content-between"><span class="mb-1 list-item-main-title">' + data[i].Subject + '</span>' +
|
||||
'</div><p class="font-14 mb-2 text-dark">' + data[i].Body + '</p><span><a id="btn_Approve_' + data[i].TaskId + '" class="font-12 px-3 btn btn-outline-success btn-sm mr-10" href="javascript:;" onclick="Unibase.Themes.Compact.Components.Details.Instance().ChangeApprovalStatus(' + data[i].TaskId + ',\'Accept\',' + data[i].ApprovalFormId + ',' + data[i].ApprovalFormPkId + ')">' + confirmtext + '</a>' +
|
||||
'<a id="btn_Reject_' + data[i].TaskId + '" class="font-12 px-3 btn btn-outline-danger btn-sm mr-2" href="javascript:;" onclick="Unibase.Themes.Compact.Components.Details.Instance().ChangeRejectStatus(' + data[i].TaskId + ')">' + rejecttext + '</a><a id="btn_close_' + data[i].TaskId + '" class="font-12 px-3 btn btn-outline-primary btn-sm mr-2" style="position:absolute;right:50px" href="javascript:;" onclick="Unibase.Themes.Compact.Components.Details.Instance().confirmclosetask(' + data[i].TaskId + ')">Close</a>' +
|
||||
'<span></div><div id="Reason_' + data[i].TaskId + '" class="d-none align-items-center"><div class="w-75 mr-3"><div class="input-group"><textarea id="textarea_Reason_' + data[i].TaskId + '" class="type-control form-control value-control floating-label-control" placeholder="Reason" data-placeholder="Enter Reason" data-label="Reason"></textarea></div></div>' +
|
||||
'<div><button id="btnSaveReason" class="btn btn-primary btn-sm pull-right" onclick="' + rejectonclick + '">Save</button></div></div></li>';
|
||||
}
|
||||
$(".popupdetails-task").html(html);
|
||||
$(".span_notification_count").text(data.length);
|
||||
}
|
||||
});
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
var instance = this;
|
||||
instance.loadPopupDetails(containerid);
|
||||
$(`#newAccountFormCloseBtn, .close-btn`).click(function () {
|
||||
instance.navigationHelper.closePopUp();
|
||||
window.parent.postMessage('clickToBack', '*');
|
||||
});
|
||||
}
|
||||
jsFiles() {
|
||||
return ['tenants/themes/compact/components/popupdetails/popupdetails.js', 'tenants/themes/compact/components/details/details.js', 'platform/timeline/components/timeline.js'];
|
||||
}
|
||||
cssFiles() {
|
||||
return [];
|
||||
}
|
||||
html(id, containerid) {
|
||||
var instance = this;
|
||||
let html = ``;
|
||||
return html;
|
||||
}
|
||||
static Instance() {
|
||||
if (this.instance === undefined)
|
||||
this.instance = new PopupDetails();
|
||||
return this.instance;
|
||||
}
|
||||
}
|
||||
Components.PopupDetails = PopupDetails;
|
||||
})(Components = Membership.Components || (Membership.Components = {}));
|
||||
})(Membership = Platform.Membership || (Platform.Membership = {}));
|
||||
})(Platform = Unibase.Platform || (Unibase.Platform = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1,301 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class HomeAffairsRegisterUser extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
return ["tenants/themes/compact/index.anonymous.js", "platform/membership/managers/accountmanager.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
}
|
||||
cssFiles() {
|
||||
return ["libs/passwordrequirement/passwordrequirement.css"];
|
||||
}
|
||||
html(id, containerid) {
|
||||
let asset_url = _appsettings.asset_url();
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
let bg_image;
|
||||
if (($(window).width()) > 1200) {
|
||||
bg_image = 'homeaffariesdesktopbg.jpg';
|
||||
}
|
||||
else {
|
||||
bg_image = 'homeaffariesmobilebg.jpg';
|
||||
}
|
||||
const html = `<div class="row p-4" id="frm_RegisterUser_homeaffairs" style="background:url('` + asset_url + `tenants/themes/compact/imgs/homeaffairs/` + bg_image + `');background-size:cover;height: 100vh;"><div class="col-xl-5"><div class="banner-img-container h-100 d-flex align-items-center justify-content-center pl-md-145"><img src="` + asset_url + `tenants/themes/compact/imgs/homeaffairs/aa.png" alt="img" class="img-fluid"> </div></div><div class="col-xl-7 d-flex justify-content-center align-items-center"><form default="" data-validate="parsley" data-isdynamic="false"><div id="div_ValidationSummary"></div><div id="div_RegisterUser"><h1 class="display-4 mb-30 text-center text-white">Registration</h1><div class="alert alert-primary d-none">We will send new code to your <a href=""><u>Email or Phone</u></a> to create your password.</div><div class="form-group"><input class="form-control" required autocomplete="off" placeholder="Enter Registered Email or Phone" id="txt_EmailorPhone" type="text"></div>
|
||||
<div class="form-group floating-label-form-group floating-label-form-group-with-value focus" id="div_TenantsAutoComplete">
|
||||
<select id="ddl_Tenant" class="form-control value-control" data-isdynamic="false"></select></div><button class="btn btn-primary btn-block border-0" type="button" id="btn_SendOtp" style="background:#001F5D;padding: 10px !important;">Confirm</button><p class="text-right mt-20"><a href="Index.html#/login">Back to login</a></p></div><div id="div_CreatePswd" class="d-none"><h1 class="display-5 mb-30 text-center">Create your Password</h1><div class="form-group"><label class="form-control" id="lbl_Email"></label></div><div class="form-group"><input class="form-control pr-password " required id="txt_NewPswd" placeholder="New password" type="password" autocomplete="new-password"><span toggle="#txt_NewPswd" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span><div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control" required id="txt_ConfirmPswd" placeholder="Re-enter new password" type="password" autocomplete="new-password"><span toggle="#txt_ConfirmPswd" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><button class="btn btn-primary btn-block mb-20" type="button" id="btn_CreatePswd">Create Password</button><p class="text-right"><a href="Index.html#/login">Back to login</a></p></div><div id="div_SuccessMsg" class="d-none"><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div><h1 class="display-4 mb-20 text-center">Password Created Successfully</h1><p class="text-center"><a href="Index.html#/login">Click here to Login</a></p></div></form><div><div id="modal_Otp" class="modal fade hide"><div class="modal-dialog"><div class="modal-content"><div class="modal-header mt-2 mb-2"><h5 class="modal-title pull-left">Mobile or Email Verification</h5><button type="button" class="btn btn-primary btn-simple pull-right" data-dismiss="modal" aria-hidden="true" >×</button></div><div class="modal-body" id="div_modalbody"><div class="mb-10"><p class="lbl_Otp">We have sent OTP on your Mobile Number and Email!</p></div><div class="floating-label-form-group mb-2"><input class="form-control" id ="txt_Otp" placeholder="Enter Mobile OTP/Email OTP" type="password" autocomplete="new-password"><span toggle="#txt_Otp" id="OtpHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div></div><div class="modal-footer mb-2" style="display:block"><button type = "button" class="btn btn-primary pull-left" id="btn_ResendOtp">Resend</button><button type = "button" class="btn btn-primary pull-right" id="btn_VerifyOtp">Verify</button></div></div></div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
this._accountManager = yield Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
yield this.loadTenants(callback);
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#div_modalbody").removeAttr("style");
|
||||
$(".pr-password").click(function () {
|
||||
var signUpPswd = $(".pr-password");
|
||||
signUpPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
$("#passwordHide").click(function () {
|
||||
var input = $('#txt_NewPswd');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$("#passwordHide").toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#confirmPasswordHide").click(function () {
|
||||
var input = $('#txt_ConfirmPswd');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#confirmPasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#OtpHide").click(function () {
|
||||
var input = $('#txt_Otp');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#OtpHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#txt_EmailorPhone").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_SendOtp").click();
|
||||
});
|
||||
$("#txt_Otp").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_VerifyOtp").click();
|
||||
});
|
||||
$("#txt_NewPswd,#txt_ConfirmPswd").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_CreatePswd").click();
|
||||
});
|
||||
var instance = this;
|
||||
$("#btn_SendOtp").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
$("#btn_CreatePswd").click(function () {
|
||||
instance.createPassword();
|
||||
});
|
||||
$("#btn_VerifyOtp").click(function () {
|
||||
instance.verifyOtp();
|
||||
});
|
||||
$("#btn_ResendOtp").click(function () {
|
||||
instance.sendOtp(instance.OtpId);
|
||||
});
|
||||
if (callback != null)
|
||||
callback();
|
||||
});
|
||||
}
|
||||
loadTenants(callback) {
|
||||
var instance = this;
|
||||
instance._accountManager.getTenants().then(function (response) {
|
||||
var res = response;
|
||||
let cmbLob = document.getElementById('ddl_Tenant');
|
||||
$('#ddl_Tenant').empty();
|
||||
$('#ddl_Tenant').append('<option value=0>Select Tenant</option>');
|
||||
for (var i = 0; i < response.result.length; i++) {
|
||||
var data = response.result[i];
|
||||
var opt = document.createElement("option");
|
||||
var Name = data.tenantName;
|
||||
var id = data.tenantId;
|
||||
opt.text = Name;
|
||||
opt.value = id;
|
||||
cmbLob.append(opt);
|
||||
}
|
||||
if (res.result.filter(x => x.isTemplateDb == false).length == 1) {
|
||||
var Id = $('#ddl_Tenant option[value=' + res.result.filter(x => x.isTemplateDb == false)[0].tenantId + ']');
|
||||
Id.attr("selected", true);
|
||||
$("#ddl_Tenant").prop('disabled', true);
|
||||
}
|
||||
if (callback != null) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
validate() {
|
||||
$(".lbl_Otp").text("");
|
||||
$("#txt_Otp").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
var phoneOrEmail = $("#txt_EmailorPhone").val();
|
||||
var tenantId = $("#ddl_Tenant option:selected").val();
|
||||
if (phoneOrEmail == "" && tenantId == 0) {
|
||||
MessageHelper.Instance().showError("Please enter Email/Phone and select a Tenant !", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (phoneOrEmail == "") {
|
||||
MessageHelper.Instance().showError("Email or Phone cannot be Empty!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (tenantId == 0) {
|
||||
MessageHelper.Instance().showError("Please select a Tenant", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
var instance = this;
|
||||
instance._accountManager.getContact(phoneOrEmail, tenantId).then(function (response) {
|
||||
if (response.result != null) {
|
||||
instance.Email = response.result.emailAddress;
|
||||
instance.ContactNumber = response.result.phoneNumber;
|
||||
instance.UserName = response.result.unibaseId;
|
||||
instance.TenantId = response.result.tenantId;
|
||||
instance.ContactName = response.result.userName;
|
||||
$(".lbl_Otp").removeClass('text-danger text-success').text("We have sent OTP on your Mobile Number and Email !");
|
||||
$("#txt_Otp").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
instance.sendOtp(0);
|
||||
}
|
||||
else {
|
||||
MessageHelper.Instance().showError(response.message, "div_ValidationSummary");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
sendOtp(IsResend) {
|
||||
var instance = this;
|
||||
$(".preloader-it").fadeIn();
|
||||
var postData = {
|
||||
ContactOrEmail: $("#txt_EmailorPhone").val(),
|
||||
FirstName: instance.ContactName,
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
IsSignup: false,
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: true,
|
||||
UnibaseId: instance.UserName,
|
||||
OtpId: IsResend,
|
||||
UserOtp: ""
|
||||
};
|
||||
instance._accountManager.sendOtp(postData).then(function (response) {
|
||||
if (IsResend != 0) {
|
||||
$(".lbl_Otp").text("OTP has been Resent!").removeClass('text-danger', '').addClass('text-success', '');
|
||||
}
|
||||
if (response == 0) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
instance.OtpId = response;
|
||||
$("#modal_Otp").modal("show");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
verifyOtp() {
|
||||
var instance = this;
|
||||
if ($("#txt_Otp").val() == "")
|
||||
$(".lbl_Otp").text("Please Enter OTP!").addClass('text-danger', '');
|
||||
else {
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: "",
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: false,
|
||||
IsSignup: true,
|
||||
UnibaseId: "",
|
||||
OtpId: instance.OtpId,
|
||||
UserOtp: $("#txt_Otp").val(),
|
||||
};
|
||||
instance._accountManager.verifyOtp(postData).then(function (response) {
|
||||
if (response.code.toString() == "2") {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass('text-danger', '');
|
||||
$("#txt_Otp").val('');
|
||||
}
|
||||
else if (response.result != null) {
|
||||
if (response.result.contactConfirmed == false && response.result.emailConfirmed == false) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Invalid OTP!").addClass('text-danger', '');
|
||||
$("#txt_Otp").text('');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").fadeIn();
|
||||
$("#div_RegisterUser").addClass('d-none');
|
||||
$("#modal_Otp").modal("hide");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#lbl_Email").text($("#txt_EmailorPhone").val());
|
||||
$("#div_CreatePswd").removeClass('d-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
createPassword() {
|
||||
var instance = this;
|
||||
$("#div_ValidationSummary").empty();
|
||||
var confirmPassword = $("#txt_ConfirmPswd").val();
|
||||
var password = $("#txt_NewPswd").val();
|
||||
if (password.length == 0 || confirmPassword.length == 0) {
|
||||
MessageHelper.Instance().showError("Password fields cannot be empty!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (password.length < 8 || confirmPassword.length < 8) {
|
||||
MessageHelper.Instance().showError("Password must be atleast 8 characters!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (password != confirmPassword) {
|
||||
MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
var password = password;
|
||||
var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
|
||||
var checkpassword = password.match(decimal) ? true : false;
|
||||
if (checkpassword == false) {
|
||||
$(".pr-password").focus();
|
||||
MessageHelper.Instance().showError("Please Match the Password in requested Format", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
var postData = {
|
||||
Password: $("#txt_NewPswd").val(),
|
||||
UserName: instance.UserName,
|
||||
Email: instance.Email,
|
||||
ContactNumber: instance.ContactNumber,
|
||||
TenantId: instance.TenantId,
|
||||
};
|
||||
instance._accountManager.registerUser(postData).then(function (response) {
|
||||
if (response.errors == null) {
|
||||
$("#div_CreatePswd").addClass('d-none');
|
||||
$("#div_SuccessMsg").removeClass('d-none');
|
||||
MessageHelper.Instance().showSuccess("Password Created Successfully", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError(response.errors[0], "div_ValidationSummary");
|
||||
}
|
||||
});
|
||||
}
|
||||
submit() {
|
||||
}
|
||||
static Instance() {
|
||||
return new HomeAffairsRegisterUser();
|
||||
}
|
||||
}
|
||||
Components.HomeAffairsRegisterUser = HomeAffairsRegisterUser;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,291 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class MobilNewRegisterUser extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
return ["tenants/themes/compact/index.mobil_anonymous.js", "platform/membership/managers/accountmanager.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
}
|
||||
cssFiles() {
|
||||
return ["libs/passwordrequirement/passwordrequirement.css"];
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Mobil_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
let html = '';
|
||||
if (($(window).width()) > 1200) {
|
||||
html += `<div class="row h-100"> <div class="col-xl-5"><div class="banner-img-container h-100"><img src="tenants/themes/compact/imgs/mobil-desktop-view-bg.png" alt="img" class="h-100 w-100"> </div> </div> <div class="col-xl-7 desktop-view"> <form class="mt-100" id="frm_RegisterUser" default="" data-validate="parsley" data-isdynamic="false"> <div id="div_ValidationSummary"></div> <div id="div_RegisterUser"><h1 class="display-4 mb-30 text-dark-100 text-center">Registration</h1>
|
||||
<div class="alert alert-primary d-none">We will send new code to your <a href=""><u>Email or Phone</u></a> to create your password.</div> <div class="form-group"><input class="form-control" required placeholder="Enter Registered Phone Number" id="txt_EmailorPhone" type="text"></div> <div class="form-group floating-label-form-group floating-label-form-group-with-value focus" id="div_TenantsAutoComplete"><select id="ddl_Tenant" class=" form-control value-control" data-isdynamic="false"></select></div><button class="btn text-white btn-block" type="button" id="btn_SendOtp" style="background:#001F5D;">Confirm</button><p class="text-right mt-20"><a href="Index.html#/login">Back to login</a></p></div> <div id="div_CreatePswd" class="d-none"> <h1 class="display-5 mb-30 text-center">Create your Password</h1>
|
||||
<div class="form-group"><label class="form-control" id="lbl_Email"></label></div><div class="form-group"><input class="form-control pr-password " required id="txt_NewPswd" placeholder="New password" type="password"><span toggle="#txt_NewPswd" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span>
|
||||
<div class="showpwsdreq"></div> </div> <div class="form-group"><input class="form-control" required id="txt_ConfirmPswd" placeholder="Re-enter new password" type="password" autocomplete="new-password"><span toggle="#txt_ConfirmPswd" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div>
|
||||
<button class="btn text-white btn-block mb-20" disabled="disabled" type="button" id="btn_CreatePswd" style="background:#001F5D;">Create Password</button> <div class="input-group mb-20"><div class="custom-control custom-checkbox col-xs"><input class="custom-control-input" id="InputTermsandConditions" type="checkbox"><label class="custom-control-label font-14" for="InputTermsandConditions">I accept the terms & conditions</label></div></div><p class="text-right"><a href="Index.html#/login">Back to login</a></p></div> <div id="div_SuccessMsg" class="d-none"> <div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div> <h1 class="display-4 mb-20 text-center">Password Created Successfully</h1> <p class="text-center"><a href="Index.html#/login">Click here to Login</a></p> </div></form> </div></div>`;
|
||||
}
|
||||
else {
|
||||
html += `<div><form id="frm_RegisterUser" default="" class="p-4 " data-validate="parsley" data-isdynamic="false" style="background: url(tenants/themes/compact/imgs/mobil-background.png) no-repeat;"><div id="div_ValidationSummary" class="position-fixed w-85"></div><div id="div_RegisterUser"> <div class="d-flex flex-column justify-content-around p-3 mt-4" style="height:100vh"> <div class="form-group-body"> <div class=" mx-auto mb-20"><h1 class="display-4 mb-60 text-white text-center font-weight-bold">Registration</h1></div> <div class="alert alert-primary d-none">We will send new code to your <a href=""><u>Email or Phone</u></a> to create your password.</div><div class="form-group mb-20"><input class="form-control" required autocomplete="off" placeholder="Enter Registered Email or Phone" id="txt_EmailorPhone" type="text"></div><div class="form-group floating-label-form-group floating-label-form-group-with-value focus" id="div_TenantsAutoComplete"><select id="ddl_Tenant" class="form-control value-control" data-isdynamic="false"></select></div> <p class="text-right "><a href="Index.html#/login" class="text-white">Back to login</a></p> </div> <div class="footer-register"><button class="btn btn-block rounded-10 text-white" type="button" style="background:#001F5D; padding: 10px !important;" id="btn_SendOtp">Confirm</button> </div> </div></div><div id="div_CreatePswd" class="d-none"><div class="d-flex flex-column justify-content-around" style="height: 100vh"> <div class="form-group"> <h1 class="display-5 text-white my-50 font-weight-bold text-center">Create your Password</h1><div class="form-group"><input class="form-control pr-password" required id="txt_NewPswd" placeholder="New password" type="password" autocomplete="new-password"><span toggle="#txt_NewPswd" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span> <div class="showpwsdreq"></div></div> <div class="form-group"><input class="form-control" required id="txt_ConfirmPswd" placeholder="Re-enter new password" type="password" autocomplete="new-password"><span toggle="#txt_ConfirmPswd" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div></div> <div class="form-footer"> <button class="btn btn-primary btn-block mb-20 rounded-10" type="button" id="btn_CreatePswd" style="background:#001F5D; padding: 10px !important;">Create Password</button> </div> </div></div> <div id="div_SuccessMsg" class="d-none"> <div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div> <h1 class="display-4 mb-20 text-center">Password Created Successfully</h1> <p class="text-center"><a href="Index.html#/login">Click here to Login</a></p></div></form></div>`;
|
||||
}
|
||||
html += `<div id="modal_Otp" class="modal fade hide"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header mt-2 mb-2"> <h5 class="modal-title pull-left">Mobile or Email Verification</h5><button type="button" class="btn btn-primary btn-simple pull-right" data-dismiss="modal" aria-hidden="true">×</button></div> <div class="modal-body" id="div_modalbody"> <div class="mb-10"> <p class="lbl_Otp">We have sent OTP on your Mobile Number and Email!</p> </div> <div class="floating-label-form-group mb-2"><input class="form-control" id="txt_Otp" placeholder="Enter Mobile OTP/Email OTP" type="password" autocomplete="new-password"><span toggle="#txt_Otp" id="OtpHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div> </div> <div class="modal-footer mb-2" style="display:block"><button type="button" class="btn btn-primary pull-left" id="btn_ResendOtp">Resend</button><button type="button" class="btn btn-primary pull-right" id="btn_VerifyOtp">Verify</button></div> </div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
this.loadTenants();
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#div_modalbody").removeAttr("style");
|
||||
$(".pr-password").click(function () {
|
||||
var signUpPswd = $(".pr-password");
|
||||
signUpPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
$("#passwordHide").click(function () {
|
||||
var input = $('#txt_NewPswd');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$("#passwordHide").toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#confirmPasswordHide").click(function () {
|
||||
var input = $('#txt_ConfirmPswd');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#confirmPasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#OtpHide").click(function () {
|
||||
var input = $('#txt_Otp');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#OtpHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#txt_EmailorPhone").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_SendOtp").click();
|
||||
});
|
||||
$("#txt_Otp").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_VerifyOtp").click();
|
||||
});
|
||||
$("#txt_NewPswd,#txt_ConfirmPswd").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_CreatePswd").click();
|
||||
});
|
||||
var instance = this;
|
||||
$("#btn_SendOtp").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
$(".btn_SendOtp").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
$("#btn_CreatePswd").click(function () {
|
||||
instance.createPassword();
|
||||
});
|
||||
$("#btn_VerifyOtp").click(function () {
|
||||
instance.verifyOtp();
|
||||
});
|
||||
$("#btn_ResendOtp").click(function () {
|
||||
instance.sendOtp(instance.OtpId);
|
||||
});
|
||||
if (callback != null)
|
||||
callback();
|
||||
}
|
||||
loadTenants() {
|
||||
var instance = this;
|
||||
instance._accountManager.getTenants().then(function (response) {
|
||||
var res = response;
|
||||
let cmbLob = document.getElementById('ddl_Tenant');
|
||||
$('#ddl_Tenant').empty();
|
||||
$('#ddl_Tenant').append('<option value=0>Select Tenant</option>');
|
||||
for (var i = 0; i < response.result.length; i++) {
|
||||
var data = response.result[i];
|
||||
var opt = document.createElement("option");
|
||||
var Name = data.tenantName;
|
||||
var id = data.tenantId;
|
||||
opt.text = Name;
|
||||
opt.value = id;
|
||||
cmbLob.append(opt);
|
||||
}
|
||||
if (res.result.filter(x => x.isTemplateDb == false).length == 1) {
|
||||
var Id = $('#ddl_Tenant option[value=' + res.result.filter(x => x.isTemplateDb == false)[0].tenantId + ']');
|
||||
Id.attr("selected", true);
|
||||
$("#ddl_Tenant").prop('disabled', true);
|
||||
}
|
||||
});
|
||||
}
|
||||
validate() {
|
||||
$(".lbl_Otp").text("");
|
||||
$("#txt_Otp").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
var phoneOrEmail = $("#txt_EmailorPhone").val();
|
||||
var tenantId = $("#ddl_Tenant option:selected").val();
|
||||
if (phoneOrEmail == "" && tenantId == 0) {
|
||||
MessageHelper.Instance().showError("Please enter Email/Phone and select a Tenant !", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (phoneOrEmail == "") {
|
||||
MessageHelper.Instance().showError("Email or Phone cannot be Empty!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (tenantId == 0) {
|
||||
MessageHelper.Instance().showError("Please select a Tenant", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
var instance = this;
|
||||
instance._accountManager.getContact(phoneOrEmail, tenantId).then(function (response) {
|
||||
if (response.result != null) {
|
||||
instance.Email = response.result.emailAddress;
|
||||
instance.ContactNumber = response.result.phoneNumber;
|
||||
instance.UserName = response.result.unibaseId;
|
||||
instance.TenantId = response.result.tenantId;
|
||||
instance.ContactName = response.result.userName;
|
||||
$(".lbl_Otp").removeClass('text-danger text-success').text("We have sent OTP on your Mobile Number and Email !");
|
||||
$("#txt_Otp").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
instance.sendOtp(0);
|
||||
}
|
||||
else {
|
||||
MessageHelper.Instance().showError(response.message, "div_ValidationSummary");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
sendOtp(IsResend) {
|
||||
var instance = this;
|
||||
$(".preloader-it").fadeIn();
|
||||
var postData = {
|
||||
ContactOrEmail: $("#txt_EmailorPhone").val(),
|
||||
FirstName: instance.ContactName,
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
IsSignup: false,
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: true,
|
||||
UnibaseId: instance.UserName,
|
||||
OtpId: IsResend,
|
||||
UserOtp: ""
|
||||
};
|
||||
instance._accountManager.sendOtp(postData).then(function (response) {
|
||||
if (IsResend != 0) {
|
||||
$(".lbl_Otp").text("OTP has been Resent!").removeClass('text-danger', '').addClass('text-success', '');
|
||||
}
|
||||
if (response == 0) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
instance.OtpId = response;
|
||||
$("#modal_Otp").modal("show");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
verifyOtp() {
|
||||
var instance = this;
|
||||
if ($("#txt_Otp").val() == "")
|
||||
$(".lbl_Otp").text("Please Enter OTP!").addClass('text-danger', '');
|
||||
else {
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: "",
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: false,
|
||||
IsSignup: true,
|
||||
UnibaseId: "",
|
||||
OtpId: instance.OtpId,
|
||||
UserOtp: $("#txt_Otp").val(),
|
||||
};
|
||||
instance._accountManager.verifyOtp(postData).then(function (response) {
|
||||
if (response.code.toString() == "2") {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass('text-danger', '');
|
||||
$("#txt_Otp").val('');
|
||||
}
|
||||
else if (response.result != null) {
|
||||
if (response.result.contactConfirmed == false && response.result.emailConfirmed == false) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Invalid OTP!").addClass('text-danger', '');
|
||||
$("#txt_Otp").text('');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").fadeIn();
|
||||
$("#div_RegisterUser").addClass('d-none');
|
||||
$("#modal_Otp").modal("hide");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#lbl_Email").text($("#txt_EmailorPhone").val());
|
||||
$("#div_CreatePswd").removeClass('d-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
createPassword() {
|
||||
var instance = this;
|
||||
$("#div_ValidationSummary").empty();
|
||||
var confirmPassword = $("#txt_ConfirmPswd").val();
|
||||
var password = $("#txt_NewPswd").val();
|
||||
if (password.length == 0 || confirmPassword.length == 0) {
|
||||
MessageHelper.Instance().showError("Password fields cannot be empty!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (password.length < 8 || confirmPassword.length < 8) {
|
||||
MessageHelper.Instance().showError("Password must be atleast 8 characters!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (password != confirmPassword) {
|
||||
MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
var password = password;
|
||||
var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
|
||||
var checkpassword = password.match(decimal) ? true : false;
|
||||
if (checkpassword == false) {
|
||||
$(".pr-password").focus();
|
||||
MessageHelper.Instance().showError("Please Match the Password in requested Format", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
var postData = {
|
||||
Password: $("#txt_NewPswd").val(),
|
||||
UserName: instance.UserName,
|
||||
Email: instance.Email,
|
||||
ContactNumber: instance.ContactNumber,
|
||||
TenantId: instance.TenantId,
|
||||
};
|
||||
instance._accountManager.registerUser(postData).then(function (response) {
|
||||
if (response.errors == null) {
|
||||
$("#div_CreatePswd").addClass('d-none');
|
||||
$("#div_SuccessMsg").removeClass('d-none');
|
||||
MessageHelper.Instance().showSuccess("Password Created Successfully", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError(response.errors[0], "div_ValidationSummary");
|
||||
}
|
||||
});
|
||||
}
|
||||
submit() {
|
||||
}
|
||||
static Instance() {
|
||||
return new MobilNewRegisterUser();
|
||||
}
|
||||
}
|
||||
Components.MobilNewRegisterUser = MobilNewRegisterUser;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
+1
File diff suppressed because one or more lines are too long
+5
File diff suppressed because one or more lines are too long
@@ -0,0 +1,494 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class MobilRegisterUser extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
return ["tenants/themes/compact/index.anonymous.js", "platform/membership/managers/accountmanager.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
}
|
||||
cssFiles() {
|
||||
return ["libs/passwordrequirement/passwordrequirement.css", 'tenants/themes/compact/css/style.ext.css'];
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
const html = `<div><form id="frm_RegisterUser" default="" data-validate="parsley" data-isdynamic="false"><div id="div_ValidationSummary"></div><div id="div_RegisterUser"><h1 class="display-4 mb-30 text-dark-100 text-center">Registration</h1><div class="alert alert-primary d-none">We will send new code to your <a href=""><u>Email or Phone</u></a> to create your password.</div><div class="form-group"><input class="form-control" required placeholder="Enter Registered Phone Number" id="txt_EmailorPhone" type="text"></div>
|
||||
<div class="form-group floating-label-form-group floating-label-form-group-with-value focus" id="div_TenantsAutoComplete">
|
||||
<select id="ddl_Tenant" class="hidden form-control value-control" data-isdynamic="false"></select></div><button class="btn btn-primary btn-block" type="button" id="btn_SendOtp">Confirm</button><p class="text-right mt-20"><a href="Index.html#/login">Back to login</a></p></div><div id="div_CreatePswd" class="d-none"><h1 class="display-5 mb-30 text-center">Create your Password</h1><div class="form-group"><label class="form-control" id="lbl_Email"></label></div><div class="form-group"><input class="form-control pr-password " required id="txt_NewPswd" placeholder="New password" type="password" ><span toggle="#txt_NewPswd" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span><div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control" required id="txt_ConfirmPswd" placeholder="Re-enter new password" type="password" autocomplete="new-password"><span toggle="#txt_ConfirmPswd" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><button class="btn btn-primary btn-block mb-20" disabled="disabled" type="button" id="btn_CreatePswd">Create Password</button><div class="input-group mb-20"><div class="custom-control custom-checkbox col-xs"><input class="custom-control-input" id="InputTermsandConditions" type="checkbox"><label class="custom-control-label font-14" for="InputTermsandConditions">I accept the terms & conditions</label></div></div><p class="text-right"><a href="Index.html#/login">Back to login</a></p></div><div id="div_SuccessMsg" class="d-none"><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div><h1 class="display-4 mb-20 text-center">Password Created Successfully</h1><p class="text-center"><a href="Index.html#/login">Click here to Login</a></p></div></form>
|
||||
|
||||
<div id="modal_Otp" class="modal fade hide">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header border-0 d-block"><button type="button" class="btn btn-link pull-right font-16 text-secondary p-0" data-dismiss="modal" aria-hidden="true" >×</button></div>
|
||||
<div class="modal-body text-center" id="div_modalbody">
|
||||
<img src="tenants/themes/compact/imgs/otp-verify-img.png" class="img-fluid h-100p mx-auto my-10" >
|
||||
<h4 class="modal-title font-weight-600">OTP Verification</h4>
|
||||
<h6 class="position-relative py-3">Enter 6 Digit Verification Code Sent</h6>
|
||||
<div class="lbl_Otp"></div>
|
||||
<div class="otpdiv my-10">
|
||||
<div class="floating-label-form-group mb-2 p-0">
|
||||
<input class="form-control bg-transparent txt_Otp" onkeyup='Unibase.Themes.Compact.Components.MobilRegisterUser.Instance().otpInputTabChange(1)' id ="txt_Otp" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Otp" onkeyup='Unibase.Themes.Compact.Components.MobilRegisterUser.Instance().otpInputTabChange(2)' id ="txt_Otp" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Otp" onkeyup='Unibase.Themes.Compact.Components.MobilRegisterUser.Instance().otpInputTabChange(3)' id ="txt_Otp" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Otp" onkeyup='Unibase.Themes.Compact.Components.MobilRegisterUser.Instance().otpInputTabChange(4)' id ="txt_Otp" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Otp" onkeyup='Unibase.Themes.Compact.Components.MobilRegisterUser.Instance().otpInputTabChange(5)' id ="txt_Otp" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control bg-transparent txt_Otp" onkeyup='Unibase.Themes.Compact.Components.MobilRegisterUser.Instance().otpInputTabChange(6)' id ="txt_Otp" type="text" maxlength="1" autocomplete="off">
|
||||
<input class="form-control hidden optmsg d-none" id="otpMsg" >
|
||||
</div>
|
||||
</div>
|
||||
<div class=" timerdiv">
|
||||
<div class="mt-10 text-danger">Time left: <span id="mycounter"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer py-10" style="display:block"><button type = "button" class="btn btn-outline-primary pull-left" disabled="disabled" id="btn_ResendOtp">Resend</button><button type = "button" class="btn btn-outline-primary pull-right" id="btn_VerifyOtp">Verify</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="modal_termsandconditions" class="modal fade hide"><div class="modal-dialog"><div class="modal-content"><div class="modal-header py-1"><h6 class="modal-title pull-left">Terms of Use</h6><a href="javascript:void(0);" class="font-26 pull-right text-danger" data-dismiss="modal" aria-hidden="true">×</a></div>
|
||||
<div class="modal-body biz-custom-scrollbar pt-1" style="overflow-y:auto;height: 87vh;" id="div_modalbody">
|
||||
<div class="mb-25">
|
||||
<p class="lbl_content pb-1">Please read and review these Terms of Use terms and conditions (T&C) carefully before accessing or using this Distributor Management System Application (Application). By accessing or using this Application, you acknowledge that you have read, understood and agreed to the T&C. If you do not agree to the T&C, you may not access or use the Application and are advised to stop proceeding immediately. If you choose to continue, it shall be deemed that you have hereby read, understood and accepted these T&C along with the terms and conditions and privacy policy of this Application.</p>
|
||||
<p class="lbl_content py-1"><b>Meaning of Terms</b>:<br>
|
||||
The term ”DMS” refers to Distributor Management System.<br>
|
||||
The term ”ExxonMobil” refers solely and exclusively to ExxonMobil Lubricants Pvt. Ltd. , 1st Main Road, Whitefield Main Road, 5th Floor, Prestige Shantiniketan Complex Road, Bengaluru, Karnataka 560048, India and/or its successors in interest and may include its directors, employees and authorised personnel.<br>
|
||||
The term “Application” refers to DMS or any related digital or online platform built specifically for you or to which you have been given access due to and in furtherance of any contract, agreement or understanding with ExxonMobil.
|
||||
Content. The user agrees that access to and use of this Application and the content thereof is at his/her own risk. ExxonMobil shall not be liable for any damages, including without limitation, consequential, indirect, direct, incidental, arising out of access to, use of or inability to use the Application, or any errors or omissions in the content thereof. This limitation includes damages to, or for any viruses that infect your computer equipment.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Submission of Information</b><br> By submitting information via this Application:</p>
|
||||
<ul>
|
||||
<li>(a) user acknowledges that he/she is over 18 years of age, of sound mind, not a declared insolvent and have not been convicted of any offence involving moral turpitude.</li>
|
||||
|
||||
<li>(b) user warrants that he/she has all legal, moral, and other rights that may be necessary to publish the information;</li>
|
||||
|
||||
<li>(c) user acknowledges and agrees that ExxonMobil shall have the right (but not obligation), at its sole discretion, to refuse to publish or to remove or block access to any content provided at any time and for any reason, with or without notice to the user and that ExxonMobil shall the right to assimilate, collect, reproduce and use the information provided by the user in any manner we deem fit.</li>
|
||||
|
||||
<li>(d) ExxonMobil, by way of this Application, will collect your personal/business information (Name, address, ID Number, Date of Birth and your customer contact details such as Name, Contact details, Location, Organization Address) for the purpose of facilitating your registration and participation the DMS program. For avoidance of doubt, the user confirms that it has the right to provide the customer contact details.</li>
|
||||
|
||||
<li>(e) ExxonMobil can further use the collected personal/business information to update about any future promotions information related to DMS, sending Mobil product related marketing/promotional materials and to facilitate/execute marketing program redemptions. The service under Application may include certain communications from ExxonMobil, such as service announcements, administrative messages, and newsletters. You understand that these communications shall be considered part of using the Application. Use of Application. Your access to and use of the content contained in this Application is subject to the T&C. By accessing and using this Application, you accept, without limitation or qualification, these T&C.</li></ul>
|
||||
|
||||
<b>User Sign up Obligations</b>: You need to sign up for a user account by providing all required information in order to access or use the Application. If you represent an organization and wish to use the Application for corporate use, we recommend that you, sign up for user accounts by providing your corporate contact information. In particular, we recommend that you use your corporate email address. You agree to: a) provide true, accurate, current and complete information about yourself as prompted by the sign-up process; and b) maintain and promptly update the information provided during sign up to keep it true, accurate, current, and complete.
|
||||
|
||||
<p class="lbl_content py-1">Your Conduct: User agrees not to upload, transmit, post, comment, email or otherwise make available to the Application/site, any content, information or other material in any format that:</p>
|
||||
<ul>
|
||||
<li>(a) is false, inaccurate, unlawful, harmful, threatening, abusive, harassing, tortious, defamatory, vulgar, obscene, invasive of another’s privacy, libelous, hurts religious or national sentiment, against public policy and/or otherwise objectionable;</li>
|
||||
|
||||
<li>(b) contains viruses, worms, corrupted files, or any other similar software or programs designed to interrupt, destroy or limit the functionality of any computer software or hardware or telecommunications equipment.</li>
|
||||
|
||||
<li>(c) infringes any third party's intellectual property;</li>
|
||||
|
||||
<li>(d) User agrees that he/she will not transmit or access any data that infringes any patent, trademark,
|
||||
trade secret, copyright or other proprietary rights of any party</li></ul>
|
||||
|
||||
<p class="lbl_content py-1">Indemnification. User agrees to indemnify, defend and hold harmless ExxonMobil, its officers, directors, employees, agents, suppliers and third party partners from and against all losses, expenses, damages and costs, including reasonable attorneys' fee, resulting from any violation by user of these T&C.</p>
|
||||
|
||||
<p class="lbl_content py-1">Disclaimer of Warranties You expressly understand and agree that the use of the services is at your sole risk. The services are provided on an as-is-and-as-available basis.</p>
|
||||
|
||||
<p class="lbl_content py-1">ExxonMobil expressly disclaims all warranties of any kind, whether express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. ExxonMobil makes no warranty that the services will be uninterrupted, timely, secure, or error free. Use of any material downloaded or obtained through the use of the services/Application shall be at your own discretion and risk and you will be solely responsible for any damage to your computer system, mobile telephone, wireless device or data that results from the use of the services or the download of any such material.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Privacy</b>. ExxonMobil respects the privacy of its website users. Please refer to both mobil.co.in Privacy Policy and your organization's Privacy Policy, as applicable, for users' rights and responsibilities with respect to information that is disclosed on this Application. Users understand that under some limited circumstances, ExxonMobil may be required by law to disclose their personal information and any other submitted information by them. Participants thereby authorize ExxonMobil or its affiliates in this regard. Any personal data relating to entrants will be used solely in accordance with current India data protection legislation and best practice. Please see the mobil.co.in Privacy Policy for further details</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Confidential Information</b>.Subject to any applicable terms and conditions set forth in our Privacy Policy, your Privacy Policy, or any non-disclosure agreements, any communication or other material that you submit or post via this Application will not be deemed to be confidential information unless so specified by ExxonMobil in advance.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Trademarks</b>. All ExxonMobil product names, whether or not appearing in large print or with the trademark symbol, are trademarks of ExxonMobil, its affiliates, related companies or its licensors or joint venture partners, unless otherwise noted. The use or misuse of these trademarks or any other materials, except as permitted herein, is expressly prohibited and may be in violation of copyright law, trademark law, the law of privacy and publicity, and communications regulations and statutes. Please be advised that ExxonMobil actively and aggressively enforces its intellectual property rights to the fullest extent of the law. By submitting any trademarked Content via this Application, you warrant and represent that you have all legal, moral, and other rights that may be necessary to publish, republish or distribute the content and will comply to any and all trademark law with respect to that content.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Third Party Websites and Links</b>. The content in this Application may contain links or references to other websites maintained by your organization or by third parties over whom ExxonMobil has no control. ExxonMobil makes no warranties or representations of any kind as to the accuracy, currency, or completeness of any information contained in such websites and shall have no liability for any damages or injuries of any kind arising from such content or information. Inclusion of any external or third party link does not imply an endorsement or recommendation by ExxonMobil.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Copyrights</b>. The entire Contents of this Application are subject to copyright protection. Any ExxonMobil proprietary Content in this Application may not be copied other than for noncommercial individual reference with all copyright or other proprietary notices retained, and thereafter may not be recopied, reproduced or otherwise redistributed. Except as expressly provided above, you may not otherwise copy, display, download, distribute, modify, reproduce, republish or retransmit any information, text or documents contained in this Application or any portion thereof in any electronic medium or in hard copy, or create any derivative work based on such images, text or documents, without the express written consent of ExxonMobil. Nothing contained herein shall be construed as conferring by implication, estoppel or otherwise any license or right under any patent or trademark of ExxonMobil, or any third party. By submitting any copyrighted Content via this Application, you warrant and represent that you have all legal, moral, and other rights that may be necessary to publish, republish or distribute the Content and will comply to any and all copyright law with respect to that Content.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Void Where Prohibited</b>. This Application and its Contents are intended to comply with the laws and regulations in India. Although the information on this Application may be accessible to users outside of India, the information pertaining to ExxonMobil Catalog is intended for use only by residents of India. ExxonMobil reserves to right to limit provision of its products or services to any person, geographic region or jurisdiction and/or to limit the quantities or any products or services we provide. Any offer for any product or service made on this Application is void where prohibited.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Governing Laws</b>. This Terms of Use Agreement / T&C and your use of the Application shall be governed by the laws of India without regard to its conflicts of laws principles. Any legal action or proceeding related to this Application shall be brought exclusively in a court at Bangalore.</p>
|
||||
|
||||
<p class="lbl_content py-1"><b>Miscellaneous</b>. If any provision of this Terms of Use Agreement/ T&C is held to be unlawful, void or unenforceable, then such provision shall be severable without affecting the enforceability of all remaining provisions. ExxonMobil reserves the right to alter or delete materials from this Application at any time at its discretion. ExxonMobil may modify the T&C at any time through a service announcement or by sending email to your primary email address.</p>
|
||||
|
||||
<p class="lbl_content py-1 pb-5">Suspension and Termination ExxonMobil may suspend your user account or temporarily disable access to whole or part of any service in the event of any suspected illegal activity, extended periods of inactivity or requests by law enforcement or other government agencies.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer fixed-bottom p-0 py-3 bg-white rounded">
|
||||
<div class="input-group "><div class="custom-control terms-conditions custom-checkbox col-xs btn btn-outline-success btn-rounded mx-auto d-flex justify-content-center text-center w-30 my-5 py-2 font-weight-500"><input class="custom-control-input " id="InputTermsandConditionsAccept" type="checkbox"><label class="custom-control-label font-14" for="InputTermsandConditionsAccept">I Accept</label></div></div></div></div><div</div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
$(".pr-password").click(function () {
|
||||
var signUpPswd = $(".pr-password");
|
||||
signUpPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#div_modalbody").removeAttr("style");
|
||||
$(".btn-outline-secondary").addClass('hidden');
|
||||
$("#passwordHide").click(function () {
|
||||
var input = $('#txt_NewPswd');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$("#passwordHide").toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#confirmPasswordHide").click(function () {
|
||||
var input = $('#txt_ConfirmPswd');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#confirmPasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#OtpHide").click(function () {
|
||||
var input = $('#txt_Otp');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#OtpHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#txt_EmailorPhone").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_SendOtp").click();
|
||||
});
|
||||
$("#txt_EmailorPhone").focusout(function (e) {
|
||||
instance.loadUserTenants();
|
||||
});
|
||||
$(".txt_Otp:last").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
$("#btn_VerifyOtp").click();
|
||||
});
|
||||
$("#txt_NewPswd,#txt_ConfirmPswd").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_CreatePswd").click();
|
||||
});
|
||||
var instance = this;
|
||||
$("#btn_SendOtp").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
$("#btn_CreatePswd").click(function () {
|
||||
instance.createPassword();
|
||||
});
|
||||
$("#btn_VerifyOtp").click(function () {
|
||||
instance.verifyOtp();
|
||||
});
|
||||
$("#btn_ResendOtp").click(function () {
|
||||
instance.sendOtp(instance.OtpId);
|
||||
});
|
||||
$("#InputTermsandConditions").click(function (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
$("#modal_termsandconditions").modal("show");
|
||||
});
|
||||
$("#InputTermsandConditionsAccept").click(function () {
|
||||
var accept = $("#InputTermsandConditionsAccept").prop("checked");
|
||||
if (accept == true) {
|
||||
$('#InputTermsandConditions').prop('checked', true);
|
||||
$("#modal_termsandconditions").modal('hide');
|
||||
$('#btn_CreatePswd').prop("disabled", false);
|
||||
}
|
||||
else {
|
||||
$('#InputTermsandConditions').prop('checked', false);
|
||||
$('#btn_CreatePswd').prop("disabled", true);
|
||||
}
|
||||
});
|
||||
$('.floating-label-form-group .txt_Otp').on('input', function (e) {
|
||||
const inputEl = this;
|
||||
inputEl.value = inputEl.value.replace(/[^0-9]/g, '');
|
||||
});
|
||||
$(".txt_Otp").click(function () {
|
||||
$(".lbl_Otp").empty();
|
||||
});
|
||||
if (callback != null)
|
||||
callback();
|
||||
}
|
||||
otpInputTabChange(val) {
|
||||
const ele = $('.txt_Otp');
|
||||
if (ele[val - 1].value != '') {
|
||||
if (ele[val])
|
||||
ele[val].focus();
|
||||
}
|
||||
else if (ele[val - 1].value == '') {
|
||||
if (ele[val - 2])
|
||||
ele[val - 2].focus();
|
||||
}
|
||||
}
|
||||
loadTenants() {
|
||||
var instance = this;
|
||||
instance._accountManager.getTenants().then(function (response) {
|
||||
var res = response;
|
||||
let cmbLob = document.getElementById('ddl_Tenant');
|
||||
$('#ddl_Tenant').empty();
|
||||
$('#ddl_Tenant').append('<option value=0>Select Distributor</option>');
|
||||
for (var i = 0; i < response.result.length; i++) {
|
||||
var data = response.result[i];
|
||||
var opt = document.createElement("option");
|
||||
var Name = data.tenantName;
|
||||
var id = data.tenantId;
|
||||
opt.text = Name;
|
||||
opt.value = id;
|
||||
cmbLob.append(opt);
|
||||
}
|
||||
if (res.result.filter(x => x.isTemplateDb == false).length == 1) {
|
||||
var Id = $('#ddl_Tenant option[value=' + res.result.filter(x => x.isTemplateDb == false)[0].tenantId + ']');
|
||||
Id.attr("selected", true);
|
||||
$("#ddl_Tenant").prop('disabled', true);
|
||||
}
|
||||
});
|
||||
}
|
||||
loadUserTenants() {
|
||||
var instance = this;
|
||||
var emailorphone = $("#txt_EmailorPhone").val();
|
||||
instance._accountManager.getUserTenants(emailorphone).then(function (response) {
|
||||
debugger;
|
||||
var res = response;
|
||||
let cmbLob = document.getElementById('ddl_Tenant');
|
||||
$('#ddl_Tenant').empty();
|
||||
$('#ddl_Tenant').append('<option value=0>Select Distributor</option>');
|
||||
for (var i = 0; i < response.result.length; i++) {
|
||||
var data = response.result[i];
|
||||
var opt = document.createElement("option");
|
||||
var Name = data.tenantName;
|
||||
var id = data.defaultTenantId;
|
||||
opt.text = Name;
|
||||
opt.value = id;
|
||||
cmbLob.append(opt);
|
||||
}
|
||||
if (res.result.filter(x => x.isTemplateDb == false).length == 1) {
|
||||
var Id = $('#ddl_Tenant option[value=' + res.result.filter(x => x.isTemplateDb == false)[0].tenantId + ']');
|
||||
Id.attr("selected", true);
|
||||
$("#ddl_Tenant").removeClass('hidden');
|
||||
$("#ddl_Tenant").prop('disabled', true);
|
||||
}
|
||||
else if (res.result.length == 1) {
|
||||
var Id = $('#ddl_Tenant option[value=' + res.result[0].defaultTenantId + ']');
|
||||
Id.attr("selected", true);
|
||||
$("#ddl_Tenant").removeClass('hidden');
|
||||
$("#ddl_Tenant").prop('disabled', true);
|
||||
}
|
||||
else if (res.result.length == 0) {
|
||||
$("#ddl_Tenant").addClass('hidden');
|
||||
MessageHelper.Instance().showError("This Numberis not registered with any distributor! Please contact your DSR for further process.", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
var Id = $('#ddl_Tenant option[value=' + res.result[0].defaultTenantId + ']');
|
||||
Id.attr("selected", true);
|
||||
$("#ddl_Tenant").removeClass('hidden');
|
||||
$("#ddl_Tenant").prop('disabled', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
validate() {
|
||||
$(".lbl_Otp").text("");
|
||||
$("#txt_Otp").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
var phoneOrEmail = $("#txt_EmailorPhone").val();
|
||||
var tenantId = $("#ddl_Tenant option:selected").val();
|
||||
if (phoneOrEmail == "" && tenantId == 0) {
|
||||
MessageHelper.Instance().showError("Please enter Email/Phone and select a Distributor !", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (phoneOrEmail == "") {
|
||||
MessageHelper.Instance().showError("Email or Phone cannot be Empty!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (tenantId == 0) {
|
||||
MessageHelper.Instance().showError("Please select a Distributor", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
var instance = this;
|
||||
instance._accountManager.getContact(phoneOrEmail, tenantId).then(function (response) {
|
||||
if (response.result != null) {
|
||||
instance.Email = response.result.emailAddress;
|
||||
instance.ContactNumber = response.result.phoneNumber;
|
||||
instance.UserName = response.result.unibaseId;
|
||||
instance.TenantId = response.result.tenantId;
|
||||
instance.ContactName = response.result.userName;
|
||||
$("#div_ValidationSummary").empty();
|
||||
instance.sendOtp(0);
|
||||
}
|
||||
else {
|
||||
MessageHelper.Instance().showError(response.message, "div_ValidationSummary");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
sendOtp(IsResend) {
|
||||
var instance = this;
|
||||
$(".preloader-it").fadeIn();
|
||||
var postData = {
|
||||
ContactOrEmail: $("#txt_EmailorPhone").val(),
|
||||
FirstName: instance.ContactName,
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
IsSignup: false,
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: true,
|
||||
UnibaseId: instance.UserName,
|
||||
OtpId: IsResend,
|
||||
UserOtp: ""
|
||||
};
|
||||
instance._accountManager.sendOtp(postData).then(function (response) {
|
||||
if (IsResend != 0) {
|
||||
$(".lbl_Otp").text("We have resent the OTP to your Registered Mobile Number!").removeClass('text-danger');
|
||||
}
|
||||
if (response == 0) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
instance.OtpId = response;
|
||||
$("#modal_Otp").modal("show");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#btn_ResendOtp").prop("disabled", true);
|
||||
$(".otpdiv").removeClass('hidden');
|
||||
$(".timerdiv").removeClass('hidden');
|
||||
$(".modal-footer").show();
|
||||
$("#txt_Otp").parent().removeClass('col-sm-12').addClass('col-sm-7');
|
||||
Unibase.Themes.Compact.Components.MobilRegisterUser.Instance().timer(60, IsResend);
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
verifyOtp() {
|
||||
var otpMsg = "";
|
||||
$(".floating-label-form-group .txt_Otp").each(function () {
|
||||
otpMsg += $(this).val();
|
||||
});
|
||||
parseInt(otpMsg);
|
||||
$(".floating-label-form-group").find('#otpMsg').attr("value", otpMsg);
|
||||
var instance = this;
|
||||
if ($("#otpMsg").val() == "")
|
||||
$(".lbl_Otp").text("Please Enter OTP!").addClass('text-danger', '');
|
||||
if ($("#otpMsg").val() < 6)
|
||||
$(".lbl_Otp").text("Please Enter 6 Digit OTP!").addClass('text-danger', '');
|
||||
else {
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: "",
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: false,
|
||||
IsSignup: true,
|
||||
UnibaseId: "",
|
||||
OtpId: instance.OtpId,
|
||||
UserOtp: $("#otpMsg").val(),
|
||||
};
|
||||
instance._accountManager.verifyOtp(postData).then(function (response) {
|
||||
if (response.code.toString() == "2") {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass('text-danger', '');
|
||||
$("#otpMsg").val('');
|
||||
}
|
||||
else if (response.result != null) {
|
||||
if (response.result.contactConfirmed == false && response.result.emailConfirmed == false) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Invalid OTP!").addClass('text-danger', '');
|
||||
$("#otpMsg").text('');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").fadeIn();
|
||||
$("#div_RegisterUser").addClass('d-none');
|
||||
$("#modal_Otp").modal("hide");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#lbl_Email").text($("#txt_EmailorPhone").val());
|
||||
$("#div_CreatePswd").removeClass('d-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
createPassword() {
|
||||
var instance = this;
|
||||
$("#div_ValidationSummary").empty();
|
||||
var confirmPassword = $("#txt_ConfirmPswd").val();
|
||||
var password = $("#txt_NewPswd").val();
|
||||
if (password.length == 0 || confirmPassword.length == 0) {
|
||||
MessageHelper.Instance().showError("Password fields cannot be empty!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (password.length < 8 || confirmPassword.length < 8) {
|
||||
MessageHelper.Instance().showError("Password must be atleast 8 characters!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (password != confirmPassword) {
|
||||
MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
var password = $("#txt_ConfirmPswd").val();
|
||||
;
|
||||
var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
|
||||
var checkpassword = password.match(decimal) ? true : false;
|
||||
if (checkpassword == false) {
|
||||
$(".pr-password").focus();
|
||||
MessageHelper.Instance().showError("Please Match the Password in requested Format", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
var postData = {
|
||||
Password: $("#txt_NewPswd").val(),
|
||||
UserName: instance.UserName,
|
||||
Email: instance.Email,
|
||||
ContactNumber: instance.ContactNumber,
|
||||
TenantId: instance.TenantId,
|
||||
};
|
||||
instance._accountManager.registerUser(postData).then(function (response) {
|
||||
if (response.errors == null) {
|
||||
$("#div_CreatePswd").addClass('d-none');
|
||||
$("#div_SuccessMsg").removeClass('d-none');
|
||||
MessageHelper.Instance().showSuccess("Password Created Successfully", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError(response.errors[0], "div_ValidationSummary");
|
||||
}
|
||||
});
|
||||
}
|
||||
submit() {
|
||||
}
|
||||
timer(remaining, resend) {
|
||||
let timerOn = true;
|
||||
let m = Math.floor(remaining / 60);
|
||||
let s = remaining % 60;
|
||||
let mins = m < 10 ? '0' + m : m;
|
||||
let seconds = s < 10 ? '0' + s : s;
|
||||
document.getElementById('mycounter').innerHTML = mins + ':' + seconds;
|
||||
remaining -= 1;
|
||||
if (remaining >= 0 && timerOn) {
|
||||
setTimeout(function () {
|
||||
Unibase.Themes.Compact.Components.MobilRegisterUser.Instance().timer(remaining, resend);
|
||||
}, 1000);
|
||||
return;
|
||||
}
|
||||
if (!timerOn) {
|
||||
return;
|
||||
}
|
||||
if (resend != 0) {
|
||||
$(".otpdiv").addClass('hidden');
|
||||
$(".timerdiv").addClass('hidden');
|
||||
$(".lbl_Otp").text("Please contact the DSR for registration!").addClass('text-danger', '');
|
||||
$(".modal-footer").hide();
|
||||
}
|
||||
else {
|
||||
$("#btn_ResendOtp").prop("disabled", false);
|
||||
$("#txt_Otp").parent().removeClass('col-sm-7').addClass('col-sm-12');
|
||||
}
|
||||
}
|
||||
static Instance() {
|
||||
return new MobilRegisterUser();
|
||||
}
|
||||
}
|
||||
Components.MobilRegisterUser = MobilRegisterUser;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+96
File diff suppressed because one or more lines are too long
@@ -0,0 +1,293 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class RegisterUser extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
return ["tenants/themes/compact/index.anonymous.js", "platform/membership/managers/accountmanager.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
}
|
||||
cssFiles() {
|
||||
return ["libs/passwordrequirement/passwordrequirement.css"];
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
const html = `<div><form id="frm_RegisterUser" default="" data-validate="parsley" data-isdynamic="false"><div id="div_ValidationSummary"></div><div id="div_RegisterUser"><h1 class="display-4 mb-30 text-dark-100 text-center">Registration</h1><div class="alert alert-primary d-none">We will send new code to your <a href=""><u>Email or Phone</u></a> to create your password.</div><div class="form-group"><input class="form-control" required autocomplete="off" placeholder="Enter Registered Email or Phone" id="txt_EmailorPhone" type="text"></div>
|
||||
<div class="form-group floating-label-form-group floating-label-form-group-with-value focus" id="div_TenantsAutoComplete">
|
||||
<select id="ddl_Tenant" class="form-control value-control" data-isdynamic="false"></select></div><button class="btn btn-primary btn-block" type="button" id="btn_SendOtp">Confirm</button><p class="text-right mt-20"><a href="Index.html#/login">Back to login</a></p></div><div id="div_CreatePswd" class="d-none"><h1 class="display-5 mb-30 text-center">Create your Password</h1><div class="form-group"><label class="form-control" id="lbl_Email"></label></div><div class="form-group"><input class="form-control pr-password " required id="txt_NewPswd" placeholder="New password" type="password" autocomplete="new-password"><span toggle="#txt_NewPswd" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span><div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control" required id="txt_ConfirmPswd" placeholder="Re-enter new password" type="password" autocomplete="new-password"><span toggle="#txt_ConfirmPswd" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div><button class="btn btn-primary btn-block mb-20" type="button" id="btn_CreatePswd">Create Password</button><p class="text-right"><a href="Index.html#/login">Back to login</a></p></div><div id="div_SuccessMsg" class="d-none"><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto"><i class="fa fa-check font-50 text-success"></i></div><h1 class="display-4 mb-20 text-center">Password Created Successfully</h1><p class="text-center"><a href="Index.html#/login">Click here to Login</a></p></div></form><div id="modal_Otp" class="modal fade hide"><div class="modal-dialog"><div class="modal-content"><div class="modal-header mt-2 mb-2"><h5 class="modal-title pull-left">Mobile or Email Verification</h5><button type="button" class="btn btn-primary btn-simple pull-right" data-dismiss="modal" aria-hidden="true" >×</button></div><div class="modal-body" id="div_modalbody"><div class="mb-10"><p class="lbl_Otp">We have sent OTP on your Mobile Number and Email!</p></div><div class="floating-label-form-group mb-2"><input class="form-control" id ="txt_Otp" placeholder="Enter Mobile OTP/Email OTP" type="password" autocomplete="new-password"><span toggle="#txt_Otp" id="OtpHide" class="fa fa-eye-slash font-15 mr-10 field-icon"></span></div></div><div class="modal-footer mb-2" style="display:block"><button type = "button" class="btn btn-primary pull-left" id="btn_ResendOtp">Resend</button><button type = "button" class="btn btn-primary pull-right" id="btn_VerifyOtp">Verify</button></div></div></div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
this._accountManager = yield Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
yield this.loadTenants(callback);
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#div_modalbody").removeAttr("style");
|
||||
$(".pr-password").click(function () {
|
||||
var signUpPswd = $(".pr-password");
|
||||
signUpPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
$("#passwordHide").click(function () {
|
||||
var input = $('#txt_NewPswd');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$("#passwordHide").toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#confirmPasswordHide").click(function () {
|
||||
var input = $('#txt_ConfirmPswd');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#confirmPasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#OtpHide").click(function () {
|
||||
var input = $('#txt_Otp');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#OtpHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#txt_EmailorPhone").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_SendOtp").click();
|
||||
});
|
||||
$("#txt_Otp").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_VerifyOtp").click();
|
||||
});
|
||||
$("#txt_NewPswd,#txt_ConfirmPswd").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_CreatePswd").click();
|
||||
});
|
||||
var instance = this;
|
||||
$("#btn_SendOtp").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
$("#btn_CreatePswd").click(function () {
|
||||
instance.createPassword();
|
||||
});
|
||||
$("#btn_VerifyOtp").click(function () {
|
||||
instance.verifyOtp();
|
||||
});
|
||||
$("#btn_ResendOtp").click(function () {
|
||||
instance.sendOtp(instance.OtpId);
|
||||
});
|
||||
if (callback != null)
|
||||
callback();
|
||||
});
|
||||
}
|
||||
loadTenants(callback) {
|
||||
var instance = this;
|
||||
instance._accountManager.getTenants().then(function (response) {
|
||||
var res = response;
|
||||
let cmbLob = document.getElementById('ddl_Tenant');
|
||||
$('#ddl_Tenant').empty();
|
||||
$('#ddl_Tenant').append('<option value=0>Select Tenant</option>');
|
||||
for (var i = 0; i < response.result.length; i++) {
|
||||
var data = response.result[i];
|
||||
var opt = document.createElement("option");
|
||||
var Name = data.tenantName;
|
||||
var id = data.tenantId;
|
||||
opt.text = Name;
|
||||
opt.value = id;
|
||||
cmbLob.append(opt);
|
||||
}
|
||||
if (res.result.filter(x => x.isTemplateDb == false).length == 1) {
|
||||
var Id = $('#ddl_Tenant option[value=' + res.result.filter(x => x.isTemplateDb == false)[0].tenantId + ']');
|
||||
Id.attr("selected", true);
|
||||
$("#ddl_Tenant").prop('disabled', true);
|
||||
}
|
||||
if (callback != null) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
validate() {
|
||||
$(".lbl_Otp").text("");
|
||||
$("#txt_Otp").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
var phoneOrEmail = $("#txt_EmailorPhone").val();
|
||||
var tenantId = $("#ddl_Tenant option:selected").val();
|
||||
if (phoneOrEmail == "" && tenantId == 0) {
|
||||
MessageHelper.Instance().showError("Please enter Email/Phone and select a Tenant !", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (phoneOrEmail == "") {
|
||||
MessageHelper.Instance().showError("Email or Phone cannot be Empty!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (tenantId == 0) {
|
||||
MessageHelper.Instance().showError("Please select a Tenant", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
var instance = this;
|
||||
instance._accountManager.getContact(phoneOrEmail, tenantId).then(function (response) {
|
||||
if (response.result != null) {
|
||||
instance.Email = response.result.emailAddress;
|
||||
instance.ContactNumber = response.result.phoneNumber;
|
||||
instance.UserName = response.result.unibaseId;
|
||||
instance.TenantId = response.result.tenantId;
|
||||
instance.ContactName = response.result.userName;
|
||||
$(".lbl_Otp").removeClass('text-danger text-success').text("We have sent OTP on your Mobile Number and Email !");
|
||||
$("#txt_Otp").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
instance.sendOtp(0);
|
||||
}
|
||||
else {
|
||||
MessageHelper.Instance().showError(response.message, "div_ValidationSummary");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
sendOtp(IsResend) {
|
||||
var instance = this;
|
||||
$(".preloader-it").fadeIn();
|
||||
var postData = {
|
||||
ContactOrEmail: $("#txt_EmailorPhone").val(),
|
||||
FirstName: instance.ContactName,
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
IsSignup: false,
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: true,
|
||||
UnibaseId: instance.UserName,
|
||||
OtpId: IsResend,
|
||||
UserOtp: ""
|
||||
};
|
||||
instance._accountManager.sendOtp(postData).then(function (response) {
|
||||
if (IsResend != 0) {
|
||||
$(".lbl_Otp").text("OTP has been Resent!").removeClass('text-danger', '').addClass('text-success', '');
|
||||
}
|
||||
if (response == 0) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
instance.OtpId = response;
|
||||
$("#modal_Otp").modal("show");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
verifyOtp() {
|
||||
var instance = this;
|
||||
if ($("#txt_Otp").val() == "")
|
||||
$(".lbl_Otp").text("Please Enter OTP!").addClass('text-danger', '');
|
||||
else {
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: "",
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: false,
|
||||
IsSignup: true,
|
||||
UnibaseId: "",
|
||||
OtpId: instance.OtpId,
|
||||
UserOtp: $("#txt_Otp").val(),
|
||||
};
|
||||
instance._accountManager.verifyOtp(postData).then(function (response) {
|
||||
if (response.code.toString() == "2") {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Otp Expired, Please click on Resend to get new OTP").addClass('text-danger', '');
|
||||
$("#txt_Otp").val('');
|
||||
}
|
||||
else if (response.result != null) {
|
||||
if (response.result.contactConfirmed == false && response.result.emailConfirmed == false) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$(".lbl_Otp").text("Invalid OTP!").addClass('text-danger', '');
|
||||
$("#txt_Otp").text('');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").fadeIn();
|
||||
$("#div_RegisterUser").addClass('d-none');
|
||||
$("#modal_Otp").modal("hide");
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#lbl_Email").text($("#txt_EmailorPhone").val());
|
||||
$("#div_CreatePswd").removeClass('d-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
createPassword() {
|
||||
var instance = this;
|
||||
$("#div_ValidationSummary").empty();
|
||||
var confirmPassword = $("#txt_ConfirmPswd").val();
|
||||
var password = $("#txt_NewPswd").val();
|
||||
if (password.length == 0 || confirmPassword.length == 0) {
|
||||
MessageHelper.Instance().showError("Password fields cannot be empty!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (password.length < 8 || confirmPassword.length < 8) {
|
||||
MessageHelper.Instance().showError("Password must be atleast 8 characters!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (password != confirmPassword) {
|
||||
MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
var password = password;
|
||||
var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
|
||||
var checkpassword = password.match(decimal) ? true : false;
|
||||
if (checkpassword == false) {
|
||||
$(".pr-password").focus();
|
||||
MessageHelper.Instance().showError("Please Match the Password in requested Format", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
var postData = {
|
||||
Password: $("#txt_NewPswd").val(),
|
||||
UserName: instance.UserName,
|
||||
Email: instance.Email,
|
||||
ContactNumber: instance.ContactNumber,
|
||||
TenantId: instance.TenantId,
|
||||
};
|
||||
instance._accountManager.registerUser(postData).then(function (response) {
|
||||
if (response.errors == null) {
|
||||
$("#div_CreatePswd").addClass('d-none');
|
||||
$("#div_SuccessMsg").removeClass('d-none');
|
||||
MessageHelper.Instance().showSuccess("Password Created Successfully", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError(response.errors[0], "div_ValidationSummary");
|
||||
}
|
||||
});
|
||||
}
|
||||
submit() {
|
||||
}
|
||||
static Instance() {
|
||||
return new RegisterUser();
|
||||
}
|
||||
}
|
||||
Components.RegisterUser = RegisterUser;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+3
File diff suppressed because one or more lines are too long
@@ -0,0 +1,58 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class DefaultSettingPanel {
|
||||
init(container) {
|
||||
var priBtnColor = "btn-success";
|
||||
var secBtnColor = "btn-default";
|
||||
if (jQuery("#hfBizgaze_SecDataEnabled").val() === "1") {
|
||||
secBtnColor = "btn-success";
|
||||
priBtnColor = "btn-default";
|
||||
}
|
||||
var html = '<div id="hk-settings-panel" class="hk-settings-panel">' +
|
||||
'<div class="position-relative">' +
|
||||
'<div class="chat-panel-wrap">' +
|
||||
'</div>' +
|
||||
'<div class="settings-panel-wrap hidden">' +
|
||||
'<div class="settings-panel-head">' +
|
||||
'<h5 class="">Branches</h5>' +
|
||||
'<div class="btn-group mr-15">' +
|
||||
'<button type="button" class="btn btn-sm ' + priBtnColor + '">Primary</button>' +
|
||||
'<button type="button" class="btn btn-sm ' + secBtnColor + '">Secondary</button>' +
|
||||
'</div>' +
|
||||
'<a href="javascript:void(0);" id="settings_panel_close" class="settings-panel-close"><i class="ti-close"></i></a>' +
|
||||
'</div>' +
|
||||
'<hr>' +
|
||||
'<div id="div_branches" class="row" style="overflow-y:auto">' +
|
||||
'<ul id="ul_branches" class="list-group list-group-flush col-12"></ul>' +
|
||||
'<div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<img class="d-none" src="tenants/themes/default/img/logo-light.png" alt="brand" />' +
|
||||
'<img class="d-none" src="tenants/themes/default/img/logo-dark.png" alt="brand" />' +
|
||||
'</div>';
|
||||
$(container).html(html);
|
||||
this.loadBranches();
|
||||
var height = window.innerHeight - 170;
|
||||
$('#div_branches').css('height', height);
|
||||
}
|
||||
loadBranches() {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/platform/companies/managers/branchmanager.js", function () {
|
||||
});
|
||||
}
|
||||
redirectToBranch(BranchId) {
|
||||
}
|
||||
static Instance() {
|
||||
return new DefaultSettingPanel();
|
||||
}
|
||||
}
|
||||
Components.DefaultSettingPanel = DefaultSettingPanel;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"settings.js","sourceRoot":"","sources":["settings.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAwEhB;AAxED,WAAU,OAAO;IACb,IAAiB,MAAM,CAsEtB;IAtED,WAAiB,MAAM;QACnB,IAAiB,OAAO,CAoEvB;QApED,WAAiB,OAAO;YACpB,IAAiB,UAAU,CAkE1B;YAlED,WAAiB,UAAU;gBACvB,MAAa,mBAAmB;oBAC5B,IAAI,CAAC,SAAS;wBAEV,IAAI,WAAW,GAAG,aAAa,CAAC;wBAChC,IAAI,WAAW,GAAG,aAAa,CAAC;wBAChC,IAAI,MAAM,CAAC,2BAA2B,CAAC,CAAC,GAAG,EAAE,KAAK,GAAG,EAAE;4BACnD,WAAW,GAAG,aAAa,CAAC;4BAC5B,WAAW,GAAG,aAAa,CAAC;yBAC/B;wBACD,IAAI,IAAI,GAAG,wDAAwD;4BAC/D,iCAAiC;4BACjC,+BAA+B;4BAC/B,QAAQ;4BACR,0CAA0C;4BAC1C,mCAAmC;4BACnC,4BAA4B;4BAC5B,+BAA+B;4BAC/B,0CAA0C,GAAG,WAAW,GAAG,oBAAoB;4BAC/E,0CAA0C,GAAG,WAAW,GAAG,sBAAsB;4BACjF,QAAQ;4BACR,mHAAmH;4BACnH,QAAQ;4BAER,MAAM;4BACN,6DAA6D;4BAC7D,uEAAuE;4BACvE,OAAO;4BACP,QAAQ;4BACR,QAAQ;4BACR,oFAAoF;4BACpF,mFAAmF;4BACnF,QAAQ,CAAC;wBACb,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;wBACxB,IAAI,CAAC,YAAY,EAAE,CAAC;wBAEpB,IAAI,MAAM,GAAG,MAAM,CAAC,WAAW,GAAG,GAAG,CAAC;wBACtC,CAAC,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;oBAC7C,CAAC;oBAED,YAAY;wBACR,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,mDAAmD,EAAE;wBAcpH,CAAC,CAAC,CAAC;oBAGP,CAAC;oBACD,gBAAgB,CAAC,QAAQ;oBACzB,CAAC;oBAED,MAAM,CAAC,QAAQ;wBACX,OAAO,IAAI,mBAAmB,EAAE,CAAC;oBACrC,CAAC;iBACJ;gBAhEY,8BAAmB,sBAgE/B,CAAA;YACL,CAAC,EAlEgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAkE1B;QACL,CAAC,EApEgB,OAAO,GAAP,cAAO,KAAP,cAAO,QAoEvB;IACL,CAAC,EAtEgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAsEtB;AACL,CAAC,EAxES,OAAO,KAAP,OAAO,QAwEhB"}
|
||||
+1
@@ -0,0 +1 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i{init(n){var t="btn-success",i="btn-default",r,u;jQuery("#hfBizgaze_SecDataEnabled").val()==="1"&&(i="btn-success",t="btn-default");r='<div id="hk-settings-panel" class="hk-settings-panel"><div class="position-relative"><div class="chat-panel-wrap"><\/div><div class="settings-panel-wrap hidden"><div class="settings-panel-head"><h5 class="">Branches<\/h5><div class="btn-group mr-15"><button type="button" class="btn btn-sm '+t+'">Primary<\/button><button type="button" class="btn btn-sm '+i+'">Secondary<\/button><\/div><a href="javascript:void(0);" id="settings_panel_close" class="settings-panel-close"><i class="ti-close"><\/i><\/a><\/div><hr><div id="div_branches" class="row" style="overflow-y:auto"><ul id="ul_branches" class="list-group list-group-flush col-12"><\/ul><div><\/div><\/div><img class="d-none" src="tenants/themes/default/img/logo-light.png" alt="brand" /><img class="d-none" src="tenants/themes/default/img/logo-dark.png" alt="brand" /><\/div>';$(n).html(r);this.loadBranches();u=window.innerHeight-170;$("#div_branches").css("height",u)}loadBranches(){n.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/platform/companies/managers/branchmanager.js",function(){})}redirectToBranch(){}static Instance(){return new i}}t.DefaultSettingPanel=i})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,319 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class CreateContact extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
return ["tenants/themes/compact/index.anonymous.js", "platform/membership/managers/accountmanager.js", "platform/tag/managers/tagmanager.js", "platform/core/helpers/autocomplete/autocompletehelper.js", "libs/select2/js/select2.min.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
}
|
||||
cssFiles() {
|
||||
return ["libs/passwordrequirement/passwordrequirement.css"];
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
const html = `<div><form id="frm_Signup" default="" data-validate="parsley" data-isdynamic="false" style=""><h1 class="display-4 mb-10 ml-10 mr-10">Sign up for free</h1><p class="mb-30 ml-10 mr-10">
|
||||
Create your account and start your free trial today</p><div class="" id="UserInfo" style=""><div id="div_ValidationSummary" class="clear ml-20 mr-20"></div>
|
||||
<div class="form-row"><div class="col-md-12 form-group"><input class="form-control required" id="txt_registerfirmname" placeholder="Firm name" value="" type="text" required="">
|
||||
</div><div class="col-md-6 form-group"><input class="form-control required" id="txt_registercontactname" placeholder="First name" value="" type="text" required="">
|
||||
</div><div class="form-group floating-label-form-group floating-label-form-group-with-value focus col-sm-6" id="div_tagsauto">
|
||||
<select id="ddl_Tags" class="form-control value-control" data-isdynamic="false"><option value="0">Im A</option><option value="100021580000007">Retailers</option><option value="100021580000275">Retailer</option><option value="100021580000276">RFW</option><option value="100021580000277">EOW</option><option value="100021580000278">EBW</option><option value="100021580000279">HRW</option></select></div>
|
||||
</div><div class="form-group floating-label-form-group floating-label-form-group-with-value focus hidden" id="div_TenantsAutoComplete">
|
||||
<select id="ddl_Tenant" class="form-control value-control" data-isdynamic="false" disabled=""><option value="0">Select Tenant</option><option value="2" selected="selected">Shriram Pistons & Rings Limited</option><option value="1">templatetenant</option></select></div>
|
||||
<div class="row">
|
||||
<div class="form-group col-6"><input class="form-control required" minlength="10" maxlength="10" id="txt_registercontactnumber" placeholder="Mobile" type="textbox" required=""></div><div class="form-group col-6"><input class="form-control required" id="txt_registercontactmail" placeholder="Email" type="text" required="">
|
||||
</div></div><div class="form-row hidden"><div class="col-md-6 form-group"><input class="form-control required" id="txt_TenantName" placeholder="Tenant Name" type="text" required=""></div><div class=" col-md-6 form-group " id="div_Industry"><select id="ddl_Industry" class="form-control value-control required" data-isdynamic="false"></select>
|
||||
</div></div><div id="passwordbox" class="row"><div class="form-group mb-20 col-6"><input class="form-control pr-password" id="confirmpass" placeholder="Password" type="password" autocomplete="new-password" aria-autocomplete="list"><span toggle="#InputPassword" id="PasswordHide"><i class="fa fa-eye-slash font-15 mr-10 field-icon" id="Password_eye"></i></span><div class="showpwsdreq"></div></div><div class="form-group mb-20 col-6"><input class="form-control pr-password" id="contacttPassword" placeholder="Confirm Password" type="password" autocomplete="new-password"><span toggle="#InputPassword" id="cfmPasswordHide"><i class="fa fa-eye-slash font-15 mr-10 field-icon" id="Password_eye"></i></span></div></div></div><div class="custom-control custom-checkbox mb-25 ml-10 mr-10 hidden"><input class="custom-control-input" id="chk_ReadTerms" type="checkbox"><label class="custom-control-label font-14" for="chk_ReadTerms">I have read and agree to the <a href=""><u>term and conditions</u></a></label>
|
||||
</div><div class="ml-10 mr-10 mb-25 text-center"><a class="btn btn-primary btn-block text-white hidden" id="btn_nextt">Next</a></div><div class="ml-10 mr-10 mb-25 text-center"><a class="btn btn-primary btn-block text-white" id="btn_registercontact">Register</a><div class="option-sep">or</div><p class="text-center">Already have an account?<a href="index.html#/login">Sign In</a></p></div></form><div id="modal_Otp" class="modal fade hide"><div class="modal-dialog">
|
||||
<div class="modal-content"><div class="modal-header mt-2 mb-2"><h5 class="modal-title pull-left">Mobile or Email Verification</h5><button type="button" class="close pull-right" data-dismiss="modal" aria-hidden="true">×</button></div><div class="modal-body" id="div_modalbody" style="height: 607px; overflow: hidden auto;"><div class="mb-10">
|
||||
<p class="lbl_Otp">We have sent OTP on your Mobile Number and Email!</p></div><div class="floating-label-form-group mb-2"><input class="form-control" id="txt_Otp" placeholder="Enter Mobile OTP/Email OTP" type="text"></div></div><div class="modal-footer mb-2" style="display:block">
|
||||
<button type="button" class="btn btn-primary pull-left" id="btn_ResendOtp">Resend</button><button type="button" class="btn btn-primary pull-right" id="btn_VerifyOtp">Verify</button></div></div></div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
loadlobdata(containerid, datass, data) {
|
||||
var response = data.result.taggroups;
|
||||
var html = '<div class="section_LoBTags card Section"><div class="card-header">LoB Tags</div><div id="divLobWiseTags" class="card-body form-group floating-label focus divtags mb-30" data-lobtagindex="1"><ul id="ulLobTags" class="list-group"><input type="hidden" id="hf_LobContactIds" value="">';
|
||||
for (var i = 0; i < response.length; i++) {
|
||||
var data = response[i];
|
||||
html +=
|
||||
'<li class="list-group-item" id="liLobTags_' + data.tagGroupId + '"><div class="lobtag"><a href="#" onclick="javascript:return Unibase.Themes.Compact.Components.CreateContact.Instance().tags(' + false + ',' + data.tagGroupId + ',\'' + data.groupName + '\',null,' + data.tagCategoryId + ')"; id="spn_Lobs_' + data.tagGroupId + '" class="spn_Lobs_' + data.tagGroupId + ' pl-20" style="text-decoration:underline;color:deepskyblue">' + data.groupName + '</a><input type="checkbox" name="lobs[]" value="' + data.tagGroupId + '" id="chkContactLob_' + data.tagGroupId + '" class="pull-right chkbx" onclick="_bizgaze_control_AutomationLobTags.selectedtags(' + data.tagGroupId + ')" title="Applied for All Included Tags">' +
|
||||
'<input type = "hidden" id = "hdn_customcontrol" class="value-control" value = "Unibase.Forms.Controls.AutomationLobTagControl.Instance().loaddata(\'' + containerid + '\');"' +
|
||||
'<div class="hidden lobtags_' + data.tagGroupId + ' row col-sm-12">' +
|
||||
'<div class="div_IncludedTags col-sm-12" id="div_IncludedTags_' + data.tagGroupId + '">' +
|
||||
'<div class="divTagSelectorContainer_' + data.tagGroupId + '"></div></div>' +
|
||||
'<div class="div_ExcludedTags col-sm-6" id="div_ExcludedTags_' + data.tagGroupId + '">' +
|
||||
'<div class="divTagSelectorContaine_' + data.tagGroupId + '"></div>' +
|
||||
'</div></div></li>';
|
||||
}
|
||||
html += '</div></ul></div>';
|
||||
return html;
|
||||
}
|
||||
tags(tags, LobId, LobName, res, categoryid) {
|
||||
var instance = this;
|
||||
instance.Includetags('div_IncludedTags_' + LobId, LobId, LobName, categoryid, null, res);
|
||||
}
|
||||
Includetags(containerid, LobId, LobName, categoryid, includetagids, tag) {
|
||||
var res1 = tag;
|
||||
var incltag = tag;
|
||||
var instance = this;
|
||||
var html = "<div class='row'>";
|
||||
html += '<div class="col-sm-12"><div class="lobtag">' +
|
||||
'<label>' + 'Included Tags' + '</label>' +
|
||||
'<select style="width:100%" id="txtBizgazeNotifications_Tags_' + LobId + '" class="txtBizgazeNotifications_Tags_' + LobId + ' no-border form-control includedtag"></select>' +
|
||||
'<input type="hidden" class="hfBizgazeNotifications_Tags_' + LobId + '" value="' + LobName + '" />' +
|
||||
'<input type="hidden" class="hfTags_LobName" value="' + LobName + '" />' +
|
||||
'<input type="hidden" class="hfTags_LobId" value="' + LobId + '" />' +
|
||||
'<input type="hidden" class="hfTags_CategoryId" value="' + categoryid + '" />' +
|
||||
'</div></div>';
|
||||
html += '</div>';
|
||||
$("#" + containerid).find(".divTagSelectorContainer_" + LobId).html(html);
|
||||
$("#" + containerid).find(".lobtag").each(function () {
|
||||
var element = $(this);
|
||||
if (incltag == null) {
|
||||
instance.refreshincludeTags(element, categoryid, incltag, LobId);
|
||||
}
|
||||
});
|
||||
}
|
||||
;
|
||||
refreshincludeTags(element, categoryid, incltag, LobId) {
|
||||
var includetags = [];
|
||||
var Ids = [];
|
||||
if (incltag == undefined) {
|
||||
incltag = [];
|
||||
}
|
||||
for (var i = 0; i < incltag.length; i++) {
|
||||
var tag = incltag[i];
|
||||
if (tag.LobId == LobId) {
|
||||
includetags.push({ id: tag.TagId, text: tag.TagName });
|
||||
Ids.push(tag.TagId);
|
||||
}
|
||||
}
|
||||
var selectedtags = [];
|
||||
var multitags = $("#liLobTags_" + LobId).find(".lobtag").find(".lobtags_" + LobId).find(".lobtag").find("#txtBizgazeNotifications_Tag_" + LobId);
|
||||
for (i = 0; i < multitags.length; i++) {
|
||||
var inctags = $("#txtBizgazeNotifications_Tags_" + LobId).val();
|
||||
var exctags = $("#txtBizgazeNotifications_Tag_" + LobId).val();
|
||||
selectedtags += inctags + ',' + exctags + ',';
|
||||
}
|
||||
selectedtags = undefined;
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().childlobs(LobId, Number($("#ddl_Tenant").val())).then(function (response) {
|
||||
var controlData = [];
|
||||
for (let i = 0; i < response.result.length; i++) {
|
||||
var controls = response.result[i];
|
||||
controlData.push({ id: controls.value, text: controls.selectText });
|
||||
}
|
||||
$(".txtBizgazeNotifications_Tags_" + LobId).select2({
|
||||
placeholder: 'Select Control',
|
||||
data: controlData,
|
||||
});
|
||||
});
|
||||
}
|
||||
;
|
||||
loaddata(containerid) {
|
||||
var array = [];
|
||||
var checkboxes = document.getElementsByName('lobs[]');
|
||||
var vals = "";
|
||||
for (var i = 0, n = checkboxes.length; i < n; i++) {
|
||||
if (checkboxes[i].checked) {
|
||||
vals += "|" + checkboxes[i].value + '|';
|
||||
}
|
||||
}
|
||||
if (vals)
|
||||
vals = vals.substring(1);
|
||||
var tags = new Array();
|
||||
var selcteddata = "";
|
||||
var excludedata = "";
|
||||
$(".div_IncludedTags").find(".lobtag").each(function () {
|
||||
var element = $(this);
|
||||
var data = element.find('.includedtag').select2("data");
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
selcteddata = selcteddata + data[i].id + '|';
|
||||
tags.push({ TagId: data[i].id });
|
||||
}
|
||||
});
|
||||
array.push({ "lobtags": vals, "includedtags": selcteddata, "excludedata": excludedata });
|
||||
return array;
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
$(".pr-password").click(function () {
|
||||
var signUpPswd = $(".pr-password");
|
||||
signUpPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
$("#passwordbox").removeClass('hidden');
|
||||
$("#btn_nextt").addClass('hidden');
|
||||
$("#btn_registercontact").removeClass('hidden');
|
||||
var instance = this;
|
||||
$('#PasswordHide').click(function () {
|
||||
var input = $('#confirmpass');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#Password_eye').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$('#cfmPasswordHide').click(function () {
|
||||
var input = $('#contacttPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#Password_eye').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#ddl_Tenant").change(function () {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().getchildtags(Number($("#ddl_Tenant").val())).then(function (response) {
|
||||
$("#ddl_Tags").empty();
|
||||
let cmbLob = document.getElementById('ddl_Tags');
|
||||
$("#ddl_Tags").append('<option value=0>Im A</option>');
|
||||
for (var i = 0; i < response.result.length; i++) {
|
||||
var data = response.result[i];
|
||||
var opt = document.createElement("option");
|
||||
var Name = data.tagName;
|
||||
var id = data.tagId;
|
||||
opt.text = Name;
|
||||
opt.value = id;
|
||||
cmbLob.append(opt);
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#txt_registercontactnumber").keypress(function (e) {
|
||||
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
|
||||
MessageHelper.Instance().showError("Numbers only allowed", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#btn_nextt").click(function () {
|
||||
$("#UserInfo").addClass("hidden");
|
||||
$("#passwordbox").removeClass('hidden');
|
||||
$("#divLobWiseTags").addClass('hidden');
|
||||
$("#btn_registercontact").removeClass('hidden');
|
||||
$("#btn_nextt").addClass('hidden');
|
||||
$(".section_LoBTags").addClass('hidden');
|
||||
});
|
||||
$("#btn_registercontact").click(function () {
|
||||
var number = $("#txt_registercontactnumber").val();
|
||||
if ($("#txt_registercontactname").val() == "") {
|
||||
MessageHelper.Instance().showError("Please Enter Name", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if ($("#txt_registerfirmname").val() == "") {
|
||||
MessageHelper.Instance().showError("Please Enter Firm Name", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if ($("#txt_registercontactnumber").val() == "") {
|
||||
MessageHelper.Instance().showError("Please Enter Phone Number", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (number.length < 10) {
|
||||
MessageHelper.Instance().showError("Please Check Your Number", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if ($("#ddl_Tags").val() == "0") {
|
||||
MessageHelper.Instance().showError("Please Select Tag", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if ($("#txt_registercontactmail").val() != "") {
|
||||
var test = /^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+(com|COM|in|IN)+$/;
|
||||
var value = $("#txt_registercontactmail").val();
|
||||
if (!value.match(test)) {
|
||||
MessageHelper.Instance().showError("Please Enter Valid Email", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var includes = $("#ddl_Tags").val();
|
||||
;
|
||||
if ($("#confirmpass").val() == "") {
|
||||
MessageHelper.Instance().showError("Please Enter PassWord", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
var number1 = Number($("#txt_registercontactnumber").val());
|
||||
var contactname = $("#txt_registercontactname").val();
|
||||
var firmname = $("#txt_registerfirmname").val();
|
||||
var contactmail = $("#txt_registercontactmail").val();
|
||||
var passwords = $("#confirmpass").val();
|
||||
var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
|
||||
var checkpassword = passwords.match(decimal) ? true : false;
|
||||
if (checkpassword == false) {
|
||||
$(".pr-password").focus();
|
||||
MessageHelper.Instance().showError("Please Match the Password in requested Format", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (($("#contacttPassword").val()) == "") {
|
||||
MessageHelper.Instance().showError("Please Enter Confirm Password", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
let checklength = $("#confirmpass").val();
|
||||
if (checklength.length < 8) {
|
||||
MessageHelper.Instance().showError("Your password length is " + checklength.length + ", Password must be atleast minimum 8 characters!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if ($("#confirmpass").val() != $("#contacttPassword").val()) {
|
||||
MessageHelper.Instance().showError("Password and Confirm Password Does Not Match", "div_ValidationSummary");
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
var password = $("#contacttPassword").val();
|
||||
if (contactmail == "") {
|
||||
contactmail = null;
|
||||
}
|
||||
$("#btn_registercontact").addClass("disabled");
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().registercontact(contactname, number1, contactmail, includes, Number($("#ddl_Tenant").val()), password, firmname).then(function (response) {
|
||||
$("#btn_registercontact").removeClass("disabled");
|
||||
var res = response;
|
||||
if (res.code == "3") {
|
||||
MessageHelper.Instance().showError(response.message, "div_ValidationSummary");
|
||||
}
|
||||
else {
|
||||
window.location.href = '#/login';
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("platform/membership/managers/accountmanager.js", function () {
|
||||
Unibase.Platform.Membership.Managers.AccountManager.Instance().getTenants().then(function (response) {
|
||||
var res = response;
|
||||
let cmbLob = document.getElementById('ddl_Tenant');
|
||||
$('#ddl_Tenant').empty();
|
||||
$('#ddl_Tenant').append('<option value=0>Select Tenant</option>');
|
||||
for (var i = 0; i < response.result.length; i++) {
|
||||
var data = response.result[i];
|
||||
var opt = document.createElement("option");
|
||||
var Name = data.tenantName;
|
||||
var id = data.tenantId;
|
||||
opt.text = Name;
|
||||
opt.value = id;
|
||||
cmbLob.append(opt);
|
||||
}
|
||||
if (res.result.filter(x => x.isTemplateDb == false).length == 1) {
|
||||
var id = $('#ddl_Tenant option[value=' + res.result.filter(x => x.isTemplateDb == false)[0].tenantId + ']');
|
||||
id.attr("selected", true);
|
||||
$("#ddl_Tenant").prop("disabled", true);
|
||||
$("#ddl_Tenant").change();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
loadIndustries() {
|
||||
}
|
||||
validate() {
|
||||
}
|
||||
sendOtp(isResend) {
|
||||
}
|
||||
verifyOtp() {
|
||||
}
|
||||
saveSignUp(ContactConfirmed, EmailConfirmed) {
|
||||
}
|
||||
static Instance() {
|
||||
return new CreateContact();
|
||||
}
|
||||
}
|
||||
Components.CreateContact = CreateContact;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+16
File diff suppressed because one or more lines are too long
@@ -0,0 +1,311 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class Signup extends Unibase.Platform.Core.BaseComponent {
|
||||
jsFiles() {
|
||||
return ["tenants/themes/compact/index.anonymous.js", "platform/membership/managers/accountmanager.js", "libs/passwordrequirement/passwordrequirement.js"];
|
||||
}
|
||||
cssFiles() {
|
||||
return ["libs/passwordrequirement/passwordrequirement.css"];
|
||||
}
|
||||
html(id, containerid) {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
var index = new Components.Index_Anonymous();
|
||||
index.init(null);
|
||||
}
|
||||
const html = `<div><form id="frm_Signup" default="" data-validate="parsley" data-isdynamic="false"><h1 class="display-4 mb-10 ml-10 mr-10">Sign up for free</h1><p class="mb-30 ml-10 mr-10">Create your account and start your free trial today</p><div><div id="div_ValidationSummary" class="clear ml-20 mr-20"></div><div class="form-row"><div class="col-md-6 form-group"><input class="form-control required" id="txt_FirstName" placeholder="First name" value="" type="text" required></div><div class="col-md-6 form-group"><input class="form-control required" id="txt_LastName" placeholder="Last name" value="" type="text" required></div></div><div class="form-group"><input class="form-control required" maxlength="10" id="txt_PhoneNum" placeholder="Mobile" type="tel" required></div><div class="form-group"><input class="form-control required" id="txt_Email" placeholder="Email" type="text" required></div><div class="form-group"><input class="form-control required pr-password " id="txt_Password" placeholder="Password" type="password" autocomplete="new-password" required><span toggle="#txt_Password" id="passwordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"/></span><div class="showpwsdreq"></div></div><div class="form-group"><input class="form-control required" id="txt_ConfirmPassword" placeholder="Confirm Password" type="password" autocomplete="new-password" required><span toggle="#txtConfirmPassword" id="confirmPasswordHide" class="fa fa-eye-slash font-15 mr-10 field-icon"/></div><div class="form-row"><div class="col-md-6 form-group"><input class="form-control required" id="txt_TenantName" placeholder="Tenant Name" type="text" required></div>
|
||||
<div class=" col-md-6 form-group " id="div_Industry"><select id="ddl_Industry" class="form-control value-control" data-isdynamic="false"></select><input class="form-control" id="txt_IndustryName" placeholder="Industry Name" type="text" class="hidden"></div>
|
||||
</div></div><div class="custom-control custom-checkbox mb-25 ml-10 mr-10"><input class="custom-control-input" id="chk_ReadTerms" type="checkbox"><label class="custom-control-label font-14" for="chk_ReadTerms">I have read and agree to the <a href=""><u>term and conditions</u></a></label></div><div class="ml-10 mr-10 mb-25 text-center"><a class="btn btn-primary btn-block text-white disabled" id="btn_Register">Register</a><div class="option-sep">or</div><p class="text-center">Already have an account?<a href="index.html#/login">Sign In</a></p></div></form><div id="modal_Otp" class="modal fade hide"><div class="modal-dialog"><div class="modal-content"><div class="modal-header mt-2 mb-2"><h5 class="modal-title pull-left">Mobile or Email Verification</h5><button type="button" class="close pull-right" data-dismiss="modal" aria-hidden="true" >×</button></div><div class="modal-body" id="div_modalbody"><div class="mb-10"><p class="lbl_Otp">We have sent OTP on your Mobile Number and Email!</p></div><div class="floating-label-form-group mb-2"><input class="form-control" id ="txt_Otp" placeholder="Enter Mobile OTP/Email OTP" type="text"></div></div><div class="modal-footer mb-2" style="display:block"><button type = "button" class="btn btn-primary pull-left" id="btn_ResendOtp">Resend</button><button type = "button" class="btn btn-primary pull-right" id="btn_VerifyOtp">Verify</button></div></div></div></div></div>`;
|
||||
return html;
|
||||
}
|
||||
load(id, containerid, callback) {
|
||||
$(".pr-password").click(function () {
|
||||
var signUpPswd = $(".pr-password");
|
||||
signUpPswd.passwordRequirements({
|
||||
numCharacters: 8,
|
||||
useLowercase: true,
|
||||
useUppercase: true,
|
||||
useNumbers: true,
|
||||
useSpecial: true
|
||||
});
|
||||
});
|
||||
this._accountManager = Unibase.Platform.Membership.Managers.AccountManager.Instance();
|
||||
var instance = this;
|
||||
instance.loadIndustries();
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
$("#div_modalbody").removeAttr("style");
|
||||
$('#chk_ReadTerms').change(function () {
|
||||
if ($(this).prop("checked"))
|
||||
$("#btn_Register").removeClass('disabled');
|
||||
else
|
||||
$("#btn_Register").addClass('disabled');
|
||||
});
|
||||
$('#passwordHide').click(function () {
|
||||
var input = $('#txt_Password');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#passwordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$('#confirmPasswordHide').click(function () {
|
||||
var input = $('#txt_ConfirmPassword');
|
||||
input.attr('type') == "password" ? input.attr('type', 'text') : input.attr('type', 'password');
|
||||
$('#confirmPasswordHide').toggleClass('fa-eye-slash fa-eye');
|
||||
});
|
||||
$("#txt_Otp").keypress(function (e) {
|
||||
if (e.which == 13)
|
||||
document.getElementById("btn_VerifyOtp").click();
|
||||
});
|
||||
$("#txt_PhoneNum").keypress(function (e) {
|
||||
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
|
||||
MessageHelper.Instance().showError("Numbers only allowed", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#btn_Register").click(function () {
|
||||
instance.validate();
|
||||
});
|
||||
$("#btn_VerifyOtp").click(function () {
|
||||
instance.verifyOtp();
|
||||
});
|
||||
$("#btn_ResendOtp").click(function () {
|
||||
instance.sendOtp(instance.OtpId);
|
||||
});
|
||||
}
|
||||
loadIndustries() {
|
||||
var instance = this;
|
||||
this._accountManager.getIndustries().then(function (response) {
|
||||
if (response.result.length > 0) {
|
||||
$('#ddl_Industry').removeClass("hidden");
|
||||
$('#txt_IndustryName').addClass("hidden");
|
||||
let cmbLob = document.getElementById('ddl_Industry');
|
||||
$('#ddl_Industry').empty();
|
||||
$('#ddl_Industry').append('<option value=0>Select Industry</option>');
|
||||
instance.IndustryLength = response.result.length;
|
||||
for (var i = 0; i < response.result.length; i++) {
|
||||
var data = response.result[i];
|
||||
var opt = document.createElement("option");
|
||||
var Name = data.industryName;
|
||||
var id = data.industryId + "|" + data.industryTenantId + "|" + data.isDefaultData;
|
||||
opt.text = Name;
|
||||
opt.value = id;
|
||||
cmbLob.append(opt);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$('#ddl_Industry').addClass("hidden");
|
||||
$('#txt_IndustryName').removeClass("hidden");
|
||||
}
|
||||
});
|
||||
}
|
||||
validate() {
|
||||
var instance = this;
|
||||
var confirmPassword = $("#txt_ConfirmPassword").val();
|
||||
var password = $("#txt_Password").val();
|
||||
var phone = $("#txt_PhoneNum").val();
|
||||
var email = $("#txt_Email").val();
|
||||
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+((com|COM|in|IN))+$/;
|
||||
var signUpForm = document.getElementById('frm_Signup');
|
||||
var isValid = signUpForm.checkValidity();
|
||||
if (!isValid) {
|
||||
MessageHelper.Instance().showError("Mandatory fields are missing!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
if (password.length < 8 || confirmPassword.length < 8) {
|
||||
MessageHelper.Instance().showError("Password must be atleast 8 characters!", 'div_ValidationSummary');
|
||||
return false;
|
||||
}
|
||||
var password = $("#txt_Password").val();
|
||||
var decimal = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
|
||||
var checkpassword = password.match(decimal) ? true : false;
|
||||
if (checkpassword == false) {
|
||||
$(".pr-password").focus();
|
||||
MessageHelper.Instance().showError("Please Match the Password in requested Format", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (password != confirmPassword) {
|
||||
MessageHelper.Instance().showError("New and Confirm Passwords doesn't match!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (regex.test(email) == false) {
|
||||
MessageHelper.Instance().showError("Email is not provided in correct format", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
if (instance.IndustryLength != 0) {
|
||||
if ($('#ddl_Industry option:selected').val() == 0) {
|
||||
MessageHelper.Instance().showError("Select an Industry!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($("#txt_IndustryName").val() == "") {
|
||||
MessageHelper.Instance().showError("Industry Name cannot be empty!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
instance._accountManager.getUser(phone, email).then(function (response) {
|
||||
if (response.result != null) {
|
||||
if (response.result.contactNumber == phone && response.result.email == email) {
|
||||
MessageHelper.Instance().showError("Phone Number & Email already exists!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
else if (response.result.contactNumber == phone) {
|
||||
MessageHelper.Instance().showError("Phone Number already exists!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
else if (response.result.email == email) {
|
||||
MessageHelper.Instance().showError("Email already exists!", "div_ValidationSummary");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$(".lbl_Otp").removeClass('text-danger text-success').text("We have sent OTP on your Mobile Number and Email !");
|
||||
$("#txt_Otp").val('');
|
||||
$("#div_ValidationSummary").empty();
|
||||
instance.sendOtp(0);
|
||||
}
|
||||
}, function () {
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
sendOtp(isResend) {
|
||||
var instance = this;
|
||||
$(".preloader-it").fadeIn();
|
||||
var postData = {
|
||||
FirstName: $("#txt_FirstName").val(),
|
||||
LastName: $("#txt_LastName").val(),
|
||||
ContactNumber: $("#txt_PhoneNum").val(),
|
||||
Email: $("#txt_Email").val(),
|
||||
TenantName: $("#txt_TenantName").val(),
|
||||
ContactOrEmail: "",
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: false,
|
||||
IsSignup: true,
|
||||
UnibaseId: "",
|
||||
OtpId: isResend,
|
||||
UserOtp: ""
|
||||
};
|
||||
instance._accountManager.sendOtp(postData).then(function (response) {
|
||||
if (isResend != 0) {
|
||||
$(".lbl_Otp").text("OTP has been Resent!").removeClass('text-danger', '').addClass('text-success', '');
|
||||
}
|
||||
if (response == 0) {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
}
|
||||
else {
|
||||
instance.OtpId = response;
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#modal_Otp").modal("show");
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#signup-container").show();
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
verifyOtp() {
|
||||
var instance = this;
|
||||
if ($("#txt_Otp").val() == "")
|
||||
$(".lbl_Otp").text("Please Enter OTP!").addClass('text-danger', '');
|
||||
else {
|
||||
var postData = {
|
||||
FirstName: "",
|
||||
LastName: "",
|
||||
ContactNumber: "",
|
||||
Email: "",
|
||||
TenantName: "",
|
||||
ContactOrEmail: "",
|
||||
IsForgotPswd: false,
|
||||
IsRegisterUser: false,
|
||||
IsSignup: true,
|
||||
UnibaseId: "",
|
||||
OtpId: instance.OtpId,
|
||||
UserOtp: $("#txt_Otp").val(),
|
||||
};
|
||||
instance._accountManager.verifyOtp(postData).then(function (response) {
|
||||
if (response.result != null) {
|
||||
if (response.result.contactConfirmed == false && response.result.emailConfirmed == false) {
|
||||
$("#modal_Otp").modal("show");
|
||||
$(".lbl_Otp").text("Invalid OTP!").addClass('text-danger', '');
|
||||
$("#txt_Otp").val('');
|
||||
}
|
||||
else {
|
||||
$("#modal_Otp").modal("hide");
|
||||
instance.saveSignUp(response.result.contactConfirmed, response.result.emailConfirmed);
|
||||
}
|
||||
}
|
||||
else if (response.code.toString() == "2") {
|
||||
$("#modal_Otp").modal("show");
|
||||
$(".lbl_Otp").text(response.errors.toString()).addClass('text-danger', '');
|
||||
$("#txt_Otp").val('');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
saveSignUp(ContactConfirmed, EmailConfirmed) {
|
||||
var instance = this;
|
||||
$(".preloader-it").fadeIn();
|
||||
var industryId = 0;
|
||||
var industryTenantId = 0;
|
||||
var isDefaultData = false;
|
||||
var industryName = "";
|
||||
if ($("#txt_IndustryName").val() == "" && $("#ddl_Industry option:selected").val() != "0") {
|
||||
var value = $("#ddl_Industry option:selected").val().toString().split('|');
|
||||
industryId = parseInt(value[0]);
|
||||
industryTenantId = parseInt(value[1]);
|
||||
isDefaultData = JSON.parse(value[2]);
|
||||
industryName = $("#ddl_Industry option:selected").text();
|
||||
}
|
||||
else
|
||||
industryName = $("#txt_IndustryName").val();
|
||||
var postData = {
|
||||
FirstName: $("#txt_FirstName").val(),
|
||||
LastName: $("#txt_LastName").val(),
|
||||
ContactNumber: $("#txt_PhoneNum").val(),
|
||||
Email: $("#txt_Email").val(),
|
||||
Password: $("#txt_Password").val(),
|
||||
TenantName: $("#txt_TenantName").val(),
|
||||
TenantId: 0,
|
||||
ContactNumberConfirmed: ContactConfirmed,
|
||||
EmailConfirmed: EmailConfirmed,
|
||||
IndustryId: industryId,
|
||||
IndustryTenantId: industryTenantId,
|
||||
IndustryName: industryName,
|
||||
IsDefaultData: isDefaultData,
|
||||
};
|
||||
instance._accountManager.signUp(postData).then(function (response) {
|
||||
$("#frm_Signup").find("input,textarea").val('');
|
||||
$("#frm_Signup").find("input").prop("checked", false);
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
if (response.errors == null) {
|
||||
MessageHelper.Instance().showSuccess("Tenant Created Successfully", 'div_ValidationSummary');
|
||||
instance.fileCacheHelper.loadJsFileAsync('tenants/themes/compact/components/signup/signupsuccesspage.js', function () {
|
||||
Unibase.Themes.Compact.Components.SignupSuccessPage.Instance().init("#bizgaze_body");
|
||||
});
|
||||
}
|
||||
else {
|
||||
MessageHelper.Instance().showError(response.message, 'div_ValidationSummary');
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
return false;
|
||||
}
|
||||
}, function () {
|
||||
$(".preloader-it").delay(200).fadeOut("slow");
|
||||
$("#signup-container").show();
|
||||
MessageHelper.Instance().showError("Some Error has occurred!", 'div_ValidationSummary');
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
return new Signup();
|
||||
}
|
||||
}
|
||||
Components.Signup = Signup;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+3
File diff suppressed because one or more lines are too long
@@ -0,0 +1,35 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class SignupSuccessPage extends Unibase.Platform.Core.BaseComponent {
|
||||
init(container) {
|
||||
this.render(container, null);
|
||||
}
|
||||
render(container, callback) {
|
||||
const html = '<form><div id="div_TenantSuccess" ><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto" ><i class="fa fa-check font-50 text-success" ></i></div><h1 class="display-4 mb-20 text-center" > Tenant Created Successfully </h1><p class="text-center" ><a href="/Index.html" > Click here to Login </a></p></div></form>';
|
||||
const cacheHelper = this.fileCacheHelper;
|
||||
cacheHelper.loadJsFile("tenants/themes/compact/index.anonymous.js", function () {
|
||||
if (jQuery("#external-form").length === 0) {
|
||||
jQuery(".preloader-it").delay(500).fadeOut("slow");
|
||||
jQuery("#external-container").delay(500).fadeIn("slow");
|
||||
jQuery("#bizgaze_body").css("background-color", "#f4f6f7");
|
||||
}
|
||||
jQuery("#external-form").html(html);
|
||||
if (callback != null)
|
||||
callback();
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
return new SignupSuccessPage();
|
||||
}
|
||||
}
|
||||
Components.SignupSuccessPage = SignupSuccessPage;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"signupsuccesspage.js","sourceRoot":"","sources":["signupsuccesspage.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CAkChB;AAlCD,WAAU,OAAO;IACb,IAAiB,MAAM,CAgCtB;IAhCD,WAAiB,MAAM;QACnB,IAAiB,OAAO,CA8BvB;QA9BD,WAAiB,OAAO;YACpB,IAAiB,UAAU,CA4B1B;YA5BD,WAAiB,UAAU;gBACvB,MAAa,iBAAkB,SAAQ,QAAA,QAAQ,CAAC,IAAI,CAAC,aAAa;oBAC9D,IAAI,CAAC,SAAS;wBACV,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;oBACjC,CAAC;oBAED,MAAM,CAAC,SAAS,EAAE,QAAQ;wBACtB,MAAM,IAAI,GAAG,0WAA0W,CAAC;wBAExX,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC;wBACzC,WAAW,CAAC,UAAU,CAAC,2CAA2C,EAAE;4BAChE,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;gCAEvC,MAAM,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gCACnD,MAAM,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gCACxD,MAAM,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;6BAC9D;4BACD,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;4BACpC,IAAI,QAAQ,IAAI,IAAI;gCAChB,QAAQ,EAAE,CAAC;wBACnB,CAAC,CAAC,CAAC;oBAEP,CAAC;oBACD,MAAM,CAAC,QAAQ;wBACX,OAAO,IAAI,iBAAiB,EAAE,CAAC;oBACnC,CAAC;iBAEJ;gBA1BY,4BAAiB,oBA0B7B,CAAA;YACL,CAAC,EA5BgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QA4B1B;QACL,CAAC,EA9BgB,OAAO,GAAP,cAAO,KAAP,cAAO,QA8BvB;IACL,CAAC,EAhCgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAgCtB;AACL,CAAC,EAlCS,OAAO,KAAP,OAAO,QAkChB"}
|
||||
+1
@@ -0,0 +1 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{init(n){this.render(n,null)}render(n,t){const i='<form><div id="div_TenantSuccess" ><div class="d-62 bg-white rounded-circle mb-10 d-flex align-items-center justify-content-center mx-auto" ><i class="fa fa-check font-50 text-success" ><\/i><\/div><h1 class="display-4 mb-20 text-center" > Tenant Created Successfully <\/h1><p class="text-center" ><a href="/Index.html" > Click here to Login <\/a><\/p><\/div><\/form>',r=this.fileCacheHelper;r.loadJsFile("tenants/themes/compact/index.anonymous.js",function(){jQuery("#external-form").length===0&&(jQuery(".preloader-it").delay(500).fadeOut("slow"),jQuery("#external-container").delay(500).fadeIn("slow"),jQuery("#bizgaze_body").css("background-color","#f4f6f7"));jQuery("#external-form").html(i);t!=null&&t()})}static Instance(){return new i}}t.SignupSuccessPage=i})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
@@ -0,0 +1,358 @@
|
||||
var Unibase;
|
||||
(function (Unibase) {
|
||||
let Themes;
|
||||
(function (Themes) {
|
||||
let Compact;
|
||||
(function (Compact) {
|
||||
let Components;
|
||||
(function (Components) {
|
||||
class UserTheme extends Unibase.Platform.Core.BaseComponent {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.layoutElement = '#user-themes #menu-layouts .card-body .row.layout-row a';
|
||||
this.detailsViewElement = '#user-themes #detail-list-view .card-body .row.detail-row a';
|
||||
this.backgroundImageElement = '#user-themes #background-image-view .card-body .row a';
|
||||
this.displayModeElement = '#user-themes #theme-switcher-colors .card-body .row a';
|
||||
this.currentUserTheme = {
|
||||
LayoutId: 0,
|
||||
DetailsViewId: 0,
|
||||
DisplayModeId: 0,
|
||||
BackgroundImageId: 0,
|
||||
ThemeId: 0,
|
||||
IsCompanyTheme: false,
|
||||
};
|
||||
}
|
||||
userTheme(isCompany, companyId, roleId, isRole) {
|
||||
let instance = this;
|
||||
var _fileCacheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadCssFiles(['platform/layout/components/layoutbuilder/style.layoutbuilder.css'], function () {
|
||||
if (companyId == undefined || companyId == "" || companyId == null) {
|
||||
companyId = 0;
|
||||
}
|
||||
if (roleId == undefined || roleId == "" || roleId == null) {
|
||||
roleId = 0;
|
||||
}
|
||||
Unibase.Platform.Layouts.Managers.ThemeLayoutManager.Instance().getLayoutBuilderInfo(companyId, roleId).then(function (response) {
|
||||
$(".biz-wrapper").addClass("biz-settings-toggle");
|
||||
$(".hk-wrapper").addClass("biz-settings-toggle");
|
||||
/ Plain Html /;
|
||||
let leftHtml = Unibase.Platform.Layouts.Components.LayoutBuilder_Template.Instance().getLeftHtml();
|
||||
let onclick = "Unibase.Themes.Compact.Components.UserTheme.Instance().saveUserTheme()";
|
||||
if (isCompany || isRole) {
|
||||
onclick = "Unibase.Themes.Compact.Components.UserTheme.Instance().saveCompanyTheme()";
|
||||
}
|
||||
let html = `
|
||||
<div class="user-themes" id="user-themes">
|
||||
<div class="user-themes-header"></div>
|
||||
<div class="user-themes-body">
|
||||
${leftHtml}
|
||||
</div>
|
||||
<div class="user-themes-footer">
|
||||
<a href="javascript:;" class="btn btn-theme px-4 w-100" type="button" onclick="` + onclick + `">Apply</a>
|
||||
</div>
|
||||
</div>`;
|
||||
$("#settings-panel-body").html(html);
|
||||
$("#settings-panel-head-title").html("Themes");
|
||||
let themeSwitchHtml = ` <div class="card theme-switcher">
|
||||
<div class="card-header">
|
||||
<a href="javascript:;" class="no-collapse biz-primary-text-color-removed" > Theme Switcher </a>
|
||||
</div>
|
||||
<div class="title-devider biz-border-color-removed"> </div>
|
||||
<div id="theme-switcher-colors">
|
||||
<div class="card-body pb-0" >
|
||||
<div class="row dropdown-menu-scrollbar checkbox-container">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$("#user-themes .background-change").before(themeSwitchHtml);
|
||||
response.result.LayoutInfo.forEach((layout) => {
|
||||
let curLayout = layout;
|
||||
let layoutId = curLayout.LayoutId;
|
||||
curLayout.Thumbnail = curLayout.Thumbnail.replace(".png", ".svg");
|
||||
$("#user-themes #menu-layouts .layout-row").append(`<a href="javascript:;" class="col-6 p-0 pr-2 p-relative" data-id="${layoutId}" data-index="${curLayout.LayoutIndex}">
|
||||
<img src="${curLayout.Thumbnail}" class="rounded w-100 h-100" data-dynamic="1" onerror="ReloadImage(event)" title="${curLayout.LayoutName}" />
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`);
|
||||
});
|
||||
$(instance.layoutElement).click(function () {
|
||||
$(instance.layoutElement).removeClass('active');
|
||||
$(this).addClass('active');
|
||||
let id = Number($(this).attr('data-id'));
|
||||
instance.currentUserTheme.LayoutId = id;
|
||||
});
|
||||
response.result.DetailViewInfo.forEach((viewLayout) => {
|
||||
if (viewLayout.DetailsViewName != "Popup") {
|
||||
let id = viewLayout.DetailsViewId;
|
||||
$("#user-themes #detail-list-view .detail-row").append(`<a href="javascript:;" class="col-6 p-0 mb-2 pr-2 p-relative" data-id="${id}">
|
||||
<img src="${viewLayout.Thumbnail}" class="rounded w-100 h-100" data-dynamic="1" onerror="ReloadImage(event)" title="${viewLayout.DetailsViewName}" />
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`);
|
||||
}
|
||||
});
|
||||
$('.isStructSettingsEnableChk').parent().siblings().remove();
|
||||
$('[for="isStructSettingsEnableChk"]').remove();
|
||||
$(instance.detailsViewElement).click(function () {
|
||||
$(instance.detailsViewElement).removeClass('active');
|
||||
$(this).addClass('active');
|
||||
let id = Number($(this).attr('data-id'));
|
||||
instance.currentUserTheme.DetailsViewId = id;
|
||||
});
|
||||
response.result.DisplayModesInfo.forEach((displayMode) => {
|
||||
$("#user-themes #theme-switcher-colors .row").append(`<a href="javascript:;" class="p-relative mr-2 mb-2" data-id="${displayMode.DisplayModeId}" title="${displayMode.DisplayModeName}">
|
||||
<div class="p-relative color-box border biz-border-color-removed" style="background-color:${displayMode.PrimaryColor}">
|
||||
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`);
|
||||
});
|
||||
$(instance.displayModeElement).click(function () {
|
||||
$(instance.displayModeElement).removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$(`${instance.backgroundImageElement}.solid-color .color-box`).css("background-color", $(this).find('.color-box').css("background-color"));
|
||||
$(`${instance.backgroundImageElement}.solid-color color-box`).addClass('active');
|
||||
let id = Number($(this).attr('data-id'));
|
||||
instance.currentUserTheme.DisplayModeId = id;
|
||||
});
|
||||
let solidColorImage = `<a href="javascript:;" class="col-4 p-relative px-1 solid-color active" data-id="0">
|
||||
<div class="p-relative color-box border biz-border-color-removed" style="height:65px">
|
||||
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`;
|
||||
$("#user-themes #background-image-view .row").append(solidColorImage);
|
||||
response.result.BackgroundImages.forEach((backgroundImage) => {
|
||||
let IsDefaultClass = backgroundImage.IsDefault ? 'default' : '';
|
||||
$("#user-themes #background-image-view .row").append(`<a href="javascript:;" class="col-4 p-relative px-1 ${IsDefaultClass}" data-url="${backgroundImage.Thumbnail}" data-id="${backgroundImage.BackgroundImageId}">
|
||||
<div class="p-relative">
|
||||
<img src="${backgroundImage.Thumbnail}" class="rounded w-100" data-dynamic="1" onerror = "ReloadImage(event)" />
|
||||
<div class="delete" data-id="${backgroundImage.BackgroundImageId}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</div>
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`);
|
||||
});
|
||||
$(instance.backgroundImageElement).click(function () {
|
||||
$(instance.backgroundImageElement).removeClass('active');
|
||||
$(this).addClass('active');
|
||||
instance.currentUserTheme.BackgroundImageId = Number($(this).attr('data-id'));
|
||||
});
|
||||
let currentTheme = Unibase.Themes.Compact.Components.Index.Instance().currentTheme;
|
||||
if (isCompany || isRole) {
|
||||
currentTheme = response.result.CompanyTheme;
|
||||
if (currentTheme === '') {
|
||||
instance.currentUserTheme.LayoutId = 0;
|
||||
instance.currentUserTheme.DetailsViewId = 0;
|
||||
instance.currentUserTheme.DisplayModeId = 0;
|
||||
instance.currentUserTheme.BackgroundImageId = 0;
|
||||
instance.currentUserTheme.ThemeId = 0;
|
||||
}
|
||||
if (isRole && $(".hdn_themeid").length === 0) {
|
||||
$('._bizgaze_popup_container').last().find('.section_Hidden').append(`<input type="hidden" class="hdn_themeid" value="0"><input type="hidden" class="hdn_displaymodeid" value="0">`);
|
||||
}
|
||||
if (currentTheme === '' && $(".hdn_themeid").val() != "0") {
|
||||
instance.bindSelectedUserThemeSettings();
|
||||
return;
|
||||
}
|
||||
}
|
||||
$(`${instance.layoutElement}[data-id="${currentTheme.layoutId}"]`).click();
|
||||
$(`${instance.detailsViewElement}[data-id="${currentTheme.detailsViewId}"]`).click();
|
||||
$(`${instance.displayModeElement}[data-id="${currentTheme.displayModeId}"]`).click();
|
||||
$(`${instance.backgroundImageElement}[data-id="${currentTheme.backgroundImageId}"]`).click();
|
||||
instance.currentUserTheme.ThemeId = currentTheme.themeId;
|
||||
instance.currentUserTheme.IsCompanyTheme = currentTheme.isCompanyTheme;
|
||||
});
|
||||
});
|
||||
}
|
||||
bindSelectedUserThemeSettings() {
|
||||
const instance = this;
|
||||
const currentTheme = JSON.parse($(".hdn_themeid").val().toString());
|
||||
const { LayoutId, DetailsViewId, DisplayModeId, BackgroundImageId } = currentTheme;
|
||||
$(`${instance.layoutElement}[data-id="${LayoutId}"]`).trigger('click');
|
||||
$(`${instance.detailsViewElement}[data-id="${DetailsViewId}"]`).trigger('click');
|
||||
$(`${instance.displayModeElement}[data-id="${DisplayModeId}"]`).trigger('click');
|
||||
$(`${instance.backgroundImageElement}[data-id="${BackgroundImageId}"]`).trigger('click');
|
||||
}
|
||||
init(isCompany, companyId) {
|
||||
let instance = this;
|
||||
var _fileCacheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadCssFiles(['platform/layout/components/layoutbuilder/style.layoutbuilder.css'], function () {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(['platform/core/infos/status.js', 'platform/layout/managers/themelayoutmanager.js'], function () {
|
||||
if (companyId == undefined || companyId == "" || companyId == null) {
|
||||
companyId = 0;
|
||||
}
|
||||
Unibase.Platform.Layouts.Managers.ThemeLayoutManager.Instance().getLayoutBuilderInfo(companyId, 0).then(function (response) {
|
||||
$(".biz-wrapper").addClass("biz-settings-toggle");
|
||||
$(".hk-wrapper").addClass("biz-settings-toggle");
|
||||
let leftHtml = Unibase.Platform.Layouts.Components.LayoutBuilder_Template.Instance().getLeftHtml();
|
||||
let onclick = "Unibase.Themes.Compact.Components.UserTheme.Instance().saveUserTheme()";
|
||||
if (isCompany) {
|
||||
onclick = "Unibase.Themes.Compact.Components.UserTheme.Instance().saveCompanyTheme()";
|
||||
}
|
||||
let html = `<div class="user-themes" id="user-themes">
|
||||
<div class="user-themes-header"></div>
|
||||
<div class="user-themes-body">
|
||||
${leftHtml}
|
||||
</div>
|
||||
<div class="user-themes-footer">
|
||||
<a href="javascript:;" class="btn btn-theme px-4 w-100" type="button" onclick="` + onclick + `">Apply</a>
|
||||
</div>
|
||||
</div>`;
|
||||
$("#settings-panel-body").html(html);
|
||||
$("#settings-panel-head-title").html("Themes");
|
||||
let themeSwitchHtml = `<div class="card theme-switcher">
|
||||
<div class="card-header">
|
||||
<a href="javascript:;" class="no-collapse biz-primary-text-color-removed" > Theme Switcher </a>
|
||||
</div>
|
||||
<div class="title-devider biz-border-color-removed"> </div>
|
||||
<div id="theme-switcher-colors">
|
||||
<div class="card-body pb-0" >
|
||||
<div class="row dropdown-menu-scrollbar checkbox-container">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
$("#user-themes .background-change").before(themeSwitchHtml);
|
||||
response.result.LayoutInfo.forEach((layout) => {
|
||||
let curLayout = layout;
|
||||
let layoutId = curLayout.LayoutId;
|
||||
curLayout.Thumbnail = curLayout.Thumbnail.replace(".png", ".svg");
|
||||
$("#user-themes #menu-layouts .layout-row").append(`<a href="javascript:;" class="col-6 p-0 pr-2 p-relative" data-id="${layoutId}" data-index="${curLayout.LayoutIndex}">
|
||||
<img src="${curLayout.Thumbnail}" class="rounded w-100 h-100" data-dynamic="1" onerror="ReloadImage(event)" title="${curLayout.LayoutName}" />
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`);
|
||||
});
|
||||
$(instance.layoutElement).click(function () {
|
||||
$(instance.layoutElement).removeClass('active');
|
||||
$(this).addClass('active');
|
||||
let id = Number($(this).attr('data-id'));
|
||||
instance.currentUserTheme.LayoutId = id;
|
||||
});
|
||||
response.result.DetailViewInfo.forEach((viewLayout) => {
|
||||
if (viewLayout.DetailsViewName != "Popup") {
|
||||
let id = viewLayout.DetailsViewId;
|
||||
$("#user-themes #detail-list-view .detail-row").append(`<a href="javascript:;" class="col-6 p-0 mb-2 pr-2 p-relative" data-id="${id}">
|
||||
<img src="${viewLayout.Thumbnail}" class="rounded w-100 h-100" data-dynamic="1" onerror="ReloadImage(event)" title="${viewLayout.DetailsViewName}" />
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`);
|
||||
}
|
||||
});
|
||||
$(instance.detailsViewElement).click(function () {
|
||||
$(instance.detailsViewElement).removeClass('active');
|
||||
$(this).addClass('active');
|
||||
let id = Number($(this).attr('data-id'));
|
||||
instance.currentUserTheme.DetailsViewId = id;
|
||||
});
|
||||
response.result.DisplayModesInfo.forEach((displayMode) => {
|
||||
$("#user-themes #theme-switcher-colors .row").append(`<a href="javascript:;" class="p-relative mr-2 mb-2" data-id="${displayMode.DisplayModeId}" title="${displayMode.DisplayModeName}">
|
||||
<div class="p-relative color-box border biz-border-color-removed" style="background-color:${displayMode.PrimaryColor}">
|
||||
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`);
|
||||
});
|
||||
$(instance.displayModeElement).click(function () {
|
||||
$(instance.displayModeElement).removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$(`${instance.backgroundImageElement}.solid-color .color-box`).css("background-color", $(this).find('.color-box').css("background-color"));
|
||||
$(`${instance.backgroundImageElement}.solid-color color-box`).addClass('active');
|
||||
let id = Number($(this).attr('data-id'));
|
||||
instance.currentUserTheme.DisplayModeId = id;
|
||||
});
|
||||
let solidColorImage = `<a href="javascript:;" class="col-4 p-relative px-1 solid-color active" data-id="0">
|
||||
<div class="p-relative color-box border biz-border-color-removed" style="height:65px">
|
||||
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`;
|
||||
$("#user-themes #background-image-view .row").append(solidColorImage);
|
||||
response.result.BackgroundImages.forEach((backgroundImage) => {
|
||||
let IsDefaultClass = backgroundImage.IsDefault ? 'default' : '';
|
||||
$("#user-themes #background-image-view .row").append(`<a href="javascript:;" class="col-4 p-relative px-1 ${IsDefaultClass}" data-url="${backgroundImage.Thumbnail}" data-id="${backgroundImage.BackgroundImageId}">
|
||||
<div class="p-relative">
|
||||
<img src="${backgroundImage.Thumbnail}" class="rounded w-100" data-dynamic="1" onerror = "ReloadImage(event)" />
|
||||
<div class="delete" data-id="${backgroundImage.BackgroundImageId}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</div>
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`);
|
||||
});
|
||||
$(instance.backgroundImageElement).click(function () {
|
||||
$(instance.backgroundImageElement).removeClass('active');
|
||||
$(this).addClass('active');
|
||||
instance.currentUserTheme.BackgroundImageId = Number($(this).attr('data-id'));
|
||||
});
|
||||
let currentTheme = Unibase.Themes.Compact.Components.Index.Instance().currentTheme;
|
||||
if (isCompany) {
|
||||
currentTheme = response.result.CompanyTheme;
|
||||
}
|
||||
$(`${instance.layoutElement}[data-id="${currentTheme.layoutId}"]`).click();
|
||||
$(`${instance.detailsViewElement}[data-id="${currentTheme.detailsViewId}"]`).click();
|
||||
$(`${instance.displayModeElement}[data-id="${currentTheme.displayModeId}"]`).click();
|
||||
$(`${instance.backgroundImageElement}[data-id="${currentTheme.backgroundImageId}"]`).click();
|
||||
instance.currentUserTheme.ThemeId = currentTheme.themeId;
|
||||
instance.currentUserTheme.IsCompanyTheme = currentTheme.isCompanyTheme;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
saveCompanyTheme() {
|
||||
let instance = this;
|
||||
let postData = {
|
||||
LayoutId: instance.currentUserTheme.LayoutId,
|
||||
ThemeId: instance.currentUserTheme.ThemeId || 0,
|
||||
DetailsViewId: instance.currentUserTheme.DetailsViewId,
|
||||
DisplayModeId: instance.currentUserTheme.DisplayModeId,
|
||||
BackgroundImageId: instance.currentUserTheme.BackgroundImageId
|
||||
};
|
||||
const placeholder = $('._bizgaze_popup_container').last().find('.form-error-message').first().attr('id');
|
||||
if (!postData.LayoutId && !postData.DetailsViewId && !postData.DisplayModeId) {
|
||||
MessageHelper.Instance().showError('Select Theme.', placeholder);
|
||||
return;
|
||||
}
|
||||
if (!postData.LayoutId) {
|
||||
MessageHelper.Instance().showError('Select Preferred Layout in Theme.', placeholder);
|
||||
return;
|
||||
}
|
||||
else if (!postData.DetailsViewId) {
|
||||
MessageHelper.Instance().showError('Select Preferred Details View in Theme.', placeholder);
|
||||
return;
|
||||
}
|
||||
else if (!postData.DisplayModeId) {
|
||||
MessageHelper.Instance().showError('Select Theme Switcher.', placeholder);
|
||||
return;
|
||||
}
|
||||
$(".hdn_themeid").val(JSON.stringify(postData));
|
||||
$(".hdn_displaymodeid").val(instance.currentUserTheme.DisplayModeId);
|
||||
$(".biz-wrapper,.hk-wrapper").removeClass("biz-settings-toggle");
|
||||
}
|
||||
saveUserTheme() {
|
||||
let instance = this;
|
||||
let postData = {
|
||||
LayoutId: instance.currentUserTheme.LayoutId,
|
||||
ThemeId: instance.currentUserTheme.IsCompanyTheme ? 0 : instance.currentUserTheme.ThemeId,
|
||||
DetailsViewId: instance.currentUserTheme.DetailsViewId,
|
||||
DisplayModeId: instance.currentUserTheme.DisplayModeId,
|
||||
BackgroundImageId: instance.currentUserTheme.BackgroundImageId
|
||||
};
|
||||
Unibase.Platform.Layouts.Managers.ThemeLayoutManager.Instance().saveUserTheme(postData).then(function (response) {
|
||||
if (response.status == Unibase.Data.Status.Success) {
|
||||
MessageHelper.Instance().showSuccess(response.message, '');
|
||||
Unibase.Platform.Layouts.Components.LayoutBuilder.Instance().refrshLayout(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
static Instance() {
|
||||
if (this.instance === undefined) {
|
||||
this.instance = new UserTheme();
|
||||
}
|
||||
return this.instance;
|
||||
}
|
||||
}
|
||||
Components.UserTheme = UserTheme;
|
||||
})(Components = Compact.Components || (Compact.Components = {}));
|
||||
})(Compact = Themes.Compact || (Themes.Compact = {}));
|
||||
})(Themes = Unibase.Themes || (Unibase.Themes = {}));
|
||||
})(Unibase || (Unibase = {}));
|
||||
File diff suppressed because one or more lines are too long
+88
@@ -0,0 +1,88 @@
|
||||
var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{constructor(){super(...arguments);this.layoutElement="#user-themes #menu-layouts .card-body .row.layout-row a";this.detailsViewElement="#user-themes #detail-list-view .card-body .row.detail-row a";this.backgroundImageElement="#user-themes #background-image-view .card-body .row a";this.displayModeElement="#user-themes #theme-switcher-colors .card-body .row a";this.currentUserTheme={LayoutId:0,DetailsViewId:0,DisplayModeId:0,BackgroundImageId:0,ThemeId:0,IsCompanyTheme:!1}}userTheme(t,i,r,u){let f=this;var e=n.Platform.Helpers.FileCacheHelper.Instance();n.Platform.Helpers.FileCacheHelper.Instance().loadCssFiles(["platform/layout/components/layoutbuilder/style.layoutbuilder.css"],function(){n.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["platform/core/infos/status.js","platform/layout/managers/themelayoutmanager.js"],function(){(i==undefined||i==""||i==null)&&(i=0);(r==undefined||r==""||r==null)&&(r=0);n.Platform.Layouts.Managers.ThemeLayoutManager.Instance().getLayoutBuilderInfo(i,r).then(function(i){$(".biz-wrapper").addClass("biz-settings-toggle");$(".hk-wrapper").addClass("biz-settings-toggle");/ Plain Html /;let o=n.Platform.Layouts.Components.LayoutBuilder_Template.Instance().getLeftHtml(),e="Unibase.Themes.Compact.Components.UserTheme.Instance().saveUserTheme()";(t||u)&&(e="Unibase.Themes.Compact.Components.UserTheme.Instance().saveCompanyTheme()");let s=`
|
||||
<div class="user-themes" id="user-themes">
|
||||
<div class="user-themes-header"></div>
|
||||
<div class="user-themes-body">
|
||||
${o}
|
||||
</div>
|
||||
<div class="user-themes-footer">
|
||||
<a href="javascript:;" class="btn btn-theme px-4 w-100" type="button" onclick="`+e+`">Apply</a>
|
||||
</div>
|
||||
</div>`;$("#settings-panel-body").html(s);$("#settings-panel-head-title").html("Themes");let h=` <div class="card theme-switcher">
|
||||
<div class="card-header">
|
||||
<a href="javascript:;" class="no-collapse biz-primary-text-color-removed" > Theme Switcher </a>
|
||||
</div>
|
||||
<div class="title-devider biz-border-color-removed"> </div>
|
||||
<div id="theme-switcher-colors">
|
||||
<div class="card-body pb-0" >
|
||||
<div class="row dropdown-menu-scrollbar checkbox-container">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;$("#user-themes .background-change").before(h);i.result.LayoutInfo.forEach(n=>{let t=n,i=t.LayoutId;t.Thumbnail=t.Thumbnail.replace(".png",".svg");$("#user-themes #menu-layouts .layout-row").append(`<a href="javascript:;" class="col-6 p-0 pr-2 p-relative" data-id="${i}" data-index="${t.LayoutIndex}">
|
||||
<img src="${t.Thumbnail}" class="rounded w-100 h-100" data-dynamic="1" onerror="ReloadImage(event)" title="${t.LayoutName}" />
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`)});$(f.layoutElement).click(function(){$(f.layoutElement).removeClass("active");$(this).addClass("active");let n=Number($(this).attr("data-id"));f.currentUserTheme.LayoutId=n});i.result.DetailViewInfo.forEach(n=>{if(n.DetailsViewName!="Popup"){let t=n.DetailsViewId;$("#user-themes #detail-list-view .detail-row").append(`<a href="javascript:;" class="col-6 p-0 mb-2 pr-2 p-relative" data-id="${t}">
|
||||
<img src="${n.Thumbnail}" class="rounded w-100 h-100" data-dynamic="1" onerror="ReloadImage(event)" title="${n.DetailsViewName}" />
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`)}});$(".isStructSettingsEnableChk").parent().siblings().remove();$('[for="isStructSettingsEnableChk"]').remove();$(f.detailsViewElement).click(function(){$(f.detailsViewElement).removeClass("active");$(this).addClass("active");let n=Number($(this).attr("data-id"));f.currentUserTheme.DetailsViewId=n});i.result.DisplayModesInfo.forEach(n=>{$("#user-themes #theme-switcher-colors .row").append(`<a href="javascript:;" class="p-relative mr-2 mb-2" data-id="${n.DisplayModeId}" title="${n.DisplayModeName}">
|
||||
<div class="p-relative color-box border biz-border-color-removed" style="background-color:${n.PrimaryColor}">
|
||||
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`)});$(f.displayModeElement).click(function(){$(f.displayModeElement).removeClass("active");$(this).addClass("active");$(`${f.backgroundImageElement}.solid-color .color-box`).css("background-color",$(this).find(".color-box").css("background-color"));$(`${f.backgroundImageElement}.solid-color color-box`).addClass("active");let n=Number($(this).attr("data-id"));f.currentUserTheme.DisplayModeId=n});let c=`<a href="javascript:;" class="col-4 p-relative px-1 solid-color active" data-id="0">
|
||||
<div class="p-relative color-box border biz-border-color-removed" style="height:65px">
|
||||
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`;$("#user-themes #background-image-view .row").append(c);i.result.BackgroundImages.forEach(n=>{let t=n.IsDefault?"default":"";$("#user-themes #background-image-view .row").append(`<a href="javascript:;" class="col-4 p-relative px-1 ${t}" data-url="${n.Thumbnail}" data-id="${n.BackgroundImageId}">
|
||||
<div class="p-relative">
|
||||
<img src="${n.Thumbnail}" class="rounded w-100" data-dynamic="1" onerror = "ReloadImage(event)" />
|
||||
<div class="delete" data-id="${n.BackgroundImageId}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</div>
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`)});$(f.backgroundImageElement).click(function(){$(f.backgroundImageElement).removeClass("active");$(this).addClass("active");f.currentUserTheme.BackgroundImageId=Number($(this).attr("data-id"))});let r=n.Themes.Compact.Components.Index.Instance().currentTheme;if((t||u)&&(r=i.result.CompanyTheme,r===""&&(f.currentUserTheme.LayoutId=0,f.currentUserTheme.DetailsViewId=0,f.currentUserTheme.DisplayModeId=0,f.currentUserTheme.BackgroundImageId=0,f.currentUserTheme.ThemeId=0),u&&$(".hdn_themeid").length===0&&$("._bizgaze_popup_container").last().find(".section_Hidden").append(`<input type="hidden" class="hdn_themeid" value="0"><input type="hidden" class="hdn_displaymodeid" value="0">`),r===""&&$(".hdn_themeid").val()!="0")){f.bindSelectedUserThemeSettings();return}$(`${f.layoutElement}[data-id="${r.layoutId}"]`).click();$(`${f.detailsViewElement}[data-id="${r.detailsViewId}"]`).click();$(`${f.displayModeElement}[data-id="${r.displayModeId}"]`).click();$(`${f.backgroundImageElement}[data-id="${r.backgroundImageId}"]`).click();f.currentUserTheme.ThemeId=r.themeId;f.currentUserTheme.IsCompanyTheme=r.isCompanyTheme})})})}bindSelectedUserThemeSettings(){const n=this,t=JSON.parse($(".hdn_themeid").val().toString()),{LayoutId:i,DetailsViewId:r,DisplayModeId:u,BackgroundImageId:f}=t;$(`${n.layoutElement}[data-id="${i}"]`).trigger("click");$(`${n.detailsViewElement}[data-id="${r}"]`).trigger("click");$(`${n.displayModeElement}[data-id="${u}"]`).trigger("click");$(`${n.backgroundImageElement}[data-id="${f}"]`).trigger("click")}init(t,i){let r=this;var u=n.Platform.Helpers.FileCacheHelper.Instance();n.Platform.Helpers.FileCacheHelper.Instance().loadCssFiles(["platform/layout/components/layoutbuilder/style.layoutbuilder.css"],function(){n.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["platform/core/infos/status.js","platform/layout/managers/themelayoutmanager.js"],function(){(i==undefined||i==""||i==null)&&(i=0);n.Platform.Layouts.Managers.ThemeLayoutManager.Instance().getLayoutBuilderInfo(i,0).then(function(i){$(".biz-wrapper").addClass("biz-settings-toggle");$(".hk-wrapper").addClass("biz-settings-toggle");let e=n.Platform.Layouts.Components.LayoutBuilder_Template.Instance().getLeftHtml(),f="Unibase.Themes.Compact.Components.UserTheme.Instance().saveUserTheme()";t&&(f="Unibase.Themes.Compact.Components.UserTheme.Instance().saveCompanyTheme()");let o=`<div class="user-themes" id="user-themes">
|
||||
<div class="user-themes-header"></div>
|
||||
<div class="user-themes-body">
|
||||
${e}
|
||||
</div>
|
||||
<div class="user-themes-footer">
|
||||
<a href="javascript:;" class="btn btn-theme px-4 w-100" type="button" onclick="`+f+`">Apply</a>
|
||||
</div>
|
||||
</div>`;$("#settings-panel-body").html(o);$("#settings-panel-head-title").html("Themes");let s=`<div class="card theme-switcher">
|
||||
<div class="card-header">
|
||||
<a href="javascript:;" class="no-collapse biz-primary-text-color-removed" > Theme Switcher </a>
|
||||
</div>
|
||||
<div class="title-devider biz-border-color-removed"> </div>
|
||||
<div id="theme-switcher-colors">
|
||||
<div class="card-body pb-0" >
|
||||
<div class="row dropdown-menu-scrollbar checkbox-container">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;$("#user-themes .background-change").before(s);i.result.LayoutInfo.forEach(n=>{let t=n,i=t.LayoutId;t.Thumbnail=t.Thumbnail.replace(".png",".svg");$("#user-themes #menu-layouts .layout-row").append(`<a href="javascript:;" class="col-6 p-0 pr-2 p-relative" data-id="${i}" data-index="${t.LayoutIndex}">
|
||||
<img src="${t.Thumbnail}" class="rounded w-100 h-100" data-dynamic="1" onerror="ReloadImage(event)" title="${t.LayoutName}" />
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`)});$(r.layoutElement).click(function(){$(r.layoutElement).removeClass("active");$(this).addClass("active");let n=Number($(this).attr("data-id"));r.currentUserTheme.LayoutId=n});i.result.DetailViewInfo.forEach(n=>{if(n.DetailsViewName!="Popup"){let t=n.DetailsViewId;$("#user-themes #detail-list-view .detail-row").append(`<a href="javascript:;" class="col-6 p-0 mb-2 pr-2 p-relative" data-id="${t}">
|
||||
<img src="${n.Thumbnail}" class="rounded w-100 h-100" data-dynamic="1" onerror="ReloadImage(event)" title="${n.DetailsViewName}" />
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`)}});$(r.detailsViewElement).click(function(){$(r.detailsViewElement).removeClass("active");$(this).addClass("active");let n=Number($(this).attr("data-id"));r.currentUserTheme.DetailsViewId=n});i.result.DisplayModesInfo.forEach(n=>{$("#user-themes #theme-switcher-colors .row").append(`<a href="javascript:;" class="p-relative mr-2 mb-2" data-id="${n.DisplayModeId}" title="${n.DisplayModeName}">
|
||||
<div class="p-relative color-box border biz-border-color-removed" style="background-color:${n.PrimaryColor}">
|
||||
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`)});$(r.displayModeElement).click(function(){$(r.displayModeElement).removeClass("active");$(this).addClass("active");$(`${r.backgroundImageElement}.solid-color .color-box`).css("background-color",$(this).find(".color-box").css("background-color"));$(`${r.backgroundImageElement}.solid-color color-box`).addClass("active");let n=Number($(this).attr("data-id"));r.currentUserTheme.DisplayModeId=n});let h=`<a href="javascript:;" class="col-4 p-relative px-1 solid-color active" data-id="0">
|
||||
<div class="p-relative color-box border biz-border-color-removed" style="height:65px">
|
||||
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`;$("#user-themes #background-image-view .row").append(h);i.result.BackgroundImages.forEach(n=>{let t=n.IsDefault?"default":"";$("#user-themes #background-image-view .row").append(`<a href="javascript:;" class="col-4 p-relative px-1 ${t}" data-url="${n.Thumbnail}" data-id="${n.BackgroundImageId}">
|
||||
<div class="p-relative">
|
||||
<img src="${n.Thumbnail}" class="rounded w-100" data-dynamic="1" onerror = "ReloadImage(event)" />
|
||||
<div class="delete" data-id="${n.BackgroundImageId}">
|
||||
<i class="fa fa-trash"></i>
|
||||
</div>
|
||||
</div>
|
||||
<i class="zmdi zmdi-check"></i>
|
||||
</a>`)});$(r.backgroundImageElement).click(function(){$(r.backgroundImageElement).removeClass("active");$(this).addClass("active");r.currentUserTheme.BackgroundImageId=Number($(this).attr("data-id"))});let u=n.Themes.Compact.Components.Index.Instance().currentTheme;t&&(u=i.result.CompanyTheme);$(`${r.layoutElement}[data-id="${u.layoutId}"]`).click();$(`${r.detailsViewElement}[data-id="${u.detailsViewId}"]`).click();$(`${r.displayModeElement}[data-id="${u.displayModeId}"]`).click();$(`${r.backgroundImageElement}[data-id="${u.backgroundImageId}"]`).click();r.currentUserTheme.ThemeId=u.themeId;r.currentUserTheme.IsCompanyTheme=u.isCompanyTheme})})})}saveCompanyTheme(){let t=this,n={LayoutId:t.currentUserTheme.LayoutId,ThemeId:t.currentUserTheme.ThemeId||0,DetailsViewId:t.currentUserTheme.DetailsViewId,DisplayModeId:t.currentUserTheme.DisplayModeId,BackgroundImageId:t.currentUserTheme.BackgroundImageId};const i=$("._bizgaze_popup_container").last().find(".form-error-message").first().attr("id");if(!n.LayoutId&&!n.DetailsViewId&&!n.DisplayModeId){MessageHelper.Instance().showError("Select Theme.",i);return}if(n.LayoutId)if(n.DetailsViewId){if(!n.DisplayModeId){MessageHelper.Instance().showError("Select Theme Switcher.",i);return}}else{MessageHelper.Instance().showError("Select Preferred Details View in Theme.",i);return}else{MessageHelper.Instance().showError("Select Preferred Layout in Theme.",i);return}$(".hdn_themeid").val(JSON.stringify(n));$(".hdn_displaymodeid").val(t.currentUserTheme.DisplayModeId);$(".biz-wrapper,.hk-wrapper").removeClass("biz-settings-toggle")}saveUserTheme(){let t=this,i={LayoutId:t.currentUserTheme.LayoutId,ThemeId:t.currentUserTheme.IsCompanyTheme?0:t.currentUserTheme.ThemeId,DetailsViewId:t.currentUserTheme.DetailsViewId,DisplayModeId:t.currentUserTheme.DisplayModeId,BackgroundImageId:t.currentUserTheme.BackgroundImageId};n.Platform.Layouts.Managers.ThemeLayoutManager.Instance().saveUserTheme(i).then(function(t){t.status==n.Data.Status.Success&&(MessageHelper.Instance().showSuccess(t.message,""),n.Platform.Layouts.Components.LayoutBuilder.Instance().refrshLayout(t))})}static Instance(){return this.instance===undefined&&(this.instance=new i),this.instance}}t.UserTheme=i})(i=t.Components||(t.Components={}))})(i=t.Compact||(t.Compact={}))})(t=n.Themes||(n.Themes={}))})(Unibase||(Unibase={}));
|
||||
+3158
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,528 @@
|
||||
/*Custom Chat Styles*/
|
||||
.chatapp .header {
|
||||
border-bottom: solid 1px #eee !important;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.chatapp .nav-tabs > .nav-item {
|
||||
padding: 0px 0.2rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.chatapp .nav-tabs > .nav-item > .nav-link {
|
||||
padding: .5rem 0.2rem;
|
||||
}
|
||||
|
||||
/*.chatapp .nav-tabs > .nav-item > .nav-link.link-icon-top.active {
|
||||
color: #00B0FF;
|
||||
border-bottom: 3px solid #00B0FF !important;
|
||||
}*/
|
||||
|
||||
.chatapp .nav-tabs.nav-light .nav-item.show .nav-link {
|
||||
color: #00B0FF;
|
||||
border-color: #00B0FF;
|
||||
}
|
||||
|
||||
.chatapp .chatapp-body {
|
||||
padding: 10px 10px 10px 5px;
|
||||
}
|
||||
|
||||
.chatapp .dropdown-menu .dropdown-icon {
|
||||
color: #00B0FF;
|
||||
}
|
||||
|
||||
.chatapp-body .div-chat-search {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: sticky;
|
||||
top: -1px;
|
||||
z-index: 999;
|
||||
background-color: #fff;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
|
||||
.chatapp-search-div .chatAppSearch {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: 34px;
|
||||
width: 92%;
|
||||
}
|
||||
|
||||
.userlist .online-status-icon {
|
||||
width: 12px !important;
|
||||
height: 12px !important;
|
||||
position: absolute !important;
|
||||
bottom: 4px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.chatapp-body .list-group-item:hover {
|
||||
background-color: #F6F5F5;
|
||||
}
|
||||
|
||||
/* .chatapp-body .list-group-item:hover .chat-call-options i {
|
||||
color: #00B0FF !important;
|
||||
}*/
|
||||
|
||||
/*.userlist .first-letter-heading {
|
||||
background-color: #FBFBFB;
|
||||
}*/
|
||||
|
||||
.chatapp .chat-footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.chat-footer .text_div {
|
||||
border-top: 1px solid #DADDE1;
|
||||
}
|
||||
|
||||
.chat-footer .msg-option-container {
|
||||
display: flex;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.chat-footer .msg-option {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.chat-footer .msg-option i {
|
||||
color: #646A71;
|
||||
}
|
||||
|
||||
.chat-footer .msg-option:hover i {
|
||||
color: #00B0FF !important;
|
||||
}
|
||||
|
||||
.chat-footer .input-msg-send:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/*.chatapp .chat-call-options a {
|
||||
display: none;*/
|
||||
/* color: #646A71 !important;*/
|
||||
/*}*/
|
||||
|
||||
/*.chatapp .userlist .list-group-item:hover .chat-call-options a {
|
||||
display: inline-block;
|
||||
}*/
|
||||
|
||||
.chatapp .txt_SearchChat:focus, .chatapp .txt_chatGroupName:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.chatapp-right .chatheader {
|
||||
position: sticky;
|
||||
top: 0px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.chatapp .chat-group-top-header {
|
||||
padding: 5px 0px;
|
||||
background-color: #fff;
|
||||
position: sticky;
|
||||
top: -1px;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.chatapp .txt_chatGroupName {
|
||||
border: 2px solid #646a7185 !important;
|
||||
margin-right: 5px;
|
||||
border-radius: 25px;
|
||||
}
|
||||
|
||||
.chat-call-options .custom-checkbox .custom-control-label::before {
|
||||
border-radius: .5rem;
|
||||
background-color: transparent;
|
||||
border: 2px solid #dee2e6fc;
|
||||
}
|
||||
|
||||
.chatapp .chat-group-footer {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
background-color: #F3F6F9;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: -50px;
|
||||
left: 0;
|
||||
padding: 3px 10px;
|
||||
z-index: 999;
|
||||
transition: transform 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.chatapp .chat-group-footer:not(.hidden) {
|
||||
transform: translateY(-50px);
|
||||
}
|
||||
|
||||
.chatapp-right .chatheader {
|
||||
width: 105%;
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
/*.chatapp-right .chat-body{
|
||||
height:80vh;
|
||||
}*/
|
||||
|
||||
/*.chatapp i[data-icon="l"]:hover {
|
||||
color: #00B0FF !important;
|
||||
}*/
|
||||
|
||||
|
||||
/* Chat Message Box Styles*/
|
||||
|
||||
.messageslist .message-div {
|
||||
max-width: 85%;
|
||||
font-size: 12px;
|
||||
margin: 0px 10px;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.messageslist .message-body, .messageslist .messagemedia-body {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.messageslist .recived-messages {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.messageslist .message-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.messageslist .recived-messages .message-wrapper {
|
||||
background-color: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
color: #000;
|
||||
box-shadow: 0 4px 5px rgb(0 0 0 / 10%);
|
||||
}
|
||||
|
||||
.messageslist .recived-messages .single-message {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.messageslist .sent-messages .single-message {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.messageslist .sent-messages {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.messageslist .sent-messages .message-wrapper {
|
||||
background-color: #DEF7F9;
|
||||
color: #2C343E;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 5px rgb(0 0 0 / 10%);
|
||||
}
|
||||
|
||||
.messageslist .message-span {
|
||||
color: #1F2327;
|
||||
}
|
||||
|
||||
.messageslist .message-div .time {
|
||||
color: #000;
|
||||
margin-top: 3px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.messageslist .recived-messages .time {
|
||||
text-align: left;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.messageslist .sent-messages .time {
|
||||
text-align: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.messageslist .date {
|
||||
position: relative;
|
||||
font-size: 12px;
|
||||
z-index: 1;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
color: #000000;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.messageslist .date:before, .messageslist .date:after {
|
||||
position: absolute;
|
||||
top: 51%;
|
||||
overflow: hidden;
|
||||
height: 2px;
|
||||
content: '\a0';
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
.messageslist .date:before {
|
||||
margin-left: -39%;
|
||||
text-align: right;
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.messageslist .date:after {
|
||||
margin-left: 3%;
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.messageslist .dropdown-menu .dropdown-item {
|
||||
font-size: 13px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
/*.messageslist .dropdown-menu .dropdown-item:hover:not(.active):not(.disabled) {
|
||||
background-color: #00B0FF;
|
||||
color: #fff;
|
||||
}*/
|
||||
|
||||
.messageslist .chatoptions-icon {
|
||||
color: #32b0bb;
|
||||
}
|
||||
|
||||
.messageslist .chatoptions:hover .chatoptions-icon {
|
||||
color: #00B0FF;
|
||||
}
|
||||
|
||||
.chat-group-top-header .txt_SearchChat, .chat-group-top-header .input-group-text {
|
||||
background-color: #F3F6F9;
|
||||
}
|
||||
|
||||
.messageslist .admindetails {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.admindetails .admin-msg {
|
||||
margin-bottom: 15px;
|
||||
color: #5b676d;
|
||||
font-weight: 500;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.message-div .single-message {
|
||||
color: #444447;
|
||||
}
|
||||
|
||||
.message-wrapper .msg-status {
|
||||
color: #00B0FF;
|
||||
margin-left: 5px;
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.message-wrapper .delete-msg {
|
||||
color: #f83f37;
|
||||
}
|
||||
|
||||
.message-wrapper .delete-msg .del-icon {
|
||||
background-color: #ffd1d1;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
margin-left: 5px;
|
||||
border-radius: 50%;
|
||||
color: #FF0000;
|
||||
}
|
||||
|
||||
.message-wrapper .edit-icon {
|
||||
background-color: #f4e4c6;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
margin-left: 5px;
|
||||
border-radius: 50%;
|
||||
color: #a27f48;
|
||||
}
|
||||
|
||||
.message-wrapper .quotemessage .normalmessage {
|
||||
background-color: #fff;
|
||||
padding: 5px 10px;
|
||||
border-radius: 10px;
|
||||
color: #1F2327;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.message-wrapper .message-download {
|
||||
margin-left: 10px;
|
||||
border-left: 1px solid #29E1B3;
|
||||
}
|
||||
|
||||
.message-wrapper .thumb_file {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.message-wrapper .thumb_file.audio-thumb-img {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
/*Profile Styles*/
|
||||
.profiledetails .Profile_name {
|
||||
text-transform: capitalize;
|
||||
margin-right: 5px;
|
||||
color: #1F2327;
|
||||
font-weight: 500;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.profiledetails .btn_AddChatParticipants i {
|
||||
font-size: 17px;
|
||||
color: #1F2327;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.user-profile-details-list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
box-shadow: 0 4px 5px rgb(0 0 0 / 10%);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.user-profile-details-list .nav-item .nav-link {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.user-profile-details-list .nav-link .count-span {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: -12px;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.user-profile-details-list li .nav-link {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.participants-header, .groups-header, .add-participants-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.div-Chat-Participants .dropdown-menu .dropdown-item {
|
||||
font-size: 13px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
/*.div-Chat-Participants .dropdown-menu .dropdown-item:hover:not(.active):not(.disabled) {
|
||||
background-color: #00B0FF;
|
||||
color: #fff;
|
||||
}*/
|
||||
|
||||
.User-Profile-Details .list-group-item:first-child {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.msg-option-container .msg-send-btn {
|
||||
border-radius: 5px;
|
||||
background-color: #00A389;
|
||||
}
|
||||
|
||||
.msg-option-container .msg-send-btn i {
|
||||
transform: rotate(319deg);
|
||||
font-size: 18px !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.User-Profile-Details .group-count-span {
|
||||
font-size: 10px;
|
||||
padding: 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.div_selected_files .thumb-span {
|
||||
display: inline-block;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
position: relative;
|
||||
margin-right: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.div_selected_files .remove-btn {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
right: -7px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.header .nav.nav-line > .nav-item > .nav-link:hover
|
||||
{
|
||||
border:none ;
|
||||
}
|
||||
.list-chat-contacts .list-group-item.border-0 {
|
||||
border-bottom: 1px solid rgba(0,0,0,.125) !important;
|
||||
}
|
||||
span.badge.badge-success.unread_messages.rounded-circle {
|
||||
font-size: 8px;
|
||||
padding: 5px;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
line-height: 0.9;
|
||||
}
|
||||
|
||||
.chatapp-search-div .chatAppSearch:focus {
|
||||
color: #495057;
|
||||
background-color: #fff;
|
||||
border-color: #80bdff;
|
||||
outline: 0;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
@media (max-width: 575.98px) {
|
||||
.biz-wrapper .biz-settings-panel .settings-panel-wrap {
|
||||
padding: 0px !important;
|
||||
}
|
||||
.simple-scroll-bar.chatapp-body {
|
||||
height:86vh !important;
|
||||
}
|
||||
#settings-panel-body .chatapp-wrap {
|
||||
height:90vh !important;
|
||||
}
|
||||
}
|
||||
.simplebar-track.simplebar-horizontal
|
||||
{
|
||||
visibility:hidden;
|
||||
display:none !important;
|
||||
}
|
||||
#settings-panel-body .biz-detail-avatar{
|
||||
width:40px !important;
|
||||
height:40px !important;
|
||||
}
|
||||
#search_chatmsg:active {
|
||||
background-color: #F4F5F6 !important;
|
||||
}
|
||||
|
||||
.up-arrow i:hover, .up-arrow i:active,
|
||||
.down-arrow i:hover, .down-arrow i:active {
|
||||
background: #e8e8e8;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.chatapp .chat-group-footer:not(.hidden) {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.chatapp .chat-footer {
|
||||
bottom: -20px;
|
||||
}
|
||||
}
|
||||
/* End of Custom Chat Styles*/
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
.card-body .form-coupon-left {
|
||||
/*flex: 1;*/
|
||||
text-align: center;
|
||||
border-right: 1px dashed #FF9100;
|
||||
padding: 2.5rem;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.card-body .form-coupon-right {
|
||||
/*flex: 2;*/
|
||||
padding: 2.5rem;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.card-body .form-coupon {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #FFF4E6;
|
||||
border: 1px dashed #FF9100;
|
||||
}
|
||||
|
||||
|
||||
.scanned-coupon-card {
|
||||
background-color: #DEFBEA;
|
||||
color: #565D56;
|
||||
border-top-left-radius: 20px;
|
||||
border-bottom-left-radius: 20px;
|
||||
}
|
||||
|
||||
.scanned-coupon-value {
|
||||
background-color: #FF9100;
|
||||
border-left: 2px dashed #DEFBEA;
|
||||
border-top-left-radius: 20px;
|
||||
border-bottom-left-radius: 20px;
|
||||
min-width: 126px;
|
||||
}
|
||||
|
||||
/*Scanned Copupons Start */
|
||||
.scanned-coupon-card {
|
||||
background-color: #DEFBEA;
|
||||
color: #565D56;
|
||||
border-top-left-radius: 15px;
|
||||
border-bottom-left-radius: 15px;
|
||||
border-left: 2px dashed #DEFBEA;
|
||||
}
|
||||
|
||||
.scanned-coupon-value-2 {
|
||||
background-color: #FF9100;
|
||||
border-left: 2px dashed #DEFBEA;
|
||||
border-top-left-radius: 15px;
|
||||
min-width: 126px;
|
||||
}
|
||||
|
||||
.scanned-coupon-card-img img {
|
||||
transform: rotate(-45deg);
|
||||
background-color: #B6E5CA;
|
||||
}
|
||||
|
||||
.scanned-coupon-card .avatar .avatar-text.avatar-text-green:before, .avatar .avatar-text.avatar-text-success:before {
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
.scanned-coupon-value, .scanned-coupon-card-details, .scanned-coupon-card-right {
|
||||
box-shadow: 0 2px 0px rgb(0 0 0 / 10%) !important
|
||||
}
|
||||
|
||||
@media (max-width: 575px) {
|
||||
.scanned-coupon-card-detail-value p {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 576px) {
|
||||
/* .scanned-coupon-card-details {
|
||||
border-left: none !important;
|
||||
border-bottom-left-radius: 0px !important;
|
||||
}*/
|
||||
|
||||
.scanned-coupon-value-2 {
|
||||
border-bottom-left-radius: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.scanned-coupon-card .scanned-coupon-value {
|
||||
border-top-left-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*Scanned Copupons End*/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,174 @@
|
||||
/*Auth pages*/
|
||||
.biz-pg-wrapper.biz-auth-wrapper {
|
||||
padding: 0;
|
||||
background: #F4F6F7;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper > header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-cover-img {
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-cover-img .auth-cover-info {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 15px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-cover-img .auth-cover-info .auth-cover-content {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-cover-img .auth-cover-info .auth-cover-content .play-wrap {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-cover-img .auth-cover-info .auth-cover-content .play-wrap .play-btn {
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
height: 45px;
|
||||
width: 45px;
|
||||
border-radius: 50%;
|
||||
top: auto;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
color: #fff;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-cover-img .auth-cover-info .auth-cover-content .play-wrap .play-btn:before {
|
||||
display: inline-block;
|
||||
font-family: "Ionicons";
|
||||
padding-left: 3px;
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
text-rendering: auto;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
content: "\f488";
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-cover-img .auth-cover-info .auth-cover-content .play-wrap > span {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap {
|
||||
padding: 15px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap .auth-form {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap .auth-form .option-sep {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
font-size: 14px;
|
||||
margin: 30px 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap .auth-form .option-sep:before {
|
||||
background: #CACFD4;
|
||||
content: "";
|
||||
height: 1px;
|
||||
right: 50%;
|
||||
margin-right: 28px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap .auth-form .option-sep:after {
|
||||
background: #CACFD4;
|
||||
content: "";
|
||||
height: 1px;
|
||||
left: 50%;
|
||||
margin-left: 28px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap .auth-form .form-group .form-control, .biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap .auth-form .form-group .dd-handle {
|
||||
border-top-right-radius: .25rem;
|
||||
border-bottom-right-radius: .25rem;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap .auth-form .form-group .form-control.rounded-input, .biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap .auth-form .form-group .rounded-input.dd-handle {
|
||||
border-top-right-radius: 50px;
|
||||
border-bottom-right-radius: 50px;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap .auth-form .form-group .input-group-append {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 10;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap .auth-form .form-group .input-group-append .input-group-text {
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap .auth-form .form-group .input-group-append .input-group-text .feather-icon > svg {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
@media (max-width: 1199px) {
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-cover-img {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.biz-pg-wrapper.biz-auth-wrapper .auth-form-wrap {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,205 @@
|
||||
|
||||
/*Caledar*/
|
||||
.calendarapp-wrap {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendarapp-sidebar {
|
||||
position: absolute;
|
||||
width: 225px;
|
||||
background: #fff;
|
||||
padding: 15px;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
border-right: 1px solid #E6E9EB;
|
||||
-webkit-transition: 0.3s ease-in-out;
|
||||
-moz-transition: 0.3s ease-in-out;
|
||||
transition: 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendarapp-sidebar .slimScrollDiv, .calendarapp-wrap .calendarapp-sidebar .nicescroll-bar {
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendarapp-sidebar .close-calendarapp-sidebar {
|
||||
display: none;
|
||||
margin: 0 0 15px;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendarapp-sidebar .close-calendarapp-sidebar .feather-icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendarapp-sidebar .add-event-wrap .calendar-event {
|
||||
padding: 0.5rem 0.75rem;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendarapp-sidebar .add-event-wrap .calendar-event .close {
|
||||
font-size: 1.25rem;
|
||||
padding-top: .5rem;
|
||||
}
|
||||
|
||||
.calendarapp-wrap.calendarapp-sidebar-toggle .calendarapp-sidebar {
|
||||
left: -225px;
|
||||
}
|
||||
|
||||
.calendarapp-wrap.calendarapp-sidebar-toggle .calendar-wrap {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap {
|
||||
margin-left: 225px;
|
||||
position: relative;
|
||||
-webkit-transition: 0.3s ease-in-out;
|
||||
-moz-transition: 0.3s ease-in-out;
|
||||
transition: 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc-event {
|
||||
position: relative;
|
||||
display: block;
|
||||
font-size: 79%;
|
||||
border: 1px solid #00B0FF;
|
||||
border-radius: 0;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc-event,
|
||||
.calendarapp-wrap .calendar-wrap .fc-event-dot {
|
||||
background: #00B0FF;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc button {
|
||||
height: auto;
|
||||
padding: .25rem .5rem;
|
||||
font-size: .875rem;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc button.fc-calendarSidebar-button {
|
||||
color: #959CA4;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar {
|
||||
height: 80px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: space-between;
|
||||
-webkit-justify-content: space-between;
|
||||
-ms-flex-pack: space-between;
|
||||
margin-bottom: 0;
|
||||
padding: 0 15px;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #E6E9EB;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar .fc-left {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar .fc-right {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar .fc-center {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar > .fc-clear {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar .fc-center h2 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-transform: capitalize;
|
||||
padding: 0 25px;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar .fc-center > div {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-view-container {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-view-container .table-bordered {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-view-container .table-bordered thead td, .calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-view-container .table-bordered thead th {
|
||||
border-bottom: 0;
|
||||
border-top: 0;
|
||||
border-color: #E6E9EB;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-view-container .table-bordered td, .calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-view-container .table-bordered th {
|
||||
border-left: 0;
|
||||
border-bottom: 0;
|
||||
border-color: #E6E9EB;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc .fc-list-heading td {
|
||||
color: #1F2327;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.calendarapp-wrap .calendarapp-sidebar {
|
||||
left: -225px;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendarapp-sidebar .close-calendarapp-sidebar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.calendarapp-wrap.calendarapp-sidebar-toggle .calendarapp-sidebar {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar .fc-today-button, .calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar .fc-right {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar .fc-left {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar .fc-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 414px) {
|
||||
.calendarapp-wrap .calendar-wrap .fc.fc-bootstrap4 .fc-header-toolbar .fc-center h2 {
|
||||
padding: 0 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
/*Carousel*/
|
||||
.carousel-control-prev,
|
||||
.carousel-control-next {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.carousel-control-prev:hover .carousel-control-next-icon,
|
||||
.carousel-control-prev:hover .carousel-control-prev-icon,
|
||||
.carousel-control-next:hover .carousel-control-next-icon,
|
||||
.carousel-control-next:hover .carousel-control-prev-icon {
|
||||
border-color: white;
|
||||
}
|
||||
|
||||
.carousel-control-next-icon,
|
||||
.carousel-control-prev-icon {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
border: 2px solid;
|
||||
border-color: rgba(255, 255, 255, 0.5);
|
||||
border-radius: 50%;
|
||||
background: none;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
font-size: 21px;
|
||||
}
|
||||
|
||||
.carousel-control-next-icon:before,
|
||||
.carousel-control-prev-icon:before {
|
||||
display: inline-block;
|
||||
font: normal normal normal 22px/1 'Material-Design-Iconic-Font';
|
||||
text-rendering: auto;
|
||||
padding-left: 3px;
|
||||
speak: none;
|
||||
text-transform: none;
|
||||
text-rendering: auto;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.carousel-control-next-icon:before {
|
||||
content: "\f2fb";
|
||||
}
|
||||
|
||||
.carousel-control-prev-icon:before {
|
||||
content: "\f2fa";
|
||||
}
|
||||
|
||||
.custom-carousel-nav .carousel-text-nav {
|
||||
position: static;
|
||||
color: #1F2327;
|
||||
}
|
||||
|
||||
.custom-carousel-nav .carousel-text-nav:hover, .custom-carousel-nav .carousel-text-nav:focus {
|
||||
color: #1F2327;
|
||||
}
|
||||
|
||||
.custom-carousel-nav .carousel-indicators {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.carousel-indicators {
|
||||
bottom: 20px;
|
||||
}
|
||||
|
||||
.carousel-indicators li {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.carousel-indicators li.active {
|
||||
background: #b9c0c7;
|
||||
}
|
||||
|
||||
.carousel-indicators.dark-indicators li {
|
||||
border-color: #1F2327;
|
||||
}
|
||||
|
||||
.carousel-indicators.dark-indicators li.active {
|
||||
background: #1f2327;
|
||||
}
|
||||
|
||||
.carousel-indicators.theme-indicators li {
|
||||
border-color: #007D88;
|
||||
}
|
||||
|
||||
.carousel-indicators.theme-indicators li.active {
|
||||
background: #007d88;
|
||||
}
|
||||
|
||||
.carousel-caption {
|
||||
bottom: 30px;
|
||||
}
|
||||
|
||||
.owl-carousel .item-video {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.owl-carousel .owl-video-tn {
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.owl-carousel .owl-dots .owl-dot span {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 0 5px;
|
||||
background: transparent;
|
||||
border: 1px solid #1F2327;
|
||||
}
|
||||
|
||||
.owl-carousel .owl-dots .owl-dot:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.owl-carousel .owl-dots .owl-dot:hover span {
|
||||
background: #1F2327;
|
||||
}
|
||||
|
||||
.owl-carousel .owl-dots .owl-dot.active span {
|
||||
background: #1F2327;
|
||||
}
|
||||
|
||||
.owl-carousel.light-owl-dots .owl-dots .owl-dot span {
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
|
||||
.owl-carousel.light-owl-dots .owl-dots .owl-dot:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.owl-carousel.light-owl-dots .owl-dots .owl-dot:hover span {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.owl-carousel.light-owl-dots .owl-dots .owl-dot.active span {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.owl-carousel.theme-owl-dots .owl-dots .owl-dot span {
|
||||
border: 1px solid #007D88;
|
||||
}
|
||||
|
||||
.owl-carousel.theme-owl-dots .owl-dots .owl-dot:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.owl-carousel.theme-owl-dots .owl-dots .owl-dot:hover span {
|
||||
background: #007D88;
|
||||
}
|
||||
|
||||
.owl-carousel.theme-owl-dots .owl-dots .owl-dot.active span {
|
||||
background: #007D88;
|
||||
}
|
||||
|
||||
.owl-carousel .owl-video-play-icon {
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
left: 20px;
|
||||
bottom: 20px;
|
||||
margin: 0;
|
||||
height: 35px;
|
||||
width: 35px;
|
||||
border-radius: 50%;
|
||||
top: auto;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
color: #298DFF;
|
||||
}
|
||||
|
||||
.owl-carousel .owl-video-play-icon:before {
|
||||
display: inline-block;
|
||||
font: normal normal normal 22px/1 'Material-Design-Iconic-Font';
|
||||
text-rendering: auto;
|
||||
padding-left: 3px;
|
||||
speak: none;
|
||||
text-transform: none;
|
||||
text-rendering: auto;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
content: "\f3aa";
|
||||
}
|
||||
|
||||
.owl-carousel .owl-video-play-icon:hover {
|
||||
-webkit-transform: scale(1.1, 1.1);
|
||||
-moz-transform: scale(1.1, 1.1);
|
||||
-ms-transform: scale(1.1, 1.1);
|
||||
-o-transform: scale(1.1, 1.1);
|
||||
transform: scale(1.1, 1.1);
|
||||
}
|
||||
|
||||
.owl-carousel.dots-on-item .owl-dots {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 15px;
|
||||
}
|
||||
|
||||
@media (max-width: 991px) {
|
||||
.carousel-control-next-icon, .carousel-control-prev-icon {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
font-size: 17px;
|
||||
}
|
||||
}
|
||||
|
||||
/*Twitter slider*/
|
||||
.twitter-slider-wrap i.fa-twitter {
|
||||
font-size: 30px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.twitter-slider-wrap .owl-carousel {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.twitter-slider-wrap .owl-carousel .user, .twitter-slider-wrap .owl-carousel .interact {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.twitter-slider-wrap .owl-carousel .tweet {
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.twitter-slider-wrap .owl-carousel .tweet > a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.twitter-slider-wrap .owl-carousel .timePosted > a {
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
body {
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user