feature: routesInfo update

This commit is contained in:
2023-05-18 02:22:37 +02:00
parent 4847524b64
commit c6df4a3f84
6 changed files with 75 additions and 121 deletions
+13 -2
View File
@@ -83,7 +83,7 @@
import { defineComponent } from 'vue';
import routesMixin from '../mixins/routesMixin';
import { useStore } from '../store';
import { AuthState, Availability, ChangeProp, HeaderTypes, SceneryRowItem } from '../types/types';
import { AuthState, Availability, ChangeProp, HeaderTypes, SceneryRoutesInfo, SceneryRowItem } from '../types/types';
import { getAvailabilityValue } from '../types/typeUitls';
export default defineComponent({
@@ -122,7 +122,7 @@ export default defineComponent({
: changeItem[propChange];
if (propChange == 'availability') value = getAvailabilityValue(changeItem[propChange] as Availability);
if (propChange == 'routes') value = this.getRouteNames(changeItem[propChange] as string, true);
if (propChange == 'routesInfo') value = this.getRouteNames(changeItem[propChange] as SceneryRoutesInfo[]);
itemChanges.push(`<i>${(HeaderTypes as any)[propChange]}:</i> ${value || '-'}`);
}
@@ -215,6 +215,17 @@ export default defineComponent({
controlType: 'SCS',
SUP: false,
routes: 'Test_1EPB:0:0',
routesInfo: [
{
isElectric: true,
isInternal: false,
isRouteSBL: false,
routeLength: 0,
routeSpeed: 0,
routeTracks: 1,
routeName: 'Test',
},
],
checkpoints: '',
authors: '',
availability: 'default',