Merge branch 'master' of https://github.com/akhilrex/hammond
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
</a> -->
|
||||
|
||||
<h1 align="center" style="margin-bottom:0">Hammond</h1>
|
||||
<p align="center">Current Version - 2021.08.13</p>
|
||||
<p align="center">Current Version - 2021.09.20</p>
|
||||
|
||||
<p align="center">
|
||||
A self-hosted vehicle expense tracking system with support for multiple users.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" `
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 895 B |
@@ -5,6 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||
<link rel="shortcut icon" href="<%= webpackConfig.output.publicPath %>hammond.png" />
|
||||
<link rel="apple-touch-icon" href="<%= webpackConfig.output.publicPath %>touch-icon.png" />
|
||||
<title><%= webpackConfig.name %></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
BIN
ui/public/touch-icon.png
Normal file
BIN
ui/public/touch-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -181,7 +181,7 @@ export default {
|
||||
<table class="table is-hoverable">
|
||||
<tr>
|
||||
<td>Current Version</td>
|
||||
<td>2021.08.13</td>
|
||||
<td>2021.09.20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Website</td>
|
||||
|
||||
Reference in New Issue
Block a user