Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ppp iframe link,display error message in surge pages #445

Closed
Closed
Show file tree
Hide file tree
Changes from all 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
16 changes: 12 additions & 4 deletions src/views/AllDeployedPersonnel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import Table from '#components/Table';
import DateInput from '#components/DateInput';
import useFilterState from '#hooks/useFilterState';

import { isDefined } from '@togglecorp/fujs';
import i18n from './i18n.json';

type PersonnelTableItem = NonNullable<GoApiResponse<'/api/v2/personnel/'>['results']>[number];
Expand Down Expand Up @@ -131,10 +132,17 @@ export function Component() {
item.country_from?.society_name
|| item.country_from?.name
),
(item) => ({
to: 'countriesLayout',
urlParams: { countryId: item.country_from?.id },
}),
(item) => {
if (isDefined(item.country_from?.record_type === 3)) {
return {
to: undefined,
};
}
Comment on lines +136 to +140
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a NOTE here.
// NOTE: we don't have the correct mapping for region

return {
to: 'countriesLayout',
urlParams: { countryId: item.country_from?.id },
};
},
{ sortable: true },
),
createLinkColumn<PersonnelTableItem, number>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"personnelTableType": "Type",
"personnelTableDeployedTo": "Deploying To",
"personnelTableDeployedParty": "Deploying Party",
"deployedPersonnelViewAll": "View All Deployed Personnel"
"deployedPersonnelViewAll": "View All Deployed Personnel",
"emergencySurgePartyNotFound": "sorry, this party has no one matching country to be shown"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,17 @@ export default function RapidResponsePersonnelTable(props: Props) {
'country_from',
strings.personnelTableDeployedParty,
(item) => item.country_from?.society_name,
(item) => ({
to: 'countriesLayout',
urlParams: { countryId: item.country_from?.id },
}),
(item) => {
if (isDefined(item.country_from?.record_type === 3)) {
return {
to: undefined,
};
Comment on lines +143 to +147
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a note

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use a constant to denote region type.
For example
export const TYPE_IMMINENT = 0 satisfies TypeOfDrefEnum;

}
return {
to: 'countriesLayout',
urlParams: { countryId: item.country_from?.id },
};
},
{ sortable: true },
),
createLinkColumn<PersonnelTableItem, number>(
Expand Down
2 changes: 1 addition & 1 deletion src/views/EmergencySurge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import KeyFigure from '#components/KeyFigure';
import useTranslation from '#hooks/useTranslation';
import SurgeTable from './SurgeTable';
import RapidResponsePersonnelTable from './RapidResponsePerosnnelTable';
import RapidResponsePersonnelTable from './RapidResponsePersonnelTable';
import DeployedErusTable from './DeployedErusTable';

import i18n from './i18n.json';
Expand Down
2 changes: 1 addition & 1 deletion src/views/GlobalThreeW/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export function Component() {
<iframe
title={strings.PPPMapTitle}
className={styles.pppIframe}
src="https://public.tableau.com/views/PPPdashboard_16805965348010/1_OVERVIEW?:language=en-US&:display_count=n&:origin=viz_share_link?:embed=yes&:display_count=yes&:showVizHome=no&:toolbar=yes"
src="https://public.tableau.com/app/profile/fdrs/viz/PPPdashboard_16805965348010/1_Overview"
/>
</Container>
</>
Expand Down
Loading