Skip to content

Commit 25a9e88

Browse files
authored
🐛 use correct journey number on manual trips (#2275)
1 parent 5dcbc08 commit 25a9e88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

resources/vue/components/TripCreation/TripCreationForm.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ export default {
5959
},
6060
sendform() {
6161
this.form.lineName = this.trainTypeInput + " " + this.trainNumberInput;
62-
this.form.journeyNumber = isNumber(this.trainNumberInput) ? this.trainNumberInput : random(1000, 9999, false);
62+
63+
let trainNumber = parseInt(this.trainNumberInput);
64+
this.form.journeyNumber = trainNumber || null;
6365
6466
fetch("/api/v1/trains/trip", {
6567
method: "POST",

0 commit comments

Comments
 (0)