Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TeamMemberManager.vue #270

Merged
merged 1 commit into from
Sep 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions stubs/inertia/resources/js/Pages/Teams/TeamMemberManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
<div class="px-4 py-3"
:class="{'border-t border-gray-200': i > 0}"
@click="addTeamMemberForm.role = role.key"
v-for="(role, i) in availableRoles">
v-for="(role, i) in availableRoles"
:key="i"
>
<div :class="{'opacity-50': addTeamMemberForm.role && addTeamMemberForm.role != role.key}">
<!-- Role Name -->
<div class="flex items-center">
Expand Down Expand Up @@ -85,7 +87,7 @@
<!-- Team Member List -->
<template #content>
<div class="space-y-6">
<div class="flex items-center justify-between" v-for="user in team.users">
<div class="flex items-center justify-between" v-for="user in team.users" :key="user.id">
<div class="flex items-center">
<img class="w-8 h-8 rounded-full" :src="user.profile_photo_url" :alt="user.name">
<div class="ml-4">{{ user.name }}</div>
Expand All @@ -94,12 +96,12 @@
<div class="flex items-center">
<!-- Manage Team Member Role -->
<button class="ml-2 text-sm text-gray-400 underline"
v-if="userPermissions.canAddTeamMembers && availableRoles.length > 0"
v-if="userPermissions.canAddTeamMembers && availableRoles.length"
@click="manageRole(user)">
{{ displayableRole(user.membership.role) }}
</button>

<div class="ml-2 text-sm text-gray-400" v-else-if="availableRoles.length > 0">
<div class="ml-2 text-sm text-gray-400" v-else-if="availableRoles.length">
{{ displayableRole(user.membership.role) }}
</div>

Expand Down Expand Up @@ -135,7 +137,9 @@
<div class="px-4 py-3"
:class="{'border-t border-gray-200': i > 0}"
@click="updateRoleForm.role = role.key"
v-for="(role, i) in availableRoles">
v-for="(role, i) in availableRoles"
:key="i"
>
<div :class="{'opacity-50': updateRoleForm.role && updateRoleForm.role != role.key}">
<!-- Role Name -->
<div class="flex items-center">
Expand Down