Skip to content

Commit eb14803

Browse files
authored
refactor(invitation): review user invitation presentation and structure (#1206)
1 parent 5cbc10a commit eb14803

19 files changed

+362
-910
lines changed

yaki_admin/src/features/customer/layouts/CustomerPageContentTeamList.vue

Lines changed: 0 additions & 52 deletions
This file was deleted.

yaki_admin/src/features/invitation/components/InvitationCard.vue

Lines changed: 0 additions & 186 deletions
This file was deleted.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<script setup lang="ts">
2+
import buttonTextIcon from "@/ui/components/buttons/ButtonTextIcon.vue";
3+
import backIcon from "@/assets/icons_svg/Arrow-left.svg";
4+
5+
import router from "@/router/router";
6+
7+
import { useTeamStore } from "@/stores/teamStore";
8+
import { INVITEDROLE } from "@/constants/pathParam.enum";
9+
10+
const teamStore = useTeamStore();
11+
12+
const props = defineProps({
13+
/**
14+
* Role of the invited user,
15+
* used to display the correct title.
16+
* And determine the path to redirect to when clicking on the invitation button.
17+
* using the INVITEDROLE enum, as value.
18+
*/
19+
invitedRole: {
20+
type: String as () => INVITEDROLE,
21+
required: true,
22+
},
23+
});
24+
</script>
25+
26+
<template>
27+
<section class="header__container_invitation">
28+
<div>
29+
<section>
30+
<h1 class="text_default__title_header">
31+
{{
32+
invitedRole === INVITEDROLE.teammate
33+
? "Teammate invitation : "
34+
: "Captain invitation : "
35+
}}
36+
</h1>
37+
38+
<p v-if="invitedRole === INVITEDROLE.teammate">
39+
User will be added to : <span>{{ teamStore.getTeamSelected.teamName }}</span>
40+
</p>
41+
<p v-if="invitedRole === INVITEDROLE.captain">Grant captain rights to the selected user</p>
42+
</section>
43+
44+
<button-text-icon
45+
@click.prevent="router.go(-1)"
46+
:icon="backIcon"
47+
text="Return"
48+
color="button--color-secondary"
49+
/>
50+
</div>
51+
</section>
52+
</template>
53+
54+
<style scoped lang="scss">
55+
.header__container_invitation {
56+
display: flex;
57+
flex-direction: column;
58+
gap: 16px;
59+
60+
padding-block: 44px 24px;
61+
padding-inline: 40px;
62+
63+
figure {
64+
background-color: black;
65+
width: 48px;
66+
height: 48px;
67+
border-radius: 16px;
68+
img {
69+
width: 100%;
70+
object-fit: contain;
71+
}
72+
}
73+
74+
> div {
75+
display: flex;
76+
align-items: flex-start;
77+
justify-content: space-between;
78+
width: 100%;
79+
//figure & text
80+
> section:nth-of-type(1) {
81+
display: flex;
82+
flex-direction: column;
83+
gap: 16px;
84+
85+
p {
86+
padding-inline-start: 1rem;
87+
color: #7d818c;
88+
font-family: Rubik;
89+
font-size: 16px;
90+
font-weight: 400;
91+
92+
span {
93+
font-size: 18px;
94+
font-weight: 600;
95+
}
96+
}
97+
}
98+
}
99+
}
100+
</style>

0 commit comments

Comments
 (0)