feat: refs #5216 changeState

This commit is contained in:
Sergio De la torre 2024-10-16 13:45:53 +02:00
parent d7ca5c3e08
commit 937b06c198
2 changed files with 8 additions and 4 deletions

View File

@ -182,11 +182,13 @@ class LoadUnloadFragment(
for (l in list) { for (l in list) {
mlist.add( mlist.add(
ExpeditionSalix( ExpeditionSalix(
expeditionFk = l.id, stateCode = if (l.code != state && l.code != "FOUND") { expeditionFk = l.id,
stateCode = if (l.code != state && l.code != "FOUND" && l.code != "DELIVERED") {
"LOST" "LOST"
} else { } else {
l.code l.code
}, isScanned = l.isScanned },
isScanned = l.isScanned
) )
) )
} }
@ -459,7 +461,9 @@ class LoadUnloadFragment(
binding.expeditionloadunloadRecyclerview.layoutManager = binding.expeditionloadunloadRecyclerview.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false) LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
binding.mainToolbar.toolbarSubtitle.text = getString( binding.mainToolbar.toolbarSubtitle.text = getString(
R.string.summaryCount, myList.filter { it.code == state }.size, myList.size R.string.summaryCount,
myList.filter { it.code == state || it.code == "DELIVERED" }.size,
myList.size
) )
setListPosition(myList) setListPosition(myList)

View File

@ -152,7 +152,7 @@ class SummaryFragment(
) { ) {
val listExpedition = list.filter { it.addressFk == address }.map { l -> val listExpedition = list.filter { it.addressFk == address }.map { l ->
ExpeditionSalix( ExpeditionSalix(
expeditionFk = l.id, stateCode = if (l.code == state) { expeditionFk = l.id, stateCode = if (l.code == state && l.code != "DELIVERED") {
state state
} else { } else {
"FOUND" "FOUND"