diff --git a/.env.example b/.env.example index ac1e646..6d5af77 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ PUBLIC_SITE_URL=https://swansea-airport.wales +PUBLIC_PPR_API_BASE=https://ppr.swansea-airport.wales/api/v1 DIRECTUS_URL=http://directus:8055 FRONTEND_PORT=8080 DIRECTUS_PORT=8055 diff --git a/README.md b/README.md index d339735..59a89a5 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Production-ready airfield website stack built with Astro, Directus, PostgreSQL, ## Notes - All deploy-time variables live in `.env`. +- `PUBLIC_PPR_API_BASE` controls the browser-side PPR API base URL; PPR and drone request endpoints are derived from it at build/dev-server startup. - The frontend service bind-mounts the project into `/app`, keeps `node_modules` and `.astro` in named volumes, and serves the site with `astro dev` on the published frontend port. - Layout and page structure are controlled entirely by Astro. - Frontend source edits should appear without rebuilding the container image. diff --git a/docker-compose.yml b/docker-compose.yml index 224169a..254c1bd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -71,6 +71,7 @@ services: command: ["sh", "-c", "npm install && npm run dev -- --host 0.0.0.0 --port 80"] environment: PUBLIC_SITE_URL: ${PUBLIC_SITE_URL} + PUBLIC_PPR_API_BASE: ${PUBLIC_PPR_API_BASE} DIRECTUS_URL: ${DIRECTUS_URL} DIRECTUS_PUBLIC_URL: ${DIRECTUS_PUBLIC_URL} DIRECTUS_PORT: ${DIRECTUS_PORT} @@ -99,4 +100,4 @@ volumes: networks: default: webapps: - external: true \ No newline at end of file + external: true diff --git a/public/images/SDMAP.png b/public/images/SDMAP.png new file mode 100644 index 0000000..a39db5f Binary files /dev/null and b/public/images/SDMAP.png differ diff --git a/src/components/DroneFlightRequestForm.astro b/src/components/DroneFlightRequestForm.astro new file mode 100644 index 0000000..5557282 --- /dev/null +++ b/src/components/DroneFlightRequestForm.astro @@ -0,0 +1,724 @@ +--- +const configuredApiBase = import.meta.env.PUBLIC_PPR_API_BASE ?? 'https://ppr.swansea-airport.wales/api/v1'; +const pprApiBase = configuredApiBase.replace(/\/$/, ''); +const droneRequestEndpoint = `${pprApiBase}/drone-requests/public`; +const frzGeoJsonEndpoint = `${pprApiBase}/drone-requests/frz`; +--- + +
+
+

Drone flight request

+

Request a flight within the FRZ

+

+ Tell us when and where you plan to fly. Pick the operating location on the map or enter it + manually, then click Submit. We will review your request and contact you if we need any further information. +

+ +
+ + + +
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+
+

Operating Location

+

Click the map to drop the requested flight location.

+
+ +
+
+
+ + +
+
+ Flight restriction zone + Selected location +
+ + + +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ +
+
+ +
+ + Submitting your drone request... +
+ +
+

Drone Request Submitted.

+

Your drone request has been submitted. We will review it and contact you if we need any further information.

+
+
+ +
+ + + + diff --git a/src/components/PprRequestForm.astro b/src/components/PprRequestForm.astro new file mode 100644 index 0000000..3143e7d --- /dev/null +++ b/src/components/PprRequestForm.astro @@ -0,0 +1,669 @@ +--- +const configuredApiBase = import.meta.env.PUBLIC_PPR_API_BASE ?? 'https://ppr.swansea-airport.wales/api/v1'; +const pprApiBase = configuredApiBase.replace(/\/$/, ''); +--- + +
+
+

Prior permission request

+

Submit a PPR request

+

+ Complete the details below for flights into Swansea Airport. Requests are accepted by default; + the airport will contact you if additional information is required. +

+

+ This form is under test. If you have any issues, email + james.pattinson@sasalliance.org. +

+
+ +
+
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ +
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ +
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ +
+
+ +
+ + Submitting your PPR request... +
+ +
+

PPR Request Submitted.

+

Your PPR request has been submitted. You will receive confirmation via email if provided.

+

Please note: PPR requests are accepted by default. We will contact you if additional information is required. Remember to check NOTAMs before your flight.

+
+
+ +
+ + + + diff --git a/src/lib/site.ts b/src/lib/site.ts index 8dc3569..dbd040a 100644 --- a/src/lib/site.ts +++ b/src/lib/site.ts @@ -22,11 +22,11 @@ export const site = { children: [ { label: 'History', href: '/about/history/' }, { label: 'Drones', href: '/about/drones/' }, + { label: 'Fees and Charges', href: '/about/fees-and-charges/' }, { label: 'Noise', href: '/about/noise/' }, { label: 'Volunteering', href: '/about/volunteering/' }, ], }, - { label: 'Procedures', href: '/procedures-safety-noise-abatement/' }, { label: 'Events', href: '/events/' }, { label: 'News', href: '/news/' }, { label: 'Documents', href: '/documents/' }, diff --git a/src/pages/about/drones.astro b/src/pages/about/drones.astro index e5698c7..09ae5b0 100644 --- a/src/pages/about/drones.astro +++ b/src/pages/about/drones.astro @@ -23,6 +23,10 @@ import BaseLayout from '../../layouts/BaseLayout.astro'; much notice as possible via email, with the following information:

+

+ Request a Drone Flight +

+ )} -

Circuits at 1000ft agl. Overhead joins and/or dead-side flying not permitted when Parachuting is active. - - - -

diff --git a/src/pages/ppr.astro b/src/pages/ppr.astro new file mode 100644 index 0000000..749aea3 --- /dev/null +++ b/src/pages/ppr.astro @@ -0,0 +1,10 @@ +--- +import BaseLayout from '../layouts/BaseLayout.astro'; +import PprRequestForm from '../components/PprRequestForm.astro'; +--- + + +
+ +
+
diff --git a/src/pages/procedures-safety-noise-abatement.astro b/src/pages/procedures-safety-noise-abatement.astro deleted file mode 100644 index d9174b3..0000000 --- a/src/pages/procedures-safety-noise-abatement.astro +++ /dev/null @@ -1,29 +0,0 @@ ---- -import BaseLayout from '../layouts/BaseLayout.astro'; ---- - - -
-

Operations

-

Procedures, safety, and noise abatement

-

- This page is intentionally text-led and easy to scan. It is controlled by Astro so the structure stays stable even as the content evolves. -

- -

Safety priorities

-
-
-

Brief before flight

-

Surface the checklist items pilots need most, without burying them under visual clutter.

-
-
-

Check current notices

-

Operational notices should be reviewed before taxi, because the homepage is fed by the same notices collection.

-
-
-

Respect local noise guidance

-

Noise abatement text can be expanded in Directus while the page structure stays fixed in code.

-
-
-
-