From 94892e1f9780b4eb88cfc8c230b75a47b627adcf Mon Sep 17 00:00:00 2001 From: Aditya Kshirsagar Date: Tue, 10 Sep 2024 22:58:24 -0500 Subject: [PATCH] initial prototype for staff points --- .../android/view/profile/ProfileFragment.kt | 99 ++++++-- .../res/layout/fragment_profile_staff.xml | 240 ++++++++++++++++++ app/src/main/res/values/strings.xml | 3 + 3 files changed, 320 insertions(+), 22 deletions(-) create mode 100644 app/src/main/res/layout/fragment_profile_staff.xml diff --git a/app/src/main/java/org/hackillinois/android/view/profile/ProfileFragment.kt b/app/src/main/java/org/hackillinois/android/view/profile/ProfileFragment.kt index d8cd596c..3e253a65 100644 --- a/app/src/main/java/org/hackillinois/android/view/profile/ProfileFragment.kt +++ b/app/src/main/java/org/hackillinois/android/view/profile/ProfileFragment.kt @@ -16,6 +16,7 @@ import com.google.zxing.BarcodeFormat import com.google.zxing.EncodeHintType import com.google.zxing.MultiFormatWriter import com.google.zxing.WriterException +import kotlinx.android.synthetic.main.fragment_point_shop.coin_total_textview import org.hackillinois.android.R import org.hackillinois.android.common.JWTUtilities import org.hackillinois.android.database.entity.Profile @@ -57,7 +58,7 @@ class ProfileFragment : Fragment() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - if (!hasLoggedIn() or isStaff()) { + if (!hasLoggedIn()) { return } // View model set up and initialization @@ -66,7 +67,7 @@ class ProfileFragment : Fragment() { } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { // if not an attendee, set the layout to be the not logged in profile - if (!hasLoggedIn() or (hasLoggedIn() and isStaff())) { + if (!hasLoggedIn()) { val view = inflater.inflate(R.layout.fragment_profile_not_logged_in, container, false) val logoutButton = view.findViewById