parent
4dcf116f64
commit
a1862301a6
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=7fcd283086b499f2c4eb",
|
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=835462298da12e2ba390",
|
||||||
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=4271ddf84160f6db9559",
|
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=483273ff834ecc278279",
|
||||||
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=42a67229cb063f0afead",
|
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=917b5c67731d0eca1d37",
|
||||||
"/js/vue/Modules/Reservation/app.js": "/js/vue/Modules/Reservation/app.js?id=31627036c5ddd8a0c6ba",
|
"/js/vue/Modules/Reservation/app.js": "/js/vue/Modules/Reservation/app.js?id=c15289f81d7f7cc9ee13",
|
||||||
"/js/vue/User/app.js": "/js/vue/User/app.js?id=140e6ef646d3001986ba"
|
"/js/vue/User/app.js": "/js/vue/User/app.js?id=749fc082db23ee6dc2df"
|
||||||
}
|
}
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-card-text>
|
|
||||||
<v-checkbox
|
|
||||||
:class="element.width"
|
|
||||||
:label="element.label"
|
|
||||||
:hibt="element.hint"
|
|
||||||
:color="element.color"
|
|
||||||
:append-icon="element.append_icon"
|
|
||||||
:prepend-icon="element.prepend_icon"
|
|
||||||
multiple="true"
|
|
||||||
@input="changeValue"
|
|
||||||
></v-checkbox>
|
|
||||||
</v-card-text>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
element: {
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
values: {
|
|
||||||
default: () => ({}),
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeValue() {
|
|
||||||
this.$emit('input', this.values);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,26 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-card-text>
|
|
||||||
<v-radio-group>
|
|
||||||
<v-radio
|
|
||||||
:label="element.label"
|
|
||||||
:hibt="element.hint"
|
|
||||||
:color="element.color"
|
|
||||||
:append-icon="element.append_icon"
|
|
||||||
:prepend-icon="element.prepend_icon"
|
|
||||||
></v-radio>
|
|
||||||
</v-radio-group>
|
|
||||||
</v-card-text>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props:{
|
|
||||||
element:{
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
values: {
|
|
||||||
default: () => ({}),
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -1,38 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-card-text>
|
|
||||||
<v-slider
|
|
||||||
:label="element.label"
|
|
||||||
:hint="element.hint"
|
|
||||||
:color="element.color"
|
|
||||||
:append-icon="element.append_icon"
|
|
||||||
:prepend-icon="element.prepend_icon"
|
|
||||||
:min="element.min"
|
|
||||||
:max="element.max"
|
|
||||||
:data-vv-name="element.slug"
|
|
||||||
:data-vv-as="element.label"
|
|
||||||
v-validate="element.validations"
|
|
||||||
:error-messages="errors.collect(element.slug)"
|
|
||||||
v-model="values[element.slug]"
|
|
||||||
@input="changeValue"
|
|
||||||
></v-slider>
|
|
||||||
</v-card-text>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props:{
|
|
||||||
element: {
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
values: {
|
|
||||||
default: () => ({}),
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeValue() {
|
|
||||||
this.$emit('input', this.values);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -1,40 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="FormBlock" :class="element.width" style="position:relative">
|
|
||||||
<h3 class="text-lg-right">{{element.label}}</h3>
|
|
||||||
<div v-if="element.children" class="row">
|
|
||||||
<element-factory @input="changeValue" :values="values[element.slug]" v-for="(elm, key) in element.children" :element="elm" :key="key"></element-factory>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import Factory from '../FactoryPattern'
|
|
||||||
export default {
|
|
||||||
components:{
|
|
||||||
'element-factory' : Factory
|
|
||||||
},
|
|
||||||
props:{
|
|
||||||
element: {
|
|
||||||
type: Object,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
values: {
|
|
||||||
type: Object,
|
|
||||||
required: false,
|
|
||||||
default: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeValue() {
|
|
||||||
this.$emit('input', this.values);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.FormBlock {
|
|
||||||
padding: 10px 20px;
|
|
||||||
border: 1px solid #eeeeee;
|
|
||||||
border-right: 2px solid #000;
|
|
||||||
margin: 0px 15px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,37 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-card-text>
|
|
||||||
<v-text-field
|
|
||||||
type="number"
|
|
||||||
:label="element.label"
|
|
||||||
:placeholder="element.placeholder"
|
|
||||||
:hint="element.hint"
|
|
||||||
:color="element.color"
|
|
||||||
:append-icon="element.append_icon"
|
|
||||||
:prepend-icon="element.prepend_icon || 'fas fa-sort-numeric-up' "
|
|
||||||
v-model="values[element.slug]"
|
|
||||||
@input="changeValue"
|
|
||||||
:data-vv-name="element.slug"
|
|
||||||
:data-vv-as="element.label"
|
|
||||||
v-validate="element.validations"
|
|
||||||
:error-messages="errors.collect(element.slug)"
|
|
||||||
></v-text-field>
|
|
||||||
</v-card-text>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
element: {
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
values: {
|
|
||||||
default: () => ({}),
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeValue() {
|
|
||||||
this.$emit('input', this.values);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,40 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-card-text>
|
|
||||||
<v-autocomplete
|
|
||||||
:label="element.label"
|
|
||||||
:placeholder="element.placeholder"
|
|
||||||
:hint="element.hint"
|
|
||||||
:color="element.color"
|
|
||||||
:append-icon="element.append_icon"
|
|
||||||
:prepend-icon="element.prepend_icon"
|
|
||||||
:items="element.options"
|
|
||||||
:multiple="element.multiple"
|
|
||||||
v-model="values[element.slug]"
|
|
||||||
@input="changeValue"
|
|
||||||
item-text="value"
|
|
||||||
item-value="id"
|
|
||||||
:data-vv-name="element.slug"
|
|
||||||
:data-vv-as="element.label"
|
|
||||||
v-validate="element.validations"
|
|
||||||
:error-messages="errors.collect(element.slug)"
|
|
||||||
></v-autocomplete>
|
|
||||||
</v-card-text>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
element: {
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
values: {
|
|
||||||
default: () => ({}),
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeValue() {
|
|
||||||
this.$emit('input', this.values);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,35 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-card-text>
|
|
||||||
<v-switch
|
|
||||||
:label="element.label"
|
|
||||||
:hibt="element.hint"
|
|
||||||
:color="element.color"
|
|
||||||
:append-icon="element.append_icon"
|
|
||||||
:prepend-icon="element.prepend_icon"
|
|
||||||
v-model="values[element.slug]"
|
|
||||||
@input="changeValue"
|
|
||||||
:data-vv-name="element.slug"
|
|
||||||
:data-vv-as="element.label"
|
|
||||||
v-validate="element.validations"
|
|
||||||
:error-messages="errors.collect(element.slug)"
|
|
||||||
></v-switch>
|
|
||||||
</v-card-text>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
element: {
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
values: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeValue() {
|
|
||||||
this.$emit('input', this.values);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,26 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-card-text>
|
|
||||||
<v-textarea
|
|
||||||
:label="element.label"
|
|
||||||
:placeholder="element.placeholder"
|
|
||||||
:hint="element.hint"
|
|
||||||
:color="element.color"
|
|
||||||
:append-icon="element.append_icon"
|
|
||||||
:prepend-icon="element.prepend_icon || 'fas fa-align-right' "
|
|
||||||
v-model="values[element.slug]"
|
|
||||||
></v-textarea>
|
|
||||||
</v-card-text>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
element: {
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
values: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,36 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-card-text>
|
|
||||||
<v-text-field
|
|
||||||
:label="element.label"
|
|
||||||
:placeholder="element.placeholder"
|
|
||||||
:hint="element.hint"
|
|
||||||
:color="element.color"
|
|
||||||
:append-icon="element.append_icon"
|
|
||||||
:prepend-icon="element.prepend_icon || 'fas fa-align-right' "
|
|
||||||
v-model="values[element.slug]"
|
|
||||||
@input="changeValue"
|
|
||||||
:data-vv-name="element.slug"
|
|
||||||
:data-vv-as="element.label"
|
|
||||||
v-validate="element.validations"
|
|
||||||
:error-messages="errors.collect(element.slug)"
|
|
||||||
></v-text-field>
|
|
||||||
</v-card-text>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
element: {
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
values: {
|
|
||||||
default: () => ({}),
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeValue() {
|
|
||||||
this.$emit('input', this.values);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,36 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-card-text>
|
|
||||||
<v-textarea
|
|
||||||
:label="element.label"
|
|
||||||
:placeholder="element.placeholder"
|
|
||||||
:hint="element.hint"
|
|
||||||
:color="element.color"
|
|
||||||
:append-icon="element.append_icon"
|
|
||||||
:prepend-icon="element.prepend_icon || 'fas fa-align-right' "
|
|
||||||
v-model="values[element.slug]"
|
|
||||||
@input="changeValue"
|
|
||||||
:data-vv-name="element.slug"
|
|
||||||
:data-vv-as="element.label"
|
|
||||||
v-validate="element.validations"
|
|
||||||
:error-messages="errors.collect(element.slug)"
|
|
||||||
></v-textarea>
|
|
||||||
</v-card-text>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
element: {
|
|
||||||
type: Object
|
|
||||||
},
|
|
||||||
values: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeValue() {
|
|
||||||
this.$emit('input', this.values);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,35 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-flex :class="element.width">
|
|
||||||
<component v-bind:is="element.type" :values="values" :element="element" @input="changeValue" ></component>
|
|
||||||
</v-flex>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import Vue from 'vue'
|
|
||||||
|
|
||||||
const requireElement = require.context('./Elements', true, /\.vue$/);
|
|
||||||
requireElement.keys().forEach(fileName => {
|
|
||||||
// Replace ./ and .vue
|
|
||||||
const elementName = fileName.replace(/(\.\/|\.vue)/g, '')
|
|
||||||
Vue.component(elementName,
|
|
||||||
() => import(`./Elements/${elementName}.vue`)
|
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props:{
|
|
||||||
element:{
|
|
||||||
type: Object,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
values: {
|
|
||||||
required: false,
|
|
||||||
type: Object,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods:{
|
|
||||||
changeValue() {
|
|
||||||
this.$emit('input', this.values)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -1,77 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="row">
|
|
||||||
<element-factory
|
|
||||||
v-for="element in elements"
|
|
||||||
:element="element"
|
|
||||||
:values="formValues"
|
|
||||||
:key="element.id"
|
|
||||||
@input="changeValue"
|
|
||||||
></element-factory>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import Factory from "./FactoryPattern";
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
"element-factory": Factory
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
elements: {
|
|
||||||
required: true,
|
|
||||||
default: {},
|
|
||||||
},
|
|
||||||
value:{
|
|
||||||
required: false,
|
|
||||||
default:() => ({}),
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
setDefaultValue(elements, values = {}) {
|
|
||||||
for (const key in elements) {
|
|
||||||
if (elements.hasOwnProperty(key)) {
|
|
||||||
if (elements[key].type == "we-form") {
|
|
||||||
values[
|
|
||||||
elements[key].slug
|
|
||||||
] = this.setDefaultValue(elements[key].children);
|
|
||||||
} else {
|
|
||||||
values[elements[key].slug] = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return values;
|
|
||||||
},
|
|
||||||
changeValue() {
|
|
||||||
this.$emit('input', this.formValues);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
formValues:{
|
|
||||||
get() {
|
|
||||||
if (!this.value || Object.keys(this.value).length == 0) {
|
|
||||||
return this.setDefaultValue(this.elements);
|
|
||||||
}
|
|
||||||
return this.value;
|
|
||||||
},
|
|
||||||
set(value) {
|
|
||||||
this.$emit('input', value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// created() {
|
|
||||||
// var vm = this;
|
|
||||||
// setInterval(function() {
|
|
||||||
// console.log('setInterval-values', vm.values);
|
|
||||||
// console.log('setInterval-formValues', vm.formValues);
|
|
||||||
// },3000);
|
|
||||||
// },
|
|
||||||
// watch: {
|
|
||||||
// values(v) {
|
|
||||||
// console.log('v',v);
|
|
||||||
// },
|
|
||||||
// formValues(v) {
|
|
||||||
// console.log('fv',v);
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,56 +0,0 @@
|
|||||||
|
|
||||||
window._ = require('lodash');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
|
||||||
* for JavaScript based Bootstrap features such as modals and tabs. This
|
|
||||||
* code may be modified to fit the specific needs of your application.
|
|
||||||
*/
|
|
||||||
|
|
||||||
try {
|
|
||||||
window.Popper = require('popper.js').default;
|
|
||||||
window.$ = window.jQuery = require('jquery');
|
|
||||||
|
|
||||||
require('bootstrap');
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
|
||||||
* to our Laravel back-end. This library automatically handles sending the
|
|
||||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
|
||||||
*/
|
|
||||||
|
|
||||||
window.axios = require('axios');
|
|
||||||
|
|
||||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Next we will register the CSRF Token as a common header with Axios so that
|
|
||||||
* all outgoing HTTP requests automatically have it attached. This is just
|
|
||||||
* a simple convenience so we don't have to attach every token manually.
|
|
||||||
*/
|
|
||||||
|
|
||||||
let token = document.head.querySelector('meta[name="csrf-token"]');
|
|
||||||
|
|
||||||
if (token) {
|
|
||||||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
|
||||||
} else {
|
|
||||||
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Echo exposes an expressive API for subscribing to channels and listening
|
|
||||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
|
||||||
* allows your team to easily build robust real-time web applications.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// import Echo from 'laravel-echo'
|
|
||||||
|
|
||||||
// window.Pusher = require('pusher-js');
|
|
||||||
|
|
||||||
// window.Echo = new Echo({
|
|
||||||
// broadcaster: 'pusher',
|
|
||||||
// key: process.env.MIX_PUSHER_APP_KEY,
|
|
||||||
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
|
|
||||||
// encrypted: true
|
|
||||||
// });
|
|
Loading…
Reference in new issue