diff --git a/README.md b/README.md index 58163bc..1c150c3 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ -->

Hammond

-

Current Version - 2021.08.13

+

Current Version - 2021.09.20

A self-hosted vehicle expense tracking system with support for multiple users. diff --git a/docker-compose.yml b/docker-compose.yml index d136465..31f0ea2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: image: akhilrex/hammond container_name: hammond environment: - - JWT_SECRET = somethingverystrong + - JWT_SECRET=somethingverystrong volumes: - /path/to/config:/config - /path/to/data:/assets diff --git a/server/models/vehicle.go b/server/models/vehicle.go index 6e394b4..e81af97 100644 --- a/server/models/vehicle.go +++ b/server/models/vehicle.go @@ -64,7 +64,7 @@ type UpdateExpenseRequest struct { type CreateExpenseRequest struct { VehicleID string `form:"vehicleId" json:"vehicleId" binding:"required"` - Amount float32 `form:"amount" json:"amount" binding:"required"` + Amount float32 `form:"amount" json:"amount"` OdoReading int `form:"odoReading" json:"odoReading"` Comments string `form:"comments" json:"comments" ` diff --git a/server/service/reportService.go b/server/service/reportService.go index f0e7b93..d58b9cd 100644 --- a/server/service/reportService.go +++ b/server/service/reportService.go @@ -1,6 +1,7 @@ package service import ( + "sort" "time" "github.com/akhilrex/hammond/db" @@ -15,6 +16,9 @@ func GetMileageByVehicleId(vehicleId string, since time.Time) (mileage []models. fillups := make([]db.Fillup, len(*data)) copy(fillups, *data) + sort.Slice(fillups, func(i, j int) bool { + return fillups[i].OdoReading > fillups[j].OdoReading + }) var mileages []models.MileageModel diff --git a/ui/public/hammond.png b/ui/public/hammond.png index 537318b..df48b56 100644 Binary files a/ui/public/hammond.png and b/ui/public/hammond.png differ diff --git a/ui/public/index.html b/ui/public/index.html index b5daafa..06ccc59 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -5,6 +5,7 @@ + <%= webpackConfig.name %> diff --git a/ui/public/touch-icon.png b/ui/public/touch-icon.png new file mode 100644 index 0000000..1afeb19 Binary files /dev/null and b/ui/public/touch-icon.png differ diff --git a/ui/src/router/views/settings.vue b/ui/src/router/views/settings.vue index 6f67fdc..4f94c7e 100644 --- a/ui/src/router/views/settings.vue +++ b/ui/src/router/views/settings.vue @@ -181,7 +181,7 @@ export default { - +
Current Version2021.08.132021.09.20
Website