Skip to content

Commit 31615d2

Browse files
authored
Merge branch 'development' into fix/th-183-fix-the-phone-field
2 parents e6967d5 + 4ab202d commit 31615d2

File tree

9 files changed

+26
-23
lines changed

9 files changed

+26
-23
lines changed

backend/src/libs/packages/socket/socket.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ class SocketService {
3434
logger.info(`${socket.id} disconnected`);
3535
});
3636
socket.on(
37-
ServerSocketEvent.DRIVER_LOCATION_UPDATE,
37+
ServerSocketEvent.TRUCK_LOCATION_UPDATE,
3838
(
39-
payload: ServerSocketEventParameter[typeof ServerSocketEvent.DRIVER_LOCATION_UPDATE],
39+
payload: ServerSocketEventParameter[typeof ServerSocketEvent.TRUCK_LOCATION_UPDATE],
4040
): void => {
41-
const { driverId, latLng } = payload;
42-
this.geolocationCacheService.setCache(driverId, latLng);
41+
const { truckId, latLng } = payload;
42+
this.geolocationCacheService.setCache(truckId, latLng);
4343
},
4444
);
4545
});

frontend/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
5+
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + React + TS</title>
7+
<title>TowHub</title>
88
</head>
99
<body>
1010
<div id="modal-root"></div>

frontend/public/icon.svg

Lines changed: 9 additions & 0 deletions
Loading

frontend/public/vite.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { sendDriverGeolocation } from './send-driver-geolocation/send-driver-geolocation.helper.js';
1+
export { sendTruckGeolocation } from './send-truck-geolocation/send-truck-geolocation.helper.js';
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { ServerSocketEvent } from '~/libs/packages/socket/libs/enums/enums.js';
22
import { socket as socketService } from '~/libs/packages/socket/socket.js';
33

4-
const sendDriverGeolocation = (
5-
driverId: number,
4+
const sendTruckGeolocation = (
5+
truckId: number,
66
{ coords }: GeolocationPosition,
77
): void => {
88
socketService.emit({
9-
event: ServerSocketEvent.DRIVER_LOCATION_UPDATE,
9+
event: ServerSocketEvent.TRUCK_LOCATION_UPDATE,
1010
eventPayload: {
11-
driverId,
11+
truckId,
1212
latLng: { latitude: coords.latitude, longitude: coords.longitude },
1313
},
1414
});
1515
};
1616

17-
export { sendDriverGeolocation };
17+
export { sendTruckGeolocation };

package-lock.json

Lines changed: 2 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const ServerSocketEvent = {
22
CONNECTION: 'connection',
33
DISCONNECT: 'disconnect',
4-
DRIVER_LOCATION_UPDATE: 'driver_location_update',
4+
TRUCK_LOCATION_UPDATE: 'truck_location_update',
55
} as const;
66

77
export { ServerSocketEvent };

shared/src/libs/packages/socket/libs/types/server-socket-event-parameter.type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { type GeolocationLatLng } from '~/libs/packages/geolocation/types/types.
33
import { type ServerSocketEvent } from '../enums/enums.js';
44

55
type ServerSocketEventParameter = {
6-
[ServerSocketEvent.DRIVER_LOCATION_UPDATE]: {
6+
[ServerSocketEvent.TRUCK_LOCATION_UPDATE]: {
77
latLng: GeolocationLatLng;
8-
driverId: number;
8+
truckId: number;
99
};
1010
};
1111

0 commit comments

Comments
 (0)