This commit is contained in:
@@ -12,7 +12,7 @@ todo: open ad-hoc type and id from data list idea
|
|||||||
todo: Administration - History
|
todo: Administration - History
|
||||||
View the history log in full without being for specific items, i.e. data list view
|
View the history log in full without being for specific items, i.e. data list view
|
||||||
|
|
||||||
|
todo: default sort order for default data list views specified? (see eventdatalist for example)
|
||||||
|
|
||||||
todo: Administration - Statistics WTF?
|
todo: Administration - Statistics WTF?
|
||||||
What is this for? Administration related statistics?
|
What is this for? Administration related statistics?
|
||||||
|
|||||||
@@ -83,17 +83,13 @@
|
|||||||
<!-- TEXT (also maybe openable)-->
|
<!-- TEXT (also maybe openable)-->
|
||||||
<template v-if="c.i && c.i != 0">
|
<template v-if="c.i && c.i != 0">
|
||||||
<!-- openable object with an ID -->
|
<!-- openable object with an ID -->
|
||||||
|
{{ c }}
|
||||||
<div
|
<div
|
||||||
class="subtitle-1"
|
class="subtitle-1"
|
||||||
@click="gridCellButtonClick(c.key, c.i)"
|
@click="gridCellButtonClick(c.key, c.i)"
|
||||||
>
|
>
|
||||||
<a href="javascript:"> {{ c.v }}</a>
|
<a href="javascript:"> {{ c.v }}</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- <v-btn
|
|
||||||
depressed
|
|
||||||
small
|
|
||||||
@click="gridCellButtonClick(c.key, c.i)"
|
|
||||||
>{{ c.v }}</v-btn> -->
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ c.v }}
|
{{ c.v }}
|
||||||
@@ -126,8 +122,20 @@
|
|||||||
{{ c.v }}
|
{{ c.v }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="c.t == 10">
|
<template v-else-if="c.t == 10">
|
||||||
<!-- ENUM (translated to text on getdata) -->
|
<!-- ENUM (translated to text on getdata) ALSO MAYBE OPENABLE -->
|
||||||
{{ c.v }}
|
<template v-if="c.i && c.ot">
|
||||||
|
<!-- openable object with an ID -->
|
||||||
|
{{ c }}
|
||||||
|
<div
|
||||||
|
class="subtitle-1"
|
||||||
|
@click="gridCellButtonClick(c.key, c.i, c.ot)"
|
||||||
|
>
|
||||||
|
<a href="javascript:"> {{ c.v }}</a>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ c.v }}
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="c.t == 11">
|
<template v-else-if="c.t == 11">
|
||||||
<!-- EMAIL -->
|
<!-- EMAIL -->
|
||||||
@@ -244,12 +252,6 @@
|
|||||||
>
|
>
|
||||||
<a href="javascript:"> {{ c.v }}</a>
|
<a href="javascript:"> {{ c.v }}</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- <span
|
|
||||||
@click="gridCellButtonClick(c.key, c.i)"
|
|
||||||
class="primary--text subtitle-1 font-weight-bold"
|
|
||||||
style="cursor:pointer"
|
|
||||||
>{{ c.v }}
|
|
||||||
</span> -->
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ c.v }}
|
{{ c.v }}
|
||||||
@@ -284,8 +286,20 @@
|
|||||||
{{ c.v }}
|
{{ c.v }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="c.t == 10">
|
<template v-else-if="c.t == 10">
|
||||||
<!-- ENUM (translated to text on getdata) -->
|
<!-- ENUM (translated to text on getdata) ALSO MAYBE OPENABLE -->
|
||||||
{{ c.v }}
|
<template v-if="c.i && c.ot">
|
||||||
|
<!-- openable object with an ID -->
|
||||||
|
{{ c }}
|
||||||
|
<div
|
||||||
|
class="subtitle-1"
|
||||||
|
@click="gridCellButtonClick(c.key, c.i, c.ot)"
|
||||||
|
>
|
||||||
|
<a href="javascript:"> {{ c.v }}</a>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ c.v }}
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="c.t == 11">
|
<template v-else-if="c.t == 11">
|
||||||
<!-- EMAIL -->
|
<!-- EMAIL -->
|
||||||
@@ -481,12 +495,17 @@ export default {
|
|||||||
vm.loading = false;
|
vm.loading = false;
|
||||||
vm.getDataFromApi();
|
vm.getDataFromApi();
|
||||||
},
|
},
|
||||||
gridCellButtonClick(key, i) {
|
gridCellButtonClick(key, i, ot) {
|
||||||
//translate key to actual object type from header data
|
let typeToOpen = null;
|
||||||
//key format is row-column e.g."500-2"
|
//if ot is not null then *that* is the Openable Type otherwise it's in the header data
|
||||||
//get the datatype of the column which matches the server columns array index
|
if (ot) {
|
||||||
let typeToOpen = this.serverColumns[key.split("-")[1]].ay;
|
typeToOpen = ot;
|
||||||
|
} else {
|
||||||
|
//translate key to actual object type from header data
|
||||||
|
//key format is row-column e.g."500-2"
|
||||||
|
//get the datatype of the column which matches the server columns array index
|
||||||
|
typeToOpen = this.serverColumns[key.split("-")[1]].ay;
|
||||||
|
}
|
||||||
//i is the actual AyaNova index of vm record so we have all we need to open vm object
|
//i is the actual AyaNova index of vm record so we have all we need to open vm object
|
||||||
window.$gz.eventBus.$emit("openobject", { type: typeToOpen, id: i });
|
window.$gz.eventBus.$emit("openobject", { type: typeToOpen, id: i });
|
||||||
},
|
},
|
||||||
@@ -619,6 +638,7 @@ function buildRecords(listData, columndefinitions) {
|
|||||||
|
|
||||||
let dataType = columndefinitions[iColumn].dt;
|
let dataType = columndefinitions[iColumn].dt;
|
||||||
let display = column.v;
|
let display = column.v;
|
||||||
|
let openableAyaType = null;
|
||||||
/*
|
/*
|
||||||
public enum UiFieldDataType : int
|
public enum UiFieldDataType : int
|
||||||
{
|
{
|
||||||
@@ -687,6 +707,21 @@ function buildRecords(listData, columndefinitions) {
|
|||||||
columndefinitions[iColumn].et,
|
columndefinitions[iColumn].et,
|
||||||
display
|
display
|
||||||
);
|
);
|
||||||
|
//is it an AyaType openable type column like in the EventDataList AyaType column?
|
||||||
|
if (
|
||||||
|
columndefinitions[iColumn].et == "AyaType" &&
|
||||||
|
column.i != null &&
|
||||||
|
column.i != 0
|
||||||
|
) {
|
||||||
|
//yes so provide the ot (openable type) info needed for the grid to make this openable
|
||||||
|
openableAyaType = column.v;
|
||||||
|
}
|
||||||
|
// console.log("gz-data-table:buildRecords:enumtype column is ", column);
|
||||||
|
// //v contains the type number and i contains the id of the record if it's an aytype enum openable
|
||||||
|
// console.log(
|
||||||
|
// "gz-data-table:buildRecords:enumtype column devfinition is ",
|
||||||
|
// columndefinitions[iColumn]
|
||||||
|
// );
|
||||||
break;
|
break;
|
||||||
case 14: //MemorySize (file size)
|
case 14: //MemorySize (file size)
|
||||||
display = window.$gz.locale.humanFileSize(
|
display = window.$gz.locale.humanFileSize(
|
||||||
@@ -711,6 +746,13 @@ function buildRecords(listData, columndefinitions) {
|
|||||||
if (column.i) {
|
if (column.i) {
|
||||||
columnObject["i"] = column.i;
|
columnObject["i"] = column.i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//is the source column a special AyaType enum with an id signifying to be openable directly?
|
||||||
|
if (openableAyaType) {
|
||||||
|
//signal to grid to make it an openable link
|
||||||
|
columnObject["ot"] = openableAyaType;
|
||||||
|
}
|
||||||
|
|
||||||
o.columns["c" + iColumn.toString()] = columnObject;
|
o.columns["c" + iColumn.toString()] = columnObject;
|
||||||
//Is:
|
//Is:
|
||||||
//Headers: [ { "text": "Name", "value": "c1" }, { "text": "Serial #", "value": "c2" },
|
//Headers: [ { "text": "Name", "value": "c1" }, { "text": "Serial #", "value": "c2" },
|
||||||
|
|||||||
Reference in New Issue
Block a user