Merge pull request 'fix: Convert DECIMAL columns to numbers in fuel logs API (#49)' (#50) from issue-49-fix-fuel-display into main
All checks were successful
Deploy to Staging / Build Images (push) Successful in 26s
Deploy to Staging / Deploy to Staging (push) Successful in 29s
Deploy to Staging / Verify Staging (push) Successful in 7s
Deploy to Staging / Notify Staging Ready (push) Successful in 6s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
All checks were successful
Deploy to Staging / Build Images (push) Successful in 26s
Deploy to Staging / Deploy to Staging (push) Successful in 29s
Deploy to Staging / Verify Staging (push) Successful in 7s
Deploy to Staging / Notify Staging Ready (push) Successful in 6s
Deploy to Staging / Notify Staging Failure (push) Has been skipped
Reviewed-on: #50
This commit was merged in pull request #50.
This commit is contained in:
@@ -282,8 +282,8 @@ export class FuelLogsService {
|
|||||||
tripDistance: row.trip_distance ?? undefined,
|
tripDistance: row.trip_distance ?? undefined,
|
||||||
fuelType: row.fuel_type as FuelType,
|
fuelType: row.fuel_type as FuelType,
|
||||||
fuelGrade: row.fuel_grade ?? undefined,
|
fuelGrade: row.fuel_grade ?? undefined,
|
||||||
fuelUnits: row.fuel_units,
|
fuelUnits: Number(row.fuel_units),
|
||||||
costPerUnit: row.cost_per_unit,
|
costPerUnit: Number(row.cost_per_unit),
|
||||||
totalCost: Number(row.total_cost),
|
totalCost: Number(row.total_cost),
|
||||||
locationData: row.location_data ?? undefined,
|
locationData: row.location_data ?? undefined,
|
||||||
notes: row.notes ?? undefined,
|
notes: row.notes ?? undefined,
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ export const useFuelLogs = (vehicleId?: string) => {
|
|||||||
mutationFn: (data: CreateFuelLogRequest) => fuelLogsApi.create(data),
|
mutationFn: (data: CreateFuelLogRequest) => fuelLogsApi.create(data),
|
||||||
onSuccess: (_res, variables) => {
|
onSuccess: (_res, variables) => {
|
||||||
queryClient.invalidateQueries({ queryKey: ['fuelLogs', variables.vehicleId] });
|
queryClient.invalidateQueries({ queryKey: ['fuelLogs', variables.vehicleId] });
|
||||||
|
queryClient.invalidateQueries({ queryKey: ['fuelLogs', 'all'] });
|
||||||
queryClient.invalidateQueries({ queryKey: ['fuelLogsStats', variables.vehicleId] });
|
queryClient.invalidateQueries({ queryKey: ['fuelLogsStats', variables.vehicleId] });
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user