This commit is contained in:
@@ -57,7 +57,7 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
export default {
|
export default {
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
|
//debugger;
|
||||||
//check pre-requisites exist just in case
|
//check pre-requisites exist just in case
|
||||||
if (this.$gzdevmode()) {
|
if (this.$gzdevmode()) {
|
||||||
if (!this.$dayjs) {
|
if (!this.$dayjs) {
|
||||||
@@ -107,7 +107,6 @@ export default {
|
|||||||
: "";
|
: "";
|
||||||
},
|
},
|
||||||
formatDate() {
|
formatDate() {
|
||||||
|
|
||||||
return this.value
|
return this.value
|
||||||
? this.$dayjs
|
? this.$dayjs
|
||||||
.utc(this.value)
|
.utc(this.value)
|
||||||
@@ -124,15 +123,24 @@ export default {
|
|||||||
: "";
|
: "";
|
||||||
},
|
},
|
||||||
dateOnly: {
|
dateOnly: {
|
||||||
|
|
||||||
get() {
|
get() {
|
||||||
|
//debugger;
|
||||||
return this.$dayjs
|
var defaultDateString = this.$dayjs()
|
||||||
.utc(this.value)
|
.utc()
|
||||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||||
.format("YYYY-MM-DD");
|
.format("YYYY-MM-DD");
|
||||||
|
|
||||||
|
return this.value
|
||||||
|
? this.$dayjs
|
||||||
|
.utc(this.value)
|
||||||
|
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||||
|
.format("YYYY-MM-DD")
|
||||||
|
: defaultDateString;
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
|
//debugger;
|
||||||
|
//TODO: This needs to handle a null / empty this.timeOnly here by maybe defaulting to right now
|
||||||
|
|
||||||
this.date = this.$dayjs
|
this.date = this.$dayjs
|
||||||
.utc(value + " " + this.timeOnly)
|
.utc(value + " " + this.timeOnly)
|
||||||
.subtract(this.$gzlocale.format().timeZoneOffset, "hour")
|
.subtract(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||||
@@ -141,12 +149,22 @@ export default {
|
|||||||
},
|
},
|
||||||
timeOnly: {
|
timeOnly: {
|
||||||
get() {
|
get() {
|
||||||
return this.$dayjs
|
var defaultTimeString = this.$dayjs
|
||||||
.utc(this.value)
|
.utc()
|
||||||
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||||
.format("HH:mm:ss");
|
.format("HH:mm:ss");
|
||||||
|
|
||||||
|
return this.value
|
||||||
|
? this.$dayjs
|
||||||
|
.utc(this.value)
|
||||||
|
.add(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||||
|
.format("HH:mm:ss")
|
||||||
|
: defaultTimeString;
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
|
//debugger;
|
||||||
|
//TODO: This needs to handle a null / empty this.dateOnly here by maybe defaulting to right now
|
||||||
|
|
||||||
this.date = this.$dayjs
|
this.date = this.$dayjs
|
||||||
.utc(this.dateOnly + " " + value)
|
.utc(this.dateOnly + " " + value)
|
||||||
.subtract(this.$gzlocale.format().timeZoneOffset, "hour")
|
.subtract(this.$gzlocale.format().timeZoneOffset, "hour")
|
||||||
|
|||||||
@@ -342,8 +342,7 @@ export default {
|
|||||||
{"data":{"id":100,"concurrencyToken":2197,"name":"Handmade Cotton Chair 122","serial":100,"dollarAmount":811.47000,"active":true,"roles":8212,
|
{"data":{"id":100,"concurrencyToken":2197,"name":"Handmade Cotton Chair 122","serial":100,"dollarAmount":811.47000,"active":true,"roles":8212,
|
||||||
"startDate":"2019-06-06T08:48:13.059631Z","endDate":"2019-06-06T12:38:30.654906Z",
|
"startDate":"2019-06-06T08:48:13.059631Z","endDate":"2019-06-06T12:38:30.654906Z",
|
||||||
"notes":"Minima qui assumenda.","count":0,"customFields":null,"tags":["indigo","brown","silver","gold"]}}
|
"notes":"Minima qui assumenda.","count":0,"customFields":null,"tags":["indigo","brown","silver","gold"]}}
|
||||||
*/
|
{
|
||||||
obj: {
|
|
||||||
id: 0,
|
id: 0,
|
||||||
concurrencyToken: 0,
|
concurrencyToken: 0,
|
||||||
name: "",
|
name: "",
|
||||||
@@ -357,6 +356,22 @@ export default {
|
|||||||
count: 0,
|
count: 0,
|
||||||
customFields: [],
|
customFields: [],
|
||||||
tags: []
|
tags: []
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
obj: {
|
||||||
|
id: 0,
|
||||||
|
concurrencyToken: 0,
|
||||||
|
name: null,
|
||||||
|
serial: null,
|
||||||
|
dollarAmount: null,
|
||||||
|
active: null,
|
||||||
|
roles: null,
|
||||||
|
startDate: null,
|
||||||
|
endDate: null,
|
||||||
|
notes: null,
|
||||||
|
count: null,
|
||||||
|
customFields: null,
|
||||||
|
tags: null
|
||||||
},
|
},
|
||||||
formState: {
|
formState: {
|
||||||
ready: false,
|
ready: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user