Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport/task 72534 72541 #373

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<exo-drawer
@closed="close"
ref="work"
attached
right>
<template slot="title">
<v-container
Expand Down Expand Up @@ -413,4 +414,4 @@ export default {
}
}
};
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:confirm-close-labels="confirmCloseLabels"
@closed="close()"
ref="workFlow"
attached
id="addWorkFlowDrawer"
right>
<template #title>
Expand Down Expand Up @@ -420,17 +421,7 @@ export default {
this.showSpaceAlertMessage = false;
this.validSpace = false;
if (this.workflow.parentSpace){
this.$processesService.getSpaceApps(this.workflow.parentSpace.id).then(data=>{
data.forEach(e=>{
if (e.id === 'TasksManagement'){
this.validSpace = true;
return;
}
});
if (!this.validSpace){
this.showSpaceAlertMessage = true;
}
});
this.validSpace = true;
}
},
showSpaceAlertMessage(val){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,20 +368,3 @@ export function getWorkflowById(workflowId, expand) {
}
});
}
export function getSpaceApps(id,expand) {
const formData = new FormData();
if (expand) {
formData.append('expand', expand);
}
const params = new URLSearchParams(formData).toString();
return fetch(`${eXo.env.portal.context}/${eXo.env.portal.rest}/v1/social/spaces/${id}/applications?${params}`, {
method: 'GET',
credentials: 'include',
}).then(resp => {
if (!resp || !resp.ok) {
throw new Error('Error while getting the space applications');
} else {
return resp.json();
}
});
}