forked from mirrors/homebox
feat: items-editor (#5)
* format readme * update logo * format html * add logo to docs * repository for document and document tokens * add attachments type and repository * autogenerate types via scripts * use autogenerated types * attachment type updates * add insured and quantity fields for items * implement HasID interface for entities * implement label updates for items * implement service update method * WIP item update client side actions * check err on attachment * finish types for basic items editor * remove unused var * house keeping
This commit is contained in:
parent
fbc364dcd2
commit
95ab14b866
125 changed files with 15626 additions and 1791 deletions
|
@ -10,8 +10,8 @@ import (
|
|||
|
||||
func locationFactory() types.LocationCreate {
|
||||
return types.LocationCreate{
|
||||
Name: fk.RandomString(10),
|
||||
Description: fk.RandomString(100),
|
||||
Name: fk.Str(10),
|
||||
Description: fk.Str(100),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,14 +31,14 @@ func TestLocationRepository_Get(t *testing.T) {
|
|||
func TestLocationRepositoryGetAllWithCount(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
result, err := tRepos.Locations.Create(ctx, tGroup.ID, types.LocationCreate{
|
||||
Name: fk.RandomString(10),
|
||||
Description: fk.RandomString(100),
|
||||
Name: fk.Str(10),
|
||||
Description: fk.Str(100),
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
_, err = tRepos.Items.Create(ctx, tGroup.ID, types.ItemCreate{
|
||||
Name: fk.RandomString(10),
|
||||
Description: fk.RandomString(100),
|
||||
Name: fk.Str(10),
|
||||
Description: fk.Str(100),
|
||||
LocationID: result.ID,
|
||||
})
|
||||
|
||||
|
@ -74,8 +74,8 @@ func TestLocationRepository_Update(t *testing.T) {
|
|||
|
||||
updateData := types.LocationUpdate{
|
||||
ID: loc.ID,
|
||||
Name: fk.RandomString(10),
|
||||
Description: fk.RandomString(100),
|
||||
Name: fk.Str(10),
|
||||
Description: fk.Str(100),
|
||||
}
|
||||
|
||||
update, err := tRepos.Locations.Update(context.Background(), updateData)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue