This commit is contained in:
@@ -243,6 +243,20 @@ export default {
|
||||
}
|
||||
return hash;
|
||||
},
|
||||
|
||||
////////////////////////////////////////
|
||||
// Random password / login generator
|
||||
// https://stackoverflow.com/a/51540480/8939
|
||||
// using 32 character (128 bit) as default
|
||||
//
|
||||
getRandomPassword: function() {
|
||||
let length = 32,
|
||||
wishlist = "0123456789abcdefghijkmnopqrstuvwxyz";
|
||||
|
||||
return Array.from(crypto.getRandomValues(new Uint32Array(length)))
|
||||
.map(x => wishlist[x % wishlist.length])
|
||||
.join("");
|
||||
},
|
||||
///////////////////////////////
|
||||
// CONVERT STRING TO BOOLEAN
|
||||
// https://stackoverflow.com/a/1414175/8939
|
||||
|
||||
@@ -105,6 +105,7 @@ import {
|
||||
faLink,
|
||||
faListOl,
|
||||
faListUl,
|
||||
//faMagic,
|
||||
faMapMarkerAlt,
|
||||
faMapMarkedAlt,
|
||||
faMinus,
|
||||
@@ -255,6 +256,7 @@ library.add(
|
||||
faLink,
|
||||
faListOl,
|
||||
faListUl,
|
||||
//faMagic,
|
||||
faMapMarkerAlt,
|
||||
faMapMarkedAlt,
|
||||
faMinus,
|
||||
@@ -792,6 +794,12 @@ const CUSTOM_ICONS = {
|
||||
icon: ["fas", "list-ul"]
|
||||
}
|
||||
},
|
||||
// ayiMagic: {
|
||||
// component: FontAwesomeIcon,
|
||||
// props: {
|
||||
// icon: ["fas", "magic"]
|
||||
// }
|
||||
// },
|
||||
ayiMapMarker: {
|
||||
component: FontAwesomeIcon,
|
||||
props: {
|
||||
|
||||
@@ -428,6 +428,8 @@ export default {
|
||||
await vm.getDataFromApi(vm.$route.params.recordid); //let getdata handle loading
|
||||
}
|
||||
} else {
|
||||
vm.password = window.$gz.util.getRandomPassword();
|
||||
vm.login = window.$gz.util.getRandomPassword();
|
||||
/* Customer = 3,
|
||||
HeadOffice = 4, */
|
||||
if (vm.$route.params.customerid && vm.$route.params.customerid != 0) {
|
||||
|
||||
Reference in New Issue
Block a user