Compare commits
2 Commits
v2.1.0
...
101-upgrad
| Author | SHA1 | Date | |
|---|---|---|---|
| 20b910b015 | |||
| 8d166983f1 |
@@ -14,7 +14,8 @@
|
|||||||
"@fortawesome/fontawesome-svg-core": "^7.1.0",
|
"@fortawesome/fontawesome-svg-core": "^7.1.0",
|
||||||
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
||||||
"@fortawesome/react-fontawesome": "^3.1.0",
|
"@fortawesome/react-fontawesome": "^3.1.0",
|
||||||
"@heroui/react": "^2.8.5",
|
"@heroui/react": "^3.0.0-beta.2",
|
||||||
|
"@heroui/styles": "^3.0.0-beta.2",
|
||||||
"@noahspan/noahspan-components": "^2.0.0-alpha-14",
|
"@noahspan/noahspan-components": "^2.0.0-alpha-14",
|
||||||
"@tailwindcss/typography": "^0.5.19",
|
"@tailwindcss/typography": "^0.5.19",
|
||||||
"@tailwindcss/vite": "^4.1.13",
|
"@tailwindcss/vite": "^4.1.13",
|
||||||
@@ -25,8 +26,8 @@
|
|||||||
"framer-motion": "^12.23.24",
|
"framer-motion": "^12.23.24",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"oidc-spa": "^7.2.4",
|
"oidc-spa": "^7.2.4",
|
||||||
"react": "^19.1.1",
|
"react": "^19.2.0",
|
||||||
"react-dom": "^19.1.1",
|
"react-dom": "^19.2.0",
|
||||||
"react-hook-form": "^7.51.4",
|
"react-hook-form": "^7.51.4",
|
||||||
"react-leaflet": "^4",
|
"react-leaflet": "^4",
|
||||||
"react-leaflet-kml": "^2.1.2",
|
"react-leaflet-kml": "^2.1.2",
|
||||||
|
|||||||
@@ -3,21 +3,20 @@ import Flights from './components/flights/Flights';
|
|||||||
import Logbook from './components/logbook/Logbook';
|
import Logbook from './components/logbook/Logbook';
|
||||||
import Pilots from './components/pilots/Pilots';
|
import Pilots from './components/pilots/Pilots';
|
||||||
import SiteNav from './components/siteNav/SiteNav';
|
import SiteNav from './components/siteNav/SiteNav';
|
||||||
import { HeroUIProvider } from '@heroui/react';
|
|
||||||
import { useHref, useNavigate } from 'react-router-dom';
|
import { useHref, useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HeroUIProvider navigate={navigate} useHref={useHref}>
|
<>
|
||||||
<SiteNav />
|
<SiteNav />
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path='/' element={<Flights />} />
|
<Route path='/' element={<Flights />} />
|
||||||
<Route path="/logbook" element={<Logbook />} />
|
<Route path="/logbook" element={<Logbook />} />
|
||||||
<Route path="/pilots" element={<Pilots />} />
|
<Route path="/pilots" element={<Pilots />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
</HeroUIProvider>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Accordion, AccordionItem, Card, CardBody, CardHeader } from '@heroui/react'
|
import { Accordion, AccordionItem, Card, CardContent, CardHeader } from '@heroui/react'
|
||||||
import { LogbookCardProps } from "./LogbookCardProps.interface";
|
import { LogbookCardProps } from "./LogbookCardProps.interface";
|
||||||
import TrackMap from "../trackMap/TrackMap";
|
import TrackMap from "../trackMap/TrackMap";
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ const LogbookCard = ({ logs, mode, onDelete, onOpenCloseForm }: LogbookCardProps
|
|||||||
<CardHeader>
|
<CardHeader>
|
||||||
<h2 className='font-bold text-2xl'>{formattedDate}</h2>
|
<h2 className='font-bold text-2xl'>{formattedDate}</h2>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardBody>
|
<CardContent>
|
||||||
{mode === 'flights' && log.tracks && log.tracks.length > 0 &&
|
{mode === 'flights' && log.tracks && log.tracks.length > 0 &&
|
||||||
<div className='mb-5'>
|
<div className='mb-5'>
|
||||||
<TrackMap
|
<TrackMap
|
||||||
@@ -25,8 +25,8 @@ const LogbookCard = ({ logs, mode, onDelete, onOpenCloseForm }: LogbookCardProps
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<Accordion variant='bordered'>
|
<Accordion variant='surface'>
|
||||||
<AccordionItem key='1' title='Details'>
|
<AccordionItem key='1'>
|
||||||
<div className='grid grid-cols-12 gap-3 mr-[30%] ml-[30%] mt-4 mb-4'>
|
<div className='grid grid-cols-12 gap-3 mr-[30%] ml-[30%] mt-4 mb-4'>
|
||||||
<div className='col-span-6 font-bold'>
|
<div className='col-span-6 font-bold'>
|
||||||
<span>Aircraft Make and Model</span>
|
<span>Aircraft Make and Model</span>
|
||||||
@@ -66,7 +66,7 @@ const LogbookCard = ({ logs, mode, onDelete, onOpenCloseForm }: LogbookCardProps
|
|||||||
</AccordionItem>
|
</AccordionItem>
|
||||||
</Accordion>
|
</Accordion>
|
||||||
|
|
||||||
</CardBody>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -102,36 +102,35 @@ const LogbookDrawer = ({ onOpenClose }: LogbookDrawerProps) => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<Tabs
|
<Tabs
|
||||||
color='default'
|
|
||||||
fullWidth={true}
|
|
||||||
onSelectionChange={onSelectedKeyChanged}
|
onSelectionChange={onSelectedKeyChanged}
|
||||||
selectedKey={activeTab as string}
|
selectedKey={activeTab as string}
|
||||||
variant='solid'
|
|
||||||
>
|
>
|
||||||
<Tab
|
<Tabs.ListContainer>
|
||||||
key='time'
|
<Tabs.List>
|
||||||
title={
|
<Tabs.Tab
|
||||||
<div className="flex items-center space-x-2">
|
id='time'
|
||||||
|
>
|
||||||
<FontAwesomeIcon icon={faClock} />
|
<FontAwesomeIcon icon={faClock} />
|
||||||
<span>Time</span>
|
Time
|
||||||
</div>
|
<Tabs.Indicator />
|
||||||
}
|
</Tabs.Tab>
|
||||||
>
|
{logbookContext.state.formMode !== FormMode.ADD &&
|
||||||
<LogForm />
|
<Tabs.Tab
|
||||||
</Tab>
|
id='tracks'
|
||||||
{logbookContext.state.formMode !== FormMode.ADD &&
|
>
|
||||||
<Tab
|
|
||||||
key='tracks'
|
|
||||||
title={
|
|
||||||
<div className="flex items-center space-x-2">
|
|
||||||
<FontAwesomeIcon icon={faMapLocationDot} />
|
<FontAwesomeIcon icon={faMapLocationDot} />
|
||||||
<span>Tracks</span>
|
Tracks
|
||||||
</div>
|
<Tabs.Indicator />
|
||||||
|
</Tabs.Tab>
|
||||||
}
|
}
|
||||||
>
|
</Tabs.List>
|
||||||
<TracksForm />
|
</Tabs.ListContainer>
|
||||||
</Tab>
|
<Tabs.Panel id='time'>
|
||||||
}
|
<LogForm />
|
||||||
|
</Tabs.Panel>
|
||||||
|
<Tabs.Panel id='tracks'>
|
||||||
|
<TracksForm />
|
||||||
|
</Tabs.Panel>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</DrawerBody>
|
</DrawerBody>
|
||||||
{activeTab !== 'tracks' &&
|
{activeTab !== 'tracks' &&
|
||||||
@@ -139,24 +138,24 @@ const LogbookDrawer = ({ onOpenClose }: LogbookDrawerProps) => {
|
|||||||
<div className='grid grid-cols-12 gap-3'>
|
<div className='grid grid-cols-12 gap-3'>
|
||||||
<div className='col-span-12 justify-self-end self-center'>
|
<div className='col-span-12 justify-self-end self-center'>
|
||||||
<Button
|
<Button
|
||||||
disabled={
|
isDisabled={
|
||||||
logbookContext.state.isFormDisabled && logbookContext.state.formMode.toString() !== FormMode.VIEW
|
logbookContext.state.isFormDisabled && logbookContext.state.formMode.toString() !== FormMode.VIEW
|
||||||
? logbookContext.state.isFormDisabled
|
? logbookContext.state.isFormDisabled
|
||||||
: false
|
: false
|
||||||
}
|
}
|
||||||
startContent={<FontAwesomeIcon icon={faXmark} />}
|
|
||||||
onPress={onCancel}
|
onPress={onCancel}
|
||||||
>
|
>
|
||||||
|
<FontAwesomeIcon icon={faXmark} />
|
||||||
{logbookContext.state.formMode.toString() !== FormMode.VIEW ? 'Cancel' : 'Close'}
|
{logbookContext.state.formMode.toString() !== FormMode.VIEW ? 'Cancel' : 'Close'}
|
||||||
</Button>
|
</Button>
|
||||||
{logbookContext.state.formMode.toString() !== FormMode.VIEW && (
|
{logbookContext.state.formMode.toString() !== FormMode.VIEW && (
|
||||||
<Button
|
<Button
|
||||||
className='ml-[10px]'
|
className='ml-[10px]'
|
||||||
color='primary'
|
isDisabled={logbookContext.state.isFormDisabled}
|
||||||
disabled={logbookContext.state.isFormDisabled}
|
|
||||||
startContent={<FontAwesomeIcon icon={faSave} />}
|
|
||||||
type="submit"
|
type="submit"
|
||||||
|
variant='primary'
|
||||||
>
|
>
|
||||||
|
<FontAwesomeIcon icon={faSave} />
|
||||||
Save
|
Save
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { UserRole } from '../../enums/userRole';
|
|||||||
import httpClient from '../../httpClient/httpClient'
|
import httpClient from '../../httpClient/httpClient'
|
||||||
import { ScreenSize } from '../../enums/screenSize';
|
import { ScreenSize } from '../../enums/screenSize';
|
||||||
import { useBreakpoints } from '../../hooks/useBreakpoints/UseBreakpoints';
|
import { useBreakpoints } from '../../hooks/useBreakpoints/UseBreakpoints';
|
||||||
import { Alert, Button, Dropdown, DropdownItem, DropdownSection, Table, TableHeader, TableBody, TableColumn, TableRow, TableCell, DropdownTrigger, DropdownMenu } from '@heroui/react'
|
import { Alert, Button, Dropdown, Table, TableHeader, TableBody, TableColumn, TableRow, TableCell } from '@heroui/react'
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
import { faEllipsisVertical, faPen, faEye, faTrash, faPlus } from '@fortawesome/free-solid-svg-icons'
|
import { faEllipsisVertical, faPen, faEye, faTrash, faPlus } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
@@ -133,38 +133,40 @@ const Pilots: React.FC<unknown> = () => {
|
|||||||
case 'actions': {
|
case 'actions': {
|
||||||
return (
|
return (
|
||||||
<Dropdown>
|
<Dropdown>
|
||||||
<DropdownTrigger>
|
<Dropdown.Trigger>
|
||||||
<Button isIconOnly variant='light' size='lg'>
|
<Button isIconOnly size='lg'>
|
||||||
<FontAwesomeIcon icon={faEllipsisVertical} />
|
<FontAwesomeIcon icon={faEllipsisVertical} />
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownTrigger>
|
</Dropdown.Trigger>
|
||||||
<DropdownMenu>
|
<Dropdown.Popover>
|
||||||
<DropdownSection showDivider>
|
<Dropdown.Menu>
|
||||||
<DropdownItem
|
<Dropdown.Section>
|
||||||
key='edit'
|
<Dropdown.Item
|
||||||
onPress={() => onOpenClosePilotForm(FormMode.EDIT, pilot.id)}
|
key='edit'
|
||||||
startContent={<FontAwesomeIcon icon={faPen} />}
|
onPress={() => onOpenClosePilotForm(FormMode.EDIT, pilot.id)}
|
||||||
>
|
|
||||||
Edit
|
|
||||||
</DropdownItem>
|
|
||||||
<DropdownItem
|
|
||||||
key='view'
|
|
||||||
onPress={() => onOpenClosePilotForm(FormMode.VIEW, pilot.id)}
|
|
||||||
startContent={<FontAwesomeIcon icon={faEye} />}
|
|
||||||
>
|
|
||||||
View
|
|
||||||
</DropdownItem>
|
|
||||||
</DropdownSection>
|
|
||||||
<DropdownSection>
|
|
||||||
<DropdownItem
|
|
||||||
key='Delete'
|
|
||||||
onPress={() => onDeletePilot(pilot.id)}
|
|
||||||
startContent={<FontAwesomeIcon icon={faTrash} />}
|
|
||||||
>
|
>
|
||||||
Delete
|
<FontAwesomeIcon icon={faPen} />
|
||||||
</DropdownItem>
|
Edit
|
||||||
</DropdownSection>
|
</Dropdown.Item>
|
||||||
</DropdownMenu>
|
<Dropdown.Item
|
||||||
|
key='view'
|
||||||
|
onPress={() => onOpenClosePilotForm(FormMode.VIEW, pilot.id)}
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faEye} />
|
||||||
|
View
|
||||||
|
</Dropdown.Item>
|
||||||
|
</Dropdown.Section>
|
||||||
|
<Dropdown.Section>
|
||||||
|
<Dropdown.Item
|
||||||
|
key='Delete'
|
||||||
|
onPress={() => onDeletePilot(pilot.id)}
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faTrash} />
|
||||||
|
Delete
|
||||||
|
</Dropdown.Item>
|
||||||
|
</Dropdown.Section>
|
||||||
|
</Dropdown.Menu>
|
||||||
|
</Dropdown.Popover>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ const TracksForm = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='col-span-10'>
|
<div className='col-span-10'>
|
||||||
<Input isDisabled={state.isDisabled} key={index} type='text' value={filename}/>
|
<Input disabled={state.isDisabled} key={index} type='text' value={filename}/>
|
||||||
</div>
|
</div>
|
||||||
<div className='col-span-2'>
|
<div className='col-span-2'>
|
||||||
<Button isDisabled={state.isDisabled} key={index} isIconOnly onPress={() => onDeleteTrack(track.id, filename, index)}><FontAwesomeIcon icon={faTrash} /></Button>
|
<Button isDisabled={state.isDisabled} key={index} isIconOnly onPress={() => onDeleteTrack(track.id, filename, index)}><FontAwesomeIcon icon={faTrash} /></Button>
|
||||||
|
|||||||
9
client/src/globals.css
Normal file
9
client/src/globals.css
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
@import "tailwindcss";
|
||||||
|
@import "@heroui/styles";
|
||||||
|
@plugin "@tailwindcss/typography";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@ import AppContextProvider from './context/appContext/AppContextProvider.tsx';
|
|||||||
import LogbookContextProvider from './context/logbookContext/LogbookContextProvider.tsx'
|
import LogbookContextProvider from './context/logbookContext/LogbookContextProvider.tsx'
|
||||||
import { BrowserRouter } from 'react-router-dom';
|
import { BrowserRouter } from 'react-router-dom';
|
||||||
import { OidcProvider } from './auth/oidcConfig.ts';
|
import { OidcProvider } from './auth/oidcConfig.ts';
|
||||||
import './styles.css';
|
import './globals.css';
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||||
<OidcProvider>
|
<OidcProvider>
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
@import "tailwindcss";
|
|
||||||
@plugin './hero.ts';
|
|
||||||
/* Note: You may need to change the path to fit your project structure */
|
|
||||||
@source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}';
|
|
||||||
@custom-variant dark (&:is(.dark *));
|
|
||||||
@plugin "@tailwindcss/typography";
|
|
||||||
|
|
||||||
@theme inline {
|
|
||||||
--color-primary: #000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2361
package-lock.json
generated
2361
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user