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 #672 from ergonode/release/v1.0.0-beta.8
v1.0.0 beta.8
- Loading branch information
Showing
323 changed files
with
7,594 additions
and
3,634 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
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 |
---|---|---|
|
@@ -14,5 +14,5 @@ | |
"message": "chore(release): %s" | ||
} | ||
}, | ||
"version": "1.0.0-beta.7" | ||
"version": "1.0.0-beta.8" | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@ergonode/activity-logs", | ||
"version": "1.0.0-beta.7", | ||
"version": "1.0.0-beta.8", | ||
"author": "Team Ergonode <[email protected]>", | ||
"description": "Ergonode activity logs module", | ||
"license": "OSL-3.0", | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@ergonode/attributes", | ||
"version": "1.0.0-beta.7", | ||
"version": "1.0.0-beta.8", | ||
"author": "Team Ergonode <[email protected]>", | ||
"description": "Ergonode attributes module", | ||
"license": "OSL-3.0", | ||
|
100 changes: 100 additions & 0 deletions
100
...les/@ergonode/attributes/src/components/Buttons/UpdateAttributeGroupTranslationButton.vue
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,100 @@ | ||
/* | ||
* Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved. | ||
* See LICENSE for license details. | ||
*/ | ||
<template> | ||
<FeedbackProvider | ||
:errors="errors" | ||
:change-values="changeValues"> | ||
<template #default="{ hasValueToSave }"> | ||
<Button | ||
data-cy="submit" | ||
:title="$t('core.buttons.submit')" | ||
:floating="{ bottom: '24px', right: '24px' }" | ||
:disabled="!isAllowedToUpdate" | ||
@click.native="onSubmit"> | ||
<template #prepend="{ color }"> | ||
<IconSpinner | ||
v-if="isSubmitting" | ||
:fill-color="color" /> | ||
<IconSync | ||
v-else-if="hasValueToSave" | ||
:fill-color="color" /> | ||
</template> | ||
</Button> | ||
</template> | ||
</FeedbackProvider> | ||
</template> | ||
|
||
<script> | ||
import PRIVILEGES from '@Attributes/config/privileges'; | ||
import { | ||
ALERT_TYPE, | ||
} from '@Core/defaults/alerts'; | ||
import updateButtonFeedbackMixin from '@Core/mixins/feedback/updateButtonFeedbackMixin'; | ||
import Button from '@UI/components/Button/Button'; | ||
import FeedbackProvider from '@UI/components/Feedback/FeedbackProvider'; | ||
import IconSpinner from '@UI/components/Icons/Feedback/IconSpinner'; | ||
import IconSync from '@UI/components/Icons/Feedback/IconSync'; | ||
import { | ||
mapActions, | ||
} from 'vuex'; | ||
export default { | ||
name: 'UpdateAttributeGroupTranslationButton', | ||
components: { | ||
FeedbackProvider, | ||
Button, | ||
IconSpinner, | ||
IconSync, | ||
}, | ||
mixins: [ | ||
updateButtonFeedbackMixin, | ||
], | ||
data() { | ||
return { | ||
isSubmitting: false, | ||
}; | ||
}, | ||
computed: { | ||
isAllowedToUpdate() { | ||
return this.$hasAccess([ | ||
PRIVILEGES.ATTRIBUTE_GROUP.update, | ||
]); | ||
}, | ||
}, | ||
methods: { | ||
...mapActions('attributeGroup', [ | ||
'updateAttributeGroup', | ||
]), | ||
onSubmit() { | ||
if (this.isSubmitting) { | ||
return; | ||
} | ||
this.isSubmitting = true; | ||
this.removeScopeErrors(this.scope); | ||
this.updateAttributeGroup({ | ||
scope: this.scope, | ||
onSuccess: this.onUpdateSuccess, | ||
onError: this.onUpdateError, | ||
}); | ||
}, | ||
onUpdateSuccess() { | ||
this.$addAlert({ | ||
type: ALERT_TYPE.SUCCESS, | ||
message: this.$t('attributeGroup.messages.updateTranslationSuccess'), | ||
}); | ||
this.isSubmitting = false; | ||
this.markChangeValuesAsSaved(this.scope); | ||
}, | ||
onUpdateError(errors) { | ||
this.onError(errors); | ||
this.isSubmitting = false; | ||
}, | ||
}, | ||
}; | ||
</script> |
100 changes: 100 additions & 0 deletions
100
modules/@ergonode/attributes/src/components/Buttons/UpdateAttributeTranslationButton.vue
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,100 @@ | ||
/* | ||
* Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved. | ||
* See LICENSE for license details. | ||
*/ | ||
<template> | ||
<FeedbackProvider | ||
:errors="errors" | ||
:change-values="changeValues"> | ||
<template #default="{ hasValueToSave }"> | ||
<Button | ||
data-cy="submit" | ||
:title="$t('core.buttons.submit')" | ||
:floating="{ bottom: '24px', right: '24px' }" | ||
:disabled="!isAllowedToUpdate" | ||
@click.native="onSubmit"> | ||
<template #prepend="{ color }"> | ||
<IconSpinner | ||
v-if="isSubmitting" | ||
:fill-color="color" /> | ||
<IconSync | ||
v-else-if="hasValueToSave" | ||
:fill-color="color" /> | ||
</template> | ||
</Button> | ||
</template> | ||
</FeedbackProvider> | ||
</template> | ||
|
||
<script> | ||
import PRIVILEGES from '@Attributes/config/privileges'; | ||
import { | ||
ALERT_TYPE, | ||
} from '@Core/defaults/alerts'; | ||
import updateButtonFeedbackMixin from '@Core/mixins/feedback/updateButtonFeedbackMixin'; | ||
import Button from '@UI/components/Button/Button'; | ||
import FeedbackProvider from '@UI/components/Feedback/FeedbackProvider'; | ||
import IconSpinner from '@UI/components/Icons/Feedback/IconSpinner'; | ||
import IconSync from '@UI/components/Icons/Feedback/IconSync'; | ||
import { | ||
mapActions, | ||
} from 'vuex'; | ||
export default { | ||
name: 'UpdateAttributeTranslationButton', | ||
components: { | ||
FeedbackProvider, | ||
Button, | ||
IconSpinner, | ||
IconSync, | ||
}, | ||
mixins: [ | ||
updateButtonFeedbackMixin, | ||
], | ||
data() { | ||
return { | ||
isSubmitting: false, | ||
}; | ||
}, | ||
computed: { | ||
isAllowedToUpdate() { | ||
return this.$hasAccess([ | ||
PRIVILEGES.ATTRIBUTE.update, | ||
]); | ||
}, | ||
}, | ||
methods: { | ||
...mapActions('attribute', [ | ||
'updateAttribute', | ||
]), | ||
onSubmit() { | ||
if (this.isSubmitting) { | ||
return; | ||
} | ||
this.isSubmitting = true; | ||
this.removeScopeErrors(this.scope); | ||
this.updateAttribute({ | ||
scope: this.scope, | ||
onSuccess: this.onUpdateSuccess, | ||
onError: this.onUpdateError, | ||
}); | ||
}, | ||
onUpdateSuccess() { | ||
this.$addAlert({ | ||
type: ALERT_TYPE.SUCCESS, | ||
message: this.$t('attribute.messages.updateTranslationSuccess'), | ||
}); | ||
this.isSubmitting = false; | ||
this.markChangeValuesAsSaved(this.scope); | ||
}, | ||
onUpdateError(errors) { | ||
this.onError(errors); | ||
this.isSubmitting = false; | ||
}, | ||
}, | ||
}; | ||
</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
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
Oops, something went wrong.