Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f3dc93050e
3
app/.gitignore
vendored
3
app/.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/build
|
/build
|
||||||
|
src/main/java/com/displaynone/acss/config/Constants.kt
|
||||||
|
@ -43,14 +43,6 @@ class ProfileFragment : Fragment(R.layout.fragment_profile) {
|
|||||||
logout()
|
logout()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.scan.setOnClickListener {
|
|
||||||
navigateTo(view, R.id.action_profileFragment_to_qrScanFragment)
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.buttonSearch.setOnClickListener {
|
|
||||||
navigateTo(view, R.id.action_profileFragment_to_adminFragment)
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.recyclerViewLogs.adapter = adapter
|
binding.recyclerViewLogs.adapter = adapter
|
||||||
|
|
||||||
if (getIsMe()) {
|
if (getIsMe()) {
|
||||||
@ -79,17 +71,12 @@ class ProfileFragment : Fragment(R.layout.fragment_profile) {
|
|||||||
private fun checkForAdmin() {
|
private fun checkForAdmin() {
|
||||||
val userDTO = UserServiceST.getInstance().getUserDTO() ?: return
|
val userDTO = UserServiceST.getInstance().getUserDTO() ?: return
|
||||||
|
|
||||||
if (userDTO.roles.any { it.name == "ROLE_ADMIN" }) {
|
|
||||||
binding.buttonSearch.visibility = View.VISIBLE
|
|
||||||
}
|
|
||||||
Log.d("1234", userDTO.isACSBlocked.toString())
|
Log.d("1234", userDTO.isACSBlocked.toString())
|
||||||
binding.rightsUsingSmartphone.text = if (userDTO.isACSBlocked) "Пропуск недействителен" else "Пропуск действителен"
|
binding.rightsUsingSmartphone.text = if (userDTO.isACSBlocked) "Пропуск недействителен" else "Пропуск действителен"
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun hideButtons() {
|
private fun hideButtons() {
|
||||||
binding.logout.visibility = View.GONE
|
binding.logout.visibility = View.GONE
|
||||||
binding.scan.visibility = View.GONE
|
|
||||||
binding.buttonSearch.visibility = View.GONE
|
|
||||||
binding.changeRights.visibility = View.VISIBLE
|
binding.changeRights.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,53 +136,6 @@
|
|||||||
android:textColor="?attr/colorOnBackground"
|
android:textColor="?attr/colorOnBackground"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/scan"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:maxHeight="200dp"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:text="@string/scan"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:backgroundTint="@color/primary"
|
|
||||||
app:cardElevation="8dp"
|
|
||||||
app:cornerRadius="8dp"
|
|
||||||
app:icon="@drawable/qr_code_scan"
|
|
||||||
|
|
||||||
app:iconGravity="textStart"
|
|
||||||
app:rippleColor="@color/white"
|
|
||||||
app:strokeColor="@color/black"
|
|
||||||
app:strokeWidth="1dp" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
android:id="@+id/button_search"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:maxHeight="200dp"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:text="@string/administrator_searc_button_search"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:backgroundTint="@color/primary"
|
|
||||||
|
|
||||||
|
|
||||||
app:cardElevation="8dp"
|
|
||||||
app:cornerRadius="8dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:rippleColor="@color/white"
|
|
||||||
app:strokeColor="@color/black"
|
|
||||||
app:strokeWidth="1dp" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/logout"
|
android:id="@+id/logout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user