This commit is contained in:
5
app/ayanova/package-lock.json
generated
5
app/ayanova/package-lock.json
generated
@@ -4726,6 +4726,11 @@
|
|||||||
"integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
|
"integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"dayjs": {
|
||||||
|
"version": "1.7.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.7.7.tgz",
|
||||||
|
"integrity": "sha512-Qlkiu0NNDpYwhk0syK4ImvAl/5YnsEMkvC2O123INviGeOA3Q8s5VyVkZzmN5SC7Wv9bb1+rfwO+uSqtHB4UWw=="
|
||||||
|
},
|
||||||
"de-indent": {
|
"de-indent": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/polyfill": "^7.0.0-rc.1",
|
"@babel/polyfill": "^7.0.0-rc.1",
|
||||||
|
"dayjs": "^1.7.7",
|
||||||
"jwt-decode": "^2.2.0",
|
"jwt-decode": "^2.2.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"register-service-worker": "^1.0.0",
|
"register-service-worker": "^1.0.0",
|
||||||
|
|||||||
@@ -32,13 +32,13 @@
|
|||||||
class="elevation-1"
|
class="elevation-1"
|
||||||
>
|
>
|
||||||
<template slot="items" slot-scope="props">
|
<template slot="items" slot-scope="props">
|
||||||
<td class="text-xs-left">{{ props.item.name }}</td>
|
<td class="text-xs-left">{{ props.item.name | capitalize }}</td>
|
||||||
<td class="text-xs-left">{{ props.item.serial }}</td>
|
<td class="text-xs-left">{{ props.item.serial }}</td>
|
||||||
<td class="text-xs-left">{{ props.item.dollarAmount }}</td>
|
<td class="text-xs-left">{{ props.item.dollarAmount | currency }}</td>
|
||||||
<td class="text-xs-left">{{ props.item.active }}</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 }}</td>
|
<td class="text-xs-left">{{ props.item.startDate | shortdate}}</td>
|
||||||
<td class="text-xs-left">{{ props.item.endDate }}</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 small class="mr-3" @click="editItem(props.item)">fa-pencil-alt</v-icon>
|
<v-icon small class="mr-3" @click="editItem(props.item)">fa-pencil-alt</v-icon>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -10,36 +10,13 @@ import "./registerServiceWorker";
|
|||||||
import errorHandler from "./utils/errorhandler";
|
import errorHandler from "./utils/errorhandler";
|
||||||
import NProgress from "nprogress";
|
import NProgress from "nprogress";
|
||||||
import "nprogress/nprogress.css";
|
import "nprogress/nprogress.css";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
Vue.config.errorHandler = errorHandler.handleVueError;
|
Vue.config.errorHandler = errorHandler.handleVueError;
|
||||||
window.onerror = errorHandler.handleGeneralError;
|
window.onerror = errorHandler.handleGeneralError;
|
||||||
|
|
||||||
//Loading indicator on route change, probably don't need this
|
|
||||||
//but do need one for ajax calls
|
|
||||||
|
|
||||||
// router.beforeResolve((to, from, next) => {
|
|
||||||
// // If this isn't an initial page load.
|
|
||||||
// from;
|
|
||||||
// if (to.name) {
|
|
||||||
// // Start the route progress bar.
|
|
||||||
// //NProgress.start()
|
|
||||||
// // eslint-disable-next-line
|
|
||||||
// console.log("---===LOADING===---");
|
|
||||||
// }
|
|
||||||
// next();
|
|
||||||
// });
|
|
||||||
|
|
||||||
// router.afterEach((to, from) => {
|
|
||||||
// // Complete the animation of the route progress bar.
|
|
||||||
// //NProgress.done()
|
|
||||||
// to;
|
|
||||||
// from;
|
|
||||||
// // eslint-disable-next-line
|
|
||||||
// console.log("---===FINISHED LOADING===---");
|
|
||||||
// });
|
|
||||||
|
|
||||||
// Store a copy of the fetch function
|
// Store a copy of the fetch function
|
||||||
var _oldFetch = fetch;
|
var _oldFetch = fetch;
|
||||||
|
|
||||||
@@ -88,6 +65,31 @@ document.addEventListener("fetchEnd", function() {
|
|||||||
NProgress.done();
|
NProgress.done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//TODO: Will need currency symbol, date format from user settings at server
|
||||||
|
//rather than try to use local browser settings which is fraught with peril will need to be specified at server itself
|
||||||
|
|
||||||
|
Vue.filter("capitalize", function(value) {
|
||||||
|
if (!value) return "";
|
||||||
|
value = value.toString();
|
||||||
|
return value.charAt(0).toUpperCase() + value.slice(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
Vue.filter("shortdate", function(value) {
|
||||||
|
if (!value) return "";
|
||||||
|
var dj = dayjs(value);
|
||||||
|
return dj.format("YYYY-MM-DD hh:mm:ss A");
|
||||||
|
});
|
||||||
|
|
||||||
|
Vue.filter("currency", function(value) {
|
||||||
|
if (!value) return "";
|
||||||
|
return "$" + value;
|
||||||
|
});
|
||||||
|
|
||||||
|
Vue.filter("boolastext", function(value) {
|
||||||
|
if (!value) return "";
|
||||||
|
return value ? "Yes" : "Nope";
|
||||||
|
});
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
router,
|
router,
|
||||||
store,
|
store,
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ INITIAL TESTING NOTES:
|
|||||||
- Need a test user that has access to every possible role so that I can see all the roles for testing purposes
|
- Need a test user that has access to every possible role so that I can see all the roles for testing purposes
|
||||||
- About page has too big of margins on each side of display
|
- About page has too big of margins on each side of display
|
||||||
- numeric inputs need to be set as such so that the number keyboard appears
|
- numeric inputs need to be set as such so that the number keyboard appears
|
||||||
|
- TODO: Will need currency symbol, date format, numeric format from user settings at server
|
||||||
|
- rather than try to use local browser settings which is fraught with peril will need to be specified at server itself
|
||||||
|
- Wherever I am currently storing time zone that's where these other settings need to be
|
||||||
|
|
||||||
|
|
||||||
- Make the copyright banner at bottom left aligned, right now it seems weird in small iPhone size when it breaks to two lines (make text smaller?)
|
- Make the copyright banner at bottom left aligned, right now it seems weird in small iPhone size when it breaks to two lines (make text smaller?)
|
||||||
|
|||||||
@@ -89,6 +89,10 @@ VUEX STATE PERSISTENCE = VUEX-PERSISTEDSTATE
|
|||||||
- Many things need to be persisted and survive a refresh so this is how it will be done
|
- Many things need to be persisted and survive a refresh so this is how it will be done
|
||||||
|
|
||||||
|
|
||||||
|
DATE PARSE AND FORMAT = DayJS
|
||||||
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
|
- https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md
|
||||||
|
|
||||||
SERVICEWORKER = WORKBOX
|
SERVICEWORKER = WORKBOX
|
||||||
=-=-=-=-=-=-=-=-=-=-=-=
|
=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
For offsite PWA use, works well and is simple to implement
|
For offsite PWA use, works well and is simple to implement
|
||||||
|
|||||||
Reference in New Issue
Block a user