Skip to content

Commit

Permalink
Affiche un toast et ferme la pop up de processus ETL de la couverture…
Browse files Browse the repository at this point in the history
… hydraulique

Issue: #195194
Change-Id: I0438002ee41ba1da7a4800338e9c8e67a6c8437b
  • Loading branch information
Emilie Genton committed Nov 7, 2023
1 parent 9ea1d52 commit 498bc38
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
14 changes: 13 additions & 1 deletion client-ng/src/components/Process.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<b-button size="sm" type="reset" variant="secondary" @click="$modal.hide('modalProcess')">Annuler</b-button>
<b-button size="sm" type="submit" variant="primary" @click="handleOk" >Valider</b-button>
</div>
<notifications group="remocra" position="top right" animation-type="velocity" :duration="3000" />
</modal>
</div>
</template>
Expand Down Expand Up @@ -173,7 +174,18 @@ export default {
}
}).then((response) => {
if (response.data.success) {
this.$refs.modal.hide()
this.$nextTick(() => {
this.$notify({
group: 'remocra',
title: 'Processus enregistré',
type: 'success',
text: response.data.message
})
setTimeout(() =>{
this.$modal.hide('modalProcess');
}, 2000)
})
}
}).catch(function(error) {
console.error('postProcess', error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,18 @@ protected List<RemocraVueCombo> getRecords() {
value = "{idmodele}",
method = RequestMethod.POST,
headers = "Content-Type=multipart/form-data")
@PreAuthorize("hasRight('CRISE_C')")
@PreAuthorize("hasRight('CRISE_C') or hasRight('PLANIFIER_DECI')")
@Transactional
public ResponseEntity<java.lang.String> createProcessEtl(MultipartHttpServletRequest request) {
try {
ProcessusEtl p = processusEtlModeleRepository.createProcess(request);
return new SuccessErrorExtSerializer(true, "Le processus Etl a été enregistrée").serialize();
return new SuccessErrorExtSerializer(
true,
"Le processus ETL a été enregistré. Un mail vous informera de l'issue du traitement.")
.serialize();
} catch (Exception e) {
return new SuccessErrorExtSerializer(
false, "Une erreur est survenue lors de l\'enregistrement du processus Etl")
false, "Une erreur est survenue lors de l\'enregistrement du processus ETL")
.serialize();
}
}
Expand Down

0 comments on commit 498bc38

Please sign in to comment.