23.08.2023 v1Rehab

patient
Clogon 2023-08-23 12:54:49 +03:00
parent 6ea44be0cb
commit 8aeafa4a7f
17 changed files with 412 additions and 737 deletions

View File

@ -1 +1 @@
Rehabilitation Реабилитация

View File

@ -17,6 +17,5 @@
</option> </option>
</GradleProjectSettings> </GradleProjectSettings>
</option> </option>
<option name="offlineMode" value="true" />
</component> </component>
</project> </project>

Binary file not shown.

View File

@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.example.rehabilitation",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-release.apk"
}
],
"elementType": "File"
}

View File

@ -193,7 +193,7 @@ class MainSettingDoctorFragment : Fragment() {
val edit = prefBlock?.edit() val edit = prefBlock?.edit()
edit?.clear() edit?.clear()
edit?.apply() edit?.apply()
SportPlusCount = 0 Block = ""
} }
fun savePauseDay(pd: String) { fun savePauseDay(pd: String) {
val edit = prefPauseDay?.edit() val edit = prefPauseDay?.edit()

View File

@ -295,12 +295,29 @@ class PatientSportFragment : Fragment(), EditSportAdapter.Listener, EditSportAda
binding.btnAddCyrc1.setOnClickListener { binding.btnAddCyrc1.setOnClickListener {
if(FIO !=""){ if(FIO !=""){
addSportCategoryDay() addSportCategoryDay()
binding.btnAddCyrc1.setCardBackgroundColor(Color.parseColor("#FD5ADC7B"))
} }
else{ else{
Toast(requireContext()).showCustomInfoToast("Создайте аккаунт пациенту", requireActivity()) Toast(requireContext()).showCustomInfoToast("Создайте аккаунт пациенту", requireActivity())
} }
} }
if(SportUserTrue == 0){
binding.btnAddCyrc1.setCardBackgroundColor(Color.parseColor("#BFBFBF"))
}
else{
binding.btnAddCyrc1.setCardBackgroundColor(Color.parseColor("#FD5ADC7B"))
}
if(visibleListCyrs == true){
binding.cardViewLIstSportCurs.visibility = View.VISIBLE
}
else{
binding.cardViewLIstSportCurs.visibility = View.GONE
}
binding.btnAddListCyrc.setOnClickListener { binding.btnAddListCyrc.setOnClickListener {
if (visibleListCyrs == false){ if (visibleListCyrs == false){
binding.cardViewLIstSportCurs.visibility = View.VISIBLE binding.cardViewLIstSportCurs.visibility = View.VISIBLE
@ -335,6 +352,7 @@ class PatientSportFragment : Fragment(), EditSportAdapter.Listener, EditSportAda
clearSportMaxCount() clearSportMaxCount()
clearSportDateStart() clearSportDateStart()
clearCursDayNumber() clearCursDayNumber()
binding.btnAddCyrc1.setCardBackgroundColor(Color.parseColor("#BFBFBF"))
Log.i("SportUserTrue","${SportUserTrue}") Log.i("SportUserTrue","${SportUserTrue}")
Log.i("SportCursDay","${SportCursDay}") Log.i("SportCursDay","${SportCursDay}")
Log.i("SportCursDayDangerBefore","${SportCursDayDangerBefore}") Log.i("SportCursDayDangerBefore","${SportCursDayDangerBefore}")
@ -447,7 +465,7 @@ class PatientSportFragment : Fragment(), EditSportAdapter.Listener, EditSportAda
val edit = prefBlock?.edit() val edit = prefBlock?.edit()
edit?.clear() edit?.clear()
edit?.apply() edit?.apply()
SportPlusCount = 0 Block = ""
} }
fun savePauseDay(pd: String) { fun savePauseDay(pd: String) {
val edit = prefPauseDay?.edit() val edit = prefPauseDay?.edit()

View File

@ -28,8 +28,8 @@ class SettingActivity : AppCompatActivity() {
binding.btnExitSetting.setOnClickListener { binding.btnExitSetting.setOnClickListener {
val intetn = Intent(this, MainActivity::class.java) val intetn = Intent(this, MainActivity::class.java)
finish()
startActivity(intetn) startActivity(intetn)
finish()
} }
binding.cvSettingUser.setOnClickListener{ binding.cvSettingUser.setOnClickListener{
@ -68,8 +68,8 @@ class SettingActivity : AppCompatActivity() {
builder.setPositiveButton("Подтвердить") { dialogInterface, i -> builder.setPositiveButton("Подтвердить") { dialogInterface, i ->
clearUserPatientToken() clearUserPatientToken()
val intetn = Intent(this, AuthorizationActivity::class.java) val intetn = Intent(this, AuthorizationActivity::class.java)
finish()
startActivity(intetn) startActivity(intetn)
finish()
} }
builder.show() builder.show()
} }

View File

@ -145,12 +145,12 @@ class ProgresFragment : Fragment(), ProgressAdapter.Listener {
Sport7Day = prefSport7Day?.getInt("s7d", 0)!! Sport7Day = prefSport7Day?.getInt("s7d", 0)!!
ActivityCompat.requestPermissions( // ActivityCompat.requestPermissions(
requireActivity(), arrayOf( // requireActivity(), arrayOf(
Manifest.permission.WRITE_EXTERNAL_STORAGE, // Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE // Manifest.permission.READ_EXTERNAL_STORAGE
), PackageManager.PERMISSION_GRANTED // ), PackageManager.PERMISSION_GRANTED
) // )
liveDayListProgres() liveDayListProgres()
@ -215,7 +215,7 @@ class ProgresFragment : Fragment(), ProgressAdapter.Listener {
} else { } else {
Toast(requireContext()).showCustomInfoToast( Toast(requireContext()).showCustomInfoToast(
"Отчет можно отправлять при наличие 2 выполненных дней", "Отчет можно отправить при наличие 2 выполненных дней",
requireActivity() requireActivity()
) )

View File

@ -143,7 +143,7 @@ class QAfterFragment : Fragment() {
if(ten == "1"){ if(ten == "1"){
AlertDialog.Builder(requireContext()) AlertDialog.Builder(requireContext())
.setTitle("Анкета") .setTitle("Анкета")
.setMessage("Вы уверенны в выбронных пунктах анкеты? Если вы нажмете 'Подтвердить' ваш курс временно заблакируется, чтобы вы не нанесли вред своему здоровью") .setMessage("Уверены ли Вы в выбранных ответах на вопросы анкеты? Халатное отношение к вопросам анкеты приведет к блокировке комплекса")
.setNeutralButton("Подтвердить") { dialog, whichButton -> .setNeutralButton("Подтвердить") { dialog, whichButton ->
addQuestionnaire() addQuestionnaire()
} }

View File

@ -452,8 +452,8 @@ class SceduleFragment(/*var taskItem: TaskItem?*/) : Fragment()/*, MonthAdapter.
Log.i("time","${time}") Log.i("time","${time}")
//Если это сегодняшнее упражнение //Если это сегодняшнее упражнение
if((item.number.toInt() == (SportPlusCount+1))|| (item.number.toInt() < (SportPlusCount+1))) { if((item.number.toInt() == (SportPlusCount+1))|| (item.number.toInt() < (SportPlusCount+1))) {
times = time.toInt() // times = time.toInt()
if(times ==0 || times == 1000){ // if(times ==0 || times == 1000){
binding.LoadImage.visibility = View.VISIBLE binding.LoadImage.visibility = View.VISIBLE
liveReadOrderDayCurrent() liveReadOrderDayCurrent()
@ -481,10 +481,10 @@ class SceduleFragment(/*var taskItem: TaskItem?*/) : Fragment()/*, MonthAdapter.
Toast(requireContext()).showCustomInfoToast("Пауза в 1 минуту", requireActivity()) Toast(requireContext()).showCustomInfoToast("Пауза в 1 минуту", requireActivity())
} }
} // }
else{ // else{
Toast(requireContext()).showCustomInfoToast("Сначало выполните ${SportPlusCount+1} упражнение", requireActivity()) // Toast(requireContext()).showCustomInfoToast("Сначало выполните ${SportPlusCount+1} упражнение", requireActivity())
} // }
} }
@ -532,17 +532,17 @@ class SceduleFragment(/*var taskItem: TaskItem?*/) : Fragment()/*, MonthAdapter.
Log.i("SportPlusCount","${SportPlusCount}") Log.i("SportPlusCount","${SportPlusCount}")
Log.i("SportMaxCount","${SportMaxCount}") Log.i("SportMaxCount","${SportMaxCount}")
Log.i("SportCursDay","${SportCursDay}") Log.i("SportCursDay","${SportCursDay}")
val timer = object: CountDownTimer(60000, 1000) { // val timer = object: CountDownTimer(60000, 1000) {
override fun onTick(millisUntilFinished: Long) { // override fun onTick(millisUntilFinished: Long) {
time = millisUntilFinished // time = millisUntilFinished
Log.i("asad3444a","${time}") // Log.i("asad3444a","${time}")
} // }
//
override fun onFinish() { // override fun onFinish() {
time = 0 // time = 0
} // }
} // }
timer.start() // timer.start()
} }

View File

@ -23,7 +23,8 @@
app:layout_constraintBottom_toTopOf="@+id/textView34" app:layout_constraintBottom_toTopOf="@+id/textView34"
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/textView32"> app:layout_constraintTop_toBottomOf="@+id/textView32"
tools:ignore="NotSibling">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -108,7 +108,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:text="Email:" android:text="Login:"
android:textColor="#000000" android:textColor="#000000"
app:layout_constraintStart_toStartOf="@+id/txtName" app:layout_constraintStart_toStartOf="@+id/txtName"
app:layout_constraintTop_toBottomOf="@+id/txtName" /> app:layout_constraintTop_toBottomOf="@+id/txtName" />
@ -191,14 +191,14 @@
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/cardViewBan" android:id="@+id/cardViewBan"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="32dp" android:layout_marginStart="8dp"
android:layout_marginEnd="16dp"
app:cardCornerRadius="10dp" app:cardCornerRadius="10dp"
app:layout_constraintBottom_toBottomOf="@+id/cardViewPause" app:layout_constraintBottom_toBottomOf="@+id/cardViewPause"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0" app:layout_constraintStart_toEndOf="@+id/cardView26"
app:layout_constraintStart_toEndOf="@+id/cardViewPause"
app:layout_constraintTop_toTopOf="@+id/cardViewPause"> app:layout_constraintTop_toTopOf="@+id/cardViewPause">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -226,9 +226,11 @@
android:id="@+id/cardViewPause" android:id="@+id/cardViewPause"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="32dp" android:layout_marginStart="16dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
app:cardCornerRadius="10dp" app:cardCornerRadius="10dp"
app:layout_constraintEnd_toStartOf="@+id/cardViewBan"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtDiagnoz"> app:layout_constraintTop_toBottomOf="@+id/txtDiagnoz">
@ -388,6 +390,16 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/cardView26"
android:layout_width="1dp"
android:layout_height="wrap_content"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:layout_editor_absoluteY="289dp"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
@ -404,7 +416,8 @@
app:cardMaxElevation="20dp" app:cardMaxElevation="20dp"
app:layout_constraintEnd_toEndOf="@+id/btnPatient" app:layout_constraintEnd_toEndOf="@+id/btnPatient"
app:layout_constraintStart_toStartOf="@+id/btnPatient" app:layout_constraintStart_toStartOf="@+id/btnPatient"
app:layout_constraintTop_toBottomOf="@+id/btnPatient"> app:layout_constraintTop_toBottomOf="@+id/btnPatient"
tools:ignore="NotSibling">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -655,7 +655,8 @@
app:cardCornerRadius="20dp" app:cardCornerRadius="20dp"
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/textView22"> app:layout_constraintTop_toBottomOf="@+id/textView22"
tools:ignore="NotSibling">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -818,7 +819,8 @@
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/cardView21" android:id="@+id/cardView21"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
tools:ignore="MissingConstraints" />
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/btnEdit" android:id="@+id/btnEdit"

View File

@ -138,7 +138,7 @@
android:gravity="center" android:gravity="center"
android:text="ПЕРЕЙТИ К ОТПРАВКЕ ОТЧЕТА" android:text="ПЕРЕЙТИ К ОТПРАВКЕ ОТЧЕТА"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="16sp" android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -224,7 +224,7 @@
android:gravity="center" android:gravity="center"
android:text="ПЕРЕЙТИ К ОТПРАВКЕ ОТЧЕТА" android:text="ПЕРЕЙТИ К ОТПРАВКЕ ОТЧЕТА"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="16sp" android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -276,7 +276,7 @@
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:fontFamily="serif" android:fontFamily="serif"
android:gravity="center" android:gravity="center"
android:text="Обратитесь к врачу для консультации. \n \n Тренировки буду доступны:" android:text="Обратитесь к врачу для консультации. \n \n Курс будет доступен:"
android:textColor="#000000" android:textColor="#000000"
android:textSize="24sp" android:textSize="24sp"
app:layout_constraintBottom_toTopOf="@+id/txtDatePause" app:layout_constraintBottom_toTopOf="@+id/txtDatePause"
@ -359,7 +359,7 @@
android:gravity="center" android:gravity="center"
android:text="Курс заблокирован до:" android:text="Курс заблокирован до:"
android:textColor="#000000" android:textColor="#000000"
android:textSize="20sp" android:textSize="24sp"
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/textView56" /> app:layout_constraintTop_toBottomOf="@+id/textView56" />
@ -375,7 +375,7 @@
android:gravity="center" android:gravity="center"
android:text="00.00.0000" android:text="00.00.0000"
android:textColor="#000000" android:textColor="#000000"
android:textSize="20sp" android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View File

@ -1,5 +1,5 @@
<resources> <resources>
<string name="app_name">Rehabilitation</string> <string name="app_name">ВМедA.Реабилитация</string>
<string name="hello_blank_fragment">Hello blank fragment</string> <string name="hello_blank_fragment">Hello blank fragment</string>
<string name="ed_title_hint">Заголовок</string> <string name="ed_title_hint">Заголовок</string>
<string name="ed_desc_hint">Пока тут пусто</string> <string name="ed_desc_hint">Пока тут пусто</string>

View File

@ -17,5 +17,5 @@ dependencyResolutionManagement {
} }
} }
rootProject.name = "Rehabilitation" rootProject.name = "Реабилитация"
include ':app' include ':app'