Skip to content

Commit

Permalink
Merge pull request #31 from openimis/develop
Browse files Browse the repository at this point in the history
MERGING RELEASE branches
  • Loading branch information
delcroip authored May 16, 2023
2 parents 3d6bbc1 + 486baad commit 51819d4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/pages/ExtractsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ const OfficerDownloadBlock = (props) => {
</Grid>
<Grid item xs={6}>
<Button disabled={!officer} color="primary" variant="contained"
onClick={onExtractDownload("phone_extract", {officer_id})}>
onClick={onExtractDownload("feedbacks", {officer_id})}>
{formatMessage("OfficerDownloadBlock.downloadFeedbacksBtn")}
</Button>
</Grid>
<Grid item xs={6} align="right">
<Button disabled={!officer} color="primary" variant="contained"
onClick={onExtractDownload("phone_extract", {officer_id})}>
onClick={onExtractDownload("renewals", {officer_id})}>
{formatMessage("OfficerDownloadBlock.downloadRenewalsBtn")}
</Button>
</Grid>
Expand Down
17 changes: 13 additions & 4 deletions src/pages/RegistersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,22 @@ const RegistersPage = () => {
method: "POST",
credentials: "same-origin",
});

const payload = await response.json();

if (response.status >= 400) {
throw new Error(
`${response?.status}: ${response?.url} - ${response?.statusText}`
);
setDialogState({
open: true,
isLoading: false,
data: {
success: payload.success,
},
generalError:
payload.error && `Error ${response.status}: ${payload.error}`,
});
return;
}

const payload = await response.json();
setDialogState({
open: true,
isLoading: false,
Expand Down
5 changes: 4 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@
"tools.ExtractsPage.OfficerDownloadBlock.officerLabel": "Select Officer",
"tools.ExtractsPage.OfficerDownloadBlock.downloadFeedbacksBtn": "Download Feedbacks",
"tools.ExtractsPage.OfficerDownloadBlock.downloadRenewalsBtn": "Download Renewals",
"tools.ExtractsPage.EnrollmentsUploadBlock.title": "Upload Enrollments",
"tools.ExtractsPage.EnrollmentsUploadBlock.title": "Upload Enrolments",
"tools.ExtractsPage.EnrollmentsUploadBlock.uploadBtn": "Upload",
"tools.ExtractsPage.EnrollmentsUploadBlock.ResultDialog.okBtn": "OK",
"tools.ExtractsPage.EnrollmentsUploadBlock.ResultDialog.success": "Success",
"tools.ExtractsPage.EnrollmentsUploadBlock.ResultDialog.title": "Enrolments Upload Done",
"tools.ExtractsPage.ClaimsUploadBlock.title": "Upload Claims",
"tools.ExtractsPage.ClaimsUploadBlock.uploadBtn": "Upload",
"tools.ExtractsPage.ClaimsUploadBlock.ResultDialog.okBtn": "OK",
Expand Down

0 comments on commit 51819d4

Please sign in to comment.