Fixed bug with new number of group on not current week

This commit is contained in:
Vladimir Dubovik
2025-01-22 18:15:55 +03:00
parent 3eb5fb73eb
commit 4c3a46d40e
10 changed files with 91 additions and 49 deletions

View File

@ -151,3 +151,16 @@ extension View {
}
}
}
extension CreateEditClassView {
func delete(_ _class: ClassModel) throws {
let context = provider.viewContext
let existingClass = try context.existingObject(with: _class.objectID)
context.delete(existingClass)
Task (priority: .background) {
try await context.perform {
try context.save()
}
}
}
}