This commit is contained in:
160
ayanova/src/views/About.vue
Normal file
160
ayanova/src/views/About.vue
Normal file
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<!-- <div class="about">
|
||||
|
||||
<h1>About AyaNova</h1>-->
|
||||
<v-layout row>
|
||||
<v-flex xs12 sm6 offset-sm3>
|
||||
<v-card>
|
||||
<v-toolbar>
|
||||
<v-avatar size="64px" tile>
|
||||
<img :src="require('../assets/bw-logo.svg')" alt="AyaNova">
|
||||
</v-avatar>
|
||||
<v-toolbar-title>{{ lt("HelpAboutAyaNova")}}</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn large icon to="/log">
|
||||
<v-icon>fa-glasses</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
<v-list two-line subheader>
|
||||
<v-subheader>{{ lt("ClientApp")}}</v-subheader>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ lt("Version")}}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ clientInfo.version }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
<v-divider></v-divider>
|
||||
<v-list two-line subheader>
|
||||
<v-subheader>{{ lt("Server")}}</v-subheader>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ lt("Version")}}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ serverInfo.serverVersion }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ lt("SchemaVersion")}}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ serverInfo.dbSchemaVersion }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ lt("ServerTime")}}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ serverInfo.serverLocalTime }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ lt("TimeZone")}}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ serverInfo.serverTimeZone }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
<v-divider></v-divider>
|
||||
<v-list two-line subheader>
|
||||
<v-subheader>{{ lt("HelpLicense")}}</v-subheader>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ lt("RegisteredUser")}}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ serverInfo.license.license.licensedTo }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ lt("DatabaseID")}}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ serverInfo.license.license.dbId }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ lt("LicenseSerial")}}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ serverInfo.license.license.keySerial }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ lt("LicenseExpiration")}}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ serverInfo.license.license.licenseExpiration }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ lt("SupportedUntil")}}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>{{ serverInfo.license.license.maintenanceExpiration }}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
<v-list-tile avatar>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ lt("LicensedOptions")}}</v-list-tile-title>
|
||||
<v-list-tile-sub-title
|
||||
v-for="item in serverInfo.license.license.features"
|
||||
:key="item.Feature"
|
||||
>{{item.Feature}} {{item.Count ? item.Count : ""}}</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<!-- </div> -->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* xeslint-disable */
|
||||
import apiMeta from "../api/apimeta";
|
||||
import aboutInfo from "../utils/aboutinfo";
|
||||
import lt from "../api/locale";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
serverInfo: { license: { license: {} } },
|
||||
clientInfo: {}
|
||||
};
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
lt.fetch([
|
||||
"HelpAboutAyaNova",
|
||||
"ClientApp",
|
||||
"Server",
|
||||
"Version",
|
||||
"SchemaVersion",
|
||||
"ServerTime",
|
||||
"TimeZone",
|
||||
"HelpLicense",
|
||||
"RegisteredUser",
|
||||
"DatabaseID",
|
||||
"LicenseSerial",
|
||||
"LicenseExpiration",
|
||||
"SupportedUntil",
|
||||
"LicensedOptions"
|
||||
]).then(() => {
|
||||
next();
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.clientInfo.version = aboutInfo.version;
|
||||
apiMeta
|
||||
.fetchAPIInfo()
|
||||
.then(response => {
|
||||
this.serverInfo = response.data;
|
||||
})
|
||||
.catch(function(error) {
|
||||
/* xeslint-disable-next-line */
|
||||
//console.log(error);
|
||||
//TODO: turn this into a general error handling method for every form
|
||||
//probablyo an error component with error message slot to fill in
|
||||
alert(error);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
lt: function(key) {
|
||||
return lt.get(key);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
13
ayanova/src/views/Home.vue
Normal file
13
ayanova/src/views/Home.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<HelloWorld/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HelloWorld from "../components/HelloWorld";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
};
|
||||
</script>
|
||||
89
ayanova/src/views/inventory.vue
Normal file
89
ayanova/src/views/inventory.vue
Normal file
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<v-layout column wrap class="my-5" align-center>
|
||||
<v-flex xs12>
|
||||
<v-container grid-list-xl>
|
||||
<v-layout row wrap align-top>
|
||||
<WidgetList/>
|
||||
<WarehouseTop/>
|
||||
<POTop/>
|
||||
<PartTop/>
|
||||
<PartAssemblyTop/>
|
||||
<v-flex xs12 md4>
|
||||
<v-card class="elevation-0 transparent">
|
||||
<v-card-text class="text-xs-center">
|
||||
<v-icon x-large color="accent">fa-lightbulb</v-icon>
|
||||
</v-card-text>
|
||||
<v-card-title primary-title class="layout justify-center">
|
||||
<div class="headline text-xs-center">Material Design</div>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt ornare.
|
||||
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
|
||||
Nullam in aliquet odio. Aliquam eu est vitae tellus bibendum tincidunt. Suspendisse potenti.
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<!-- <v-layout align-center justify-center row fill-height>
|
||||
<WidgetTop/>
|
||||
<PartTop/>
|
||||
<PartAssemblyTop/>
|
||||
<WarehouseTop/>
|
||||
<POTop/>
|
||||
</v-layout>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* Xeslint-disable */
|
||||
import WidgetList from "../components/inventorywidgetlist";
|
||||
import WarehouseTop from "../components/inventorywarehousetop";
|
||||
import POTop from "../components/inventorypotop";
|
||||
import PartTop from "../components/inventoryparttop";
|
||||
import PartAssemblyTop from "../components/inventorypartassemblytop";
|
||||
/*
|
||||
HMMM?? - Maybe top level category is "part" and inventory is a sub item like the rest since they all revolve around parts but are not all inventory
|
||||
*/
|
||||
|
||||
// - PART REQUESTS OVERVIEW ETC....
|
||||
// - PART ASSEMBLIES
|
||||
// - PART CATEGORIES
|
||||
// - PART WAREHOUSES
|
||||
// - PARTS
|
||||
// - Part inventory
|
||||
// - Part inventory adjustments
|
||||
|
||||
//import store from "../store";
|
||||
import lt from "../api/locale";
|
||||
//import _ from "../utils/libs/lodash.js";
|
||||
export default {
|
||||
components: {
|
||||
WidgetList,
|
||||
WarehouseTop,
|
||||
POTop,
|
||||
PartTop,
|
||||
PartAssemblyTop
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
//Cache all required lt keys
|
||||
var ltKeysRequired = ["Inventory"].concat(WidgetList.ltKeysRequired);
|
||||
lt.fetch(ltKeysRequired).then(() => {
|
||||
next();
|
||||
});
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
lt: function(key) {
|
||||
return lt.get(key);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
42
ayanova/src/views/log.vue
Normal file
42
ayanova/src/views/log.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<v-layout row>
|
||||
<v-flex>
|
||||
<h1>{{ lt("Log")}}</h1>
|
||||
<v-textarea v-model="logText" full-width readonly></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* xeslint-disable */
|
||||
|
||||
//import lt from "../api/locale";
|
||||
import store from "../store";
|
||||
import lt from "../api/locale";
|
||||
import _ from "../utils/libs/lodash.js";
|
||||
export default {
|
||||
data() {
|
||||
return { logText: "" };
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
lt.fetch(["Log"]).then(() => {
|
||||
next();
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
var outText = "";
|
||||
_.forEach(store.state.logArray, function(value) {
|
||||
outText += value + "\n";
|
||||
});
|
||||
this.logText = outText;
|
||||
},
|
||||
methods: {
|
||||
lt: function(key) {
|
||||
return lt.get(key);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
88
ayanova/src/views/login.vue
Normal file
88
ayanova/src/views/login.vue
Normal file
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<v-container fluid>
|
||||
<v-layout row wrap="">
|
||||
<v-flex xs12 class="text-xs-center" mt-5 ml-5 pl-5>
|
||||
<v-img :src="require('../assets/logo.svg')" class="my-3" contain height="200"></v-img>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 offset-sm3 mt-3>
|
||||
<form>
|
||||
<v-layout column>
|
||||
<v-flex>
|
||||
<v-text-field
|
||||
name="username"
|
||||
v-model="input.username"
|
||||
prepend-icon="fa-user"
|
||||
label="User"
|
||||
required
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex>
|
||||
<v-text-field
|
||||
name="password"
|
||||
v-model="input.password"
|
||||
prepend-icon="fa-key"
|
||||
label="Password"
|
||||
type="password"
|
||||
required
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex class="text-xs-center" mt-1>
|
||||
<v-btn color="primary" v-on:click="login()">
|
||||
<v-icon>fa-sign-in-alt</v-icon>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</form>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* xeslint-disable */
|
||||
import auth from "../api/auth";
|
||||
export default {
|
||||
name: "Login",
|
||||
data() {
|
||||
return {
|
||||
input: {
|
||||
username: "manager",
|
||||
password: "l3tm3in"
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
login() {
|
||||
if (this.input.username != "" && this.input.password != "") {
|
||||
auth
|
||||
.authenticate(this.input.username, this.input.password)
|
||||
.then(() => {
|
||||
this.$router.replace({ name: "home" });
|
||||
})
|
||||
.catch(function(error) {
|
||||
/* xeslint-disable-next-line */
|
||||
//console.log(error);
|
||||
alert("login failed: " + error);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next(() => {
|
||||
auth.logout();
|
||||
next();
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#login {
|
||||
width: 500px;
|
||||
border: 1px solid #cccccc;
|
||||
background-color: #ffffff;
|
||||
margin: auto;
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
26
ayanova/src/views/secure.vue
Normal file
26
ayanova/src/views/secure.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div id="secure">
|
||||
<h1>Secure Area</h1>
|
||||
<p>
|
||||
This is a secure area
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Secure',
|
||||
data() {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#secure {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #CCCCCC;
|
||||
padding: 20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user