refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s

This commit is contained in:
Kroonk
2026-05-22 16:19:55 +02:00
parent 38cc4c09ca
commit a213a1dba0
2215 changed files with 242567 additions and 6015 deletions

View File

@@ -0,0 +1,106 @@
<style lang="scss" scoped>
.avatar-new {
background-color: #fdb660;
}
.item-search-result {
position: relative;
background: transparent;
a {
color: inherit;
text-decoration: none;
vertical-align: middle;
background: transparent;
span {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1;
}
}
a:hover {
background: inherit;
color: inherit;
}
.avatar {
border-radius: 3px;
display: inline-block;
height: 36px;
margin: 10px;
width: 36px;
}
.avatar-initials {
text-align: center;
padding-top: 6px;
font-size: 15px;
color: #fff;
}
&:last-child {
border-bottom: initial;
}
}
</style>
<template>
<div v-if="item.id > 0" class="item-search-result" :data-contact="item.id" :data-name="item.name">
<a :href="item.route">
<img v-if="check"
:class="className"
:src="item.information.avatar.url"
:alt="item.complete_name"
@error="check=false"
/>
<div v-else
:class="[className, 'avatar-initials']"
:style="'background-color: '+item.information.avatar.default_avatar_color"
>
{{ item.initials }}
</div>
<template v-if="withName">
{{ item.complete_name }}
</template>
<span></span>
</a>
</div>
<div v-else class="item-search-result">
<div class="avatar avatar-initials avatar-new">
+
</div>
{{ $t('people.people_add_new') }}
<span></span>
</div>
</template>
<script>
export default {
props: {
item: {
type: Object,
required: true,
default: null,
},
withName: {
type: Boolean,
default: true,
},
className: {
type: String,
default: 'avatar',
}
},
data() {
return {
check: true,
};
},
};
</script>