mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-19 05:26:31 +00:00
fix: tree fixes (#252)
* use case insensitive sort * support new location selector in create item * fix incorrect date-time parsing logic
This commit is contained in:
parent
cbac17c059
commit
7b28973c60
3 changed files with 3 additions and 5 deletions
|
@ -280,7 +280,7 @@ func (lr *LocationRepository) Tree(ctx context.Context, GID uuid.UUID, tq TreeQu
|
|||
FROM location_tree
|
||||
ORDER BY level,
|
||||
node_type DESC, -- sort locations before items
|
||||
NAME;`
|
||||
lower(NAME)`
|
||||
|
||||
if tq.WithItems {
|
||||
itemQuery := `
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<BaseModal v-model="modal">
|
||||
<template #title> Create Item </template>
|
||||
<form @submit.prevent="create(true)">
|
||||
<FormSelect v-model="form.location" label="Location" :items="locations ?? []" />
|
||||
<LocationSelector v-model="form.location" />
|
||||
<FormTextField
|
||||
ref="locationNameRef"
|
||||
v-model="form.name"
|
||||
|
|
|
@ -26,9 +26,7 @@ export function parseDate<T>(obj: T, keys: Array<keyof T> = []): T {
|
|||
return;
|
||||
}
|
||||
|
||||
// Ensure date like format YYYY/MM/DD - otherwise results will be 1 day off
|
||||
const dateStr: string = result[key].split("T")[0].replace(/-/g, "/");
|
||||
result[key] = new Date(dateStr);
|
||||
result[key] = new Date(result[key]);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue