Added MaxLength
This commit is contained in:
@@ -86,10 +86,18 @@
|
|||||||
<template #name-data="{row}">
|
<template #name-data="{row}">
|
||||||
<span
|
<span
|
||||||
v-if="row.id === props.rows[selectedItem].id"
|
v-if="row.id === props.rows[selectedItem].id"
|
||||||
class="text-primary-500 font-bold">{{row.name}}
|
class="text-primary-500 font-bold">
|
||||||
</span>
|
<UTooltip
|
||||||
|
:text="row.name"
|
||||||
|
>
|
||||||
|
{{dataType.templateColumns.find(i => i.key === "name").maxLength ? (row.name.length > dataType.templateColumns.find(i => i.key === "name").maxLength ? `${row.name.substring(0,dataType.templateColumns.find(i => i.key === "name").maxLength)}...` : row.name ) : row.name}}
|
||||||
|
</UTooltip> </span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{row.name}}
|
<UTooltip
|
||||||
|
:text="row.name"
|
||||||
|
>
|
||||||
|
{{dataType.templateColumns.find(i => i.key === "name").maxLength ? (row.name.length > dataType.templateColumns.find(i => i.key === "name").maxLength ? `${row.name.substring(0,dataType.templateColumns.find(i => i.key === "name").maxLength)}...` : row.name ) : row.name}}
|
||||||
|
</UTooltip>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #fullName-data="{row}">
|
<template #fullName-data="{row}">
|
||||||
@@ -114,7 +122,12 @@
|
|||||||
v-for="column in dataType.templateColumns.filter(i => i.key !== 'name' && i.key !== 'fullName' && i.key !== 'licensePlate' && !i.disabledInTable)"
|
v-for="column in dataType.templateColumns.filter(i => i.key !== 'name' && i.key !== 'fullName' && i.key !== 'licensePlate' && !i.disabledInTable)"
|
||||||
v-slot:[`${column.key}-data`]="{row}">
|
v-slot:[`${column.key}-data`]="{row}">
|
||||||
<component v-if="column.component" :is="column.component" :row="row"></component>
|
<component v-if="column.component" :is="column.component" :row="row"></component>
|
||||||
<span v-else>{{row[column.key] ? `${row[column.key]} ${column.unit ? column.unit : ''}`: ''}}</span>
|
<span v-else-if="row[column.key]">
|
||||||
|
<UTooltip :text="row[column.key]">
|
||||||
|
{{row[column.key] ? `${column.maxLength ? (row[column.key].length > column.maxLength ? `${row[column.key].substring(0,column.maxLength)}...` : row[column.key]) : row[column.key]} ${column.unit ? column.unit : ''}`: ''}}
|
||||||
|
</UTooltip>
|
||||||
|
</span>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</UTable>
|
</UTable>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -238,7 +238,8 @@ const links = computed(() => {
|
|||||||
{
|
{
|
||||||
label: "Mitarbeiter",
|
label: "Mitarbeiter",
|
||||||
to: "/profiles",
|
to: "/profiles",
|
||||||
icon: "i-heroicons-user-group"
|
icon: "i-heroicons-user-group",
|
||||||
|
disabled: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Stundensätze",
|
label: "Stundensätze",
|
||||||
|
|||||||
@@ -128,8 +128,10 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template #partner-data="{row}">
|
<template #partner-data="{row}">
|
||||||
<span v-if="row.customer">{{row.customer ? row.customer.name : ""}}</span>
|
<span v-if="row.customer && row.customer.name.length <21">{{row.customer ? row.customer.name : ""}}</span>
|
||||||
|
<UTooltip v-else-if="row.customer && row.customer.name.length > 20" :text="row.customer.name">
|
||||||
|
{{row.customer.name.substring(0,20)}}...
|
||||||
|
</UTooltip>
|
||||||
</template>
|
</template>
|
||||||
<template #reference-data="{row}">
|
<template #reference-data="{row}">
|
||||||
<span v-if="row === filteredRows[selectedItem]" class="text-primary-500 font-bold">{{row.documentNumber}}</span>
|
<span v-if="row === filteredRows[selectedItem]" class="text-primary-500 font-bold">{{row.documentNumber}}</span>
|
||||||
|
|||||||
@@ -215,7 +215,8 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
return item.isCompany
|
return item.isCompany
|
||||||
},
|
},
|
||||||
inputColumn: "Allgemeines",
|
inputColumn: "Allgemeines",
|
||||||
sortable: true
|
sortable: true,
|
||||||
|
maxLength: 20
|
||||||
}, {
|
}, {
|
||||||
key: "nameAddition",
|
key: "nameAddition",
|
||||||
label: "Firmenname Zusatz",
|
label: "Firmenname Zusatz",
|
||||||
@@ -226,7 +227,8 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
showFunction: function (item) {
|
showFunction: function (item) {
|
||||||
return item.isCompany
|
return item.isCompany
|
||||||
},
|
},
|
||||||
inputColumn: "Allgemeines"
|
inputColumn: "Allgemeines",
|
||||||
|
maxLength: 20
|
||||||
},{
|
},{
|
||||||
key: "salutation",
|
key: "salutation",
|
||||||
label: "Anrede",
|
label: "Anrede",
|
||||||
|
|||||||
Reference in New Issue
Block a user