reimplemented login system and added state list component.
Tento commit je obsažen v:
vendorováno
+47
-27
@@ -1,5 +1,5 @@
|
||||
|
||||
const uid = function(){
|
||||
const uid = function () {
|
||||
return Date.now().toString(36) + Math.random().toString(36).substr(2);
|
||||
}
|
||||
|
||||
@@ -22,46 +22,66 @@ function shuffleArray(array) {
|
||||
}
|
||||
}
|
||||
|
||||
function getCurrencySymbol(value=0) {
|
||||
function debounce(func, delay=500) {
|
||||
let timeoutId;
|
||||
return function(...args) {
|
||||
const context = this;
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(() => {
|
||||
func.apply(context, args);
|
||||
}, delay);
|
||||
};
|
||||
}
|
||||
|
||||
function getCurrencySymbol(value = 0) {
|
||||
let type = 'INR'
|
||||
if (type) {
|
||||
const ans = new Intl.NumberFormat('en-IN', { style: 'currency', currency: type }).format(value);;
|
||||
const res = ans.split(/(\D+)/);
|
||||
const currencySymbol = res[1];
|
||||
const amount = res.slice(2,res.length).join('')
|
||||
const amount = res.slice(2, res.length).join('')
|
||||
|
||||
|
||||
return [currencySymbol,amount]
|
||||
return [currencySymbol, amount]
|
||||
} else {
|
||||
console.log("errrrrrrrrrrrrrrrrrrrrrrrrr",type);
|
||||
return ['',0];
|
||||
console.log("errrrrrrrrrrrrrrrrrrrrrrrrr", type);
|
||||
return ['', 0];
|
||||
}
|
||||
}
|
||||
|
||||
function toasterHelper(type,message,align='toast-top-center'){
|
||||
function toasterHelper(type, message, align = 'toast-top-center') {
|
||||
// toasterOpts()
|
||||
debugger;
|
||||
toastr.clear()
|
||||
toasterOpts(align);
|
||||
Command: toastr[type](message);
|
||||
Command: toastr[type](message);
|
||||
|
||||
function toasterOpts(align){
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"newestOnTop": true,
|
||||
"progressBar": true,
|
||||
"positionClass": align,
|
||||
"preventDuplicates": true,
|
||||
"onclick": null,
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
function toasterOpts(align) {
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"newestOnTop": true,
|
||||
"progressBar": true,
|
||||
"positionClass": align,
|
||||
"preventDuplicates": true,
|
||||
"onclick": null,
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function containsSpecialCharsHelper(str) {
|
||||
const specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/;
|
||||
return specialChars.test(str);
|
||||
}
|
||||
const isUpperCaseHelper = (string) => /^(?=.*[A-Z])/.test(string);
|
||||
const isLowerCaseHelper = (string) => /^(?=.*[a-z])/.test(string);
|
||||
const isNumberContainsHelper = (string) => /\d/.test(string);
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele