From 72ed27869efa89551092028800e6c402ab69321d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilia=20M=C3=A4kel=C3=A4?= Date: Thu, 25 Jan 2024 18:39:20 +0200 Subject: [PATCH] feat: list old processed applications on the archive page (HL-1011) --- .../api/v1/serializers/application.py | 28 +- backend/benefit/applications/api/v1/views.py | 56 +- backend/benefit/applications/models.py | 9 + .../applications/services/change_history.py | 2 + .../tests/test_applications_api.py | 66 +- .../benefit/locale/en/LC_MESSAGES/django.po | 517 +++++++++--- .../benefit/locale/fi/LC_MESSAGES/django.po | 760 ++++++++++++------ .../benefit/locale/sv/LC_MESSAGES/django.po | 744 +++++++++++------ .../applicant/public/locales/en/common.json | 23 +- .../applicant/public/locales/fi/common.json | 23 +- .../applicant/public/locales/sv/common.json | 23 +- .../applicationList/ApplicationList.sc.ts | 25 + .../applicationList/ApplicationList.tsx | 114 ++- .../applicationList/useApplicationList.ts | 54 +- .../step5/useApplicationFormStep5.ts | 6 +- .../decisions/DecisionsApplicationList.sc.ts | 10 + .../decisions/DecisionsApplicationList.tsx | 59 ++ .../src/components/layout/Layout.tsx | 3 + .../src/hooks/useApplicationsQuery.ts | 16 +- frontend/benefit/applicant/src/i18n.ts | 4 +- .../benefit/applicant/src/pages/decisions.tsx | 3 +- .../benefit/applicant/src/pages/index.tsx | 7 + frontend/benefit/shared/src/constants.ts | 1 - .../benefit/shared/src/types/application.d.ts | 1 + 24 files changed, 1912 insertions(+), 642 deletions(-) create mode 100644 frontend/benefit/applicant/src/components/decisions/DecisionsApplicationList.sc.ts create mode 100644 frontend/benefit/applicant/src/components/decisions/DecisionsApplicationList.tsx diff --git a/backend/benefit/applications/api/v1/serializers/application.py b/backend/benefit/applications/api/v1/serializers/application.py index 2fe78cedbf..59f72077b8 100755 --- a/backend/benefit/applications/api/v1/serializers/application.py +++ b/backend/benefit/applications/api/v1/serializers/application.py @@ -24,6 +24,7 @@ from applications.benefit_aggregation import get_former_benefit_info from applications.enums import ( ApplicationActions, + ApplicationBatchStatus, ApplicationOrigin, ApplicationStatus, AttachmentRequirement, @@ -187,6 +188,7 @@ class Meta: "total_deminimis_amount", "ahjo_status", "changes", + "archived_for_applicant", ] read_only_fields = [ "submitted_at", @@ -211,6 +213,7 @@ class Meta: "duration_in_months_rounded", "total_deminimis_amount", "changes", + "archived_for_applicant", ] extra_kwargs = { "company_name": { @@ -436,6 +439,11 @@ class Meta: ), ) + archived_for_applicant = serializers.SerializerMethodField( + method_name="get_archived_for_applicant", + help_text=("Should be shown in the archive view for an applicant"), + ) + def get_applicant_terms_approval_needed(self, obj): return ApplicantTermsApproval.terms_approval_needed(obj) @@ -1341,6 +1349,24 @@ def get_logged_in_user_company(self): return Company.objects.all().order_by("name").first() return get_company_from_request(self.context.get("request")) + def get_archived_for_applicant(self, application): + """ + Determine if the application is old enough and already handled so that it will + be shown in the archive section for the applicant. + + Make sure any changes here are reflected in the filter set as well. + """ + + if application.batch is None: + return False + + return application.batch.status in [ + ApplicationBatchStatus.DECIDED_ACCEPTED, + ApplicationBatchStatus.DECIDED_REJECTED, + ApplicationBatchStatus.SENT_TO_TALPA, + ApplicationBatchStatus.COMPLETED, + ] and application.batch.decision_date < date.today() + relativedelta(days=-14) + class ApplicantApplicationStatusChoiceField(serializers.ChoiceField): """ @@ -1349,8 +1375,6 @@ class ApplicantApplicationStatusChoiceField(serializers.ChoiceField): STATUS_OVERRIDES = { ApplicationStatus.RECEIVED: ApplicationStatus.HANDLING, - ApplicationStatus.ACCEPTED: ApplicationStatus.HANDLING, - ApplicationStatus.REJECTED: ApplicationStatus.HANDLING, } def to_representation(self, value): diff --git a/backend/benefit/applications/api/v1/views.py b/backend/benefit/applications/api/v1/views.py index e4025f6a58..42ec226b41 100755 --- a/backend/benefit/applications/api/v1/views.py +++ b/backend/benefit/applications/api/v1/views.py @@ -1,6 +1,8 @@ import re +from datetime import date from typing import List +from dateutil.relativedelta import relativedelta from django.conf import settings from django.core import exceptions from django.db import transaction @@ -61,6 +63,42 @@ class BaseApplicationFilter(filters.FilterSet): " comma-separated list, such as 'status=draft,received'", ), ) + archived_for_applicant = filters.BooleanFilter( + method="_get_archived_for_applicant", + label=_("Displayed in the archive in the applicant view"), + ) + + def _get_archived_for_applicant(self, queryset, name, value: bool): + """ + Determine if the application is old enough and already handled so that it will + be shown in the archive section for the applicant. + + Make sure any changes here are reflected in the serializer as well. + """ + + application_statuses = [ + ApplicationStatus.REJECTED, + ApplicationStatus.ACCEPTED, + ] + batch_statuses = [ + ApplicationBatchStatus.DECIDED_ACCEPTED, + ApplicationBatchStatus.DECIDED_REJECTED, + ApplicationBatchStatus.SENT_TO_TALPA, + ApplicationBatchStatus.COMPLETED, + ] + archive_threshold = date.today() + relativedelta(days=-14) + + query = { + "status__in": application_statuses, + "batch__isnull": False, + "batch__status__in": batch_statuses, + "batch__decision_date__lte": archive_threshold.isoformat(), + } + + if value: + return queryset.filter(**query) + else: + return queryset.filter(~Q(**query)) class ApplicantApplicationFilter(BaseApplicationFilter): @@ -161,7 +199,19 @@ def simplified_application_list(self, request): context = self.get_serializer_context() qs = self._get_simplified_queryset(request, context) serializer = self.serializer_class(qs, many=True, context=context) - return Response(serializer.data, status=status.HTTP_200_OK) + data = serializer.data + + # Sorting by encrypted fields has to be done after the data has been retrieved and decrypted + if request.query_params.get("order_by") in ["employee_name"]: + data = sorted( + data, + key=lambda item: ( + item["employee"]["last_name"].lower(), + item["employee"]["first_name"].lower(), + ), + ) + + return Response(data, status=status.HTTP_200_OK) @action( methods=("POST",), @@ -214,7 +264,9 @@ def _get_simplified_queryset(self, request, context) -> QuerySet: if exclude_batched: qs = qs.filter(batch__isnull=True) - qs = qs.filter(archived=request.query_params.get("filter_archived") == "1") + user = self.request.user + if hasattr(user, "is_handler") and user.is_handler(): + qs = qs.filter(archived=request.query_params.get("filter_archived") == "1") return qs diff --git a/backend/benefit/applications/models.py b/backend/benefit/applications/models.py index 530cbe609d..fe1bf4ae70 100755 --- a/backend/benefit/applications/models.py +++ b/backend/benefit/applications/models.py @@ -80,6 +80,15 @@ class ApplicationManager(models.Manager): ApplicationStatus.CANCELLED, ] + COMPLETED_BATCH_STATUSES = [ + ApplicationBatchStatus.DECIDED_ACCEPTED, + ApplicationBatchStatus.DECIDED_REJECTED, + ApplicationBatchStatus.SENT_TO_TALPA, + ApplicationBatchStatus.COMPLETED, + ] + + ARCHIVE_THRESHOLD = relativedelta(days=-14) + def _annotate_with_log_timestamp(self, qs, field_name, to_statuses): subquery = ( ApplicationLogEntry.objects.filter( diff --git a/backend/benefit/applications/services/change_history.py b/backend/benefit/applications/services/change_history.py index 9694d936eb..3a86510fa1 100644 --- a/backend/benefit/applications/services/change_history.py +++ b/backend/benefit/applications/services/change_history.py @@ -57,6 +57,8 @@ def _get_application_change_history_between_timestamps( hist_employee_when_stop_editing = employee.history.as_of(ts_end)._history except Employee.DoesNotExist: return [] + except Application.DoesNotExist: + return [] new_or_edited_attachments = Attachment.objects.filter( Q(created_at__gte=ts_start) | Q(modified_at=ts_start), diff --git a/backend/benefit/applications/tests/test_applications_api.py b/backend/benefit/applications/tests/test_applications_api.py index bc8c20b5bc..1cccac02b9 100755 --- a/backend/benefit/applications/tests/test_applications_api.py +++ b/backend/benefit/applications/tests/test_applications_api.py @@ -9,6 +9,7 @@ import faker import pytest +from dateutil.relativedelta import relativedelta from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from freezegun import freeze_time @@ -26,6 +27,7 @@ from applications.api.v1.views import BaseApplicationViewSet from applications.enums import ( AhjoStatus, + ApplicationBatchStatus, ApplicationStatus, ApplicationStep, AttachmentType, @@ -261,6 +263,66 @@ def test_applications_simple_list_filter( assert response.status_code == 200 +def test_applications_filter_archived_for_applicant( + api_client, mock_get_organisation_roles_and_create_company +): + recent_batch = ApplicationBatchFactory( + decision_date=date.today() - relativedelta(days=2), + status=ApplicationBatchStatus.COMPLETED, + ) + old_batch = ApplicationBatchFactory( + decision_date=date.today() - relativedelta(days=15), + status=ApplicationBatchStatus.COMPLETED, + ) + pending_batch = ApplicationBatchFactory( + decision_date=date.today() - relativedelta(days=15), + status=ApplicationBatchStatus.AWAITING_AHJO_DECISION, + ) + company = mock_get_organisation_roles_and_create_company + + apps = [ + # Decided but not yet in a batch, should appear on main page + DecidedApplicationFactory(application_number=123450), + # Batch processed and decided 15 days ago, should appear on archive page + DecidedApplicationFactory(application_number=123451, batch=old_batch), + # Batch processed and decided 15 days ago and archived for handlers, should still appear on archive page + DecidedApplicationFactory( + application_number=123452, batch=old_batch, archived=True + ), + # Batch processed and decided two days ago, should appear on main page + DecidedApplicationFactory(application_number=123453, batch=recent_batch), + # Batch decided 15 days ago but not yet fully processed, should appear on main page + DecidedApplicationFactory(application_number=123454, batch=pending_batch), + # Fresh application not yet decided, should appear on main page + ReceivedApplicationFactory(application_number=123455), + ] + + for app in apps: + app.company = company + app.save() + + response = api_client.get( + reverse("v1:applicant-application-simplified-application-list"), + {"archived_for_applicant": "true", "order_by": "application_number"}, + ) + + assert len(response.data) == 2 + assert response.data[0]["id"] == str(apps[1].id) + assert response.data[1]["id"] == str(apps[2].id) + assert response.data[0]["archived_for_applicant"] + assert response.data[1]["archived_for_applicant"] + + response = api_client.get( + reverse("v1:applicant-application-simplified-application-list"), + {"archived_for_applicant": "false", "order_by": "application_number"}, + ) + assert len(response.data) == 4 + assert response.data[0]["id"] == str(apps[0].id) + assert response.data[1]["id"] == str(apps[3].id) + assert response.data[2]["id"] == str(apps[4].id) + assert response.data[3]["id"] == str(apps[5].id) + + @pytest.mark.parametrize("url_func", [get_detail_url, get_handler_detail_url]) def test_application_single_read_unauthenticated( anonymous_client, application, url_func @@ -286,8 +348,8 @@ def test_application_single_read_unauthorized( ), (ApplicationStatus.RECEIVED, ApplicationStatus.HANDLING), (ApplicationStatus.HANDLING, ApplicationStatus.HANDLING), - (ApplicationStatus.ACCEPTED, ApplicationStatus.HANDLING), - (ApplicationStatus.REJECTED, ApplicationStatus.HANDLING), + (ApplicationStatus.ACCEPTED, ApplicationStatus.ACCEPTED), + (ApplicationStatus.REJECTED, ApplicationStatus.REJECTED), (ApplicationStatus.CANCELLED, ApplicationStatus.CANCELLED), ], ) diff --git a/backend/benefit/locale/en/LC_MESSAGES/django.po b/backend/benefit/locale/en/LC_MESSAGES/django.po index 60baa2bc51..ece95e439a 100644 --- a/backend/benefit/locale/en/LC_MESSAGES/django.po +++ b/backend/benefit/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-01 10:42+0200\n" +"POT-Creation-Date: 2024-01-25 18:30+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -35,50 +35,6 @@ msgstr "" msgid "TALPA export {date}" msgstr "" -#, python-brace-format -msgid "Upload file size cannot be greater than {size} bytes" -msgstr "" - -msgid "Too many attachments" -msgstr "" - -msgid "Not a valid pdf file" -msgstr "" - -msgid "Not a valid image file" -msgstr "" - -msgid "Grant date too much in past" -msgstr "" - -msgid "Grant date can not be in the future" -msgstr "" - -msgid "Social security number invalid" -msgstr "" - -msgid "Social security number checksum invalid" -msgstr "" - -#, python-brace-format -msgid "Working hour must be greater than {min_hour} per week" -msgstr "" - -msgid "Monthly pay must be greater than 0" -msgstr "" - -msgid "Vacation money must be a positive number" -msgstr "" - -msgid "Other expenses must be a positive number" -msgstr "" - -msgid "Applications in a batch can not be changed when batch is in this status" -msgstr "" - -msgid "This application has invalid status and can not be added to this batch" -msgstr "" - msgid "This should be unreachable" msgstr "" @@ -101,15 +57,9 @@ msgstr "" msgid "Total amount of de minimis aid too large" msgstr "" -msgid "start_date must not be in a past year" -msgstr "" - msgid "start_date must not be more than 4 months in the past" msgstr "" -msgid "end_date must not be in a past year" -msgstr "" - msgid "application end_date can not be less than start_date" msgstr "" @@ -123,9 +73,6 @@ msgid "" "This application can not have a description for co-operation negotiations" msgstr "" -msgid "Pay subsidy percent required" -msgstr "" - #, python-brace-format msgid "This application can not have {key}" msgstr "" @@ -142,6 +89,14 @@ msgstr "" msgid "This benefit type can not be selected" msgstr "" +msgid "" +"Apprenticeship program can not be selected if there is no granted pay subsidy" +msgstr "" + +msgid "" +"Apprenticeship program has to be yes or no if there is a granted pay subsidy" +msgstr "" + msgid "Application does not have the employee consent attachment" msgstr "" @@ -167,6 +122,10 @@ msgstr "" msgid "create_application_for_company missing from request" msgstr "" +#, python-brace-format +msgid "company with id {company_id} not found" +msgstr "" + msgid "The calculation should be created when the application is submitted" msgstr "" @@ -177,6 +136,47 @@ msgstr "" msgid "Reading {localized_model_name} data failed: {errors}" msgstr "" +#, python-brace-format +msgid "Upload file size cannot be greater than {size} bytes" +msgstr "" + +msgid "Too many attachments" +msgstr "" + +msgid "Not a valid pdf file" +msgstr "" + +msgid "Not a valid image file" +msgstr "" + +msgid "Applications in a batch can not be changed when batch is in this status" +msgstr "" + +msgid "This application has invalid status and can not be added to this batch" +msgstr "" + +msgid "Grant date too much in past" +msgstr "" + +msgid "Grant date can not be in the future" +msgstr "" + +msgid "Social security number invalid" +msgstr "" + +#, python-brace-format +msgid "Working hour must be greater than {min_hour} per week" +msgstr "" + +msgid "Monthly pay must be greater than 0" +msgstr "" + +msgid "Vacation money must be a positive number" +msgstr "" + +msgid "Other expenses must be a positive number" +msgstr "" + #, python-brace-format msgid "State transition not allowed: {status} to {value}" msgstr "" @@ -185,6 +185,9 @@ msgstr "" msgid "Initial status must be {initial_status}" msgstr "" +msgid "Displayed in the archive in the applicant view" +msgstr "" + msgid "Operation not allowed for this application status." msgstr "" @@ -192,7 +195,7 @@ msgid "File not found." msgstr "" #, python-brace-format -msgid "Helsinki-lisän hakemukset viety {date}" +msgid "Helsinki-lisan hakemukset viety {date}" msgstr "" msgid "Benefit can not be granted before 24-month waiting period expires" @@ -276,6 +279,20 @@ msgstr "" msgid "helsinki benefit voucher" msgstr "" +#, fuzzy +#| msgid "employee_consent" +msgid "employee consent" +msgstr "Employee's consent for processing personal data" + +msgid "full application" +msgstr "" + +msgid "other attachment" +msgstr "" + +msgid "pdf summary" +msgstr "" + msgid "attachment is required" msgstr "" @@ -303,12 +320,97 @@ msgstr "" msgid "Processing is completed" msgstr "" +msgid "Rejected by Talpa" +msgstr "" + +msgid "Not sent to Talpa" +msgstr "" + +msgid "Successfully sent to Talpa" +msgstr "" + +msgid "Handler" +msgstr "" + +msgid "Applicant" +msgstr "" + +msgid "Pay subsidy granted (default)" +msgstr "" + +msgid "Pay subsidy granted (aged)" +msgstr "" + +msgid "No granted pay subsidy" +msgstr "" + +msgid "Submitted but not sent to AHJO" +msgstr "" + +msgid "Request to open the case sent to AHJO" +msgstr "" + +msgid "Case opened in AHJO" +msgstr "" + +msgid "Update request sent" +msgstr "" + +msgid "Update request received" +msgstr "" + +msgid "Decision proposal sent" +msgstr "" + +msgid "Decision proposal accepted" +msgstr "" + +msgid "Decision proposal rejected" +msgstr "" + +msgid "Delete request sent" +msgstr "" + +msgid "Delete request received" +msgstr "" + +msgid "Allow/disallow applicant's modifications" +msgstr "" + +msgid "Success" +msgstr "" + +msgid "Failure" +msgstr "" + +msgid "Open case in Ahjo" +msgstr "" + +msgid "Delete application in Ahjo" +msgstr "" + +#, python-brace-format +msgid "" +"Your application {id} will be deleted soon. If you want to continue the " +"application process, please do so by {application_deletion_date}, otherwise " +"the application will deleted permanently." +msgstr "" + +msgid "Your Helsinki benefit draft application will expire" +msgstr "" + msgid "company" msgstr "" msgid "status" msgstr "" +msgid "talpa_status" +msgstr "" + +msgid "application origin" +msgstr "" + msgid "application number" msgstr "" @@ -363,6 +465,9 @@ msgstr "" msgid "benefit end date" msgstr "" +msgid "paper application date" +msgstr "" + msgid "ahjo batch" msgstr "" @@ -411,12 +516,24 @@ msgstr "" msgid "date of the decision in Ahjo" msgstr "" +msgid "P2P inspector's name" +msgstr "" + +msgid "P2P inspector's email address" +msgstr "" + +msgid "P2P acceptor's title" +msgstr "" + msgid "Expert inspector's name" msgstr "" msgid "Expert inspector's email address" msgstr "" +msgid "Expert inspector's title" +msgstr "" + msgid "application batch" msgstr "" @@ -486,6 +603,199 @@ msgstr "" msgid "attachments" msgstr "" +msgid "paper" +msgstr "" + +msgid "company contact person" +msgstr "" + +msgid "co-operation negotiations" +msgstr "" + +msgid "pay subsidy" +msgstr "" + +msgid "benefit" +msgstr "" + +#, fuzzy +#| msgid "employee_consent" +msgid "employment" +msgstr "Employee's consent for processing personal data" + +msgid "approval" +msgstr "" + +msgid "ahjo status" +msgstr "" + +msgid "ahjo statuses" +msgstr "" + +msgid "Not found" +msgstr "" + +msgid "Employer information" +msgstr "" + +msgid "Name of the employer" +msgstr "" + +msgid "Business ID" +msgstr "" + +msgid "Street address" +msgstr "" + +msgid "Delivery address" +msgstr "" + +msgid "Bank account number" +msgstr "" + +msgid "Does the employer engage in economic activity?" +msgstr "" + +msgid "Yes" +msgstr "" + +msgid "No" +msgstr "" + +msgid "Contact person for the employer" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Telephone" +msgstr "" + +msgid "Email address" +msgstr "" + +msgid "Preferred language of communication" +msgstr "" + +msgid "De minimis aid received by the employer" +msgstr "" + +#, fuzzy +#| msgid "granted" +msgid "Granter" +msgstr "Pay subsidy" + +msgid "Amount" +msgstr "" + +msgid "Date" +msgstr "" + +msgid "Total" +msgstr "" + +msgid "No, the applicant has not listed any previous de minimis aids." +msgstr "" + +msgid "Change negotiations or co-determination negotiations" +msgstr "" + +msgid "" +"Yes, the organization has ongoing or completed change negotiations within " +"the previous 12 months." +msgstr "" + +msgid "" +"No, the organization does not have change negotiations in progress or that " +"have ended in the previous 12 months." +msgstr "" + +msgid "Describe the situation" +msgstr "" + +msgid "Person to be hired" +msgstr "" + +msgid "First name" +msgstr "" + +msgid "Last name" +msgstr "" + +msgid "Personal identity code" +msgstr "" + +msgid "The subsidised employee’s municipality of residence is Helsinki" +msgstr "" + +msgid "Has the person who is being employed been assigned a job supervisor?" +msgstr "" + +msgid "Employment relationship" +msgstr "" + +msgid "Job title" +msgstr "" + +msgid "Working hours per week" +msgstr "" + +msgid "Gross salary per month" +msgstr "" + +msgid "Holiday pay per month" +msgstr "" + +msgid "Indirect labour costs per month" +msgstr "" + +msgid "Applicable collective agreement" +msgstr "" + +msgid "Yhdistyksellä on yritystoimintaa" +msgstr "" + +msgid "Is this an apprenticeship?" +msgstr "" + +msgid "Received aid" +msgstr "" + +msgid "Benefit is applied for the period" +msgstr "" + +msgid "Applying for dates" +msgstr "" + +msgid "Attachments" +msgstr "" + +msgid "granted_aged" +msgstr "Employment aid for people aged 55 and above" + +msgid "Printed at" +msgstr "" + +msgid "City of Helsinki" +msgstr "" + +#, fuzzy +#| msgid "helsinki_benefit_voucher" +msgid "Helsinki-benefit online service" +msgstr "The Helsinki Benefit card" + +msgid "Helsinki-benefit application" +msgstr "" + +msgid "Employee" +msgstr "" + +msgid "Application received" +msgstr "" + +msgid "Application number" +msgstr "" + msgid "Date range too large" msgstr "" @@ -507,6 +817,9 @@ msgstr "" msgid "End date cannot be empty" msgstr "" +msgid "State aid maximum percentage cannot be empty" +msgstr "" + msgid "Description row, amount ignored" msgstr "" @@ -516,9 +829,6 @@ msgstr "" msgid "State aid maximum %" msgstr "" -msgid "State aid maximum percentage cannot be empty" -msgstr "" - msgid "Pay subsidy/month" msgstr "" @@ -537,6 +847,15 @@ msgstr "" msgid "Total amount of deductions monthly" msgstr "" +msgid "Basic date range description" +msgstr "" + +msgid "Date range description for total row" +msgstr "" + +msgid "Deduction description" +msgstr "" + msgid "Calculation already exists" msgstr "" @@ -574,9 +893,6 @@ msgstr "" msgid "Work time percent" msgstr "" -msgid "pay subsidy" -msgstr "" - msgid "pay subsidies" msgstr "" @@ -631,6 +947,9 @@ msgstr "" msgid "Company information is not available" msgstr "" +msgid "Your IP address is not on the safe list." +msgstr "" + msgid "bank account number" msgstr "" @@ -646,9 +965,6 @@ msgstr "" msgid "Swedish" msgstr "" -msgid "Application number" -msgstr "" - #, python-brace-format msgid "" "Your application has been opened for editing. Please make the corrections by " @@ -656,7 +972,11 @@ msgid "" "processed." msgstr "" -msgid "You have received a new message regarding your Helsinki benefit application" +msgid "" +"You have received a new message regarding your Helsinki benefit application" +msgstr "" + +msgid "Your Helsinki benefit application requires additional information" msgstr "" #, python-format @@ -730,9 +1050,22 @@ msgstr "" msgid "Terms of application - show at application submit" msgstr "" +msgid "" +"Terms of application for handler - show at application submit for handler" +msgstr "" + msgid "type of terms" msgstr "" +msgid "Finnish terms (md)" +msgstr "" + +msgid "English terms (md)" +msgstr "" + +msgid "Swedish terms (md)" +msgstr "" + msgid "first day these terms are in effect" msgstr "" @@ -745,6 +1078,9 @@ msgstr "" msgid "swedish terms (pdf file)" msgstr "" +msgid "PDF or MD fields are missing for FI/EN/SV! Fill in either or" +msgstr "" + msgid "terms" msgstr "" @@ -787,44 +1123,29 @@ msgstr "" msgid "terms of service approvals" msgstr "" -msgid "fi" -msgstr "Finnish" +#~ msgid "fi" +#~ msgstr "Finnish" -msgid "sv" -msgstr "Swedish" +#~ msgid "sv" +#~ msgstr "Swedish" -msgid "en" -msgstr "English" +#~ msgid "en" +#~ msgstr "English" -msgid "granted" -msgstr "Pay subsidy" - -msgid "granted_aged" -msgstr "Employment aid for people aged 55 and above" - -msgid "not_granted" -msgstr "None" - -msgid "Processing of the personal data of the person to be employed" -msgstr "Behandlingen av personuppgifterna av personen som ska sysselsättas" +#~ msgid "not_granted" +#~ msgstr "None" -msgid "Agreement for employee's personal data processing" -msgstr "Avtal för anställds personuppgiftsbehandling" +#~ msgid "Processing of the personal data of the person to be employed" +#~ msgstr "Behandlingen av personuppgifterna av personen som ska sysselsättas" -msgid "employment_contract" -msgstr "Employment contract" +#~ msgid "Agreement for employee's personal data processing" +#~ msgstr "Avtal för anställds personuppgiftsbehandling" -msgid "pay_subsidy_decision" -msgstr "Pay subsidy decision" +#~ msgid "employment_contract" +#~ msgstr "Employment contract" -msgid "education_contract" -msgstr "Agreement on providing apprenticeship training" +#~ msgid "pay_subsidy_decision" +#~ msgstr "Pay subsidy decision" -msgid "helsinki_benefit_voucher" -msgstr "The Helsinki Benefit card" - -msgid "employee_consent" -msgstr "Employee's consent for processing personal data" - -msgid "Your Helsinki benefit application requires additional information" -msgstr "" \ No newline at end of file +#~ msgid "education_contract" +#~ msgstr "Agreement on providing apprenticeship training" diff --git a/backend/benefit/locale/fi/LC_MESSAGES/django.po b/backend/benefit/locale/fi/LC_MESSAGES/django.po index c304586833..a9436efb00 100644 --- a/backend/benefit/locale/fi/LC_MESSAGES/django.po +++ b/backend/benefit/locale/fi/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-01 10:42+0200\n" +"POT-Creation-Date: 2024-01-25 18:30+0200\n" "PO-Revision-Date: 2022-11-01 10:45+0200\n" "Last-Translator: Kari Salminen \n" "Language-Team: \n" @@ -35,51 +35,6 @@ msgstr "Ei vietävää hakemusta, yritä myöhemmin uudelleen" msgid "TALPA export {date}" msgstr "TALPA-vienti {date}" -#, python-brace-format -msgid "Upload file size cannot be greater than {size} bytes" -msgstr "Ladattavan tiedoston koko ei voi ylittää {size} tavua" - -msgid "Too many attachments" -msgstr "Liian monta liitettä" - -msgid "Not a valid pdf file" -msgstr "Epäkelpo PDF-tiedosto" - -msgid "Not a valid image file" -msgstr "Epäkelpo kuvatiedosto" - -msgid "Grant date too much in past" -msgstr "Myöntämispäivä liian kaukana menneisyydessä" - -msgid "Grant date can not be in the future" -msgstr "Myöntämispäivä ei voi olla tulevaisuudessa" - -msgid "Social security number invalid" -msgstr "Epäkelpo henkilötunnus" - -msgid "Social security number checksum invalid" -msgstr "Epäkelpo henkilötunnuksen tarkistussumma" - -#, python-brace-format -msgid "Working hour must be greater than {min_hour} per week" -msgstr "Työajan on oltava suurempi kuin {min_hour} viikossa" - -msgid "Monthly pay must be greater than 0" -msgstr "Kuukausipalkan on oltava suurempi kuin 0" - -msgid "Vacation money must be a positive number" -msgstr "Lomarahojen täytyy olla positiivinen luku" - -msgid "Other expenses must be a positive number" -msgstr "Muiden kulujen täytyy olla positiivinen luku" - -msgid "Applications in a batch can not be changed when batch is in this status" -msgstr "Erän hakemuksia ei voida muuttaa erän ollessa tässä tilassa" - -msgid "This application has invalid status and can not be added to this batch" -msgstr "" -"Tämän hakemuksen tila on virheellinen, eikä sitä voi lisätä tähän erään" - msgid "This should be unreachable" msgstr "Tämän pitäisi olla tavoittamattomissa" @@ -88,8 +43,8 @@ msgstr "Työnjohdollinen esihenkilö on pakollinen valinta" msgid "for companies, association_immediate_manager_check must always be null" msgstr "" -"yrityksen ollessa kyseessä kohteen Työnjohdollinen esihenkilö (association_immediate_manager_check) on " -"aina oltava tyhjä" +"yrityksen ollessa kyseessä kohteen Työnjohdollinen esihenkilö " +"(association_immediate_manager_check) on aina oltava tyhjä" msgid "" "This application has non-null de_minimis_aid but is applied by an association" @@ -98,7 +53,8 @@ msgstr "" "joka ei harjoita liiketoimintaa" msgid "This application has de_minimis_aid set but does not define any" -msgstr "Tässä hakemuksessa on valittu de minimis tuki, mutta sitä ei ole annettu" +msgstr "" +"Tässä hakemuksessa on valittu de minimis tuki, mutta sitä ei ole annettu" msgid "This application can not have de minimis aid" msgstr "Tässä hakemuksessa ei voi olla de minimis -tukea" @@ -106,15 +62,9 @@ msgstr "Tässä hakemuksessa ei voi olla de minimis -tukea" msgid "Total amount of de minimis aid too large" msgstr "De minimis -tuen kokonaismäärä liian suuri" -msgid "start_date must not be in a past year" -msgstr "Aloituspäivä ei saa olla menneessä vuodessa" - msgid "start_date must not be more than 4 months in the past" msgstr "Aloituspäivä voi olla enintään 4 kuukautta menneisyydessä" -msgid "end_date must not be in a past year" -msgstr "Päättymispäivä ei saa olla menneessä vuodessa" - msgid "application end_date can not be less than start_date" msgstr "hakemuksen päättymispäivä ei voi olla aiemmin kuin aloituspäivä" @@ -128,15 +78,13 @@ msgid "" "This application can not have a description for co-operation negotiations" msgstr "Tässä hakemuksessa ei voi olla kuvausta yhteistoimintaneuvotteluista" -msgid "Pay subsidy percent required" -msgstr "Palkkatukiprosentti on pakollinen" - #, python-brace-format msgid "This application can not have {key}" msgstr "Tässä hakemuksessa ei voi olla kohdetta {key}" msgid "This application can not have additional_pay_subsidy_percent" -msgstr "Tässä hakemuksessa ei voi olla kohdetta toinen tuki prosentti " +msgstr "" +"Tässä hakemuksessa ei voi olla kohdetta toinen tuki prosentti " "additional_pay_subsidy_percent" msgid "This field is required before submitting the application" @@ -148,6 +96,14 @@ msgstr "Tämä kenttä voidaan valita vain yhteisöille" msgid "This benefit type can not be selected" msgstr "Tätä avustustyyppiä ei voida valita" +msgid "" +"Apprenticeship program can not be selected if there is no granted pay subsidy" +msgstr "" + +msgid "" +"Apprenticeship program has to be yes or no if there is a granted pay subsidy" +msgstr "" + msgid "Application does not have the employee consent attachment" msgstr "Hakemuksessa ei ole liitteenä työntekijän suostumusta" @@ -173,6 +129,10 @@ msgstr "Hakemusta ei voida muuttaa tässä tilassa" msgid "create_application_for_company missing from request" msgstr "create_application_for_company puuttuu pyynnöstä" +#, python-brace-format +msgid "company with id {company_id} not found" +msgstr "" + msgid "The calculation should be created when the application is submitted" msgstr "Laskelma on luotava, kun hakemus lähetetään" @@ -183,6 +143,48 @@ msgstr "Laskelman tunnus ei vastaa nykyistä tunnusta" msgid "Reading {localized_model_name} data failed: {errors}" msgstr "{localized_model_name} -tietojen lukeminen epäonnistui: {errors}" +#, python-brace-format +msgid "Upload file size cannot be greater than {size} bytes" +msgstr "Ladattavan tiedoston koko ei voi ylittää {size} tavua" + +msgid "Too many attachments" +msgstr "Liian monta liitettä" + +msgid "Not a valid pdf file" +msgstr "Epäkelpo PDF-tiedosto" + +msgid "Not a valid image file" +msgstr "Epäkelpo kuvatiedosto" + +msgid "Applications in a batch can not be changed when batch is in this status" +msgstr "Erän hakemuksia ei voida muuttaa erän ollessa tässä tilassa" + +msgid "This application has invalid status and can not be added to this batch" +msgstr "" +"Tämän hakemuksen tila on virheellinen, eikä sitä voi lisätä tähän erään" + +msgid "Grant date too much in past" +msgstr "Myöntämispäivä liian kaukana menneisyydessä" + +msgid "Grant date can not be in the future" +msgstr "Myöntämispäivä ei voi olla tulevaisuudessa" + +msgid "Social security number invalid" +msgstr "Epäkelpo henkilötunnus" + +#, python-brace-format +msgid "Working hour must be greater than {min_hour} per week" +msgstr "Työajan on oltava suurempi kuin {min_hour} viikossa" + +msgid "Monthly pay must be greater than 0" +msgstr "Kuukausipalkan on oltava suurempi kuin 0" + +msgid "Vacation money must be a positive number" +msgstr "Lomarahojen täytyy olla positiivinen luku" + +msgid "Other expenses must be a positive number" +msgstr "Muiden kulujen täytyy olla positiivinen luku" + #, python-brace-format msgid "State transition not allowed: {status} to {value}" msgstr "Tilan siirto ei ole sallittu: {status} arvoon {value}" @@ -191,6 +193,9 @@ msgstr "Tilan siirto ei ole sallittu: {status} arvoon {value}" msgid "Initial status must be {initial_status}" msgstr "Alkutilan on oltava {initial_status}" +msgid "Displayed in the archive in the applicant view" +msgstr "" + msgid "Operation not allowed for this application status." msgstr "Toiminto ei ole sallittu tässä hakemuksen tilassa." @@ -198,7 +203,7 @@ msgid "File not found." msgstr "Tiedostoa ei löydy." #, python-brace-format -msgid "Helsinki-lisän hakemukset viety {date}" +msgid "Helsinki-lisan hakemukset viety {date}" msgstr "" msgid "Benefit can not be granted before 24-month waiting period expires" @@ -283,6 +288,26 @@ msgstr "oppisopimustoimiston koulutussopimus" msgid "helsinki benefit voucher" msgstr "Helsinki-lisä-seteli" +#, fuzzy +#| msgid "employee_consent" +msgid "employee consent" +msgstr "Suostumus työntekijän henkilötietojen käsittelyyn" + +#, fuzzy +#| msgid "application" +msgid "full application" +msgstr "hakemus" + +#, fuzzy +#| msgid "attachment" +msgid "other attachment" +msgstr "liite" + +#, fuzzy +#| msgid "Step 4 - summary" +msgid "pdf summary" +msgstr "Vaihe 4 – yhteenveto" + msgid "attachment is required" msgstr "liite on pakollinen" @@ -310,12 +335,125 @@ msgstr "Lähetetty Talpaan" msgid "Processing is completed" msgstr "Käsittely on valmis" +#, fuzzy +#| msgid "Rejected" +msgid "Rejected by Talpa" +msgstr "Hylätty" + +#, fuzzy +#| msgid "Sent to Talpa" +msgid "Not sent to Talpa" +msgstr "Lähetetty Talpaan" + +#, fuzzy +#| msgid "Sent to Talpa" +msgid "Successfully sent to Talpa" +msgstr "Lähetetty Talpaan" + +msgid "Handler" +msgstr "Käsittelijä" + +#, fuzzy +#| msgid "application" +msgid "Applicant" +msgstr "hakemus" + +#, fuzzy +#| msgid "Pay subsidy end date" +msgid "Pay subsidy granted (default)" +msgstr "Palkkatuen päättymispäivä" + +#, fuzzy +#| msgid "Pay subsidy end date" +msgid "Pay subsidy granted (aged)" +msgstr "Palkkatuen päättymispäivä" + +#, fuzzy +#| msgid "pay subsidy" +msgid "No granted pay subsidy" +msgstr "palkkatuki" + +msgid "Submitted but not sent to AHJO" +msgstr "" + +msgid "Request to open the case sent to AHJO" +msgstr "" + +msgid "Case opened in AHJO" +msgstr "" + +msgid "Update request sent" +msgstr "" + +msgid "Update request received" +msgstr "" + +#, fuzzy +#| msgid "Decision date" +msgid "Decision proposal sent" +msgstr "Päätöksen päivämäärä" + +#, fuzzy +#| msgid "Decision date" +msgid "Decision proposal accepted" +msgstr "Päätöksen päivämäärä" + +#, fuzzy +#| msgid "Decision date" +msgid "Decision proposal rejected" +msgstr "Päätöksen päivämäärä" + +msgid "Delete request sent" +msgstr "" + +msgid "Delete request received" +msgstr "" + +msgid "Allow/disallow applicant's modifications" +msgstr "" + +msgid "Success" +msgstr "" + +msgid "Failure" +msgstr "" + +#, fuzzy +#| msgid "Rejected in Ahjo" +msgid "Open case in Ahjo" +msgstr "Hylätty Ahjossa" + +#, fuzzy +#| msgid "Incomplete application" +msgid "Delete application in Ahjo" +msgstr "Puutteellinen hakemus" + +#, python-brace-format +msgid "" +"Your application {id} will be deleted soon. If you want to continue the " +"application process, please do so by {application_deletion_date}, otherwise " +"the application will deleted permanently." +msgstr "" + +msgid "Your Helsinki benefit draft application will expire" +msgstr "Helsinki-lisä -hakemuksesi luonnos vanhenee" + msgid "company" msgstr "yritys" msgid "status" msgstr "tila" +#, fuzzy +#| msgid "status" +msgid "talpa_status" +msgstr "tila" + +#, fuzzy +#| msgid "application log entry" +msgid "application origin" +msgstr "hakemuksen lokimerkintä" + msgid "application number" msgstr "hakemuksen numero" @@ -370,6 +508,11 @@ msgstr "avustuksen alkamispäivä" msgid "benefit end date" msgstr "avustuksen päättymispäivä" +#, fuzzy +#| msgid "application batches" +msgid "paper application date" +msgstr "hakemuserät" + msgid "ahjo batch" msgstr "Ahjo-erä" @@ -418,12 +561,30 @@ msgstr "Ahjo-päätöksen lakipykälä" msgid "date of the decision in Ahjo" msgstr "päätöksen päivämäärä Ahjossa" +#, fuzzy +#| msgid "Expert inspector's name" +msgid "P2P inspector's name" +msgstr "Asiantuntijatarkastajan nimi" + +#, fuzzy +#| msgid "Expert inspector's email address" +msgid "P2P inspector's email address" +msgstr "Asiantuntijatarkastajan sähköpostiosoite" + +msgid "P2P acceptor's title" +msgstr "" + msgid "Expert inspector's name" msgstr "Asiantuntijatarkastajan nimi" msgid "Expert inspector's email address" msgstr "Asiantuntijatarkastajan sähköpostiosoite" +#, fuzzy +#| msgid "Expert inspector's name" +msgid "Expert inspector's title" +msgstr "Asiantuntijatarkastajan nimi" + msgid "application batch" msgstr "hakemuserä" @@ -493,6 +654,214 @@ msgstr "liite" msgid "attachments" msgstr "liitteet" +msgid "paper" +msgstr "" + +#, fuzzy +#| msgid "company contact person's email" +msgid "company contact person" +msgstr "yrityksen yhteyshenkilön sähköpostiosoite" + +msgid "co-operation negotiations" +msgstr "" + +msgid "pay subsidy" +msgstr "palkkatuki" + +#, fuzzy +#| msgid "benefit end date" +msgid "benefit" +msgstr "avustuksen päättymispäivä" + +#, fuzzy +#| msgid "employee" +msgid "employment" +msgstr "työntekijä" + +msgid "approval" +msgstr "" + +#, fuzzy +#| msgid "status" +msgid "ahjo status" +msgstr "tila" + +#, fuzzy +#| msgid "status" +msgid "ahjo statuses" +msgstr "tila" + +#, fuzzy +#| msgid "File not found." +msgid "Not found" +msgstr "Tiedostoa ei löydy." + +msgid "Employer information" +msgstr "Työnantajan tiedot" + +msgid "Name of the employer" +msgstr "Yrityksen nimi" + +msgid "Business ID" +msgstr "Y-tunnus" + +msgid "Street address" +msgstr "Katuosoite" + +msgid "Delivery address" +msgstr "Postiosoite päätöstä varten" + +msgid "Bank account number" +msgstr "Tilinumero" + +msgid "Does the employer engage in economic activity?" +msgstr "Harjoittaako työnantaja taloudellista liiketoimintaa?" + +msgid "Yes" +msgstr "" + +#, fuzzy +#| msgid "Note" +msgid "No" +msgstr "Huomautus" + +msgid "Contact person for the employer" +msgstr "Työnantajan yhteyshenkilö" + +msgid "Name" +msgstr "Nimi" + +msgid "Telephone" +msgstr "Puhelin" + +msgid "Email address" +msgstr "Sähköposti" + +msgid "Preferred language of communication" +msgstr "Asiointikieli" + +msgid "De minimis aid received by the employer" +msgstr "Työnantajalle myönnetyt de minimis -tuet" + +msgid "Granter" +msgstr "Myöntäjä" + +msgid "Amount" +msgstr "Määrä" + +msgid "Date" +msgstr "Pvm" + +msgid "Total" +msgstr "Yhteensä" + +msgid "No, the applicant has not listed any previous de minimis aids." +msgstr "" +"Ei, työnantajalle ei ole myönnetty de minimis -tukia kuluvan vuoden ja " +"kahden edellisen verovuoden aikana." + +msgid "Change negotiations or co-determination negotiations" +msgstr "Muutosneuvottelut tai YT-tilanne" + +msgid "" +"Yes, the organization has ongoing or completed change negotiations within " +"the previous 12 months." +msgstr "" +"Kyllä, organisaatiolla on käynnissä olevat, tai päättyneet muutosneuvottelut " +"edeltävän 12 kuukauden aikana." + +msgid "" +"No, the organization does not have change negotiations in progress or that " +"have ended in the previous 12 months." +msgstr "" +"Ei, organisaatiolla ei ole käynnissä tai edeltävän 12 kuukauden aikana " +"päättyneitä muutosneuvotteluja" + +msgid "Describe the situation" +msgstr "Kuvaus tilanteesta" + +msgid "Person to be hired" +msgstr "Työllistettävän henkilön tiedot" + +msgid "First name" +msgstr "Etunimi" + +msgid "Last name" +msgstr "Sukunimi" + +msgid "Personal identity code" +msgstr "Henkilötunnus" + +msgid "The subsidised employee’s municipality of residence is Helsinki" +msgstr "Työllistetyn kotikunta Helsinki työsuhteen alkaessa" + +msgid "Has the person who is being employed been assigned a job supervisor?" +msgstr "Onko työllistetylle osoitettu työnjohdollinen esihenkilö?" + +msgid "Employment relationship" +msgstr "Työsuhde" + +msgid "Job title" +msgstr "Tehtävänimike" + +msgid "Working hours per week" +msgstr "Työtunnit / viikko" + +msgid "Gross salary per month" +msgstr "Bruttopalkka / kuukausi" + +msgid "Holiday pay per month" +msgstr "Lomaraha / kuukausi" + +msgid "Indirect labour costs per month" +msgstr "Sivukulut / kuukausi" + +msgid "Applicable collective agreement" +msgstr "Työehtosopimus" + +msgid "Yhdistyksellä on yritystoimintaa" +msgstr "" + +msgid "Is this an apprenticeship?" +msgstr "Onko kyseessä oppisopimus?" + +msgid "Received aid" +msgstr "Myönnetty tuki" + +msgid "Benefit is applied for the period" +msgstr "Haettu ajankohta" + +msgid "Applying for dates" +msgstr "Ajalle" + +msgid "Attachments" +msgstr "Liitteet" + +msgid "granted_aged" +msgstr "55 vuotta täyttäneiden työllistämistuki" + +msgid "Printed at" +msgstr "Tulostettu" + +# Application printout +msgid "City of Helsinki" +msgstr "Helsingin kaupunki" + +msgid "Helsinki-benefit online service" +msgstr "Helsinki-lisän asiointipalvelu" + +msgid "Helsinki-benefit application" +msgstr "Helsinki-lisä hakemus" + +msgid "Employee" +msgstr "Työllistettävä" + +msgid "Application received" +msgstr "Hakemus saapunut" + +msgid "Application number" +msgstr "Hakemusnumero" + msgid "Date range too large" msgstr "Päivämääräalue liian suuri" @@ -502,8 +871,7 @@ msgstr "" "override_monthly_benefit_amount_comment" msgid "This calculation needs override_monthly_benefit_amount_comment" -msgstr "" -"Tässä laskelmassa on oltava manuaalisen laskelman perustelu" +msgstr "Tässä laskelmassa on oltava manuaalisen laskelman perustelu" msgid "Handler can not be unassigned in this status" msgstr "Käsittelijää ei voida muuttaa tässä tilassa" @@ -518,7 +886,9 @@ msgid "End date cannot be empty" msgstr "Päättymispäivä ei voi olla tyhjä" msgid "State aid maximum percentage cannot be empty" -msgstr "Valtiontuen maksimimäärä ei voi olla tyhjä ja sen täytyy olla yksi alasvetovalikon arvoista" +msgstr "" +"Valtiontuen maksimimäärä ei voi olla tyhjä ja sen täytyy olla yksi " +"alasvetovalikon arvoista" msgid "Description row, amount ignored" msgstr "Kuvausrivi, rahamäärä ohitettu" @@ -547,6 +917,17 @@ msgstr "Koulutuskorvauksen määrä kuukaudelta" msgid "Total amount of deductions monthly" msgstr "Vähennysten kokonaismäärä kuukaudelta" +msgid "Basic date range description" +msgstr "" + +#, fuzzy +#| msgid "Date range too large" +msgid "Date range description for total row" +msgstr "Päivämääräalue liian suuri" + +msgid "Deduction description" +msgstr "" + msgid "Calculation already exists" msgstr "Laskelma on jo olemassa" @@ -584,9 +965,6 @@ msgstr "Palkkatuen päättymispäivä" msgid "Work time percent" msgstr "Työaikaprosentti" -msgid "pay subsidy" -msgstr "palkkatuki" - msgid "pay subsidies" msgstr "palkkatuet" @@ -641,6 +1019,9 @@ msgstr "Sinun on hyväksyttävä palveluehdot ennen mitään toimenpiteitä" msgid "Company information is not available" msgstr "Yrityksen tietoja ei ole saatavilla" +msgid "Your IP address is not on the safe list." +msgstr "" + msgid "bank account number" msgstr "tilinumero" @@ -666,9 +1047,13 @@ msgstr "" "{additional_information_needed_by} mennessä, muuten hakemusta ei voida " "käsitellä." -msgid "You have received a new message regarding your Helsinki benefit application" +msgid "" +"You have received a new message regarding your Helsinki benefit application" msgstr "Olet saanut uuden viestin Helsinki-lisä -hakemukseen littyen" +msgid "Your Helsinki benefit application requires additional information" +msgstr "Helsinki-lisä -hakemus tarvitsee lisätietoja" + #, python-format msgid "" "A new message has been added to the Helsinki-benefit application " @@ -745,9 +1130,30 @@ msgstr "Palveluehdot – näytetään sisäänkirjautumisen yhteydessä" msgid "Terms of application - show at application submit" msgstr "Hakuehdot – näytä hakemuksen lähettämisen yhteydessä" +#, fuzzy +#| msgid "Terms of application - show at application submit" +msgid "" +"Terms of application for handler - show at application submit for handler" +msgstr "Hakuehdot – näytä hakemuksen lähettämisen yhteydessä" + msgid "type of terms" msgstr "ehtojen tyyppi" +#, fuzzy +#| msgid "finnish terms (pdf file)" +msgid "Finnish terms (md)" +msgstr "suomenkieliset ehdot (PDF-tiedosto)" + +#, fuzzy +#| msgid "english terms (pdf file)" +msgid "English terms (md)" +msgstr "englanninkieliset ehdot (PDF-tiedosto)" + +#, fuzzy +#| msgid "swedish terms (pdf file)" +msgid "Swedish terms (md)" +msgstr "ruotsinkieliset ehdot (PDF-tiedosto)" + msgid "first day these terms are in effect" msgstr "näiden ehtojen ensimmäinen voimassaolopäivä" @@ -760,6 +1166,9 @@ msgstr "englanninkieliset ehdot (PDF-tiedosto)" msgid "swedish terms (pdf file)" msgstr "ruotsinkieliset ehdot (PDF-tiedosto)" +msgid "PDF or MD fields are missing for FI/EN/SV! Fill in either or" +msgstr "" + msgid "terms" msgstr "ehdot" @@ -802,202 +1211,53 @@ msgstr "palveluehtojen hyväksyntä" msgid "terms of service approvals" msgstr "palveluehtojen hyväksynnät" -# Application printout - -msgid "City of Helsinki" -msgstr "Helsingin kaupunki" - -msgid "Helsinki-benefit online service" -msgstr "Helsinki-lisän asiointipalvelu" - -msgid "Helsinki-benefit application" -msgstr "Helsinki-lisä hakemus" +#~ msgid "Social security number checksum invalid" +#~ msgstr "Epäkelpo henkilötunnuksen tarkistussumma" -msgid "Employee" -msgstr "Työllistettävä" - -msgid "Application received" -msgstr "Hakemus saapunut" - -msgid "Application number" -msgstr "Hakemusnumero" +#~ msgid "start_date must not be in a past year" +#~ msgstr "Aloituspäivä ei saa olla menneessä vuodessa" -msgid "Employer information" -msgstr "Työnantajan tiedot" - -msgid "Name of the employer" -msgstr "Yrityksen nimi" - -msgid "Business ID" -msgstr "Y-tunnus" - -msgid "Street address" -msgstr "Katuosoite" - -msgid "Bank account number" -msgstr "Tilinumero" - -msgid "Does the employer engage in economic activity?" -msgstr "Harjoittaako työnantaja taloudellista liiketoimintaa?" - -msgid "Delivery address" -msgstr "Postiosoite päätöstä varten" - -msgid "Contact person for the employer" -msgstr "Työnantajan yhteyshenkilö" - -msgid "Name" -msgstr "Nimi" - -msgid "Telephone" -msgstr "Puhelin" - -msgid "Email address" -msgstr "Sähköposti" - -msgid "Preferred language of communication" -msgstr "Asiointikieli" - -msgid "De minimis aid received by the employer" -msgstr "Työnantajalle myönnetyt de minimis -tuet" - -msgid "Granter" -msgstr "Myöntäjä" - -msgid "Amount" -msgstr "Määrä" - -msgid "Date" -msgstr "Pvm" - -msgid "Total" -msgstr "Yhteensä" - -msgid "No, the applicant has not listed any previous de minimis aids." -msgstr "Ei, työnantajalle ei ole myönnetty de minimis -tukia kuluvan vuoden ja kahden edellisen verovuoden aikana." - -msgid "Change negotiations or co-determination negotiations" -msgstr "Muutosneuvottelut tai YT-tilanne" - -msgid "Yes, the organization has ongoing or completed change negotiations within the previous 12 months." -msgstr "Kyllä, organisaatiolla on käynnissä olevat, tai päättyneet muutosneuvottelut edeltävän 12 kuukauden aikana." - -msgid "No, the organization does not have change negotiations in progress or that have ended in the previous 12 months." -msgstr "Ei, organisaatiolla ei ole käynnissä tai edeltävän 12 kuukauden aikana päättyneitä muutosneuvotteluja" - -msgid "Describe the situation" -msgstr "Kuvaus tilanteesta" - -msgid "Person to be hired" -msgstr "Työllistettävän henkilön tiedot" - -msgid "First name" -msgstr "Etunimi" - -msgid "Last name" -msgstr "Sukunimi" - -msgid "Personal identity code" -msgstr "Henkilötunnus" - -msgid "The subsidised employee’s municipality of residence is Helsinki" -msgstr "Työllistetyn kotikunta Helsinki työsuhteen alkaessa" - -msgid "Has the person who is being employed been assigned a job supervisor?" -msgstr "Onko työllistetylle osoitettu työnjohdollinen esihenkilö?" - -msgid "Employment relationship" -msgstr "Työsuhde" - -msgid "Job title" -msgstr "Tehtävänimike" - -msgid "Working hours per week" -msgstr "Työtunnit / viikko" - -msgid "Gross salary per month" -msgstr "Bruttopalkka / kuukausi" - -msgid "Indirect labour costs per month" -msgstr "Sivukulut / kuukausi" - -msgid "Holiday pay per month" -msgstr "Lomaraha / kuukausi" - -msgid "Applicable collective agreement" -msgstr "Työehtosopimus" - -msgid "Is this an apprenticeship?" -msgstr "Onko kyseessä oppisopimus?" - -msgid "Received aid" -msgstr "Myönnetty tuki" - -msgid "Benefit is applied for the period" -msgstr "Haettu ajankohta" - -msgid "Helsinki benefit is granted" -msgstr "Helsinki-lisää myönnetään" - -msgid "Helsinki benefit is not granted" -msgstr "Helsinki-lisää ei myönnetä" - -msgid "Applying for dates" -msgstr "Ajalle" - -msgid "Decision date" -msgstr "Päätöksen päivämäärä" - -msgid "Handler" -msgstr "Käsittelijä" - -msgid "Granted as de minimis aid" -msgstr "Myönnetään de minimis -tukena" - -msgid "Attachments" -msgstr "Liitteet" - -msgid "Processing of the personal data of the person to be employed" -msgstr "Työllistettävän henkilötietojen käsittely" +#~ msgid "end_date must not be in a past year" +#~ msgstr "Päättymispäivä ei saa olla menneessä vuodessa" -msgid "employee_consent" -msgstr "Suostumus työntekijän henkilötietojen käsittelyyn" +#~ msgid "Pay subsidy percent required" +#~ msgstr "Palkkatukiprosentti on pakollinen" -msgid "employment_contract" -msgstr "Työsopimus" +#~ msgid "Helsinki benefit is granted" +#~ msgstr "Helsinki-lisää myönnetään" -msgid "pay_subsidy_decision" -msgstr "Palkkatukipäätös" +#~ msgid "Helsinki benefit is not granted" +#~ msgstr "Helsinki-lisää ei myönnetä" -msgid "education_contract" -msgstr "Sopimus oppisopimuskoulutuksen järjestämisestä" +#~ msgid "Granted as de minimis aid" +#~ msgstr "Myönnetään de minimis -tukena" -msgid "helsinki_benefit_voucher" -msgstr "Helsinki-lisä -kortti" +#~ msgid "Processing of the personal data of the person to be employed" +#~ msgstr "Työllistettävän henkilötietojen käsittely" -msgid "fi" -msgstr "Suomi" +#~ msgid "employment_contract" +#~ msgstr "Työsopimus" -msgid "sv" -msgstr "Ruotsi" +#~ msgid "pay_subsidy_decision" +#~ msgstr "Palkkatukipäätös" -msgid "en" -msgstr "Englanti" +#~ msgid "education_contract" +#~ msgstr "Sopimus oppisopimuskoulutuksen järjestämisestä" -msgid "granted" -msgstr "Palkkatuki" +#~ msgid "helsinki_benefit_voucher" +#~ msgstr "Helsinki-lisä -kortti" -msgid "granted_aged" -msgstr "55 vuotta täyttäneiden työllistämistuki" +#~ msgid "fi" +#~ msgstr "Suomi" -msgid "not_granted" -msgstr "Ei myönnetty" +#~ msgid "sv" +#~ msgstr "Ruotsi" -msgid "Printed at" -msgstr "Tulostettu" +#~ msgid "en" +#~ msgstr "Englanti" -msgid "Your Helsinki benefit draft application will expire" -msgstr "Helsinki-lisä -hakemuksesi luonnos vanhenee" +#~ msgid "granted" +#~ msgstr "Palkkatuki" -msgid "Your Helsinki benefit application requires additional information" -msgstr "Helsinki-lisä -hakemus tarvitsee lisätietoja" \ No newline at end of file +#~ msgid "not_granted" +#~ msgstr "Ei myönnetty" diff --git a/backend/benefit/locale/sv/LC_MESSAGES/django.po b/backend/benefit/locale/sv/LC_MESSAGES/django.po index 4479e76065..ed9cf4cba3 100644 --- a/backend/benefit/locale/sv/LC_MESSAGES/django.po +++ b/backend/benefit/locale/sv/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-01 10:42+0200\n" +"POT-Creation-Date: 2024-01-25 18:30+0200\n" "PO-Revision-Date: 2022-11-01 10:47+0200\n" "Last-Translator: Kari Salminen \n" "Language-Team: \n" @@ -36,50 +36,6 @@ msgstr "" msgid "TALPA export {date}" msgstr "TALPA-export {date}" -#, python-brace-format -msgid "Upload file size cannot be greater than {size} bytes" -msgstr "Den fil som laddas upp kan inte vara större än {size} byte" - -msgid "Too many attachments" -msgstr "För många bilagor" - -msgid "Not a valid pdf file" -msgstr "Ingen giltig PDF-fil" - -msgid "Not a valid image file" -msgstr "Ingen giltig bildfil" - -msgid "Grant date too much in past" -msgstr "Beviljandedatum för tidigt" - -msgid "Grant date can not be in the future" -msgstr "Beviljandedatum kan inte vara i framtiden" - -msgid "Social security number invalid" -msgstr "Personbeteckning felaktig" - -msgid "Social security number checksum invalid" -msgstr "Personbeteckning kontrollsumma felaktig" - -#, python-brace-format -msgid "Working hour must be greater than {min_hour} per week" -msgstr "Antalet arbetstimmar måste vara högre än {min_hour} per vecka" - -msgid "Monthly pay must be greater than 0" -msgstr "Månatlig lön måste vara större än 0" - -msgid "Vacation money must be a positive number" -msgstr "Semesterpenning måste vara ett positivt tal" - -msgid "Other expenses must be a positive number" -msgstr "Andra kostnader måste vara ett positivt tal" - -msgid "Applications in a batch can not be changed when batch is in this status" -msgstr "Ansökningar i en sats kan inte ändras när satsen har denna status" - -msgid "This application has invalid status and can not be added to this batch" -msgstr "Denna ansökan har felaktig status och kan inte läggas till denna sats" - msgid "This should be unreachable" msgstr "Detta bör vara onåbart" @@ -104,15 +60,9 @@ msgstr "Denna ansökan kan inte ha de minimis-stöd" msgid "Total amount of de minimis aid too large" msgstr "Totalt belopp av de minimis-stöd är för stort" -msgid "start_date must not be in a past year" -msgstr "Startdatum får inte vara under föregående år" - msgid "start_date must not be more than 4 months in the past" msgstr "Startdatumet får inte ligga mer än fyra månader bakåt i tiden" -msgid "end_date must not be in a past year" -msgstr "Slutdatum får inte vara under föregående år" - msgid "application end_date can not be less than start_date" msgstr "end_date för ansökan kan inte vara tidigare än start_date" @@ -126,9 +76,6 @@ msgid "" "This application can not have a description for co-operation negotiations" msgstr "Denna ansökan kan inte ha en beskrivning för samarbetsförhandlingar" -msgid "Pay subsidy percent required" -msgstr "Lönesubventionsprocent krävs" - #, python-brace-format msgid "This application can not have {key}" msgstr "Denna ansökan kan inte ha {key}" @@ -145,6 +92,14 @@ msgstr "Detta fält är tillgängligt endast för sammanslutningar" msgid "This benefit type can not be selected" msgstr "Denna understödstyp kan inte väljas" +msgid "" +"Apprenticeship program can not be selected if there is no granted pay subsidy" +msgstr "" + +msgid "" +"Apprenticeship program has to be yes or no if there is a granted pay subsidy" +msgstr "" + msgid "Application does not have the employee consent attachment" msgstr "Den anställdas samtycke har inte bifogats ansökan" @@ -170,6 +125,10 @@ msgstr "Ansökan kan inte ändras i denna status" msgid "create_application_for_company missing from request" msgstr "create_application_for_company saknas från begäran" +#, python-brace-format +msgid "company with id {company_id} not found" +msgstr "" + msgid "The calculation should be created when the application is submitted" msgstr "Beräkningen bör skapas när ansökan skickas" @@ -180,6 +139,47 @@ msgstr "Beräkningens ID motsvarar inte befintlig ID." msgid "Reading {localized_model_name} data failed: {errors}" msgstr "Data {localized_model_name} kan inte läsas: {errors}" +#, python-brace-format +msgid "Upload file size cannot be greater than {size} bytes" +msgstr "Den fil som laddas upp kan inte vara större än {size} byte" + +msgid "Too many attachments" +msgstr "För många bilagor" + +msgid "Not a valid pdf file" +msgstr "Ingen giltig PDF-fil" + +msgid "Not a valid image file" +msgstr "Ingen giltig bildfil" + +msgid "Applications in a batch can not be changed when batch is in this status" +msgstr "Ansökningar i en sats kan inte ändras när satsen har denna status" + +msgid "This application has invalid status and can not be added to this batch" +msgstr "Denna ansökan har felaktig status och kan inte läggas till denna sats" + +msgid "Grant date too much in past" +msgstr "Beviljandedatum för tidigt" + +msgid "Grant date can not be in the future" +msgstr "Beviljandedatum kan inte vara i framtiden" + +msgid "Social security number invalid" +msgstr "Personbeteckning felaktig" + +#, python-brace-format +msgid "Working hour must be greater than {min_hour} per week" +msgstr "Antalet arbetstimmar måste vara högre än {min_hour} per vecka" + +msgid "Monthly pay must be greater than 0" +msgstr "Månatlig lön måste vara större än 0" + +msgid "Vacation money must be a positive number" +msgstr "Semesterpenning måste vara ett positivt tal" + +msgid "Other expenses must be a positive number" +msgstr "Andra kostnader måste vara ett positivt tal" + #, python-brace-format msgid "State transition not allowed: {status} to {value}" msgstr "Tillståndsövergång tillåts inte: {status} till {value}" @@ -188,6 +188,9 @@ msgstr "Tillståndsövergång tillåts inte: {status} till {value}" msgid "Initial status must be {initial_status}" msgstr "Initialstatus måste vara {initial_status}" +msgid "Displayed in the archive in the applicant view" +msgstr "" + msgid "Operation not allowed for this application status." msgstr "Åtgärd tillåts inte för denna ansökningsstatus" @@ -195,7 +198,7 @@ msgid "File not found." msgstr "Fil hittades inte." #, python-brace-format -msgid "Helsinki-lisän hakemukset viety {date}" +msgid "Helsinki-lisan hakemukset viety {date}" msgstr "" msgid "Benefit can not be granted before 24-month waiting period expires" @@ -281,6 +284,26 @@ msgstr "läroavtal" msgid "helsinki benefit voucher" msgstr "sedel för Helsingforstillägg" +#, fuzzy +#| msgid "employee_consent" +msgid "employee consent" +msgstr "Behandlingen av personuppgifterna av personen som ska sysselsättas" + +#, fuzzy +#| msgid "application" +msgid "full application" +msgstr "Ansökan" + +#, fuzzy +#| msgid "attachment" +msgid "other attachment" +msgstr "bilaga" + +#, fuzzy +#| msgid "Step 4 - summary" +msgid "pdf summary" +msgstr "Steg 4 – sammanfattning" + msgid "attachment is required" msgstr "bilaga är obligatorisk" @@ -308,12 +331,125 @@ msgstr "Skickad till Talpa" msgid "Processing is completed" msgstr "Processen är slutförd" +#, fuzzy +#| msgid "Rejected" +msgid "Rejected by Talpa" +msgstr "Avvisad" + +#, fuzzy +#| msgid "Sent to Talpa" +msgid "Not sent to Talpa" +msgstr "Skickad till Talpa" + +#, fuzzy +#| msgid "Sent to Talpa" +msgid "Successfully sent to Talpa" +msgstr "Skickad till Talpa" + +msgid "Handler" +msgstr "Handläggare" + +#, fuzzy +#| msgid "application" +msgid "Applicant" +msgstr "Ansökan" + +#, fuzzy +#| msgid "Pay subsidy end date" +msgid "Pay subsidy granted (default)" +msgstr "Slutdatum för lönesubvention" + +#, fuzzy +#| msgid "Pay subsidy end date" +msgid "Pay subsidy granted (aged)" +msgstr "Slutdatum för lönesubvention" + +#, fuzzy +#| msgid "pay subsidy" +msgid "No granted pay subsidy" +msgstr "lönesubvention" + +msgid "Submitted but not sent to AHJO" +msgstr "" + +msgid "Request to open the case sent to AHJO" +msgstr "" + +msgid "Case opened in AHJO" +msgstr "" + +msgid "Update request sent" +msgstr "" + +msgid "Update request received" +msgstr "" + +#, fuzzy +#| msgid "Decision date" +msgid "Decision proposal sent" +msgstr "Beslutsdatum" + +#, fuzzy +#| msgid "Decision date" +msgid "Decision proposal accepted" +msgstr "Beslutsdatum" + +#, fuzzy +#| msgid "Decision date" +msgid "Decision proposal rejected" +msgstr "Beslutsdatum" + +msgid "Delete request sent" +msgstr "" + +msgid "Delete request received" +msgstr "" + +msgid "Allow/disallow applicant's modifications" +msgstr "" + +msgid "Success" +msgstr "" + +msgid "Failure" +msgstr "" + +#, fuzzy +#| msgid "Rejected in Ahjo" +msgid "Open case in Ahjo" +msgstr "Avvisad i Ahjo" + +#, fuzzy +#| msgid "Incomplete application" +msgid "Delete application in Ahjo" +msgstr "Ofullständig ansökan" + +#, python-brace-format +msgid "" +"Your application {id} will be deleted soon. If you want to continue the " +"application process, please do so by {application_deletion_date}, otherwise " +"the application will deleted permanently." +msgstr "" + +msgid "Your Helsinki benefit draft application will expire" +msgstr "Ditt utkast för ansökan går ut" + msgid "company" msgstr "företag" msgid "status" msgstr "status" +#, fuzzy +#| msgid "status" +msgid "talpa_status" +msgstr "status" + +#, fuzzy +#| msgid "application log entry" +msgid "application origin" +msgstr "registrering i ansökningslogg" + msgid "application number" msgstr "ansökningsnummer" @@ -368,6 +504,11 @@ msgstr "startdatum för understöd" msgid "benefit end date" msgstr "slutdatum för understöd" +#, fuzzy +#| msgid "application batches" +msgid "paper application date" +msgstr "ansökningssatser" + msgid "ahjo batch" msgstr "ahjo-sats" @@ -416,12 +557,30 @@ msgstr "lag som tillämpas i Ahjos beslut" msgid "date of the decision in Ahjo" msgstr "datum då beslut fattas vid Ahjo" +#, fuzzy +#| msgid "Expert inspector's name" +msgid "P2P inspector's name" +msgstr "Namn på sakkunnig inspektör" + +#, fuzzy +#| msgid "Expert inspector's email address" +msgid "P2P inspector's email address" +msgstr "E-postadress till sakkunnig inspektör" + +msgid "P2P acceptor's title" +msgstr "" + msgid "Expert inspector's name" msgstr "Namn på sakkunnig inspektör" msgid "Expert inspector's email address" msgstr "E-postadress till sakkunnig inspektör" +#, fuzzy +#| msgid "Expert inspector's name" +msgid "Expert inspector's title" +msgstr "Namn på sakkunnig inspektör" + msgid "application batch" msgstr "ansökningssats" @@ -491,6 +650,212 @@ msgstr "bilaga" msgid "attachments" msgstr "bilagor" +msgid "paper" +msgstr "" + +#, fuzzy +#| msgid "company contact person's email" +msgid "company contact person" +msgstr "kontaktpersonens e-postadress" + +msgid "co-operation negotiations" +msgstr "" + +msgid "pay subsidy" +msgstr "lönesubvention" + +#, fuzzy +#| msgid "benefit end date" +msgid "benefit" +msgstr "slutdatum för understöd" + +#, fuzzy +#| msgid "employee" +msgid "employment" +msgstr "anställd" + +msgid "approval" +msgstr "" + +#, fuzzy +#| msgid "status" +msgid "ahjo status" +msgstr "status" + +#, fuzzy +#| msgid "status" +msgid "ahjo statuses" +msgstr "status" + +#, fuzzy +#| msgid "File not found." +msgid "Not found" +msgstr "Fil hittades inte." + +msgid "Employer information" +msgstr "Arbetsgivarinformation" + +msgid "Name of the employer" +msgstr "Arbetsgivarens namn" + +msgid "Business ID" +msgstr "FO-nummer" + +msgid "Street address" +msgstr "Adress" + +msgid "Delivery address" +msgstr "Leveransadress" + +msgid "Bank account number" +msgstr "Kontonummer" + +msgid "Does the employer engage in economic activity?" +msgstr "Har arbetsgivaren ekonomisk verksamhet?" + +msgid "Yes" +msgstr "" + +#, fuzzy +#| msgid "Note" +msgid "No" +msgstr "Anteckning" + +msgid "Contact person for the employer" +msgstr "Arbetsgivarens kontaktperson" + +msgid "Name" +msgstr "Namn" + +msgid "Telephone" +msgstr "Telefon" + +msgid "Email address" +msgstr "E-postadress" + +msgid "Preferred language of communication" +msgstr "Affärsspråk" + +msgid "De minimis aid received by the employer" +msgstr "De minimis-stöden som arbetsgivaren fått" + +msgid "Granter" +msgstr "Beviljare av stödet" + +msgid "Amount" +msgstr "Stödbeloppet" + +msgid "Date" +msgstr "Datum" + +msgid "Total" +msgstr "Sammanlagt" + +msgid "No, the applicant has not listed any previous de minimis aids." +msgstr "Nej, arbetsgivaren har inte angett några tidigare de minimis-stöd." + +msgid "Change negotiations or co-determination negotiations" +msgstr "Samarbetsförhandlingar eller samarbetsförfarande" + +msgid "" +"Yes, the organization has ongoing or completed change negotiations within " +"the previous 12 months." +msgstr "" +"Ja, organisationen har pågående eller avslutade samarbetsförhandlingar under " +"de föregående 12 månaderna." + +msgid "" +"No, the organization does not have change negotiations in progress or that " +"have ended in the previous 12 months." +msgstr "" +"Nej, organisationen har inga samarbetsförhandlingar på gång eller som har " +"avslutats under de senaste 12 månaderna." + +msgid "Describe the situation" +msgstr "Beskrivning av situationen" + +msgid "Person to be hired" +msgstr "Personen som ska sysselsättas" + +msgid "First name" +msgstr "Förnamn" + +msgid "Last name" +msgstr "Efternamn" + +msgid "Personal identity code" +msgstr "Personbeteckning" + +msgid "The subsidised employee’s municipality of residence is Helsinki" +msgstr "Personen som anställs bor i Helsingfors" + +msgid "Has the person who is being employed been assigned a job supervisor?" +msgstr "Har personen som ska sysselsättas utsetts en arbetsledande chef?" + +msgid "Employment relationship" +msgstr "Anställningsförhållande" + +msgid "Job title" +msgstr "Titel" + +msgid "Working hours per week" +msgstr "Arbetstid per vecka" + +msgid "Gross salary per month" +msgstr "Bruttolön per månad" + +msgid "Holiday pay per month" +msgstr "Semesterpenning per månad" + +msgid "Indirect labour costs per month" +msgstr "Bikostnader per månad" + +msgid "Applicable collective agreement" +msgstr "Kollektivavtal som tillämpas" + +msgid "Yhdistyksellä on yritystoimintaa" +msgstr "" + +msgid "Is this an apprenticeship?" +msgstr "Handlar det om ett läroavtal?" + +msgid "Received aid" +msgstr "Beviljat stöd" + +msgid "Benefit is applied for the period" +msgstr "Stillägg tillämpas för perioden" + +msgid "Applying for dates" +msgstr "Ansöker om datum" + +msgid "Attachments" +msgstr "Bilagor" + +msgid "granted_aged" +msgstr "Sysselsättningsstöd för personer som fyllt 55 år" + +msgid "Printed at" +msgstr "Tryckt" + +# Application printout +msgid "City of Helsinki" +msgstr "Helsingfors stad" + +msgid "Helsinki-benefit online service" +msgstr "Helsingforstillägg e-tjänst" + +msgid "Helsinki-benefit application" +msgstr "Helsingforstillägg ansökning" + +msgid "Employee" +msgstr "Anställd" + +msgid "Application received" +msgstr "Ansökning mottagen" + +msgid "Application number" +msgstr "Ansökningsnummer" + msgid "Date range too large" msgstr "Tidsperiod för lång" @@ -512,6 +877,9 @@ msgstr "Startdatum kan inte vara tomt" msgid "End date cannot be empty" msgstr "Slutdatum kan inte vara tomt" +msgid "State aid maximum percentage cannot be empty" +msgstr "Maximalt statsunderstöd får inte vara tom" + msgid "Description row, amount ignored" msgstr "Beskrivningsrad, belopp ignorerat" @@ -521,9 +889,6 @@ msgstr "Lönekostnader" msgid "State aid maximum %" msgstr "Maximalt statsunderstöd %" -msgid "State aid maximum percentage cannot be empty" -msgstr "Maximalt statsunderstöd får inte vara tom" - msgid "Pay subsidy/month" msgstr "Lönesubvention/månad" @@ -542,6 +907,17 @@ msgstr "Utbildningsersättningens belopp per månad" msgid "Total amount of deductions monthly" msgstr "Totalbelopp av avdrag per månad" +msgid "Basic date range description" +msgstr "" + +#, fuzzy +#| msgid "Date range too large" +msgid "Date range description for total row" +msgstr "Tidsperiod för lång" + +msgid "Deduction description" +msgstr "" + msgid "Calculation already exists" msgstr "Beräkning finns redan" @@ -579,9 +955,6 @@ msgstr "Slutdatum för lönesubvention" msgid "Work time percent" msgstr "Arbetstidsprocent" -msgid "pay subsidy" -msgstr "lönesubvention" - msgid "pay subsidies" msgstr "lönesubventioner" @@ -631,11 +1004,15 @@ msgid "Invalid IBAN" msgstr "Felaktigt IBAN-kontonummer" msgid "You have to accept Terms of Service before doing any action" -msgstr "Du måste godkänna användarvillkoren för tjänsten innan du kan göra något" +msgstr "" +"Du måste godkänna användarvillkoren för tjänsten innan du kan göra något" msgid "Company information is not available" msgstr "Företagets uppgifter är inte tillgängliga" +msgid "Your IP address is not on the safe list." +msgstr "" + msgid "bank account number" msgstr "bankkontonummer" @@ -651,9 +1028,6 @@ msgstr "Engelska" msgid "Swedish" msgstr "Svenska" -msgid "Application number" -msgstr "Ansökningsnummer" - #, python-brace-format msgid "" "Your application has been opened for editing. Please make the corrections by " @@ -663,9 +1037,13 @@ msgstr "" "Din ansökan har öppnats för redigering. Gör ändringarna senast " "{additional_information_needed_by}, annars kan ansökan inte behandlas." -msgid "You have received a new message regarding your Helsinki benefit application" +msgid "" +"You have received a new message regarding your Helsinki benefit application" msgstr "Du har fått ett nytt meddelande om ansökningen om Helsingforstillägget" +msgid "Your Helsinki benefit application requires additional information" +msgstr "Ansökan om Helsingforstillägget behöver ytterligare information" + #, python-format msgid "" "A new message has been added to the Helsinki-benefit application " @@ -743,9 +1121,30 @@ msgstr "Villkor för tjänsten – visas vid inloggning" msgid "Terms of application - show at application submit" msgstr "Ansökningsvillkor – visas vid inlämning av ansökan" +#, fuzzy +#| msgid "Terms of application - show at application submit" +msgid "" +"Terms of application for handler - show at application submit for handler" +msgstr "Ansökningsvillkor – visas vid inlämning av ansökan" + msgid "type of terms" msgstr "typ av villkor" +#, fuzzy +#| msgid "finnish terms (pdf file)" +msgid "Finnish terms (md)" +msgstr "villkoren på finska (PDF-fil)" + +#, fuzzy +#| msgid "english terms (pdf file)" +msgid "English terms (md)" +msgstr "villkoren på engelska (PDF-fil)" + +#, fuzzy +#| msgid "swedish terms (pdf file)" +msgid "Swedish terms (md)" +msgstr "villkoren på svenska (PDF-fil)" + msgid "first day these terms are in effect" msgstr "första datum då dessa villkor gäller" @@ -758,6 +1157,9 @@ msgstr "villkoren på engelska (PDF-fil)" msgid "swedish terms (pdf file)" msgstr "villkoren på svenska (PDF-fil)" +msgid "PDF or MD fields are missing for FI/EN/SV! Fill in either or" +msgstr "" + msgid "terms" msgstr "villkor" @@ -800,196 +1202,50 @@ msgstr "godkännande av villkoren för tjänsten" msgid "terms of service approvals" msgstr "godkännanden av villkoren för tjänsten" -# Application printout +#~ msgid "Social security number checksum invalid" +#~ msgstr "Personbeteckning kontrollsumma felaktig" -msgid "City of Helsinki" -msgstr "Helsingfors stad" +#~ msgid "start_date must not be in a past year" +#~ msgstr "Startdatum får inte vara under föregående år" -msgid "Helsinki-benefit online service" -msgstr "Helsingforstillägg e-tjänst" +#~ msgid "end_date must not be in a past year" +#~ msgstr "Slutdatum får inte vara under föregående år" -msgid "Helsinki-benefit application" -msgstr "Helsingforstillägg ansökning" +#~ msgid "Pay subsidy percent required" +#~ msgstr "Lönesubventionsprocent krävs" -msgid "Employee" -msgstr "Anställd" +#~ msgid "Helsinki benefit is granted" +#~ msgstr "Helsingforstillägg beviljas" -msgid "Application received" -msgstr "Ansökning mottagen" +#~ msgid "Helsinki benefit is not granted" +#~ msgstr "Helsingforstillägg beviljas inte" -msgid "Employer information" -msgstr "Arbetsgivarinformation" - -msgid "Name of the employer" -msgstr "Arbetsgivarens namn" - -msgid "Business ID" -msgstr "FO-nummer" - -msgid "Street address" -msgstr "Adress" - -msgid "Bank account number" -msgstr "Kontonummer" - -msgid "Does the employer engage in economic activity?" -msgstr "Har arbetsgivaren ekonomisk verksamhet?" - -msgid "Delivery address" -msgstr "Leveransadress" - -msgid "Contact person for the employer" -msgstr "Arbetsgivarens kontaktperson" - -msgid "Name" -msgstr "Namn" - -msgid "Telephone" -msgstr "Telefon" - -msgid "Email address" -msgstr "E-postadress" - -msgid "Preferred language of communication" -msgstr "Affärsspråk" - -msgid "De minimis aid received by the employer" -msgstr "De minimis-stöden som arbetsgivaren fått" - -msgid "Granter" -msgstr "Beviljare av stödet" - -msgid "Amount" -msgstr "Stödbeloppet" - -msgid "Date" -msgstr "Datum" - -msgid "Total" -msgstr "Sammanlagt" - -msgid "No, the applicant has not listed any previous de minimis aids." -msgstr "Nej, arbetsgivaren har inte angett några tidigare de minimis-stöd." - -msgid "Change negotiations or co-determination negotiations" -msgstr "Samarbetsförhandlingar eller samarbetsförfarande" - -msgid "Yes, the organization has ongoing or completed change negotiations within the previous 12 months." -msgstr "Ja, organisationen har pågående eller avslutade samarbetsförhandlingar under de föregående 12 månaderna." - -msgid "No, the organization does not have change negotiations in progress or that have ended in the previous 12 months." -msgstr "Nej, organisationen har inga samarbetsförhandlingar på gång eller som har avslutats under de senaste 12 månaderna." - -msgid "Describe the situation" -msgstr "Beskrivning av situationen" - -msgid "Person to be hired" -msgstr "Personen som ska sysselsättas" - -msgid "First name" -msgstr "Förnamn" - -msgid "Last name" -msgstr "Efternamn" - -msgid "Personal identity code" -msgstr "Personbeteckning" - -msgid "The subsidised employee’s municipality of residence is Helsinki" -msgstr "Personen som anställs bor i Helsingfors" - -msgid "Has the person who is being employed been assigned a job supervisor?" -msgstr "Har personen som ska sysselsättas utsetts en arbetsledande chef?" - -msgid "Employment relationship" -msgstr "Anställningsförhållande" - -msgid "Job title" -msgstr "Titel" - -msgid "Working hours per week" -msgstr "Arbetstid per vecka" - -msgid "Gross salary per month" -msgstr "Bruttolön per månad" - -msgid "Indirect labour costs per month" -msgstr "Bikostnader per månad" - -msgid "Holiday pay per month" -msgstr "Semesterpenning per månad" - -msgid "Applicable collective agreement" -msgstr "Kollektivavtal som tillämpas" - -msgid "Is this an apprenticeship?" -msgstr "Handlar det om ett läroavtal?" - -msgid "Received aid" -msgstr "Beviljat stöd" - -msgid "Benefit is applied for the period" -msgstr "Stillägg tillämpas för perioden" - -msgid "Helsinki benefit is granted" -msgstr "Helsingforstillägg beviljas" - -msgid "Helsinki benefit is not granted" -msgstr "Helsingforstillägg beviljas inte" - -msgid "Applying for dates" -msgstr "Ansöker om datum" - -msgid "Decision date" -msgstr "Beslutsdatum" - -msgid "Handler" -msgstr "Handläggare" - -msgid "Granted as de minimis aid" -msgstr "Beviljas som stöd av de minimis stöd" - -msgid "Attachments" -msgstr "Bilagor" - -msgid "employee_consent" -msgstr "Behandlingen av personuppgifterna av personen som ska sysselsättas" - -msgid "employment_contract" -msgstr "Arbetsavtal" +#~ msgid "Granted as de minimis aid" +#~ msgstr "Beviljas som stöd av de minimis stöd" -msgid "pay_subsidy_decision" -msgstr "Beslut om lönesubvention" +#~ msgid "employment_contract" +#~ msgstr "Arbetsavtal" -msgid "education_contract" -msgstr "Avtal om ordnandet av läroavtalsutbildning" +#~ msgid "pay_subsidy_decision" +#~ msgstr "Beslut om lönesubvention" -msgid "helsinki_benefit_voucher" -msgstr "Helsingforstilläggskortet" - -msgid "fi" -msgstr "Finska" +#~ msgid "education_contract" +#~ msgstr "Avtal om ordnandet av läroavtalsutbildning" -msgid "sv" -msgstr "Svenska" +#~ msgid "helsinki_benefit_voucher" +#~ msgstr "Helsingforstilläggskortet" -msgid "en" -msgstr "Engelska" +#~ msgid "fi" +#~ msgstr "Finska" -msgid "granted" -msgstr "Lönesubvention" +#~ msgid "sv" +#~ msgstr "Svenska" -msgid "granted_aged" -msgstr "Sysselsättningsstöd för personer som fyllt 55 år" +#~ msgid "en" +#~ msgstr "Engelska" -msgid "not_granted" -msgstr "Inget stöd" +#~ msgid "granted" +#~ msgstr "Lönesubvention" -msgid "Printed at" -msgstr "Tryckt" - -msgid "Your Helsinki benefit draft application will expire" -msgstr "Ditt utkast för ansökan går ut" - -msgid "Your Helsinki benefit application requires additional information" -msgstr "Ansökan om Helsingforstillägget behöver ytterligare information" \ No newline at end of file +#~ msgid "not_granted" +#~ msgstr "Inget stöd" diff --git a/frontend/benefit/applicant/public/locales/en/common.json b/frontend/benefit/applicant/public/locales/en/common.json index f133530336..543254d985 100644 --- a/frontend/benefit/applicant/public/locales/en/common.json +++ b/frontend/benefit/applicant/public/locales/en/common.json @@ -21,7 +21,8 @@ "check": "Review", "editEndDate": "Edit by", "newMessages_one": "{{count}} new", - "newMessages_other": "{{count}} new" + "newMessages_other": "{{count}} new", + "sortOrder": "Order applications by" } }, "pageHeaders": { @@ -40,7 +41,7 @@ "draft": "Draft", "additionalInformationNeeded": "Additional information is needed", "received": "Received", - "approved": "Accepted", + "accepted": "Accepted", "rejected": "Rejected", "handling": "Handling", "cancelled": "Cancelled" @@ -604,7 +605,9 @@ "yes": "Yes", "no": "No", "close": "Close", - "home": "Return to the front page" + "home": "Return to the front page", + "pagination": "Pagination", + "back": "Back" }, "messenger": { "messages": "Application’s messages", @@ -745,6 +748,18 @@ "button": "Muokkaa evästeasetuksia" }, "decisions": { - "heading": "Archive" + "heading_one": "{{count}} application for which a decision has been made", + "heading_other": "{{count}} applications for which decisions have been made", + "noDecisions": "No decisions have been made for any Helsinki Benefit applications yet." + }, + "sortOrder": { + "label": "Order by", + "submittedAt": { + "asc": "Oldest first", + "desc": "Newest first" + }, + "name": { + "asc": "Alphabetically" + } } } diff --git a/frontend/benefit/applicant/public/locales/fi/common.json b/frontend/benefit/applicant/public/locales/fi/common.json index a4a66ee684..2c95944623 100644 --- a/frontend/benefit/applicant/public/locales/fi/common.json +++ b/frontend/benefit/applicant/public/locales/fi/common.json @@ -21,7 +21,8 @@ "check": "Tarkastele", "editEndDate": "Muokkaa viimeistään", "newMessages_one": "{{count}} uusi", - "newMessages_other": "{{count}} uutta" + "newMessages_other": "{{count}} uutta", + "sortOrder": "Järjestä hakemukset" } }, "pageHeaders": { @@ -40,7 +41,7 @@ "draft": "Luonnos", "additionalInformationNeeded": "Lisätietoja tarvitaan", "received": "Vastaanotettu", - "approved": "Hyväksytty", + "accepted": "Hyväksytty", "rejected": "Hylätty", "handling": "Käsittelyssä", "cancelled": "Peruttu" @@ -604,7 +605,9 @@ "yes": "Kyllä", "no": "Ei", "close": "Sulje", - "home": "Palaa etusivulle" + "home": "Palaa etusivulle", + "pagination": "Sivut", + "back": "Takaisin" }, "messenger": { "messages": "Hakemuksen viestit", @@ -745,6 +748,18 @@ "button": "Muokkaa evästeasetuksia" }, "decisions": { - "heading": "Arkisto" + "heading_one": "{{count}} hakemus, jolle on tehty päätös", + "heading_other": "{{count}} hakemusta, joille on tehty päätös", + "noDecisions": "Ei vielä yhtään Helsinki-lisä -hakemusta, joille on tehty päätös." + }, + "sortOrder": { + "label": "Järjestä", + "submittedAt": { + "asc": "Vanhin ensin", + "desc": "Uusin ensin" + }, + "name": { + "asc": "Aakkosjärjestyksessä" + } } } diff --git a/frontend/benefit/applicant/public/locales/sv/common.json b/frontend/benefit/applicant/public/locales/sv/common.json index b787048473..52ba1d3197 100644 --- a/frontend/benefit/applicant/public/locales/sv/common.json +++ b/frontend/benefit/applicant/public/locales/sv/common.json @@ -21,7 +21,8 @@ "check": "Recensioner", "editEndDate": "Redigera senast", "newMessages_one": "{{count}} ny", - "newMessages_other": "{{count}} nya" + "newMessages_other": "{{count}} nya", + "sortOrder": "Sortera ansökningar" } }, "pageHeaders": { @@ -40,7 +41,7 @@ "draft": "Utkast", "additionalInformationNeeded": "Ytterligare uppgifter behövs", "received": "Mottagen", - "approved": "Godkänd", + "accepted": "Godkänd", "rejected": "Avvisad", "handling": "Behandling", "cancelled": "Peruttu" @@ -604,7 +605,9 @@ "yes": "Ja", "no": "Nej", "close": "Stäng", - "home": "Gå tillbaka till ingångssidan" + "home": "Gå tillbaka till ingångssidan", + "pagination": "Sidor", + "back": "Tillbaka" }, "messenger": { "messages": "Meddelanden om ansökan", @@ -745,6 +748,18 @@ "button": "Muokkaa evästeasetuksia" }, "decisions": { - "heading": "Arkiv" + "heading_one": "{{count}} ansökan, för vilken beslut har fattats.", + "heading_other": "{{count}} ansökningar, för vilka beslut har fattats.", + "noDecisions": "Inga beslut har fattats för några ansökningar om Helsingforstillägget ännu." + }, + "sortOrder": { + "label": "Sortera", + "submittedAt": { + "asc": "Äldsta först", + "desc": "Senaste först" + }, + "name": { + "asc": "I bokstavsording" + } } } diff --git a/frontend/benefit/applicant/src/components/applications/applicationList/ApplicationList.sc.ts b/frontend/benefit/applicant/src/components/applications/applicationList/ApplicationList.sc.ts index 7003574850..f939d2b963 100644 --- a/frontend/benefit/applicant/src/components/applications/applicationList/ApplicationList.sc.ts +++ b/frontend/benefit/applicant/src/components/applications/applicationList/ApplicationList.sc.ts @@ -1,8 +1,29 @@ +import { respondAbove } from 'shared/styles/mediaQueries'; import styled from 'styled-components'; +export const $HeadingContainer = styled.div` + display: flex; + flex-direction: column; + align-items: stretch; + + ${respondAbove('sm')` + flex-direction: row; + align-items: center; + `} +`; + export const $Heading = styled.h2` font-size: ${(props) => props.theme.fontSize.heading.m}; font-weight: 500; + flex: 1 1 100%; +`; + +export const $OrderByContainer = styled.div` + flex: 0; + margin-bottom: ${(props) => props.theme.spacing.xs}; + ${respondAbove('sm')` + flex: 1 0 300px; + `} `; export const $ListWrapper = styled.ul` @@ -13,3 +34,7 @@ export const $ListWrapper = styled.ul` padding: 0; margin: 0; `; + +export const $PaginationContainer = styled.div` + margin-top: ${(props) => props.theme.spacing.xl2}; +`; diff --git a/frontend/benefit/applicant/src/components/applications/applicationList/ApplicationList.tsx b/frontend/benefit/applicant/src/components/applications/applicationList/ApplicationList.tsx index fae8cc2122..f3d085c949 100644 --- a/frontend/benefit/applicant/src/components/applications/applicationList/ApplicationList.tsx +++ b/frontend/benefit/applicant/src/components/applications/applicationList/ApplicationList.tsx @@ -1,38 +1,124 @@ +import { Pagination, Select } from 'hds-react'; import React from 'react'; import LoadingSkeleton from 'react-loading-skeleton'; import Container from 'shared/components/container/Container'; import theme from 'shared/styles/theme'; +import { OptionType } from 'shared/types/common'; -import { $Heading, $ListWrapper } from './ApplicationList.sc'; +import { + $Heading, + $HeadingContainer, + $ListWrapper, + $OrderByContainer, + $PaginationContainer, +} from './ApplicationList.sc'; import ListItem from './listItem/ListItem'; import useApplicationList from './useApplicationList'; export interface ApplicationListProps { - heading: string; + heading: ((count: number) => React.ReactNode) | React.ReactNode; status: string[]; + isArchived?: boolean; + clientPaginated?: boolean; + itemsPerPage?: number; + initialPage?: number; + pageHref?: (index: number) => string; + orderByOptions?: OptionType[]; + noItemsText?: React.ReactNode; } const ApplicationsList: React.FC = ({ heading, status, + isArchived, + clientPaginated = false, + itemsPerPage = 25, + initialPage, + orderByOptions, + noItemsText = '', }) => { - const { list, shouldShowSkeleton, shouldHideList } = - useApplicationList(status); + const { + list, + shouldShowSkeleton, + shouldHideList, + currentPage, + setPage, + t, + orderBy, + setOrderBy, + language, + } = useApplicationList({ + status, + isArchived, + initialPage: clientPaginated ? initialPage : null, + orderByOptions, + }); - const items = shouldShowSkeleton ? ( - - ) : ( - list?.map((props) => ) - ); + if (shouldHideList && !noItemsText) return null; + + const hasItems = list?.length > 0; + let items = + list?.map((props) => ) || []; + if (clientPaginated && !shouldShowSkeleton) { + items = items.slice( + currentPage * itemsPerPage, + (currentPage + 1) * itemsPerPage + ); + } - if (shouldHideList) return null; + const headingText = + heading instanceof Function ? heading(list.length) : heading; return ( - <$Heading> - {shouldShowSkeleton ? : heading} - - <$ListWrapper>{items} + {shouldShowSkeleton && ( + <> + <$HeadingContainer> + + + <$ListWrapper> + + + + )} + {!shouldShowSkeleton && ( + <> + <$HeadingContainer> + <$Heading>{headingText} + <$OrderByContainer> + {orderByOptions?.length > 1 && ( + + id={`application-list-'${status.join('-')}-order-by`} + options={orderByOptions} + defaultValue={orderBy} + onChange={setOrderBy} + label={t('common:applications.list.common.sortOrder')} + disabled={!hasItems} + /> + )} + + + <$ListWrapper> + {items} + {!hasItems && noItemsText} + + {hasItems && clientPaginated && ( + <$PaginationContainer> + '#'} + pageIndex={currentPage} + pageCount={Math.ceil(list.length / Math.max(1, itemsPerPage))} + paginationAriaLabel={t('common:utility.pagination')} + onChange={(e, index) => { + e.preventDefault(); + setPage(index); + }} + language={language} + /> + + )} + + )} ); }; diff --git a/frontend/benefit/applicant/src/components/applications/applicationList/useApplicationList.ts b/frontend/benefit/applicant/src/components/applications/applicationList/useApplicationList.ts index fc0081c4da..6210c46e69 100644 --- a/frontend/benefit/applicant/src/components/applications/applicationList/useApplicationList.ts +++ b/frontend/benefit/applicant/src/components/applications/applicationList/useApplicationList.ts @@ -10,8 +10,12 @@ import { import { IconPen } from 'hds-react'; import camelCase from 'lodash/camelCase'; import { useRouter } from 'next/router'; -import React, { useEffect } from 'react'; +import { TFunction } from 'next-i18next'; +import React, { useEffect, useState } from 'react'; +import useLocale from 'shared/hooks/useLocale'; +import { Language } from 'shared/i18n/i18n'; import isServerSide from 'shared/server/is-server-side'; +import { OptionType } from 'shared/types/common'; import { convertToUIDateAndTimeFormat, convertToUIDateFormat, @@ -22,10 +26,23 @@ import { DefaultTheme } from 'styled-components'; const translationListBase = 'common:applications.list'; const translationStatusBase = 'common:applications.statuses'; +interface Props { + status: string[]; + isArchived?: boolean; + initialPage?: number; + orderByOptions?: OptionType[]; +} + interface ApplicationListProps { list: ApplicationListItemData[]; shouldShowSkeleton: boolean; shouldHideList: boolean; + currentPage: number | null; + setPage: (newPage: number | null) => void; + t: TFunction; + orderBy: OptionType; + setOrderBy: (option: OptionType) => void; + language: Language; } const getAvatarBGColor = ( @@ -41,7 +58,7 @@ const getAvatarBGColor = ( case APPLICATION_STATUSES.RECEIVED: return 'info'; - case APPLICATION_STATUSES.APPROVED: + case APPLICATION_STATUSES.ACCEPTED: return 'success'; case APPLICATION_STATUSES.REJECTED: @@ -57,15 +74,30 @@ const getEmployeeFullName = (firstName: string, lastName: string): string => { return name === ' ' ? '-' : name; }; -const getOrderBy = (status: string[]): string => - status.includes('draft') ? '-modified_at' : '-submitted_at'; - -const useApplicationList = (status: string[]): ApplicationListProps => { +const useApplicationList = ({ + status, + isArchived, + initialPage, + orderByOptions, +}: Props): ApplicationListProps => { const { t } = useTranslation(); const router = useRouter(); - const orderBy = getOrderBy(status); - const { data, error, isLoading } = useApplicationsQuery(status, orderBy); + const [orderBy, setOrderBy] = useState( + orderByOptions?.[0] || { + label: 'common:sortOrder.submittedAt.desc', + value: '-submitted_at', + } + ); + const language = useLocale(); + + const { data, error, isLoading } = useApplicationsQuery({ + status, + isArchived, + orderBy: orderBy.value.toString(), + }); + const { errors, setError } = React.useContext(FrontPageContext); + const [currentPage, setPage] = useState(initialPage ?? null); useEffect(() => { if (error && !errors.includes(error)) { @@ -179,6 +211,12 @@ const useApplicationList = (status: string[]): ApplicationListProps => { list: list || [], shouldShowSkeleton, shouldHideList, + currentPage, + setPage, + t, + orderBy, + setOrderBy, + language, }; }; diff --git a/frontend/benefit/applicant/src/components/applications/forms/application/step5/useApplicationFormStep5.ts b/frontend/benefit/applicant/src/components/applications/forms/application/step5/useApplicationFormStep5.ts index 4dcbb78c3c..20495b26c5 100644 --- a/frontend/benefit/applicant/src/components/applications/forms/application/step5/useApplicationFormStep5.ts +++ b/frontend/benefit/applicant/src/components/applications/forms/application/step5/useApplicationFormStep5.ts @@ -122,7 +122,11 @@ const useApplicationFormStep5 = ( updateApplicationStep5(currentApplicationData); }; const handleClose = (): void => { - void router.push(ROUTES.HOME); + if (application.archivedForApplicant) { + void router.push(ROUTES.DECISIONS); + } else { + void router.push(ROUTES.HOME); + } }; return { diff --git a/frontend/benefit/applicant/src/components/decisions/DecisionsApplicationList.sc.ts b/frontend/benefit/applicant/src/components/decisions/DecisionsApplicationList.sc.ts new file mode 100644 index 0000000000..2f372e4a4c --- /dev/null +++ b/frontend/benefit/applicant/src/components/decisions/DecisionsApplicationList.sc.ts @@ -0,0 +1,10 @@ +import styled from 'styled-components'; + +export const $NoDecisionsText = styled.p` + font-size: ${(props) => props.theme.fontSize.heading.l}; +`; + +export const $ButtonContainer = styled.div` + margin-top: ${(props) => props.theme.spacing.s}; + margin-bottom: ${(props) => props.theme.spacing.xl2}; +`; diff --git a/frontend/benefit/applicant/src/components/decisions/DecisionsApplicationList.tsx b/frontend/benefit/applicant/src/components/decisions/DecisionsApplicationList.tsx new file mode 100644 index 0000000000..56f0c7a896 --- /dev/null +++ b/frontend/benefit/applicant/src/components/decisions/DecisionsApplicationList.tsx @@ -0,0 +1,59 @@ +import ApplicationsList from 'benefit/applicant/components/applications/applicationList/ApplicationList'; +import { + $ButtonContainer, + $NoDecisionsText, +} from 'benefit/applicant/components/decisions/DecisionsApplicationList.sc'; +import { ROUTES, SUBMITTED_STATUSES } from 'benefit/applicant/constants'; +import { Trans, useTranslation } from 'benefit/applicant/i18n'; +import { Button, IconArrowLeft } from 'hds-react'; +import { useRouter } from 'next/router'; +import React from 'react'; + +const DecisionsApplicationList = (): JSX.Element => { + const { t } = useTranslation(); + const router = useRouter(); + + return ( + ( + , + }} + /> + )} + status={SUBMITTED_STATUSES} + isArchived + clientPaginated + orderByOptions={[ + { + label: t('common:sortOrder.submittedAt.desc'), + value: '-submitted_at', + }, + { label: t('common:sortOrder.submittedAt.asc'), value: 'submitted_at' }, + { label: t('common:sortOrder.name.asc'), value: 'employee_name' }, + ]} + noItemsText={ +
+ <$NoDecisionsText> + {t('common:decisions.noDecisions')} + + <$ButtonContainer> + + +
+ } + /> + ); +}; + +export default DecisionsApplicationList; diff --git a/frontend/benefit/applicant/src/components/layout/Layout.tsx b/frontend/benefit/applicant/src/components/layout/Layout.tsx index 709cfd9426..64359359d1 100644 --- a/frontend/benefit/applicant/src/components/layout/Layout.tsx +++ b/frontend/benefit/applicant/src/components/layout/Layout.tsx @@ -27,6 +27,9 @@ const selectBgColor = (pathname: string): keyof DefaultTheme['colors'] => { case ROUTES.HOME: return theme.colors.silverLight as keyof DefaultTheme['colors']; + case ROUTES.DECISIONS: + return theme.colors.silverLight as keyof DefaultTheme['colors']; + default: return theme.colors.white as keyof DefaultTheme['colors']; } diff --git a/frontend/benefit/applicant/src/hooks/useApplicationsQuery.ts b/frontend/benefit/applicant/src/hooks/useApplicationsQuery.ts index 8e442322f8..d450fea7f3 100644 --- a/frontend/benefit/applicant/src/hooks/useApplicationsQuery.ts +++ b/frontend/benefit/applicant/src/hooks/useApplicationsQuery.ts @@ -3,20 +3,26 @@ import { ApplicationData } from 'benefit-shared/types/application'; import { useQuery, UseQueryResult } from 'react-query'; import useBackendAPI from 'shared/hooks/useBackendAPI'; -const useApplicationsQuery = ( - status: string[], - orderBy = 'id' -): UseQueryResult => { +const useApplicationsQuery = ({ + status, + isArchived, + orderBy = 'id', +}: { + status: string[]; + isArchived?: boolean; + orderBy?: string; +}): UseQueryResult => { const { axios, handleResponse } = useBackendAPI(); return useQuery( - ['applicationsList', ...status], + ['applicationsList', ...status, orderBy], async () => { const res = axios.get( `${BackendEndpoint.APPLICATIONS_SIMPLIFIED}`, { params: { status: status.join(','), + archived_for_applicant: isArchived ?? undefined, order_by: orderBy, }, } diff --git a/frontend/benefit/applicant/src/i18n.ts b/frontend/benefit/applicant/src/i18n.ts index 7ebec765a8..741a750a94 100644 --- a/frontend/benefit/applicant/src/i18n.ts +++ b/frontend/benefit/applicant/src/i18n.ts @@ -1,3 +1,3 @@ -import { appWithTranslation, i18n, useTranslation } from 'next-i18next'; +import { appWithTranslation, i18n, Trans, useTranslation } from 'next-i18next'; -export { appWithTranslation, i18n, useTranslation }; +export { appWithTranslation, i18n, Trans, useTranslation }; diff --git a/frontend/benefit/applicant/src/pages/decisions.tsx b/frontend/benefit/applicant/src/pages/decisions.tsx index b0343c22c5..348cb3220c 100644 --- a/frontend/benefit/applicant/src/pages/decisions.tsx +++ b/frontend/benefit/applicant/src/pages/decisions.tsx @@ -1,3 +1,4 @@ +import DecisionsApplicationList from 'benefit/applicant/components/decisions/DecisionsApplicationList'; import DecisionsMainIngress from 'benefit/applicant/components/mainIngress/decisions/DecisionsMainIngress'; import AppContext from 'benefit/applicant/context/AppContext'; import { useTranslation } from 'benefit/applicant/i18n'; @@ -28,7 +29,7 @@ const ApplicantDecisions: NextPage = () => { -

{t('common:decisions.heading')} (0)

+
); diff --git a/frontend/benefit/applicant/src/pages/index.tsx b/frontend/benefit/applicant/src/pages/index.tsx index c0916c5eb5..d6eff4f871 100644 --- a/frontend/benefit/applicant/src/pages/index.tsx +++ b/frontend/benefit/applicant/src/pages/index.tsx @@ -39,10 +39,17 @@ const ApplicantIndex: NextPage = () => { diff --git a/frontend/benefit/shared/src/constants.ts b/frontend/benefit/shared/src/constants.ts index 3db7382c78..1907bf1ecb 100644 --- a/frontend/benefit/shared/src/constants.ts +++ b/frontend/benefit/shared/src/constants.ts @@ -145,7 +145,6 @@ export enum APPLICATION_STATUSES { INFO_REQUIRED = 'additional_information_needed', RECEIVED = 'received', ACCEPTED = 'accepted', - APPROVED = 'approved', REJECTED = 'rejected', CANCELLED = 'cancelled', HANDLING = 'handling', diff --git a/frontend/benefit/shared/src/types/application.d.ts b/frontend/benefit/shared/src/types/application.d.ts index 5172cdc133..059941342e 100644 --- a/frontend/benefit/shared/src/types/application.d.ts +++ b/frontend/benefit/shared/src/types/application.d.ts @@ -264,6 +264,7 @@ export type Application = { unreadMessagesCount?: number; organizationType?: ORGANIZATION_TYPES; associationImmediateManagerCheck?: boolean; + archivedForApplicant?: boolean; } & Step1 & Step2;