From 8a34e224db7dc62b48064fc18f4789a5827960af Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Mon, 6 Nov 2023 16:59:54 -0500 Subject: [PATCH] Surface TileValidationErrors to user in sample/analysis workflows --- .../analysis-areas-annotation-step.js | 6 +++++- .../sample-taking-sample-location-step.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arches_for_science/media/js/views/components/workflows/analysis-areas-workflow/analysis-areas-annotation-step.js b/arches_for_science/media/js/views/components/workflows/analysis-areas-workflow/analysis-areas-annotation-step.js index 72846fa96..ef9857e3d 100644 --- a/arches_for_science/media/js/views/components/workflows/analysis-areas-workflow/analysis-areas-annotation-step.js +++ b/arches_for_science/media/js/views/components/workflows/analysis-areas-workflow/analysis-areas-annotation-step.js @@ -567,7 +567,11 @@ define([ params.form.value(params.form.savedData()); }); }).fail(function(error){ - console.log(error); + params.pageVm.alert(new params.form.AlertViewModel( + "ep-alert-red", + error.responseJSON.result.title, + error.responseJSON.result.message, + )); self.savingTile(false); }); }; diff --git a/arches_for_science/media/js/views/components/workflows/sample-taking-workflow/sample-taking-sample-location-step.js b/arches_for_science/media/js/views/components/workflows/sample-taking-workflow/sample-taking-sample-location-step.js index 4fbfd4583..28f876533 100644 --- a/arches_for_science/media/js/views/components/workflows/sample-taking-workflow/sample-taking-sample-location-step.js +++ b/arches_for_science/media/js/views/components/workflows/sample-taking-workflow/sample-taking-sample-location-step.js @@ -698,7 +698,11 @@ define([ self.selectSampleLocationInstance(undefined); }) .fail(function(error){ - console.log(error); + params.pageVm.alert(new params.form.AlertViewModel( + "ep-alert-red", + error.responseJSON.result.title, + error.responseJSON.result.message, + )); self.savingTile(false); }) };