Sort available equipments by id in ascending order

This commit is contained in:
Keannu Bernasol 2024-01-07 12:20:22 +08:00
parent a685e3fcb5
commit 8810daa26c

View file

@ -138,7 +138,7 @@ export default function AddTransactionPage() {
<Autocomplete
multiple
id="equipment-autocomplete"
options={equipments.data || []}
options={equipments.data?.sort((a, b) => a.id - b.id) || []}
getOptionLabel={(option) =>
`${option.equipment_name} (ID:${option.id})`
}