Skip to content
Snippets Groups Projects
Commit 63da2d85 authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA :bicyclist:
Browse files

Merge branch 'redmine-issue/13534' into 'develop'

REDMINE_ISSUE-13534

See merge request !345
parents c88dc924 44d38818
No related branches found
No related tags found
2 merge requests!424version 3.1.0,!345REDMINE_ISSUE-13534
...@@ -206,15 +206,15 @@ export default { ...@@ -206,15 +206,15 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.ui.divided.items {
.item { .item {
.item-content-wrapper { .item-content-wrapper {
width: 100%; width: 100%;
margin: 0;
padding: 1em 0;
display: flex; display: flex;
align-items: flex-start;
.middle.aligned.content { .middle.aligned.content {
width: 100%;
.header { .header {
font-size: 1.28571429em; font-size: 1.28571429em;
font-weight: 600; font-weight: 600;
...@@ -223,4 +223,31 @@ export default { ...@@ -223,4 +223,31 @@ export default {
} }
} }
} }
> .item:nth-child(2) {
border: none !important;
}
}
@media only screen and (min-width: 767px) {
.item-content-wrapper {
align-items: flex-start;
.middle.aligned.content {
width: 100%;
padding: 0 0 0 1.5em;
}
}
}
@media only screen and (max-width: 767px) {
.item-content-wrapper {
flex-direction: column;
align-items: center;
.middle.aligned.content {
width: 70%;
padding: 1.5em 0 0;
}
}
}
</style> </style>
...@@ -675,8 +675,7 @@ export default { ...@@ -675,8 +675,7 @@ export default {
}, },
toggleDeleteFeatureType(featureType) { toggleDeleteFeatureType(featureType) {
this.featureTypeToDelete = featureType; this.$emit('delete', featureType);
this.$emit('modal', 'deleteFeatureType');
}, },
} }
... ...
......
...@@ -274,6 +274,7 @@ export default { ...@@ -274,6 +274,7 @@ export default {
.project-header { .project-header {
.row { .row {
margin-top: 3em;
.right-column { .right-column {
display: flex; display: flex;
... ...
......
...@@ -75,6 +75,12 @@ export default { ...@@ -75,6 +75,12 @@ export default {
isSubscriber: { isSubscriber: {
type: Boolean, type: Boolean,
default: false default: false
},
featureTypeToDelete: {
type: Object,
default: () => {
return {};
}
} }
}, },
...@@ -91,14 +97,20 @@ export default { ...@@ -91,14 +97,20 @@ export default {
]), ]),
handleModalAction() { handleModalAction() {
this.$emit('action'); this.$emit('action', this.projectModalType);
} }
} }
}; };
</script> </script>
<style lang="less" scoped> <style scoped>
.page {
margin: 0;
min-width: 100%;
z-index: 9999999999;
}
.alert { .alert {
color: red; color: red;
... ...
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
<ProjectFeatureTypes <ProjectFeatureTypes
:loading="projectInfoLoading" :loading="projectInfoLoading"
:project="project" :project="project"
@delete="toggleDeleteFeatureTypeModal"
/> />
</div> </div>
...@@ -110,6 +111,7 @@ ...@@ -110,6 +111,7 @@
<ProjectModal <ProjectModal
:is-subscriber="is_suscriber" :is-subscriber="is_suscriber"
:feature-type-to-delete="featureTypeToDelete"
@action="handleModalAction" @action="handleModalAction"
/> />
</div> </div>
...@@ -247,6 +249,7 @@ export default { ...@@ -247,6 +249,7 @@ export default {
'DISCARD_LOADER', 'DISCARD_LOADER',
]), ]),
...mapMutations('modals', [ ...mapMutations('modals', [
'OPEN_PROJECT_MODAL',
'CLOSE_PROJECT_MODAL' 'CLOSE_PROJECT_MODAL'
]), ]),
...mapActions('projects', [ ...mapActions('projects', [
...@@ -329,7 +332,7 @@ export default { ...@@ -329,7 +332,7 @@ export default {
}) })
.then((data) => { .then((data) => {
this.is_suscriber = data.is_suscriber; this.is_suscriber = data.is_suscriber;
this.modalType = false; this.CLOSE_PROJECT_MODAL();
if (this.is_suscriber) { if (this.is_suscriber) {
this.infoMessage = this.infoMessage =
'Vous êtes maintenant abonné aux notifications de ce projet.'; 'Vous êtes maintenant abonné aux notifications de ce projet.';
...@@ -361,7 +364,7 @@ export default { ...@@ -361,7 +364,7 @@ export default {
deleteFeatureType() { deleteFeatureType() {
featureTypeAPI.deleteFeatureType(this.featureTypeToDelete.slug) featureTypeAPI.deleteFeatureType(this.featureTypeToDelete.slug)
.then((response) => { .then((response) => {
this.modalType = false; this.CLOSE_PROJECT_MODAL();
if (response === 'success') { if (response === 'success') {
this.GET_PROJECT(); this.GET_PROJECT();
this.retrieveProjectInfo(); this.retrieveProjectInfo();
...@@ -376,6 +379,13 @@ export default { ...@@ -376,6 +379,13 @@ export default {
}); });
} }
this.featureTypeToDelete = null; this.featureTypeToDelete = null;
})
.catch(() => {
this.DISPLAY_MESSAGE({
comment: `Une erreur est survenu lors de la suppression du type de signalement ${this.featureTypeToDelete.title}.`,
level: 'negative',
});
this.CLOSE_PROJECT_MODAL();
}); });
}, },
...@@ -393,9 +403,9 @@ export default { ...@@ -393,9 +403,9 @@ export default {
} }
}, },
toggleModalType(featureType) { toggleDeleteFeatureTypeModal(featureType) {
this.featureTypeToDelete = featureType; this.featureTypeToDelete = featureType;
this.modalType = 'deleteFeatureType'; this.OPEN_PROJECT_MODAL('deleteFeatureType');
}, },
async initMap() { async initMap() {
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment