limiting pilot data for unauthenticated users

This commit is contained in:
2025-03-18 10:07:03 -05:00
parent ddb50e9a9e
commit b8b52fa5af
3 changed files with 15 additions and 3 deletions

View File

@@ -205,7 +205,6 @@ const LogForm: React.FC<ILogFormProps> = ({
name="pilotId" name="pilotId"
control={methods.control} control={methods.control}
render={({ field: { onChange, value } }) => { render={({ field: { onChange, value } }) => {
console.log(value)
return ( return (
<Select <Select
disabled={state.isDisabled} disabled={state.isDisabled}

View File

@@ -177,6 +177,20 @@ const Logbook: React.FC<unknown> = () => {
accessorKey: 'notes', accessorKey: 'notes',
header: 'Notes' header: 'Notes'
}, },
{
header: 'Actions',
meta: {
align: 'center',
headerAlign: 'center'
},
cell: (info: any) => (
<ActionMenu
id={info.row.original.rowKey}
onDelete={onDeleteEntry}
onOpenCloseForm={onOpenCloseEntryForm}
/>
)
}
] ]
const authColumns: ColumnDef<ILogbookEntry>[] = [ const authColumns: ColumnDef<ILogbookEntry>[] = [

View File

@@ -113,7 +113,6 @@ const PilotForm: React.FC<IPilotFormProps> = ({
}; };
const onSubmit = async (data: unknown) => { const onSubmit = async (data: unknown) => {
console.log(data)
try { try {
setIsLoading(true); setIsLoading(true);
@@ -167,7 +166,7 @@ const PilotForm: React.FC<IPilotFormProps> = ({
pilot.certificates = JSON.parse(pilot.certificates); pilot.certificates = JSON.parse(pilot.certificates);
pilot.endorsements = JSON.parse(pilot.endorsements) pilot.endorsements = JSON.parse(pilot.endorsements)
console.log(pilot)
setSelectedPerson({ setSelectedPerson({
userPrincipalName: pilot.id, userPrincipalName: pilot.id,
displayName: pilot.name displayName: pilot.name