pull/1/head
saeid_01 5 years ago
parent 8721b1a16f
commit c49062b939

@ -1,7 +1,7 @@
{ {
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=6c45b94df33523eac4ae", "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=f3046ccee6deb672cb42",
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=70fadcb63bc6b91314e4", "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=60c658b3e0d3bf77cf19",
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=5707b0c70e7e00d7f7aa", "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=d7b53e717be729233749",
"/js/vue/Modules/Reservation/app.js": "/js/vue/Modules/Reservation/app.js?id=d8b99f78c445a5dcfabd", "/js/vue/Modules/Reservation/app.js": "/js/vue/Modules/Reservation/app.js?id=03c06477f0ef6f223599",
"/js/vue/User/app.js": "/js/vue/User/app.js?id=e0438d523387e91845cb" "/js/vue/User/app.js": "/js/vue/User/app.js?id=a0f854cd48d4c6d1e185"
} }

@ -21,11 +21,11 @@ export default {
// //
// data() { // data() {
// return { // return {
// Color,HoverClass // color,HoverClass
// } // }
// }, // },
// created : function ( ) { // created : function ( ) {
// this.Color = 'WM-BG-' + this.ThemeColor; // this.color = 'WM-BG-' + this.ThemeColor;
// this.HoverClass = 'WM-Link-' + this.ThemeColor; // this.HoverClass = 'WM-Link-' + this.ThemeColor;
// } // }
}; };

@ -2,9 +2,9 @@
<div class="SectionTitle WM-Width-100"> <div class="SectionTitle WM-Width-100">
<h4 class="TitleFa WM-Align-R" :class="TextFaColor" v-text="TitleFa"></h4> <h4 class="TitleFa WM-Align-R" :class="TextFaColor" v-text="TitleFa"></h4>
<div class="TitleEn WM-Flex"> <div class="TitleEn WM-Flex">
<span :class="[Color,TextColor]" v-text="TitleEn"></span> <span :class="[color,TextColor]" v-text="TitleEn"></span>
<div class="Line"> <div class="Line">
<div class="inner" :class="Color"></div> <div class="inner" :class="color"></div>
</div> </div>
</div> </div>
</div> </div>
@ -16,7 +16,7 @@ export default {
props: { props: {
TitleFa: { default: "عنوان بخش" }, TitleFa: { default: "عنوان بخش" },
TitleEn: { default: "Part Title" }, TitleEn: { default: "Part Title" },
Color: { default: "black" }, color: { default: "black" },
TextColor: { default: "white--text" }, TextColor: { default: "white--text" },
TextFaColor: { default: "black--text" } TextFaColor: { default: "black--text" }
}, },

@ -22,7 +22,7 @@ export default {
props: { props: {
ItemID: { default: "Checkbox" }, ItemID: { default: "Checkbox" },
ItemText: { default: " مقدار پیش فرض " }, ItemText: { default: " مقدار پیش فرض " },
Color: { default: "Red" }, color: { default: "Red" },
value: {type: Array} value: {type: Array}
}, },
data: function() { data: function() {

@ -6,21 +6,33 @@
class="WM-Margin-T-20" class="WM-Margin-T-20"
:TitleFa="getDialogProperties.title || defaultMessage[type].title" :TitleFa="getDialogProperties.title || defaultMessage[type].title"
:TitleEn="getDialogProperties.titleEn || defaultMessage[type].titleEn" :TitleEn="getDialogProperties.titleEn || defaultMessage[type].titleEn"
:Color="getDialogProperties.color || defaultMessage[type].color" :color="getDialogProperties.color || defaultMessage[type].color"
></WM-PartTitle> ></WM-PartTitle>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
<div class="WM-Align-R WM-Margin-T-10">{{ getDialogProperties.message || defaultMessage[type].message }}</div> <div
class="WM-Align-R WM-Margin-T-10"
>{{ getDialogProperties.message || defaultMessage[type].message }}</div>
</v-card-text> </v-card-text>
<v-divider></v-divider> <v-divider></v-divider>
<v-card-actions> <v-card-actions>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-btn :color="getDialogProperties.cancelButtonColor || defaultMessage[type].cancelButtonColor" @click="cancel" depressed dark> <v-btn
:color="getDialogProperties.cancelButtonColor || defaultMessage[type].cancelButtonColor"
@click="cancel"
depressed
dark
>
<v-icon dark right>fas fa-times</v-icon> <v-icon dark right>fas fa-times</v-icon>
{{getDialogProperties.cancelButtonText || defaultMessage[type].cancelButtonText}} {{getDialogProperties.cancelButtonText || defaultMessage[type].cancelButtonText}}
</v-btn> </v-btn>
<v-btn :color="getDialogProperties.confirmButtonColor || defaultMessage[type].confirmButtonColor" depressed dark @click="confirm"> <v-btn
:color="getDialogProperties.confirmButtonColor || defaultMessage[type].confirmButtonColor"
depressed
dark
@click="confirm"
>
<v-icon dark right>fas fa-trash-alt</v-icon> <v-icon dark right>fas fa-trash-alt</v-icon>
{{getDialogProperties.confirmButtonText || defaultMessage[type].confirmButtonText}} {{getDialogProperties.confirmButtonText || defaultMessage[type].confirmButtonText}}
</v-btn> </v-btn>
@ -30,7 +42,7 @@
</template> </template>
<script> <script>
import { mapActions, mapGetters } from 'vuex'; import { mapActions, mapGetters } from "vuex";
export default { export default {
data: () => ({ data: () => ({
defaultMessage: { defaultMessage: {
@ -50,9 +62,9 @@ export default {
confirmButtonText: "حذف", confirmButtonText: "حذف",
cancelButtonColor: "cyan", cancelButtonColor: "cyan",
confirmButtonColor: "red" confirmButtonColor: "red"
}, }
}, },
type: 'delete' type: "delete"
}), }),
watch: { watch: {
getDialogType(type) { getDialogType(type) {
@ -63,8 +75,12 @@ export default {
} }
} }
}, },
computed:{ computed: {
...mapGetters('modal', ['getDialogType', 'getDialogProperties', 'isModal']), ...mapGetters("modal", [
"getDialogType",
"getDialogProperties",
"isModal"
]),
modal: { modal: {
get() { get() {
return this.isModal("modal/dialog"); return this.isModal("modal/dialog");
@ -80,17 +96,16 @@ export default {
}, },
methods: { methods: {
async confirm() { async confirm() {
if (typeof this.getDialogProperties.success == "function") {
if(typeof this.getDialogProperties.success == 'function') {
await this.getDialogProperties.success(); await this.getDialogProperties.success();
} }
this.$_closeModal('modal/dialog'); this.$_closeModal("modal/dialog");
}, },
async cancel() { async cancel() {
if(typeof this.getDialogProperties.close == 'function') { if (typeof this.getDialogProperties.close == "function") {
await this.getDialogProperties.close(); await this.getDialogProperties.close();
} }
this.$_closeModal('modal/dialog'); this.$_closeModal("modal/dialog");
} }
} }
}; };

@ -16,14 +16,14 @@ export default {
props: { props: {
TitleFa: { default: "دسترسی سریع" }, TitleFa: { default: "دسترسی سریع" },
TitleEn: { default: "Title" }, TitleEn: { default: "Title" },
Color: { default: "Black" }, color: { default: "Black" },
SubItems: { type: Object, default: function () { return {} } }, SubItems: { type: Object, default: function () { return {} } },
TabContent: { default: '' }, TabContent: { default: '' },
Status: { default: '' }, Status: { default: '' },
}, },
data: function () { data: function () {
return { return {
aClass: 'WM-' + this.Color, aClass: 'WM-' + this.color,
TabHref: '#' + this.TabContent, TabHref: '#' + this.TabContent,
SubItemsCount : Object.keys(this.SubItems).length, SubItemsCount : Object.keys(this.SubItems).length,
} }

@ -15,14 +15,14 @@ export default {
props: { props: {
TitleFa: { default: "دسترسی سریع" }, TitleFa: { default: "دسترسی سریع" },
TitleEn: { default: "Title" }, TitleEn: { default: "Title" },
Color: { default: "Black" }, color: { default: "Black" },
TabContent: { default: '' }, TabContent: { default: '' },
Status: { default: '' }, Status: { default: '' },
Quantity: { default: 0 }, Quantity: { default: 0 },
}, },
data: function () { data: function () {
return { return {
aClass: 'WM-' + this.Color, aClass: 'WM-' + this.color,
TabHref: '#' + this.TabContent, TabHref: '#' + this.TabContent,
} }
}, },

@ -61,8 +61,8 @@ export default {
{ ID: 'WM457', UserName: ' علیرضا حسنی ', Quantity: 12, Value: 350000, UpdatedAt:' سه شنبه، 27 آذر <br> 22:33', Status: 'inProgress'}, { ID: 'WM457', UserName: ' علیرضا حسنی ', Quantity: 12, Value: 350000, UpdatedAt:' سه شنبه، 27 آذر <br> 22:33', Status: 'inProgress'},
], ],
Status: { Status: {
'inProgress': { TitleFa: ' در حال آماده سازی ', Color:''}, 'inProgress': { TitleFa: ' در حال آماده سازی ', color:''},
'ReadyToDeliver': { TitleFa: ' آماده ی تحویل ', Color:''}, 'ReadyToDeliver': { TitleFa: ' آماده ی تحویل ', color:''},
} }
} }
}, },

@ -5,4 +5,4 @@ import fa from "@Global/utils/vee-validate/locale/fa";
import "@Global/utils/vee-validate/newRules"; import "@Global/utils/vee-validate/newRules";
Vue.use(VeeValidate); Vue.use(VeeValidate);
Validator.localize("fa", fa); Validator.localize("fa", fa);

@ -4,7 +4,7 @@ import commonState from '@Global/store/modules/common/state';
const ApiService = { const ApiService = {
init(baseURL = null) { init(baseURL = null) {
axios.defaults.baseURL = "https://www.willaengine.ir"; // axios.defaults.baseURL = "https://www.willaengine.ir";
// if (baseURL) { // if (baseURL) {
// axios.defaults.baseURL = baseURL; // axios.defaults.baseURL = baseURL;
// } // }

@ -33,6 +33,9 @@
alpha_dash: function(n) { alpha_dash: function(n) {
return n + " فقط می تواند از حروف، اعداد، خط فاصله و زیرخط تشکیل شود" return n + " فقط می تواند از حروف، اعداد، خط فاصله و زیرخط تشکیل شود"
}, },
alpha_en_dash: function(n) {
return n + " فقط می تواند از حروف انگلیسی، اعداد، خط فاصله و زیرخط تشکیل شود"
},
alpha_num: function(n) { alpha_num: function(n) {
return n + " فقط میتواند از حروف و اعداد تشکیل شود" return n + " فقط میتواند از حروف و اعداد تشکیل شود"
}, },
@ -125,6 +128,7 @@
}, },
}, },
attributes: { attributes: {
name_en: "نام انگلیسی",
email: "ایمیل", email: "ایمیل",
name: "نام", name: "نام",
phone: "شماره ی تلفن", phone: "شماره ی تلفن",

@ -1,12 +1,18 @@
import { Validator } from "vee-validate"; import { Validator } from "vee-validate";
const isBetween = (value, { min, max } = {}) => { const isBetween = (value, { min, max } = {}) => {
return Number(min) <= value.length && Number(max) >= value.length; return Number(min) <= value.length && Number(max) >= value.length;
}; };
// The first param is called 'min', and the second is called 'max'. // The first param is called 'min', and the second is called 'max'.
const paramNames = ['min', 'max']; const paramNames = ["min", "max"];
Validator.extend('digits_between', isBetween, { Validator.extend("digits_between", isBetween, {
paramNames // pass it in the extend options. paramNames // pass it in the extend options.
});
Validator.extend("alpha_en_dash", {
validate(value) {
return /^[0-9A-Za-z\-\_]+$/.test(value);
}
}); });

@ -96,7 +96,7 @@
'wm-trial-confirmation' : TrialConfirmation, 'wm-trial-confirmation' : TrialConfirmation,
}, },
props: { props: {
Color: { default: 'grey darken-4' }, color: { default: 'grey darken-4' },
}, },
data() { data() {
return { return {

Loading…
Cancel
Save