Remove takeoffs field, add dashboard route
This commit is contained in:
parent
921a3be6b2
commit
b446ac93eb
3
web/app/routes/logbook.dashboard/route.tsx
Normal file
3
web/app/routes/logbook.dashboard/route.tsx
Normal file
@ -0,0 +1,3 @@
|
||||
export default function Dashboard() {
|
||||
return;
|
||||
}
|
@ -307,22 +307,6 @@ export default function Flight() {
|
||||
</Group>
|
||||
</CollapsibleFieldset>
|
||||
) : null}
|
||||
<Grid w="100%" mt="sm">
|
||||
<Grid.Col span={6}>
|
||||
<CollapsibleFieldset legend="Takeoffs" w="100%">
|
||||
<Group grow>
|
||||
<VerticalLogItem
|
||||
label="Day"
|
||||
content={log.takeoffs_day}
|
||||
/>
|
||||
<VerticalLogItem
|
||||
label="Night"
|
||||
content={log.takeoffs_night}
|
||||
/>
|
||||
</Group>
|
||||
</CollapsibleFieldset>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<CollapsibleFieldset legend="Landings" w="100%">
|
||||
<Group grow>
|
||||
<VerticalLogItem
|
||||
@ -335,8 +319,6 @@ export default function Flight() {
|
||||
/>
|
||||
</Group>
|
||||
</CollapsibleFieldset>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
{log.time_instrument ||
|
||||
log.time_sim_instrument ||
|
||||
log.holds_instrument ? (
|
||||
|
@ -25,6 +25,8 @@ export default function Index() {
|
||||
useEffect(() => {
|
||||
if (!loading && !user) {
|
||||
navigate("/login");
|
||||
} else {
|
||||
navigate("/logbook/dashboard");
|
||||
}
|
||||
}, [user, loading, navigate]);
|
||||
|
||||
|
@ -67,9 +67,7 @@ export default function FlightForm({
|
||||
time_xc: 0.0,
|
||||
dist_xc: 0.0,
|
||||
|
||||
takeoffs_day: 0,
|
||||
landings_day: 0,
|
||||
takeoffs_night: 0,
|
||||
landings_night: 0,
|
||||
|
||||
time_instrument: 0.0,
|
||||
@ -171,13 +169,9 @@ export default function FlightForm({
|
||||
|
||||
<Fieldset legend="Cross-Country" mt="md">
|
||||
<Group justify="center" grow>
|
||||
<ZeroHourInput
|
||||
form={form}
|
||||
field="time_xc"
|
||||
label="Time Cross-Country"
|
||||
/>
|
||||
<ZeroHourInput form={form} field="time_xc" label="Hours" />
|
||||
<NumberInput
|
||||
label="Distance Cross-Country"
|
||||
label="Distance"
|
||||
decimalScale={1}
|
||||
min={0}
|
||||
fixedDecimalScale
|
||||
@ -198,32 +192,12 @@ export default function FlightForm({
|
||||
</Group>
|
||||
</Fieldset>
|
||||
|
||||
{/* Takeoffs and Landings */}
|
||||
{/* Landings */}
|
||||
|
||||
<Fieldset legend="Takeoffs and Landings" mt="md">
|
||||
<Fieldset legend="Landings" mt="md">
|
||||
<Group justify="center" grow>
|
||||
<ZeroIntInput
|
||||
form={form}
|
||||
field="takeoffs_day"
|
||||
label="Day Takeoffs"
|
||||
/>
|
||||
<ZeroIntInput
|
||||
form={form}
|
||||
field="landings_day"
|
||||
label="Day Landings"
|
||||
/>
|
||||
</Group>
|
||||
<Group justify="center" grow mt="md">
|
||||
<ZeroIntInput
|
||||
form={form}
|
||||
field="takeoffs_night"
|
||||
label="Night Takeoffs"
|
||||
/>
|
||||
<ZeroIntInput
|
||||
form={form}
|
||||
field="landings_night"
|
||||
label="Night Landings"
|
||||
/>
|
||||
<ZeroIntInput form={form} field="landings_day" label="Day" />
|
||||
<ZeroIntInput form={form} field="landings_night" label="Night" />
|
||||
</Group>
|
||||
</Fieldset>
|
||||
|
||||
|
@ -26,10 +26,10 @@ export default function Navbar({
|
||||
<NavLink
|
||||
p="md"
|
||||
component={Link}
|
||||
to="/logbook"
|
||||
to="/logbook/dashboard"
|
||||
label="Dashboard"
|
||||
leftSection={<IconPlaneDeparture />}
|
||||
active={page == null}
|
||||
active={page == "dashboard"}
|
||||
onClick={() => (opened ? toggle() : null)}
|
||||
/>
|
||||
<NavLink
|
||||
|
@ -23,9 +23,7 @@ type FlightBaseSchema = {
|
||||
time_xc: number;
|
||||
dist_xc: number;
|
||||
|
||||
takeoffs_day: number;
|
||||
landings_day: number;
|
||||
takeoffs_night: number;
|
||||
landings_night: number;
|
||||
|
||||
time_instrument: number;
|
||||
|
Loading…
x
Reference in New Issue
Block a user