Format code according to new library rules

This commit is contained in:
Daniel Egger 2023-03-31 10:07:27 +02:00
parent 5661221ce6
commit edcfab1dd3
20 changed files with 64 additions and 78 deletions

View File

@ -29,7 +29,7 @@ async function changeLocale(language: AvailableLanguages) {
</MenuButton>
<div class="relative">
<MenuItems
class="lg:right- absolute -top-24 -right-2/3 w-40 bg-white px-4 py-4 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none"
class="lg:right- absolute -right-2/3 -top-24 w-40 bg-white px-4 py-4 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none"
>
<MenuItem v-for="locale in SUPPORT_LOCALES" :key="locale" class="py-1">
<button

View File

@ -134,10 +134,10 @@ const profileDropdownData: DropdownListItem[] = [
<div class="flex items-center justify-between">
<div class="flex items-center">
<router-link to="/" class="flex">
<it-icon-vbv class="mr-3 -mt-6 -ml-3 h-8 w-16" />
<it-icon-vbv class="-ml-3 -mt-6 mr-3 h-8 w-16" />
</router-link>
<router-link to="/" class="flex">
<div class="ml-1 border-l border-white pr-10 pl-3 text-2xl text-white">
<div class="ml-1 border-l border-white pl-3 pr-10 text-2xl text-white">
{{ $t("general.title") }}
</div>
</router-link>
@ -185,7 +185,7 @@ const profileDropdownData: DropdownListItem[] = [
<div
v-if="appStore.userLoaded && appStore.routingFinished && userStore.loggedIn"
:class="state.showMenu ? 'flex' : 'hidden'"
class="mt-8 flex-auto lg:mt-0 lg:flex lg:flex-row lg:items-center lg:space-y-0 lg:space-x-10"
class="mt-8 flex-auto lg:mt-0 lg:flex lg:flex-row lg:items-center lg:space-x-10 lg:space-y-0"
>
<!-- <router-link-->
<!-- v-if="inCourse() && courseSessionsStore.courseSessionForRoute"-->

View File

@ -26,7 +26,7 @@ const props = withDefaults(defineProps<Props>(), {
></it-icon-smiley-thinking>
<it-icon-smiley-neutral v-else></it-icon-smiley-neutral>
</div>
<div class="mb-4 pr-5 lg:mr-10 lg:mb-0">
<div class="mb-4 pr-5 lg:mb-0 lg:mr-10">
<h4 class="text-bold mb-2">
{{ criteria.competence_id }} {{ criteria.title }}
</h4>

View File

@ -26,7 +26,7 @@ defineEmits(["next", "exit"]);
<div>
<div class="h-full"></div>
<!-- just here to not make the footer jump during the transition -->
<div class="absolute top-0 bottom-0 w-full bg-white">
<div class="absolute bottom-0 top-0 w-full bg-white">
<div class="h-content overflow-y-scroll">
<header
class="relative flex h-12 w-full items-center justify-between bg-white px-4 py-4 lg:h-16 lg:px-8"

View File

@ -18,7 +18,7 @@ defineEmits(["back", "continue"]);
<template>
<div>
<nav class="mt-16 mb-4 flex">
<nav class="mb-4 mt-16 flex">
<button
v-if="showBackButton"
class="btn-secondary mr-2 flex items-center"

View File

@ -29,7 +29,7 @@ const props = withDefaults(defineProps<Props>(), {
<div
v-if="icon"
:class="[`bg-${icon}`]"
class="-ml-8 h-32 bg-contain bg-left bg-no-repeat lg:ml-0 lg:-mr-8 lg:block lg:w-2/6 lg:bg-right"
class="-ml-8 h-32 bg-contain bg-left bg-no-repeat lg:-mr-8 lg:ml-0 lg:block lg:w-2/6 lg:bg-right"
></div>
</div>
</template>

View File

@ -43,7 +43,7 @@ function onNotificationClick(notification: Notification) {
<template>
<div
v-if="0 === state.notifications.length"
class="mt-14 mb-14 text-center text-black"
class="mb-14 mt-14 text-center text-black"
data-cy="no-notifications"
>
{{ $t("notifications.no_notifications") }}

View File

@ -20,7 +20,7 @@ function setIsOpen(value: boolean) {
<Dialog :open="modelValue" class="relative z-50" @close="setIsOpen">
<div class="fixed inset-0 bg-black/30" aria-hidden="true"></div>
<div class="fixed inset-0 flex items-center justify-center p-4">
<DialogPanel class="w-full max-w-2xl bg-white px-8 pt-8 pb-4">
<DialogPanel class="w-full max-w-2xl bg-white px-8 pb-4 pt-8">
<DialogTitle class="relative mb-8 flex flex-row">
<slot name="title"></slot>
<button

View File

@ -47,7 +47,7 @@ const endBadgeClasses = computed(() => {
<div v-for="step in props.steps" :key="step" class="flex flex-row">
<hr class="w-16 self-center border border-[1px] border-gray-400" />
<div
class="inline-flex h-7 w-7 items-center justify-center rounded-full py-1 px-3"
class="inline-flex h-7 w-7 items-center justify-center rounded-full px-3 py-1"
:class="getPillClasses(step)"
>
{{ step }}

View File

@ -7,7 +7,7 @@
{{ label }}
</RadioGroupLabel>
<div
class="align-items-center flex flex-col justify-between justify-items-center space-y-6 md:flex-row md:space-y-0 md:space-x-6"
class="align-items-center flex flex-col justify-between justify-items-center space-y-6 md:flex-row md:space-x-6 md:space-y-0"
>
<RadioGroupOption
v-for="item in items"

View File

@ -29,7 +29,7 @@ onMounted(async () => {
{{ $t("dashboard.welcome", { name: userStore.first_name }) }}
</h1>
<div v-if="courseSessionsStore.courseSessions.length > 0" class="mb-14">
<h2 class="mt-12 mb-3">Kurse</h2>
<h2 class="mb-3 mt-12">Kurse</h2>
<div class="grid auto-rows-fr grid-cols-1 gap-4 md:grid-cols-2">
<div

View File

@ -39,7 +39,7 @@ const userStore = useUserStore();
v-model="state.username"
type="text"
name="username"
class="mt-1 block w-96 max-w-full border py-2 px-3"
class="mt-1 block w-96 max-w-full border px-3 py-2"
/>
</div>
<div class="mb-4">
@ -49,7 +49,7 @@ const userStore = useUserStore();
v-model="state.password"
type="password"
name="password"
class="mt-1 block w-96 max-w-full border py-2 px-3"
class="mt-1 block w-96 max-w-full border px-3 py-2"
/>
</div>

View File

@ -50,7 +50,7 @@ onMounted(async () => {
<template>
<div class="bg-gray-200">
<div class="container-large">
<header class="mt-12 mb-8">
<header class="mb-8 mt-12">
<h1>{{ $t("general.settings") }}</h1>
</header>
<main>

View File

@ -134,7 +134,7 @@ function log(data: any) {
Use them like &lt;it-icon-message/&gt;
</p>
<div class="mt-8 mb-8 flex flex-col flex-wrap gap-4 lg:flex-row">
<div class="mb-8 mt-8 flex flex-col flex-wrap gap-4 lg:flex-row">
<div class="inline-flex flex-col">
message
<it-icon-message class="it-icon" />
@ -191,7 +191,7 @@ function log(data: any) {
</div>
</div>
<div class="mt-8 mb-8 flex flex-col flex-wrap gap-4 lg:flex-row">
<div class="mb-8 mt-8 flex flex-col flex-wrap gap-4 lg:flex-row">
<div class="inline-flex flex-col">
ls-apply
<it-icon-ls-apply />
@ -228,7 +228,7 @@ function log(data: any) {
</div>
</div>
<div class="mt-8 mb-8 flex flex-col flex-wrap gap-4 lg:flex-row">
<div class="mb-8 mt-8 flex flex-col flex-wrap gap-4 lg:flex-row">
<div class="inline-flex flex-col">
lc-assignment
<it-icon-lc-assignment />
@ -275,7 +275,7 @@ function log(data: any) {
</div>
</div>
<div class="mt-8 mb-8 flex flex-col flex-wrap gap-4 lg:flex-row">
<div class="mb-8 mt-8 flex flex-col flex-wrap gap-4 lg:flex-row">
<div class="inline-flex flex-col">
smiley-happy
<it-icon-smiley-happy />
@ -292,7 +292,7 @@ function log(data: any) {
</div>
</div>
<div class="mt-8 mb-8 flex flex-col flex-wrap gap-4 lg:flex-row">
<div class="mb-8 mt-8 flex flex-col flex-wrap gap-4 lg:flex-row">
<div class="inline-flex flex-col text-orange-500">
message big
<it-icon-message class="h-16 w-16 text-orange-500" />
@ -361,7 +361,7 @@ function log(data: any) {
<h2 class="heading-1">Components</h2>
</div>
<h2 class="mt-8 mb-8">Buttons</h2>
<h2 class="mb-8 mt-8">Buttons</h2>
<div class="mb-16 flex flex-col flex-wrap content-center gap-4 lg:flex-row">
<button class="btn-primary">Primary</button>
@ -394,7 +394,7 @@ function log(data: any) {
<button type="button" class="btn-primary inline-flex items-center px-3 py-2">
Button text
<it-icon-message class="ml-3 -mr-1 h-5 w-5"></it-icon-message>
<it-icon-message class="-mr-1 ml-3 h-5 w-5"></it-icon-message>
</button>
<button type="button" class="btn-text inline-flex items-center px-3 py-2">
@ -403,7 +403,7 @@ function log(data: any) {
</button>
</div>
<h2 class="mt-8 mb-8">Dropdown (Work-in-progress)</h2>
<h2 class="mb-8 mt-8">Dropdown (Work-in-progress)</h2>
<ItDropdownSelect
v-model="state.dropdownSelected"
@ -412,7 +412,7 @@ function log(data: any) {
></ItDropdownSelect>
{{ state.dropdownSelected }}
<h2 class="mt-8 mb-8">Checkbox</h2>
<h2 class="mb-8 mt-8">Checkbox</h2>
<ItCheckbox
:checkbox_item="{
@ -441,7 +441,7 @@ function log(data: any) {
Disabled
</ItCheckbox>
<h2 class="mt-8 mb-8">Checkbox Group</h2>
<h2 class="mb-8 mt-8">Checkbox Group</h2>
<ItCheckboxGroup
label="Label"
@ -466,7 +466,7 @@ function log(data: any) {
]"
/>
<h2 class="mt-8 mb-8">Dropdown</h2>
<h2 class="mb-8 mt-8">Dropdown</h2>
<div class="h-60">
<ItDropdown
@ -500,7 +500,7 @@ function log(data: any) {
<HorizontalBarChart title="Frage X" text="Fragentext" :items="barChartItems" />
</div>
<h2 class="mt-8 mb-8">LearningPathCircle</h2>
<h2 class="mb-8 mt-8">LearningPathCircle</h2>
<LearningPathCircle
class="h-48 w-48"
@ -520,11 +520,11 @@ function log(data: any) {
]"
></LearningPathCircle>
<h2 class="mt-8 mb-8">ItToggleSwitch</h2>
<h2 class="mb-8 mt-8">ItToggleSwitch</h2>
<ItToggleSwitch></ItToggleSwitch>
<h2 class="mt-8 mb-8">ItNavigationProgress</h2>
<h2 class="mb-8 mt-8">ItNavigationProgress</h2>
<ItNavigationProgress
:steps="4"

View File

@ -61,7 +61,7 @@ function setActiveClasses(isActive: boolean) {
</div>
</header>
<main>
<div v-if="learningPath" class="mb-8 w-full bg-white pt-8 pb-4">
<div v-if="learningPath" class="mb-8 w-full bg-white pb-4 pt-8">
<LearningPathDiagram
class="mx-auto max-h-[90px] w-full max-w-[1920px] px-4 lg:max-h-[380px]"
diagram-type="horizontal"

View File

@ -93,7 +93,7 @@ function updateActiveState(status: CourseCompletionStatus) {
'bg-gray-200': activeMenuItem.id === item.id,
'mr-6': item.id !== 'unknown',
}"
class="mr-6 inline-block py-4 px-2"
class="mr-6 inline-block px-2 py-4"
@click="updateActiveState(item.id)"
>
<div class="flex flex-row items-center">

View File

@ -55,7 +55,7 @@ findCriteria();
</script>
<template>
<div v-if="competencePage" class="absolute top-0 bottom-0 w-full bg-white">
<div v-if="competencePage" class="absolute bottom-0 top-0 w-full bg-white">
<LearningContentContainer
:title="''"
:next-button-text="$t('general.save')"

View File

@ -280,7 +280,7 @@ async function uploadDocument(data: DocumentUploadData) {
v-for="expert in courseSessionsStore.circleExperts"
:key="expert.user_id"
>
<div class="mt-2 mb-2 flex flex-row items-center">
<div class="mb-2 mt-2 flex flex-row items-center">
<img
class="mr-2 h-[45px] rounded-full"
:src="expert.avatar_url"

View File

@ -96,28 +96,28 @@ svg {
}
.btn-primary {
@apply inline-block border-2 border-blue-900 bg-blue-900 py-2
px-4 align-middle font-semibold text-white
@apply inline-block border-2 border-blue-900 bg-blue-900 px-4
py-2 align-middle font-semibold text-white
hover:border-blue-700 hover:bg-blue-700
disabled:cursor-not-allowed disabled:opacity-50;
}
.btn-secondary {
@apply inline-block border-2 border-blue-900 bg-white py-2
px-4 align-middle font-semibold text-blue-900
@apply inline-block border-2 border-blue-900 bg-white px-4
py-2 align-middle font-semibold text-blue-900
hover:bg-gray-200
disabled:cursor-not-allowed disabled:opacity-50;
}
.btn-blue {
@apply inline-block border-2 border-sky-500 bg-sky-500 py-2
px-4 align-middle font-semibold text-blue-900
@apply inline-block border-2 border-sky-500 bg-sky-500 px-4
py-2 align-middle font-semibold text-blue-900
hover:border-sky-400 hover:bg-sky-400
disabled:cursor-not-allowed disabled:opacity-50;
}
.btn-text {
@apply inline-block py-2 px-4 align-middle font-normal
@apply inline-block px-4 py-2 align-middle font-normal
text-blue-900
hover:text-gray-700
disabled:cursor-not-allowed disabled:opacity-50;

View File

@ -39,12 +39,17 @@ ADMIN_EMAILS = ["info@iterativ.ch", "admin"]
@click.command()
@click.option('--course', '-c', multiple=True, default=[
@click.option(
"--course",
"-c",
multiple=True,
default=[
COURSE_TEST_ID,
COURSE_UK,
COURSE_VERSICHERUNGSVERMITTLERIN_ID,
COURSE_UK_FR,
])
],
)
def command(course):
print("Creating default courses", course)
@ -112,8 +117,7 @@ def create_versicherungsvermittlerin_course():
experts = [expert1, expert2, expert3]
circles = Circle.objects.filter(
slug__startswith="versicherungsvermittler-in-lp")
circles = Circle.objects.filter(slug__startswith="versicherungsvermittler-in-lp")
for i, circle in enumerate(circles):
expert = experts[i % len(experts)]
expert.expert.add(circle)
@ -143,35 +147,23 @@ def create_course_uk_de():
# figma demo users and data
csu = CourseSessionUser.objects.create(
course_session=cs,
user=User.objects.get(
username="patrizia.huggel@eiger-versicherungen.ch"
),
user=User.objects.get(username="patrizia.huggel@eiger-versicherungen.ch"),
role=CourseSessionUser.Role.EXPERT,
)
csu.expert.add(Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-kickoff"))
csu.expert.add(
Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-kickoff")
)
csu.expert.add(
Circle.objects.get(
slug="überbetriebliche-kurse-lp-circle-haushalt-teil-1"
)
)
csu.expert.add(
Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-fahrzeug")
Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-haushalt-teil-1")
)
csu.expert.add(Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-fahrzeug"))
csu = CourseSessionUser.objects.create(
course_session=cs,
user=User.objects.get(username="andreas.feuz@eiger-versicherungen.ch"),
role=CourseSessionUser.Role.EXPERT,
)
csu.expert.add(
Circle.objects.get(
slug="überbetriebliche-kurse-lp-circle-haushalt-teil-2"
)
)
csu.expert.add(
Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-basis")
Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-haushalt-teil-2")
)
csu.expert.add(Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-basis"))
_csu = CourseSessionUser.objects.create(
course_session=cs,
user=User.objects.get(username="michael.meier@example.com"),
@ -197,9 +189,7 @@ def create_course_uk_de():
_csu = CourseSessionUser.objects.create(
course_session=cs,
user=User.objects.get(
username="patrick.muster@eiger-versicherungen.ch"
),
user=User.objects.get(username="patrick.muster@eiger-versicherungen.ch"),
)
create_feedback(
@ -208,9 +198,7 @@ def create_course_uk_de():
3,
)
create_feedback(
Circle.objects.get(
slug="überbetriebliche-kurse-lp-circle-haushalt-teil-2"
),
Circle.objects.get(slug="überbetriebliche-kurse-lp-circle-haushalt-teil-2"),
cs,
14,
)
@ -259,7 +247,7 @@ def create_course_uk_fr():
cs = CourseSession.objects.create(
course_id=COURSE_UK_FR,
title="Cours hors établissement année 1 - Région Fribourg"
title="Cours hors établissement année 1 - Région Fribourg",
)
csu = CourseSessionUser.objects.create(
@ -268,9 +256,7 @@ def create_course_uk_fr():
role=CourseSessionUser.Role.EXPERT,
)
csu.expert.add(
Circle.objects.get(
slug="course-hors-établissement-lp-circle-coup-denvoi"
)
Circle.objects.get(slug="course-hors-établissement-lp-circle-coup-denvoi")
)
_csu = CourseSessionUser.objects.create(
course_session=cs,