This commit is contained in:
2020-02-10 18:42:45 +00:00
parent e344ae5db7
commit 201f59d0d6
2 changed files with 61 additions and 30 deletions

View File

@@ -50,10 +50,6 @@ SHELL / NAV / MENUS / LAYOUT
TODO: LOCALIZATION
- TODO ACTIONS
- Remove relative time token filter integration tests
- Keep the ones that rely on filtering dates between values because that's how the client will be sending the relative filters
- Add a BETWEEN test
- DataTable, make bools display as checkboxes instead of text (could just use icons instead of actual checkbox)
- DataTable Need enum translator in it's own class or maybe part of locale or uses locale I guess

View File

@@ -38,26 +38,6 @@
</td>
</template>
<td v-for="c in item.columns" :key="c.key">
<!-- Handle all plain text types right up to and including enums -->
<!--TODO when get to coloured stuff will need to add that as a prop to column data but leaving out for now-->
<!-- public enum UiFieldDataType : int
{
NoType = 0,
DateTime = 1,
Date = 2,
Time = 3,
Text = 4,
Integer = 5,
Bool = 6,
Decimal = 7,
Currency = 8,
Tags = 9,
Enum = 10,
EmailAddress = 11,
HTTP = 12
}
} -->
<template v-if="c.t == 1">
<!-- DATETIME -->
{{ c.v }}
@@ -88,7 +68,13 @@
</template>
<template v-else-if="c.t == 6">
<!-- BOOL -->
{{ c.v }}
<div class="text-center">
<v-icon v-if="c.v === false" small>far fa-square</v-icon>
<v-icon v-else-if="c.v === true" small
>far fa-check-square</v-icon
>
<v-icon v-else small>far fa-minus-square</v-icon>
</div>
</template>
<template v-else-if="c.t == 7">
<!-- DECIMAL -->
@@ -192,9 +178,20 @@
{{ getHeaderText(c.key) }}</v-list-item-title
>
<v-list-item-subtitle>
<!-- Handle all plain text types right up to and including enums -->
<!--TODO when get to coloured stuff will need to add that as a prop to column data but leaving out for now-->
<template v-if="c.t < 11">
<template v-if="c.t == 1">
<!-- DATETIME -->
{{ c.v }}
</template>
<template v-else-if="c.t == 2">
<!-- DATE -->
{{ c.v }}
</template>
<template v-else-if="c.t == 3">
<!-- TIME -->
{{ c.v }}
</template>
<template v-else-if="c.t == 4">
<!-- TEXT (also maybe openable)-->
<template v-if="c.i">
<!-- openable object with an ID -->
<span
@@ -208,13 +205,51 @@
{{ c.v }}
</template>
</template>
<template v-if="c.t == 11">
<template v-else-if="c.t == 5">
<!-- INTEGER -->
{{ c.v }}
</template>
<template v-else-if="c.t == 6">
<!-- BOOL -->
<div>
<v-icon v-if="c.v === false" small
>far fa-square</v-icon
>
<v-icon v-else-if="c.v === true" small
>far fa-check-square</v-icon
>
<v-icon v-else small>far fa-minus-square</v-icon>
</div>
</template>
<template v-else-if="c.t == 7">
<!-- DECIMAL -->
{{ c.v }}
</template>
<template v-else-if="c.t == 8">
<!-- CURRENCY -->
<div>{{ c.v }}</div>
</template>
<template v-else-if="c.t == 9">
<!-- TAGS -->
{{ c.v }}
</template>
<template v-else-if="c.t == 10">
<!-- ENUM (translated to text on getdata) -->
{{ c.v }}
</template>
<template v-else-if="c.t == 11">
<!-- EMAIL -->
<a :href="'mailto:' + c.v">{{ c.v }}</a>
</template>
<template v-if="c.t == 12">
<template v-else-if="c.t == 12">
<!-- URL / HTTP -->
<!-- Expects full url with protocol etc in c.v so might need to add to record builder -->
<a :href="c.v" target="_blank">{{ c.v }}</a>
</template>
<template v-else>
<!-- UNKNOWN -->
{{ c.v }}
</template>
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>