Skip to content

Commit 8128212

Browse files
committed
Merge branch 'develop' into bugfix-2672/address-test-warnings
2 parents e75b1e5 + 9219a1f commit 8128212

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

docs/Gemfile.lock

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,7 @@ GEM
251251
rb-fsevent (0.11.2)
252252
rb-inotify (0.10.1)
253253
ffi (~> 1.0)
254-
rexml (3.3.6)
255-
strscan
254+
rexml (3.3.9)
256255
rouge (3.30.0)
257256
rubyzip (2.3.2)
258257
safe_yaml (1.0.5)
@@ -266,7 +265,6 @@ GEM
266265
faraday (>= 0.17.3, < 3)
267266
simpleidn (0.2.1)
268267
unf (~> 0.1.4)
269-
strscan (3.1.0)
270268
terminal-table (1.8.0)
271269
unicode-display_width (~> 1.1, >= 1.1.1)
272270
typhoeus (1.4.1)

web-ui/src/pages/EmailPage.jsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,18 @@ const ComposeEmailStep = ({
185185
const fileReader = new FileReader();
186186
fileReader.onload = e => {
187187
const mjmlContent = e.target.result.toString();
188-
const { html } = mjml2html(mjmlContent);
189-
onEmailContentsChange(html);
188+
try {
189+
const result = mjml2html(mjmlContent);
190+
onEmailContentsChange(result.html);
191+
} catch(e) {
192+
window.snackDispatch({
193+
type: UPDATE_TOAST,
194+
payload: {
195+
severity: 'error',
196+
toast: e.message,
197+
}
198+
});
199+
}
190200
};
191201

192202
const file = event.target.files[0];

web-ui/src/pages/SkillReportPage.jsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React, { useContext, useRef, useState } from 'react';
33
import { Button, TextField } from '@mui/material';
44
import Autocomplete from '@mui/material/Autocomplete';
55

6+
import { UPDATE_TOAST } from '../context/actions';
67
import { AppContext } from '../context/AppContext';
78
import { reportSkills } from '../api/memberskill.js';
89
import SearchResults from '../components/search-results/SearchResults';
@@ -126,7 +127,17 @@ const SkillReportPage = props => {
126127
<div className="SkillsSearch-actions fullWidth">
127128
<Button
128129
onClick={() => {
129-
handleSearch(createRequestDTO(editedSearchRequest));
130+
if (!searchSkills.length) {
131+
window.snackDispatch({
132+
type: UPDATE_TOAST,
133+
payload: {
134+
severity: 'error',
135+
toast: 'Must select a skill'
136+
}
137+
});
138+
} else {
139+
handleSearch(createRequestDTO(editedSearchRequest));
140+
}
130141
}}
131142
color="primary"
132143
>

0 commit comments

Comments
 (0)