feat: add undergraduate import and exam selection screens
This commit is contained in:
@@ -10,9 +10,11 @@ class ImportPreview extends StatefulWidget {
|
||||
super.key,
|
||||
required this.draft,
|
||||
required this.controller,
|
||||
this.canApply,
|
||||
});
|
||||
final ImportDraft draft;
|
||||
final AppController controller;
|
||||
final bool Function()? canApply;
|
||||
@override
|
||||
State<ImportPreview> createState() => _ImportPreviewState();
|
||||
}
|
||||
@@ -41,6 +43,16 @@ class _ImportPreviewState extends State<ImportPreview> {
|
||||
style: const TextStyle(color: river),
|
||||
),
|
||||
if (draft.semesterLabel != null) Text('学期:${draft.semesterLabel}'),
|
||||
if (widget.controller.snapshot.courses.isNotEmpty &&
|
||||
widget.controller.snapshot.schoolTerm != draft.schoolTerm &&
|
||||
draft.schoolTerm != null)
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
'将替换当前课表;导入新学校或新学期后,请重新设置学期开始日。',
|
||||
style: TextStyle(fontSize: 12, height: 1.6),
|
||||
),
|
||||
),
|
||||
if (draft.schoolTerm != null)
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(top: 8),
|
||||
@@ -106,6 +118,7 @@ class _ImportPreviewState extends State<ImportPreview> {
|
||||
await widget.controller.applyImport(
|
||||
draft,
|
||||
confirmedEmpty: _clearConfirmed,
|
||||
canApply: widget.canApply,
|
||||
);
|
||||
if (!context.mounted) return;
|
||||
if (widget.controller.lastError == null) {
|
||||
|
||||
Reference in New Issue
Block a user