Skip to content

Commit

Permalink
fix: various minor bugs (#384)
Browse files Browse the repository at this point in the history
* fix insufficiently large max height for cards

* fix listener for resetItemDateTimes

* support YYYY/MM/DD format for imports

* fix columns in docs

* use comma deliminator
  • Loading branch information
hay-kot committed Apr 1, 2023
1 parent f0b9a0f commit 6a853c0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions backend/app/api/handlers/v1/v1_ctrl_items.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ func (ctrl *V1Controller) HandleItemsExport() errchain.HandlerFunc {

w.Header().Set("Content-Type", "text/tsv")
w.Header().Set("Content-Disposition", "attachment;filename=homebox-items.tsv")

writer := csv.NewWriter(w)
writer.Comma = '\t'
return writer.WriteAll(csvData)
}
}
1 change: 1 addition & 0 deletions backend/internal/data/types/date.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func DateFromString(s string) Date {
try := [...]string{
"2006-01-02",
"01/02/2006",
"2006/01/02",
time.RFC3339,
}

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/import-csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ Below are the supported columns. They are case sensitive, can be in any ordered
| HB.notes | String (1000) | General notes about the product |
| HB.purchase_from | String | Name of the place the item was purchased from |
| HB.purchase_price | Float64 | |
| HB.purchase_at | Date | Date the item was purchased |
| HB.purchase_time | Date | Date the item was purchased |
| HB.lifetime_warranty | Boolean | true or false - case insensitive |
| HB.warranty_expires | Date | Date in the format |
| HB.warranty_details | String | Details about the warranty |
| HB.sold_to | String | Name of the person the item was sold to |
| HB.sold_at | Date | Date the item was sold |
| HB.sold_time | Date | Date the item was sold |
| HB.sold_price | Float64 | |
| HB.sold_notes | String (1000) | |

Expand Down
2 changes: 1 addition & 1 deletion frontend/components/Base/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>
<div
:class="{
'max-h-screen': !collapsed,
'max-h-[99999px]': !collapsed,
'max-h-0': collapsed,
}"
class="transition-[max-height] duration-200 overflow-hidden"
Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/tools.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
Ensures that all items in your inventory have a valid import_ref field. This is done by randomly generating
a 8 character string for each item that has an unset import_ref field.
</DetailAction>
<DetailAction @click="resetItemDateTimes">
<DetailAction @action="resetItemDateTimes">
<template #title> Zero Item Date Times</template>
Resets the time value for all date time fields in your inventory to the beginning of the date. This is to
fix a bug that was introduced early on in the development of the site that caused the time value to be
Expand Down

0 comments on commit 6a853c0

Please sign in to comment.