Otaceni fotek

This commit is contained in:
Michal Kváček
2023-09-21 09:39:22 +02:00
parent d1baec342f
commit b64c426179
6 changed files with 85 additions and 21 deletions
@@ -31,14 +31,25 @@ onMounted(() => {
<template>
<h3>Členové</h3>
<BasicListSkeleton :items-count-min="1" :items-count-max="5" v-if="loading || !organization"/>
<div class="q-my-md">
<q-btn color="positive" @click="addToOrganization(organizationId)" v-if="!myOrganizationIds.includes(organizationId)">
<q-icon name="add"/>
Přidat se
</q-btn>
<q-btn color="warning" @click="removeFromOrganization(organizationId)" v-else>
<q-icon name="remove"/>
Opustit organizaci
</q-btn>
</div>
<BasicListSkeleton :items-count-min="1" :items-count-max="5" v-if="loading || !organization"/>
<template v-else>
<q-list bordered separator v-if="organization.users.length > 0">
<q-item v-for="user in organization.users" :key="user">
<q-item-section avatar>
<AvatarFromPhoto :src="user.avatarImageUrl" v-if="user.avatarImageUrl" size="50"/>
<q-avatar icon="person" v-else class="bg-primary text-white" />
<q-avatar icon="person" v-else class="bg-primary text-white"/>
</q-item-section>
<q-item-section>
{{ user.name || user.email }}
@@ -49,19 +60,12 @@ onMounted(() => {
<BasicInfoBanner v-else>
Zatím nikdo...
</BasicInfoBanner>
</template>
<q-btn color="positive" @click="addToOrganization(organizationId)" v-if="!myOrganizationIds.includes(organizationId)">
<q-icon name="add"/>
Přidat se
</q-btn>
<q-btn color="warning" size="lg" @click="removeFromOrganization(organizationId)" v-else>
<q-icon name="remove"/>
Opustit organizaci
</q-btn>
<h3>Letadla</h3>
<h3>Letadla</h3>
<BasicListSkeleton :items-count-min="1" :items-count-max="5" v-if="loading"/>
<BasicListSkeleton :items-count-min="1" :items-count-max="5" v-if="loading || !organization"/>
<template v-else>
<AircraftsList :items="organization.aircrafts" v-if="organization.aircrafts.length > 0"/>
<BasicInfoBanner v-else>
Žádné letadlo