pull/1/head
Saeid 5 years ago
parent 4dcf116f64
commit a1862301a6

@ -1,7 +1,7 @@
{
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=7fcd283086b499f2c4eb",
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=4271ddf84160f6db9559",
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=42a67229cb063f0afead",
"/js/vue/Modules/Reservation/app.js": "/js/vue/Modules/Reservation/app.js?id=31627036c5ddd8a0c6ba",
"/js/vue/User/app.js": "/js/vue/User/app.js?id=140e6ef646d3001986ba"
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=835462298da12e2ba390",
"/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=917b5c67731d0eca1d37",
"/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=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>

@ -0,0 +1,87 @@
<template>
<v-dialog
v-model="modal"
width="40%"
transition="slide-x-transition"
>
<v-card class="RTL">
<v-card-title class="cyan lighten-5" primary-title>
<WM-PartTitle
class="WM-Margin-T-20"
TitleFa=" تایید پرداخت "
TitleEn=" Payment Confirmation "
color="cyan"
></WM-PartTitle>
</v-card-title>
<v-card-text>
<div
class="WM-Align-R WM-Margin-T-10"
>شما در حال انتقال به درگاه پرداخت برای خرید آیتم زیر هستید...</div>
<table class="table table-striped RTL WM-Align-C WM-Margin-T-20">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col" class="Title">نام آیتم</th>
<th scope="col">قیمت - تومان</th>
</tr>
</thead>
<tbody>
<tr class="LTR">
<td class="Itrator">1</td>
<td class="Title">سیستم مدیریت ارتباط با مشتری</td>
<td class="Price En">3.500.000</td>
</tr>
</tbody>
</table>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="red" depressed dark>
<v-icon dark right>fas fa-times</v-icon>انصراف
</v-btn>
<v-btn
color="cyan"
depressed
dark
@click="$store.state.PaymentConfirmation = false"
>
<v-icon dark right>fas fa-credit-card</v-icon>پرداخت
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
import {mapGetters} from 'vuex';
export default {
computed: {
...mapGetters("modal", ["isModal"]),
modal: {
get() {
return this.isModal("role_permission/payment_confirmation");
},
set(value) {
if (value) {
this.$_openModal("role_permission/payment_confirmation");
} else {
this.$_closeModal("role_permission/payment_confirmation");
}
}
}
},
}
</script>
<style lang="scss" scoped>
.table .Itrator {
font-family: "Montserrat-ExtraBold";
}
.table .Title {
text-align: right;
}
.table .Price {
font-size: 18px;
}
</style>

@ -0,0 +1,92 @@
<template>
<v-dialog v-model="modal" width="50%" transition="slide-x-transition">
<v-card class="RTL">
<v-card-title class="grey lighten-3" primary-title>
<WM-PartTitle
class="WM-Margin-T-20"
TitleFa=" شروع مدت آزمایشی "
TitleEn=" Start Trail "
color="black"
></WM-PartTitle>
</v-card-title>
<v-card-text>
<div
class="WM-Align-R WM-Margin-T-10"
>شما در حال فعالسازی مدت آزمایشی آیتم زیر هستید...</div>
<table class="table table-striped RTL WM-Align-C WM-Margin-T-20">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col" class="Title">نام آیتم</th>
<th scope="col">تاریخ اتمام</th>
</tr>
</thead>
<tbody>
<tr class="LTR">
<td class="Itrator">1</td>
<td class="Title">{{ getCurrentModule.title_fa }}</td>
<td class="Price En">{{ expiredDate | moment("jYYYY-jMM-jDD") }} 24:00</td>
</tr>
</tbody>
</table>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="red" depressed dark @click="$_closeModal('role_permission/trial_confirmation')">
<v-icon dark right>fas fa-times</v-icon>انصراف
</v-btn>
<v-btn color="black" depressed dark @click="register">
<v-icon dark right>fas fa-check</v-icon>فعالسازی
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
import {mapGetters, mapActions} from 'vuex';
export default {
methods: {
async register() {
let response = await this.actviveTrial(this.getCurrentModule.id);
if (response.status == 200) {
this.$_closeModal('role_permission/trial_confirmation')
}
},
...mapActions("role_permission", ["actviveTrial"])
},
computed: {
...mapGetters("modal", ["isModal"]),
...mapGetters("role_permission", ["getCurrentModule"]),
modal: {
get() {
return this.isModal("role_permission/trial_confirmation");
},
set(value) {
if (value) {
this.$_openModal("role_permission/trial_confirmation");
} else {
this.$_closeModal("role_permission/trial_confirmation");
}
}
},
expiredDate() {
var today = new Date();
return new Date(today.setDate(today.getDate() + 15));
}
},
}
</script>
<style lang="scss" scoped>
.table .Itrator {
font-family: "Montserrat-ExtraBold";
}
.table .Title {
text-align: right;
}
.table .Price {
font-size: 18px;
}
</style>

@ -97,8 +97,8 @@
<script>
// import PaymentConfirmation from "@Common/components/Misc/PaymentConfirmation.vue";
import TrialConfirmation from "@Common/components/Misc/TrialConfirmation.vue";
// import PaymentConfirmation from "@Home/components/Modules/PaymentConfirmation.vue";
import TrialConfirmation from "@Home/components/Modules/TrialConfirmation.vue";
import { mapGetters, mapActions, mapMutations } from "vuex";
export default {
components: {
@ -122,41 +122,6 @@ export default {
disabled: true
}
],
modules: [
{
nameFa: " باشگاه مشتریان ",
nameEn: " Members Club ",
price: "1,500,000",
id: 1,
color: "red",
descriptionTitle:
" باشگاه مشتریان در واقع بستری است برای اینکه بتوانید مشتریان خود را ثبت، آنها را مدیریت و با آنها ارتباط بر قرار کنید. ",
descriptionText:
' امکانات مشتریان به طور خلاصه به شرح زیر می باشد: <div class="WM-Margin-R-10"> 1. ثبت و ویرایش اعضای باشگاه <br> 2. امکان ثبت تاریخ تولد و ازدواج</div> '
},
{
nameFa: " مدیریت ارتباط با مشتری ",
nameEn: " Customers Relationship Management ",
price: "3,500,000",
oldPrice: "3,000,000",
id: 2,
color: "orange"
},
{
nameFa: " مدیریت فروشگاه ",
nameEn: " Store Management ",
price: "2,500,000",
id: 3,
color: "cyan"
},
{
nameFa: " سیستم رزرو وقت ",
nameEn: " Reservations System ",
price: "1,000,000",
id: 4,
color: "purple"
}
]
};
},
computed: {

@ -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
// });

1
webpack.mix.js vendored

@ -16,6 +16,7 @@ mix.webpackConfig({
alias: {
'@JS': path.resolve(__dirname, 'resources/js'),
'@Global': path.resolve(__dirname, 'resources/js/Global'),
'@Home': path.resolve(__dirname, 'resources/js/Home'),
},
},
output: {

Loading…
Cancel
Save