We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c014bf1 commit 5377dd8Copy full SHA for 5377dd8
src/components/BookingComponentv3.jsx
@@ -61,7 +61,15 @@ const BookingComponent = () => {
61
if (acceptedFIRsRegex.test(session.callsign)) {
62
const correctedCallsign = getBookableCallsign(session.callsign, session.frequency);
63
session.callsign = correctedCallsign;
64
- dateArray[0].data.push(session);
+ const existingBooking = dateArray[0].data.find(booking => booking.callsign === session.callsign);
65
+ if (existingBooking) {
66
+ existingBooking.name = session.name;
67
+ } else {
68
+ dateArray[0].data.push({
69
+ ...session,
70
+ name: session.name
71
+ });
72
+ }
73
}
74
});
75
0 commit comments