Skip to content

Commit 847d90d

Browse files
committed
Added text to the home page
1 parent fb82c21 commit 847d90d

File tree

11 files changed

+32
-19
lines changed

11 files changed

+32
-19
lines changed

jmayer.example.aspreact.client/src/components/airline/AirlineAddEditDialog.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useEffect } from 'react'
1+
import React, { useState, useEffect } from 'react';
22
import { Button } from 'primereact/button';
33
import { Dialog } from 'primereact/dialog';
44
import { InputText } from 'primereact/inputtext';

jmayer.example.aspreact.client/src/components/airline/AirlineDeleteConfirmDialog.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect } from 'react'
1+
import React, { useEffect } from 'react';
22
import { Button } from 'primereact/button';
33
import { Dialog } from 'primereact/dialog';
44
import { useAirlineDataLayer } from '../../datalayers/AirlineDataLayer.jsx';

jmayer.example.aspreact.client/src/components/airline/AirlinePage.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useEffect } from 'react'
1+
import React, { useState, useEffect } from 'react';
22
import { Button } from 'primereact/button';
33
import { Card } from 'primereact/card';
44
import { Column } from 'primereact/column';
@@ -36,7 +36,7 @@ export default function AirlinePage() {
3636
//The function opens the add/edit dialog.
3737
const openAddEditDialog = (airline) => {
3838
if (airline === null) {
39-
airline = { ...initialAirline }
39+
airline = { ...initialAirline };
4040
setNewRecord(true);
4141
}
4242
else {
@@ -70,8 +70,8 @@ export default function AirlinePage() {
7070
<Button icon="pi pi-trash" className="mr-2" rounded text onClick={() => openDeleteConfirmDialog(rowData)} />
7171
<Button icon="pi pi-pencil" text onClick={() => openAddEditDialog(rowData)} />
7272
</React.Fragment>
73-
)
74-
}
73+
);
74+
};
7575

7676
return (
7777
<>

jmayer.example.aspreact.client/src/components/errorDialog/ErrorDialog.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React from 'react';
22
import { Button } from 'primereact/button';
33
import { Dialog } from 'primereact/dialog';
44
import { useError } from './ErrorProvider';

jmayer.example.aspreact.client/src/components/errorDialog/ErrorProvider.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const ErrorProvider = ({ children }) => {
2828
{children}
2929
</ErrorContext.Provider>
3030
);
31-
};
31+
}
3232

3333
//The function returns a hook used by the components to interact with the error context.
3434
export const useError = () => {

jmayer.example.aspreact.client/src/components/flightSchedule/FlightDeleteConfirmDialog.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect } from 'react'
1+
import React, { useEffect } from 'react';
22
import { Button } from 'primereact/button';
33
import { Dialog } from 'primereact/dialog';
44
import { useFlightDataLayer } from '../../datalayers/FlightDataLayer.jsx';

jmayer.example.aspreact.client/src/components/flightSchedule/FlightSchedulePage.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useEffect } from 'react'
1+
import React, { useState, useEffect } from 'react';
22
import { Button } from 'primereact/button';
33
import { Card } from 'primereact/card';
44
import { Column } from 'primereact/column';
@@ -36,7 +36,7 @@ export default function FlightSchedulePage() {
3636
//The function opens the add/edit dialog.
3737
const openAddEditDialog = (flight) => {
3838
if (flight === null) {
39-
flight = { ...initialFlight }
39+
flight = { ...initialFlight };
4040
setNewRecord(true);
4141
}
4242
else {
@@ -70,8 +70,8 @@ export default function FlightSchedulePage() {
7070
<Button icon="pi pi-trash" className="mr-2" rounded text onClick={() => openDeleteConfirmDialog(rowData)} />
7171
<Button icon="pi pi-pencil" text onClick={() => openAddEditDialog(rowData)} />
7272
</React.Fragment>
73-
)
74-
}
73+
);
74+
};
7575

7676
return (
7777
<>
Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
//The function returns the home page; it displays a description about the example website.
22
export default function HomePage() {
33
return (
4-
<>
5-
<p>Under Construction</p>
6-
</>
4+
<div class="px-2 py-2">
5+
<h1>Hello!</h1>
6+
7+
<p>
8+
This example project is a simplified flight management software for a BHS (baggage handling system).
9+
In a BHS, bags are introduced into the system at the ticket counters and a scanner before the sortation
10+
system will read the tag on the bag. Sortation will use the scanned tag to find a flight in the flight
11+
schedule to determine what sort destination the bag needs to be sent to. The sort destination is written
12+
to the lower level and the lower level will track/divert the bag to the sort destination.
13+
</p>
14+
15+
<p>
16+
A flight schedule, airlines, gates and sort destinations are pregenerated for the example on startup. The
17+
example has two pages, airlines and flight schedule. The airlines page allows the user to add/edit/delete
18+
airlines. The flight schedule page allows the user to add/edit/delete flights in the schedule.
19+
</p>
20+
</div>
721
);
822
}

jmayer.example.aspreact.client/src/components/layout/Header.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Button } from 'primereact/button';
22

33
//The function returns the top header of the website.
4+
//@param {object} props The properties accepted by the component.
45
//@param {function} props.openMenu Used by the component to show the sidebar menu.
56
export default function Header({openMenu}) {
67
return (

jmayer.example.aspreact.client/src/datalayers/AirlineDataLayer.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { useState } from 'react';
22
import { useError } from '../components/errorDialog/ErrorProvider.jsx';
33
import { shapeValidationResult } from './DataLayerHelper.jsx';
44

5-
//I don't know if I should have a hook per API call or a single hook with all the API calls.
6-
75
//Defines the initial airline object.
86
const initialAirline = {
97
name: '',

0 commit comments

Comments
 (0)