This commit is contained in:
2019-06-06 22:43:26 +00:00
parent 13c8fe267d
commit 8c5d18bccd

View File

@@ -54,7 +54,7 @@
</div> </div>
</template> </template>
<script> <script>
/* eslint-disable */ /* Xeslint-disable */
export default { export default {
beforeCreate() { beforeCreate() {
//debugger; //debugger;
@@ -124,7 +124,7 @@ export default {
}, },
dateOnly: { dateOnly: {
get() { get() {
//debugger; //TODO: this will likely need an improvement for forms where there should be an automatic pre-set time chosen like workorder labor;
var defaultDateString = this.$dayjs() var defaultDateString = this.$dayjs()
.utc() .utc()
.add(this.$gzlocale.format().timeZoneOffset, "hour") .add(this.$gzlocale.format().timeZoneOffset, "hour")
@@ -138,9 +138,6 @@ export default {
: defaultDateString; : 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")
@@ -149,6 +146,7 @@ export default {
}, },
timeOnly: { timeOnly: {
get() { get() {
//TODO: this will likely need an improvement for forms where there should be an automatic pre-set time chosen like workorder labor;
var defaultTimeString = this.$dayjs var defaultTimeString = this.$dayjs
.utc() .utc()
.add(this.$gzlocale.format().timeZoneOffset, "hour") .add(this.$gzlocale.format().timeZoneOffset, "hour")
@@ -162,9 +160,6 @@ export default {
: defaultTimeString; : 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")