설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

helpers.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. const uid = function(){
  2. return Date.now().toString(36) + Math.random().toString(36).substr(2);
  3. }
  4. function getCurrencySymbol(value=0) {
  5. let type = 'INR'
  6. if (type) {
  7. const ans = new Intl.NumberFormat('en-US', { style: 'currency', currency: type }).format(value);;
  8. const res = ans.split(/(\D+)/);
  9. const currencySymbol = res[1];
  10. const amount = res.slice(2,res.length).join('')
  11. return [currencySymbol,amount]
  12. } else {
  13. console.log("errrrrrrrrrrrrrrrrrrrrrrrrr",type);
  14. return ['',0];
  15. }
  16. }
  17. function toasterHelper(type,message){
  18. // toasterOpts()
  19. Command: toastr[type](message);
  20. function toasterOpts(){
  21. toastr.options = {
  22. "closeButton": true,
  23. "debug": false,
  24. "newestOnTop": true,
  25. "progressBar": true,
  26. "positionClass": "toast-top-center",
  27. "preventDuplicates": true,
  28. "onclick": null,
  29. "showDuration": "300",
  30. "hideDuration": "1000",
  31. "timeOut": "5000",
  32. "extendedTimeOut": "1000",
  33. "showEasing": "swing",
  34. "hideEasing": "linear",
  35. "showMethod": "fadeIn",
  36. "hideMethod": "fadeOut"
  37. }
  38. }
  39. }