|
@@ -19,42 +19,51 @@ const props = defineProps<Props>()
|
|
|
|
|
|
const { stringUpdated } = useEditedBy(toRef(props, 'entity'))
|
|
|
|
|
|
-// TODO
|
|
|
const priority = computed<Priority | null>(() => {
|
|
|
const { entity } = props
|
|
|
- if (!entity.priority) {
|
|
|
+ if (!entity.priority || entity.priority.defaultCreate) {
|
|
|
return null
|
|
|
}
|
|
|
return {
|
|
|
- class: entity.priority.uiColor
|
|
|
- ? `u-${entity.priority.uiColor}-color`
|
|
|
- : `u-default-color`,
|
|
|
+ class: `u-${entity.priority.uiColor || 'default'}-color`,
|
|
|
text: entity.priority.name.toUpperCase(),
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+const customer = computed(() => {
|
|
|
+ const { customer } = props.entity
|
|
|
+ if (!customer) return ''
|
|
|
+ const { fullname } = customer
|
|
|
+ if (fullname === '-') return ''
|
|
|
+ return fullname
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div class="flex">
|
|
|
- <div class="flex w-12 items-center justify-center">
|
|
|
+ <CommonLink
|
|
|
+ :link="`/#ticket/zoom/${entity.number}`"
|
|
|
+ class="flex cursor-pointer ltr:pr-3 rtl:pl-3"
|
|
|
+ >
|
|
|
+ <div class="flex w-14 items-center justify-center">
|
|
|
<!-- TODO label? -->
|
|
|
- <CommonTicketStateIndicator
|
|
|
- :status="entity.state"
|
|
|
- :label="entity.state"
|
|
|
- />
|
|
|
+ <CommonTicketStateIndicator :status="entity.state.name" label="" />
|
|
|
</div>
|
|
|
<div
|
|
|
- class="flex flex-1 items-center border-b border-white/10 py-3 text-gray-100"
|
|
|
+ class="flex flex-1 items-center gap-1 border-b border-white/10 py-3 text-gray-100 ltr:pr-2 rtl:pl-2"
|
|
|
>
|
|
|
<div class="flex-1">
|
|
|
<div class="flex">
|
|
|
- <div>#{{ entity.id }}</div>
|
|
|
- <div v-if="entity.owner" class="px-1">·</div>
|
|
|
- <div v-if="entity.owner">
|
|
|
- {{ entity.owner.firstname }} {{ entity.owner.lastname }}
|
|
|
- </div>
|
|
|
+ <div>#{{ entity.number }}</div>
|
|
|
+ <template v-if="customer">
|
|
|
+ <div class="px-1">·</div>
|
|
|
+ <div
|
|
|
+ class="max-w-[50vw] overflow-hidden text-ellipsis whitespace-nowrap"
|
|
|
+ >
|
|
|
+ {{ customer }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- <div class="mb-1 text-lg font-bold">
|
|
|
+ <div class="mb-1 text-lg font-bold leading-5 line-clamp-3">
|
|
|
<slot>
|
|
|
{{ entity.title }}
|
|
|
</slot>
|
|
@@ -69,12 +78,15 @@ const priority = computed<Priority | null>(() => {
|
|
|
</div>
|
|
|
<div
|
|
|
v-if="priority"
|
|
|
- :class="[priority.class, 'h-min rounded-[4px] py-1 px-2']"
|
|
|
+ :class="[
|
|
|
+ priority.class,
|
|
|
+ 'h-min whitespace-nowrap rounded-[4px] py-1 px-2',
|
|
|
+ ]"
|
|
|
>
|
|
|
{{ priority.text }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </CommonLink>
|
|
|
</template>
|
|
|
|
|
|
<style scoped lang="scss">
|