diff --git a/public/css/app.css b/public/css/app.css index 9991a27..034af6d 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -793,6 +793,10 @@ video { width: 33.333333%; } +.w-3\/12 { + width: 25%; +} + .w-5 { width: 1.25rem; } @@ -821,10 +825,6 @@ video { width: 100vw; } -.w-3\/12 { - width: 25%; -} - .min-w-\[200px\] { min-width: 200px; } diff --git a/src/modules/flight/flight.controller.js b/src/modules/flight/flight.controller.js index eb45349..3ee96e1 100644 --- a/src/modules/flight/flight.controller.js +++ b/src/modules/flight/flight.controller.js @@ -50,12 +50,20 @@ export const detail = async (req, res, next) => { export const create = async (req, res, next) => { try { const api = process.env.API_URL; - + + const routesResponse = await axios.get(`${api}/api/v1/routes`); + const airplanesResponse = await axios.get(`${api}/api/v1/airplanes`); + const terminalsResponse = await axios.get(`${api}/api/v1/terminals`); + + const data = { api: api, + routes: routesResponse.data.data || [], + airplanes: airplanesResponse.data.data || [], + terminals: terminalsResponse.data.data || [], }; - res.edge("pages/flight/create", data ) + res.edge("pages/flight/create", data); } catch (error) { next(error); } diff --git a/src/resources/views/pages/flight/create.edge b/src/resources/views/pages/flight/create.edge index 0bd0d57..9c144af 100644 --- a/src/resources/views/pages/flight/create.edge +++ b/src/resources/views/pages/flight/create.edge @@ -10,66 +10,49 @@