Add inventory item detail detail (basic)
This commit is contained in:
parent
05a376aea8
commit
c94c820efb
28 changed files with 490 additions and 77 deletions
|
|
@ -80,7 +80,7 @@ class ItemStore(
|
|||
throw JsonConversionException(root = exception)
|
||||
}
|
||||
}
|
||||
?.sortedWith(compareBy(Collator.getInstance()) { it.metadata.name })
|
||||
?.sortedWith(compareBy(Collator.getInstance()) { it.metadata.label })
|
||||
?: emptyList()
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ class ItemStore(
|
|||
code = APIResponse.ErrorCode.ItemId,
|
||||
)
|
||||
}
|
||||
if (item.metadata.name.isEmpty()) {
|
||||
if (item.metadata.label.isEmpty()) {
|
||||
throw BusinessException(
|
||||
message = "Item 'name' is a mandatory field.",
|
||||
code = APIResponse.ErrorCode.ItemName,
|
||||
|
|
@ -146,7 +146,7 @@ class ItemStore(
|
|||
}
|
||||
}
|
||||
.sortedWith(compareBy(Collator.getInstance()) {
|
||||
it.metadata.name
|
||||
it.metadata.label
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ class ItemStore(
|
|||
item.removeIf { it.id == id }
|
||||
}
|
||||
.sortedWith(compareBy(Collator.getInstance()) {
|
||||
it.metadata.name
|
||||
it.metadata.label
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue