Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Fakerator from "fakerator";
import fecha from "fecha";
let fakerator = new Fakerator();
let roles = [{ id: "admin", name: "Administrator" }, { id: "moderator", name: "Moderator" }, { id: "user", name: "Registered User" }, { id: "visitor", name: "Visitor" }];
let skills = ["HTML5", "Javascript", "CSS3", "CoffeeScript", "AngularJS", "ReactJS", "VueJS"];
let users = (function() {
let res = [];
for (let i = 0; i < 5; i++) {
let lang = fakerator.random.arrayElement(["en-US", "en-GB", "de", "fr", "it"]);
let user = fakerator.entity.user();
user.id = i + 1;
user.type = fakerator.random.arrayElement(["personal", "business"]);
user.bio = fakerator.lorem.paragraph();
let dob = fakerator.date.past(40, "1998-01-01");
user.dob = /* fecha.format(dob, "YYYY.MM.DD");*/ dob.valueOf();
user.time = fecha.format(new Date(), "hh:mm:ss");
import Schema from "./schema";
import { users } from "./data";
import mixinUtils from "../../mixins/utils.js";
import Multiselect from "vue-multiselect";
Vue.component("multiselect", Multiselect);
// Test custom field
import FieldAwesome from "./fieldAwesome.vue";
Vue.component("fieldAwesome", FieldAwesome);
import { each, cloneDeep, merge } from "lodash";
Vue.use(VueFormGenerator);
let fakerator = new Fakerator();
export default {
components: {
DataTable
},
mixins: [mixinUtils],
data() {
return {
isNewModel: false,
selected: [],
model: null,