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

feat: #846 user information card new design style #913

Merged
merged 3 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 5 additions & 2 deletions frontend/src/assets/styles/default-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ $light-text-secondary: map.get(lightTheme.$light-theme, 'text-secondary');
$light-text-error: map.get(lightTheme.$light-theme, 'text-error');

$light-background-brand: map.get(lightTheme.$light-theme, 'background-brand');
$light-support-error: map.get(lightTheme.$light-theme, 'support-error');
$light-interactive: map.get(lightTheme.$light-theme, 'interactive');

//background
$light-layer-one: map.get(lightTheme.$light-theme, 'layer-01');
$light-layer-two: map.get(lightTheme.$light-theme, 'layer-02')
$light-layer-two: map.get(lightTheme.$light-theme, 'layer-02');

//support
$light-support-error: map.get(lightTheme.$light-theme, 'support-error');
$light-support-success: map.get(lightTheme.$light-theme, 'support-success');
34 changes: 27 additions & 7 deletions frontend/src/components/grantaccess/UserIdentityCard.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
<script setup lang="ts">
import { toRaw } from 'vue';
import type { IdimProxyIdirInfo } from 'fam-api';
import Card from 'primevue/card';
import Icon from '../common/Icon.vue';
J0taFerreira marked this conversation as resolved.
Show resolved Hide resolved
import { IconSize } from '@/enum/IconEnum';

const props = defineProps<{
userIdentity: IdimProxyIdirInfo;
}>(); // Vue3 alternative way for Type the defineProps().
console.log(toRaw(props.userIdentity))
MCatherine1994 marked this conversation as resolved.
Show resolved Hide resolved
</script>

<template>
<Card class="mb-2 p-0">
<template #header>
<Icon icon="checkmark--filled" :size="IconSize.medium" />
<p>Verified user information</p>
</template>
<template #content>
<div class="row align-items-center">
<label class="col-3">User ID:</label>
<span class="col-sm">{{ props.userIdentity.userId }}</span>
<div class="col">
<label class="row">User ID:</label>
<span class="row">{{ props.userIdentity.userId }}</span>
</div>
<div class="row align-items-center" v-if="props.userIdentity.found">
<label class="col-3">Display Name: </label>
<span class="col-sm">{{ props.userIdentity.displayName }}</span>
<div class="col" v-if="props.userIdentity.found">
<label class="row" >Display Name: </label>
<span class="row">{{ props.userIdentity.displayName }}</span>
</div>
<div class="row" v-if="!props.userIdentity.found">
<div class="col d-flex align-items-center" v-if="!props.userIdentity.found">
<span class="px-0 invalid"> User does not exist </span>
</div>
</template>
Expand All @@ -28,6 +36,18 @@ const props = defineProps<{
<style lang="scss" scoped>
@import '@/assets/styles/styles.scss';

label {
color: $light-text-primary;
margin: 0 0 0.75rem !important;
}

span {
margin: 0 !important;
font-size: 0.875rem;
line-height: 1.25rem;
letter-spacing: 0.01rem;
}

.invalid {
font-size: 0.875em;
color: $light-text-error;
Expand Down
Loading