Skip to content

Instantly share code, notes, and snippets.

View EkaterinaSava's full-sized avatar
👩‍💻

Kate EkaterinaSava

👩‍💻
  • Prague, Czechia
View GitHub Profile
const ratingsArray = restaurant.reviews.map(reviewRating => reviewRating.rating)
const ratingsLength = ratingsArray.length
const ratingsSum = ratingsArray.reduce((sum, current) => sum + current)
const rating = ratingsSum / ratingsLength
const ratingRound = Math.round(rating)
<template lang="pug">
div
.grid-row#wizard_head
.col-lg-10.col-lg-offset-1.col-md-12
h1.lot-master__step-2-heading
span.lot-master__step-2-heading-category(v-text='draft.section')
span.lot-master__step-2-heading-brand(v-text='draft.brand')
.grid-row
.col-lg-10.col-lg-offset-1.col-md-12
<template lang="pug">
.navigation__items
.navigation__item.navigation__item--submenu(v-for="(unity, index) in unities", :class="{ 'opened' : showSubmenu }")
.navigation__item-name.link {{ unity.name }}
.navigation__submenu-toggle(v-on:click="toggleSubmenu")
.navigation__submenu
.grid-container
.grid-row
.col-xs-12
.navigation__submenu-inner
<template lang="pug">
.lot-master__section
.lot-master__subsection
.lot-master__subsection-left
h3.lot-master__subsection-heading Выберите категорию
.lot-master__subsection-desc Верно подобранная категория заметно ускорит продажу&nbsp;лота.<br class="ninja--mobile"> Пожалуйста, сделайте правильный выбор.
.lot-master__subsection-right
.form-row.lot-master__subsection-select
chosen-select(v-model="unity", :search="false", :class-string="'chosen-select form-input'", :placeholder="'Выберите категорию'")
option(v-for="(unity, index) of unities", :value="unity.code") {{ unity.name }}
<template lang="pug">
.lot-master__section
.lot-master__subsection
.lot-master__subsection-left
h3.lot-master__subsection-heading Выберите категорию
.lot-master__subsection-desc Верно подобранная категория заметно ускорит продажу&nbsp;лота.<br class="ninja--mobile"> Пожалуйста, сделайте правильный выбор.
.lot-master__subsection-right
.form-row.lot-master__subsection-select
chosen-select(v-model="unity", :search="false", :class-string="'chosen-select form-input'", :placeholder="'Выберите категорию'")
option(v-for="(unity, index) of unities", :value="unity.code") {{ unity.name }}
import _ from 'lodash';
import { shallowMount } from '@vue/test-utils';
import PreorderDeadlineStep from '@/components/sell/steps/PreorderDeadlineStep.vue';
import WizardStep from '@/store/sell/wizardStep';
describe('PreorderDeadlineStep.vue', () => {
global._ = _;
let defaultWizardStepData;