Giter VIP home page Giter VIP logo

hammond's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hammond's Issues

Feature: Generic Fillup Import

I would like to provide a means to import csv, maybe even json, that allows the user to select which field from their import corresponds to the Hammond field.

I believe this would help solve #46 and #42 since the users will be able to map the fields in the UI.

Screen Shot 2023-04-15 at 7 40 54 AM
Screen Shot 2023-04-15 at 7 41 06 AM

Permanent solution for font awesome temporary fix

There is an error using fontawesome 6 icons in buefy, where their scale is off. I added a temporary solution for it in index.html, however, when the issue is resolved on buefy's end, the temporary fix should be removed from the project.

Imperial gallons (UK)

Could we add imperial gallons for MPG as well as US gallons, 4.54609 litres per gallon as this is what's used in UK. Two options to select milage, MPG US and MPG UK

thanks

Docker image for v0.0.4

Before creating a bug report please make sure you are using the latest docker image / code base.

Please complete the following information

  • Installation Type: Docker
  • Have you tried using the latest docker image / code base: yes

Describe the bug
Thanks for releasing v0.0.4 👍 I noticed that the Docker image tag v0.0.4 isn't available on Docker Hub, and it's because the image has failed to build: https://github.com/AlfHou/hammond/actions/runs/5592418036

I don't know anything about npm but hopefully it's just something to do with the dependency resolution

Update dependencies

Some of the dependencies are pretty outdated (for example npm which specifies version 10 which was released in 2018). There are also a lot of build warnings about deprecated packages. These dependencies should be updated.

Creating new user with role of 'test/test'

Before creating a bug report please make sure you are using the latest docker image / code base.

Please complete the following information

  • Installation Type: Docker
  • Have you tried using the latest docker image / code base yes

Describe the bug
Screenshot 2023-02-13 at 12 56 31

Expected behavior
Clearly defined roles, the ones I would image are:

  • ADMIN: Full access
  • Manager: Add / remove / manage vehicles
  • Write: Write details about cars
  • Read: only read

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Feature: Add a discount

I would like to see an option to add a discount in price and subtract it from the total amount.

Help needed - CSV import always fails

Hello,

This looks like a well maintained project and would like to self-host it. Got it up and running using docker image, but now I wish to import from some site I was using before (poraba.com).

I have all the data in csv but everytime I try to import I get an error (There was some issue with importing the file. Please check the error message). But log shows no error.

Can you provide a sample CSV that actually imports so I can edit mine with same column names, delimiter and proper values?

Find my latest csv attempt that failes to import here:

dataExport_4.csv

Thank you.

Unable to load WebUI

Not sure what is going on - I am using docker image on my Unraid server. About 2 days ago, everything worked fine. Today, i was not able to load UI anymore. I thought OK - maybe something went wrong with the docker image. I redownloaded image, no luck. Tried resotirng backup of database from few days ago (multiple versions) - no luck either.
I decided to spin new docker image - but issue remains - when I open web page, it is just blank.

This is all I get in logs:

2024/01/05 20:41:08 /config/hammond.db
2024/01/05 20:41:08 Config Dir:  /config
2024/01/05 20:41:08 Assets Dir:  /assets

2024/01/05 20:41:08 /api/db/migrations.go:39 record not found
[0.078ms] [rows:0] SELECT * FROM `migrations` WHERE name="2022_03_08_13_16_AddVIN" ORDER BY `migrations`.`id` LIMIT 1
ALTER TABLE vehicles ADD COLUMN vin text

2024/01/05 20:41:08 /api/db/migrations.go:42 duplicate column name: vin
[0.008ms] [rows:0] ALTER TABLE vehicles ADD COLUMN vin text
[GIN] 2024/01/05 - 20:41:16 | 200 |    1.740205ms |  192.168.88.154 | GET      "/api/system/status"
[GIN] 2024/01/05 - 20:46:10 | 304 |    1.354889ms |  192.168.88.154 | GET      "/"
[GIN] 2024/01/05 - 20:46:10 | 200 |    1.633959ms |  192.168.88.154 | GET      "/api/system/status"

I did not have any other updates.
I also noticed that docker image has been updated yesterday, so I tried to use version before that - alfhou/hammond:v0.0.21 but result is the same. i am clueless.

Anyone has any idea?

Allow deletion of users

Please complete the following information

  • Installation Type: Docker
  • Have you tried using the latest docker image / code base: yes

Describe the bug
Currently there is no way to delete users

To Reproduce
Steps to reproduce the behavior:

  1. Go to Admin > Users
  2. Try to delete user

Expected behavior
There should be a delete icon next to each user that allows an admin to remove users.

Introduce CI step for testing frontend

The CI step for testing the frontend was removed as there are some errors related to the mixing of package managers (see #11).
Once that's resolved the frontend testing step should be reintroduced.

Allow adding attachments to expense records

Before creating a bug report please make sure you are using the latest docker image / code base.

Please complete the following information

  • Installation Type: Docker
  • Have you tried using the latest docker image / code base: yes

Describe the bug
Currently there is no way to add an attachment to an expense record - we can only add files using the quick-entry.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Home > Add Expense
  2. Try to attach a file/attachment

Expected behavior
We should be able to add an attachment/screenshot of an invoice or expense document

Add locale setting

Now that we've added translations, there should be a way to switch language either in the settings or in the menu bar.

Error 422 creating a new user

Good night

I don't know if this happens to anyone else or if you have already found a solution, I have been searching to avoid repeating the issue.

When trying to create a new user it gives me error 422

TY

Error when importing Fuelly formatted CSV

I'm unable to import a "Fuelly" CSV and get the following error

2023/02/21 23:38:07 [Recovery] 2023/02/21 - 23:38:07 panic recovered:
No Locale Info Found
/go/pkg/mod/github.com/leekchan/[email protected]/unformatnumber.go:21 (0x9cd71a)
/api/service/fuellyImportService.go:66 (0x9d2152)
/api/service/importService.go:101 (0x9d4b05)
/api/controllers/import.go:22 (0x9dc60d)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x9b1cf9)
/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0x9b1ce0)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x9ed60b)
/api/main.go:68 (0x9ed5ed)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x9b1cf9)
/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0x9b1ce0)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x9b0dd3)
/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:241 (0x9b0d92)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x9a7589)
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489 (0x9a756f)
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445 (0x9a705b)
/usr/local/go/src/net/http/server.go:2887 (0x6b5b22)
/usr/local/go/src/net/http/server.go:1952 (0x6b0f4c)
/usr/local/go/src/runtime/asm_amd64.s:1371 (0x473e60)

This happens with either of the example exports from the akhilrex repo as well as my hand-formatted example from another app.

Using latest docker image

Mileage is empty

Before creating a bug report please make sure you are using the latest docker image / code base.

Please complete the following information

  • Installation Type: [Docker]
  • Have you tried using the latest docker image / code base [yes]

Describe the bug
A clear and concise description of what the bug is.

If I add fillups there is no mileage shown.
No matter what I am choosing (l/km etc.)

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
Rosa Rakete - Hammond

Additional context
Add any other context about the problem here.

Fix CI errors

We are currently getting error in our CI pipeline for testing the UI. We should take a deeper look why that is, and try to get it up and running

Feature Request - better fuel economy statistics

A suggestion. On the main vehicle details page, it would be good to have AVG fuel economy instead of "AVG Fillup QTY" which seems to be information that is not usefull.

Additionally, as fuel fillups are primarily used for cost and economy tracking why not display the tank fuel economy on each fillup row?

Feature request: Recurring Expenses for costs

Hi,

i would like to add recurring expenses which would make it much easier.
For example every year new tires, maintenance costs, insurances, planned fuel, etc.

So i also could add everything and could see what my car will cost me the next year/months.
So we can use the tool for planning future costs in the next months/years.

Feature: Average fuel consuption per 100 km

Just noticed that this is not calculated and it would be very useful information. To compare it with previous months for example. This are the data I get from current site I use to input my data:

image

Are any of this data already avaialable or can it be added?

Generic Import: dates are not shown in local time zone

I imported a list of my fillups. The time stamps are in Europe/Berlin time zone, but not designated as such.
After importing, any fillup less than 1h ( 2h in summer) from midnight shows as the wrong date in the ui.

The database seems (unsure about DST) to contain the UTC value, but the gui doesn’t show the value in my time zone.

sqlite:
|Total|c10d2a00-ea20-4f80-a232-01cfad6ad0f6|2022-10-21 22:26:00+02:00|euros (EUR)|1|Generic Import|

from csv i imported:
"2022-10-22 00:26:00"

Feature Request: Fuel Economy Displays for Summary Card and Details

Original by @KLMors3 from the original repo
Adding fuel economy based on users currency/fuel metric to the Summary card and Details page would be very beneficial for quick glances if the data is available.

I think the logic could be to subtract the second to the last complete fuel up (as marked by the "Tank Full" toggle) from the last complete fuel up, and then divide that amount traveled by the Last Fuel Qty.
If there is not concurrent complete fuel up data to calculate the last fuel economy it could simply say "NA" or "Partially Filled Up"
This method removes the need for a static fuel tank size to be stored

Here are Screenshots of what I had in mind.
image

I replaced the currency with AVG Fuel Economy as the currency is always static for my uses, so I don't need to know that info at a glance. Additionally, is it possible to limit the number length display to 5 characters? "AVG Fillup QTY" is longer than it needs to be.
image

I have mocked up what the details page could look like.
The "Fuel Economy" can be calculated like I mentioned above for each entry, and the "AVG Fuel Economy" is calculated by adding all of the completed fuel economy values and then dividing that number by the total completed amount of entries.
For example: 19.246+15.976+18.651 / 3 = "17.957"
image

CSV Import fails for decimals in price

I achivied to construct a standard CSV in order to import data from the APP "Ecodrive" where I have data from 8 years, simulating the file exported from Fuelly

Attached a screenshot about the problem. In the csv when I fix a value for a fuel price, allways the data is imported wihtout decimals. I tested several ways but no way

Ecodrive2Fuely.csv
image

Feature: External authentication support

It would be nice to be able to use an existing external authentication provider, especially valuable for anyone running their own SSO. Obviously this could take a few different forms but options I've seen from other projects include:

  • LDAP support for users
  • Support OIDC or SAML for logging in
  • Supporting header-based authentication for reverse proxied setups

Any of the above would allow users to take advantage of external providers and not have to have another separate account just for Hammond.

I understand that would be a lot of work, just haven't seen another request for this feature so thought I'd put it out there.

German Translation error

Please complete the following information

  • Installation Type: Docker
  • Have you tried using the latest docker image / code base: yes

Describe the bug
Deutsche Überetzung:
Das Feld "Hubraum" heißt ebenfalls "Jahr der Erstzulassung"

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Start'
  2. Scroll down to your Car
  3. Click on 'Details'
  4. Click on pen-button 'Bearbeiten Fahrzeug'

Expected behavior
Should be 'Hubraum in ccm' - the translation is correct, must be in the Code.

Screenshots

Bildschirmfoto 2023-01-27 um 08 18 26

Feature Request: Sanity check for difference of km in fill-ups

Hi!

As i imported my data i longed for some sanity checks.
i have some lost entries / rented out my car / have someone else fill up and not log the data, so the L/100km graph will show artifacts.

The app could show a greyed out row (missed fillup) when there’s a large difference (larger than the average distance between fillups) in km between two fill ups to show the user that we're probably missing some data here.
The user can then check the "missed fillup" field with a button "likely missed fillup. fix?"

[FEATURE REQUEST] Additional Database Support

From akhilrex#46
It would be nice if I could use a MariaDB/MySQL server instead of the SQLite database. I'm storing my data on a NAS, and IME SQLite doesn't play nicely with remote storage.

pascaliske akhilrex#46 (comment)

Hi @akhilrex, I saw you used gorm. Shouldn't it be relatively easy to support other DBs as gorm already has support for PSQL and whatnot? If I can find some spare time I'll try to put up a draft PR and do some tests. 😊

I'm happy to take a look at how we can use gorm to implement db support but not very experienced with go.

Feature: Archive/Hide vehicle

Please complete the following information

  • Installation Type: Docker
  • Have you tried using the latest docker image / code base: Yes

Describe the bug
It would be nice to be able to archive a vehicle. Currently there is no way to archive/hide a vehicle that may have been sold.

Year of manufacture duplicated

Before creating a bug report please make sure you are using the latest docker image / code base.

Please complete the following information

  • Installation Type: Docker
  • Have you tried using the latest docker image / code base yes

Describe the bug
When adding a vehicle year of manufacture is duplicated, I believe on the original version this was engine size

Untitled

Upgrading to Vue 3

Working on transitioning the UI to Vue 3, state management to pinia, and to Vite instead of webpack.

Reason:
Vue 2 is EOL as of Dec 31, 2023
Pinia simplifies state management
Vite allows for less dependencies and less setup.

Not able to use drivvo nor generic CSV for import

As title says, I am not able to import my fillups using neither drivvo nor generic CSV import option. I even have tried modifying csv output, left only 2 lines in it, changed decimal point from . to , but I always get generic error saying to check logs. Seeing these errors in docker:

2023/12/02 04:11:32 /api/service/userService.go:29
[0.752ms] [rows:2] SELECT * FROM `user_vehicles` WHERE `user_vehicles`.`user_id` = "21c16e1e-d186-49a4-adc7-495538da4493"

2023/12/02 04:11:32 /api/service/userService.go:29
[0.833ms] [rows:2] SELECT * FROM `vehicles` WHERE `vehicles`.`id` IN ("33d6cc9c-102f-4296-b99b-6b3a8e5c9a89","6cd88aff-dfca-455e-836e-daf39b1276b0")

2023/12/02 04:11:32 /api/service/userService.go:29
[2.590ms] [rows:1] SELECT * FROM `users` WHERE `ID` = "21c16e1e-d186-49a4-adc7-495538da4493" ORDER BY `users`.`id` LIMIT 1


2023/12/02 04:11:32 [Recovery] 2023/12/02 - 04:11:32 panic recovered:
time: missing Location in call to Date
/usr/local/go/src/time/time.go:1469 (0x4cea48)
/usr/local/go/src/time/format.go:1398 (0x4c896b)
/usr/local/go/src/time/format.go:1029 (0x4c672a)
/api/service/genericImportService.go:15 (0x97621e)
/api/service/importService.go:125 (0x977536)
/api/controllers/import.go:68 (0x97dbe9)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x953aa1)
/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0x953a8c)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x98ac63)
/api/main.go:69 (0x98ac4a)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x953aa1)
/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0x953a8c)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x952c06)
/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:241 (0x952be9)
/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x951cbd)
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489 (0x95196b)
/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445 (0x9514a4)
/usr/local/go/src/net/http/server.go:2936 (0x6bdb75)
/usr/local/go/src/net/http/server.go:1995 (0x6b9091)
/usr/local/go/src/runtime/asm_amd64.s:1598 (0x46f120)

[GIN] 2023/12/02 - 04:11:32 | 500 |   10.389503ms |  192.168.X.X | POST     "/api/import/generic"

My CSV is pretty basic, for instance just 2 lines:

"Tachometer (km)","Dátum","Palivo","Cena / L","Celková cena","Objem","Plná nádrž","Druhé palivo","Cena / L","Celková cena","Objem","Plná nádrž" 2,"Tretie palivo","Cena / L","Celková cena","Objem","Plná nádrž" 3,"Účinnosť paliva","Vzdialenosť","Čerpacia stanica","Vodič","Dôvod","Spôsob platby","Poznámky"
"79785.0","2023-11-27 14:08:51","Benzín","1.569","44.983","28.67","Áno","","0","0","0","Nie","","0","0","0","Nie","0 L/100km","","INE","Name Name","","",""
"79377.0","2023-11-15 23:41:38","Benzín","1.599","43.797","27.39","Áno","","0","0","0","Nie","","0","0","0","Nie","7,027 L/100km","408.0","INE","Name Name","","",""

And here the error:
image

REQ: branding

Please complete the following information

  • docker compose latest image

Describe the bug
After install, it would be nice to feel the branding of the organisations.
Could it be possible to upload a logo, or just change the name of the page?

Thanks for that great work!

Feature Request: Mulit Factor authentication

Would it be possible to add TOTP support?

This would add some security, as well as some peace of mind.

This allows login using Google Authenticator or other TOTP applications

Feature: Note to quick entry

When adding a quick entry an option to add a note.
When I take a picture of either the receipt or the pump, the odometer data is not included. You only see the amount of fuel and the price. I would like to add the odometer data to a quick entry photo with, for example, a note. Or if there is another way to solve the problem, please let me know.

TimeZone variable seems to be undefined when importing

running latest docker i experience issues upon using the generic import function

The parsing of the date fields fails with this error:

2023/09/18 22:21:17 [Recovery] 2023/09/18 - 22:21:17 panic recovered:
time: missing Location in call to Date
/usr/local/go/src/time/time.go:1469 (0x4cea48)
/usr/local/go/src/time/format.go:1398 (0x4c896b)
/usr/local/go/src/time/format.go:1029 (0x4c672a)
/api/service/genericImportService.go:15 (0x97621e)
/api/service/importService.go:125 (0x977536)
/api/controllers/import.go:68 (0x97dbe9)
....

it’s hard to find a description on how the csv fields have to be coded. I have this as a date field:
"2023-09-15T14:28:00.000Z" as have found that format in the code. It doesn’t look like that causes the problem here tough.
Occurs in firefox and chromium

Settle on one package manager

For some reason, the project uses both yarn and npm. These should not be mixed in a single project. Settle on one of them, and remove the other from the project.

Feature: Multiple different tanks

Hi, I have a car with gasoline/petrol with a GPL (LGP) system, so I would like to enter both the fill-up.
I normally put a full tank of GPL/LGP when it's almost empty, and I keep the gasoline/petrol tank between 1/4 and 2/4.
So I would like to be able to add another tank in a car to track different fuel type.

So after that i can see the km/l for the gpl/lpg and a different km/l statistic for the gasoline/petrol.

Feature Request: add additional info

Hi, I would like to be able to add additional info to my cars, things like wheel size, oil type, whiper size etc.

This could be either a semi custom table or a notes field

Update go verson

The version of go on the backend is 1.16. We should upgrade that to the newest avaliable

Feature: Notes Field

  • Installation Type: Docker
  • Have you tried using the latest docker image / code base?: Yes

Describe the bug
It would be nice to have a free-form text field to add notes to a vehicle. Currently there is no way to add a note.

Incorrect values calculated when submitting fill-up using different measurements than vehicle type (EG Liters VS Gallons)

Describe the bug

When vehicle type set to "Gallons", you are unable to enter a fill-up log with the fuel quantity value set to "Liters", If you do, the generated fuel economy graph gives implausible values.

To Reproduce

  • Go to 'create fillup'
  • Enter all details, and change the unit type from vehicle default to something else
  • Press submit

Expected behavior

The calculated fill value should be units X quantity and this should then be entered.

Additional context

This may be an outlying use case, but in the UK we measure our fuel economy in Miles per (imperial) gallon, but measure and pay for fuel in Liters and £ per litre (which is silly I know).

This means that the fuel economy screen on the vehicle summary shows Miles per Litre which is an unusual unit here.

I think a workaround is to change fuel unit under vehicle to "Gallons" to show MPG chart, then back to "Liters" for day to day filling, but I do not know if this has other implications.

Changing the fuel type after adding fill-ups only changes the graph labelling, so not a suitable workaround.

Feature: Describe how .csv should look like

I'm trying to import my own data (own SQL table) to Hammond, but I don't have a clue how the CSV should look like.

Maybe describe how the CSV should look like for an import (or maybe making 2 example CSV's in the repo), so people can modify/change/create their own CSV to import to the system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.