Skip to content

Commit

Permalink
Merge pull request #290 from Chia-Network/feat--add-staging-group-del…
Browse files Browse the repository at this point in the history
…etion-notif/translation

feat: add staging group deletion notif/translation
  • Loading branch information
MichaelTaylor3D committed Feb 5, 2022
2 parents e23d505 + a8ff770 commit fe26788
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
22 changes: 18 additions & 4 deletions src/store/actions/climateWarehouseActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,28 @@ export const deleteStagingData = uuid => {
const response = await fetch(url, payload);

if (response.ok) {
console.log('yay!');
dispatch(setGlobalErrorMessage(null));
dispatch(
setNotificationMessage(
NotificationMessageTypeEnum.success,
'staging-group-deleted',
),
);
dispatch(getStagingData({ useMockedResponse: false }));
} else {
dispatch(setGlobalErrorMessage('Staging group could not be deleted'));
dispatch(
setNotificationMessage(
NotificationMessageTypeEnum.error,
'staging-group-could-not-be-deleted',
),
);
}
} catch {
dispatch(setGlobalErrorMessage('Something went wrong...'));
dispatch(
setNotificationMessage(
NotificationMessageTypeEnum.error,
'staging-group-could-not-be-deleted',
),
);
} finally {
dispatch(deactivateProgressIndicator);
}
Expand Down
5 changes: 3 additions & 2 deletions src/translations/tokens/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@
"labels": "Labels",
"issuances": "Issuances",
"network-error": "Network Error",
"there-is-a-connection-error": "There is a connection error. The Climate Warehouse is inaccessible."
"there-is-a-connection-error": "There is a connection error. The Climate Warehouse is inaccessible.",
"staging-group-could-not-be-deleted": "The staging group could not be deleted.",
"staging-group-deleted": "The staging group was successfully deleted."
}

4 changes: 3 additions & 1 deletion src/translations/tokens/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,5 +254,7 @@
"unit-deleted": "La unidad se eliminó con éxito.",
"unit-could-not-be-deleted": "No se pudo eliminar la Unidad.",
"project-deleted": "El proyecto se eliminó con éxito.",
"project-could-not-be-deleted": "No se pudo eliminar el Proyecto."
"project-could-not-be-deleted": "No se pudo eliminar el Proyecto.",
"staging-group-could-not-be-deleted": "Impossibile eliminare il gruppo di staging.",
"staging-group-deleted": "Il gruppo di staging è stato eliminato con successo."
}
4 changes: 3 additions & 1 deletion src/translations/tokens/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,7 @@
"unit-deleted": "ユニットは正常に削除されました。",
"unit-could-not-be-deleted": "ユニットを削除できませんでした。",
"project-deleted": "プロジェクトは正常に削除されました。",
"project-could-not-be-deleted": "プロジェクトを削除できませんでした。"
"project-could-not-be-deleted": "プロジェクトを削除できませんでした。",
"staging-group-could-not-be-deleted": "ステージンググループを削除できませんでした。",
"staging-group-deleted": "ステージンググループは正常に削除されました。"
}

0 comments on commit fe26788

Please sign in to comment.