diff --git a/app/src/main/java/ru/tele2med/mobile/data/api/ApiService.kt b/app/src/main/java/ru/tele2med/mobile/data/api/ApiService.kt index c9d78fb..1b7f62a 100644 --- a/app/src/main/java/ru/tele2med/mobile/data/api/ApiService.kt +++ b/app/src/main/java/ru/tele2med/mobile/data/api/ApiService.kt @@ -335,7 +335,7 @@ interface ApiService { fun update( @Path("uniq_id") uuid: String, @Part("uniq_id") uuidPart: RequestBody, - @Part("data") data: List?, + @Part("data") data: RequestBody?, @Header("token") token: String? = "iddqd", @Header("Authorization") tokenUser: String? ): Single diff --git a/app/src/main/java/ru/tele2med/mobile/data/api/entity/response/CheckupShowListResponse.kt b/app/src/main/java/ru/tele2med/mobile/data/api/entity/response/CheckupShowListResponse.kt index 5c84b13..414acb3 100644 --- a/app/src/main/java/ru/tele2med/mobile/data/api/entity/response/CheckupShowListResponse.kt +++ b/app/src/main/java/ru/tele2med/mobile/data/api/entity/response/CheckupShowListResponse.kt @@ -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 ) \ No newline at end of file +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: List ) \ No newline at end of file diff --git a/app/src/main/java/ru/tele2med/mobile/data/repository/TechRepositoryImpl.kt b/app/src/main/java/ru/tele2med/mobile/data/repository/TechRepositoryImpl.kt index 33eb9d2..05fcb1c 100644 --- a/app/src/main/java/ru/tele2med/mobile/data/repository/TechRepositoryImpl.kt +++ b/app/src/main/java/ru/tele2med/mobile/data/repository/TechRepositoryImpl.kt @@ -1,5 +1,6 @@ package ru.tele2med.mobile.data.repository +import com.google.gson.Gson import ru.tele2med.mobile.domain.repository.QRRepository import ru.tele2med.mobile.presentation.util.Prefs import io.reactivex.Single @@ -109,20 +110,20 @@ class TechRepositoryImpl( .map(dataConverter::toTechShow) override fun updateCheckList( + uniq_id: String, id: String, data: List ): Single = apiService .update( - uuid = id, + uuid = uniq_id, uuidPart = RequestBody.create( - MediaType.parse("text/plain"), id + MediaType.parse("text/plain"), uniq_id ), tokenUser = "Bearer ${prefs.getTokenUser().toString()}", - data = data, + data = RequestBody.create(MediaType.parse("text/plain"), Gson().toJson(data)) ) .map(dataConverter::toCheckupShow) - } \ No newline at end of file diff --git a/app/src/main/java/ru/tele2med/mobile/di/module/presenterModule.kt b/app/src/main/java/ru/tele2med/mobile/di/module/presenterModule.kt index 21e1dd0..cc4d545 100644 --- a/app/src/main/java/ru/tele2med/mobile/di/module/presenterModule.kt +++ b/app/src/main/java/ru/tele2med/mobile/di/module/presenterModule.kt @@ -52,6 +52,7 @@ 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.info.TechCheckupInfoPresenter 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.models.UiConverter import ru.tele2med.mobile.presentation.ui.splash.SplashPresenter @@ -72,13 +73,16 @@ fun presenterModule() = Kodein.Module(name = "presenterModule") { } bind() from factory { stringId: String -> - TechCheckupTestsPresenter(instance(), instance(), stringId) + TechCheckupTestsPresenter(instance(), instance(), instance()) } bind() from provider { ParkPresenter(instance(), instance(), instance()) } + bind() from provider { + TestPresenter(instance(), instance()) + } bind() from provider { TechPresenter() diff --git a/app/src/main/java/ru/tele2med/mobile/domain/entity/CheckupShowList.kt b/app/src/main/java/ru/tele2med/mobile/domain/entity/CheckupShowList.kt index 48e62ea..ce9cf16 100644 --- a/app/src/main/java/ru/tele2med/mobile/domain/entity/CheckupShowList.kt +++ b/app/src/main/java/ru/tele2med/mobile/domain/entity/CheckupShowList.kt @@ -4,5 +4,5 @@ data class CheckupShowList( val af: String, val status: String, val message: String, - val data: DataCheckupShow + val data: List ) \ No newline at end of file diff --git a/app/src/main/java/ru/tele2med/mobile/domain/interactor/TechInteractor.kt b/app/src/main/java/ru/tele2med/mobile/domain/interactor/TechInteractor.kt index 6eda336..1f56cac 100644 --- a/app/src/main/java/ru/tele2med/mobile/domain/interactor/TechInteractor.kt +++ b/app/src/main/java/ru/tele2med/mobile/domain/interactor/TechInteractor.kt @@ -29,9 +29,11 @@ class TechInteractor( techRepository.showTech(id) fun updateCheckList( + uniq_id: String, id: String, data: List ): Single = - techRepository.showCheckup(id, data) + techRepository.updateCheckList(uniq_id, id, data) + } \ No newline at end of file diff --git a/app/src/main/java/ru/tele2med/mobile/domain/repository/TechRepository.kt b/app/src/main/java/ru/tele2med/mobile/domain/repository/TechRepository.kt index c935f64..2337f2f 100644 --- a/app/src/main/java/ru/tele2med/mobile/domain/repository/TechRepository.kt +++ b/app/src/main/java/ru/tele2med/mobile/domain/repository/TechRepository.kt @@ -19,6 +19,7 @@ interface TechRepository { ): Single fun updateCheckList( + uniq_id: String, id: String, data: List ): Single diff --git a/app/src/main/java/ru/tele2med/mobile/presentation/router/NavRouter.kt b/app/src/main/java/ru/tele2med/mobile/presentation/router/NavRouter.kt index 3d57ad9..670bda6 100644 --- a/app/src/main/java/ru/tele2med/mobile/presentation/router/NavRouter.kt +++ b/app/src/main/java/ru/tele2med/mobile/presentation/router/NavRouter.kt @@ -124,8 +124,8 @@ class NavRouter : Router() { navigateTo(NavScreens.getTechCheckup(dataTech)) } - fun openTestCheckupScreen(test: DataShow) { - navigateTo(NavScreens.getTestCheckup(test)) + fun openTestCheckupScreen(test: DataShow, uniq_id: String, dataTech: DataTech) { + navigateTo(NavScreens.getTestCheckup(test, uniq_id, dataTech)) } fun openMedicalCheckupsScreen() { diff --git a/app/src/main/java/ru/tele2med/mobile/presentation/router/NavScreens.kt b/app/src/main/java/ru/tele2med/mobile/presentation/router/NavScreens.kt index 18b6d45..f409c06 100644 --- a/app/src/main/java/ru/tele2med/mobile/presentation/router/NavScreens.kt +++ b/app/src/main/java/ru/tele2med/mobile/presentation/router/NavScreens.kt @@ -95,7 +95,7 @@ object NavScreens { fun getTechCheckup(dataTech: DataTech): TechCheckupScreen = TechCheckupScreen(dataTech) - fun getTestCheckup(test: DataShow): TestScreen = TestScreen(test) + fun getTestCheckup(test: DataShow, uniq_id: String, dataTech: DataTech): TestScreen = TestScreen(test, uniq_id, dataTech) fun getTechCheckupInfo(dataTech: DataTech): TechCheckupScreen = TechCheckupScreen(dataTech) diff --git a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/info/TechCheckupInfoFragment.kt b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/info/TechCheckupInfoFragment.kt index 2011a8b..7e40bbd 100644 --- a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/info/TechCheckupInfoFragment.kt +++ b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/info/TechCheckupInfoFragment.kt @@ -76,6 +76,10 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView { val gson = Gson() val data = gson.fromJson(dataString, DataTech::class.java) + startTest.setOnClickListener { + presenter.updateTech(, data.uniq_id, data) + } + // tvDriverTitle.focusable // tvDriverTitle.requestFocus() @@ -110,15 +114,6 @@ class TechCheckupInfoFragment : BaseMenuFragment(), TechCheckupInfoView { } - startTest.setOnClickListener { - presenter.updateTech( - data.uniq_id, - data.vehicle_id, - data.date_, - data.time_, - data.result_id - ) - } } diff --git a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/info/TechCheckupInfoPresenter.kt b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/info/TechCheckupInfoPresenter.kt index 034f8c5..de36e38 100644 --- a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/info/TechCheckupInfoPresenter.kt +++ b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/info/TechCheckupInfoPresenter.kt @@ -9,13 +9,15 @@ import ru.tele2med.mobile.presentation.util.Prefs import ru.tele2med.mobile.presentation.util.ioToMain import io.reactivex.rxkotlin.plusAssign import ru.tele2med.mobile.data.api.entity.exception.ApiException +import ru.tele2med.mobile.domain.entity.DataShow import ru.tele2med.mobile.domain.entity.DataTech import ru.tele2med.mobile.domain.interactor.TechInteractor +import ru.tele2med.mobile.presentation.router.NavRouter @InjectViewState class TechCheckupInfoPresenter( private val techInteractor: TechInteractor, - private val prefs: Prefs, + private val navRouter: NavRouter, private val stringId: String ) : BasePresenter() { @@ -23,39 +25,12 @@ class TechCheckupInfoPresenter( } - fun updateTech(id: String, vehicleId: String, date: String, time: String, resultId: String) { - Log.v( - "LOG", - "it id = $id, vehicleId = $vehicleId date = $date, time = $time, resultId = $resultId" - ) + fun updateTech(test: DataShow, uniq_id: String, dataTech: DataTech) { + navRouter.openTestCheckupScreen(test, uniq_id, dataTech) - disposable += techInteractor - .updateTech(id, vehicleId, date, time, resultId) - .ioToMain() - .doOnSubscribe { - Log.v("LOG", "it 2 = $it") - viewState.showLoading() - } - .doAfterTerminate { - viewState.hideLoading() - } - .subscribe({ - Log.v("LOG", "it = $it ${it.message}") - - }, { - if (it is ApiException) { - if (it.code == RestApiCodes.NotFound.code) { - } else { - this.handleError(it) - } - } else { - this.handleError(it) - } - }) } - fun showCheckUp() { val gson = Gson() val data = gson.fromJson(stringId, DataTech::class.java) diff --git a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/TechCheckupTestsFragment.kt b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/TechCheckupTestsFragment.kt index ce4a460..5c5dca0 100644 --- a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/TechCheckupTestsFragment.kt +++ b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/TechCheckupTestsFragment.kt @@ -51,7 +51,13 @@ class TechCheckupTestsFragment : BaseMenuFragment(), TechCheckupTestsView { private val adapter: TestListAdapter by lazy { 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) + ) } } @@ -87,7 +93,7 @@ class TechCheckupTestsFragment : BaseMenuFragment(), TechCheckupTestsView { val scrollListener = object : EndlessRecyclerViewScrollListener(layoutManager) { override fun onLoadMore() { - // presenter.getCheckups() + // presenter.getCheckups() } } recyclerView.addOnScrollListener(scrollListener) @@ -150,7 +156,10 @@ class TechCheckupTestsFragment : BaseMenuFragment(), TechCheckupTestsView { 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)}" + ) } } diff --git a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/TechCheckupTestsPresenter.kt b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/TechCheckupTestsPresenter.kt index 9583729..9c2f2c0 100644 --- a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/TechCheckupTestsPresenter.kt +++ b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/TechCheckupTestsPresenter.kt @@ -59,9 +59,9 @@ class TechCheckupTestsPresenter( }) } - fun get(test: DataShow) { + fun get(test: DataShow, uniq_id: String, dataTech: DataTech) { println("TechCheckupTestsPresenter ${test.uniq_id}") - navRouter.openTestCheckupScreen(test) + navRouter.openTestCheckupScreen(test, uniq_id, dataTech) } diff --git a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestFragment.kt b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestFragment.kt index 4fe6a61..ffae9ca 100644 --- a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestFragment.kt +++ b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestFragment.kt @@ -1,6 +1,8 @@ package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test 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 @@ -8,6 +10,7 @@ import com.arellomobile.mvp.presenter.ProvidePresenter import com.google.gson.Gson import kotlinx.android.synthetic.main.fragment_checkup_test.* import ru.tele2med.mobile.R +import ru.tele2med.mobile.di.module.navigationModule import ru.tele2med.mobile.domain.entity.Data import ru.tele2med.mobile.domain.entity.DataShow import ru.tele2med.mobile.domain.entity.DataTech @@ -18,6 +21,7 @@ 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.ui.menu.items.tech.list.techCheckup.tests.TechCheckupTestsFragment import ru.tele2med.mobile.presentation.util.providePresenter class TestFragment : BaseMenuFragment(), TestView { @@ -43,36 +47,87 @@ class TestFragment : BaseMenuFragment(), TestView { title = getString(R.string.test_toolbar) } - val args = arguments - val data = args?.toString() // getString("data", "") + // val args = arguments + // val data = args?.toString() // getString("data", "") - Log.v("TestFragment", "args = ${arguments?.getString("data")}") + Log.v("TestFragment", "args = ${arguments?.getString(TEST)}") 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 uniq_id = arguments?.getString(UNIQ_ID) + + + // val gson = Gson() + // val dataTest = gson.fromJson(TEST, DataShow::class.java) + + + fillData(data) + actions(data, uniq_id ?: "", dataTech) + } } + private fun fillData(data: DataShow) { Log.v("TestFragment", "data = data.name = ${data.name}") tvTestName.text = data.name + tvComment.text = data.comment + tvStatusName.text = "Проверка ${data.order}" } + 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_checkup_test companion object { - private const val TEST = "TEST" + private var TEST = "TEST" + private var UNIQ_ID = "UNIQ_ID" + private var TECH = "TECH" - fun getInstance(test: DataShow): TestFragment { + + fun getInstance(test: DataShow, uniq_id: String, dataTech: DataTech): TestFragment { val gson = Gson() val string: String = gson.toJson(test) + this.TEST = string + val stringTech: String = gson.toJson(dataTech) + this.TECH = stringTech + + + return TestFragment().also { it.arguments = Bundle().apply { putString(TEST, string) + putString(UNIQ_ID, uniq_id) + putString(TECH, stringTech) } } diff --git a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestPresenter.kt b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestPresenter.kt index 7144e5a..b62261b 100644 --- a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestPresenter.kt +++ b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestPresenter.kt @@ -1,26 +1,120 @@ package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.tests.test +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.SosInteractor -import ru.tele2med.mobile.presentation.Changes +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.ui.menu.items.tech.list.techCheckup.tests.test.TestView +import ru.tele2med.mobile.presentation.util.ioToMain @InjectViewState class TestPresenter( - private val sosInteractor: SosInteractor, - private val navRouter: NavRouter, - private val changes: Changes + private val techInteractor: TechInteractor, + private val navRouter: NavRouter ) : BaseMenuPresenter() { private var position: Position? = null override fun 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 = 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() + + 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) + } 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) + } + }) + } + + } diff --git a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestScreen.kt b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestScreen.kt index 07ff668..be499a6 100644 --- a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestScreen.kt +++ b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestScreen.kt @@ -2,12 +2,13 @@ package ru.tele2med.mobile.presentation.ui.menu.items.tech.list.techCheckup.test 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 TestScreen(val test: DataShow) : SupportAppScreen() { +class TestScreen(val test: DataShow, val uniq_id: String, val dataTech: DataTech) : SupportAppScreen() { override fun getFragment(): Fragment { - return TestFragment.getInstance(test) + return TestFragment.getInstance(test, uniq_id, dataTech) } override fun getScreenKey(): String { diff --git a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestView.kt b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestView.kt index 65e00a9..e4a6ada 100644 --- a/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestView.kt +++ b/app/src/main/java/ru/tele2med/mobile/presentation/ui/menu/items/tech/list/techCheckup/tests/test/TestView.kt @@ -1,5 +1,6 @@ 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.StateStrategyType import ru.tele2med.mobile.domain.entity.DataShow @@ -8,7 +9,10 @@ import ru.tele2med.mobile.presentation.ui.base.BaseView interface TestView : BaseView { fun bindTest(test: DataShow) { - } + @StateStrategyType(OneExecutionStateStrategy::class) + fun toBack() + + } \ No newline at end of file