This commit is contained in:
2023-04-24 15:15:49 +05:30
vanhempi 0bfbd9cabf
commit ee730c9a18
25 muutettua tiedostoa jossa 2994 lisäystä ja 951 poistoa
Näytä tiedosto
+44
Näytä tiedosto
@@ -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"
}
}
}