|
| 1 | +<template> |
| 2 | + <UCard> |
| 3 | + <template #header> |
| 4 | + <div class="flex flex-row flex-wrap items-start justify-around space-x-2"> |
| 5 | + <!-- Name Column --> |
| 6 | + <div class="flex min-w-max flex-col items-center"> |
| 7 | + <!-- Label (optional, e.g. “Name”) --> |
| 8 | + <p class="font-archivo mb-1 text-sm text-gray-500">Name</p> |
| 9 | + <!-- Actual name --> |
| 10 | + <h1 class="font-archivo text-sm">{{ profile.name }}</h1> |
| 11 | + <!-- Pronouns in smaller gray text, if provided --> |
| 12 | + <p v-if="profile.pronouns" class="font-archivo text-sm text-gray-600"> |
| 13 | + {{ profile.pronouns }} |
| 14 | + </p> |
| 15 | + </div> |
| 16 | + <!-- Email Column --> |
| 17 | + <div class="flex flex-col flex-wrap items-start"> |
| 18 | + <!-- Label --> |
| 19 | + <p class="font-archivo mb-1 text-sm text-gray-500">Email</p> |
| 20 | + <!-- Value --> |
| 21 | + <p class="font-archivo text-sm">{{ profile.email }}</p> |
| 22 | + </div> |
| 23 | + |
| 24 | + <!-- Role Column --> |
| 25 | + <div class="flex flex-col items-end"> |
| 26 | + <!-- Label --> |
| 27 | + <p class="font-archivo mb-1 text-sm text-gray-500">Role</p> |
| 28 | + <!-- Value --> |
| 29 | + <p class="font-archivo text-sm">{{ profile.role }}</p> |
| 30 | + </div> |
| 31 | + </div> |
| 32 | + </template> |
| 33 | + |
| 34 | + <div |
| 35 | + class="flex w-full flex-row items-start justify-between space-x-4 text-sm"> |
| 36 | + <!-- Dietary Restrictions Column --> |
| 37 | + <div class="flex flex-col"> |
| 38 | + <h3 class="mb-1 whitespace-nowrap font-semibold"> |
| 39 | + Dietary Restrictions |
| 40 | + </h3> |
| 41 | + <!-- UL horizontally laid out --> |
| 42 | + <ul |
| 43 | + class="align-center flex flex-row flex-wrap justify-center space-x-2"> |
| 44 | + <li v-for="diet in profile.dietary_restrictions" :key="diet"> |
| 45 | + {{ diet }} |
| 46 | + </li> |
| 47 | + </ul> |
| 48 | + </div> |
| 49 | + |
| 50 | + <!-- Meals Had Column --> |
| 51 | + <div class="flex flex-col text-center text-sm"> |
| 52 | + <h3 class="mb-1 font-semibold">Meals Had</h3> |
| 53 | + <!-- UL horizontally laid out --> |
| 54 | + <ul |
| 55 | + class="align-center flex flex-row flex-wrap justify-center space-x-2"> |
| 56 | + <li |
| 57 | + :class="{ |
| 58 | + 'text-green-500': profile.meals[0], |
| 59 | + 'text-red-500': !profile.meals[0] |
| 60 | + }"> |
| 61 | + Lunch-1 |
| 62 | + </li> |
| 63 | + <li |
| 64 | + :class="{ |
| 65 | + 'text-green-500': profile.meals[1], |
| 66 | + 'text-red-500': !profile.meals[1] |
| 67 | + }"> |
| 68 | + Dinner |
| 69 | + </li> |
| 70 | + <li |
| 71 | + :class="{ |
| 72 | + 'text-green-500': profile.meals[2], |
| 73 | + 'text-red-500': !profile.meals[2] |
| 74 | + }"> |
| 75 | + Lunch-2 |
| 76 | + </li> |
| 77 | + </ul> |
| 78 | + </div> |
| 79 | + </div> |
| 80 | + |
| 81 | + <template #footer> |
| 82 | + <div class="flex w-full flex-row items-center justify-between"> |
| 83 | + <p |
| 84 | + :class="{ |
| 85 | + 'text-green-500': !profile.photos_opt_out, |
| 86 | + 'text-red-500': profile.photos_opt_out |
| 87 | + }"> |
| 88 | + Photos Opt Out: |
| 89 | + {{ profile.photos_opt_out ? 'YES' : 'NO' }} |
| 90 | + </p> |
| 91 | + <p |
| 92 | + :class="{ |
| 93 | + 'text-green-500': profile.cvUploaded, |
| 94 | + 'text-red-500': !profile.cvUploaded |
| 95 | + }"> |
| 96 | + CV uploaded: |
| 97 | + {{ profile.cvUploaded ? 'YES' : 'NO' }} |
| 98 | + </p> |
| 99 | + </div> |
| 100 | + </template> |
| 101 | + </UCard> |
| 102 | + <div> |
| 103 | + <p v-if="profile" class="mt-1 w-full text-center text-sm text-gray-500"> |
| 104 | + UserID: {{ profile.id }} |
| 105 | + </p> |
| 106 | + </div> |
| 107 | +</template> |
| 108 | + |
| 109 | +<script lang="ts" setup> |
| 110 | +import type { Profile } from '~~/shared/types'; |
| 111 | +
|
| 112 | +type Props = { |
| 113 | + profile: Profile; |
| 114 | +}; |
| 115 | +defineProps<Props>(); |
| 116 | +</script> |
| 117 | + |
| 118 | +<style></style> |
0 commit comments