Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #174 from ergonode/release/v0.5.0
Browse files Browse the repository at this point in the history
Release/v0.5.0
  • Loading branch information
bleto authored Sep 30, 2019
2 parents 4fd057d + f676e9c commit 1c1636b
Show file tree
Hide file tree
Showing 256 changed files with 5,124 additions and 1,597 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ nuxt.config.js
package.json
router.js
node_modules/
tests/
cypress/
tests/
build/
coverage/
lib/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# CHANGELOG
This changelog references the relevant changes.

## CHANGELOG FOR v0.5.0

- feature [#154](https://github.com/ergonode/frontend/issues/154) Segments + condition sets

## CHANGELOG FOR v0.4.0

- feature [#78](https://github.com/ergonode/frontend/issues/78) Modularity - pages
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<p align="center">
<a href="https://ergonode.com">
<img src="https://img.shields.io/badge/version-0.4.0-4c9aff.svg" alt="Version">
<img src="https://img.shields.io/badge/version-0.5.0-4c9aff.svg" alt="Version">
</a>
<a href="https://ergonode.com">
<img src="https://img.shields.io/badge/version%20code-Vegas-00bc87.svg" alt="Code Version">
Expand Down
14 changes: 4 additions & 10 deletions assets/scss/navigation/menu-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
&__title {
@include setFont(medium, small, regular, $darkGrey, 0.5);
position: relative;
width: 100%;
padding: 12px 16px;
text-align: left;
text-transform: uppercase;

&::after {
Expand Down Expand Up @@ -62,22 +62,16 @@

&__link {
display: flex;
justify-content: flex-start;
align-items: center;
height: 100%;
text-decoration: none;
padding: 0 24px;

& .link-icon {
margin-right: 24px;
}

& .link-text {
@include setFont(medium, medium, medium, $graphite);
display: flex;
flex: 1;
align-items: center;
height: 100%;

margin-left: 24px;
text-align: left;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/navigation/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
.side-bar-wrapper {
position: relative;
z-index: 9990;
z-index: 9999;
background-color: $white;
transition:
width 0.3s,
Expand Down
5 changes: 3 additions & 2 deletions components/Alerts/Alert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<div :class="['alert', typeClass]">
<Component :is="feedbackIconComponent" />
<span
class="alert__title typo-subtitle txt--dark-graphite txt-fixed"
class="alert__title typo-subtitle txt--dark-graphite"
v-text="alert.message" />
<Button
fab
color="transparent"
@click.native="() => removeAlert(alert)">
<template v-slot:prepend>
<template #prepend>
<IconClose />
</template>
</Button>
Expand Down Expand Up @@ -70,6 +70,7 @@ export default {
&__title {
margin-left: 16px;
flex: 1;
word-break: break-word;
}
&--error {
Expand Down
29 changes: 29 additions & 0 deletions components/Badges/StatusBadge.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved.
* See LICENSE for license details.
*/
<template>
<div
class="status-badge"
:style="{backgroundColor: color}" />
</template>

<script>
export default {
name: 'StatusBadge',
props: {
color: {
type: String,
required: true,
},
},
};
</script>

<style lang="scss" scoped>
.status-badge {
width: 8px;
height: 8px;
border-radius: 50%;
}
</style>
30 changes: 9 additions & 21 deletions components/Card/AttributeTranslationCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
*/
<template>
<BaseCard modal>
<div
slot="header"
class="card-header">
<span
class="typo-title txt--dark-graphite"
v-text="selectedLanguage" />
</div>
<template #header>
<div class="card-header">
<span
class="typo-title txt--dark-graphite"
v-text="selectedLanguage" />
</div>
</template>
<Divider />
<div class="modal-container">
<template #modal>
<TextField
:value="translations.label[languageCode]"
solid
Expand Down Expand Up @@ -46,7 +46,7 @@
:language-code="languageCode"
:disabled="!isUserAllowedToUpdate" />
</template>
</div>
</template>
</BaseCard>
</template>

Expand Down Expand Up @@ -113,15 +113,3 @@ export default {
},
};
</script>

<style lang="scss" scoped>
.card-header {
padding: 16px 24px;
}
.modal-container {
display: grid;
grid-row-gap: 16px;
margin: 0 24px 16px;
}
</style>
10 changes: 2 additions & 8 deletions components/Card/AttributesListTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
v-else
header="Attributes"
@searchResult="onSearch" />
<AttributesList
:language-code="languageCode"
:dragging-disabled="disabled" />
<AttributesList :language-code="languageCode" />
<div class="add-btn-wrapper">
<Button
fab
:disabled="!$hasAccess('ATTRIBUTE_CREATE')"
@click.native="addNewAttribute">
<template v-slot:prepend>
<template #prepend>
<IconAdd fill-color="#fff" />
</template>
</Button>
Expand All @@ -49,10 +47,6 @@ export default {
type: Boolean,
default: true,
},
disabled: {
type: Boolean,
default: false,
},
},
data() {
return {
Expand Down
13 changes: 13 additions & 0 deletions components/Card/BaseCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<slot name="header" />
<div class="base-card__content">
<slot />
<div class="modal-container">
<slot name="modal" />
</div>
</div>
</div>
</template>
Expand Down Expand Up @@ -42,6 +45,16 @@ export default {
0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 3px 1px -2px rgba(0, 0, 0, 0.12),
0 1px 5px 0 rgba(0, 0, 0, 0.2);
& > .card-header {
padding: 16px 24px;
}
.modal-container {
display: grid;
grid-row-gap: 16px;
margin: 0 24px 16px;
}
}
&__content {
Expand Down
54 changes: 54 additions & 0 deletions components/Card/Cards/ConditionSetBaseCard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved.
* See LICENSE for license details.
*/
<template>
<BaseCard>
<TextField
:value="code"
solid
regular
required
:error-messages="errorCodeMessage"
:disabled="isDisabled || isDisabledByPrivileges"
label="Code"
hint="Code must be unique"
@input="setCode($event)"
/>
</BaseCard>
</template>

<script>
import { mapState, mapActions } from 'vuex';
import BaseCard from '~/components/Card/BaseCard';
import errorValidationMixin from '~/mixins/validations/errorValidationMixin';
export default {
name: 'ConditionSetBaseCard',
components: {
BaseCard,
TextField: () => import('~/components/Inputs/TextField'),
},
mixins: [errorValidationMixin],
computed: {
...mapState('conditions', {
id: state => state.id,
code: state => state.code,
}),
isDisabled() {
return Boolean(this.id);
},
isDisabledByPrivileges() {
return (this.isDisabled && !this.$hasAccess('CONDITION_UPDATE'))
|| (!this.isDisabled && !this.$hasAccess('CONDITION_CREATE'));
},
errorCodeMessage() {
const codeIndex = 'code';
return this.elementIsValidate(codeIndex);
},
},
methods: {
...mapActions('conditions', ['setCode']),
},
};
</script>
68 changes: 68 additions & 0 deletions components/Card/Cards/ConditionSetTranslationCard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved.
* See LICENSE for license details.
*/
<template>
<BaseCard modal>
<template #header>
<div class="card-header">
<span
class="typo-title txt--dark-graphite"
v-text="selectedLanguage" />
</div>
</template>
<Divider />
<template #modal>
<TextField
:value="translations.name[languageCode]"
solid
label="Segment name"
regular
:error-messages="errorNameMessage"
:disabled="!isUserAllowedToUpdate"
@input="(value) => setTranslationPropertyValue(value, 'name')" />
<TextArea
:value="translations.description[languageCode]"
solid
label="Description"
resize="vertical"
:style="{height: '150px'}"
:error-messages="errorDescriptionMessage"
:disabled="!isUserAllowedToUpdate"
@input="(value) => setTranslationPropertyValue(value, 'description')" />
</template>
</BaseCard>
</template>

<script>
import errorValidationMixin from '~/mixins/validations/errorValidationMixin';
import translationCardMixin from '~/mixins/card/translationCardMixin';
import TextField from '~/components/Inputs/TextField';
import TextArea from '~/components/Inputs/TextArea';
import Divider from '~/components/Dividers/Divider';
import BaseCard from '~/components/Card/BaseCard';
export default {
name: 'ConditionSetTranslationCard',
components: {
Divider,
TextField,
TextArea,
BaseCard,
},
mixins: [errorValidationMixin, translationCardMixin],
computed: {
isUserAllowedToUpdate() {
return this.$hasAccess('CONDITION_UPDATE');
},
errorDescriptionMessage() {
const placeholderIndex = `description_${this.languageCode}`;
return this.elementIsValidate(placeholderIndex);
},
errorNameMessage() {
const hintIndex = `name_${this.languageCode}`;
return this.elementIsValidate(hintIndex);
},
},
};
</script>
Loading

0 comments on commit 1c1636b

Please sign in to comment.