Jiny pristup k vytvareni letu, polofunkcni editace letu

This commit is contained in:
Michal Kváček
2023-06-27 22:45:24 +02:00
parent 4d9950e362
commit d399e1aaf1
20 changed files with 672 additions and 261 deletions
+8
View File
@@ -0,0 +1,8 @@
export const flightName = (flight) => {
const date = flight.takeoffDatetime;//.getDay() + ". " + flight.takeoffDatetime.getMonth() + ". " + flight.takeoffDatetime.getFullYear();
if (flight.name !== '') {
return `${flight.name} (${date}})`
} else {
return `${flight.takeoffAirport.icaoCode} - ${flight.takeoffAirport.icaoCode} (${date})`;
}
}