Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Chore/COR 1431 remove recommended advices #4681

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/deleting-a-page-procedure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Deleting a page Procedure

## For every file you delete do the following:
1. ### imports (if there are any)
Is the imported function/variable/type used elsewhere?
- Yes. only delete the import.
- No. Delete that file too. (Go recursively through the files meaning go to the first step of this list)
2. ### getStaticProps
- Delete the sanity lokalize keys in the nl_export.json
- Delete the JSON schema if the proto data is not used elsewhere.
- Delete the Sanity schema/structure if the imported sanity content is not used elsewhere.

3. ### delete the whole page file.
APW26 marked this conversation as resolved.
Show resolved Hide resolved
- solve typescript errors

4. ### follow up search for the page
- Look into the redirect.js file and remove/adjust the current or add redirects if needed.
- Look into the sitemap for references.
- Check the sidebar and layout files for references.
- Do an overall search for the page name: camelCased, and PascalCased.

5. ### Do other checks
- ```yarn typecheck```
- ```yarn bootstrap```
- ```yarn build:app```
- ```yarn start```


[Back to index](index.md)
23 changes: 3 additions & 20 deletions packages/app/src/components/table.ts
Original file line number Diff line number Diff line change
@@ -5,13 +5,11 @@ import {
color,
ColorProps,
compose,
LayoutProps,
margin,
padding,
position,
PositionProps,
space,
SpaceProps,
verticalAlign,
VerticalAlignProps,
width,
@@ -21,31 +19,16 @@ import { styledShouldForwardProp } from '~/lib/styled-should-forward-prop';

type TableProps = TableCellProps & PositionProps;

type TableCellProps = TableBodyProps &
WidthProps &
ColorProps &
BorderProps &
VerticalAlignProps;

type TableBodyProps = SpaceProps & LayoutProps;
type TableCellProps = WidthProps & ColorProps & BorderProps & VerticalAlignProps;

export const Table = styled.table.withConfig({
shouldForwardProp: styledShouldForwardProp,
})<TableProps>(
{ borderCollapse: 'collapse', borderSpacing: 0, tableLayout: 'fixed' },
compose(margin, padding, color, space, position)
);

export const TableBody = styled.tbody.withConfig({
shouldForwardProp: styledShouldForwardProp,
})<TableBodyProps>(compose(margin, padding, space));
})<TableProps>({ borderCollapse: 'collapse', borderSpacing: 0, tableLayout: 'fixed' }, compose(margin, padding, color, space, position));

export const Row = styled.tr.withConfig({
shouldForwardProp: styledShouldForwardProp,
})<ColorProps>(compose(color));

export const Cell = styled.td.withConfig({
shouldForwardProp: styledShouldForwardProp,
})<TableCellProps>(
compose(margin, padding, color, space, border, verticalAlign, width)
);
})<TableCellProps>(compose(margin, padding, color, space, border, verticalAlign, width));
2 changes: 0 additions & 2 deletions packages/app/src/domain/layout/logic/types.ts
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@ export type VrItemKeys =
| 'disabled_care'
| 'elderly_at_home'
| 'hospital_admissions'
| 'current_advices'
| 'mortality'
| 'nursing_home_care'
| 'positive_tests'
@@ -30,7 +29,6 @@ export type NlItemKeys =
| 'hospitals_and_care'
| 'patients'
| 'infectious_people'
| 'current_advices'
| 'mortality'
| 'nursing_home_care'
| 'positive_tests'
2 changes: 1 addition & 1 deletion packages/app/src/domain/layout/nl-layout.tsx
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ export function NlLayout(props: NlLayoutProps) {
map: [
['development_of_the_virus', ['sewage_measurement', 'positive_tests', 'reproduction_number', 'variants', 'mortality']],
['consequences_for_healthcare', ['hospitals_and_care', 'patients', 'nursing_home_care']],
['actions_to_take', ['vaccinations', 'current_advices', 'compliance']],
['actions_to_take', ['vaccinations', 'compliance']],
['archived_metrics', ['disabled_care', 'elderly_at_home', 'source_investigation', 'coronamelder_app', 'infectious_people', 'general_practitioner_suspicions']],
],
});
2 changes: 1 addition & 1 deletion packages/app/src/domain/layout/vr-layout.tsx
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ export function VrLayout(props: VrLayoutProps) {
map: [
['development_of_the_virus', ['sewage_measurement', 'positive_tests', 'mortality']],
['consequences_for_healthcare', ['hospital_admissions', 'nursing_home_care']],
['actions_to_take', ['vaccinations', 'current_advices']],
['actions_to_take', ['vaccinations']],
['archived_metrics', ['disabled_care', 'elderly_at_home', 'compliance', 'source_investigation']],
],
});
123 changes: 0 additions & 123 deletions packages/app/src/domain/measures/measures-table.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions packages/app/src/domain/measures/types.ts

This file was deleted.

31 changes: 21 additions & 10 deletions packages/app/src/next-config/redirects/redirects.js
Original file line number Diff line number Diff line change
@@ -42,11 +42,6 @@ async function redirects() {
destination: '/images/touch-icon.png',
permanent: false,
},
{
source: '/veiligheidsregio/:code/maatregelen',
destination: '/veiligheidsregio/:code/geldende-adviezen',
permanent: true,
},
{
source: '/regio',
destination: '/veiligheidsregio',
@@ -96,11 +91,6 @@ async function redirects() {
permanent: true,
})),
// Redirects for the NL pages
{
source: '/landelijk/maatregelen',
destination: '/landelijk/geldende-adviezen',
permanent: true,
},
{
source: '/landelijk/ziekenhuis-opnames',
destination: `/landelijk/ziekenhuizen-en-zorg`,
@@ -127,6 +117,27 @@ async function redirects() {
destination: '/artikelen',
permanent: true,
},
// Redirects for removal of recommanded advices page - COR-1431
{
source: '/veiligheidsregio/:code/maatregelen',
destination: '/',
permanent: true,
},
{
source: '/landelijk/maatregelen',
destination: '/',
permanent: true,
},
{
source: '/veiligheidsregio/:code/geldende-adviezen',
destination: '/',
permanent: true,
},
{
source: '/landelijk/geldende-adviezen',
destination: '/',
permanent: true,
},
VWSCoronaDashboard26 marked this conversation as resolved.
Show resolved Hide resolved
];
}

83 changes: 0 additions & 83 deletions packages/app/src/pages/landelijk/geldende-adviezen.tsx

This file was deleted.

Loading