diff --git a/app/content/assignments/players.js b/app/content/assignments/players.js
index 3f2ee7a4..098ce252 100644
--- a/app/content/assignments/players.js
+++ b/app/content/assignments/players.js
@@ -23,7 +23,7 @@ import { db } from "~/firebaseConfig";
function Index() {
const navigation = useNavigation();
- const { drillId, assignedTime } = useLocalSearchParams();
+ const { drillId, mergeTime } = useLocalSearchParams();
const {
data: drillInfo,
isLoading: drillInfoIsLoading,
@@ -58,7 +58,7 @@ function Index() {
getLocalizedDate({
time: assignment.assignedTime,
rounded: true,
- }).getTime() == assignedTime && assignment.drillId === drillId;
+ }).getTime() == mergeTime && assignment.drillId === drillId;
setAssignmentList(
Object.values(userInfo)
.filter((user) => user.assigned_data.some(critera))
@@ -79,7 +79,7 @@ function Index() {
}, [
userInfo,
getLocalizedDate,
- assignedTime,
+ mergeTime,
drillId,
assignmentList.length,
navigation,
@@ -122,10 +122,10 @@ function Index() {
getLocalizedDate({
time: assignment.assignedTime,
rounded: true,
- }).getTime() != assignedTime,
+ }).getTime() != mergeTime,
);
console.log("Updated Assignment List: ", updatedAssignmentList);
- console.log("current assignedTime: ", assignedTime);
+ console.log("current mergeTime: ", mergeTime);
playerList.push({
uid: assignment.uid,
assigned_data: updatedAssignmentList,
@@ -156,7 +156,7 @@ function Index() {
}
}),
[
- assignedTime,
+ mergeTime,
assignmentList,
currentTeamId,
getLocalizedDate,
@@ -200,7 +200,7 @@ function Index() {
if (docSnap.exists()) {
const assignedData = docSnap.data().assigned_data;
const updatedAssignedData = assignedData.map((a) => {
- if (a.assignedTime == assignedTime && a.drillId === drillId) {
+ if (a.assignedTime == mergeTime && a.drillId === drillId) {
return { ...a, completed: false };
}
return a;
diff --git a/app/segments/drill/[id]/submission/index.js b/app/segments/drill/[id]/submission/index.js
index e60a49f8..0aad04e2 100644
--- a/app/segments/drill/[id]/submission/index.js
+++ b/app/segments/drill/[id]/submission/index.js
@@ -65,12 +65,14 @@ export default function Index() {
content={"All inputs will be lost."}
visible={leaveDialogVisible}
onHide={hideLeaveDialog}
- buttons={["Cancel", "Leave Drill"]}
- buttonsFunctions={[
- hideLeaveDialog,
- () => {
- hideLeaveDialog();
- navigation.dispatch(exitAction);
+ buttons={[
+ { children: "Cancel", pressHandler: hideLeaveDialog },
+ {
+ children: "Leave Drill",
+ pressHandler: () => {
+ hideLeaveDialog();
+ navigation.dispatch(exitAction);
+ },
},
]}
/>
diff --git a/app/segments/drill/[id]/submission/input.js b/app/segments/drill/[id]/submission/input.js
index 8cce89ad..20183751 100644
--- a/app/segments/drill/[id]/submission/input.js
+++ b/app/segments/drill/[id]/submission/input.js
@@ -1,3 +1,4 @@
+import { KeyboardAvoiderScrollView } from "@good-react-native/keyboard-avoider";
import {
BottomSheetModalProvider,
BottomSheetScrollView,
@@ -16,7 +17,6 @@ import {
} from "firebase/firestore";
import { useCallback, useEffect, useRef, useState } from "react";
import { Platform, StyleSheet, View, useWindowDimensions } from "react-native";
-import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
import { Appbar, Button, Divider, Text } from "react-native-paper";
import { SafeAreaView } from "react-native-safe-area-context";
import { once } from "underscore";
@@ -60,6 +60,8 @@ async function completeAssigned(
if (docSnap.exists()) {
const assignedData = docSnap.data()["assigned_data"];
+ console.log("assignedData", assignedData);
+ console.log("assignedTime", assignedTime);
const updatedAssignedData = assignedData.map((assignment) => {
if (
assignment.assignedTime == assignedTime &&
@@ -927,7 +929,7 @@ export default function Input({ setToggleResult, setOutputData }) {
}
/>
-
+
{/* Shot Number / Total shots */}
@@ -1021,7 +1023,7 @@ export default function Input({ setToggleResult, setOutputData }) {
-
+
{/* Navigation */}
{
return assigned_data.reduce((acc, curr) => {
- const time = curr.assignedTime;
+ const time = curr.mergeTime;
if (!acc[time]) {
acc[time] = [];
@@ -117,7 +118,7 @@ const AssignmentsList = ({
pathname: "content/assignments/players",
params: {
drillId: assignment.drillId,
- assignedTime: assignment.assignedTime,
+ mergeTime: assignment.mergeTime,
},
});
}
@@ -204,7 +205,7 @@ const AssignmentsList = ({
title: date,
data: groupedData[date],
}))}
- keyExtractor={(item) => `${item.assignedTime}-${item.drillId}`}
+ keyExtractor={(item) => `${item.mergeTime}-${item.drillId}`}
ListHeaderComponent={children}
renderItem={({ item: assignment }) => {
const assignmentCompleted = singleUser
@@ -216,7 +217,7 @@ const AssignmentsList = ({
});
return (
cardPressHandler(assignment)}
disabled={disabled}
>