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

@@ -51,10 +51,6 @@ TODO: LOCALIZATION
- TODO ACTIONS - 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, 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 - DataTable Need enum translator in it's own class or maybe part of locale or uses locale I guess
- DataTable Editing and saving a widget makes it disappear from list, the default sort order sb by record ID so they stay in same order - DataTable Editing and saving a widget makes it disappear from list, the default sort order sb by record ID so they stay in same order

View File

@@ -38,26 +38,6 @@
</td> </td>
</template> </template>
<td v-for="c in item.columns" :key="c.key"> <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"> <template v-if="c.t == 1">
<!-- DATETIME --> <!-- DATETIME -->
{{ c.v }} {{ c.v }}
@@ -88,7 +68,13 @@
</template> </template>
<template v-else-if="c.t == 6"> <template v-else-if="c.t == 6">
<!-- BOOL --> <!-- 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>
<template v-else-if="c.t == 7"> <template v-else-if="c.t == 7">
<!-- DECIMAL --> <!-- DECIMAL -->
@@ -192,9 +178,20 @@
{{ getHeaderText(c.key) }}</v-list-item-title {{ getHeaderText(c.key) }}</v-list-item-title
> >
<v-list-item-subtitle> <v-list-item-subtitle>
<!-- Handle all plain text types right up to and including enums --> <template v-if="c.t == 1">
<!--TODO when get to coloured stuff will need to add that as a prop to column data but leaving out for now--> <!-- DATETIME -->
<template v-if="c.t < 11"> {{ 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"> <template v-if="c.i">
<!-- openable object with an ID --> <!-- openable object with an ID -->
<span <span
@@ -208,13 +205,51 @@
{{ c.v }} {{ c.v }}
</template> </template>
</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> <a :href="'mailto:' + c.v">{{ c.v }}</a>
</template> </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 --> <!-- 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> <a :href="c.v" target="_blank">{{ c.v }}</a>
</template> </template>
<template v-else>
<!-- UNKNOWN -->
{{ c.v }}
</template>
</v-list-item-subtitle> </v-list-item-subtitle>
</v-list-item-content> </v-list-item-content>
</v-list-item> </v-list-item>