Skip to content

Commit b0d1f05

Browse files
committed
fix: remove trailing whitespace from frontend files
1 parent 5e212bc commit b0d1f05

File tree

12 files changed

+110
-110
lines changed

12 files changed

+110
-110
lines changed

gs/frontend/aro/src/new-request/new-request-form.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ const NewRequestForm = () => {
1414

1515
const handleSubmit = async (event: React.FormEvent) => {
1616
event.preventDefault();
17-
17+
1818
try {
1919
const submission = {
2020
latitude,
2121
longitude,
2222

2323
};
24-
24+
2525
const response = await fetch('http://localhost:5000/aro-request', {
2626
method: 'POST',
2727
headers: {
@@ -39,11 +39,11 @@ const NewRequestForm = () => {
3939

4040
const result = await response.json();
4141
console.log('Request submitted successfully:', result);
42-
42+
4343
alert("Request submitted successfully! You can view it in your requests list.");
44-
4544

46-
45+
46+
4747
} catch (error) {
4848
console.error('Error submitting request:', error);
4949
alert("Error submitting request. Please try again.");

gs/frontend/aro/src/profile/profile-api.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ export const getProfile = async (): Promise<ProfileData> => {
1313
// 'Authorization': `Bearer ${token}`
1414
},
1515
});
16-
16+
1717
if (!response.ok) {
1818
throw new Error(`HTTP error! status: ${response.status}`);
1919
}
20-
20+
2121
const data = await response.json();
2222
return data;
2323
} catch (error) {
@@ -41,7 +41,7 @@ export const updateProfile = async (data: ProfileData): Promise<void> => {
4141
},
4242
body: JSON.stringify(data),
4343
});
44-
44+
4545
if (!response.ok) {
4646
throw new Error(`HTTP error! status: ${response.status}`);
4747
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11

2-
export type AROCommandStatus =
3-
| 'pending'
4-
| 'scheduled'
5-
| 'taken'
6-
| 'cancelled'
7-
| 'failed'
2+
export type AROCommandStatus =
3+
| 'pending'
4+
| 'scheduled'
5+
| 'taken'
6+
| 'cancelled'
7+
| 'failed'
88
| 'completed';
99

1010
export interface RequestItemData {
1111
id: number;
1212
aro_id?: number;
13-
latitude: number;
14-
longitude: number;
15-
status: AROCommandStatus;
13+
latitude: number;
14+
longitude: number;
15+
status: AROCommandStatus;
1616
created_on: Date;
1717
request_sent_to_obc_on: Date | null;
1818
pic_taken_on: Date | null;
1919
pic_transmitted_on: Date | null;
20-
packet_id?: number | null;
21-
cancellable_after: Date;
20+
packet_id?: number | null;
21+
cancellable_after: Date;
2222
// Add more properties as needed
2323
}

gs/frontend/aro/src/requests/requests-api.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ import type { RequestItemData } from "./request-item-data.ts";
33
export const getRequestItems = async (): Promise<RequestItemData[]> => {
44
try {
55
const response = await fetch('http://localhost:5000/aro-request');
6-
6+
77
if (!response.ok) {
88
throw new Error(`HTTP error! status: ${response.status}`);
99
}
10-
10+
1111
const data = await response.json();
12-
12+
1313

1414
return data.map((item: any) => ({
1515
...item,
16-
status: item.status.toLowerCase(),
16+
status: item.status.toLowerCase(),
1717
created_on: new Date(item.created_on),
1818
request_sent_to_obc_on: item.request_sent_to_obc_on ? new Date(item.request_sent_to_obc_on) : null,
1919
pic_taken_on: item.pic_taken_on ? new Date(item.pic_taken_on) : null,
2020
pic_transmitted_on: item.pic_transmitted_on ? new Date(item.pic_transmitted_on) : null,
21-
cancellable_after: item.cancellable_after ? new Date(item.cancellable_after) : new Date(),
21+
cancellable_after: item.cancellable_after ? new Date(item.cancellable_after) : new Date(),
2222
}));
2323
} catch (error) {
2424
console.error('Error fetching ARO requests:', error);

gs/frontend/aro/src/requests/requests.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const Requests = () => {
1717
const [data, setData] = useState<RequestItemData[]>([]);
1818
const [sorting, setSorting] = useState<SortingState>([]);
1919
const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);
20-
20+
2121
useEffect(() => {
2222
const getRequestItemsRegular = async () => {
2323
const response = await getRequestItems();
@@ -38,7 +38,7 @@ const Requests = () => {
3838
};
3939

4040
const columnHelper = createColumnHelper<RequestItemData>();
41-
41+
4242
const columns = useMemo(() => [
4343
columnHelper.accessor("id", {
4444
header: "ID",
@@ -60,12 +60,12 @@ const Requests = () => {
6060
const statusDisplay = status.charAt(0).toUpperCase() + status.slice(1);
6161
const getStatusColor = (status: AROCommandStatus) => {
6262
switch (status) {
63-
case 'pending': return '#ffc107';
64-
case 'scheduled': return '#007bff';
65-
case 'taken': return '#28a745';
66-
case 'cancelled': return '#6c757d';
67-
case 'failed': return '#dc3545';
68-
case 'completed': return '#28a745';
63+
case 'pending': return '#ffc107';
64+
case 'scheduled': return '#007bff';
65+
case 'taken': return '#28a745';
66+
case 'cancelled': return '#6c757d';
67+
case 'failed': return '#dc3545';
68+
case 'completed': return '#28a745';
6969
default: return '#000';
7070
}
7171
};
@@ -151,7 +151,7 @@ const Requests = () => {
151151
{table.getHeaderGroups().map(headerGroup => (
152152
<tr key={headerGroup.id}>
153153
{headerGroup.headers.map(header => (
154-
<th
154+
<th
155155
key={header.id}
156156
style={{ cursor: header.column.getCanSort() ? 'pointer' : 'default' }}
157157
onClick={header.column.getToggleSortingHandler()}

gs/frontend/aro/src/shared-types.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
// Shared types based on database schema for ARO and MCC frontends
22

33
// Enums matching database schema
4-
export type AROCommandStatus =
5-
| 'pending'
6-
| 'scheduled'
7-
| 'taken'
8-
| 'cancelled'
9-
| 'failed'
4+
export type AROCommandStatus =
5+
| 'pending'
6+
| 'scheduled'
7+
| 'taken'
8+
| 'cancelled'
9+
| 'failed'
1010
| 'completed';
1111

12-
export type CommandStatus =
13-
| 'pending'
14-
| 'scheduled'
15-
| 'ongoing'
16-
| 'cancelled'
17-
| 'failed'
12+
export type CommandStatus =
13+
| 'pending'
14+
| 'scheduled'
15+
| 'ongoing'
16+
| 'cancelled'
17+
| 'failed'
1818
| 'completed';
1919

20-
export type SessionStatus =
21-
| 'pending'
22-
| 'scheduled'
23-
| 'ongoing'
20+
export type SessionStatus =
21+
| 'pending'
22+
| 'scheduled'
23+
| 'ongoing'
2424
| 'completed';
2525

2626
export type MainPacketType = 'uplink' | 'downlink';
@@ -29,10 +29,10 @@ export type MainPacketType = 'uplink' | 'downlink';
2929
export interface ARORequest {
3030
id: number;
3131
aro_id: number;
32-
latitude: number;
32+
latitude: number;
3333
longitude: number;
3434
status: AROCommandStatus;
35-
created_on: string;
35+
created_on: string;
3636
request_sent_to_obc_on: string | null;
3737
pic_taken_on: string | null;
3838
pic_transmitted_on: string | null;
@@ -41,7 +41,7 @@ export interface ARORequest {
4141

4242
export interface Session {
4343
id: number;
44-
start_time: string;
44+
start_time: string;
4545
end_time: string | null;
4646
status: SessionStatus;
4747
}

gs/frontend/mcc/src/aro-requests/aro-requests.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import { type AROCommandStatus } from "../shared-types.ts";
1616

1717
type AROItemProps = {
1818
id: number;
19-
aro_id?: number;
19+
aro_id?: number;
2020
latitude: number;
21-
longitude: number;
22-
status: AROCommandStatus;
23-
created_on?: string;
21+
longitude: number;
22+
status: AROCommandStatus;
23+
created_on?: string;
2424
request_sent_to_obc_on?: string | null;
2525
pic_taken_on?: string | null;
2626
pic_transmitted_on?: string | null;
@@ -51,11 +51,11 @@ function ARORequests() {
5151
}),
5252
columnHelper.accessor("latitude", {
5353
header: "Latitude",
54-
cell: (info) => info.getValue().toFixed(6),
54+
cell: (info) => info.getValue().toFixed(6),
5555
}),
5656
columnHelper.accessor("longitude", {
57-
header: "Longitude",
58-
cell: (info) => info.getValue().toFixed(6),
57+
header: "Longitude",
58+
cell: (info) => info.getValue().toFixed(6),
5959
}),
6060
columnHelper.accessor("status", {
6161
header: "Status",
@@ -65,12 +65,12 @@ function ARORequests() {
6565
const statusDisplay = status.charAt(0).toUpperCase() + status.slice(1);
6666
const getStatusColor = (status: AROCommandStatus) => {
6767
switch (status) {
68-
case 'pending': return '#ffc107';
69-
case 'scheduled': return '#007bff';
70-
case 'taken': return '#28a745';
71-
case 'cancelled': return '#6c757d';
72-
case 'failed': return '#dc3545';
73-
case 'completed': return '#28a745';
68+
case 'pending': return '#ffc107';
69+
case 'scheduled': return '#007bff';
70+
case 'taken': return '#28a745';
71+
case 'cancelled': return '#6c757d';
72+
case 'failed': return '#dc3545';
73+
case 'completed': return '#28a745';
7474
default: return '#000';
7575
}
7676
};
@@ -116,13 +116,13 @@ function ARORequests() {
116116
Available statuses: pending, scheduled, taken, cancelled, failed, completed
117117
</small>
118118
</div>
119-
119+
120120
<Table striped bordered hover variant="light">
121121
<thead>
122122
{table.getHeaderGroups().map(headerGroup => (
123123
<tr key={headerGroup.id}>
124124
{headerGroup.headers.map(header => (
125-
<th
125+
<th
126126
key={header.id}
127127
style={{ cursor: header.column.getCanSort() ? 'pointer' : 'default' }}
128128
onClick={header.column.getToggleSortingHandler()}

gs/frontend/mcc/src/common/logs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ function Logs() {
8484
style={{ marginRight: "1rem" }}
8585
/>
8686
</div>
87-
87+
8888
<Table responsive="sm">
8989
<thead>
9090
{table.getHeaderGroups().map(headerGroup => (
9191
<tr key={headerGroup.id}>
9292
{headerGroup.headers.map(header => (
93-
<th
93+
<th
9494
key={header.id}
9595
style={{ cursor: header.column.getCanSort() ? 'pointer' : 'default' }}
9696
onClick={header.column.getToggleSortingHandler()}

gs/frontend/mcc/src/mission-commands/mission-commands.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ function MissionCommands() {
9090
</thead>
9191
<tbody>
9292
<tr>
93-
{commandResponse &&
93+
{commandResponse &&
9494
<td>
95-
{filterText ?
96-
commandResponse.toString().includes(filterText) ?
97-
commandResponse : "No matching output"
95+
{filterText ?
96+
commandResponse.toString().includes(filterText) ?
97+
commandResponse : "No matching output"
9898
: commandResponse}
9999
</td>
100100
}

gs/frontend/mcc/src/shared-types.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
// Shared types based on database schema for ARO and MCC frontends
22

33
// Enums matching database schema
4-
export type AROCommandStatus =
5-
| 'pending'
6-
| 'scheduled'
7-
| 'taken'
8-
| 'cancelled'
9-
| 'failed'
4+
export type AROCommandStatus =
5+
| 'pending'
6+
| 'scheduled'
7+
| 'taken'
8+
| 'cancelled'
9+
| 'failed'
1010
| 'completed';
1111

12-
export type CommandStatus =
13-
| 'pending'
14-
| 'scheduled'
15-
| 'ongoing'
16-
| 'cancelled'
17-
| 'failed'
12+
export type CommandStatus =
13+
| 'pending'
14+
| 'scheduled'
15+
| 'ongoing'
16+
| 'cancelled'
17+
| 'failed'
1818
| 'completed';
1919

20-
export type SessionStatus =
21-
| 'pending'
22-
| 'scheduled'
23-
| 'ongoing'
20+
export type SessionStatus =
21+
| 'pending'
22+
| 'scheduled'
23+
| 'ongoing'
2424
| 'completed';
2525

2626
export type MainPacketType = 'uplink' | 'downlink';

0 commit comments

Comments
 (0)