Commit dfb2a4b3 authored by Tan Le's avatar Tan Le

Show success message on MR approval settings save

This commit adds a flash message on top of the page when MR approval
settings have been updated successfully.
parent 774a38ed
......@@ -34,6 +34,10 @@ export const updateSettings = ({ commit, state }, endpoint) => {
.put(endpoint, payload)
.then(({ data }) => {
commit(types.UPDATE_SETTINGS_SUCCESS, data);
createFlash({
message: __('Merge request approval settings have been updated.'),
type: 'notice',
});
})
.catch(({ response }) => {
const error = response?.data?.message;
......
......@@ -92,7 +92,12 @@ describe('EE approvals group settings module actions', () => {
{ type: types.UPDATE_SETTINGS_SUCCESS, payload: data },
],
[],
);
).then(() => {
expect(createFlash).toHaveBeenCalledWith({
message: 'Merge request approval settings have been updated.',
type: 'notice',
});
});
});
});
......
......@@ -18533,6 +18533,9 @@ msgstr ""
msgid "Merge request (MR) approvals"
msgstr ""
msgid "Merge request approval settings have been updated."
msgstr ""
msgid "Merge request approvals"
msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment