diff --git a/frontend/benefit/handler/public/locales/en/common.json b/frontend/benefit/handler/public/locales/en/common.json index ec5104a05a..e9e93de03e 100644 --- a/frontend/benefit/handler/public/locales/en/common.json +++ b/frontend/benefit/handler/public/locales/en/common.json @@ -1498,9 +1498,7 @@ "main": "Raportointi", "downloadAcceptedApplications": "Hyväksytyt hakemukset joita ei ole vielä ladattu", "downloadRejectedApplications": "Hylätyt hakemukset joita ei ole vielä ladattu", - "downloadApplicationsInTimeRange": "Lataa kaikki hakemukset tietyltä ajalta", - "downloadSmallerListOfApplicationsInTimeRange": "Lataa kompaktimpi lista hakemuksista tietyltä ajalta" - }, + "downloadApplicationsInTimeRange": "Lataa kaikki hakemukset tietyltä ajalta" }, "fields": { "lastDownloadDateText": "Ladattu viimeksi {{date}}", "startDate": "Alkaen", @@ -1509,7 +1507,8 @@ "buttons": { "downloadAcceptedApplications": "Hyväksytyt hakemukset", "downloadRejectedApplications": "Hylätyt hakemukset", - "downloadApplicationsInTimeRange": "Kaikki hakemukset valitulta ajalta" + "downloadApplicationsInTimeRange": "Kaikki hakemukset valitulta ajalta", + "downloadCompactList": "Lataa kompaktimpi lista hakemuksista" } }, "login": { diff --git a/frontend/benefit/handler/public/locales/fi/common.json b/frontend/benefit/handler/public/locales/fi/common.json index 23742966d1..790797d1cc 100644 --- a/frontend/benefit/handler/public/locales/fi/common.json +++ b/frontend/benefit/handler/public/locales/fi/common.json @@ -1507,7 +1507,8 @@ "buttons": { "downloadAcceptedApplications": "Hyväksytyt hakemukset", "downloadRejectedApplications": "Hylätyt hakemukset", - "downloadApplicationsInTimeRange": "Kaikki hakemukset valitulta ajalta" + "downloadApplicationsInTimeRange": "Kaikki hakemukset valitulta ajalta", + "downloadCompactList": "Lataa kompaktimpi lista hakemuksista" } }, "login": { diff --git a/frontend/benefit/handler/public/locales/sv/common.json b/frontend/benefit/handler/public/locales/sv/common.json index 399eeb28cf..4ce1b7141b 100644 --- a/frontend/benefit/handler/public/locales/sv/common.json +++ b/frontend/benefit/handler/public/locales/sv/common.json @@ -1508,7 +1508,8 @@ "buttons": { "downloadAcceptedApplications": "Hyväksytyt hakemukset", "downloadRejectedApplications": "Hylätyt hakemukset", - "downloadApplicationsInTimeRange": "Kaikki hakemukset valitulta ajalta" + "downloadApplicationsInTimeRange": "Kaikki hakemukset valitulta ajalta", + "downloadCompactList": "Lataa kompaktimpi lista hakemuksista" } }, "login": { diff --git a/frontend/benefit/handler/src/components/applicationReports/ApplicationReports.tsx b/frontend/benefit/handler/src/components/applicationReports/ApplicationReports.tsx index e58d335ec3..6ddeace660 100644 --- a/frontend/benefit/handler/src/components/applicationReports/ApplicationReports.tsx +++ b/frontend/benefit/handler/src/components/applicationReports/ApplicationReports.tsx @@ -28,50 +28,9 @@ const ApplicationReports: React.FC = () => { buttonText={`${t( `${translationsBase}.buttons.downloadApplicationsInTimeRange` )}`} - isCompact={false} - > - <$GridCell $colSpan={3} css="font-weight: 500;">{`${t( - `${translationsBase}.fields.startDate` - )}`} - <$GridCell $colSpan={3} css="font-weight: 500;">{`${t( - `${translationsBase}.fields.endDate` - )}`} - <$GridCell $colStart={1} $colSpan={3}> - - formik.setFieldValue(fields.startDate.name, value) - } - /> - - <$GridCell $colSpan={3}> - - formik.setFieldValue( - fields.endDate.name, - getCorrectEndDate(formik.values.startDate, value) - ) - } - /> - - - <$GridCell $colSpan={3} css="font-weight: 500;">{`${t( `${translationsBase}.fields.startDate` diff --git a/frontend/benefit/handler/src/components/applicationReports/ReportsSection.tsx b/frontend/benefit/handler/src/components/applicationReports/ReportsSection.tsx index 6326b25b07..c8c4445c2e 100644 --- a/frontend/benefit/handler/src/components/applicationReports/ReportsSection.tsx +++ b/frontend/benefit/handler/src/components/applicationReports/ReportsSection.tsx @@ -15,8 +15,8 @@ export type ReportsSectionProp = { withDivider?: boolean; header: string; buttonText: string; + compactButtonText: string; onDownloadButtonClick: (type: ExportFileType, isCompact:boolean) => void; - isCompact?: boolean; }; const ReportsSection: React.FC = ({ @@ -24,9 +24,9 @@ const ReportsSection: React.FC = ({ children, header, buttonText, + compactButtonText, onDownloadButtonClick, withDivider = false, - isCompact = false }) => { const theme = useTheme(); @@ -58,11 +58,23 @@ const ReportsSection: React.FC = ({ css={` margin-top: ${theme.spacing.l}; `} - onClick={() => onDownloadButtonClick(exportFileType, isCompact)} + onClick={() => onDownloadButtonClick(exportFileType, false)} > {buttonText} {String(exportFileType).toUpperCase()} + <$GridCell> + + {withDivider && (