Update add room entry button

This commit is contained in:
Ramon Wenger 2021-08-25 14:22:20 +02:00
parent 64c5963490
commit cf5a3f7d9d
4 changed files with 40 additions and 24 deletions

View File

@ -0,0 +1,9 @@
<template>
<svg
viewBox="16 16 23 23"
xmlns="http://www.w3.org/2000/svg">
<path
d="M33.855 23.7749H26.215V16.1349C26.215 15.4584 25.6666 14.9099 24.99 14.9099C24.3135 14.9099 23.765 15.4584 23.765 16.1349V23.7749H16.125C15.4485 23.7749 14.9 24.3234 14.9 24.9999C14.9 25.6765 15.4485 26.2249 16.125 26.2249H23.765V33.8649C23.765 34.5415 24.3135 35.0899 24.99 35.0899C25.6666 35.0899 26.215 34.5415 26.215 33.8649V26.2249H33.855C34.5316 26.2249 35.08 25.6765 35.08 24.9999C35.08 24.3234 34.5316 23.7749 33.855 23.7749Z"
/>
</svg>
</template>

View File

@ -3,18 +3,19 @@
class="add-room-entry-button"
data-cy="add-room-entry-button"
@click="addRoomEntry">
<add-icon class="add-room-entry-button__icon"/>
<plus-icon class="add-room-entry-button__icon"/>
<span class="add-room-entry-button__text">Beitrag erfassen</span>
</div>
</template>
<script>
import AddIcon from '@/components/icons/AddIcon';
import PlusIcon from '@/components/icons/PlusIcon';
export default {
props: ['parent'],
components: {
AddIcon
PlusIcon
},
methods: {
@ -26,8 +27,7 @@
</script>
<style scoped lang="scss">
@import "@/styles/_variables.scss";
@import "@/styles/_mixins.scss";
@import "~styles/helpers";
.add-room-entry-button {
border: 2px solid $color-white;
@ -47,8 +47,14 @@
}
&__icon {
width: 80px;
width: 20px;
fill: $color-white;
margin-right: $small-spacing;
}
&__text {
@include regular-text;
color: $color-white;
}
}
</style>

View File

@ -1,30 +1,30 @@
user_data = [
{
'teacher': ('Ross', 'Geller',),
'teacher': ('Ross', 'Geller', 'https://ucarecdn.com/fe10f9cc-a509-4170-9396-258abc418247/'),
'class': 'Friends',
'code': 'XXXX',
'students': [
('Rachel', 'Green'),
('Monica', 'Geller'),
('Chandler', 'Bing'),
('Joey', 'Tribbiani'),
('Phoebe', 'Buffay'),
('Rachel', 'Green', 'https://ucarecdn.com/9652f8a6-c510-4ad9-94ad-93268ea1a1ef/'),
('Monica', 'Geller', ''),
('Chandler', 'Bing', ''),
('Joey', 'Tribbiani', ''),
('Phoebe', 'Buffay', ''),
]
},
{
'teacher': ('Michael', 'Scott',),
'teacher': ('Michael', 'Scott', ''),
'class': 'Scranton',
'code': 'YYYY',
'students': [
('Jim', 'Halpert'),
('Pam', 'Beasley'),
('Dwight', 'Schrute'),
('Stanley', 'Hudson'),
('Angela', 'Kinsey'),
('Creed', 'Bratton'),
('Toby', 'Flenderson'),
('Kelly', 'Kapoor'),
('Kevin', 'Malone'),
('Jim', 'Halpert', ''),
('Pam', 'Beasley', ''),
('Dwight', 'Schrute', ''),
('Stanley', 'Hudson', ''),
('Angela', 'Kinsey', ''),
('Creed', 'Bratton', ''),
('Toby', 'Flenderson', ''),
('Kelly', 'Kapoor', ''),
('Kevin', 'Malone', ''),
]
}
]

View File

@ -56,7 +56,7 @@ def create_users(data=None):
hep_id = 1
for school_class in data:
first, last = school_class.get('teacher')
first, last, avatar_url = school_class.get('teacher')
teacher = UserFactory(
username='{}.{}'.format(first, last).lower(),
first_name=first,
@ -64,7 +64,8 @@ def create_users(data=None):
email='{}.{}@skillbox.example'.format(first, last).lower(),
onboarding_visited=True,
license_expiry_date=in_a_week,
hep_id=hep_id
hep_id=hep_id,
avatar_url=avatar_url
)
UserRole.objects.create(user=teacher, role=teacher_role)