Commit d8c50604 authored by Heber Cordova's avatar Heber Cordova

feat: base project

added bootstrap, json-server, axios, axios configuration and test data
parent 62676002
Pipeline #387 failed with stages
......@@ -25,9 +25,12 @@
"src/assets"
],
"styles": [
"src/styles.css"
"src/styles.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": []
"scripts": [
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"
]
},
"configurations": {
"production": {
......
This diff is collapsed.
......@@ -3,10 +3,11 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start": "ng serve -o",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
"test": "ng test",
"server": "json-server-auth --port 3000 --watch ./server/db.json"
},
"private": true,
"dependencies": {
......@@ -18,6 +19,10 @@
"@angular/platform-browser": "^16.2.0",
"@angular/platform-browser-dynamic": "^16.2.0",
"@angular/router": "^16.2.0",
"axios": "^1.5.1",
"bootstrap": "^5.3.2",
"json-server": "^0.17.4",
"json-server-auth": "^2.1.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
......
{
"agents": [
{
"id": 1,
"name": "John",
"lastname": "Doe",
"email": "john.doe@gmail.com",
"cellphone": "+51965456934",
"dateCreated": "10/11/2023",
"typeDocumentId": 1,
"identificationDocument": "12345678"
},
{
"id": 2,
"name": "Alice",
"lastname": "Smith",
"email": "alice.smith@gmail.com",
"cellphone": "+51965456935",
"dateCreated": "10/11/2023",
"typeDocumentId": 2,
"identificationDocument": "87654321"
},
{
"id": 3,
"name": "Bob",
"lastname": "Johnson",
"email": "bob.johnson@gmail.com",
"cellphone": "+51965456936",
"dateCreated": "10/11/2023",
"typeDocumentId": 1,
"identificationDocument": "65432187"
}
],
"typeDocuments": [
{
"id": 1,
"name": "DNI"
},
{
"id": 2,
"name": "Carnet de Extranjeria"
},
{
"id": 3,
"name": "Pasaporte"
}
],
"passengers": [
{
"id": 1,
"name": "Michael",
"secondName": "",
"lastname": "Johnson",
"phoneNumber": "+123456789",
"emailAddress": "michael.johnson@example.com",
"addressLine": "123 Main Street",
"city": "Anytown",
"country": "USA"
},
{
"id": 2,
"name": "Jennifer",
"secondName": "",
"lastname": "Williams",
"phoneNumber": "+987654321",
"emailAddress": "jennifer.williams@example.com",
"addressLine": "456 Elm Avenue",
"city": "Somewhere",
"country": "Canada"
},
{
"id": 3,
"name": "Sarah",
"secondName": "",
"lastname": "Brown",
"phoneNumber": "+1122334455",
"emailAddress": "sarah.brown@example.com",
"addressLine": "789 Oak Road",
"city": "Everytown",
"country": "UK"
}
],
"airports": [
{
"id": 1,
"name": "Jorge Chavez International Airport",
"location": "Lima, Peru",
"code": "LIM"
},
{
"id": 2,
"name": "John F. Kennedy International Airport",
"location": "New York, USA",
"code": "JFK"
},
{
"id": 3,
"name": "Heathrow Airport",
"location": "London, UK",
"code": "LHR"
},
{
"id": 4,
"name": "Charles de Gaulle Airport",
"location": "Paris, France",
"code": "CDG"
},
{
"id": 5,
"name": "Los Angeles International Airport",
"location": "Los Angeles, USA",
"code": "LAX"
},
{
"id": 6,
"name": "Sydney Kingsford Smith Airport",
"location": "Sydney, Australia",
"code": "SYD"
},
{
"id": 7,
"name": "Dubai International Airport",
"location": "Dubai, UAE",
"code": "DXB"
},
{
"id": 8,
"name": "Beijing Capital International Airport",
"location": "Beijing, China",
"code": "PEK"
},
{
"id": 9,
"name": "Benito Juarez International Airport",
"location": "Mexico City, Mexico",
"code": "MEX"
},
{
"id": 10,
"name": "Frankfurt Airport",
"location": "Frankfurt, Germany",
"code": "FRA"
},
{
"id": 11,
"name": "Toronto Pearson International Airport",
"location": "Toronto, Canada",
"code": "YYZ"
},
{
"id": 12,
"name": "Incheon International Airport",
"location": "Seoul, South Korea",
"code": "ICN"
},
{
"id": 13,
"name": "Sao Paulo-Guarulhos International Airport",
"location": "Sao Paulo, Brazil",
"code": "GRU"
},
{
"id": 14,
"name": "Barcelona-El Prat Airport",
"location": "Barcelona, Spain",
"code": "BCN"
},
{
"id": 15,
"name": "Cairo International Airport",
"location": "Cairo, Egypt",
"code": "CAI"
}
],
"airlines": [
{
"id": 1,
"name": "American Airlines",
"code": "AA"
},
{
"id": 2,
"name": "Delta Air Lines",
"code": "DL"
},
{
"id": 3,
"name": "United Airlines",
"code": "UA"
},
{
"id": 4,
"name": "Emirates",
"code": "EK"
},
{
"id": 5,
"name": "Lufthansa",
"code": "LH"
},
{
"id": 6,
"name": "British Airways",
"code": "BA"
},
{
"id": 7,
"name": "Qatar Airways",
"code": "QR"
},
{
"id": 8,
"name": "Air France",
"code": "AF"
},
{
"id": 9,
"name": "LATAM Airlines",
"code": "LA"
}
],
"typeAircrafts": [
{
"id": 1,
"name": "Boeing 737",
"manufacturer": "Boeing",
"model": "737-800",
"capacity": 189,
"range": "3,850 miles",
"cabin_configuration": {
"economy_class": 150,
"business_class": 20,
"first_class": 19
},
"max_speed": "Mach 0.82",
"description": "The Boeing 737-800 is a popular narrow-body jet with a seating capacity of 189 passengers. It's known for its fuel efficiency and reliability."
},
{
"id": 2,
"name": "Airbus A320",
"manufacturer": "Airbus",
"model": "A320-200",
"capacity": 150,
"range": "3,300 miles",
"cabin_configuration": {
"economy_class": 140,
"business_class": 10,
"first_class": 0
},
"max_speed": "Mach 0.78",
"description": "The Airbus A320-200 is a versatile and widely used single-aisle aircraft. It can accommodate up to 150 passengers."
},
{
"id": 3,
"name": "Boeing 787 Dreamliner",
"manufacturer": "Boeing",
"model": "787-9",
"capacity": 290,
"range": "7,530 miles",
"cabin_configuration": {
"economy_class": 240,
"business_class": 30,
"first_class": 20
},
"max_speed": "Mach 0.85",
"description": "The Boeing 787-9 Dreamliner is a long-range, wide-body aircraft with an emphasis on passenger comfort and fuel efficiency."
},
{
"id": 4,
"name": "Embraer E175",
"manufacturer": "Embraer",
"model": "E175",
"capacity": 76,
"range": "2,400 miles",
"cabin_configuration": {
"economy_class": 76,
"business_class": 0,
"first_class": 0
},
"max_speed": "Mach 0.82",
"description": "The Embraer E175 is a regional jet designed for shorter flights with a capacity of 76 passengers."
}
],
"paymentStatus": [
{
"id": 1,
"name": "Pendiente"
},
{
"id": 2,
"name": "Pagado"
},
{
"id": 3,
"name": "Anulado"
}
]
}
\ No newline at end of file
This diff is collapsed.
import axios, { AxiosInstance } from 'axios';
const http: AxiosInstance = axios.create({
baseURL: 'http://localhost:3000/',
timeout: 10000,
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN', // TODO: Replace with my token
},
});
export { http };
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>FlightAgencyApp</title>
<title>Flight Agency App</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment