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 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
- Wire up delete menu item
- api code is stubbed out for delete, need to write that as well
- Need prompt, are you sure??
- DONE Wire up delete menu item
- DONE api code is stubbed out for delete, need to write that as well
- DONE Need prompt, are you sure??
- 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
@@ -95,9 +95,11 @@ All platforms and browsers
End to end action
TODO: - Code for new record to the server
- Need a path to making a new record
TODO: NEW WIDGET
- 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
- 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?
@@ -116,6 +118,7 @@ TODO: About AyaNova form should show the exact client browser and device info as
- Generates an 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: //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: 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)

View File

@@ -7,7 +7,8 @@
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"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": {
"@babel/polyfill": "^7.4.4",

View File

@@ -2,7 +2,11 @@
<v-app>
<v-navigation-drawer v-if="isAuthenticated" fixed v-model="drawer" app>
<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-icon>{{ "fa-" + item.icon }}</v-icon>
</v-list-tile-action>
@@ -12,24 +16,33 @@
</v-list-tile>
</v-list>
</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-title style="width: 300px" class="ml-0 pl-3">
<v-icon>{{ appBar.icon }}</v-icon>&nbsp;
<span>{{ appBar.title}}</span>
<v-icon>{{ appBar.icon }}</v-icon
>&nbsp;
<span>{{ appBar.title }}</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-toolbar-items>
<template v-for="(item) in appBar.menuItems">
<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="$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>
</template>
<v-spacer></v-spacer>
@@ -40,18 +53,28 @@
</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>
<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-tile
v-else
:key="item.key"
: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-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-content>
<v-list-tile-title>
@@ -76,7 +99,9 @@
<v-flex primary py-2 text-xs-center white--text xs12>
<div>
<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>
</div>
</v-flex>

View File

@@ -1,14 +1,14 @@
/* Xeslint-disable */
import store from "../store";
import locale from "./locale";
import gzevent from "./eventbus";
var devModeShowErrors = false;
////////////////////////////////////////////////////////
//
// Localize, Log and optionally display errors
// return localized message in case caller needs it
function dealWithError(msg, form) {
function dealWithError(msg, vm) {
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
//so it's not as wierd looking to the user
@@ -17,20 +17,24 @@ function dealWithError(msg, form) {
}
store.commit("logItem", msg);
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)
//then put the error into it
if (form) {
if (form.$gzdevmode()) {
if (vm) {
if (vm.$gzdevmode()) {
//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";
}
}
form.formState.appError = msg;
form.$gzform.setErrorBoxErrors(form);
vm.formState.appError = msg;
vm.$gzform.setErrorBoxErrors(vm);
}
}
export default {
@@ -79,13 +83,13 @@ export default {
/////////////////////////////////////////////////
// Localize, log and return error
//
handleFormError(err, form) {
handleFormError(err, vm) {
//called inside forms when things go wrong
//returns the localized message in case the form wants to display it as well
if (err instanceof Error && err.message) {
dealWithError(err.message, form);
dealWithError(err.message, vm);
} else {
dealWithError(err.toString(), form);
dealWithError(err.toString(), vm);
}
}
};

View File

@@ -33,7 +33,7 @@ function devShowUnknownError(error) {
console.log(error);
gzevent.$emit(
"popup-message",
"notify-warning",
"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")) {
store.commit("logItem", "Not authorized, redirecting to HOME");
gzevent.$emit("popup-message", gzlocale.get("ErrorUserNotAuthorized"));
gzevent.$emit("notify-warning", gzlocale.get("ErrorUserNotAuthorized"));
router.push("/");
return reject("[ErrorUserNotAuthorized]");
}
@@ -63,6 +63,7 @@ function handleError(action, error, route, reject) {
//Handle 401 not authenticated
if (error.message && error.message.includes("NotAuthenticated")) {
store.commit("logItem", "User is not authenticated, redirecting to LOGIN");
gzevent.$emit("notify-error", gzlocale.get("ErrorUserNotAuthenticated"));
auth.logout();
router.push("/login");
return reject("[ErrorUserNotAuthenticated]");

View File

@@ -130,7 +130,8 @@ export default {
vm.$router.push({ name: item.data });
break;
default:
alert(
vm.$gzevent.$emit(
"notify-warning",
"gzmenu:handleAppClick - unrecognized command [" +
menuItem.key +
"]"
@@ -185,8 +186,52 @@ export default {
self.handleAppClick(vm, menuitem);
});
vm.$gzevent.$on("popup-message", function handlePopupMessage(msg) {
alert(msg);
//Notifications: pops up and slowly disappears
///////////
//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

View File

@@ -3,6 +3,7 @@ import store from "../store";
import roles from "./authorizationroles";
import locale from "./locale";
import api from "./gzapi";
import gzevent from "./eventbus";
function addNavItem(title, icon, route) {
store.commit("addNavItem", {
@@ -83,8 +84,13 @@ export default function initialize() {
.then(res => {
if (res.error) {
//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
alert(api.apiErrorToHumanString(res.error));
//convert error to human readable string for display and popup a notification to user
var msg = api.apiErrorToHumanString(res.error);
store.commit(
"logItem",
"Initialize::() fetch useroptions -> error" + msg
);
gzevent.$emit("notify-error", msg);
} else {
//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) {
//todo: timezone doesn't match, offer to fix it
// alert(
// "Time zone offset for this account is set to " +
// res.data.timeZoneOffset +
// " which doesn't match the local timezone offset of " +
// 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
gzevent.$emit(
"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

View File

@@ -2,10 +2,17 @@
<v-container>
<v-layout text-xs-center wrap>
<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 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-layout>
</v-container>
@@ -28,5 +35,4 @@ export default {
};
</script>
<style>
</style>
<style></style>

View File

@@ -12,7 +12,7 @@
v-bind:label="label"
v-bind:rules="rules"
readonly
:error="!(!error)"
:error="!!error"
></v-text-field>
</template>
<v-date-picker v-model="dateOnly" @input="dlgdate = false">
@@ -31,7 +31,7 @@
prepend-icon="fa-clock"
@click:prepend="dlgtime = true"
readonly
:error="!(!error)"
:error="!!error"
></v-text-field>
</template>
<v-time-picker v-model="timeOnly">
@@ -48,9 +48,11 @@
prepend-icon="fa-calendar-alt"
disabled
></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>
</template>
</template>
<script>
/* xxeslint-disable */
export default {
@@ -144,7 +146,8 @@ export default {
};
</script>
// <!--
//
<!--
// 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

View File

@@ -1,19 +1,20 @@
<template>
<v-flex xs12 md4>
<v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-heart</v-icon>
</v-card-text>
<v-card-title primary-title class="layout justify-center">
<div class="headline">Part assembly</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-flex xs12 md4>
<v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-heart</v-icon>
</v-card-text>
<v-card-title primary-title class="layout justify-center">
<div class="headline">Part assembly</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>
</template>
<script>
@@ -22,5 +23,4 @@ export default {
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,19 +1,20 @@
<template>
<v-flex xs12 md4>
<v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-cannabis</v-icon>
</v-card-text>
<v-card-title primary-title class="layout justify-center">
<div class="headline">Parts</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-flex xs12 md4>
<v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-cannabis</v-icon>
</v-card-text>
<v-card-title primary-title class="layout justify-center">
<div class="headline">Parts</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>
</template>
<script>
@@ -22,5 +23,4 @@ export default {
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,19 +1,20 @@
<template>
<v-flex xs12 md4>
<v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-crow</v-icon>
</v-card-text>
<v-card-title primary-title class="layout justify-center">
<div class="headline">Purchase orders</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-flex xs12 md4>
<v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-crow</v-icon>
</v-card-text>
<v-card-title primary-title class="layout justify-center">
<div class="headline">Purchase orders</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>
</template>
<script>
@@ -22,5 +23,4 @@ export default {
};
</script>
<style>
</style>
<style></style>

View File

@@ -1,19 +1,20 @@
<template>
<v-flex xs12 md4>
<v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-heart </v-icon>
</v-card-text>
<v-card-title primary-title class="layout justify-center">
<div class="headline">Warehouses</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-flex xs12 md4>
<v-card class="elevation-5 transparent">
<v-card-text class="text-xs-center">
<v-icon x-large color="secondary">fa-heart </v-icon>
</v-card-text>
<v-card-title primary-title class="layout justify-center">
<div class="headline">Warehouses</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>
</template>
<script>
@@ -22,5 +23,4 @@ export default {
};
</script>
<style>
</style>
<style></style>

View File

@@ -4,7 +4,9 @@
<v-toolbar flat>
<v-toolbar-title>
<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-spacer></v-spacer>
<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.active | boolastext }}</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="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>
</template>
</v-data-table>
@@ -49,7 +53,6 @@
</v-flex>
</template>
<script>
/* xeslint-disable */
export default {
@@ -156,57 +159,29 @@ export default {
};
</script>
//Example api response
// {
// "data": [
// {
// "id": 1,
// "concurrencyToken": 2262471,
// "ownerId": 1,
// "name": "Handcrafted Wooden Bacon 23",
// "serial": 1,
// "dollarAmount": 25.42,
// "active": true,
// "roles": 8212,
// "startDate": "2018-11-19T12:20:42.920058",
// "endDate": "2018-11-19T15:37:47.053849",
// "notes": "Voluptas assumenda laudantium nemo cupiditate. Quia voluptatem reiciendis et. Sit non error est. Tenetur provident nostrum. Voluptatem voluptatem et."
// },
// {
// "id": 2,
// "concurrencyToken": 2262494,
// "ownerId": 1,
// "name": "Ergonomic Soft Gloves 24",
// "serial": 2,
// "dollarAmount": 530.39,
// "active": true,
// "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"
// }
// }
//Example api response // { // "data": [ // { // "id": 1, // "concurrencyToken":
2262471, // "ownerId": 1, // "name": "Handcrafted Wooden Bacon 23", // "serial":
1, // "dollarAmount": 25.42, // "active": true, // "roles": 8212, //
"startDate": "2018-11-19T12:20:42.920058", // "endDate":
"2018-11-19T15:37:47.053849", // "notes": "Voluptas assumenda laudantium nemo
cupiditate. Quia voluptatem reiciendis et. Sit non error est. Tenetur provident
nostrum. Voluptatem voluptatem et." // }, // { // "id": 2, //
"concurrencyToken": 2262494, // "ownerId": 1, // "name": "Ergonomic Soft Gloves
24", // "serial": 2, // "dollarAmount": 530.39, // "active": true, // "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-toolbar>-->
<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-content>
<v-list-tile-title>{{ this.$gzlocale.get("Version")}}</v-list-tile-title>
<v-list-tile-sub-title>{{ clientInfo.version }}</v-list-tile-sub-title>
<v-list-tile-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>
</v-list>
<v-divider></v-divider>
<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-content>
<v-list-tile-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-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>
<v-list-tile avatar>
<v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("Version")}}</v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.serverVersion }}</v-list-tile-sub-title>
<v-list-tile-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>
<v-list-tile avatar>
<v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("SchemaVersion")}}</v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.dbSchemaVersion }}</v-list-tile-sub-title>
<v-list-tile-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>
<v-list-tile avatar>
<v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("ServerTime")}}</v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.serverLocalTime }}</v-list-tile-sub-title>
<v-list-tile-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>
<v-list-tile avatar>
<v-list-tile-content>
<v-list-tile-title>{{ this.$gzlocale.get("TimeZone")}}</v-list-tile-title>
<v-list-tile-sub-title>{{ serverInfo.serverTimeZone }}</v-list-tile-sub-title>
<v-list-tile-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>
</v-list>
<v-divider></v-divider>
<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-content>
<v-list-tile-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-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>
<v-list-tile avatar>
<v-list-tile-content>
<v-list-tile-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-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>
<v-list-tile avatar>
<v-list-tile-content>
<v-list-tile-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-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>
<v-list-tile avatar>
<v-list-tile-content>
<v-list-tile-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-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>
<v-list-tile avatar>
<v-list-tile-content>
<v-list-tile-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-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>
<v-list-tile avatar>
<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-for="item in serverInfo.license.license.features"
: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>
</v-list>
@@ -107,13 +202,6 @@
/* Xeslint-disable */
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 {
beforeCreate() {
this.$gzlocale.fetch([

View File

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

View File

@@ -179,7 +179,10 @@ function clickHandler(menuItem) {
m.vm.duplicate();
break;
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() {
// 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
//check rights
//duplicate
//navigate to new record
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");
throw "T$EST";
//alert("STUB: DUPLICATE");
}
}
};

View File

@@ -3,11 +3,11 @@
<v-flex xs12>
<v-container grid-list-xl>
<v-layout row wrap align-top>
<WidgetList/>
<WarehouseTop/>
<POTop/>
<PartTop/>
<PartAssemblyTop/>
<WidgetList />
<WarehouseTop />
<POTop />
<PartTop />
<PartAssemblyTop />
<v-flex xs12 md4>
<v-card class="elevation-0 transparent">
<v-card-text class="text-xs-center">
@@ -17,9 +17,11 @@
<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.
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>

View File

@@ -1,7 +1,7 @@
<template>
<v-layout row v-if="this.formReady">
<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-flex>
</v-layout>

View File

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