This commit is contained in:
@@ -85,7 +85,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="c.t == 4">
|
<template v-else-if="c.t == 4">
|
||||||
<!-- TEXT (also maybe openable)-->
|
<!-- TEXT (also maybe openable)-->
|
||||||
<template v-if="c.i && c.i != 0">
|
<template v-if="c.i && c.i != 0 && !c.nopen">
|
||||||
<!-- openable object with an ID -->
|
<!-- openable object with an ID -->
|
||||||
<div
|
<div
|
||||||
class="subtitle-1"
|
class="subtitle-1"
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="c.t == 5">
|
<template v-else-if="c.t == 5">
|
||||||
<!-- INTEGER -->
|
<!-- INTEGER -->
|
||||||
<template v-if="c.i && c.i != 0">
|
<template v-if="c.i && c.i != 0 && !c.nopen">
|
||||||
<!-- openable object with an ID -->
|
<!-- openable object with an ID -->
|
||||||
<div
|
<div
|
||||||
class="subtitle-1"
|
class="subtitle-1"
|
||||||
@@ -260,7 +260,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="c.t == 4">
|
<template v-else-if="c.t == 4">
|
||||||
<!-- TEXT (also maybe openable)-->
|
<!-- TEXT (also maybe openable)-->
|
||||||
<template v-if="c.i && c.i != 0">
|
<template v-if="c.i && c.i != 0 && !c.nopen">
|
||||||
<!-- openable object with an ID -->
|
<!-- openable object with an ID -->
|
||||||
<div
|
<div
|
||||||
class="subtitle-1"
|
class="subtitle-1"
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-else-if="c.t == 5">
|
<template v-else-if="c.t == 5">
|
||||||
<!-- INTEGER -->
|
<!-- INTEGER -->
|
||||||
<template v-if="c.i && c.i != 0">
|
<template v-if="c.i && c.i != 0 && !c.nopen">
|
||||||
<!-- openable object with an ID -->
|
<!-- openable object with an ID -->
|
||||||
<div
|
<div
|
||||||
class="subtitle-1"
|
class="subtitle-1"
|
||||||
@@ -419,6 +419,10 @@ export default {
|
|||||||
reload: {
|
reload: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
canOpenDefaultObject: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -652,7 +656,11 @@ export default {
|
|||||||
vm.headers = buildHeaders(res.columns);
|
vm.headers = buildHeaders(res.columns);
|
||||||
|
|
||||||
//Post process data here and then set vm.records
|
//Post process data here and then set vm.records
|
||||||
vm.records = buildRecords(res.data, res.columns);
|
vm.records = buildRecords(
|
||||||
|
res.data,
|
||||||
|
res.columns,
|
||||||
|
vm.canOpenDefaultObject
|
||||||
|
);
|
||||||
|
|
||||||
vm.totalRecords = res.totalRecordCount;
|
vm.totalRecords = res.totalRecordCount;
|
||||||
//Put back selected items
|
//Put back selected items
|
||||||
@@ -703,7 +711,7 @@ function buildHeaders(columnData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Called by getDataFromApi on retrieval of list with columnData
|
//Called by getDataFromApi on retrieval of list with columnData
|
||||||
function buildRecords(listData, columndefinitions) {
|
function buildRecords(listData, columndefinitions, canOpenDefaultObject) {
|
||||||
//iterate data, build each object keyed with index name and display set to correct translated filter and then return
|
//iterate data, build each object keyed with index name and display set to correct translated filter and then return
|
||||||
|
|
||||||
let ret = [];
|
let ret = [];
|
||||||
@@ -875,6 +883,7 @@ function buildRecords(listData, columndefinitions) {
|
|||||||
t: dataType,
|
t: dataType,
|
||||||
key: iRow + "-" + iColumn
|
key: iRow + "-" + iColumn
|
||||||
};
|
};
|
||||||
|
|
||||||
//is the source dtalist field openable? If so it will have an i property set for it's ID and we already know the types to open from the column headers data
|
//is the source dtalist field openable? If so it will have an i property set for it's ID and we already know the types to open from the column headers data
|
||||||
//so between the two we can make a clickable button in the grid vm triggers a function with the column index and the id and vm in turn will bubble up the event to open vm
|
//so between the two we can make a clickable button in the grid vm triggers a function with the column index and the id and vm in turn will bubble up the event to open vm
|
||||||
//object
|
//object
|
||||||
@@ -882,6 +891,10 @@ function buildRecords(listData, columndefinitions) {
|
|||||||
columnObject["i"] = column.i;
|
columnObject["i"] = column.i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!canOpenDefaultObject && column.rid) {
|
||||||
|
columnObject["nopen"] = true;
|
||||||
|
}
|
||||||
|
|
||||||
//Is there an overriding openable type already defined?
|
//Is there an overriding openable type already defined?
|
||||||
//(this is used by dynamic columns with different object type and id's that are openable like attachments and event logs and Review list etc)
|
//(this is used by dynamic columns with different object type and id's that are openable like attachments and event logs and Review list etc)
|
||||||
if (column.ot) {
|
if (column.ot) {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
:showSelect="rights.read"
|
:showSelect="rights.read"
|
||||||
:reload="reload"
|
:reload="reload"
|
||||||
:metaView="metaView"
|
:metaView="metaView"
|
||||||
|
:canOpenDefaultObject="false"
|
||||||
v-on:selection-change="handleSelected"
|
v-on:selection-change="handleSelected"
|
||||||
data-cy="service-banksTable"
|
data-cy="service-banksTable"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user