case 4504
This commit is contained in:
@@ -49,33 +49,6 @@
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
|
||||
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
|
||||
<v-textarea
|
||||
ref="notes"
|
||||
v-model="obj.notes"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('ContractNotes')"
|
||||
:error-messages="form().serverErrors(this, 'notes')"
|
||||
data-cy="notes"
|
||||
auto-grow
|
||||
@input="fieldValueChanged('notes')"
|
||||
></v-textarea>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-checkbox
|
||||
ref="active"
|
||||
v-model="obj.active"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('Active')"
|
||||
data-cy="active"
|
||||
:error-messages="form().serverErrors(this, 'active')"
|
||||
@change="fieldValueChanged('active')"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
|
||||
<!-- ################################ SUBSCRIPTION ITEMS LIST ############################### -->
|
||||
|
||||
<v-col cols="12" class="mb-6">
|
||||
@@ -103,7 +76,7 @@
|
||||
<v-menu v-if="rights.change" offset-y>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<span class="text-subtitle-2">
|
||||
{{ $sock.t("SubscriptionList") }}</span
|
||||
{{ $sock.t("SubscriptionItemList") }}</span
|
||||
><v-btn large icon v-bind="attrs" v-on="on">
|
||||
<v-icon small color="primary">$sockiEllipsisV</v-icon>
|
||||
</v-btn>
|
||||
@@ -125,6 +98,13 @@
|
||||
</v-col>
|
||||
</template>
|
||||
|
||||
<template v-slot:[`item.active`]="{ item }">
|
||||
<v-simple-checkbox
|
||||
v-model="item.active"
|
||||
disabled
|
||||
></v-simple-checkbox>
|
||||
</template>
|
||||
|
||||
<template v-slot:[`item.actions`]="{ item }">
|
||||
<v-btn icon @click="editItem(item)">
|
||||
<v-icon :class="itemsRowClasses(item)">
|
||||
@@ -136,6 +116,33 @@
|
||||
</v-col>
|
||||
|
||||
<!-- --------------------------------- -->
|
||||
|
||||
<v-col v-if="form().showMe(this, 'Notes')" cols="12">
|
||||
<v-textarea
|
||||
ref="notes"
|
||||
v-model="obj.notes"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('ContractNotes')"
|
||||
:error-messages="form().serverErrors(this, 'notes')"
|
||||
data-cy="notes"
|
||||
auto-grow
|
||||
@input="fieldValueChanged('notes')"
|
||||
></v-textarea>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-checkbox
|
||||
ref="active"
|
||||
v-model="obj.active"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('Active')"
|
||||
data-cy="active"
|
||||
:error-messages="form().serverErrors(this, 'active')"
|
||||
@change="fieldValueChanged('active')"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
<!-- --------------------------------- -->
|
||||
|
||||
<v-col v-if="form().showMe(this, 'Tags')" cols="12">
|
||||
@@ -170,9 +177,7 @@
|
||||
<v-row dense justify="center">
|
||||
<v-dialog v-model="editItemDialog">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
a title here
|
||||
</v-card-title>
|
||||
<v-card-title> </v-card-title>
|
||||
<v-card-text>
|
||||
<v-row dense>
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
@@ -271,6 +276,25 @@
|
||||
"
|
||||
></gz-date-time-picker>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||
<v-checkbox
|
||||
ref="active"
|
||||
v-model="obj.items[editItemIndex].active"
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
:label="$sock.t('Active')"
|
||||
:error-messages="
|
||||
form().serverErrors(
|
||||
this,
|
||||
`Items[${editItemIndex}].active`
|
||||
)
|
||||
"
|
||||
@change="
|
||||
fieldValueChanged(`Items[${editItemIndex}].active`)
|
||||
"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -411,6 +435,12 @@ export default {
|
||||
value: "expireDate"
|
||||
});
|
||||
|
||||
headers.push({
|
||||
text: this.$sock.t("Active"),
|
||||
align: "center",
|
||||
value: "active"
|
||||
});
|
||||
|
||||
if (!this.formState.readOnly) {
|
||||
headers.push({ text: "", value: "actions" });
|
||||
}
|
||||
@@ -431,6 +461,7 @@ export default {
|
||||
this.languageName,
|
||||
this.hour12
|
||||
),
|
||||
active: x.active,
|
||||
productViz: x.productViz
|
||||
};
|
||||
});
|
||||
@@ -535,7 +566,8 @@ export default {
|
||||
subscriptionId: 0,
|
||||
productId: null,
|
||||
quantity: 1,
|
||||
expireDate: window.$gz.locale.nowUTC8601String()
|
||||
expireDate: window.$gz.locale.nowUTC8601String(),
|
||||
active: true
|
||||
});
|
||||
this.editItemIndex = this.obj.items.length - 1;
|
||||
this.editItemDialog = true;
|
||||
@@ -660,7 +692,7 @@ export default {
|
||||
vm.obj = res.data;
|
||||
} else {
|
||||
this.$router.replace({
|
||||
name: "biz-subscription",
|
||||
name: "subscription-edit",
|
||||
params: {
|
||||
recordid: res.data.id,
|
||||
obj: res.data
|
||||
@@ -815,7 +847,7 @@ function generateMenu(vm) {
|
||||
sockType: window.$gz.type.Subscription,
|
||||
recordId: vm.$route.params.recordid,
|
||||
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
||||
recordName: vm.obj.name
|
||||
recordName: vm.obj.subsite
|
||||
},
|
||||
menuItems: []
|
||||
};
|
||||
@@ -900,11 +932,13 @@ async function fetchTranslatedText() {
|
||||
"Subscription",
|
||||
"Customer",
|
||||
"ProductGroup",
|
||||
"Product",
|
||||
"SubSite",
|
||||
"ContractNotes",
|
||||
"ProductName",
|
||||
"PurchaseQuantity",
|
||||
"PurchaseExpireDate"
|
||||
"PurchaseExpireDate",
|
||||
"SubscriptionItemList"
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1251,6 +1251,16 @@ async function clickHandler(menuItem) {
|
||||
params: { customerid: m.vm.obj.id, customername: m.vm.obj.name }
|
||||
});
|
||||
break;
|
||||
case "SubscriptionList":
|
||||
m.vm.$router.push({
|
||||
name: "biz-subscription-list",
|
||||
params: {
|
||||
aType: m.vm.sockType,
|
||||
objectId: m.vm.obj.id,
|
||||
name: m.vm.obj.name
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "PurchaseList":
|
||||
m.vm.$router.push({
|
||||
name: "biz-purchase-list",
|
||||
@@ -1384,6 +1394,13 @@ function generateMenu(vm) {
|
||||
vm: vm
|
||||
});
|
||||
|
||||
menuOptions.menuItems.push({
|
||||
title: "SubscriptionList",
|
||||
icon: "$sockiFileContract",
|
||||
key: FORM_KEY + ":SubscriptionList",
|
||||
vm: vm
|
||||
});
|
||||
|
||||
menuOptions.menuItems.push({
|
||||
title: "PurchaseList",
|
||||
icon: "$sockiShoppingCart",
|
||||
|
||||
Reference in New Issue
Block a user