Skip to content

Commit 2d3d8d5

Browse files
Philipcursoragent
andcommitted
feat: add operator to license info and improve organisation tables
Show linked operator on satellite license tables and sync API types. Add scrollable organisation data tables and geolocation map centre. Reorder UK nation impact sorting. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6accdcc commit 2d3d8d5

12 files changed

Lines changed: 166 additions & 27 deletions

src/__generated__/V1.ts

Lines changed: 21 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/__generated__/data-contracts.ts

Lines changed: 94 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/organisations/OrganisationAccordion.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,6 @@ const OrganisationAccordion = async ({
104104
)
105105
: <p className="govuk-body">No organisation data available.</p>,
106106
},
107-
{
108-
id: 'activity_flags_by_reason',
109-
heading: t('activity_flags_by_reason'),
110-
content: organisation.id
111-
? (
112-
<OrganisationActivitySection
113-
organisationId={organisation.id}
114-
organisationName={organisation.name}
115-
section="by_reason"
116-
/>
117-
)
118-
: <p className="govuk-body">No organisation data available.</p>,
119-
},
120107
]}
121108
/>
122109
</>

src/components/organisations/OrganisationActivityDataTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const OrganisationActivityDataTable = ({
130130
/>
131131
</div>
132132
</div>
133-
<div className="overflow-x-auto">
133+
<div className="overflow-auto max-h-[500px]">
134134
<DataTable<TypeActivityEvent>
135135
data={filtered}
136136
columns={activityFlagsColumns}

src/components/organisations/OrganisationConjunctionsDataTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const OrganisationConjunctionsDataTable = ({
9191
/>
9292
</div>
9393
</div>
94-
<div className="overflow-x-auto">
94+
<div className="overflow-auto max-h-[500px]">
9595
<DataTable<TypeEventOut>
9696
data={initialData}
9797
columns={columns}

src/components/organisations/OrganisationSatellitesPublicTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const OrganisationSatellitesPublicTable = ({
113113
onChange={e => setSearch(e.target.value)}
114114
/>
115115
</div>
116-
<div className="overflow-x-auto">
116+
<div className="overflow-auto max-h-[500px]">
117117
<DataTable<TypeSatelliteWithMetadataOut>
118118
data={filtered}
119119
columns={publicSatellitesColumns}

src/components/re-entry-alert/map/ReentryAlertMapCenterButton.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ const ReentryAlertMapCenterButton = () => {
88
const t = useTranslations('OverflightMap');
99
const { current: map } = useMap();
1010

11-
const onClick = () => map?.flyTo({ center: [-2, 54], zoom: 4 });
11+
const onClick = () => {
12+
if (navigator.geolocation) {
13+
navigator.geolocation.getCurrentPosition((position) => {
14+
map?.flyTo({ center: [position.coords.longitude, position.coords.latitude], zoom: 4 });
15+
});
16+
} else {
17+
map?.flyTo({ center: [-2, 54], zoom: 4 });
18+
}
19+
};
1220

1321
return (
1422
<div className="absolute top-auto bottom-2 right-2 z-50 flex flex-col">

src/components/re-entry-alert/tables/ReentryAlertRiskProbabilitiesTable.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ const ReentryAlertRiskProbabilitiesTable = ({ event, report }: ReentryAlertExecu
4848
<TableCellHeader>{t('probability_of_atmospheric_entry')}</TableCellHeader>
4949
<TableCell>{roundedPercent(event.atmospheric_probability)}</TableCell>
5050
<TableCell>
51+
{fragmentsRisk}
5152
{renderRiskTag(event.atmospheric_risk ?? 'None')}
53+
fff
5254
</TableCell>
5355
</TableRow>
5456
)

src/components/satellite/tables/LicenseInformationsTable.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Link from 'next/link';
12
import { getTranslations } from 'next-intl/server';
23

34
import type { TypeSatelliteOut } from '@/__generated__/data-contracts';
@@ -6,7 +7,7 @@ import { InformationsTable } from '@/components/InformationsTable';
67
import { dayjs } from '@/libs/Dayjs';
78
import { getFullCountry } from '@/utils/Regions';
89

9-
export type LicenseSatelliteInformations = Pick<TypeSatelliteOut, 'license_country' | 'launch_site' | 'launch_date' >;
10+
export type LicenseSatelliteInformations = Pick<TypeSatelliteOut, 'license_country' | 'launch_site' | 'launch_date' | 'organization_id' >;
1011

1112
type LicenseInformationsTableProps = {
1213
object: LicenseSatelliteInformations | LicenseSatelliteInformations[];
@@ -40,6 +41,10 @@ const LicenseInformationsTable = async ({ object, headerCellWidth }: LicenseInfo
4041
header: t('License.launch_date'),
4142
accessorKey: 'launch_date',
4243
renderCell: row => row.launch_date ? dayjs(row.launch_date).format('YYYY') : '-',
44+
}, {
45+
header: t('License.organization_id'),
46+
accessorKey: 'organization_id',
47+
renderCell: row => row.organization_id ? <Link className="govuk-link" href={`/organisations/${row.organization_id}`}>{row.organization_id}</Link> : '-',
4348
}];
4449

4550
return <InformationsTable caption={t('License.caption')} headers={headers} rows={baseInformations} data={object} headerCellWidth={headerCellWidth} />;

src/locales/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,8 @@
13361336
"caption": "License information",
13371337
"country": "Country",
13381338
"launching_site": "Launching site",
1339-
"launch_date": "Launch date"
1339+
"launch_date": "Launch date",
1340+
"organization_id": "Operator"
13401341
},
13411342
"Orbital": {
13421343
"caption": "Orbital information",

0 commit comments

Comments
 (0)