Compare commits

...

3 Commits

Author SHA1 Message Date
Azat Sagutdinov
5455fef624 Функционал механика ч.6 2024-06-06 16:48:12 +03:00
Azat Sagutdinov
eea1b4d4f3 Функционал механика ч.5 2024-06-04 16:17:38 +03:00
Azat Sagutdinov
0392253128 Функционал механика ч.4 2024-05-27 17:32:01 +03:00
46 changed files with 933 additions and 107 deletions

View File

@ -290,6 +290,7 @@
<string name="title_task_number">Номер задания</string> <string name="title_task_number">Номер задания</string>
<string name="status">Статус</string> <string name="status">Статус</string>
<string name="main">Проведение измерения</string> <string name="main">Проведение измерения</string>
<string name="tech">Проведение Тех. осмотра</string>
<string name="message_select_route">Выберите путевой лист или задание</string> <string name="message_select_route">Выберите путевой лист или задание</string>

View File

@ -285,6 +285,7 @@
<string name="title_task_number">Номер задания</string> <string name="title_task_number">Номер задания</string>
<string name="status">Статус</string> <string name="status">Статус</string>
<string name="main">Проведение измерения</string> <string name="main">Проведение измерения</string>
<string name="tech">Проведение Тех. осмотра</string>
<string name="message_select_route">Выберите путевой лист или задание</string> <string name="message_select_route">Выберите путевой лист или задание</string>

View File

@ -335,7 +335,7 @@ interface ApiService {
fun update( fun update(
@Path("uniq_id") uuid: String, @Path("uniq_id") uuid: String,
@Part("uniq_id") uuidPart: RequestBody, @Part("uniq_id") uuidPart: RequestBody,
@Part("data") data: List<CheckupData>?, @Part("data") data: RequestBody?,
@Header("token") token: String? = "iddqd", @Header("token") token: String? = "iddqd",
@Header("Authorization") tokenUser: String? @Header("Authorization") tokenUser: String?
): Single<CheckupShowListResponse> ): Single<CheckupShowListResponse>

View File

@ -1 +1 @@
package ru.tele2med.mobile.data.api.entity.response import ru.tele2med.mobile.domain.entity.* data class CheckupShowListResponse( val af: String, val status: String, val message: String, val data: DataCheckupShow ) package ru.tele2med.mobile.data.api.entity.response import ru.tele2med.mobile.domain.entity.* data class CheckupShowListResponse( val af: String, val status: String, val message: String, val data: DataCheckListUpdate )

View File

@ -1,5 +1,6 @@
package ru.tele2med.mobile.data.repository package ru.tele2med.mobile.data.repository
import com.google.gson.Gson
import ru.tele2med.mobile.domain.repository.QRRepository import ru.tele2med.mobile.domain.repository.QRRepository
import ru.tele2med.mobile.presentation.util.Prefs import ru.tele2med.mobile.presentation.util.Prefs
import io.reactivex.Single import io.reactivex.Single
@ -109,20 +110,20 @@ class TechRepositoryImpl(
.map(dataConverter::toTechShow) .map(dataConverter::toTechShow)
override fun updateCheckList( override fun updateCheckList(
uniq_id: String,
id: String, id: String,
data: List<CheckupData> data: List<CheckupData>
): Single<CheckupShowList> = ): Single<CheckupShowList> =
apiService apiService
.update( .update(
uuid = id, uuid = uniq_id,
uuidPart = RequestBody.create( uuidPart = RequestBody.create(
MediaType.parse("text/plain"), id MediaType.parse("text/plain"), uniq_id
), ),
tokenUser = "Bearer ${prefs.getTokenUser().toString()}", tokenUser = "Bearer ${prefs.getTokenUser().toString()}",
data = data, data = RequestBody.create(MediaType.parse("text/plain"), Gson().toJson(data))
) )
.map(dataConverter::toCheckupShow) .map(dataConverter::toCheckupShow)
} }

View File

@ -51,7 +51,9 @@ import ru.tele2med.mobile.presentation.ui.menu.items.tech.TechPresenter
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.TechListPresenter import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.TechListPresenter
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.TechCheckupPresenter import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.TechCheckupPresenter
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.TechCheckupInfoPresenter import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.TechCheckupInfoPresenter
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.sign.SignPresenter
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.TechCheckupTestsPresenter import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.TechCheckupTestsPresenter
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test.TestPresenter
import ru.tele2med.mobile.presentation.ui.menu.items.tech.park.ParkPresenter import ru.tele2med.mobile.presentation.ui.menu.items.tech.park.ParkPresenter
import ru.tele2med.mobile.presentation.ui.models.UiConverter import ru.tele2med.mobile.presentation.ui.models.UiConverter
import ru.tele2med.mobile.presentation.ui.splash.SplashPresenter import ru.tele2med.mobile.presentation.ui.splash.SplashPresenter
@ -72,13 +74,21 @@ fun presenterModule() = Kodein.Module(name = "presenterModule") {
} }
bind() from factory { stringId: String -> bind() from factory { stringId: String ->
TechCheckupTestsPresenter(instance(), instance(), stringId) TechCheckupTestsPresenter(instance(), instance(), instance())
} }
bind() from provider { bind() from provider {
ParkPresenter(instance(), instance(), instance()) ParkPresenter(instance(), instance(), instance())
} }
bind() from provider {
TestPresenter(instance(), instance())
}
bind() from provider {
SignPresenter(instance(), instance())
}
bind() from provider { bind() from provider {
TechPresenter() TechPresenter()
@ -89,9 +99,6 @@ fun presenterModule() = Kodein.Module(name = "presenterModule") {
} }
bind() from provider { bind() from provider {
QrReviewPresenter(instance(), instance(), instance()) QrReviewPresenter(instance(), instance(), instance())
} }

View File

@ -4,5 +4,5 @@ data class CheckupShowList(
val af: String, val af: String,
val status: String, val status: String,
val message: String, val message: String,
val data: DataCheckupShow val data: DataCheckListUpdate
) )

View File

@ -0,0 +1,13 @@
package ru.tele2med.mobile.domain.entity
data class DataCheckListUpdate(
val count_all: String,
val count_checked: Int?,
val check_positive: Int?,
val check_negative: Int?,
val exam_state_description: String?,
val exam_state: Int?,
val exam_state_name: String?
)

View File

@ -9,6 +9,7 @@ data class DataTech(
val waybill_uuid: String, val waybill_uuid: String,
val waybill_name: String, val waybill_name: String,
val organization_id: String, val organization_id: String,
val organization_name: String,
val mechanic_id: String, val mechanic_id: String,
val mechanic_name: String, val mechanic_name: String,
val result_id: String, val result_id: String,

View File

@ -29,9 +29,11 @@ class TechInteractor(
techRepository.showTech(id) techRepository.showTech(id)
fun updateCheckList( fun updateCheckList(
uniq_id: String,
id: String, id: String,
data: List<CheckupData> data: List<CheckupData>
): Single<CheckupShowList> = ): Single<CheckupShowList> =
techRepository.showCheckup(id, data) techRepository.updateCheckList(uniq_id, id, data)
} }

View File

@ -19,6 +19,7 @@ interface TechRepository {
): Single<TechShowList> ): Single<TechShowList>
fun updateCheckList( fun updateCheckList(
uniq_id: String,
id: String, id: String,
data: List<CheckupData> data: List<CheckupData>
): Single<CheckupShowList> ): Single<CheckupShowList>

View File

@ -1,5 +1,6 @@
package ru.tele2med.mobile.presentation.router package ru.tele2med.mobile.presentation.router
import ru.tele2med.mobile.domain.entity.CheckupShowList
import ru.tele2med.mobile.domain.entity.DataQR import ru.tele2med.mobile.domain.entity.DataQR
import ru.tele2med.mobile.domain.entity.DataShow import ru.tele2med.mobile.domain.entity.DataShow
import ru.tele2med.mobile.domain.entity.DataTech import ru.tele2med.mobile.domain.entity.DataTech
@ -124,8 +125,12 @@ class NavRouter : Router() {
navigateTo(NavScreens.getTechCheckup(dataTech)) navigateTo(NavScreens.getTechCheckup(dataTech))
} }
fun openTestCheckupScreen(test: DataShow) { fun openTestCheckupScreen(test: DataShow, uniq_id: String, dataTech: DataTech, checkupShowList: CheckupShowList?) {
navigateTo(NavScreens.getTestCheckup(test)) navigateTo(NavScreens.getTestCheckup(test, uniq_id, dataTech, checkupShowList?: null))
}
fun openSignScreen(dataTech: DataTech) {
navigateTo(NavScreens.getSign(dataTech))
} }
fun openMedicalCheckupsScreen() { fun openMedicalCheckupsScreen() {

View File

@ -1,5 +1,6 @@
package ru.tele2med.mobile.presentation.router package ru.tele2med.mobile.presentation.router
import ru.tele2med.mobile.domain.entity.CheckupShowList
import ru.tele2med.mobile.domain.entity.DataQR import ru.tele2med.mobile.domain.entity.DataQR
import ru.tele2med.mobile.domain.entity.DataShow import ru.tele2med.mobile.domain.entity.DataShow
import ru.tele2med.mobile.domain.entity.DataTech import ru.tele2med.mobile.domain.entity.DataTech
@ -41,6 +42,7 @@ import ru.tele2med.mobile.presentation.ui.menu.items.stats.StatsScreen
import ru.tele2med.mobile.presentation.ui.menu.items.status.StatusesScreen import ru.tele2med.mobile.presentation.ui.menu.items.status.StatusesScreen
import ru.tele2med.mobile.presentation.ui.menu.items.tech.TechScreen import ru.tele2med.mobile.presentation.ui.menu.items.tech.TechScreen
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.TechCheckupScreen import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.TechCheckupScreen
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.sign.SignScreen
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test.TestScreen import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test.TestScreen
import ru.tele2med.mobile.presentation.ui.menu.items.tonometr.TonScreen import ru.tele2med.mobile.presentation.ui.menu.items.tonometr.TonScreen
@ -95,7 +97,9 @@ object NavScreens {
fun getTechCheckup(dataTech: DataTech): TechCheckupScreen = TechCheckupScreen(dataTech) fun getTechCheckup(dataTech: DataTech): TechCheckupScreen = TechCheckupScreen(dataTech)
fun getTestCheckup(test: DataShow): TestScreen = TestScreen(test) fun getTestCheckup(test: DataShow, uniq_id: String, dataTech: DataTech, checkupShowList: CheckupShowList?): TestScreen = TestScreen(test, uniq_id, dataTech, checkupShowList)
fun getSign(dataTech: DataTech): SignScreen = SignScreen(dataTech)
fun getTechCheckupInfo(dataTech: DataTech): TechCheckupScreen = TechCheckupScreen(dataTech) fun getTechCheckupInfo(dataTech: DataTech): TechCheckupScreen = TechCheckupScreen(dataTech)

View File

@ -47,6 +47,7 @@ abstract class BaseFragment : MvpAppCompatFragment(), BaseView, KodeinAware {
override fun showLoading() { override fun showLoading() {
progressDialog?.dismiss() progressDialog?.dismiss()
progressDialog = null
progressDialog = ProgressDialog.show(activity, null, getString(R.string.loading), true) progressDialog = ProgressDialog.show(activity, null, getString(R.string.loading), true)
} }

View File

@ -240,6 +240,7 @@ class DrawerAdapter(
ScreenType.TASKS_FOR_TODAY -> image.setImageResource(R.drawable.ic_rectangle) ScreenType.TASKS_FOR_TODAY -> image.setImageResource(R.drawable.ic_rectangle)
ScreenType.NOTIFICATIONS -> image.setImageResource(R.drawable.ic_rectangle) ScreenType.NOTIFICATIONS -> image.setImageResource(R.drawable.ic_rectangle)
ScreenType.MAIN -> image.setImageResource(R.drawable.ic_rectangle) ScreenType.MAIN -> image.setImageResource(R.drawable.ic_rectangle)
ScreenType.TECH -> image.setImageResource(R.drawable.ic_rectangle)
ScreenType.STATUS -> image.setImageResource(R.drawable.ic_rectangle) ScreenType.STATUS -> image.setImageResource(R.drawable.ic_rectangle)
ScreenType.HISTORY -> image.setImageResource(R.drawable.ic_rectangle) ScreenType.HISTORY -> image.setImageResource(R.drawable.ic_rectangle)
ScreenType.CHAT -> image.setImageResource(R.drawable.ic_rectangle) ScreenType.CHAT -> image.setImageResource(R.drawable.ic_rectangle)

View File

@ -363,11 +363,42 @@ class DrawerPresenter(
listOf( listOf(
defaultHeader, defaultHeader,
ListItem( /* ListItem(
ScreenType.MAIN, ScreenType.MAIN,
true, true,
R.string.main, R.string.main,
header = true header = true
), */
ListItem(
ScreenType.REVIEW,
false,
R.string.review_toolbar,
header = true
),
ListItem(
ScreenType.SETTING,
false,
R.string.settings_toolbar,
header = true
)
// ButtonItem
// ButtonItem
)
private var listTechCheckup: List<DrawerItem> =
listOf(
defaultHeader,
ListItem(
ScreenType.TECH,
true,
R.string.tech,
header = true
), ),
@ -391,6 +422,7 @@ class DrawerPresenter(
) )
override fun onFirstViewAttach() { override fun onFirstViewAttach() {
super.onFirstViewAttach() super.onFirstViewAttach()
disposable += changes disposable += changes
@ -416,7 +448,12 @@ class DrawerPresenter(
} else { } else {
viewState.showList(listB) viewState.showList(listB)
} }
} else { }
if (screenType == ScreenType.MAIN) {
viewState.showList(listTechCheckup)
}
else {
if (prefs.getLcMenu() == "true") { if (prefs.getLcMenu() == "true") {
viewState.showList(listCoordinatesA) viewState.showList(listCoordinatesA)
} else { } else {

View File

@ -14,6 +14,7 @@ enum class ScreenType {
WITHOUT_BORDER, WITHOUT_BORDER,
SELECT_ROUTE, SELECT_ROUTE,
QR, QR,
TECH,
PRINT, PRINT,
DASHBOARD, DASHBOARD,
SELECT_TASK, SELECT_TASK,

View File

@ -230,8 +230,13 @@ class MenuActivity : BaseDrawerActivity(), MenuView {
override fun onResumeFragments() { override fun onResumeFragments() {
navigationHolder.setNavigator(navigator) navigationHolder.setNavigator(navigator)
if (webSocketClient.isClosed) { if (webSocketClient.isClosed) {
try {
webSocketClient.connect() webSocketClient.connect()
} }
catch (e: Exception) {
Log.v("LOG", "e = ${e.message}")
}
}
super.onResumeFragments() super.onResumeFragments()
} }
@ -330,6 +335,7 @@ class MenuActivity : BaseDrawerActivity(), MenuView {
settings.setOnClickListener { settings.setOnClickListener {
presenter.onSettingsClick() presenter.onSettingsClick()
} }
} }

View File

@ -16,7 +16,7 @@ import ru.tele2med.mobile.presentation.util.providePresenter
class TechFragment : BaseMenuFragment(), TechView { class TechFragment : BaseMenuFragment(), TechView {
override val screenType: ScreenType override val screenType: ScreenType
get() = ScreenType.TASKS_FOR_TODAY get() = ScreenType.TECH
@InjectPresenter @InjectPresenter
lateinit var presenter: TechPresenter lateinit var presenter: TechPresenter

View File

@ -53,7 +53,7 @@ class TechListAdapter(
fun bind(list: DataTechCheckup) { fun bind(list: DataTechCheckup) {
carName.text = list.vehicle_name carName.text = list.vehicle_name
time.text = list.datetime time.text = list.datetime_
//fio.text = list.fio //fio.text = list.fio
status.text = list.exam_state_name status.text = list.exam_state_name
/* eye.setImageDrawable( /* eye.setImageDrawable(

View File

@ -5,7 +5,10 @@ import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import com.arellomobile.mvp.presenter.InjectPresenter import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter import com.arellomobile.mvp.presenter.ProvidePresenter
import com.google.gson.Gson
import kotlinx.android.synthetic.main.fragment_medical_checkup.*
import kotlinx.android.synthetic.main.fragment_tech_list.* import kotlinx.android.synthetic.main.fragment_tech_list.*
import kotlinx.android.synthetic.main.fragment_tech_list.refresh
import ru.tele2med.mobile.R import ru.tele2med.mobile.R
import ru.tele2med.mobile.presentation.ui.auth.AuthActivity import ru.tele2med.mobile.presentation.ui.auth.AuthActivity
import ru.tele2med.mobile.presentation.ui.base.BasePresenter import ru.tele2med.mobile.presentation.ui.base.BasePresenter
@ -19,13 +22,15 @@ import kotlinx.android.synthetic.main.toolbar_with_help.*
import org.jetbrains.anko.clearTask import org.jetbrains.anko.clearTask
import org.jetbrains.anko.intentFor import org.jetbrains.anko.intentFor
import org.jetbrains.anko.newTask import org.jetbrains.anko.newTask
import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.domain.entity.DataTechCheckup import ru.tele2med.mobile.domain.entity.DataTechCheckup
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.TechCheckupTestsFragment
class TechListFragment : BaseMenuFragment(), TechListView { class TechListFragment : BaseMenuFragment(), TechListView {
override val screenType: ScreenType override val screenType: ScreenType
get() = ScreenType.HELLO get() = ScreenType.TECH
@InjectPresenter @InjectPresenter
lateinit var presenter: TechListPresenter lateinit var presenter: TechListPresenter
@ -92,12 +97,29 @@ class TechListFragment : BaseMenuFragment(), TechListView {
} }
recyclerView.addOnScrollListener(scrollListener) recyclerView.addOnScrollListener(scrollListener)
initRecycler()
//setName() //setName()
setClickListeners() setClickListeners()
} }
override fun setRefreshing(flag: Boolean) {
println("setRefreshing = $flag")
refresh.isRefreshing = flag
}
private fun initRecycler() {
println("initRecycler")
refresh.setOnRefreshListener {
println("setOnRefreshListener")
presenter.getCheckups()
}
}
override fun showCheckups(list: List<DataTechCheckup>) { override fun showCheckups(list: List<DataTechCheckup>) {
adapter.submitList(list) adapter.submitList(list)

View File

@ -63,6 +63,14 @@ class TechListPresenter(
) )
.map(uiConverter::toUiTechCheckups) .map(uiConverter::toUiTechCheckups)
.ioToMain() .ioToMain()
.doOnSubscribe {
viewState.showLoading()
}
.doAfterTerminate {
viewState.hideLoading()
viewState.setRefreshing(false)
}
.baseLoadingHandle() .baseLoadingHandle()
.baseHandleErrorSubscribe { .baseHandleErrorSubscribe {
currentCheckups.addAll(it.data) currentCheckups.addAll(it.data)

View File

@ -1,5 +1,7 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list package ru.tele2med.mobile.presentation.ui.menu.items.tech.list
import com.arellomobile.mvp.viewstate.strategy.AddToEndSingleStrategy
import com.arellomobile.mvp.viewstate.strategy.StateStrategyType
import ru.tele2med.mobile.domain.entity.DataCheckup import ru.tele2med.mobile.domain.entity.DataCheckup
import ru.tele2med.mobile.domain.entity.DataTechCheckup import ru.tele2med.mobile.domain.entity.DataTechCheckup
import ru.tele2med.mobile.presentation.ui.base.BaseView import ru.tele2med.mobile.presentation.ui.base.BaseView
@ -7,4 +9,8 @@ import ru.tele2med.mobile.presentation.ui.base.BaseView
interface TechListView : BaseView { interface TechListView : BaseView {
fun showCheckups(list: List<DataTechCheckup>) fun showCheckups(list: List<DataTechCheckup>)
@StateStrategyType(AddToEndSingleStrategy::class)
fun setRefreshing(flag: Boolean)
} }

View File

@ -7,6 +7,10 @@ import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter import com.arellomobile.mvp.presenter.ProvidePresenter
import com.google.gson.Gson import com.google.gson.Gson
import kotlinx.android.synthetic.main.fragment_tasks.* import kotlinx.android.synthetic.main.fragment_tasks.*
import kotlinx.android.synthetic.main.toolbar_with_help.*
import org.jetbrains.anko.clearTask
import org.jetbrains.anko.intentFor
import org.jetbrains.anko.newTask
import ru.tele2med.mobile.R import ru.tele2med.mobile.R
import ru.tele2med.mobile.domain.entity.DataTech import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.presentation.ui.base.BasePresenter import ru.tele2med.mobile.presentation.ui.base.BasePresenter
@ -19,7 +23,7 @@ import ru.tele2med.mobile.presentation.util.providePresenter
class TechCheckupFragment : BaseMenuFragment(), TechCheckupView { class TechCheckupFragment : BaseMenuFragment(), TechCheckupView {
override val screenType: ScreenType override val screenType: ScreenType
get() = ScreenType.TASKS_FOR_TODAY get() = ScreenType.TECH
@InjectPresenter @InjectPresenter
lateinit var presenter: TechCheckupPresenter lateinit var presenter: TechCheckupPresenter
@ -38,6 +42,12 @@ class TechCheckupFragment : BaseMenuFragment(), TechCheckupView {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
(activity as MenuActivity).apply { (activity as MenuActivity).apply {
var dataString = arguments?.getString(DATA_QR) var dataString = arguments?.getString(DATA_QR)
close.visibility = View.VISIBLE
close.setOnClickListener {
startActivity(intentFor<MenuActivity>().newTask().clearTask())
}
phone.visibility = View.GONE
settings.visibility = View.GONE
val gson = Gson() val gson = Gson()
val data = gson.fromJson(dataString, DataTech::class.java) val data = gson.fromJson(dataString, DataTech::class.java)

View File

@ -24,6 +24,9 @@ import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment
import ru.tele2med.mobile.presentation.util.providePresenter import ru.tele2med.mobile.presentation.util.providePresenter
import kotlinx.android.synthetic.main.fragment_tech_checkup.* import kotlinx.android.synthetic.main.fragment_tech_checkup.*
import kotlinx.android.synthetic.main.toolbar_with_help.* import kotlinx.android.synthetic.main.toolbar_with_help.*
import org.jetbrains.anko.clearTask
import org.jetbrains.anko.intentFor
import org.jetbrains.anko.newTask
import ru.tele2med.mobile.domain.entity.DataTech import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.presentation.ui.menu.items.medicalCheckup.MedicalCheckupFragment import ru.tele2med.mobile.presentation.ui.menu.items.medicalCheckup.MedicalCheckupFragment
@ -31,7 +34,7 @@ import ru.tele2med.mobile.presentation.ui.menu.items.medicalCheckup.MedicalCheck
class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView { class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
override val screenType: ScreenType override val screenType: ScreenType
get() = ScreenType.QR get() = ScreenType.TECH
@InjectPresenter @InjectPresenter
lateinit var presenter: TechCheckupInfoPresenter lateinit var presenter: TechCheckupInfoPresenter
@ -63,6 +66,12 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
is MenuActivity -> { is MenuActivity -> {
(activity as MenuActivity).apply { (activity as MenuActivity).apply {
// addDrawerToggle() // addDrawerToggle()
close.visibility = View.VISIBLE
close.setOnClickListener {
startActivity(intentFor<MenuActivity>().newTask().clearTask())
}
phone.visibility = View.GONE
settings.visibility = View.GONE
showOrHideHelpButton(false) showOrHideHelpButton(false)
title = "" title = ""
} }
@ -74,12 +83,25 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
Log.v("DATA", "data 32 = $DATA_QR") Log.v("DATA", "data 32 = $DATA_QR")
val gson = Gson() val gson = Gson()
val data = gson.fromJson(dataString, DataTech::class.java) val data = gson.fromJson(DATA_QR, DataTech::class.java)
signButton.setOnClickListener {
presenter.goToSign(data)
}
notTest.setOnClickListener {
presenter.goToSign(data)
}
startTest.setOnClickListener {
presenter.updateTech(data.uniq_id, data)
}
// tvDriverTitle.focusable // tvDriverTitle.focusable
// tvDriverTitle.requestFocus() // tvDriverTitle.requestFocus()
presenter.showCheckUp() presenter.showCheckUp(data.uniq_id)
initRecycler() initRecycler()
@ -93,38 +115,50 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
private fun initRecycler() { private fun initRecycler() {
println("initRecycler") println("initRecycler")
val args = arguments val args = requireArguments().getString(DATA_QR)
val index = args?.toString() // getString("data", "")
Log.v( Log.v(
"TechCheckupInfoFragment", "data = $index ${args?.getString("data")}" "TechCheckupInfoFragment", "Z $DATA_QR"
) )
Log.v("TechCheckupInfoFragment", "args = ${arguments?.getString("data")}")
val gson = Gson() val gson = Gson()
val data = gson.fromJson(DATA_QR, DataTech::class.java) val data = gson.fromJson(DATA_QR, DataTech::class.java)
fillData(data) fillData(data)
refresh.setOnRefreshListener { refresh.setOnRefreshListener {
println("setOnRefreshListener") println("setOnRefreshListener")
presenter.showCheckUp() presenter.showCheckUp(data.uniq_id)
} }
startTest.setOnClickListener {
presenter.updateTech(
data.uniq_id,
data.vehicle_id,
data.date_,
data.time_,
data.result_id
)
}
} }
@SuppressLint("StringFormatInvalid") @SuppressLint("StringFormatInvalid")
override fun fillData(dataTech: DataTech) { override fun fillData(dataTech: DataTech) {
when (dataTech.exam_state) {
"1" -> {
notTest.visibility = View.GONE
signButton.visibility = View.GONE
startTest.text = "Начать проверки"
}
"2" -> {
notTest.visibility = View.GONE
signButton.visibility = View.GONE
startTest.text = "Продолжить проверки"
}
"3" -> {
startTest.visibility = View.GONE
}
"4" -> {
startTest.visibility = View.GONE
notTest.visibility = View.GONE
signButton.visibility = View.GONE
}
else -> startTest.text = "Начать проверки"
}
println("СЕРВЕР = ${dataTech.mechanic_name}") println("СЕРВЕР = ${dataTech.mechanic_name}")
var profilePhoto: String var profilePhoto: String
var profilePhotoUrl: Uri var profilePhotoUrl: Uri
@ -135,7 +169,7 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
tvDriverNumber.text = dataTech.vehicle_name tvDriverNumber.text = dataTech.vehicle_name
tvDrivers.text = dataTech.mechanic_name tvDrivers.text = dataTech.mechanic_name
tvOrgName.text = dataTech.organization_id tvOrgName.text = dataTech.organization_name
tvNumberPL.text = dataTech.waybill_name tvNumberPL.text = dataTech.waybill_name
tvDatePL.text = dataTech.datetime tvDatePL.text = dataTech.datetime
@ -153,21 +187,22 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView {
private var DATA_QR = "DATA_QR" private var DATA_QR = "DATA_QR"
fun getInstance(data: DataTech): TechCheckupInfoFragment { fun getInstance(data: DataTech): TechCheckupInfoFragment {
Log.v("getInstance", "data DataTech = $data")
val gson = Gson() val gson = Gson()
val string: String = gson.toJson(data) val string: String = gson.toJson(data)
Log.v("COMP", "data = $data") DATA_QR = string
this.DATA_QR = string
return TechCheckupInfoFragment().also { return TechCheckupInfoFragment().also {
Log.v("COMP", "data2 = $data") DATA_QR = string
it.arguments = Bundle().apply { it.arguments = Bundle().apply {
Log.v("COMP", "data3 = $data")
putString(DATA_QR, string) putString(DATA_QR, string)
}
Log.v("COMP", "data4 = ${it.requireArguments().getString(DATA_QR)}")
} }
Log.v("getInstance", "data DataTech = ${it.requireArguments().getString(DATA_QR)}")
}
} }

View File

@ -5,32 +5,47 @@ import com.arellomobile.mvp.InjectViewState
import com.google.gson.Gson import com.google.gson.Gson
import ru.tele2med.mobile.presentation.ui.base.BasePresenter import ru.tele2med.mobile.presentation.ui.base.BasePresenter
import ru.tele2med.mobile.presentation.ui.base.entity.RestApiCodes import ru.tele2med.mobile.presentation.ui.base.entity.RestApiCodes
import ru.tele2med.mobile.presentation.util.Prefs
import ru.tele2med.mobile.presentation.util.ioToMain import ru.tele2med.mobile.presentation.util.ioToMain
import io.reactivex.rxkotlin.plusAssign import io.reactivex.rxkotlin.plusAssign
import ru.tele2med.mobile.data.api.entity.exception.ApiException import ru.tele2med.mobile.data.api.entity.exception.ApiException
import ru.tele2med.mobile.domain.entity.DataTech import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.domain.interactor.TechInteractor import ru.tele2med.mobile.domain.interactor.TechInteractor
import ru.tele2med.mobile.presentation.router.NavRouter
@InjectViewState @InjectViewState
class TechCheckupInfoPresenter( class TechCheckupInfoPresenter(
private val techInteractor: TechInteractor, private val techInteractor: TechInteractor,
private val prefs: Prefs, private val navRouter: NavRouter,
private val stringId: String private val stringId: String
) : BasePresenter<TechCheckupInfoView>() { ) : BasePresenter<TechCheckupInfoView>() {
fun onRefresh() { override fun onFirstViewAttach() {
super.onFirstViewAttach()
Log.v(
"LOG",
"onFirstViewAttach in TechCheckupInfoPresenter"
)
} }
fun updateTech(id: String, vehicleId: String, date: String, time: String, resultId: String) { fun goToSign(dataTech: DataTech) {
Log.v( Log.v(
"LOG", "LOG",
"it id = $id, vehicleId = $vehicleId date = $date, time = $time, resultId = $resultId" "goToSign carName = ${dataTech.vehicle_name}"
)
navRouter.openSignScreen(dataTech)
}
fun updateTech(uniq_id: String, dataTech: DataTech) {
Log.v(
"LOG",
"showTech uniq_id = $uniq_id,"
) )
disposable += techInteractor disposable += techInteractor
.updateTech(id, vehicleId, date, time, resultId) .showTech(uniq_id)
.ioToMain() .ioToMain()
.doOnSubscribe { .doOnSubscribe {
Log.v("LOG", "it 2 = $it") Log.v("LOG", "it 2 = $it")
@ -38,9 +53,12 @@ class TechCheckupInfoPresenter(
} }
.doAfterTerminate { .doAfterTerminate {
viewState.hideLoading() viewState.hideLoading()
} }
.subscribe({ .subscribe({ it ->
Log.v("LOG", "it = $it ${it.message}") var test = it.data.data.first()
navRouter.openTestCheckupScreen(test, uniq_id, dataTech, null)
}, { }, {
if (it is ApiException) { if (it is ApiException) {
@ -52,16 +70,18 @@ class TechCheckupInfoPresenter(
this.handleError(it) this.handleError(it)
} }
}) })
} }
fun showCheckUp(id: String) {
fun showCheckUp() {
val gson = Gson() val gson = Gson()
val data = gson.fromJson(stringId, DataTech::class.java) val data = gson.fromJson(stringId, DataTech::class.java)
println("data RoleName = ${data}") println("data RoleName = ${id}")
get(id)
// viewState.fillData(data) // viewState.fillData(data)
viewState.setRefreshing(false) //viewState.setRefreshing(false)
} }
fun get(code: String) { fun get(code: String) {
@ -77,7 +97,7 @@ class TechCheckupInfoPresenter(
viewState.hideLoading() viewState.hideLoading()
} }
.subscribe({ .subscribe({
viewState.fillData(it.data)
}, { }, {
if (it is ApiException) { if (it is ApiException) {

View File

@ -0,0 +1,118 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.sign
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.util.Log
import android.view.View
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import com.google.gson.Gson
import kotlinx.android.synthetic.main.fragment_checkup_test.*
import kotlinx.android.synthetic.main.fragment_checkup_test.falseBtn
import kotlinx.android.synthetic.main.fragment_checkup_test.trueBtn
import kotlinx.android.synthetic.main.fragment_checkup_test.tvComment
import kotlinx.android.synthetic.main.fragment_checkup_test.tvStatusName
import kotlinx.android.synthetic.main.fragment_checkup_test.tvTestName
import kotlinx.android.synthetic.main.fragment_sign.*
import ru.tele2med.mobile.R
import ru.tele2med.mobile.domain.entity.DataShow
import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.presentation.ui.base.BasePresenter
import ru.tele2med.mobile.presentation.ui.drawer.entity.ScreenType
import ru.tele2med.mobile.presentation.ui.menu.MenuActivity
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment
import ru.tele2med.mobile.presentation.util.providePresenter
class SignFragment : BaseMenuFragment(), SignView {
override val screenType: ScreenType
get() = ScreenType.TECH
@InjectPresenter
lateinit var presenter: SignPresenter
private var errorDialog: androidx.appcompat.app.AlertDialog? = null
@ProvidePresenter
fun initPresenter(): SignPresenter = providePresenter()
override fun getPresenter(): BasePresenter<*>? = presenter
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
(activity as MenuActivity).apply {
addDrawerToggle()
title = getString(R.string.test_toolbar)
}
// val args = arguments
// val data = args?.toString() // getString("data", "")
Log.v("TestFragment", "args = ${arguments?.getString(TEST)}")
val gson = Gson()
var stringTech = arguments?.getString(TECH)
val dataTech = gson.fromJson(stringTech, DataTech::class.java)
fillData(dataTech)
}
private fun fillData(data: DataTech) {
Log.v("TestFragment", "data = data.name = ${data.vehicle_name}")
tvCarName.text = data.vehicle_name
tvResult.text = data.result_name?: ""
signBtn.setOnClickListener {
presenter.sign(data)
}
}
override fun toBack() {
activity?.onBackPressed()
}
private fun actions(data: DataShow, uniq_id: String, dataTech: DataTech) {
trueBtn.setOnClickListener {
presenter.setValue(uniq_id, data.uniq_id, data, "1", dataTech)
}
falseBtn.setOnClickListener {
presenter.setValue(uniq_id, data.uniq_id, data, "0", dataTech)
}
}
override val layoutId: Int
get() = R.layout.fragment_sign
companion object {
private var TEST = "TEST"
private var UNIQ_ID = "UNIQ_ID"
private var TECH = "TECH"
fun getInstance(dataTech: DataTech): SignFragment {
val gson = Gson()
val stringTech: String = gson.toJson(dataTech)
TECH = stringTech
return SignFragment().also {
it.arguments = Bundle().apply {
putString(TECH, stringTech)
}
}
}
}
}

View File

@ -0,0 +1,125 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.sign
import android.util.Log
import com.arellomobile.mvp.InjectViewState
import io.reactivex.rxkotlin.plusAssign
import ru.tele2med.mobile.data.api.entity.exception.ApiException
import ru.tele2med.mobile.domain.entity.CheckupData
import ru.tele2med.mobile.domain.entity.DataShow
import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.domain.entity.Position
import ru.tele2med.mobile.domain.interactor.TechInteractor
import ru.tele2med.mobile.presentation.router.NavRouter
import ru.tele2med.mobile.presentation.ui.base.entity.RestApiCodes
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuPresenter
import ru.tele2med.mobile.presentation.util.ioToMain
@InjectViewState
class SignPresenter(
private val techInteractor: TechInteractor,
private val navRouter: NavRouter,
) : BaseMenuPresenter<SignView>() {
private var position: Position? = null
override fun onFirstViewAttach() {
super.onFirstViewAttach()
}
fun sign(dataTech: DataTech) {
Log.v("SIGN", "Подписание с данными ${dataTech.vehicle_name}")
}
fun setValue(
uniq_id: String,
id: String,
dataShow: DataShow,
value: String,
dataTech: DataTech
) {
var checkup = CheckupData(id, dataShow.name ?: "", value, dataShow.type_id ?: "")
var data: List<CheckupData> = listOf(checkup)
Log.v("LOG", "it checkup = $uniq_id, data = $data")
disposable += techInteractor
.updateCheckList(uniq_id, id, data)
.ioToMain()
.doOnSubscribe {
Log.v("LOG", "it 2 = $it")
viewState.showLoading()
}
.doAfterTerminate {
viewState.hideLoading()
// viewState.toBack()
}
.subscribe({
Log.v("LOG", "it = $it ${it.data}")
showTech(uniq_id, dataTech)
}, {
if (it is ApiException) {
if (it.code == RestApiCodes.NotFound.code) {
} else {
this.handleError(it)
}
} else {
this.handleError(it)
}
})
//router.openPhoneEnterScreen()
}
fun showTech(uniq_id: String, dataTech: DataTech) {
Log.v(
"LOG",
"showTech uniq_id = $uniq_id,"
)
disposable += techInteractor
.showTech(uniq_id)
.ioToMain()
.doOnSubscribe {
Log.v("LOG", "it 2 = $it")
viewState.showLoading()
}
.doAfterTerminate {
viewState.hideLoading()
}
.subscribe({ it ->
Log.v("LOG", "showTech ${it.data.data}")
val newShowTech = mutableListOf<DataShow>()
it.data.data.forEach {
Log.v("LOG", "showTech forEach ${it}")
if ((it.value != "1") && (it.value != "0")) {
newShowTech.add(it)
Log.v("LOG", "showTech openTestCheckupScreen ${newShowTech}")
}
}
if (newShowTech.isNotEmpty()) {
navRouter.openTestCheckupScreen(newShowTech.first(), uniq_id, dataTech, null)
} else {
viewState.toBack()
}
// viewState.showCheckups(it.data.data)
}, {
if (it is ApiException) {
if (it.code == RestApiCodes.NotFound.code) {
} else {
this.handleError(it)
}
} else {
this.handleError(it)
}
})
}
}

View File

@ -0,0 +1,19 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.sign
import androidx.fragment.app.Fragment
import ru.tele2med.mobile.domain.entity.DataShow
import ru.tele2med.mobile.domain.entity.DataTech
import ru.terrakok.cicerone.android.support.SupportAppScreen
class SignScreen(val dataTech: DataTech) : SupportAppScreen() {
override fun getFragment(): Fragment {
return SignFragment.getInstance(
dataTech
)
}
override fun getScreenKey(): String {
return SignFragment::class.java.name
}
}

View File

@ -0,0 +1,18 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.sign
import com.arellomobile.mvp.viewstate.strategy.OneExecutionStateStrategy
import com.arellomobile.mvp.viewstate.strategy.SkipStrategy
import com.arellomobile.mvp.viewstate.strategy.StateStrategyType
import ru.tele2med.mobile.domain.entity.DataShow
import ru.tele2med.mobile.presentation.ui.base.BaseView
interface SignView : BaseView {
fun bindTest(test: DataShow) {
}
@StateStrategyType(OneExecutionStateStrategy::class)
fun toBack()
}

View File

@ -15,7 +15,6 @@ import com.arellomobile.mvp.presenter.ProvidePresenter
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.google.gson.Gson import com.google.gson.Gson
import com.squareup.picasso.Picasso import com.squareup.picasso.Picasso
import kotlinx.android.synthetic.main.fragment_tech_list.*
import ru.tele2med.mobile.R import ru.tele2med.mobile.R
import ru.tele2med.mobile.presentation.ui.base.BasePresenter import ru.tele2med.mobile.presentation.ui.base.BasePresenter
import ru.tele2med.mobile.presentation.ui.drawer.entity.ScreenType import ru.tele2med.mobile.presentation.ui.drawer.entity.ScreenType
@ -26,6 +25,9 @@ import ru.tele2med.mobile.presentation.util.providePresenter
import kotlinx.android.synthetic.main.fragment_test_list.* import kotlinx.android.synthetic.main.fragment_test_list.*
import kotlinx.android.synthetic.main.fragment_test_list.recyclerView import kotlinx.android.synthetic.main.fragment_test_list.recyclerView
import kotlinx.android.synthetic.main.toolbar_with_help.* import kotlinx.android.synthetic.main.toolbar_with_help.*
import org.jetbrains.anko.clearTask
import org.jetbrains.anko.intentFor
import org.jetbrains.anko.newTask
import ru.tele2med.mobile.domain.entity.* import ru.tele2med.mobile.domain.entity.*
import ru.tele2med.mobile.presentation.ui.common.EndlessRecyclerViewScrollListener import ru.tele2med.mobile.presentation.ui.common.EndlessRecyclerViewScrollListener
@ -51,7 +53,13 @@ class TechCheckupTestsFragment : BaseMenuFragment(), TechCheckupTestsView {
private val adapter: TestListAdapter by lazy { private val adapter: TestListAdapter by lazy {
TestListAdapter { test -> TestListAdapter { test ->
presenter.get(test) val gson = Gson()
presenter.get(
test,
gson.fromJson(DATA_QR, DataTech::class.java).uniq_id,
gson.fromJson(DATA_QR, DataTech::class.java)
)
} }
} }
@ -73,6 +81,12 @@ class TechCheckupTestsFragment : BaseMenuFragment(), TechCheckupTestsView {
} }
is MenuActivity -> { is MenuActivity -> {
(activity as MenuActivity).apply { (activity as MenuActivity).apply {
close.visibility = View.VISIBLE
close.setOnClickListener {
startActivity(intentFor<MenuActivity>().newTask().clearTask())
}
phone.visibility = View.GONE
settings.visibility = View.GONE
// addDrawerToggle() // addDrawerToggle()
showOrHideHelpButton(false) showOrHideHelpButton(false)
title = "" title = ""
@ -150,7 +164,10 @@ class TechCheckupTestsFragment : BaseMenuFragment(), TechCheckupTestsView {
putString(TechCheckupTestsFragment.DATA_QR, string) putString(TechCheckupTestsFragment.DATA_QR, string)
} }
Log.v("COMP", "data4 = ${it.requireArguments().getString(TechCheckupTestsFragment.DATA_QR)}") Log.v(
"COMP",
"data4 = ${it.requireArguments().getString(TechCheckupTestsFragment.DATA_QR)}"
)
} }
} }

View File

@ -40,12 +40,15 @@ class TechCheckupTestsPresenter(
} }
.doAfterTerminate { .doAfterTerminate {
viewState.hideLoading() viewState.hideLoading()
viewState.setRefreshing(false)
} }
.subscribe({ .subscribe({
viewState.hideLoading()
Log.v("LOG", "it = $it ${it.data.data}") Log.v("LOG", "it = $it ${it.data.data}")
viewState.showCheckups(it.data.data) viewState.showCheckups(it.data.data)
viewState.setRefreshing(false)
}, { }, {
if (it is ApiException) { if (it is ApiException) {
@ -59,9 +62,9 @@ class TechCheckupTestsPresenter(
}) })
} }
fun get(test: DataShow) { fun get(test: DataShow, uniq_id: String, dataTech: DataTech) {
println("TechCheckupTestsPresenter ${test.uniq_id}") println("TechCheckupTestsPresenter ${test.uniq_id}")
navRouter.openTestCheckupScreen(test) navRouter.openTestCheckupScreen(test, uniq_id, dataTech, null)
} }

View File

@ -1,29 +1,32 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test
import android.os.Bundle import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.util.Log import android.util.Log
import android.view.View import android.view.View
import com.arellomobile.mvp.presenter.InjectPresenter import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter import com.arellomobile.mvp.presenter.ProvidePresenter
import com.google.gson.Gson import com.google.gson.Gson
import kotlinx.android.synthetic.main.fragment_checkup_test.* import kotlinx.android.synthetic.main.fragment_checkup_test.*
import kotlinx.android.synthetic.main.toolbar_with_help.*
import org.jetbrains.anko.clearTask
import org.jetbrains.anko.intentFor
import org.jetbrains.anko.newTask
import ru.tele2med.mobile.R import ru.tele2med.mobile.R
import ru.tele2med.mobile.domain.entity.Data import ru.tele2med.mobile.domain.entity.CheckupShowList
import ru.tele2med.mobile.domain.entity.DataShow import ru.tele2med.mobile.domain.entity.DataShow
import ru.tele2med.mobile.domain.entity.DataTech import ru.tele2med.mobile.domain.entity.DataTech
import ru.tele2med.mobile.presentation.ui.base.BasePresenter import ru.tele2med.mobile.presentation.ui.base.BasePresenter
import ru.tele2med.mobile.presentation.ui.drawer.entity.ScreenType import ru.tele2med.mobile.presentation.ui.drawer.entity.ScreenType
import ru.tele2med.mobile.presentation.ui.menu.MenuActivity import ru.tele2med.mobile.presentation.ui.menu.MenuActivity
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuFragment
import ru.tele2med.mobile.presentation.ui.menu.items.result.ResFragment
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.TechCheckupFragment
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.info.TechCheckupInfoFragment
import ru.tele2med.mobile.presentation.util.providePresenter import ru.tele2med.mobile.presentation.util.providePresenter
class TestFragment : BaseMenuFragment(), TestView { class TestFragment : BaseMenuFragment(), TestView {
override val screenType: ScreenType override val screenType: ScreenType
get() = ScreenType.WITHOUT_BORDER get() = ScreenType.TECH
@InjectPresenter @InjectPresenter
lateinit var presenter: TestPresenter lateinit var presenter: TestPresenter
@ -41,23 +44,82 @@ class TestFragment : BaseMenuFragment(), TestView {
(activity as MenuActivity).apply { (activity as MenuActivity).apply {
addDrawerToggle() addDrawerToggle()
title = getString(R.string.test_toolbar) title = getString(R.string.test_toolbar)
close.visibility = View.VISIBLE
close.setOnClickListener {
activity?.onBackPressed()
}
} }
val args = arguments // val args = arguments
val data = args?.toString() // getString("data", "") // val data = args?.toString() // getString("data", "")
Log.v("TestFragment", "args = ${arguments?.getString("data")}") Log.v("TestFragment", "args = ${arguments?.getString(TEST)}")
val gson = Gson() val gson = Gson()
val dataTest = gson.fromJson(TEST, DataShow::class.java)
fillData(dataTest) var stringTech = arguments?.getString(TECH)
val dataTech = gson.fromJson(stringTech, DataTech::class.java)
if (arguments?.getString(TEST) == null) {
Handler(Looper.getMainLooper()).post {
presenter.toTech(dataTech)
// interact with ViewPager here
}
// toBack()
} else {
var dataString = arguments?.getString(TEST)
val data = gson.fromJson(dataString, DataShow::class.java)
var checkupShowList = arguments?.getString(CHECKUP)
val datacheckupShowList = gson.fromJson(checkupShowList, CheckupShowList::class.java)
var uniq_id = arguments?.getString(UNIQ_ID)
// val gson = Gson()
// val dataTest = gson.fromJson(TEST, DataShow::class.java)
fillData(data, datacheckupShowList)
actions(data, uniq_id ?: "", dataTech, datacheckupShowList)
}
} }
private fun fillData(data: DataShow) {
private fun fillData(data: DataShow, checkupShowList: CheckupShowList?) {
Log.v("TestFragment", "data = data.name = ${data.name}") Log.v("TestFragment", "data = data.name = ${data.name}")
tvTestName.text = data.name tvTestName.text = data.name
tvComment.text = data.comment
tvStatusName.text =
checkupShowList?.data?.exam_state_description ?: "Вопрос №${data.order.toInt() + 1}"
}
override fun toBack() {
activity?.onBackPressed()
}
private fun actions(
data: DataShow,
uniq_id: String,
dataTech: DataTech,
checkupShowList: CheckupShowList?
) {
skipBtn.setOnClickListener {
presenter.skipTech(uniq_id, dataTech, checkupShowList, data)
}
trueBtn.setOnClickListener {
presenter.setValue(uniq_id, data.uniq_id, data, "1", dataTech)
}
falseBtn.setOnClickListener {
presenter.setValue(uniq_id, data.uniq_id, data, "0", dataTech)
}
} }
@ -65,14 +127,35 @@ class TestFragment : BaseMenuFragment(), TestView {
get() = R.layout.fragment_checkup_test get() = R.layout.fragment_checkup_test
companion object { companion object {
private const val TEST = "TEST" private var TEST = "TEST"
private var UNIQ_ID = "UNIQ_ID"
private var TECH = "TECH"
private var CHECKUP = "CHECKUP"
fun getInstance(test: DataShow): TestFragment {
fun getInstance(
test: DataShow,
uniq_id: String,
dataTech: DataTech,
checkupShowList: CheckupShowList?
): TestFragment {
val gson = Gson() val gson = Gson()
val string: String = gson.toJson(test) val string: String = gson.toJson(test)
this.TEST = string
val stringTech: String = gson.toJson(dataTech)
this.TECH = stringTech
val checkupShowListCommon: String = gson.toJson(checkupShowList)
this.CHECKUP = checkupShowListCommon
return TestFragment().also { return TestFragment().also {
it.arguments = Bundle().apply { it.arguments = Bundle().apply {
putString(TEST, string) putString(TEST, string)
putString(UNIQ_ID, uniq_id)
putString(TECH, stringTech)
putString(CHECKUP, checkupShowListCommon)
} }
} }

View File

@ -1,26 +1,203 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test
import android.util.Log
import com.arellomobile.mvp.InjectViewState import com.arellomobile.mvp.InjectViewState
import ru.tele2med.mobile.domain.entity.Position import io.reactivex.rxkotlin.plusAssign
import ru.tele2med.mobile.domain.interactor.SosInteractor import ru.tele2med.mobile.data.api.entity.exception.ApiException
import ru.tele2med.mobile.presentation.Changes import ru.tele2med.mobile.domain.entity.*
import ru.tele2med.mobile.domain.interactor.TechInteractor
import ru.tele2med.mobile.presentation.router.NavRouter import ru.tele2med.mobile.presentation.router.NavRouter
import ru.tele2med.mobile.presentation.ui.base.entity.RestApiCodes
import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuPresenter import ru.tele2med.mobile.presentation.ui.menu.base.BaseMenuPresenter
import ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test.TestView import ru.tele2med.mobile.presentation.util.ioToMain
@InjectViewState @InjectViewState
class TestPresenter( class TestPresenter(
private val sosInteractor: SosInteractor, private val techInteractor: TechInteractor,
private val navRouter: NavRouter, private val navRouter: NavRouter
private val changes: Changes
) : BaseMenuPresenter<TestView>() { ) : BaseMenuPresenter<TestView>() {
private var position: Position? = null private var position: Position? = null
override fun onFirstViewAttach() { override fun onFirstViewAttach() {
super.onFirstViewAttach() super.onFirstViewAttach()
}
fun toTech(dataTech: DataTech) {
navRouter.openTechCheckupScreen(dataTech)
} }
fun setValue(
uniq_id: String,
id: String,
dataShow: DataShow,
value: String,
dataTech: DataTech
) {
var checkup = CheckupData(id, dataShow.name ?: "", value, dataShow.type_id ?: "")
var data: List<CheckupData> = listOf(checkup)
Log.v("LOG", "it checkup = $uniq_id, data = $data")
disposable += techInteractor
.updateCheckList(uniq_id, id, data)
.ioToMain()
.doOnSubscribe {
Log.v("LOG", "it 2 = $it")
// viewState.showLoading()
}
.doAfterTerminate {
viewState.hideLoading()
// viewState.toBack()
}
.subscribe({
Log.v("LOG", "it = $it ${it.data}")
if (it.data.count_checked != it.data.count_all.toInt()) {
showTech(uniq_id, dataTech, it, dataShow)
} else {
viewState.toBack()
}
}, {
if (it is ApiException) {
if (it.code == RestApiCodes.NotFound.code) {
} else {
this.handleError(it)
}
} else {
this.handleError(it)
}
})
//router.openPhoneEnterScreen()
}
fun showTech(
uniq_id: String,
dataTech: DataTech,
checkupShowList: CheckupShowList?,
dataShow: DataShow
) {
Log.v(
"LOG",
"showTech uniq_id = $uniq_id,"
)
disposable += techInteractor
.showTech(uniq_id)
.ioToMain()
.doOnSubscribe {
Log.v("LOG", "it 2 = $it")
viewState.showLoading()
}
.doAfterTerminate {
viewState.hideLoading()
}
.subscribe({ it ->
Log.v("LOG", "showTech ${it.data.data}")
val newShowTech = mutableListOf<DataShow>()
it.data.data.forEach {
Log.v("LOG", "showTech forEach ${it}")
if ((it.value != "1") && (it.value != "0") && (it.id != dataShow.id)) {
newShowTech.add(it)
Log.v("LOG", "showTech openTestCheckupScreen ${newShowTech}")
}
}
if (newShowTech.isNotEmpty()) {
navRouter.openTestCheckupScreen(
newShowTech.first(),
uniq_id,
dataTech,
checkupShowList
)
} else {
viewState.toBack()
}
// viewState.showCheckups(it.data.data)
}, {
if (it is ApiException) {
if (it.code == RestApiCodes.NotFound.code) {
} else {
this.handleError(it)
}
} else {
this.handleError(it)
}
})
}
fun skipTech(
uniq_id: String,
dataTech: DataTech,
checkupShowList: CheckupShowList?,
dataShow: DataShow
) {
Log.v(
"LOG",
"skipTech uniq_id = $uniq_id,"
)
disposable += techInteractor
.showTech(uniq_id)
.ioToMain()
.doOnSubscribe {
Log.v("LOG", "it 2 = $it")
// viewState.showLoading()
}
.doAfterTerminate {
viewState.hideLoading()
}
.subscribe({ it ->
Log.v("LOG", "skipTech ${it.data.data}")
val newShowTech = mutableListOf<DataShow>()
for (i in 0 until it.data.data.size) {
if (it.data.data[i] == dataShow) {
if (i+1 != it.data.data.size) {
navRouter.openTestCheckupScreen(
it.data.data[i + 1],
uniq_id,
dataTech,
null
)
}
else {
navRouter.openTestCheckupScreen(
it.data.data[0],
uniq_id,
dataTech,
null
)
}
}
}
}, {
if (it is ApiException) {
if (it.code == RestApiCodes.NotFound.code) {
} else {
this.handleError(it)
}
} else {
this.handleError(it)
}
})
}
} }

View File

@ -1,13 +1,15 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import ru.tele2med.mobile.domain.entity.CheckupShowList
import ru.tele2med.mobile.domain.entity.DataShow import ru.tele2med.mobile.domain.entity.DataShow
import ru.tele2med.mobile.domain.entity.DataTech
import ru.terrakok.cicerone.android.support.SupportAppScreen import ru.terrakok.cicerone.android.support.SupportAppScreen
class TestScreen(val test: DataShow) : SupportAppScreen() { class TestScreen(val test: DataShow, val uniq_id: String, val dataTech: DataTech, val checkupShowList: CheckupShowList?) : SupportAppScreen() {
override fun getFragment(): Fragment { override fun getFragment(): Fragment {
return TestFragment.getInstance(test) return TestFragment.getInstance(test, uniq_id, dataTech, checkupShowList)
} }
override fun getScreenKey(): String { override fun getScreenKey(): String {

View File

@ -1,5 +1,6 @@
package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test
import com.arellomobile.mvp.viewstate.strategy.OneExecutionStateStrategy
import com.arellomobile.mvp.viewstate.strategy.SkipStrategy import com.arellomobile.mvp.viewstate.strategy.SkipStrategy
import com.arellomobile.mvp.viewstate.strategy.StateStrategyType import com.arellomobile.mvp.viewstate.strategy.StateStrategyType
import ru.tele2med.mobile.domain.entity.DataShow import ru.tele2med.mobile.domain.entity.DataShow
@ -8,7 +9,10 @@ import ru.tele2med.mobile.presentation.ui.base.BaseView
interface TestView : BaseView { interface TestView : BaseView {
fun bindTest(test: DataShow) { fun bindTest(test: DataShow) {
} }
@StateStrategyType(OneExecutionStateStrategy::class)
fun toBack()
} }

View File

@ -14,7 +14,7 @@ import ru.tele2med.mobile.presentation.util.providePresenter
class ParkFragment : BaseMenuFragment(), ParkView { class ParkFragment : BaseMenuFragment(), ParkView {
override val screenType: ScreenType override val screenType: ScreenType
get() = ScreenType.WITHOUT_BORDER get() = ScreenType.TECH
@InjectPresenter @InjectPresenter
lateinit var presenter: ParkPresenter lateinit var presenter: ParkPresenter

View File

@ -36,6 +36,18 @@
android:layout_marginEnd="20dp" android:layout_marginEnd="20dp"
tools:visibility="visible" tools:visibility="visible"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
app:layout_constraintEnd_toStartOf="@+id/close"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/close"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_marginEnd="20dp"
android:layout_marginTop="10dp"
android:visibility="gone"
android:src="@drawable/ic_xmark_solid"
tools:visibility="visible"
app:layout_constraintEnd_toStartOf="@+id/settings" app:layout_constraintEnd_toStartOf="@+id/settings"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -51,6 +63,8 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView <ImageView
android:id="@+id/logo" android:id="@+id/logo"
android:layout_width="188dp" android:layout_width="188dp"

View File

@ -37,9 +37,22 @@
android:layout_marginEnd="20dp" android:layout_marginEnd="20dp"
android:src="@drawable/ic_help_green" android:src="@drawable/ic_help_green"
android:visibility="gone" android:visibility="gone"
app:layout_constraintEnd_toStartOf="@+id/close"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/close"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_marginTop="10dp"
tools:visibility="visible"
android:layout_marginEnd="20dp"
android:src="@drawable/ic_xmark_solid"
android:visibility="gone"
app:layout_constraintEnd_toStartOf="@+id/settings" app:layout_constraintEnd_toStartOf="@+id/settings"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView <ImageView
android:id="@+id/settings" android:id="@+id/settings"
android:layout_width="26dp" android:layout_width="26dp"

View File

@ -213,10 +213,12 @@
<TextView <TextView
android:id="@+id/tvStatusName" android:id="@+id/tvStatusName"
style="@style/BlockValueTitleStyle" style="@style/BlockValueStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Проверка 0 из 0" android:text="Проверка 0 из 0"
android:layout_marginBottom="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvStatusInfoTitle" /> app:layout_constraintTop_toBottomOf="@id/tvStatusInfoTitle" />

View File

@ -76,7 +76,6 @@
app:layout_constraintTop_toTopOf="@id/checkupsBody"> app:layout_constraintTop_toTopOf="@id/checkupsBody">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -90,6 +89,7 @@
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:text="Путевой лист:" android:text="Путевой лист:"
android:visibility="gone"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -171,6 +171,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Номер ПЛ" android:text="Номер ПЛ"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/divider4" /> app:layout_constraintTop_toBottomOf="@+id/divider4" />
<TextView <TextView
@ -178,6 +179,7 @@
style="@style/BlockValueStyle" style="@style/BlockValueStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/tvNumberPLTitle" app:layout_constraintTop_toBottomOf="@id/tvNumberPLTitle"
tools:text="23" /> tools:text="23" />
@ -186,6 +188,7 @@
style="@style/BlockValueDividerStyle" style="@style/BlockValueDividerStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/tvNumberPL" /> app:layout_constraintTop_toBottomOf="@id/tvNumberPL" />
<TextView <TextView
@ -194,6 +197,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Дата ПЛ" android:text="Дата ПЛ"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/divider5" /> app:layout_constraintTop_toBottomOf="@+id/divider5" />
<TextView <TextView
@ -201,6 +205,7 @@
style="@style/BlockValueStyle" style="@style/BlockValueStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/tvDatePLTitle" app:layout_constraintTop_toBottomOf="@id/tvDatePLTitle"
tools:text="18.04.2024" /> tools:text="18.04.2024" />
@ -212,9 +217,6 @@
app:layout_constraintTop_toBottomOf="@id/tvDatePL" /> app:layout_constraintTop_toBottomOf="@id/tvDatePL" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
@ -224,17 +226,42 @@
android:id="@+id/startTest" android:id="@+id/startTest"
android:layout_width="200dp" android:layout_width="200dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/btn_rounded_blue"
android:text="Начать проверки" android:text="Начать проверки"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="12sp" android:textSize="12sp"
android:background="@drawable/btn_rounded_blue"
android:layout_marginTop="16dp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cvMainInfoContainer" /> app:layout_constraintTop_toBottomOf="@+id/cvMainInfoContainer" />
<Button
android:id="@+id/signButton"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/btn_rounded_blue"
android:text="Допустить и подписать"
android:textColor="@color/white"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/startTest" />
<Button
android:id="@+id/notTest"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/btn_rounded_blue"
android:text="Не допустить и подписать"
android:textColor="@color/white"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/signButton" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
@ -246,7 +273,6 @@
app:layout_constraintTop_toBottomOf="@id/checkupsBody"> app:layout_constraintTop_toBottomOf="@id/checkupsBody">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -264,7 +290,7 @@
<TextView <TextView
android:id="@+id/tvStatusName" android:id="@+id/tvStatusName"
style="@style/BlockValueTitleStyle" style="@style/BlockValueStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="В работе" android:text="В работе"
@ -274,10 +300,12 @@
<TextView <TextView
android:id="@+id/tvStatusTest" android:id="@+id/tvStatusTest"
style="@style/BlockValueTitleStyle" style="@style/BlockValueStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="Продено 2 проверки" android:text="Продено 2 проверки"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvStatusName" /> app:layout_constraintTop_toBottomOf="@id/tvStatusName" />
@ -288,7 +316,6 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

View File

@ -7,6 +7,12 @@
android:orientation="vertical"> android:orientation="vertical">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/refresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView" android:id="@+id/recyclerView"
@ -17,6 +23,7 @@
android:clipToPadding="false" android:clipToPadding="false"
android:paddingTop="4dp" android:paddingTop="4dp"
tools:listitem="@layout/item_checkup" /> tools:listitem="@layout/item_checkup" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</RelativeLayout> </RelativeLayout>

View File

@ -10,8 +10,8 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:background="@color/white" android:layout_height="match_parent"
android:layout_height="match_parent"> android:background="@color/white">
<TextView <TextView
@ -26,8 +26,8 @@
android:id="@+id/ivEye" android:id="@+id/ivEye"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:visibility="gone"
app:layout_constraintEnd_toStartOf="@+id/tvStatus" app:layout_constraintEnd_toStartOf="@+id/tvStatus"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:src="@drawable/ic_green_eye" /> tools:src="@drawable/ic_green_eye" />
@ -36,9 +36,9 @@
android:id="@+id/ivBattery" android:id="@+id/ivBattery"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/tvFio" app:layout_constraintBottom_toBottomOf="@+id/tvFio"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:visibility="gone"
app:layout_constraintTop_toTopOf="@+id/tvFio" app:layout_constraintTop_toTopOf="@+id/tvFio"
tools:src="@drawable/ic_battery_low" /> tools:src="@drawable/ic_battery_low" />
@ -51,7 +51,7 @@
android:textColor="@color/gray_checkups" android:textColor="@color/gray_checkups"
android:textSize="18sp" android:textSize="18sp"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toBottomOf="@id/tvStatus"
tools:text="Х727ХХ716 (Aurus)" /> tools:text="Х727ХХ716 (Aurus)" />
<ImageView <ImageView

View File

@ -35,6 +35,18 @@
android:src="@drawable/ic_help_green" android:src="@drawable/ic_help_green"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/close"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
<ImageView
android:id="@+id/close"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_marginEnd="10dp"
android:src="@drawable/ic_xmark_solid"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/settings" app:layout_constraintEnd_toStartOf="@+id/settings"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" /> tools:visibility="visible" />

View File

@ -286,6 +286,7 @@
<string name="status">Статус</string> <string name="status">Статус</string>
<string name="main">Проведение измерения</string> <string name="main">Проведение измерения</string>
<string name="tech">Проведение Тех. осмотра</string>
<string name="message_select_route">Выберите путевой лист или задание</string> <string name="message_select_route">Выберите путевой лист или задание</string>
<string name="message_select_task">Выберите путевой лист</string> <string name="message_select_task">Выберите путевой лист</string>

View File

@ -286,6 +286,7 @@
<string name="status">Статус</string> <string name="status">Статус</string>
<string name="main">Проведение измерения</string> <string name="main">Проведение измерения</string>
<string name="tech">Проведение Тех. осмотра</string>
<string name="message_select_route">Выберите путевой лист или задание</string> <string name="message_select_route">Выберите путевой лист или задание</string>
<string name="message_select_task">Выберите путевой лист</string> <string name="message_select_task">Выберите путевой лист</string>