case 4504
This commit is contained in:
@@ -236,23 +236,25 @@
|
|||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template>
|
||||||
<v-list>
|
<v-list>
|
||||||
<v-list-item @click="subExpireAddOneWeek">
|
<!-- <v-list-item @click="subExpireAddOneWeek">
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
<v-icon>$sockiPlus</v-icon>
|
<v-icon>$sockiPlus</v-icon>
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-title>One week</v-list-item-title>
|
<v-list-item-title>One week</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item> -->
|
||||||
<v-list-item @click="subExpireAddOneMonth">
|
<v-list-item @click="subExpireAddOneMonth">
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
<v-icon>$sockiPlus</v-icon>
|
<v-icon>$sockiPlus</v-icon>
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-title>One month</v-list-item-title>
|
<v-list-item-title
|
||||||
|
>One month + 7d</v-list-item-title
|
||||||
|
>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
<v-list-item @click="subExpireAddOneYear">
|
<v-list-item @click="subExpireAddOneYear">
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
<v-icon>$sockiPlus</v-icon>
|
<v-icon>$sockiPlus</v-icon>
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-title>One year</v-list-item-title>
|
<v-list-item-title>One year + 7d</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
@@ -633,30 +635,36 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
subExpireAddOneWeek: function() {
|
subExpireAddOneWeek: function() {
|
||||||
// // eslint-disable-next-line
|
this.obj.items[this.editItemIndex].expireDate = addToDate(
|
||||||
// debugger;
|
this.obj.items[this.editItemIndex].expireDate,
|
||||||
const now = window.$gz.locale.nowUTC8601String(this.timeZoneName);
|
{
|
||||||
this.obj.items[
|
days: 7
|
||||||
this.editItemIndex
|
}
|
||||||
].expireDate = window.$gz.locale.addDurationToUTC8601String(now, {
|
);
|
||||||
days: 7
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
subExpireAddOneMonth: function() {
|
subExpireAddOneMonth: function() {
|
||||||
const now = window.$gz.locale.nowUTC8601String(this.timeZoneName);
|
this.obj.items[this.editItemIndex].expireDate = addToDate(
|
||||||
this.obj.items[
|
this.obj.items[this.editItemIndex].expireDate,
|
||||||
this.editItemIndex
|
{
|
||||||
].expireDate = window.$gz.locale.addDurationToUTC8601String(now, {
|
months: 1,
|
||||||
months: 1
|
days: 7
|
||||||
});
|
}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
subExpireAddOneYear: function() {
|
subExpireAddOneYear: function() {
|
||||||
const now = window.$gz.locale.nowUTC8601String(this.timeZoneName);
|
this.obj.items[this.editItemIndex].expireDate = addToDate(
|
||||||
this.obj.items[
|
this.obj.items[this.editItemIndex].expireDate,
|
||||||
this.editItemIndex
|
{
|
||||||
].expireDate = window.$gz.locale.addDurationToUTC8601String(now, {
|
years: 1,
|
||||||
years: 1
|
days: 7
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
// const now = window.$gz.locale.nowUTC8601String(this.timeZoneName);
|
||||||
|
// this.obj.items[
|
||||||
|
// this.editItemIndex
|
||||||
|
// ].expireDate = window.$gz.locale.addDurationToUTC8601String(now, {
|
||||||
|
// years: 1
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
return this.formState.valid && this.formState.dirty;
|
return this.formState.valid && this.formState.dirty;
|
||||||
@@ -999,4 +1007,20 @@ async function populateSelectionLists(vm) {
|
|||||||
await window.$gz.enums.fetchEnumList("productgroup");
|
await window.$gz.enums.fetchEnumList("productgroup");
|
||||||
vm.selectLists.pGroups = window.$gz.enums.getSelectionList("productgroup");
|
vm.selectLists.pGroups = window.$gz.enums.getSelectionList("productgroup");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////
|
||||||
|
//
|
||||||
|
//
|
||||||
|
function addToDate(dateValue, span) {
|
||||||
|
var newDate = dateValue;
|
||||||
|
if (newDate == null) {
|
||||||
|
newDate = window.$gz.locale.addDurationToUTC8601String(
|
||||||
|
window.$gz.locale.nowUTC8601String(),
|
||||||
|
span
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
newDate = window.$gz.locale.addDurationToUTC8601String(newDate, span);
|
||||||
|
}
|
||||||
|
return newDate;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user