This commit is contained in:
@@ -9,11 +9,11 @@
|
||||
</gz-extensions>
|
||||
<gz-data-table
|
||||
ref="gzdatatable"
|
||||
form-key="customer-list"
|
||||
data-list-key="CustomerDataList"
|
||||
form-key="license-list"
|
||||
data-list-key="LicenseDataList"
|
||||
:show-select="rights.read"
|
||||
:reload="reload"
|
||||
data-cy="customersTable"
|
||||
data-cy="licensesTable"
|
||||
:client-criteria="clientCriteria"
|
||||
:pre-filter-mode="preFilterMode"
|
||||
@selection-change="handleSelected"
|
||||
@@ -24,12 +24,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const FORM_KEY = "customer-list";
|
||||
const FORM_KEY = "license-list";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
rights: window.$gz.role.defaultRightsObject(),
|
||||
aType: window.$gz.type.Customer,
|
||||
aType: window.$gz.type.License,
|
||||
selectedItems: [],
|
||||
reload: false,
|
||||
clientCriteria: undefined,
|
||||
@@ -37,11 +37,11 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.rights = window.$gz.role.getRights(window.$gz.type.Customer);
|
||||
this.rights = window.$gz.role.getRights(window.$gz.type.License);
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
|
||||
//------ pre-filter ----
|
||||
//OPTIONAL "Show All customers of head office" FILTER
|
||||
//OPTIONAL "Show All licenses of head office" FILTER
|
||||
this.objectId = window.$gz.util.stringToIntOrNull(
|
||||
this.$route.params.objectId
|
||||
);
|
||||
@@ -89,16 +89,14 @@ async function clickHandler(menuItem) {
|
||||
switch (m.key) {
|
||||
case "new":
|
||||
m.vm.$router.push({
|
||||
name: "customer-edit",
|
||||
name: "license-edit",
|
||||
params: { recordid: 0 }
|
||||
});
|
||||
break;
|
||||
case "extensions":
|
||||
{
|
||||
const res = await m.vm.$refs.extensions.open(
|
||||
m.vm.$refs.gzdatatable.getDataListSelection(
|
||||
window.$gz.type.Customer
|
||||
)
|
||||
m.vm.$refs.gzdatatable.getDataListSelection(window.$gz.type.License)
|
||||
);
|
||||
if (res && res.refresh == true) {
|
||||
m.vm.reload = !m.vm.reload;
|
||||
@@ -109,7 +107,7 @@ async function clickHandler(menuItem) {
|
||||
{
|
||||
const res = await m.vm.$refs.reportSelector.open(
|
||||
m.vm.$refs.gzdatatable.getDataListSelection(
|
||||
window.$gz.type.Customer
|
||||
window.$gz.type.License
|
||||
),
|
||||
m.id
|
||||
);
|
||||
@@ -134,11 +132,11 @@ async function clickHandler(menuItem) {
|
||||
function generateMenu(vm) {
|
||||
const menuOptions = {
|
||||
isMain: true,
|
||||
icon: "$sockiAddressCard",
|
||||
title: "CustomerList",
|
||||
icon: "$sockiGem",
|
||||
title: "LicenseList",
|
||||
menuItems: [],
|
||||
formData: {
|
||||
sockType: window.$gz.type.Customer
|
||||
sockType: window.$gz.type.License
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user