This commit is contained in:
2019-11-06 18:38:41 +00:00
parent 8bac5bca4a
commit 990cd4c2ac
11 changed files with 451 additions and 477 deletions

View File

@@ -52,8 +52,7 @@ http://localhost:7575/login
http://localhost:8080/login
Grid not taking 25, 99 etc, stuck at 5 initial value for rows per page and that's what fetches off the server as well
Lang error, WTF, it's def there, maybe the valert needs to be updated or something
Vuetify dialog changes - https://github.com/yariksav/vuetify-dialog/issues/46

View File

@@ -1068,9 +1068,9 @@
}
},
"@babel/polyfill": {
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.6.0.tgz",
"integrity": "sha512-q5BZJI0n/B10VaQQvln1IlDK3BTBJFbADx7tv+oXDPIDZuTo37H5Adb9jhlXm/fEN4Y7/64qD9mnrJJG7rmaTw==",
"version": "7.7.0",
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.7.0.tgz",
"integrity": "sha512-/TS23MVvo34dFmf8mwCisCbWGrfhbiWZSwBo6HkADTBhUa2Q/jWltyY/tpofz/b6/RIhqaqQcquptCirqIhOaQ==",
"requires": {
"core-js": "^2.6.5",
"regenerator-runtime": "^0.13.2"
@@ -6925,9 +6925,9 @@
}
},
"core-js": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.3.3.tgz",
"integrity": "sha512-0xmD4vUJRY8nfLyV9zcpC17FtSie5STXzw+HyYw2t8IIvmDnbq7RJUULECCo+NstpJtwK9kx8S+898iyqgeUow=="
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.3.6.tgz",
"integrity": "sha512-u4oM8SHwmDuh5mWZdDg9UwNVq5s1uqq6ZDLLIs07VY+VJU91i3h4f3K/pgFvtUQPGdeStrZ+odKyfyt4EnKHfA=="
},
"core-js-compat": {
"version": "3.3.3",
@@ -7535,9 +7535,9 @@
"dev": true
},
"dayjs": {
"version": "1.8.16",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.16.tgz",
"integrity": "sha512-XPmqzWz/EJiaRHjBqSJ2s6hE/BUoCIHKgdS2QPtTQtKcS9E4/Qn0WomoH1lXanWCzri+g7zPcuNV4aTZ8PMORQ=="
"version": "1.8.17",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.17.tgz",
"integrity": "sha512-47VY/htqYqr9GHd7HW/h56PpQzRBSJcxIQFwqL3P20bMF/3az5c3PWdVY3LmPXFl6cQCYHL7c79b9ov+2bOBbw=="
},
"de-indent": {
"version": "1.0.2",
@@ -16139,24 +16139,84 @@
}
},
"sass-loader": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.3.1.tgz",
"integrity": "sha512-tuU7+zm0pTCynKYHpdqaPpe+MMTQ76I9TPZ7i4/5dZsigE350shQWe5EZNl5dBidM49TPET75tNqRbcsUZWeNA==",
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.0.tgz",
"integrity": "sha512-+qeMu563PN7rPdit2+n5uuYVR0SSVwm0JsOUsaJXzgYcClWSlmX0iHDnmeOobPkf5kUglVot3QS6SyLyaQoJ4w==",
"dev": true,
"requires": {
"clone-deep": "^4.0.1",
"loader-utils": "^1.0.1",
"neo-async": "^2.5.0",
"pify": "^4.0.1",
"loader-utils": "^1.2.3",
"neo-async": "^2.6.1",
"schema-utils": "^2.1.0",
"semver": "^6.3.0"
},
"dependencies": {
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"ajv": {
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
"dev": true,
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"ajv-keywords": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz",
"integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==",
"dev": true
},
"big.js": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
"dev": true
},
"json5": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
"dev": true,
"requires": {
"minimist": "^1.2.0"
}
},
"loader-utils": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
"integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^2.0.0",
"json5": "^1.0.1"
}
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true
},
"neo-async": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz",
"integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==",
"dev": true
},
"schema-utils": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.5.0.tgz",
"integrity": "sha512-32ISrwW2scPXHUSusP8qMg5dLUawKkyV+/qIEV9JdXKx+rsM6mi8vZY8khg2M69Qom16rtroWXD3Ybtiws38gQ==",
"dev": true,
"requires": {
"ajv": "^6.10.2",
"ajv-keywords": "^3.4.1"
}
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
@@ -16424,9 +16484,9 @@
"dev": true
},
"shvl": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/shvl/-/shvl-1.3.1.tgz",
"integrity": "sha512-+rRPP46hloYUAEImJcqprUgXu+05Ikqr4h4V+w5i2zJy37nAqtkQKufs3+3S2fDq6JNRrHMIQhB/Vaex+jgAAw=="
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shvl/-/shvl-2.0.0.tgz",
"integrity": "sha512-WbpzSvI5XgVGJ3A4ySGe8hBxj0JgJktfnoLhhJmvITDdK21WPVWwgG8GPlYEh4xqdti3Ff7PJ5G0QrRAjNS0Ig=="
},
"sigmund": {
"version": "1.0.1",
@@ -18312,9 +18372,9 @@
"integrity": "sha512-ImThpeNU9HbdZL3utgMCq0oiMzAkt1mcgy3/E6zWC/G6AaQoeuFdsl9nDhTDU3X1R6FK7nsIUuRACVcjI+A2GQ=="
},
"vue-cli-plugin-vuetify": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/vue-cli-plugin-vuetify/-/vue-cli-plugin-vuetify-1.1.1.tgz",
"integrity": "sha512-Sd1bQhMPKjFUKtAqsbndxu+fOSmCrSXF7pa4bIToFszP6Otu3HcwICzdGfNOyXOCX4/qqvNfSOdYapbNEVG+Uw==",
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vue-cli-plugin-vuetify/-/vue-cli-plugin-vuetify-1.1.2.tgz",
"integrity": "sha512-CcrZlAtsmGI6Uocq9e3rZjhxgfXRycE09yth1u+hKSPsAt0QQrX9JIGie4uJM5OLmq20TUaWQI/IosKHBp/fyQ==",
"dev": true,
"requires": {
"semver": "^6.0.0",
@@ -18398,9 +18458,9 @@
"dev": true
},
"vuetify": {
"version": "2.1.6",
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.1.6.tgz",
"integrity": "sha512-uK5jNTbRQtnPRMDsBeXOSVgo0nKDNq7XDi987XVhK6Vb5dl6Y5kSFBFDHPpdzSUraeUtyDHrJWxq29NTPIbdFw=="
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.1.9.tgz",
"integrity": "sha512-52CgEyPoGYHba5yocYKBB/LXcikoWzj9jCDTH8LlzH/hvjzkgsuEtFwUustGHyV9GstRaNZOrk4nuUWbPZc3kQ=="
},
"vuetify-dialog": {
"version": "1.0.0-alpha.5",
@@ -18456,18 +18516,18 @@
"integrity": "sha512-ER5moSbLZuNSMBFnEBVGhQ1uCBNJslH9W/Dw2W7GZN23UQA69uapP5GTT9Vm8Trc0PzBSVt6LzF3hGjmv41xcg=="
},
"vuex-persistedstate": {
"version": "2.5.4",
"resolved": "https://registry.npmjs.org/vuex-persistedstate/-/vuex-persistedstate-2.5.4.tgz",
"integrity": "sha512-XYJhKIwO+ZVlTaXyxKxnplrJ88Fnvk5aDw753bxzRw5/yMKLQ6lq9CDCBex2fwZaQcLibhtgJOxGCHjy9GLSlQ==",
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/vuex-persistedstate/-/vuex-persistedstate-2.7.0.tgz",
"integrity": "sha512-mpko65DUMBY4mF4sSGsgrqjE7fwO373LFZeuNrC55glRuBBAK4dkgzjr4j4Bij7WtMoKuo2t2w0NGenjauISaQ==",
"requires": {
"deepmerge": "^2.1.0",
"shvl": "^1.3.0"
"deepmerge": "^4.2.2",
"shvl": "^2.0.0"
},
"dependencies": {
"deepmerge": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz",
"integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA=="
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
"integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg=="
}
}
},

View File

@@ -11,19 +11,19 @@
"myLint": "npm run lint"
},
"dependencies": {
"@babel/polyfill": "^7.6.0",
"core-js": "^3.3.2",
"dayjs": "^1.8.16",
"@babel/polyfill": "^7.7.0",
"core-js": "^3.3.6",
"dayjs": "^1.8.17",
"jwt-decode": "^2.2.0",
"nprogress": "^0.2.0",
"register-service-worker": "^1.6.2",
"typeface-roboto": "0.0.54",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuetify": "^2.1.6",
"vuetify": "^2.1.9",
"vuetify-dialog": "^1.0.0-alpha.5",
"vuex": "^3.0.1",
"vuex-persistedstate": "^2.5.4"
"vuex-persistedstate": "^2.7.0"
},
"devDependencies": {
"@cypress/webpack-preprocessor": "^3.0.0",
@@ -44,8 +44,8 @@
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.2.3",
"sass": "^1.23.1",
"sass-loader": "^7.3.1",
"vue-cli-plugin-vuetify": "^1.1.1",
"sass-loader": "^8.0.0",
"vue-cli-plugin-vuetify": "^1.1.2",
"vue-template-compiler": "^2.6.10",
"vuetify-loader": "^1.3.0"
},

View File

@@ -14,6 +14,8 @@
<!--
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.2/css/all.css" integrity="sha384-/rXc/GQVaYpyDdyxK+ecHPVYJSN9bmVFBvjA/9eOB+pb3F2w2N6fc5qB9Ew5yIns" crossorigin="anonymous">
-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
</head>
<body>
<noscript>

View File

@@ -1,180 +1,36 @@
<template>
<v-app>
<v-navigation-drawer v-if="isAuthenticated" v-model="drawer" app>
<v-list dense>
<v-list-item
v-for="item in navItems"
:key="item.route"
:to="item.route"
>
<v-list-item-action>
<v-icon>{{ "fa-" + item.icon }}</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>{{ item.title }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
</v-navigation-drawer>
<v-app-bar
v-if="isAuthenticated"
:color="appBar.isMain ? 'primary' : 'secondary'"
dark
fixed
app
>
<v-app-bar-nav-icon @click.stop="drawer = !drawer"></v-app-bar-nav-icon>
<v-toolbar-title style="width: 300px" class="ml-0 pl-4">
<v-icon>{{ appBar.icon }}</v-icon
>&nbsp;
<span>{{ appBar.title }}</span>
<v-app-bar app>
<v-toolbar-title class="headline text-uppercase">
<span>Vuetify</span>
<span class="font-weight-light">MATERIAL DESIGN</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-toolbar-items>
<template v-for="item in appBar.menuItems">
<v-btn
class="hidden-xs-only"
icon
v-if="item.surface"
:key="item.key"
:disabled="item.disabled"
@click="clickMenuItem(item)"
>
<v-icon :color="item.color ? item.color : ''">
{{ "fa-" + item.icon }}
</v-icon>
</v-btn>
</template>
<v-spacer></v-spacer>
<v-menu bottom float-left>
<template v-slot:activator="{ on }">
<v-btn text icon v-on="on">
<v-icon>fa-ellipsis-v</v-icon>
</v-btn>
</template>
<v-list>
<template v-for="(item, index) in appBar.menuItems">
<v-subheader v-if="item.header" :key="index">
{{ item.header }}
</v-subheader>
<v-divider
v-else-if="item.divider"
:key="index"
:inset="item.inset"
></v-divider>
<v-list-item
v-else
:key="item.key"
:disabled="item.disabled"
@click="clickMenuItem(item)"
v-bind:class="{ 'hidden-sm-and-up': item.surface }"
>
<v-list-item-action>
<v-icon
v-if="item.icon"
:color="item.color ? item.color : ''"
>{{ "fa-" + item.icon }}</v-icon
>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>
<span>{{ item.title }}</span>
</v-list-item-title>
</v-list-item-content>
</v-list-item>
</template>
</v-list>
</v-menu>
</v-toolbar-items>
<v-btn
text
href="https://github.com/vuetifyjs/vuetify/releases/latest"
target="_blank"
>
<span class="mr-2">Latest Release</span>
</v-btn>
</v-app-bar>
<v-content>
<v-container fluid fill-height>
<v-row justify-center>
<transition name="fade" mode="out-in" @after-leave="afterLeave">
<router-view class="view"></router-view>
</transition>
</v-row>
</v-container>
<HelloWorld />
</v-content>
<v-footer color="primary" padless v-if="!isAuthenticated">
<div>
<a
href="https://ayanova.com"
target="_blank"
style="text-decoration:none"
class="white--text caption"
>
<span>AyaNova ({{ version }}) {{ copyright }}</span>
</a>
</div>
</v-footer>
</v-app>
</template>
<script>
/* xeslint-disable */
import aboutInfo from "./api/aboutinfo";
import HelloWorld from "./components/HelloWorld";
export default {
data() {
return {
drawer: null,
appBar: {
isMain: true,
icon: "",
title: "",
helpUrl: "index.html",
menuItems: []
}
};
name: "App",
components: {
HelloWorld
},
created() {
//////////////////////////////////
// WIRE UP
// MENU and DIALOG EVENT HANDLERS
// ON GZEVENTBUS
data: () => ({
//
//
window.$gz.menu.wireUpEventHandlers(this);
window.$gz.dialog.wireUpEventHandlers(this);
},
beforeDestroy() {
//UNWIRE ALL EVENT HANDLERS FROM GZEVENTBUS
window.$gz.eventBus.$off();
},
mounted() {
//redirect to login if not authenticated
if (!this.$store.state.authenticated) {
this.$router.push({ name: "login" });
}
},
computed: {
isAuthenticated() {
return this.$store.state.authenticated === true;
},
navItems() {
return this.$store.state.navItems;
},
copyright() {
return aboutInfo.copyright;
},
version() {
return aboutInfo.version;
},
helpUrl() {
return this.$store.state.helpUrl;
}
},
props: {
source: String
},
methods: {
afterLeave() {
this.$root.$emit("triggerScroll");
},
clickMenuItem(item) {
window.$gz.eventBus.$emit("menu-click", item);
}
}
})
};
</script>

View File

@@ -144,7 +144,7 @@ export default function initialize() {
if (res.data.timeZoneOffset != localOffset) {
//TODO: localize message and also actually have a fix for it here
//so this should be a confirm prompt but for now will just show it
//for now just show the message
window.$gz.eventBus.$emit(
"notify-info",

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 539 B

View File

@@ -1,43 +1,132 @@
<template>
<v-container>
<v-row>
<v-col cols="12">
<v-layout text-center wrap>
<v-flex xs12>
<v-img
:src="require('../assets/logo.svg')"
class="my-3"
contain
height="200"
position="center top"
></v-img>
</v-col>
<v-col cols="12" v-if="this.formReady">
<h1 class="display-1 font-weight-bold text-center">
{{ lt("Welcome") }}
</v-flex>
<v-flex mb-4>
<h1 class="display-2 font-weight-bold mb-3">
Welcome to Vuetify
</h1>
</v-col>
</v-row>
<p class="subheading font-weight-regular">
For help and collaboration with other Vuetify developers,
<br />please join our online
<a href="https://community.vuetifyjs.com" target="_blank"
>Discord Community</a
>
</p>
</v-flex>
<v-flex mb-5 xs12>
<h2 class="headline font-weight-bold mb-3">What's next?</h2>
<v-layout justify-center>
<a
v-for="(next, i) in whatsNext"
:key="i"
:href="next.href"
class="subheading mx-3"
target="_blank"
>
{{ next.text }}
</a>
</v-layout>
</v-flex>
<v-flex xs12 mb-5>
<h2 class="headline font-weight-bold mb-3">Important Links</h2>
<v-layout justify-center>
<a
v-for="(link, i) in importantLinks"
:key="i"
:href="link.href"
class="subheading mx-3"
target="_blank"
>
{{ link.text }}
</a>
</v-layout>
</v-flex>
<v-flex xs12 mb-5>
<h2 class="headline font-weight-bold mb-3">Ecosystem</h2>
<v-layout justify-center>
<a
v-for="(eco, i) in ecosystem"
:key="i"
:href="eco.href"
class="subheading mx-3"
target="_blank"
>
{{ eco.text }}
</a>
</v-layout>
</v-flex>
</v-layout>
</v-container>
</template>
<script>
export default {
created() {
window.$gz.locale
.fetch(["Welcome"])
.then(() => (this.formReady = true))
.catch(err => {
this.formReady = true;
window.$gz.errorHandler.handleFormError(err);
});
},
data() {
return { formReady: false };
},
methods: {
lt(ltKey) {
return window.$gz.locale.get(ltKey);
}
}
data: () => ({
ecosystem: [
{
text: "vuetify-loader",
href: "https://github.com/vuetifyjs/vuetify-loader"
},
{
text: "github",
href: "https://github.com/vuetifyjs/vuetify"
},
{
text: "awesome-vuetify",
href: "https://github.com/vuetifyjs/awesome-vuetify"
}
],
importantLinks: [
{
text: "Documentation",
href: "https://vuetifyjs.com"
},
{
text: "Chat",
href: "https://community.vuetifyjs.com"
},
{
text: "Made with Vuetify",
href: "https://madewithvuejs.com/vuetify"
},
{
text: "Twitter",
href: "https://twitter.com/vuetifyjs"
},
{
text: "Articles",
href: "https://medium.com/vuetify"
}
],
whatsNext: [
{
text: "Explore components",
href: "https://vuetifyjs.com/components/api-explorer"
},
{
text: "Select a layout",
href: "https://vuetifyjs.com/layout/pre-defined"
},
{
text: "Frequently Asked Questions",
href: "https://vuetifyjs.com/getting-started/frequently-asked-questions"
}
]
})
};
</script>
<style></style>

View File

@@ -1,204 +1,206 @@
/* eslint-disable */
import "@babel/polyfill";
import "@fortawesome/fontawesome-free/css/all.css";
import "typeface-roboto/index.css";
import Vue from "vue";
//import "./plugins/vuetify";
import Vuetify from "./plugins/vuetify";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./registerServiceWorker";
import errorHandler from "./api/errorhandler";
import NProgress from "nprogress";
import "nprogress/nprogress.css";
import dayjs from "dayjs";
import UTC from "dayjs/plugin/utc"; // load on demand
dayjs.extend(UTC); // use plugin
import lodash from "./libs/lodash.min.js";
import VuetifyDialog from "vuetify-dialog";
//my libs
import gzeventbus from "./api/eventbus";
import gzmenu from "./api/gzmenu";
import gzdialog from "./api/gzdialog";
import gzutil from "./api/gzutil";
import locale from "./api/locale";
import gzapi from "./api/gzapi";
import gzreport from "./api/gzreport";
import gzform from "./api/gzform";
import gzformcustomtemplate from "./api/form-custom-template";
import authorizationroles from "./api/authorizationroles";
import gztype from "./api/ayatype";
import "@/assets/css/main.css";
//controls
import dateTimeControl from "./components/date-time-control.vue";
import tagPicker from "./components/tag-picker.vue";
import customFieldsControl from "./components/custom-fields-control.vue";
import errorhandler from "./api/errorhandler";
/////////////////////////////////////////////////////////////////
// LIBS AND GLOBAL ITEMS
// NOTE: I'm putting them on Window deliberately to be globally available
// some say this is bad only due to if you want to server render the page
// however when I researched that I found it's easily worked around
// as all you need is a "window" global var defined and then it's all good in the hood
// so for convenience and far less fuckery this is the way
//
window.$gz = {
locale: locale,
formCustomTemplate: gzformcustomtemplate,
type: gztype,
role: authorizationroles,
eventBus: gzeventbus,
menu: gzmenu,
dialog: gzdialog,
util: gzutil,
dayjs: dayjs,
_: lodash,
api: gzapi,
form: gzform,
report: gzreport,
errorHandler: errorhandler,
store: store
};
/////////////////////////////////////////////////////////////////
// ERROR HANDLING
//
//**************************************************************
//**************************************************************
//**************************************************************
//DEVELOPMENT MODE HANDLER
//THIS SHOULD BE FALSE IN RELEASE
errorHandler.developmentModeShowErrorsImmediately(true);
//**************************************************************
//**************************************************************
//**************************************************************
Vue.config.errorHandler = errorHandler.handleVueError;
window.onerror = errorHandler.handleGeneralError;
//warnings, only occur by default in debug mode not production
Vue.config.warnHandler = errorHandler.handleVueWarning;
//added for vuetify 2.x to disable annoying prodution mode tip warning
//but commented out for now just to see what it looks like
//Vue.config.productionTip = false;
/////////////////////////////////////////////////////////////////
// AJAX LOADER INDICATOR
//
// Store a copy of the fetch function
var _oldFetch = fetch;
// Create our new version of the fetch function
window.fetch = function() {
// Create hooks
var fetchStart = new Event("fetchStart", {
view: document,
bubbles: true,
cancelable: false
});
var fetchEnd = new Event("fetchEnd", {
view: document,
bubbles: true,
cancelable: false
});
// Pass the supplied arguments to the real fetch function
var fetchCall = _oldFetch.apply(this, arguments);
// Trigger the fetchStart event
document.dispatchEvent(fetchStart);
fetchCall
.then(function() {
// Trigger the fetchEnd event
document.dispatchEvent(fetchEnd);
})
.catch(function() {
// Trigger the fetchEnd event
document.dispatchEvent(fetchEnd);
});
return fetchCall;
};
document.addEventListener("fetchStart", function() {
NProgress.start();
});
document.addEventListener("fetchEnd", function() {
NProgress.done();
});
/////////////////////////////////////////////////////////////////
// FILTERS
//
Vue.filter("capitalize", function vueFilterCapitalize(value) {
if (!value) return "";
value = value.toString();
return value.charAt(0).toUpperCase() + value.slice(1);
});
Vue.filter("shortdate", function vueFilterShortDate(value) {
if (!value) return "";
var dj = dayjs(value);
return dj.format("YYYY-MM-DD hh:mm:ss A");
});
Vue.filter("currency", function vueFilterCurrency(value) {
if (!value) return "";
return "$" + value;
});
Vue.filter("boolastext", function vueFilterBoolAsText(value) {
if (!value) return "";
return value ? "Yes" : "Nope";
});
/////////////////////////////////////////////////////////////
//GZ COMPONENTS
//
Vue.component("gz-date-time-picker", dateTimeControl);
Vue.component("gz-tag-picker", tagPicker);
Vue.component("gz-custom-fields", customFieldsControl);
////////////////////////////////////////////////////////
//3rd party ui components
//
Vue.use(VuetifyDialog, {
context: {
Vuetify
}
});
/////////////////////////////////////////////////////////////
//DIRECTIVES
//
//Auto focus on forms
Vue.directive("focus", {
// When the bound element is inserted into the DOM...
inserted: function(el) {
// Focus the element
el.focus();
}
});
// console.log(Vue);
// console.log(Vuetify.lang);
// debugger;
/////////////////////////////////////////////////////////////////
// INSTANTIATE
//
new Vue({
vuetify: Vuetify,
router,
store,
render: h => h(App)
}).$mount("#app");
/* eslint-disable */
import "@babel/polyfill";
import "@fortawesome/fontawesome-free/css/all.css";
import "typeface-roboto/index.css";
import Vue from "vue";
//import "./plugins/vuetify";
import Vuetify from "./plugins/vuetify";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./registerServiceWorker";
import errorHandler from "./api/errorhandler";
import NProgress from "nprogress";
import "nprogress/nprogress.css";
import dayjs from "dayjs";
import UTC from "dayjs/plugin/utc"; // load on demand
dayjs.extend(UTC); // use plugin
import lodash from "./libs/lodash.min.js";
import VuetifyDialog from "vuetify-dialog";
//my libs
import gzeventbus from "./api/eventbus";
import gzmenu from "./api/gzmenu";
import gzdialog from "./api/gzdialog";
import gzutil from "./api/gzutil";
import locale from "./api/locale";
import gzapi from "./api/gzapi";
import gzreport from "./api/gzreport";
import gzform from "./api/gzform";
import gzformcustomtemplate from "./api/form-custom-template";
import authorizationroles from "./api/authorizationroles";
import gztype from "./api/ayatype";
import "@/assets/css/main.css";
//controls
import dateTimeControl from "./components/date-time-control.vue";
import tagPicker from "./components/tag-picker.vue";
import customFieldsControl from "./components/custom-fields-control.vue";
import errorhandler from "./api/errorhandler";
import vuetify from './plugins/vuetify';
/////////////////////////////////////////////////////////////////
// LIBS AND GLOBAL ITEMS
// NOTE: I'm putting them on Window deliberately to be globally available
// some say this is bad only due to if you want to server render the page
// however when I researched that I found it's easily worked around
// as all you need is a "window" global var defined and then it's all good in the hood
// so for convenience and far less fuckery this is the way
//
window.$gz = {
locale: locale,
formCustomTemplate: gzformcustomtemplate,
type: gztype,
role: authorizationroles,
eventBus: gzeventbus,
menu: gzmenu,
dialog: gzdialog,
util: gzutil,
dayjs: dayjs,
_: lodash,
api: gzapi,
form: gzform,
report: gzreport,
errorHandler: errorhandler,
store: store
};
/////////////////////////////////////////////////////////////////
// ERROR HANDLING
//
//**************************************************************
//**************************************************************
//**************************************************************
//DEVELOPMENT MODE HANDLER
//THIS SHOULD BE FALSE IN RELEASE
errorHandler.developmentModeShowErrorsImmediately(true);
//**************************************************************
//**************************************************************
//**************************************************************
Vue.config.errorHandler = errorHandler.handleVueError;
window.onerror = errorHandler.handleGeneralError;
//warnings, only occur by default in debug mode not production
Vue.config.warnHandler = errorHandler.handleVueWarning;
//added for vuetify 2.x to disable annoying prodution mode tip warning
//but commented out for now just to see what it looks like
//Vue.config.productionTip = false;
/////////////////////////////////////////////////////////////////
// AJAX LOADER INDICATOR
//
// Store a copy of the fetch function
var _oldFetch = fetch;
// Create our new version of the fetch function
window.fetch = function() {
// Create hooks
var fetchStart = new Event("fetchStart", {
view: document,
bubbles: true,
cancelable: false
});
var fetchEnd = new Event("fetchEnd", {
view: document,
bubbles: true,
cancelable: false
});
// Pass the supplied arguments to the real fetch function
var fetchCall = _oldFetch.apply(this, arguments);
// Trigger the fetchStart event
document.dispatchEvent(fetchStart);
fetchCall
.then(function() {
// Trigger the fetchEnd event
document.dispatchEvent(fetchEnd);
})
.catch(function() {
// Trigger the fetchEnd event
document.dispatchEvent(fetchEnd);
});
return fetchCall;
};
document.addEventListener("fetchStart", function() {
NProgress.start();
});
document.addEventListener("fetchEnd", function() {
NProgress.done();
});
/////////////////////////////////////////////////////////////////
// FILTERS
//
Vue.filter("capitalize", function vueFilterCapitalize(value) {
if (!value) return "";
value = value.toString();
return value.charAt(0).toUpperCase() + value.slice(1);
});
Vue.filter("shortdate", function vueFilterShortDate(value) {
if (!value) return "";
var dj = dayjs(value);
return dj.format("YYYY-MM-DD hh:mm:ss A");
});
Vue.filter("currency", function vueFilterCurrency(value) {
if (!value) return "";
return "$" + value;
});
Vue.filter("boolastext", function vueFilterBoolAsText(value) {
if (!value) return "";
return value ? "Yes" : "Nope";
});
/////////////////////////////////////////////////////////////
//GZ COMPONENTS
//
Vue.component("gz-date-time-picker", dateTimeControl);
Vue.component("gz-tag-picker", tagPicker);
Vue.component("gz-custom-fields", customFieldsControl);
////////////////////////////////////////////////////////
//3rd party ui components
//
Vue.use(VuetifyDialog, {
context: {
Vuetify
}
});
/////////////////////////////////////////////////////////////
//DIRECTIVES
//
//Auto focus on forms
Vue.directive("focus", {
// When the bound element is inserted into the DOM...
inserted: function(el) {
// Focus the element
el.focus();
}
});
// console.log(Vue);
// console.log(Vuetify.lang);
// debugger;
/////////////////////////////////////////////////////////////////
// INSTANTIATE
//
new Vue({
vuetify: Vuetify,
router,
store,
vuetify,
render: h => h(App)
}).$mount("#app");

View File

@@ -1,37 +1,10 @@
/* xeslint-disable */
import Vue from "vue";
import Vuetify from "vuetify/lib";
//import myLang from "../api/en";
Vue.use(Vuetify);
export default new Vuetify({
// lang: { locales: { myLang }, current: "myLang" },
theme: {
themes: {
light: {
primary: "#00205B", //Canucks dark blue
secondary: "#00843D", //canucks green
accent: "#db7022", //lighter orangey red, more friendly looking though not as much clarity it seems
//error: "#b71c1c", //dark red, easy to read but not error-y enough possibly
//accent: "#BD491A", //dark orangey red, more clarity, less friendly looking
error: "#ff5252", //lighter red, have to see if it's good for all screens and sizes as it's a bit light but it stands out as an error condition better
disabled: "#e0e0e0"
}
}
},
icons: {
iconfont: "fa"
iconfont: "mdi"
}
});
// export default new Vuetify({
// lang: {
// locales: { zhHans, pl, sv },
// current: 'zhHans',
// },
// })

View File

@@ -8,13 +8,6 @@ import HelloWorld from "../components/HelloWorld";
export default {
components: {
HelloWorld
},
beforeCreate() {
window.$gz.eventBus.$emit("menu-change", {
isMain: true,
icon: "fa-home",
title: window.$gz.locale.get("Home")
});
}
};
</script>