Merge branch 'master' of gitlab.com:lilcity/backend into feature/LIL-701

remotes/origin/editis_13-01-19
gzbender 7 years ago
commit 270ed7249f
  1. 3
      apps/notification/tasks.py
  2. 23
      web/src/components/FAQ.vue
  3. 17
      web/src/sass/_common.sass

@ -84,6 +84,8 @@ def sendgrid_update_recipients():
for user in users:
last_course_purchase = course_payments.get(user.id) and course_payments.get(user.id).strftime(date_format)
last_school_purchase = school_payments.get(user.id) and school_payments.get(user.id).strftime(date_format)
courses_purchased = CoursePayment.objects.filter(user=user,
status__in=CoursePayment.PW_PAID_STATUSES).values_list('course_id', flat=True)
data.append({
'first_name': user.first_name,
'last_name': user.last_name,
@ -94,6 +96,7 @@ def sendgrid_update_recipients():
# 'gender': {User.NOT_DEFINED: '', User.MALE: 'Мужчина', User.FEMALE: 'Женщина'}[user.gender] if user.gender else '',
'birthday': user.birthday and user.birthday.strftime(date_format),
'date_joined': user.date_joined.strftime(date_format),
'courses_purchased': ','.join(map(str, courses_purchased)) + ',' if courses_purchased else '',
})
sg = get_sendgrid_client()

@ -1,11 +1,10 @@
<template>
<div class="faq">
<div class="faq__item" v-for="faq in faqs" :class="{'faq__item_opened': faq.opened}">
<div class="faq__item-head">
<div class="faq__item-head" @click="open(faq)">
<div class="faq__item-question">{{ faq.question }}</div>
<div class="faq__item-opener">
<svg class="icon" :class="{'icon-arrow-up': faq.opened, 'icon-arrow-down': !faq.opened}"
@click="open(faq)">
<svg class="icon" :class="{'icon-arrow-up': faq.opened, 'icon-arrow-down': !faq.opened}">
<use xlink:href="/static/img/sprite.svg#icon-arrow-down"></use>
</svg>
</div>
@ -32,4 +31,20 @@
}
</script>
<style></style>
<style lang="sass">
.faq
&__item-head
display: flex
background: #f8f8f8
padding: 7px 10px 5px
cursor: pointer
&__item-question
flex: 1
&__item-opener
margin-left: 10px
& .icon
width: 16px
height: 16px
&__item-answer
padding: 10px 10px
</style>

@ -4525,20 +4525,3 @@ a
background: $cyan
&__preview.theme_violet2
background: $viol2
.faq
&__item-head
display: flex
background: #f8f8f8
padding: 7px 10px 5px
&__item-question
flex: 1
&__item-opener
margin-left: 10px
cursor: pointer
& .icon
width: 16px
height: 16px
&__item-answer
padding: 10px 10px

Loading…
Cancel
Save