diff --git a/package.json b/package.json index 23aeba3..462c517 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pojazdownik", - "version": "1.3.0dev", + "version": "1.3.0", "private": true, "scripts": { "dev": "vite", diff --git a/src/mixins/stockMixin.ts b/src/mixins/stockMixin.ts index 6f1a633..811768a 100644 --- a/src/mixins/stockMixin.ts +++ b/src/mixins/stockMixin.ts @@ -18,6 +18,8 @@ export default defineComponent({ getStockObject(vehicle: Vehicle, cargo?: ICargo | null, count = 1): IStock { const isLoco = isLocomotive(vehicle); + console.log(vehicle.type); + return { id: this.getStockId(), type: vehicle.type, diff --git a/src/utils/vehicleUtils.ts b/src/utils/vehicleUtils.ts index 2076f52..602be1e 100644 --- a/src/utils/vehicleUtils.ts +++ b/src/utils/vehicleUtils.ts @@ -81,7 +81,7 @@ export function carDataList(state: IStore) { } export function totalMass(state: IStore) { - return state.stockList.reduce( + return ~~state.stockList.reduce( (acc, stock) => acc + (stock.cargo ? stock.cargo.totalMass : stock.mass) * stock.count, 0 );