From ba2746b358726dec1e4b7a0749d020c053d66dfc Mon Sep 17 00:00:00 2001 From: saeid_01 Date: Sat, 5 Oct 2019 02:02:08 +0330 Subject: [PATCH] work in home --- public/mix-manifest.json | 16 ++----- .../js/Global/plugins/globalComponent.js | 42 +++++-------------- .../Global/utils/common/ProcessTreeArray.js | 5 ++- 3 files changed, 18 insertions(+), 45 deletions(-) diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 406936c..0196075 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,14 +1,6 @@ { -<<<<<<< HEAD - "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=21cfc18193d7646e47fc", - "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=c12c4411576c8750d0d9", - "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=07b23df89bedfb5478cb", - "/js/vue/User/app.js": "/js/vue/User/app.js?id=cc121c56742824d52899" -======= - "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=dc072ea26c92af6777a0", - "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=db8af10412509ee0586b", - "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=76afa0e5e8d8410f111f", - "/js/vue/Modules/Reservation/app.js": "/js/vue/Modules/Reservation/app.js?id=8058a4ba779b6aaf4121", - "/js/vue/User/app.js": "/js/vue/User/app.js?id=7e0e6ca7915af5a841bc" ->>>>>>> 3e8aadc9625a4d51149fd0d98d1d10ed408f0e69 + "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=3e5b889f51f23dbc9726", + "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=cb168bbb9fcea95e254d", + "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=b54bd002ab41401db89f", + "/js/vue/User/app.js": "/js/vue/User/app.js?id=4a731d72666c38a82230" } diff --git a/resources/js/Global/plugins/globalComponent.js b/resources/js/Global/plugins/globalComponent.js index 4383838..d263d6f 100644 --- a/resources/js/Global/plugins/globalComponent.js +++ b/resources/js/Global/plugins/globalComponent.js @@ -1,46 +1,26 @@ import Vue from 'vue'; - -// import VueScrollReveal from "vue-scroll-reveal"; - -// import "popper.js"; -// import "bootstrap-v4-rtl"; -// import "bootstrap-v4-rtl/scss/bootstrap-rtl.scss"; -// import "bootstrap-select"; -// import "bootstrap-select/dist/css/bootstrap-select.css"; -// import "vuetify/dist/vuetify.min.css"; // Ensure you are using css-loader -// import "@Global/assets/Font-Icons/css/fontello.css"; +// global Styles import "@Global/scss/style.scss"; -// components + +// global Components import PartTitle from "@Global/components/Dividers/PartTitle.vue"; import PageTitle from "@Global/components/Dividers/PageTitle.vue"; import Checkbox from "@Global/components/Inputs/Checkbox.vue"; import InfoBlock from "@Global/components/Misc/InfoBlock.vue"; import Breadcrumbs from "@Global/components/Misc/Breadcrumbs"; -//jalali -import jalaliMoment from "vue-jalali-moment" -import momment from "moment" -momment.locale('fa'); -Vue.use(jalaliMoment); - - -// Vue.use(VueScrollReveal, { -// class: 'v-scroll-reveal', // A CSS class applied to elements with the v-scroll-reveal directive; useful for animation overrides. -// duration: 800, -// scale: 1, -// distance: '10px', -// mobile: false -// }); - -// Vue.use(Vuetify, { -// iconfont: "fa", -// rtl: true -// }); - Vue.component("WM-PartTitle", PartTitle); Vue.component("WM-PageTitle", PageTitle); Vue.component("WM-Checkbox", Checkbox); Vue.component("WM-InfoBlock", InfoBlock); Vue.component("wm-breadcrumbs", Breadcrumbs); + + +//jalali => 0.6MB +import jalaliMoment from "vue-jalali-moment" +import momment from "moment" +momment.locale('fa'); +Vue.use(jalaliMoment); + diff --git a/resources/js/Global/utils/common/ProcessTreeArray.js b/resources/js/Global/utils/common/ProcessTreeArray.js index 1f15b4d..e62cd64 100644 --- a/resources/js/Global/utils/common/ProcessTreeArray.js +++ b/resources/js/Global/utils/common/ProcessTreeArray.js @@ -70,6 +70,7 @@ const listSearchSelect = Options => { let treeArray = Options.array ? Options.array : []; var listArray = Options.list ? Options.list : convertTreeToList(treeArray); var fromLevel = Options.fromLevel ? Options.fromLevel : 1; + var isShowParent = Options.isShowParent ? Options.isShowParent : false;//bolean var justLevel = Options.justLevel ? Options.justLevel : null; var untilLevel = Options.upToLevel ? Options.upToLevel : "End"; var headerLevel = Options.titleLevel ? Options.titleLevel : null; @@ -130,11 +131,11 @@ const listSearchSelect = Options => { ids.push(listArray[key].id); } } else if (untilLevel == "End") { - if (listArray[key].hasChildren == false) { + if (isShowParent || listArray[key].hasChildren == false) { ids.push(listArray[key].id); } } else { - if (listArray[key].lvl <= untilLevel && listArray[key].hasChildren == false || listArray[key].lvl == untilLevel) { + if ((listArray[key].lvl <= untilLevel && (isShowParent || listArray[key].hasChildren == false)) || listArray[key].lvl == untilLevel) { ids.push(listArray[key].id); } }