diff --git a/src/components/VehiclesManager/VehiclesTable.vue b/src/components/VehiclesManager/VehiclesTable.vue index 383fbe1..96f9238 100644 --- a/src/components/VehiclesManager/VehiclesTable.vue +++ b/src/components/VehiclesManager/VehiclesTable.vue @@ -23,9 +23,11 @@ {{ row.vehicleRef.id }} + {{ row.vehicleRef.name }} + {{ row.vehicleRef.type }} @@ -34,7 +36,8 @@ {{ row.vehicleRef.cabinName }} - {{ row.vehicleRef.group.name }} + + {{ new Date(row.vehicleRef.restrictions.sponsorOnly).toLocaleString() }} @@ -42,6 +45,7 @@ + {{ row.vehicleRef.restrictions.teamOnly ? '✅' : '❌' }} @@ -49,10 +53,12 @@ + {{ row.vehicleRef.hidden ? '✅' : '❌' }} - remove + + remove @@ -63,6 +69,7 @@ import { computed, ref } from 'vue'; import { useVehiclesStore } from '../../stores/vehicles.store'; import { IVehicleTableRow, VehicleEditRestrictionKey, VehicleEditRowKey } from '../../types/vehicles.types'; +import VehicleGroupsTable from './VehicleGroupsTable.vue'; const vehiclesStore = useVehiclesStore(); const vehicleSearchInput = ref(''); @@ -158,6 +165,10 @@ async function addVehicleRow() { } async function removeVehicle(id: number) { + const confirmRemove = confirm('Czy na pewno chcesz usunąć ten pojazd?'); + + if (!confirmRemove) return; + const removedVehicleData = await vehiclesStore.removeVehicle(id); if (removedVehicleData) { diff --git a/src/styles/_global.scss b/src/styles/_global.scss index 7e6941d..99b3456 100644 --- a/src/styles/_global.scss +++ b/src/styles/_global.scss @@ -65,7 +65,7 @@ table tr:nth-child(even) { background-color: #334756; } -table tr:hover { +table tr td.editable:hover { background-color: #1a293b; cursor: pointer; }