code added
This commit is contained in:
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
|
||||
const uid = function(){
|
||||
return Date.now().toString(36) + Math.random().toString(36).substr(2);
|
||||
}
|
||||
|
||||
function getCurrencySymbol(value=0) {
|
||||
let type = 'INR'
|
||||
if (type) {
|
||||
const ans = new Intl.NumberFormat('en-US', { style: 'currency', currency: type }).format(value);;
|
||||
const res = ans.split(/(\D+)/);
|
||||
const currencySymbol = res[1];
|
||||
const amount = res.slice(2,res.length).join('')
|
||||
|
||||
|
||||
return [currencySymbol,amount]
|
||||
} else {
|
||||
console.log("errrrrrrrrrrrrrrrrrrrrrrrrr",type);
|
||||
return ['',0];
|
||||
}
|
||||
}
|
||||
|
||||
function toasterHelper(type,message){
|
||||
// toasterOpts()
|
||||
Command: toastr[type](message);
|
||||
function toasterOpts(){
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"newestOnTop": true,
|
||||
"progressBar": true,
|
||||
"positionClass": "toast-top-center",
|
||||
"preventDuplicates": true,
|
||||
"onclick": null,
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
}
|
||||
}
|
||||
}
|
||||
Viittaa uudesa ongelmassa
Block a user