Formateado código

This commit is contained in:
Sergio De la torre 2023-02-17 07:15:53 +01:00
parent 8abea66221
commit 19eaf275cd
2 changed files with 56 additions and 58 deletions

View File

@ -83,11 +83,8 @@
</select> </select>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Version 23.4Beta Buscar item, isScanned preparado"> <list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Activado impresion labelCount">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@ -99,7 +96,7 @@
<component name="CodeInsightWorkspaceSettings"> <component name="CodeInsightWorkspaceSettings">
<option name="optimizeImportsOnTheFly" value="true" /> <option name="optimizeImportsOnTheFly" value="true" />
</component> </component>
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[21114523025303]" /> <component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[C:\Users\sergiodt\.android\avd\Pixel_2_API_24.avd]" />
<component name="ExportToHTMLSettings"> <component name="ExportToHTMLSettings">
<option name="OPEN_IN_BROWSER" value="true" /> <option name="OPEN_IN_BROWSER" value="true" />
<option name="OUTPUT_DIRECTORY" value="C:\Program Files\Android\Android Studio\inspections" /> <option name="OUTPUT_DIRECTORY" value="C:\Program Files\Android\Android Studio\inspections" />
@ -392,13 +389,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1618825571576</updated> <updated>1618825571576</updated>
</task> </task>
<task id="LOCAL-00060" summary="Version 8.4.1Beta, strings y return finish">
<created>1653644047502</created>
<option name="number" value="00060" />
<option name="presentableId" value="LOCAL-00060" />
<option name="project" value="LOCAL" />
<updated>1653644047502</updated>
</task>
<task id="LOCAL-00061" summary="Version 8.4.1Beta,Tarea #3958"> <task id="LOCAL-00061" summary="Version 8.4.1Beta,Tarea #3958">
<created>1653663791334</created> <created>1653663791334</created>
<option name="number" value="00061" /> <option name="number" value="00061" />
@ -735,7 +725,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1674813532898</updated> <updated>1674813532898</updated>
</task> </task>
<option name="localTasksCounter" value="109" /> <task id="LOCAL-00109" summary="Activado impresion labelCount">
<created>1676562624750</created>
<option name="number" value="00109" />
<option name="presentableId" value="LOCAL-00109" />
<option name="project" value="LOCAL" />
<updated>1676562624751</updated>
</task>
<option name="localTasksCounter" value="110" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.History.Properties"> <component name="Vcs.Log.History.Properties">
@ -836,7 +833,6 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value="Version 9.2.1 Modificado fragment" />
<MESSAGE value="Version 9.2.1 Modificado fragment a fragment_general" /> <MESSAGE value="Version 9.2.1 Modificado fragment a fragment_general" />
<MESSAGE value="Version 9.2.1 añadido error encajado y modificado marcaje" /> <MESSAGE value="Version 9.2.1 añadido error encajado y modificado marcaje" />
<MESSAGE value="Version 9.2.1 en producción" /> <MESSAGE value="Version 9.2.1 en producción" />
@ -861,7 +857,8 @@
<MESSAGE value="Version 23.2-Fallo item_card" /> <MESSAGE value="Version 23.2-Fallo item_card" />
<MESSAGE value="Version 23.2 Modificado orden ubicador y revisión anterior falta activar icono" /> <MESSAGE value="Version 23.2 Modificado orden ubicador y revisión anterior falta activar icono" />
<MESSAGE value="Version 23.2 Modificado actualizar pantalla al transferir en Ubicador. Subida version" /> <MESSAGE value="Version 23.2 Modificado actualizar pantalla al transferir en Ubicador. Subida version" />
<option name="LAST_COMMIT_MESSAGE" value="Version 23.2 Modificado actualizar pantalla al transferir en Ubicador. Subida version" /> <MESSAGE value="Activado impresion labelCount" />
<option name="LAST_COMMIT_MESSAGE" value="Activado impresion labelCount" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>

View File

@ -57,7 +57,7 @@ class CollectionShowTicketFragment(
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
collection.collectionFk, collection.collectionFk,
getDataInt(SECTORFK), getDataInt(SECTORFK),
print="0", print = "0",
type type
) )
} }
@ -99,9 +99,9 @@ class CollectionShowTicketFragment(
binding.mainToolbar.toolbarIcons.adapter = binding.mainToolbar.toolbarIcons.adapter =
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener { ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) { override fun onOptionsItemSelected(item: Drawable) {
when (item){ when (item) {
iconPrint.drawable->print() iconPrint.drawable -> print()
iconViewCollection.drawable->getCollection() iconViewCollection.drawable -> getCollection()
} }
} }
@ -109,6 +109,7 @@ class CollectionShowTicketFragment(
binding.mainToolbar.toolbarIcons.layoutManager = binding.mainToolbar.toolbarIcons.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false) LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
} }
private fun getCollection() { private fun getCollection() {
binding.splashProgress.visibility = VISIBLE binding.splashProgress.visibility = VISIBLE
@ -125,7 +126,7 @@ class CollectionShowTicketFragment(
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
lastScanned, lastScanned,
getDataInt(SECTORFK), getDataInt(SECTORFK),
print="0", print = "0",
type type
) )
@ -139,23 +140,23 @@ class CollectionShowTicketFragment(
//tarea#4672 //tarea#4672
var isTicket = false var isTicket = false
for (t in collection.tickets) { for (t in collection.tickets) {
if (t.ticketFk.toInt()==(collection.collectionFk)) { if (t.ticketFk.toInt() == (collection.collectionFk)) {
isTicket = true isTicket = true
} }
} }
if (isTicket){ if (isTicket) {
val builder = AlertDialog.Builder(context) val builder = AlertDialog.Builder(context)
builder.setTitle(getString(R.string.selectLabeltoPrint)) builder.setTitle(getString(R.string.selectLabeltoPrint))
val labelCount = arrayOf("1", "2", "3", "4", "5","6","7","8","9","10") val labelCount = arrayOf("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")
builder.setItems(labelCount) { dialog, which -> builder.setItems(labelCount) { dialog, which ->
viewModel.collectionStickerPrint( viewModel.collectionStickerPrint(
collectionFk = collection.collectionFk, collectionFk = collection.collectionFk,
labelCount = (which+1) labelCount = (which + 1)
) )
} }
val dialog = builder.create() val dialog = builder.create()
dialog.show() dialog.show()
}else{ } else {
viewModel.collectionStickerPrint( viewModel.collectionStickerPrint(
collectionFk = collection.collectionFk, collectionFk = collection.collectionFk,
@ -166,6 +167,7 @@ class CollectionShowTicketFragment(
} }
} }
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
@ -179,7 +181,7 @@ class CollectionShowTicketFragment(
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
binding.scanInput.text.toString().toInt(), binding.scanInput.text.toString().toInt(),
getDataInt(SECTORFK), getDataInt(SECTORFK),
print="0", print = "0",
type type
) )
@ -203,7 +205,7 @@ class CollectionShowTicketFragment(
viewModel.collectionTicketGet( viewModel.collectionTicketGet(
collection.collectionFk, collection.collectionFk,
getDataInt(SECTORFK), getDataInt(SECTORFK),
print="0", print = "0",
type type
) )
binding.collectionSwipe.isRefreshing = false binding.collectionSwipe.isRefreshing = false
@ -234,7 +236,7 @@ class CollectionShowTicketFragment(
binding.mainToolbar.toolbarSubtitle.text = "0/0" binding.mainToolbar.toolbarSubtitle.text = "0/0"
} }
} else { } else {
ma.messageWithSound(it.errorMessage,it.isError,false) ma.messageWithSound(it.errorMessage, it.isError, false)
if (activity != null) requireActivity().onBackPressed() if (activity != null) requireActivity().onBackPressed()
} }
@ -249,7 +251,7 @@ class CollectionShowTicketFragment(
it.errorMessage, it.errorMessage,
it.isError, true it.isError, true
) )
}else{ } else {
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext()) (getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(requireContext())
} }
@ -293,7 +295,7 @@ class CollectionShowTicketFragment(
}, object : OnMistakeClickListener { }, object : OnMistakeClickListener {
override fun onMistakeClickListener(sale: SaleVO) { override fun onMistakeClickListener(sale: SaleVO) {
} }
},object : onPackingClickListener{ }, object : onPackingClickListener {
override fun onPackingClick(sale: SaleVO) { override fun onPackingClick(sale: SaleVO) {
} }
@ -320,7 +322,6 @@ class CollectionShowTicketFragment(
} }
private fun setTotalLines() { private fun setTotalLines() {
var totalMark = 0 var totalMark = 0
sales.forEach { sales.forEach {