Fixed issues with assignment progress tracking + added subject progress tracking
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { defaultStyles } from '@/constants/defaultStyles';
|
||||
import { GetAssignmentNotificationId, RemoveAssignmentNotificationId, SaveAssignmentNotificationId } from '@/lib/asyncStorage';
|
||||
import { CheckSubjectCompletion } from '@/lib/progress';
|
||||
import { supabase } from '@/lib/supabase';
|
||||
import type { Assignment } from '@/lib/types';
|
||||
import * as Notifications from 'expo-notifications';
|
||||
@@ -115,6 +116,14 @@ export default function EditAssignment() {
|
||||
}
|
||||
}
|
||||
|
||||
if (assignmentData.sId) {
|
||||
try {
|
||||
await CheckSubjectCompletion(assignmentData.sId);
|
||||
} catch {
|
||||
Alert.alert("Failed to update subject status");
|
||||
}
|
||||
}
|
||||
|
||||
router.back();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user