|
1 | 1 | <template> |
2 | | - <div class="table-responsive border-top"> |
3 | | - <table class="table table-striped mb-0"> |
| 2 | + <div class="table-responsive border-top mb-0"> |
| 3 | + <table class="table table-striped"> |
4 | 4 | <tbody> |
5 | 5 | <tr> |
6 | 6 | <th><app-icon variant="schedule" />Created At</th> |
|
10 | 10 | <th><app-icon variant="person_outline" />Created By</th> |
11 | 11 | <td>{{ workspace.createdByName }}</td> |
12 | 12 | </tr> |
| 13 | + <tr> |
| 14 | + <th><app-icon variant="badge" />My Role</th> |
| 15 | + <td> |
| 16 | + <span |
| 17 | + v-if="workspace.role === 'lead'" |
| 18 | + class="badge bg-dark text-uppercase" |
| 19 | + > |
| 20 | + <app-icon variant="star" /> Owner |
| 21 | + </span> |
| 22 | + <span |
| 23 | + v-else-if="workspace.role === 'validator'" |
| 24 | + class="badge bg-dark text-uppercase" |
| 25 | + > |
| 26 | + <app-icon variant="task_alt" /> Validator |
| 27 | + </span> |
| 28 | + <span |
| 29 | + v-else |
| 30 | + class="badge bg-secondary text-uppercase" |
| 31 | + > |
| 32 | + <app-icon variant="person" /> Member |
| 33 | + </span> |
| 34 | + <span |
| 35 | + v-if="isPoc" |
| 36 | + class="badge bg-warning text-dark text-uppercase ms-1" |
| 37 | + > |
| 38 | + <app-icon variant="local_police" /> POC |
| 39 | + </span> |
| 40 | + <span |
| 41 | + v-else-if="isDataGenerator" |
| 42 | + class="badge bg-warning text-dark text-uppercase ms-1" |
| 43 | + > |
| 44 | + <app-icon variant="offline_bolt" /> Data Generator |
| 45 | + </span> |
| 46 | + </td> |
| 47 | + </tr> |
13 | 48 | <tr> |
14 | 49 | <th><app-icon variant="phonelink_setup" />App Access</th> |
15 | 50 | <td> |
|
42 | 77 | </template> |
43 | 78 |
|
44 | 79 | <script setup lang="ts"> |
45 | | -const props = defineProps({ |
46 | | - workspace: { |
47 | | - type: Object, |
48 | | - required: true |
49 | | - } |
50 | | -}); |
| 80 | +import type { Workspace } from '~/types/workspaces'; |
| 81 | +
|
| 82 | +interface Props { |
| 83 | + workspace: Workspace; |
| 84 | + myTdeiRoles: string[]; |
| 85 | +} |
| 86 | +
|
| 87 | +const props = defineProps<Props>(); |
| 88 | +
|
| 89 | +const isPoc = computed(() => props.myTdeiRoles.includes('poc')); |
| 90 | +const isDataGenerator = computed(() => |
| 91 | + props.myTdeiRoles.includes(`${props.workspace.type}_data_generator`), |
| 92 | +); |
51 | 93 | </script> |
52 | 94 |
|
53 | 95 | <style lang="scss"> |
|
0 commit comments