This commit is contained in:
2019-05-02 19:46:34 +00:00
parent 60d1fb82fe
commit 640c6ef095
20 changed files with 400 additions and 271 deletions

View File

@@ -68,9 +68,9 @@ All platforms and browsers
- DONE HOME not localized issue, on login, sometimes the home page is not showing as localized! Some kind of timing issue or wrong event used to localize it or something. ?? - DONE HOME not localized issue, on login, sometimes the home page is not showing as localized! Some kind of timing issue or wrong event used to localize it or something. ??
- DONE I see that HOME->BeforeCreate breakpoint is hit **BEFORE** the locale text has been fetched. - DONE I see that HOME->BeforeCreate breakpoint is hit **BEFORE** the locale text has been fetched.
- DONE was not calling promises correctly and not chaining them properly. Fixed - DONE was not calling promises correctly and not chaining them properly. Fixed
- Wire up delete menu item - DONE Wire up delete menu item
- api code is stubbed out for delete, need to write that as well - DONE api code is stubbed out for delete, need to write that as well
- Need prompt, are you sure?? - DONE Need prompt, are you sure??
- DONE TODO navigating through menu doesn't "back" properly when clicking back on browser controls - DONE TODO navigating through menu doesn't "back" properly when clicking back on browser controls
- DONE widget form now not localized title at menu top - DONE widget form now not localized title at menu top
@@ -95,9 +95,11 @@ All platforms and browsers
End to end action End to end action
TODO: - Code for new record to the server TODO: NEW WIDGET
- Need a path to making a new record - Code for new record to the server
- Need a path to making a new record
- ID 0 maybe
TODO: Fill selection boxes, autocomplete etc
TODO: NOW THAT FORM IS THERE MOSTLY, CLEAN UP CODE FOR RE-USE in many other forms TODO: NOW THAT FORM IS THERE MOSTLY, CLEAN UP CODE FOR RE-USE in many other forms
- Don't need to replicate common code so put it somewhere else - Don't need to replicate common code so put it somewhere else
- formstate shit is also menu shit really so can they be combined somehow, like present two sets of menu options one read only and one fully read-write? - formstate shit is also menu shit really so can they be combined somehow, like present two sets of menu options one read only and one fully read-write?
@@ -116,6 +118,7 @@ TODO: About AyaNova form should show the exact client browser and device info as
- Generates an email? - Generates an email?
- At least copy it to clipboard on desktop or enable sharing so can share on device to email - At least copy it to clipboard on desktop or enable sharing so can share on device to email
TODO: TAGS!!! Do tags mofo TODO: TAGS!!! Do tags mofo
TODO: //todo: timezone doesn't match, offer to fix it in initialize.js there needs to be a prompt and autofix
TODO: Automated testing of UI by driving web interaction, that needs to be instituted asap TODO: Automated testing of UI by driving web interaction, that needs to be instituted asap
TODO: Server needs to do widget validation 666 test rules not only in debug mode so can test when put up to the devops server TODO: Server needs to do widget validation 666 test rules not only in debug mode so can test when put up to the devops server
TODO: Dark mode (dark with a half moon icon) TODO: Dark mode (dark with a half moon icon)

View File

@@ -7,7 +7,8 @@
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint", "lint": "vue-cli-service lint",
"test:e2e": "vue-cli-service test:e2e", "test:e2e": "vue-cli-service test:e2e",
"test:unit": "vue-cli-service test:unit" "test:unit": "vue-cli-service test:unit",
"myLint": "npm run lint"
}, },
"dependencies": { "dependencies": {
"@babel/polyfill": "^7.4.4", "@babel/polyfill": "^7.4.4",

View File

@@ -2,7 +2,11 @@
<v-app> <v-app>
<v-navigation-drawer v-if="isAuthenticated" fixed v-model="drawer" app> <v-navigation-drawer v-if="isAuthenticated" fixed v-model="drawer" app>
<v-list dense> <v-list dense>
<v-list-tile v-for="item in navItems" :key="item.route" :to="item.route"> <v-list-tile
v-for="item in navItems"
:key="item.route"
:to="item.route"
>
<v-list-tile-action> <v-list-tile-action>
<v-icon>{{ "fa-" + item.icon }}</v-icon> <v-icon>{{ "fa-" + item.icon }}</v-icon>
</v-list-tile-action> </v-list-tile-action>
@@ -12,24 +16,33 @@
</v-list-tile> </v-list-tile>
</v-list> </v-list>
</v-navigation-drawer> </v-navigation-drawer>
<v-toolbar v-if="isAuthenticated" :color="appBar.isMain?'primary':'secondary'" dark fixed app> <v-toolbar
v-if="isAuthenticated"
:color="appBar.isMain ? 'primary' : 'secondary'"
dark
fixed
app
>
<v-toolbar-side-icon @click.stop="drawer = !drawer"></v-toolbar-side-icon> <v-toolbar-side-icon @click.stop="drawer = !drawer"></v-toolbar-side-icon>
<v-toolbar-title style="width: 300px" class="ml-0 pl-3"> <v-toolbar-title style="width: 300px" class="ml-0 pl-3">
<v-icon>{{ appBar.icon }}</v-icon>&nbsp; <v-icon>{{ appBar.icon }}</v-icon
<span>{{ appBar.title}}</span> >&nbsp;
<span>{{ appBar.title }}</span>
</v-toolbar-title> </v-toolbar-title>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-toolbar-items> <v-toolbar-items>
<template v-for="(item) in appBar.menuItems"> <template v-for="item in appBar.menuItems">
<v-btn <v-btn
class="hidden-xs-only" class="hidden-xs-only"
icon icon
v-if="item.surface" v-if="item.surface"
:key="item.key" :key="item.key"
:disabled="item.disabled" :disabled="item.disabled"
@click="$gzevent.$emit('menu-click',item)" @click="$gzevent.$emit('menu-click', item)"
> >
<v-icon :color="item.color ? item.color : ''">{{ "fa-" + item.icon }}</v-icon> <v-icon :color="item.color ? item.color : ''">{{
"fa-" + item.icon
}}</v-icon>
</v-btn> </v-btn>
</template> </template>
<v-spacer></v-spacer> <v-spacer></v-spacer>
@@ -40,18 +53,28 @@
</v-btn> </v-btn>
</template> </template>
<v-list> <v-list>
<template v-for="(item,index) in appBar.menuItems"> <template v-for="(item, index) in appBar.menuItems">
<v-subheader v-if="item.header" :key="index">{{ item.header }}</v-subheader> <v-subheader v-if="item.header" :key="index">{{
<v-divider v-else-if="item.divider" :key="index" :inset="item.inset"></v-divider> item.header
}}</v-subheader>
<v-divider
v-else-if="item.divider"
:key="index"
:inset="item.inset"
></v-divider>
<v-list-tile <v-list-tile
v-else v-else
:key="item.key" :key="item.key"
:disabled="item.disabled" :disabled="item.disabled"
@click="$gzevent.$emit('menu-click',item)" @click="$gzevent.$emit('menu-click', item)"
v-bind:class="{ 'hidden-sm-and-up': item.surface }" v-bind:class="{ 'hidden-sm-and-up': item.surface }"
> >
<v-list-tile-action> <v-list-tile-action>
<v-icon v-if="item.icon" :color="item.color?item.color:''">{{ "fa-" + item.icon }}</v-icon> <v-icon
v-if="item.icon"
:color="item.color ? item.color : ''"
>{{ "fa-" + item.icon }}</v-icon
>
</v-list-tile-action> </v-list-tile-action>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title> <v-list-tile-title>
@@ -76,7 +99,9 @@
<v-flex primary py-2 text-xs-center white--text xs12> <v-flex primary py-2 text-xs-center white--text xs12>
<div> <div>
<a href="https://ayanova.com" target="_blank"> <a href="https://ayanova.com" target="_blank">
<span class="white--text caption">AyaNova ({{version}}) {{copyright}}</span> <span class="white--text caption"
>AyaNova ({{ version }}) {{ copyright }}</span
>
</a> </a>
</div> </div>
</v-flex> </v-flex>

View File

@@ -1,14 +1,14 @@
/* Xeslint-disable */ /* Xeslint-disable */
import store from "../store"; import store from "../store";
import locale from "./locale"; import locale from "./locale";
import gzevent from "./eventbus";
var devModeShowErrors = false; var devModeShowErrors = false;
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
// //
// Localize, Log and optionally display errors // Localize, Log and optionally display errors
// return localized message in case caller needs it // return localized message in case caller needs it
function dealWithError(msg, form) { function dealWithError(msg, vm) {
msg = locale.translateString(msg); msg = locale.translateString(msg);
//In some cases the error may not be localizable, if this is not a debug run then it should show without the ?? that localizing puts in keys not found //In some cases the error may not be localizable, if this is not a debug run then it should show without the ?? that localizing puts in keys not found
//so it's not as wierd looking to the user //so it's not as wierd looking to the user
@@ -17,20 +17,24 @@ function dealWithError(msg, form) {
} }
store.commit("logItem", msg); store.commit("logItem", msg);
if (devModeShowErrors) { if (devModeShowErrors) {
alert("~" + msg); gzevent.$emit(
"notify-error",
"DEV ERROR errorHandler::devShowUnknownError - unexpected error: \r\n" +
msg
);
} }
//If a form instance was provided (vue instance) //If a form instance was provided (vue instance)
//then put the error into it //then put the error into it
if (form) { if (vm) {
if (form.$gzdevmode()) { if (vm.$gzdevmode()) {
//make sure formState.appError is defined on data //make sure formState.appError is defined on data
if (!form.$_.has(form, "formState.appError")) { if (!vm.$_.has(vm, "formState.appError")) {
throw "DEV ERROR errorHandler::dealWithError -> formState.appError seems to be missing from form's vue data object"; throw "DEV ERROR errorHandler::dealWithError -> formState.appError seems to be missing from form's vue data object";
} }
} }
form.formState.appError = msg; vm.formState.appError = msg;
form.$gzform.setErrorBoxErrors(form); vm.$gzform.setErrorBoxErrors(vm);
} }
} }
export default { export default {
@@ -79,13 +83,13 @@ export default {
///////////////////////////////////////////////// /////////////////////////////////////////////////
// Localize, log and return error // Localize, log and return error
// //
handleFormError(err, form) { handleFormError(err, vm) {
//called inside forms when things go wrong //called inside forms when things go wrong
//returns the localized message in case the form wants to display it as well //returns the localized message in case the form wants to display it as well
if (err instanceof Error && err.message) { if (err instanceof Error && err.message) {
dealWithError(err.message, form); dealWithError(err.message, vm);
} else { } else {
dealWithError(err.toString(), form); dealWithError(err.toString(), vm);
} }
} }
}; };

View File

@@ -33,7 +33,7 @@ function devShowUnknownError(error) {
console.log(error); console.log(error);
gzevent.$emit( gzevent.$emit(
"popup-message", "notify-warning",
"DEV ERROR gzapi::devShowUnknownError - unexpected error during api operation see console " "DEV ERROR gzapi::devShowUnknownError - unexpected error during api operation see console "
); );
} }
@@ -55,7 +55,7 @@ function handleError(action, error, route, reject) {
// //
if (error.message && error.message.includes("NotAuthorized")) { if (error.message && error.message.includes("NotAuthorized")) {
store.commit("logItem", "Not authorized, redirecting to HOME"); store.commit("logItem", "Not authorized, redirecting to HOME");
gzevent.$emit("popup-message", gzlocale.get("ErrorUserNotAuthorized")); gzevent.$emit("notify-warning", gzlocale.get("ErrorUserNotAuthorized"));
router.push("/"); router.push("/");
return reject("[ErrorUserNotAuthorized]"); return reject("[ErrorUserNotAuthorized]");
} }
@@ -63,6 +63,7 @@ function handleError(action, error, route, reject) {
//Handle 401 not authenticated //Handle 401 not authenticated
if (error.message && error.message.includes("NotAuthenticated")) { if (error.message && error.message.includes("NotAuthenticated")) {
store.commit("logItem", "User is not authenticated, redirecting to LOGIN"); store.commit("logItem", "User is not authenticated, redirecting to LOGIN");
gzevent.$emit("notify-error", gzlocale.get("ErrorUserNotAuthenticated"));
auth.logout(); auth.logout();
router.push("/login"); router.push("/login");
return reject("[ErrorUserNotAuthenticated]"); return reject("[ErrorUserNotAuthenticated]");

View File

@@ -130,7 +130,8 @@ export default {
vm.$router.push({ name: item.data }); vm.$router.push({ name: item.data });
break; break;
default: default:
alert( vm.$gzevent.$emit(
"notify-warning",
"gzmenu:handleAppClick - unrecognized command [" + "gzmenu:handleAppClick - unrecognized command [" +
menuItem.key + menuItem.key +
"]" "]"
@@ -185,8 +186,52 @@ export default {
self.handleAppClick(vm, menuitem); self.handleAppClick(vm, menuitem);
}); });
vm.$gzevent.$on("popup-message", function handlePopupMessage(msg) { //Notifications: pops up and slowly disappears
alert(msg);
///////////
//ERROR
vm.$gzevent.$on("notify-error", function handleNotifyWarn(msg) {
vm.$dialog.notify.info(msg, {
position: "top-right",
icon: "fa-exclamation-triangle",
timeout: 8000
});
});
///////////
//WARNING
vm.$gzevent.$on("notify-warning", function handleNotifyWarn(msg) {
vm.$dialog.notify.warning(msg, {
position: "top-right",
icon: "fa-exclamation",
timeout: 7000
});
});
///////////
//INFO
vm.$gzevent.$on("notify-info", function handleNotifyWarn(msg) {
vm.$dialog.notify.info(msg, {
position: "top-right",
icon: "fa-info-circle",
timeout: 6000
});
});
///////////
//SUCCESS
vm.$gzevent.$on("notify-success", function handleNotifyWarn(msg) {
vm.$dialog.notify.success(msg, {
position: "top-right",
icon: "fa-check-circle ",
timeout: 5000
});
});
vm.$gzevent.$on("alert-user-toast", function handlePopupMessage(msg) {
this.$dialog.message.info(msg, {
position: "top-left"
});
}); });
} }
//new functions above here //new functions above here

View File

@@ -3,6 +3,7 @@ import store from "../store";
import roles from "./authorizationroles"; import roles from "./authorizationroles";
import locale from "./locale"; import locale from "./locale";
import api from "./gzapi"; import api from "./gzapi";
import gzevent from "./eventbus";
function addNavItem(title, icon, route) { function addNavItem(title, icon, route) {
store.commit("addNavItem", { store.commit("addNavItem", {
@@ -83,8 +84,13 @@ export default function initialize() {
.then(res => { .then(res => {
if (res.error) { if (res.error) {
//In a form this would trigger a bunch of validation or error display code but for here and now: //In a form this would trigger a bunch of validation or error display code but for here and now:
//convert error to human readable string for display //convert error to human readable string for display and popup a notification to user
alert(api.apiErrorToHumanString(res.error)); var msg = api.apiErrorToHumanString(res.error);
store.commit(
"logItem",
"Initialize::() fetch useroptions -> error" + msg
);
gzevent.$emit("notify-error", msg);
} else { } else {
//TODO: also need the other locale settings such as number and date formats etc //TODO: also need the other locale settings such as number and date formats etc
@@ -94,14 +100,18 @@ export default function initialize() {
} }
if (res.data.timeZoneOffset != localOffset) { if (res.data.timeZoneOffset != localOffset) {
//todo: timezone doesn't match, offer to fix it //TODO: localize message and also actually have a fix for it here
// alert( //so this should be a confirm prompt but for now will just show it
// "Time zone offset for this account is set to " +
// res.data.timeZoneOffset + //for now just show the message
// " which doesn't match the local timezone offset of " + gzevent.$emit(
// localOffset + "notify-info",
// "." "Time zone offset for this account is set to " +
// ); res.data.timeZoneOffset +
" which doesn't match the local timezone offset of " +
localOffset +
". You might want to adjust that under user settings"
);
} }
//Store offset in locale data //Store offset in locale data

View File

@@ -2,10 +2,17 @@
<v-container> <v-container>
<v-layout text-xs-center wrap> <v-layout text-xs-center wrap>
<v-flex xs12> <v-flex xs12>
<v-img :src="require('../assets/logo.svg')" class="my-3" contain height="200"></v-img> <v-img
:src="require('../assets/logo.svg')"
class="my-3"
contain
height="200"
></v-img>
</v-flex> </v-flex>
<v-flex mb-4 v-if="this.formReady"> <v-flex mb-4 v-if="this.formReady">
<h1 class="display-2 font-weight-bold mb-3">{{ this.$gzlocale.get("Welcome")}}</h1> <h1 class="display-2 font-weight-bold mb-3">
{{ this.$gzlocale.get("Welcome") }}
</h1>
</v-flex> </v-flex>
</v-layout> </v-layout>
</v-container> </v-container>
@@ -28,5 +35,4 @@ export default {
}; };
</script> </script>
<style> <style></style>
</style>

View File

@@ -12,7 +12,7 @@
v-bind:label="label" v-bind:label="label"
v-bind:rules="rules" v-bind:rules="rules"
readonly readonly
:error="!(!error)" :error="!!error"
></v-text-field> ></v-text-field>
</template> </template>
<v-date-picker v-model="dateOnly" @input="dlgdate = false"> <v-date-picker v-model="dateOnly" @input="dlgdate = false">
@@ -31,7 +31,7 @@
prepend-icon="fa-clock" prepend-icon="fa-clock"
@click:prepend="dlgtime = true" @click:prepend="dlgtime = true"
readonly readonly
:error="!(!error)" :error="!!error"
></v-text-field> ></v-text-field>
</template> </template>
<v-time-picker v-model="timeOnly"> <v-time-picker v-model="timeOnly">
@@ -48,7 +48,9 @@
prepend-icon="fa-calendar-alt" prepend-icon="fa-calendar-alt"
disabled disabled
></v-text-field> ></v-text-field>
<p v-show="error" class="form__error v-messages theme--light error--text">{{ error }}</p> <p v-show="error" class="form__error v-messages theme--light error--text">
{{ error }}
</p>
</div> </div>
</template> </template>
<script> <script>
@@ -144,7 +146,8 @@ export default {
}; };
</script> </script>
// <!-- //
<!--
// NOTE: this component was created based on a reddit query and answer below. // NOTE: this component was created based on a reddit query and answer below.
// Note also that the date and time coming in to this component are expected to be an ISO8601 format date and time string in UTC // Note also that the date and time coming in to this component are expected to be an ISO8601 format date and time string in UTC

View File

@@ -1,19 +1,20 @@
<template> <template>
<v-flex xs12 md4> <v-flex xs12 md4>
<v-card class="elevation-5 transparent"> <v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center"> <v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-heart</v-icon> <v-icon x-large color="secondary">fa-heart</v-icon>
</v-card-text> </v-card-text>
<v-card-title primary-title class="layout justify-center"> <v-card-title primary-title class="layout justify-center">
<div class="headline">Part assembly</div> <div class="headline">Part assembly</div>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt ornare. Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. ornare. Pellentesque habitant morbi tristique senectus et netus et
Nullam in aliquet odio. Aliquam eu est vitae tellus bibendum tincidunt. Suspendisse potenti. malesuada fames ac turpis egestas. Nullam in aliquet odio. Aliquam eu
</v-card-text> est vitae tellus bibendum tincidunt. Suspendisse potenti.
</v-card> </v-card-text>
</v-flex> </v-card>
</v-flex>
</template> </template>
<script> <script>
@@ -22,5 +23,4 @@ export default {
}; };
</script> </script>
<style> <style></style>
</style>

View File

@@ -1,19 +1,20 @@
<template> <template>
<v-flex xs12 md4> <v-flex xs12 md4>
<v-card class="elevation-5 transparent"> <v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center"> <v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-cannabis</v-icon> <v-icon x-large color="secondary">fa-cannabis</v-icon>
</v-card-text> </v-card-text>
<v-card-title primary-title class="layout justify-center"> <v-card-title primary-title class="layout justify-center">
<div class="headline">Parts</div> <div class="headline">Parts</div>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt ornare. Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. ornare. Pellentesque habitant morbi tristique senectus et netus et
Nullam in aliquet odio. Aliquam eu est vitae tellus bibendum tincidunt. Suspendisse potenti. malesuada fames ac turpis egestas. Nullam in aliquet odio. Aliquam eu
</v-card-text> est vitae tellus bibendum tincidunt. Suspendisse potenti.
</v-card> </v-card-text>
</v-flex> </v-card>
</v-flex>
</template> </template>
<script> <script>
@@ -22,5 +23,4 @@ export default {
}; };
</script> </script>
<style> <style></style>
</style>

View File

@@ -1,19 +1,20 @@
<template> <template>
<v-flex xs12 md4> <v-flex xs12 md4>
<v-card class="elevation-5 transparent"> <v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center"> <v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-crow</v-icon> <v-icon x-large color="secondary">fa-crow</v-icon>
</v-card-text> </v-card-text>
<v-card-title primary-title class="layout justify-center"> <v-card-title primary-title class="layout justify-center">
<div class="headline">Purchase orders</div> <div class="headline">Purchase orders</div>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt ornare. Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. ornare. Pellentesque habitant morbi tristique senectus et netus et
Nullam in aliquet odio. Aliquam eu est vitae tellus bibendum tincidunt. Suspendisse potenti. malesuada fames ac turpis egestas. Nullam in aliquet odio. Aliquam eu
</v-card-text> est vitae tellus bibendum tincidunt. Suspendisse potenti.
</v-card> </v-card-text>
</v-flex> </v-card>
</v-flex>
</template> </template>
<script> <script>
@@ -22,5 +23,4 @@ export default {
}; };
</script> </script>
<style> <style></style>
</style>

View File

@@ -1,19 +1,20 @@
<template> <template>
<v-flex xs12 md4> <v-flex xs12 md4>
<v-card class="elevation-5 transparent"> <v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center"> <v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-heart </v-icon> <v-icon x-large color="secondary">fa-heart </v-icon>
</v-card-text> </v-card-text>
<v-card-title primary-title class="layout justify-center"> <v-card-title primary-title class="layout justify-center">
<div class="headline">Warehouses</div> <div class="headline">Warehouses</div>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt ornare. Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. ornare. Pellentesque habitant morbi tristique senectus et netus et
Nullam in aliquet odio. Aliquam eu est vitae tellus bibendum tincidunt. Suspendisse potenti. malesuada fames ac turpis egestas. Nullam in aliquet odio. Aliquam eu
</v-card-text> est vitae tellus bibendum tincidunt. Suspendisse potenti.
</v-card> </v-card-text>
</v-flex> </v-card>
</v-flex>
</template> </template>
<script> <script>
@@ -22,5 +23,4 @@ export default {
}; };
</script> </script>
<style> <style></style>
</style>

View File

@@ -4,7 +4,9 @@
<v-toolbar flat> <v-toolbar flat>
<v-toolbar-title> <v-toolbar-title>
<v-icon large color="primary">fa-splotch</v-icon> <v-icon large color="primary">fa-splotch</v-icon>
<span class="hidden-sm-and-down">{{ this.$gzlocale.get("WidgetList")}}</span> <span class="hidden-sm-and-down">{{
this.$gzlocale.get("WidgetList")
}}</span>
</v-toolbar-title> </v-toolbar-title>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<v-btn icon @click="newItem()"> <v-btn icon @click="newItem()">
@@ -38,10 +40,12 @@
<td class="text-xs-left">{{ props.item.dollarAmount | currency }}</td> <td class="text-xs-left">{{ props.item.dollarAmount | currency }}</td>
<td class="text-xs-left">{{ props.item.active | boolastext }}</td> <td class="text-xs-left">{{ props.item.active | boolastext }}</td>
<td class="text-xs-left">{{ props.item.roles }}</td> <td class="text-xs-left">{{ props.item.roles }}</td>
<td class="text-xs-left">{{ props.item.startDate | shortdate}}</td> <td class="text-xs-left">{{ props.item.startDate | shortdate }}</td>
<td class="text-xs-left">{{ props.item.endDate | shortdate }}</td> <td class="text-xs-left">{{ props.item.endDate | shortdate }}</td>
<td class="justify-center layout px-0"> <td class="justify-center layout px-0">
<v-icon class="mr-3" @click="editItem(props.item)">fa-pencil-alt</v-icon> <v-icon class="mr-3" @click="editItem(props.item)"
>fa-pencil-alt</v-icon
>
</td> </td>
</template> </template>
</v-data-table> </v-data-table>
@@ -49,7 +53,6 @@
</v-flex> </v-flex>
</template> </template>
<script> <script>
/* xeslint-disable */ /* xeslint-disable */
export default { export default {
@@ -156,57 +159,29 @@ export default {
}; };
</script> </script>
//Example api response // { // "data": [ // { // "id": 1, // "concurrencyToken":
//Example api response 2262471, // "ownerId": 1, // "name": "Handcrafted Wooden Bacon 23", // "serial":
// { 1, // "dollarAmount": 25.42, // "active": true, // "roles": 8212, //
// "data": [ "startDate": "2018-11-19T12:20:42.920058", // "endDate":
// { "2018-11-19T15:37:47.053849", // "notes": "Voluptas assumenda laudantium nemo
// "id": 1, cupiditate. Quia voluptatem reiciendis et. Sit non error est. Tenetur provident
// "concurrencyToken": 2262471, nostrum. Voluptatem voluptatem et." // }, // { // "id": 2, //
// "ownerId": 1, "concurrencyToken": 2262494, // "ownerId": 1, // "name": "Ergonomic Soft Gloves
// "name": "Handcrafted Wooden Bacon 23", 24", // "serial": 2, // "dollarAmount": 530.39, // "active": true, // "roles":
// "serial": 1, 8212, // "startDate": "2018-11-19T12:17:32.488013", // "endDate":
// "dollarAmount": 25.42, "2018-11-19T17:01:18.425666", // "notes": "Sed rerum minima blanditiis est.
// "active": true, Praesentium consequatur numquam nostrum voluptatem libero dolores voluptatem et.
// "roles": 8212, Aut et nobis consectetur voluptatem minus. Ipsa nemo non in iste adipisci
// "startDate": "2018-11-19T12:20:42.920058", voluptatem. Minus consequatur in accusantium." // }, // { // "id": 3, //
// "endDate": "2018-11-19T15:37:47.053849", "concurrencyToken": 2262518, // "ownerId": 1, // "name": "Fantastic Metal
// "notes": "Voluptas assumenda laudantium nemo cupiditate. Quia voluptatem reiciendis et. Sit non error est. Tenetur provident nostrum. Voluptatem voluptatem et." Computer 25", // "serial": 3, // "dollarAmount": 494.3, // "active": true, //
// }, "roles": 8212, // "startDate": "2018-11-19T13:06:47.437006", // "endDate":
// { "2018-11-19T14:41:44.665721", // "notes": "Facere et ex. Ipsa aspernatur itaque
// "id": 2, maiores sint nulla esse incidunt. Architecto labore voluptatem dolore iusto ut."
// "concurrencyToken": 2262494, // } // ], // "paging": { // "count": 100, // "offset": 0, // "limit": 3, //
// "ownerId": 1, "first":
// "name": "Ergonomic Soft Gloves 24", "http://localhost:7575/api/v8.0/Widget/ListWidgets?pageNo=1&pageSize=3", //
// "serial": 2, "previous": null, // "next":
// "dollarAmount": 530.39, "http://localhost:7575/api/v8.0/Widget/ListWidgets?pageNo=1&pageSize=3", //
// "active": true, "last": "http://localhost:7575/api/v8.0/Widget/ListWidgets?pageNo=34&pageSize=3"
// "roles": 8212, // } // }
// "startDate": "2018-11-19T12:17:32.488013",
// "endDate": "2018-11-19T17:01:18.425666",
// "notes": "Sed rerum minima blanditiis est. Praesentium consequatur numquam nostrum voluptatem libero dolores voluptatem et. Aut et nobis consectetur voluptatem minus. Ipsa nemo non in iste adipisci voluptatem. Minus consequatur in accusantium."
// },
// {
// "id": 3,
// "concurrencyToken": 2262518,
// "ownerId": 1,
// "name": "Fantastic Metal Computer 25",
// "serial": 3,
// "dollarAmount": 494.3,
// "active": true,
// "roles": 8212,
// "startDate": "2018-11-19T13:06:47.437006",
// "endDate": "2018-11-19T14:41:44.665721",
// "notes": "Facere et ex. Ipsa aspernatur itaque maiores sint nulla esse incidunt. Architecto labore voluptatem dolore iusto ut."
// }
// ],
// "paging": {
// "count": 100,
// "offset": 0,
// "limit": 3,
// "first": "http://localhost:7575/api/v8.0/Widget/ListWidgets?pageNo=1&pageSize=3",
// "previous": null,
// "next": "http://localhost:7575/api/v8.0/Widget/ListWidgets?pageNo=1&pageSize=3",
// "last": "http://localhost:7575/api/v8.0/Widget/ListWidgets?pageNo=34&pageSize=3"
// }
// }

View File

@@ -13,88 +13,183 @@
</v-btn> </v-btn>
</v-toolbar>--> </v-toolbar>-->
<v-list two-line subheader> <v-list two-line subheader>
<v-subheader>{{ this.$gzlocale.get("ClientApp")}}</v-subheader> <v-subheader>{{ this.$gzlocale.get("ClientApp") }}</v-subheader>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("Version")}}</v-list-tile-title> <v-list-tile-title>
<v-list-tile-sub-title>{{ clientInfo.version }}</v-list-tile-sub-title> {{
this.$gzlocale.get("Version")
}}
</v-list-tile-title>
<v-list-tile-sub-title>
{{
clientInfo.version
}}
</v-list-tile-sub-title>
</v-list-tile-content> </v-list-tile-content>
</v-list-tile> </v-list-tile>
</v-list> </v-list>
<v-divider></v-divider> <v-divider></v-divider>
<v-list two-line subheader> <v-list two-line subheader>
<v-subheader>{{ this.$gzlocale.get("Server")}}</v-subheader> <v-subheader>{{ this.$gzlocale.get("Server") }}</v-subheader>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("ServerAddress")}}</v-list-tile-title> <v-list-tile-title>
<v-list-tile-sub-title>{{ this.$store.state.apiUrl }}</v-list-tile-sub-title> {{
this.$gzlocale.get("ServerAddress")
}}
</v-list-tile-title>
<v-list-tile-sub-title>
{{
this.$store.state.apiUrl
}}
</v-list-tile-sub-title>
</v-list-tile-content> </v-list-tile-content>
</v-list-tile> </v-list-tile>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("Version")}}</v-list-tile-title> <v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.serverVersion }}</v-list-tile-sub-title> {{
this.$gzlocale.get("Version")
}}
</v-list-tile-title>
<v-list-tile-sub-title>
{{
serverInfo.serverVersion
}}
</v-list-tile-sub-title>
</v-list-tile-content> </v-list-tile-content>
</v-list-tile> </v-list-tile>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("SchemaVersion")}}</v-list-tile-title> <v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.dbSchemaVersion }}</v-list-tile-sub-title> {{
this.$gzlocale.get("SchemaVersion")
}}
</v-list-tile-title>
<v-list-tile-sub-title>
{{
serverInfo.dbSchemaVersion
}}
</v-list-tile-sub-title>
</v-list-tile-content> </v-list-tile-content>
</v-list-tile> </v-list-tile>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("ServerTime")}}</v-list-tile-title> <v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.serverLocalTime }}</v-list-tile-sub-title> {{
this.$gzlocale.get("ServerTime")
}}
</v-list-tile-title>
<v-list-tile-sub-title>
{{
serverInfo.serverLocalTime
}}
</v-list-tile-sub-title>
</v-list-tile-content> </v-list-tile-content>
</v-list-tile> </v-list-tile>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("TimeZone")}}</v-list-tile-title> <v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.serverTimeZone }}</v-list-tile-sub-title> {{
this.$gzlocale.get("TimeZone")
}}
</v-list-tile-title>
<v-list-tile-sub-title>
{{
serverInfo.serverTimeZone
}}
</v-list-tile-sub-title>
</v-list-tile-content> </v-list-tile-content>
</v-list-tile> </v-list-tile>
</v-list> </v-list>
<v-divider></v-divider> <v-divider></v-divider>
<v-list two-line subheader> <v-list two-line subheader>
<v-subheader>{{ this.$gzlocale.get("HelpLicense")}}</v-subheader> <v-subheader>{{ this.$gzlocale.get("HelpLicense") }}</v-subheader>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("RegisteredUser")}}</v-list-tile-title> <v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.license.license.licensedTo }}</v-list-tile-sub-title> {{
this.$gzlocale.get("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-content>
</v-list-tile> </v-list-tile>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("DatabaseID")}}</v-list-tile-title> <v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.license.license.dbId }}</v-list-tile-sub-title> {{
this.$gzlocale.get("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-content>
</v-list-tile> </v-list-tile>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("LicenseSerial")}}</v-list-tile-title> <v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.license.license.keySerial }}</v-list-tile-sub-title> {{
this.$gzlocale.get("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-content>
</v-list-tile> </v-list-tile>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("LicenseExpiration")}}</v-list-tile-title> <v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.license.license.licenseExpiration }}</v-list-tile-sub-title> {{
this.$gzlocale.get("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-content>
</v-list-tile> </v-list-tile>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("SupportedUntil")}}</v-list-tile-title> <v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.license.license.maintenanceExpiration }}</v-list-tile-sub-title> {{
this.$gzlocale.get("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-content>
</v-list-tile> </v-list-tile>
<v-list-tile avatar> <v-list-tile avatar>
<v-list-tile-content> <v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("LicensedOptions")}}</v-list-tile-title> <v-list-tile-title>
{{
this.$gzlocale.get("LicensedOptions")
}}
</v-list-tile-title>
<v-list-tile-sub-title <v-list-tile-sub-title
v-for="item in serverInfo.license.license.features" v-for="item in serverInfo.license.license.features"
:key="item.Feature" :key="item.Feature"
>{{item.Feature}} {{item.Count ? item.Count : ""}}</v-list-tile-sub-title> >
{{ item.Feature }}
{{ item.Count ? item.Count : "" }}
</v-list-tile-sub-title>
</v-list-tile-content> </v-list-tile-content>
</v-list-tile> </v-list-tile>
</v-list> </v-list>
@@ -107,13 +202,6 @@
/* Xeslint-disable */ /* Xeslint-disable */
import aboutInfo from "../api/aboutinfo"; import aboutInfo from "../api/aboutinfo";
// function clickHandler(menuItem) {
// var item = this.$gzmenu.parseMenuItem(menuItem);
// if (item.owner == "about" && !item.disabled) {
// alert("about::context click: " + item.key);
// }
// }
export default { export default {
beforeCreate() { beforeCreate() {
this.$gzlocale.fetch([ this.$gzlocale.fetch([

View File

@@ -1,5 +1,5 @@
<template> <template>
<HelloWorld/> <HelloWorld />
</template> </template>
<script> <script>

View File

@@ -179,7 +179,10 @@ function clickHandler(menuItem) {
m.vm.duplicate(); m.vm.duplicate();
break; break;
default: default:
alert("inventory-widget-edit.vue::context click: [" + m.key + "]"); m.vm.$gzevent.$emit(
"notify-warning",
"inventory-widget-edit.vue::context click: [" + m.key + "]"
);
} }
} }
} }
@@ -433,54 +436,12 @@ export default {
}); });
}, },
duplicate() { duplicate() {
// this.$gzform.confirmDelete(this).then(res => {
// console.log(res);
// });
// this.$dialog.confirm({
// text: "Do you really want to exit?",
// title: "Warning"
// }).then(res => {
// console.log("The dialog result is:");
// console.log(res);
// });
//console.log(this.$gzform.confirm(this));
// this.$dialog.error({
// text: "Cannot delete this item",
// title: "Error"
// });
// console.log("Done dialog");
// this.$dialog.notify.info("Test notification", {
// position: "top-right",
// timeout: 5000
// });
// this.$dialog.message.info("Test", {
// position: "top-left"
// });
// this.$gzevent.$emit(
// "popup-message",
// "This is a test popup message\r\nDUPLICATE ALL THE THINGS!"
// );
//only if not dirty //only if not dirty
//check rights //check rights
//duplicate //duplicate
//navigate to new record //navigate to new record
alert("STUB: DUPLICATE"); throw "T$EST";
}, //alert("STUB: DUPLICATE");
stubTestClick() {
this.$gzevent.$emit("menu-replace-item", {
title: this.$gzlocale.get("Save"),
surface: true,
icon: "save",
color: "error",
disabled: true,
key: "inventory-widget-edit:save"
});
// alert("stub test click");
} }
} }
}; };

View File

@@ -3,11 +3,11 @@
<v-flex xs12> <v-flex xs12>
<v-container grid-list-xl> <v-container grid-list-xl>
<v-layout row wrap align-top> <v-layout row wrap align-top>
<WidgetList/> <WidgetList />
<WarehouseTop/> <WarehouseTop />
<POTop/> <POTop />
<PartTop/> <PartTop />
<PartAssemblyTop/> <PartAssemblyTop />
<v-flex xs12 md4> <v-flex xs12 md4>
<v-card class="elevation-0 transparent"> <v-card class="elevation-0 transparent">
<v-card-text class="text-xs-center"> <v-card-text class="text-xs-center">
@@ -17,9 +17,11 @@
<div class="headline text-xs-center">Material Design</div> <div class="headline text-xs-center">Material Design</div>
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat tincidunt ornare. Cras facilisis mi vitae nunc lobortis pharetra. Nulla volutpat
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. tincidunt ornare. Pellentesque habitant morbi tristique senectus
Nullam in aliquet odio. Aliquam eu est vitae tellus bibendum tincidunt. Suspendisse potenti. 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-text>
</v-card> </v-card>
</v-flex> </v-flex>

View File

@@ -1,7 +1,7 @@
<template> <template>
<v-layout row v-if="this.formReady"> <v-layout row v-if="this.formReady">
<v-flex> <v-flex>
<h1>{{ this.$gzlocale.get("Log")}}</h1> <h1>{{ this.$gzlocale.get("Log") }}</h1>
<v-textarea v-model="logText" full-width readonly auto-grow></v-textarea> <v-textarea v-model="logText" full-width readonly auto-grow></v-textarea>
</v-flex> </v-flex>
</v-layout> </v-layout>

View File

@@ -2,7 +2,12 @@
<v-container fluid> <v-container fluid>
<v-layout row wrap> <v-layout row wrap>
<v-flex xs12 class="hidden-sm-and-down text-xs-center" mt-5 ml-5 pl-5> <v-flex xs12 class="hidden-sm-and-down 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-img
:src="require('../assets/logo.svg')"
class="my-3"
contain
height="200"
></v-img>
</v-flex> </v-flex>
<v-flex xs12 class="hidden-md-and-up text-xs-center"> <v-flex xs12 class="hidden-md-and-up text-xs-center">
<v-img :src="require('../assets/logo.svg')" contain height="64"></v-img> <v-img :src="require('../assets/logo.svg')" contain height="64"></v-img>