Skip to content

Commit

Permalink
Adam's feedback implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
BurgrLada committed Sep 21, 2021
1 parent b47f9bb commit 490949d
Show file tree
Hide file tree
Showing 11 changed files with 332 additions and 292 deletions.
170 changes: 85 additions & 85 deletions src/components/Event/Checkout.vue
Original file line number Diff line number Diff line change
@@ -1,102 +1,102 @@
<template>
<div class="q-px-sm">
<div class="row q-mb-md">
<div class="col-12 col-sm-6 col-md-3 q-py-xs items-stretch">
<q-card class="thin-header-card normal-margin-card">
<q-card-section class="bg-blue-9 text-white card-header">
<div class="row items-center no-wrap">
<div class="col">
<div class="text-h6">{{ $tr('billing.title') }}</div>
<div class="q-px-lg">
<div class="row q-mb-md">
<div class="col-12 col-sm-6 col-md-3 q-py-xs items-stretch">
<q-card class="thin-header-card normal-margin-card">
<q-card-section class="bg-blue-9 text-white card-header">
<div class="row items-center no-wrap">
<div class="col">
<div class="text-h6">{{ $tr('billing.title') }}</div>
</div>
<div class="col-auto">
<billing-menu @selected="changeBilling" />
</div>
</div>
<div class="col-auto">
<billing-menu @selected="changeBilling" />
</div>
</div>
</q-card-section>
</q-card-section>

<q-card-section>
<div v-if="!billingClient">
{{ $auth.user().username }}
</div>
<div v-else>
<p class="q-mb-sm">
<b>{{ billingClient.name }}</b>
<template v-if="billingClient.email">
<br />{{ billingClient.email }}
</template>
</p>
<p class="q-mb-sm" v-if="billingClient.registration_no">
{{ $tr('billing.fields.registration_no') }}:
{{ billingClient.registration_no }}
</p>
<p
class="q-mb-none"
v-if="
<q-card-section>
<div v-if="!billingClient">
{{ $auth.user().username }}
</div>
<div v-else>
<p class="q-mb-sm">
<b>{{ billingClient.name }}</b>
<template v-if="billingClient.email">
<br />{{ billingClient.email }}
</template>
</p>
<p class="q-mb-sm" v-if="billingClient.registration_no">
{{ $tr('billing.fields.registration_no') }}:
{{ billingClient.registration_no }}
</p>
<p
class="q-mb-none"
v-if="
billingClient.street ||
billingClient.city ||
billingClient.zip ||
selectedCountry
"
>
{{ billingClient.street }} <br v-if="billingClient.street" />
{{
billingClient.city
}}
<template v-if="billingClient.zip && billingClient.city"
>,
</template>
{{ billingClient.zip }}
<template v-if="selectedCountry">
<br v-if="billingClient.city || billingClient.zip" />
{{ $tr(selectedCountry) }}
>
{{ billingClient.street }} <br v-if="billingClient.street" />
{{
billingClient.city
}}
<template v-if="billingClient.zip && billingClient.city"
>,
</template>
{{ billingClient.zip }}
<template v-if="selectedCountry">
<br v-if="billingClient.city || billingClient.zip" />
{{ $tr(selectedCountry) }}

<!-- Element has to be mounted in order for API to be loaded -->
<country-select v-show="false" />
</template>
</p>
</div>
</q-card-section>
</q-card>
<!-- Element has to be mounted in order for API to be loaded -->
<country-select v-show="false" />
</template>
</p>
</div>
</q-card-section>
</q-card>
</div>
</div>
</div>

<div class="row -q-mx-sm">
<person-card
v-for="(person, index) in formData"
v-bind:key="JSON.stringify(person)"
:person="person"
:registration="person.registration"
:person-index="index"
:possible-diets="possibleDiets"
@remove="removePerson"
/>
</div>

<div class="q-pt-md row">
<div class="col-12 col-sm-6">
<q-btn
:label="$tr('back')"
color="blue-9"
@click="$emit('goToRolePick')"
class="q-my-xs"
<div class="row -q-mx-sm">
<person-card
v-for="(person, index) in formData"
v-bind:key="JSON.stringify(person)"
:person="person"
:registration="person.registration"
:person-index="index"
:possible-diets="possibleDiets"
@remove="removePerson"
/>
</div>
<div class="col-12 col-sm-6">
<q-btn
:loading="loading"
class="float-right q-my-xs"
size="lg"
color="primary"
@click="sendForm"
>
{{ $tr('submit') }}
<template v-slot:loading>
<q-spinner-hourglass class="on-left" />
{{ $tr('loading') }}
</template>
</q-btn>

<div class="q-pt-md row">
<div class="col-12 col-sm-6">
<q-btn
:label="$tr('back')"
color="blue-9"
@click="$emit('goToRolePick')"
class="q-my-xs"
/>
</div>
<div class="col-12 col-sm-6">
<q-btn
:loading="loading"
class="float-right q-my-xs"
size="lg"
color="primary"
@click="sendForm"
>
{{ $tr('submit') }}
<template v-slot:loading>
<q-spinner-hourglass class="on-left" />
{{ $tr('loading') }}
</template>
</q-btn>
</div>
</div>
</div>
</div>
</template>

Expand Down
10 changes: 9 additions & 1 deletion src/css/components/cards.sass
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.home-infocard
padding: 1.5rem 3rem
margin: 1rem

.debaters-sticky-card
position: sticky
top: 80px
Expand Down Expand Up @@ -30,7 +34,7 @@
display: inline-flex

.q-card.event-header
padding: 4rem
padding: 2rem 3rem
margin-bottom: 6rem

@media (max-width: $breakpoint-sm-max)
Expand Down Expand Up @@ -70,3 +74,7 @@

.col .q-btn
margin-right: .5rem

@media (max-width: $breakpoint-md-max)
.home-infocard
padding: 1rem
103 changes: 56 additions & 47 deletions src/pages/Auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,67 @@
<h1 class="text-center text-h4">{{ $tr("login.title") }}</h1>
<div class="row q-col-gutter-md">
<q-form @submit="login" class="col-12 col-sm-6 q-mt-lg offset-sm-3">
<q-input
outlined
type="email"
v-model="email"
:label="$tr('fields.email')"
lazy-rules
:rules="[val => (val !== null && val !== '') || $tr(`errors.email`),
<q-card class="q-pa-md q-ma-sm">
<q-input
outlined
type="email"
v-model="email"
:label="$tr('fields.email')"
lazy-rules
:rules="[val => (val !== null && val !== '') || $tr(`errors.email`),
val => $validators.validateEmail(val) || $tr('errors.emailFormat')]"
>
<template v-slot:prepend>
<q-icon name="fas fa-at" />
</template>
</q-input>
>
<template v-slot:prepend>
<q-icon name="fas fa-at" />
</template>
</q-input>

<q-input
v-model="password"
outlined
:type="isPwd ? 'password' : 'text'"
:label="$tr('fields.password')"
class="q-mt-sm"
lazy-rules
:rules="[
<q-input
v-model="password"
outlined
:type="isPwd ? 'password' : 'text'"
:label="$tr('fields.password')"
class="q-mt-sm"
lazy-rules
:rules="[
val => (val !== null && val !== '') || $tr('errors.password')
]"
>
<template v-slot:prepend>
<q-icon name="fas fa-key" />
</template>
<template v-slot:append>
<q-icon
:name="isPwd ? 'fas fa eye-slash' : 'fas fa-eye'"
class="cursor-pointer"
@click="isPwd = !isPwd"
/>
</template>
</q-input>
<div class="q-mt-sm q-mb-lg text-center">
{{ $tr("passwordReset.loginQuestion") }}
<router-link :to="$path('auth.passwordReset')">{{
$tr("passwordReset.loginLink")
}}</router-link>
</div>

<div class="text-center">
<q-btn type="submit" color="primary" :loading="loading">
{{ $tr("login.submit") }}
<template v-slot:loading>
<q-spinner-hourglass class="on-left" />
{{ $tr("login.loading") }}
>
<template v-slot:prepend>
<q-icon name="fas fa-key" />
</template>
<template v-slot:append>
<q-icon
:name="isPwd ? 'fas fa eye-slash' : 'fas fa-eye'"
class="cursor-pointer"
@click="isPwd = !isPwd"
/>
</template>
</q-btn>
</div>
</q-input>
<div class="q-mt-sm q-mb-sm text-center">
{{ $tr("passwordReset.loginQuestion") }}
<router-link :to="$path('auth.passwordReset')">{{
$tr("passwordReset.loginLink")
}}</router-link>
</div>
<div class="q-mt-sm q-mb-lg text-center">
{{ $tr("signUp.no_account_yet") }}
<router-link :to="$path('auth.signUp')">{{
$tr("signUp.cta")
}}</router-link>
</div>

<div class="text-center">
<q-btn type="submit" color="primary" :loading="loading">
{{ $tr("login.submit") }}
<template v-slot:loading>
<q-spinner-hourglass class="on-left" />
{{ $tr("login.loading") }}
</template>
</q-btn>
</div>
</q-card>

</q-form>
</div>
</q-page>
Expand Down
Loading

0 comments on commit 490949d

Please sign in to comment.