This repository has been archived by the owner on Feb 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from ergonode/release/v0.5.0
Release/v0.5.0
- Loading branch information
Showing
256 changed files
with
5,124 additions
and
1,597 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ nuxt.config.js | |
package.json | ||
router.js | ||
node_modules/ | ||
tests/ | ||
cypress/ | ||
tests/ | ||
build/ | ||
coverage/ | ||
lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.