refs #5867 sendPDF
This commit is contained in:
parent
e501e6dc9b
commit
8e24c7d1ba
|
@ -77,6 +77,12 @@ interface SalixService {
|
||||||
fun getCollectionSalixLocal(
|
fun getCollectionSalixLocal(
|
||||||
): Call<List<CollectionTicket>>
|
): Call<List<CollectionTicket>>
|
||||||
|
|
||||||
|
@POST("routes/{id}/driver-route-email")
|
||||||
|
fun driverRouteEmail(
|
||||||
|
@Path("id") id: Number,
|
||||||
|
@Body params: Any
|
||||||
|
): Call<Any>
|
||||||
|
|
||||||
@POST("collections/{id}/getTickets")
|
@POST("collections/{id}/getTickets")
|
||||||
fun getCollectionTickets(
|
fun getCollectionTickets(
|
||||||
@Path("id") id: Number,
|
@Path("id") id: Number,
|
||||||
|
|
|
@ -218,7 +218,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
||||||
R.drawable.ic_eye_ui -> getString(R.string.icViewCollection)
|
R.drawable.ic_eye_ui -> getString(R.string.icViewCollection)
|
||||||
R.drawable.ic_collection -> getString(R.string.icViewCollection)
|
R.drawable.ic_collection -> getString(R.string.icViewCollection)
|
||||||
R.drawable.ic_ubicator_check -> getString(R.string.checkerUbication)
|
R.drawable.ic_ubicator_check -> getString(R.string.checkerUbication)
|
||||||
R.drawable.ic_delivery_truck -> "Abre la app de Reparto para escanear carga"
|
R.drawable.ic_delivery_truck -> getString(R.string.loadRoute)
|
||||||
R.drawable.ic_confirm -> getString(R.string.confirmDescription)
|
R.drawable.ic_confirm -> getString(R.string.confirmDescription)
|
||||||
|
|
||||||
R.drawable.camion -> getString(R.string.openLoadingConsignee)
|
R.drawable.camion -> getString(R.string.openLoadingConsignee)
|
||||||
|
@ -233,6 +233,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
||||||
R.drawable.ic_eye_inventory -> getString(R.string.inventoryShowParking)
|
R.drawable.ic_eye_inventory -> getString(R.string.inventoryShowParking)
|
||||||
R.drawable.ic_sort->getString(R.string.sortRouteSalix)
|
R.drawable.ic_sort->getString(R.string.sortRouteSalix)
|
||||||
R.drawable.ic_sign_ticket->getString(R.string.signed)
|
R.drawable.ic_sign_ticket->getString(R.string.signed)
|
||||||
|
R.drawable.ic_send-> getString(R.string.sendDriverRoute)
|
||||||
else -> {
|
else -> {
|
||||||
""
|
""
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,8 @@ class TicketsFragment(
|
||||||
|
|
||||||
}
|
}
|
||||||
listIcons.add(iconSigned)
|
listIcons.add(iconSigned)
|
||||||
listIcons.add(iconSend)
|
//Tarea 5867
|
||||||
|
//listIcons.add(iconSend)
|
||||||
listIcons.add(iconSettings)
|
listIcons.add(iconSettings)
|
||||||
|
|
||||||
// listIcons.add(iconSort)
|
// listIcons.add(iconSort)
|
||||||
|
|
|
@ -152,7 +152,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
|
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -187,7 +187,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
silex.expeditionState_add(expeditions, state)
|
silex.expeditionState_add(expeditions, state)
|
||||||
.enqueue(object : SilexCallback<Void>(context) {
|
.enqueue(object : SilexCallback<Void>(context) {
|
||||||
override fun onSuccess(response: Response<Void>) {
|
override fun onSuccess(response: Response<Void>) {
|
||||||
_responseStateAdd.value = ResponseItemVO(state,false,"",0)
|
_responseStateAdd.value = ResponseItemVO(state, false, "", 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
|
@ -196,7 +196,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||||
_responseStateList.value = ResponseItemVO("", true, t.message.toString(), 0)
|
_responseStateList.value = ResponseItemVO("", true, t.message.toString(), 0)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
|
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
//_routeList.value = RouteList()
|
//_routeList.value = RouteList()
|
||||||
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
|
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
|
||||||
//super.onError(t)
|
//super.onError(t)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -294,9 +294,29 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
// _clientTicketList.value = ClientTicketList()
|
// _clientTicketList.value = ClientTicketList()
|
||||||
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
|
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
|
||||||
// super.onError(t)
|
// super.onError(t)
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fun driverRouteEmail(
|
||||||
|
routeId: Long,
|
||||||
|
email:String
|
||||||
|
) {
|
||||||
|
salix.driverRouteEmail(id = routeId,hashMapOf("recipient" to email))
|
||||||
|
.enqueue(object : SilexCallback<Any>(context) {
|
||||||
|
|
||||||
|
override fun onSuccess(response: Response<Any>) {
|
||||||
|
|
||||||
|
_response.value = ResponseItemVO()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onError(t: Throwable) {
|
||||||
|
_response.value = ResponseItemVO()
|
||||||
|
super.onError(t)
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -399,13 +419,19 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
|
|
||||||
//Otro fallo
|
//Otro fallo
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
_responseSign.value = ResponseItemVO("", true, "Tickets:"+File(filePath).name + "→"+ t.message.toString(), 0)
|
_responseSign.value = ResponseItemVO(
|
||||||
// super.onError(t)
|
"",
|
||||||
|
true,
|
||||||
|
"Tickets:" + File(filePath).name + "→" + t.message.toString(),
|
||||||
|
0
|
||||||
|
)
|
||||||
|
// super.onError(t)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Fallo de red
|
//Fallo de red
|
||||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||||
_responseSign.value = ResponseItemVO("NetWork Error", true, t.message.toString(),0)
|
_responseSign.value =
|
||||||
|
ResponseItemVO("NetWork Error", true, t.message.toString(), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:layout_marginRight="2dp"
|
android:layout_marginRight="2dp"
|
||||||
android:contentDescription=""
|
android:contentDescription=""
|
||||||
android:tooltipText="Permite escanear expediciones del consigntario seleccionado"
|
android:tooltipText="@string/scanAddressSelected"
|
||||||
app:srcCompat="@drawable/camion" />
|
app:srcCompat="@drawable/camion" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
Loading…
Reference in New Issue