Merge branch 'master' into i18n
This commit is contained in:
13
.github/workflows/hub.yml
vendored
13
.github/workflows/hub.yml
vendored
@@ -1,8 +1,8 @@
|
||||
name: ci
|
||||
name: Build docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
multi:
|
||||
@@ -26,6 +26,9 @@ jobs:
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- name: Parse the git tag
|
||||
id: get_tag
|
||||
run: echo ::set-output name=TAG::$(echo $GITHUB_REF | cut -d / -f 3)
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
@@ -50,6 +53,6 @@ jobs:
|
||||
# cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
tags: |
|
||||
akhilrex/hammond:latest
|
||||
akhilrex/hammond:1.0.0
|
||||
akhilrex/hammond:${{ steps.get_tag.outputs.TAG }}
|
||||
ghcr.io/akhilrex/hammond:latest
|
||||
ghcr.io/akhilrex/hammond:1.0.0
|
||||
ghcr.io/akhilrex/hammond:${{ steps.get_tag.outputs.TAG }}
|
||||
|
||||
16
.github/workflows/test-go.yml
vendored
Normal file
16
.github/workflows/test-go.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
on: [push, pull_request]
|
||||
name: Test server
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.17.x, 1.18.x]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
- uses: actions/checkout@v3
|
||||
- run: go test ./...
|
||||
working-directory: server
|
||||
4
server/.gitignore
vendored
4
server/.gitignore
vendored
@@ -12,6 +12,10 @@
|
||||
*.out
|
||||
*.db
|
||||
|
||||
# MS VSCode
|
||||
.vscode
|
||||
__debug_bin
|
||||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
assets/*
|
||||
|
||||
@@ -60,6 +60,7 @@ type Vehicle struct {
|
||||
Base
|
||||
Nickname string `json:"nickname"`
|
||||
Registration string `json:"registration"`
|
||||
VIN string `json:"vin"`
|
||||
Make string `json:"make"`
|
||||
Model string `json:"model"`
|
||||
YearOfManufacture int `json:"yearOfManufacture"`
|
||||
|
||||
@@ -21,6 +21,11 @@ var migrations = []localMigration{
|
||||
{
|
||||
Name: "2021_02_07_00_09_LowerCaseEmails",
|
||||
Query: "update users set email=lower(email)",
|
||||
|
||||
},
|
||||
{
|
||||
Name: "2022_03_08_13_16_AddVIN",
|
||||
Query: "ALTER TABLE vehicles ADD COLUMN vin text",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ type SubItemQuery struct {
|
||||
type CreateVehicleRequest struct {
|
||||
Nickname string `form:"nickname" json:"nickname" binding:"required"`
|
||||
Registration string `form:"registration" json:"registration" binding:"required"`
|
||||
VIN string `form:"vin" json:"vin"`
|
||||
Make string `form:"make" json:"make" binding:"required"`
|
||||
Model string `form:"model" json:"model" binding:"required"`
|
||||
YearOfManufacture int `form:"yearOfManufacture" json:"yearOfManufacture"`
|
||||
|
||||
@@ -14,6 +14,7 @@ func CreateVehicle(model models.CreateVehicleRequest, userId string) (*db.Vehicl
|
||||
Nickname: model.Nickname,
|
||||
Registration: model.Registration,
|
||||
Model: model.Model,
|
||||
VIN: model.VIN,
|
||||
Make: model.Make,
|
||||
YearOfManufacture: model.YearOfManufacture,
|
||||
EngineSize: model.EngineSize,
|
||||
@@ -100,6 +101,7 @@ func UpdateVehicle(vehicleID string, model models.UpdateVehicleRequest) error {
|
||||
//return db.DB.Model(&toUpdate).Updates(db.Vehicle{
|
||||
toUpdate.Nickname = model.Nickname
|
||||
toUpdate.Registration = model.Registration
|
||||
toUpdate.VIN = model.VIN
|
||||
toUpdate.Model = model.Model
|
||||
toUpdate.Make = model.Make
|
||||
toUpdate.YearOfManufacture = model.YearOfManufacture
|
||||
|
||||
27415
ui/package-lock.json
generated
27415
ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,7 @@
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.27",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.12.1",
|
||||
"@fortawesome/vue-fontawesome": "0.1.9",
|
||||
"axios": "^0.27.0",
|
||||
"axios": "^0.27.2",
|
||||
"buefy": "^0.9.7",
|
||||
"chart.js": "^2.9.4",
|
||||
"core-js": "3.6.4",
|
||||
|
||||
@@ -47,6 +47,7 @@ export default {
|
||||
fuelUnit: null,
|
||||
fuelType: null,
|
||||
registration: '',
|
||||
vin: '',
|
||||
nickname: '',
|
||||
engineSize: null,
|
||||
make: '',
|
||||
@@ -58,6 +59,7 @@ export default {
|
||||
fuelUnit: veh.fuelUnit,
|
||||
fuelType: veh.fuelType,
|
||||
registration: veh.registration,
|
||||
vin: veh.vin,
|
||||
nickname: veh.nickname,
|
||||
engineSize: veh.engineSize,
|
||||
make: veh.make,
|
||||
@@ -137,6 +139,9 @@ export default {
|
||||
</b-field>
|
||||
<b-field :label="this.$t('registration') + `*`">
|
||||
<b-input v-model="vehicleModel.registration" type="text" expanded required></b-input>
|
||||
</b-field>
|
||||
<b-field label="VIN">
|
||||
<b-input v-model="vehicleModel.vin" type="text" expanded></b-input>
|
||||
</b-field>
|
||||
<b-field :label="this.$t('fueltype') + `*`">
|
||||
<b-select v-model.number="vehicleModel.fuelType" :placeholder="this.$t('fueltype')" required expanded>
|
||||
|
||||
24870
ui/yarn.lock
24870
ui/yarn.lock
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user