This commit is contained in:
2019-02-20 20:34:02 +00:00
parent 38990fa56f
commit ff305a9b98
8 changed files with 111 additions and 21 deletions

View File

@@ -14,10 +14,18 @@ TODO CLIENT STUFF
TODO NEXT
Choose a validation library (or none at all)
consider the workorder when doing that as it's the most complex to validate
Make a basic crud form with all the fields necessary, then iterate over it adding the items below.
- CRUD form for widget:
- CRUD form for widget:
- Needs to be a main form that is opened via route and parameter so that any part of AyaNova can just navigate to that page and it can be bookmarked.
- Not suitable for a popup form
- This means the list needs to remember where it was at when navigating back to it
Everything needs to work in this form right down to the reports so that once it's done I can move forward confidentally with testing, demo-ing and with cranking out the other forms
@@ -38,7 +46,11 @@ TODO CLIENT STUFF
- broken rule display
- Error reporting overall properly implemented
- ensure error messages that come back from API that start with LT: will be localized correctly before display / logging (may need string interpolation too for some in future, consider that)
- Dirty check and warning if navigate away.
- Validation / validation rules
- Vee validate and vuedelate both work tightly with vuetify and v-form
- Vee-validate can be localized
- https://baianat.github.io/vee-validate/guide/rules.html#after
- Dirty check and warning if navigate away.
- Dirty form check and prevent route leave: https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards
- Menu with common options
- File attachments set and get
@@ -51,7 +63,7 @@ TODO CLIENT STUFF
- UI:GENERAL:LAYOUT: - All layout, not just workorder needs to be modular and optional sections with simple starting view.
- Calendar form using new vuetify calendar control
- MISC
- Search area seems to take up too much space

View File

@@ -1917,24 +1917,24 @@
}
},
"@vue/cli-plugin-unit-jest": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/@vue/cli-plugin-unit-jest/-/cli-plugin-unit-jest-3.4.0.tgz",
"integrity": "sha512-F1FzKG2JQmVPXH5OKFN4htBkGERDj5Kxd47Wmts2H0rhmtHR4a+k0X7+WyCzbb1aSRKNYdG4f2eSwyu6tSq28A==",
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/@vue/cli-plugin-unit-jest/-/cli-plugin-unit-jest-3.4.1.tgz",
"integrity": "sha512-jrSppcswfMV59zZrZCjpXb9Zdm+cKSl1exZ4vH9/zXVu9G4Q2Qo0wo9YcuROBLLFQORdsDlZpTvhjkQ/E4DZ4A==",
"dev": true,
"requires": {
"@vue/cli-shared-utils": "^3.4.0",
"@vue/cli-shared-utils": "^3.4.1",
"babel-jest": "^23.6.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"jest": "^23.6.0",
"jest-serializer-vue": "^2.0.2",
"jest-transform-stub": "^1.0.0",
"vue-jest": "^3.0.2"
"jest-transform-stub": "^2.0.0",
"vue-jest": "^3.0.3"
},
"dependencies": {
"@vue/cli-shared-utils": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-3.4.0.tgz",
"integrity": "sha512-w9j2qIroUUC2ym4Lb0lLMdlGmYThhwV0OizOEVigB5eZOEUEBV2Mv43K+nWJ6OyRBACnvhJTDi1gIwJo8zUvOw==",
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-3.4.1.tgz",
"integrity": "sha512-IbAQP1J48+q1ChjcHGnE06SdcCEeO77BERcPapjqZl3qJ6aPnq7z8VrNrZxo6oOnBJm7elGOvz4kJ6hirK9aPA==",
"dev": true,
"requires": {
"chalk": "^2.4.1",
@@ -10128,9 +10128,9 @@
}
},
"jest-transform-stub": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/jest-transform-stub/-/jest-transform-stub-1.0.0.tgz",
"integrity": "sha512-7eilMk4sxi2Fiy223I+BYTS5wJQEGEBqR3D8dy5A6RWmMTnmjipw2ImGDfXzEUBieebyrnitzkJfpNOJSFklLQ==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/jest-transform-stub/-/jest-transform-stub-2.0.0.tgz",
"integrity": "sha512-lspHaCRx/mBbnm3h4uMMS3R5aZzMwyNpNIJLXj4cEsV0mIUtS4IjYJLSoyjRCtnxb6RIGJ4NL2quZzfIeNhbkg==",
"dev": true
},
"jest-util": {
@@ -15920,6 +15920,11 @@
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
"dev": true
},
"vee-validate": {
"version": "2.1.7",
"resolved": "https://registry.npmjs.org/vee-validate/-/vee-validate-2.1.7.tgz",
"integrity": "sha512-IyPDTTvIRY6o9y14jXlgfY76Qv+hmvYDwNaMn9JY5KbQN8a1tJAu7H/+a/+EdHg1w8Zl9tsdG8lndGqY1lyMzQ=="
},
"vendors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz",

View File

@@ -16,6 +16,7 @@
"nprogress": "^0.2.0",
"register-service-worker": "^1.6.2",
"typeface-roboto": "0.0.54",
"vee-validate": "^2.1.7",
"vue": "^2.6.6",
"vue-router": "^3.0.2",
"vuetify": "^1.5.2",
@@ -29,7 +30,7 @@
"@vue/cli-plugin-e2e-cypress": "^3.2.3",
"@vue/cli-plugin-eslint": "^3.2.2",
"@vue/cli-plugin-pwa": "^3.2.2",
"@vue/cli-plugin-unit-jest": "^3.4.0",
"@vue/cli-plugin-unit-jest": "^3.4.1",
"@vue/cli-service": "^3.2.3",
"@vue/eslint-config-prettier": "^4.0.1",
"@vue/test-utils": "^1.0.0-beta.29",

View File

@@ -100,7 +100,7 @@ export default {
//construct the api url and store it
//development location?
if (
window.location.hostname == "localhost" &&
(window.location.hostname == "localhost" || window.location.hostname == "192.168.1.56" ) &&
window.location.port == "8080"
) {
store.commit("setAPIURL", "http://localhost:7575/api/v8.0/");

View File

@@ -10,7 +10,7 @@
<v-container grid-list-md>
<v-layout wrap>
<v-flex xs12 sm6 md4>
<v-text-field label="Legal first name*" required></v-text-field>
<v-text-field label="ZZZZZLegal first name*" required></v-text-field>
</v-flex>
<v-flex xs12 sm6 md4>
<v-text-field label="Legal middle name" hint="example of helper text only on focus"></v-text-field>
@@ -54,6 +54,7 @@
</template>
<script>
/* eslint-disable */
export default {
/* Check rights to edit or view here?
e.g.
@@ -68,8 +69,34 @@ export default {
showeditdialog: false,
recordId: 0
}
}, mounted() {
/* Check rights here?
e.g.
if (
roles.hasRole(roles.AuthorizationRoles.OpsAdminFull) ||
roles.hasRole(roles.AuthorizationRoles.OpsAdminLimited)
) {
addNavItem(lt.get("Operations"), "cogs", "ops");
}
*/
console.log("MOUNTED");
},
data: () => ({})
data: () => ({}),
beforeRouteEnter(to, from, next) {
console.log("BEFOREROUTENTER");
debugger;
if (
false
// roles.hasRole(roles.AuthorizationRoles.OpsAdminFull) ||
// roles.hasRole(roles.AuthorizationRoles.OpsAdminLimited)
) {
debugger;
next();
} else {
debugger;
next(false);
}
}
};
</script>

View File

@@ -52,7 +52,7 @@
<script>
/* eslint-disable */
/* Xeslint-disable */
import localeText from "../api/locale";
import api from "../api/apiutil";
import WidgetEdit from "../components/inventorywidgetedit";
@@ -127,7 +127,7 @@ export default {
addNavItem(lt.get("Operations"), "cogs", "ops");
}
*/
this.rowsPerPageText = this.lt("RowsPerPage");
this.rowsPerPageText = this.lt("RowsPerPage");
},
computed: {},
methods: {

View File

@@ -12,6 +12,12 @@ import NProgress from "nprogress";
import "nprogress/nprogress.css";
import dayjs from "dayjs";
/////////////////////////////////////////////////////////////////
// FORM VALIDATION
//
import VeeValidate from "vee-validate";
Vue.use(VeeValidate);
Vue.config.productionTip = false;
/////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,39 @@
<template>
<v-layout column wrap class="my-5" align-center>
<v-flex xs12>
<v-container grid-list-xl>
<v-layout row wrap align-top></v-layout>
</v-container>
</v-flex>
</v-layout>
</template>
<script>
/* Xeslint-disable */
//import store from "../store";
import lt from "../api/locale";
//import _ from "../utils/libs/lodash.js";
export default {
components: {},
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>