removed automatic change for subject to inactive if all assignments are completed
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { defaultStyles } from '@/constants/defaultStyles';
|
||||
import * as AsyncStorage from '@/lib/asyncStorage';
|
||||
import { CheckSubjectCompletion } from '@/lib/progress';
|
||||
import { supabase } from '@/lib/supabase';
|
||||
import * as Notifications from 'expo-notifications';
|
||||
import { router, Stack, useLocalSearchParams } from 'expo-router';
|
||||
@@ -189,12 +188,6 @@ export default function UpsertAssignment() {
|
||||
savedAssignment.isCompleted
|
||||
);
|
||||
|
||||
try {
|
||||
await CheckSubjectCompletion(subjectId);
|
||||
} catch {
|
||||
Alert.alert('Failed to update subject status');
|
||||
}
|
||||
|
||||
SetIsSaving(false);
|
||||
|
||||
if (!isEditMode && isSetupFlow) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { formatDate, formatDateTime } from '@/lib/date';
|
||||
import { CheckAssignmentCompletion, CheckSubjectCompletion } from '@/lib/progress';
|
||||
import { CheckAssignmentCompletion } from '@/lib/progress';
|
||||
import { getSubjectColorSet, type SubjectColor } from '@/lib/subjectColors';
|
||||
import { supabase } from '@/lib/supabase';
|
||||
import type { Assignment, Task } from '@/lib/types';
|
||||
@@ -124,16 +124,6 @@ export default function ViewDetailsAssignment() {
|
||||
|
||||
Alert.alert("Assignment deleted successfully!");
|
||||
|
||||
const sId = assignment?.sId;
|
||||
|
||||
if (sId) {
|
||||
try {
|
||||
await CheckSubjectCompletion(sId);
|
||||
} catch {
|
||||
Alert.alert("Failed to update subject status");
|
||||
}
|
||||
}
|
||||
|
||||
router.back();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user