Skip to content

Commit

Permalink
fix: lint, ts, i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtawast committed Sep 22, 2023
1 parent 5dc6233 commit 79af999
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 40 deletions.
4 changes: 0 additions & 4 deletions frontend/benefit/applicant/public/locales/fi/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@
"commissionBenefitSelected": "Merkitse tähän toimeksiannon kesto"
},
"fields": {
"prefilled": {
"companyName": "Työnantajan nimi",
"": "Työnantajan nimi"
},
"firstName": {
"label": "Etunimi",
"placeholder": "Etunimi"
Expand Down
10 changes: 5 additions & 5 deletions frontend/benefit/applicant/public/locales/sv/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@
"associationHasBusinessActivities": "På Helsingforstillägget tillämpas reglerna om statligt stöd när stödtagaren är ett företag eller en organisation som bedriver ekonomisk verksamhet, oavsett juridisk form eller finansieringsform. Med ekonomisk verksamhet avses försäljning av tjänster och produkter, som sker fortlöpande, i förvärvssyfte och i konkurrensomständigheter (alla tre villkoren ska uppfyllas samtidigt). Reglerna om statligt stöd kan också tillämpas på icke-vinstdrivande arbetsgivare. Ekonomisk verksamhet som skattemyndigheterna inte har ansett vara beskattningsbar anses i regel inte vara ekonomisk verksamhet."
},
"fields": {
"companyBusinessId": "FO-nummer",
"companyName": "Arbetsgivarens namn",
"companyAddress": "Adress",
"companyPostcode": "Postnummer",
"companyCity": "Postort",
"useAlternativeAddress": {
"label": "Använd en annan adress"
},
Expand Down Expand Up @@ -232,11 +237,6 @@
"commissionBenefitSelected": "Ange uppdragets längd här"
},
"fields": {
"companyBusinessId": "FO-nummer",
"companyName": "Arbetsgivarens namn",
"companyAddress": "Adress",
"companyPostcode": "Postnummer",
"companyCity": "Postort",
"firstName": {
"label": "Förnamn",
"placeholder": "Förnamn"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ const EmployeeView: React.FC<EmployeeViewProps> = ({
data.employee?.lastName || ''
}`}</$ViewField>
<$ViewField>{data.employee?.socialSecurityNumber}</$ViewField>
<$ViewField>{data.employee?.phoneNumber}</$ViewField>
<$ViewField>
{t(`${translationsBase}.employee.fields.isLivingInHelsinki.label`)}
{': '}
Expand Down
7 changes: 5 additions & 2 deletions frontend/benefit/applicant/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ export const PRIVACY_POLICY_LINKS = {
export const DE_MINIMIS_AID_GRANTED_AT_MAX_DATE = new Date();

// Set the minimum date of the deMinimimis aid granted at datepicker to the beginning of the year 4 years ago
export const DE_MINIMIS_AID_GRANTED_AT_MIN_DATE = new Date(new Date().getFullYear() - 4, 0, 1);
export const DE_MINIMIS_AID_GRANTED_AT_MIN_DATE = new Date(
new Date().getFullYear() - 4,
0,
1
);

export const APPLICATION_START_DATE = new Date(new Date().getFullYear(), 0, 1);

Expand All @@ -53,7 +57,6 @@ export const APPLICATION_INITIAL_VALUES = {
employee: {
[APPLICATION_FIELDS_STEP2.employee.FIRST_NAME]: '',
[APPLICATION_FIELDS_STEP2.employee.LAST_NAME]: '',
[APPLICATION_FIELDS_STEP2.employee.PHONE_NUMBER]: '',
[APPLICATION_FIELDS_STEP2.employee.SOCIAL_SECURITY_NUMBER]: '',
// [APPLICATION_FIELDS_STEP2.employee.EMPLOYEE_IS_LIVING_IN_HELSINKI]: false,
[APPLICATION_FIELDS_STEP2.employee.JOB_TITLE]: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const EmployeeView: React.FC<ApplicationReviewViewProps> = ({
return (
<ReviewSection
header={t(`${translationsBase}.headings.heading5`)}
section='employee'
section="employee"
action={
data.status !== APPLICATION_STATUSES.RECEIVED ? (
<EmployeeActions
Expand All @@ -44,9 +44,6 @@ const EmployeeView: React.FC<ApplicationReviewViewProps> = ({
{t(`${translationsBase}.fields.ssn`)}:{' '}
{data.employee?.socialSecurityNumber}
</$ViewField>
<$ViewField>
{t(`${translationsBase}.fields.phone`)}: {data.employee?.phoneNumber}
</$ViewField>
<$ViewField>
{t(`${translationsBase}.fields.isLivingInHelsinki`)}
{': '}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const PaySubsidyView: React.FC<ApplicationReviewViewProps> = ({
return (
<ReviewSection
header={t(`${translationsBase}.headings.heading6`)}
section='paySubsidy'
section="paySubsidy"
action={
data.status !== APPLICATION_STATUSES.RECEIVED ? (
<PaySubsidyActions
Expand All @@ -39,26 +39,12 @@ const PaySubsidyView: React.FC<ApplicationReviewViewProps> = ({
>
<$GridCell $colSpan={12}>
{data.paySubsidyGranted ? (
<>
<$ViewField>
{t(`${translationsBase}.fields.apprenticeshipProgram`)}{' '}
<$ViewFieldBold>
{t(`common:utility.${data.paySubsidyGranted ? 'yes' : 'no'}`)}
<$ViewField isInline>{`, ${data.paySubsidyPercent || ''} % ${
data.additionalPaySubsidyPercent
? `${t('common:utility.and')} ${
data.additionalPaySubsidyPercent
} %`
: ''
}`}</$ViewField>
{t(`common:utility.${data.apprenticeshipProgram ? 'yes' : 'no'}`)}
</$ViewFieldBold>
<$ViewField>
{t(`${translationsBase}.fields.apprenticeshipProgram`)}{' '}
<$ViewFieldBold>
{t(
`common:utility.${data.apprenticeshipProgram ? 'yes' : 'no'}`
)}
</$ViewFieldBold>
</$ViewField>
</>
</$ViewField>
) : (
<$ViewField>
{t(`${translationsBase}.fields.paySubsidyGranted`)}{' '}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ const ApplicationForm: React.FC = () => {
minEndDate,
maxEndDate,
setEndDate,
getSelectValue,
subsidyOptions,
deMinimisAidSet,
attachments,
dispatchStep,
Expand Down Expand Up @@ -118,8 +116,6 @@ const ApplicationForm: React.FC = () => {
minEndDate={minEndDate}
maxEndDate={maxEndDate}
setEndDate={setEndDate}
getSelectValue={getSelectValue}
paySubsidyOptions={subsidyOptions}
deMinimisAidSet={deMinimisAidSet}
attachments={attachments}
checkedConsentArray={checkedConsentArray}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const EmploymentSection: React.FC<ReviewChildProps> = ({
data.employee?.lastName || ''
}`}</$ViewField>
<$ViewField>{data.employee?.socialSecurityNumber}</$ViewField>
<$ViewField>{data.employee?.phoneNumber}</$ViewField>
<$ViewField>
{t(`${translationsBase}.fields.isLivingInHelsinki.label`)}
{': '}
Expand Down

0 comments on commit 79af999

Please sign in to comment.