diff --git a/src/Jiaowu.Api/Controllers/ApprovalsController.cs b/src/Jiaowu.Api/Controllers/ApprovalsController.cs index 5e424ce..b7c22ba 100644 --- a/src/Jiaowu.Api/Controllers/ApprovalsController.cs +++ b/src/Jiaowu.Api/Controllers/ApprovalsController.cs @@ -1363,7 +1363,7 @@ public sealed class ApprovalsController( private async Task NotifyCollege(GradeModification gm, CancellationToken ct) { await NotificationService.SendToRoleAsync(db, SystemRoles.CollegeAdmin, "成绩修改待审核", $"{gm.GradeRecord!.Student!.Name} — 《{gm.GradeRecord.GradeSheet!.TeachingTask!.Course!.Name}》{gm.CurrentScore}→{gm.RequestedScore}", cancellationToken: ct, category: NotificationCategory.Grade); } private async Task NotifyRole(string role, string title, string content, CancellationToken ct) { await NotificationService.SendToRoleAsync(db, role, title, content, cancellationToken: ct, category: NotificationCategory.Approval); } - private static string SSCLabel(StudentStatusChangeType t) => t switch { StudentStatusChangeType.Suspension => "休学", StudentStatusChangeType.Resumption => "复学", StudentStatusChangeType.Withdrawal => "退学", StudentStatusChangeType.Enlistment => "入伍保留学籍", StudentStatusChangeType.Demotion => "降级", _ => "异动" }; + private static string SSCLabel(StudentStatusChangeType t) => t switch { StudentStatusChangeType.Suspension => "休学", StudentStatusChangeType.Resumption => "复学", StudentStatusChangeType.Withdrawal => "退学", StudentStatusChangeType.Enlistment => "入伍保留学籍", StudentStatusChangeType.Demotion => "降级", StudentStatusChangeType.ClassTransfer => "转班", StudentStatusChangeType.MajorTransfer => "院内转专业", _ => "异动" }; private static string CALabel(CourseAdjustmentType t) => t switch { CourseAdjustmentType.Reschedule => "调课", CourseAdjustmentType.Cancel => "停课", CourseAdjustmentType.Makeup => "补课", CourseAdjustmentType.Substitute => "代课", _ => "调停课" }; private ActionResult ConflictProblem(string d) => Conflict(new ProblemDetails { Title = "无法完成", Detail = d, Status = 409 }); } diff --git a/src/Jiaowu.Api/Controllers/StudentStatusChangesController.cs b/src/Jiaowu.Api/Controllers/StudentStatusChangesController.cs index d254b29..996d22e 100644 --- a/src/Jiaowu.Api/Controllers/StudentStatusChangesController.cs +++ b/src/Jiaowu.Api/Controllers/StudentStatusChangesController.cs @@ -78,7 +78,7 @@ public sealed class StudentStatusChangesController( { var userId = currentUserDataScope.Current.UserId; var student = await db.Students.AsNoTracking() - .Include(x => x.AdministrativeClass) + .Include(x => x.AdministrativeClass).ThenInclude(x => x!.Major) .FirstOrDefaultAsync(x => x.UserId == userId, token); if (student is null) return ConflictProblem("当前账号未关联学生档案。"); @@ -89,6 +89,8 @@ public sealed class StudentStatusChangesController( StudentStatusChangeType.Suspension, StudentStatusChangeType.Enlistment, StudentStatusChangeType.Demotion, + StudentStatusChangeType.ClassTransfer, + StudentStatusChangeType.MajorTransfer, StudentStatusChangeType.Withdrawal }, StudentStatus.Suspended or StudentStatus.Retained => new[] @@ -107,7 +109,8 @@ public sealed class StudentStatusChangesController( x.StudentId == student.Id && x.Type == StudentStatusChangeType.Enlistment && x.State == StudentStatusChangeState.Approved, token); return Ok(new { student.Status, Types = types, HasPending = hasPending, CurrentClassId = student.AdministrativeClassId, MajorId = student.AdministrativeClass!.MajorId, - CurrentGrade = student.AdministrativeClass.Grade, RequiresDischargeDate = hasEnlistment }); + CurrentGrade = student.AdministrativeClass.Grade, CollegeId = student.AdministrativeClass.Major!.CollegeId, + RequiresDischargeDate = hasEnlistment }); } [HttpGet("{id:guid}/course-impact")] @@ -116,7 +119,7 @@ public sealed class StudentStatusChangesController( var change = await ScopedChanges().Include(x => x.Student) .FirstOrDefaultAsync(x => x.Id == id, token); if (change is null) return NotFound(); - if (change.Type is not (StudentStatusChangeType.Suspension or StudentStatusChangeType.Withdrawal or StudentStatusChangeType.Enlistment or StudentStatusChangeType.Demotion)) + if (change.Type is not (StudentStatusChangeType.Suspension or StudentStatusChangeType.Withdrawal or StudentStatusChangeType.Enlistment or StudentStatusChangeType.Demotion or StudentStatusChangeType.ClassTransfer or StudentStatusChangeType.MajorTransfer)) return Ok(new { Items = Array.Empty() }); if (change.AffectedTermId is null) return ConflictProblem("该申请缺少受影响学期,请重新提交申请。"); @@ -143,6 +146,8 @@ public sealed class StudentStatusChangesController( StudentStatus.Retained, StudentStatusChangeType.Demotion when student.Status == StudentStatus.Active => StudentStatus.Active, + StudentStatusChangeType.ClassTransfer or StudentStatusChangeType.MajorTransfer when student.Status == StudentStatus.Active => + StudentStatus.Active, StudentStatusChangeType.Resumption when student.Status is StudentStatus.Suspended or StudentStatus.Retained => StudentStatus.Active, StudentStatusChangeType.Withdrawal when student.Status is StudentStatus.Active or StudentStatus.Suspended or StudentStatus.Retained => @@ -163,7 +168,7 @@ public sealed class StudentStatusChangesController( request.DischargeDate < lastEnlistment.ServiceStartDate)) return ValidationProblem("退役复学须填写不晚于今天且不早于入伍日期的退役日期。"); } - if (request.Type is StudentStatusChangeType.Suspension or StudentStatusChangeType.Withdrawal or StudentStatusChangeType.Enlistment or StudentStatusChangeType.Resumption or StudentStatusChangeType.Demotion) + if (request.Type is StudentStatusChangeType.Suspension or StudentStatusChangeType.Withdrawal or StudentStatusChangeType.Enlistment or StudentStatusChangeType.Resumption or StudentStatusChangeType.Demotion or StudentStatusChangeType.ClassTransfer or StudentStatusChangeType.MajorTransfer) { var term = await db.AcademicTerms.AsNoTracking().FirstOrDefaultAsync( x => x.Id == request.AffectedTermId, token); @@ -172,14 +177,16 @@ public sealed class StudentStatusChangesController( if (term.StartDate > DateOnly.FromDateTime(DateTime.UtcNow)) return ValidationProblem("异动当前在批准后立即生效,不能选择尚未开始的学期。"); } - if (request.Type is StudentStatusChangeType.Resumption or StudentStatusChangeType.Demotion) + if (request.Type is StudentStatusChangeType.Resumption or StudentStatusChangeType.Demotion or StudentStatusChangeType.ClassTransfer or StudentStatusChangeType.MajorTransfer) { var originalClass = await db.AdministrativeClasses.AsNoTracking() + .Include(x => x.Major) .SingleAsync(x => x.Id == student.AdministrativeClassId, token); var targetClass = await db.AdministrativeClasses.AsNoTracking() + .Include(x => x.Major) .FirstOrDefaultAsync(x => x.Id == request.TargetClassId && x.IsEnabled, token); - if (targetClass is null || targetClass.MajorId != originalClass.MajorId) - return ValidationProblem("须选择本专业的有效目标班级;跨专业调整需另行审批。"); + if (targetClass is null || !ValidTargetClass(request.Type, originalClass, targetClass)) + return ValidationProblem("目标班级不符合异动类型要求;跨学院转专业须另行办理。"); if (request.Type == StudentStatusChangeType.Demotion && targetClass.Grade <= originalClass.Grade) return ValidationProblem("降级目标班级须属于本专业的较低年级。"); } @@ -194,7 +201,7 @@ public sealed class StudentStatusChangesController( OriginalStatus = student.Status, TargetStatus = target.Value, Reason = request.Reason.Trim(), AffectedTermId = request.AffectedTermId, OriginalClassId = student.AdministrativeClassId, - TargetClassId = request.Type is StudentStatusChangeType.Resumption or StudentStatusChangeType.Demotion ? request.TargetClassId : null, + TargetClassId = request.Type is StudentStatusChangeType.Resumption or StudentStatusChangeType.Demotion or StudentStatusChangeType.ClassTransfer or StudentStatusChangeType.MajorTransfer ? request.TargetClassId : null, ServiceStartDate = request.Type == StudentStatusChangeType.Enlistment ? request.ServiceStartDate : null, DischargeDate = request.Type == StudentStatusChangeType.Resumption ? request.DischargeDate : null }; @@ -294,14 +301,14 @@ public sealed class StudentStatusChangesController( } change.Student.AdministrativeClassId = targetClass.Id; } - if (change.Type == StudentStatusChangeType.Demotion) + if (change.Type is StudentStatusChangeType.Demotion or StudentStatusChangeType.ClassTransfer or StudentStatusChangeType.MajorTransfer) { - var originalClass = await db.AdministrativeClasses.AsNoTracking().SingleAsync(x => x.Id == change.Student.AdministrativeClassId, token); - var targetClass = await db.AdministrativeClasses.AsNoTracking().FirstOrDefaultAsync(x => x.Id == change.TargetClassId && - x.IsEnabled && x.MajorId == originalClass.MajorId && x.Grade > originalClass.Grade, token); - if (targetClass is null) return ConflictProblem("降级目标班级已不可用或不符合年级要求。"); + var originalClass = await db.AdministrativeClasses.AsNoTracking().Include(x => x.Major).SingleAsync(x => x.Id == change.Student.AdministrativeClassId, token); + var targetClass = await db.AdministrativeClasses.AsNoTracking().Include(x => x.Major).FirstOrDefaultAsync(x => x.Id == change.TargetClassId && x.IsEnabled, token); + if (targetClass is null || !ValidTargetClass(change.Type, originalClass, targetClass)) + return ConflictProblem("目标班级已不可用或不符合异动要求。"); } - if (change.Type is StudentStatusChangeType.Suspension or StudentStatusChangeType.Withdrawal or StudentStatusChangeType.Enlistment or StudentStatusChangeType.Demotion) + if (change.Type is StudentStatusChangeType.Suspension or StudentStatusChangeType.Withdrawal or StudentStatusChangeType.Enlistment or StudentStatusChangeType.Demotion or StudentStatusChangeType.ClassTransfer or StudentStatusChangeType.MajorTransfer) { if (change.AffectedTermId is null) return ConflictProblem("该申请缺少受影响学期,请驳回后重新提交。"); @@ -345,7 +352,7 @@ public sealed class StudentStatusChangesController( enrollment.WithdrawnAt = reviewedAt; } } - if (change.Type == StudentStatusChangeType.Demotion) + if (change.Type is StudentStatusChangeType.Demotion or StudentStatusChangeType.ClassTransfer or StudentStatusChangeType.MajorTransfer) { var start = (await db.AcademicTerms.AsNoTracking().SingleAsync(x => x.Id == change.AffectedTermId, token)).StartDate; var oldTargetTasks = await db.TeachingTasks.AsNoTracking().Where(x => x.AcademicTerm!.StartDate < start && @@ -393,11 +400,11 @@ public sealed class StudentStatusChangesController( var term = await db.AcademicTerms.AsNoTracking().SingleAsync(x => x.Id == change.AffectedTermId, token); var studentId = change.StudentId; var classId = change.Student!.AdministrativeClassId; - var isDemotion = change.Type == StudentStatusChangeType.Demotion; + var isClassMove = change.Type is StudentStatusChangeType.Demotion or StudentStatusChangeType.ClassTransfer or StudentStatusChangeType.MajorTransfer; var targetClassId = change.TargetClassId; var tasks = await db.TeachingTasks.AsNoTracking() .Where(x => x.AcademicTerm!.StartDate >= term.StartDate && - (isDemotion + (isClassMove ? x.Classes.Any(c => c.AdministrativeClassId == classId) && !x.Classes.Any(c => c.AdministrativeClassId == targetClassId) : x.Classes.Any(c => c.AdministrativeClassId == classId) || @@ -492,6 +499,15 @@ public sealed class StudentStatusChangesController( _ => false }; + private static bool ValidTargetClass(StudentStatusChangeType type, AdministrativeClass original, AdministrativeClass target) => type switch + { + StudentStatusChangeType.Resumption => target.MajorId == original.MajorId, + StudentStatusChangeType.Demotion => target.MajorId == original.MajorId && target.Grade > original.Grade, + StudentStatusChangeType.ClassTransfer => target.Id != original.Id && target.MajorId == original.MajorId && target.Grade == original.Grade, + StudentStatusChangeType.MajorTransfer => target.MajorId != original.MajorId && target.Major!.CollegeId == original.Major!.CollegeId, + _ => false + }; + private ActionResult ConflictProblem(string detail) => Conflict(new ProblemDetails { Title = "无法完成学籍异动操作", Detail = detail, diff --git a/src/Jiaowu.Api/Domain/Academic/StudentStatusChange.cs b/src/Jiaowu.Api/Domain/Academic/StudentStatusChange.cs index 4d8d971..bd85ce8 100644 --- a/src/Jiaowu.Api/Domain/Academic/StudentStatusChange.cs +++ b/src/Jiaowu.Api/Domain/Academic/StudentStatusChange.cs @@ -53,7 +53,9 @@ public enum StudentStatusChangeType Resumption = 2, Withdrawal = 3, Enlistment = 4, - Demotion = 5 + Demotion = 5, + ClassTransfer = 6, + MajorTransfer = 7 } public enum StudentStatusChangeState diff --git a/tests/Jiaowu.Api.Tests/ApprovalsControllerTests.cs b/tests/Jiaowu.Api.Tests/ApprovalsControllerTests.cs index f7915ba..d7d4d7f 100644 --- a/tests/Jiaowu.Api.Tests/ApprovalsControllerTests.cs +++ b/tests/Jiaowu.Api.Tests/ApprovalsControllerTests.cs @@ -543,6 +543,44 @@ public sealed class ApprovalsControllerTests Assert.DoesNotContain(effects, x => x.TeachingTaskId == sharedTask.Id); } + [Fact] + public async Task Same_college_major_transfer_records_new_class_and_retains_original_enrollment_year() + { + await using var fixture = await ApprovalFixture.CreateAsync(); + var major = new Major { Code = "NEW", Name = "新专业", CollegeId = fixture.CurrentCourse.CollegeId, DegreeType = "工学" }; + var target = new AdministrativeClass { Code = "NEW26", Name = "新专业班", MajorId = major.Id, Grade = 2026 }; + fixture.Db.AddRange(major, target); + await fixture.Db.SaveChangesAsync(); + var applicant = new StudentStatusChangesController(fixture.Db, new StudentDataScope(fixture.Student.UserId!.Value)); + Assert.IsType(await applicant.Create(new StudentStatusChangeRequest(StudentStatusChangeType.MajorTransfer, + "申请转入本学院的新专业", fixture.CurrentTerm.Id, target.Id), CancellationToken.None)); + var change = await fixture.Db.StudentStatusChanges.SingleAsync(); + change.State = StudentStatusChangeState.CollegeApproved; + await fixture.Db.SaveChangesAsync(); + var reviewer = new StudentStatusChangesController(fixture.Db, new ManagerDataScope()); + Assert.IsType(await reviewer.Review(change.Id, new StudentStatusReviewRequest(true, null), CancellationToken.None)); + var student = await fixture.Db.Students.FindAsync(fixture.Student.Id); + Assert.Equal(target.Id, student!.AdministrativeClassId); + Assert.Equal(2026, student.EnrollmentYear); + Assert.Contains(await fixture.Db.StudentStatusChangeCourseEffects.ToListAsync(), x => x.TeachingTaskId == fixture.CurrentTask.Id); + } + + [Fact] + public async Task Cross_college_major_transfer_is_not_accepted_by_same_college_workflow() + { + await using var fixture = await ApprovalFixture.CreateAsync(); + var college = new College { Code = "OTHER-C", Name = "其他学院" }; + var major = new Major { Code = "OTHER-M", Name = "其他专业", CollegeId = college.Id, DegreeType = "工学" }; + var target = new AdministrativeClass { Code = "OTHER-26", Name = "其他班", MajorId = major.Id, Grade = 2026 }; + fixture.Db.AddRange(college, major, target); + await fixture.Db.SaveChangesAsync(); + var applicant = new StudentStatusChangesController(fixture.Db, new StudentDataScope(fixture.Student.UserId!.Value)); + var result = await applicant.Create(new StudentStatusChangeRequest(StudentStatusChangeType.MajorTransfer, + "申请转入其他学院专业", fixture.CurrentTerm.Id, target.Id), CancellationToken.None); + Assert.IsAssignableFrom(Assert.IsType(result).Value); + Assert.Empty(await fixture.Db.StudentStatusChanges.ToListAsync()); + } + [Fact] public async Task Legacy_student_status_progress_discloses_missing_history() { diff --git a/web/src/i18n/messages/en-US.ts b/web/src/i18n/messages/en-US.ts index 3b25dfc..c2b4837 100644 --- a/web/src/i18n/messages/en-US.ts +++ b/web/src/i18n/messages/en-US.ts @@ -246,12 +246,12 @@ export default { teachingPreferences: { teacherTitle: 'Teaching course applications', reviewerTitle: 'Teaching eligibility review', teacherDescription: 'Apply for courses you are willing to teach before scheduling. College approval is required before public-course teaching tasks can be assigned.', reviewerDescription: 'Review teacher applications or assign teachers directly. Approved teachers enter the eligible pool for the selected term and course.', apply: 'Apply for course', assign: 'Assign teacher directly', teacher: 'Teacher', selectTermSubject: 'Select term and course', college: 'College', reviewAssign: 'Review or assign directly', academicOffice: 'Academic affairs', mergeAssign: 'Merge classes and assign teacher', scheduling: 'Scheduling', generateTimetable: 'Generate timetable', allTerms: 'All terms', allStatuses: 'All statuses', refresh: 'Refresh', total: '{count} records', applicant: 'Applicant', course: 'Applied course', term: 'Term', statement: 'Application statement', status: 'Status', reviewComment: 'Review comment', actions: 'Actions', withdraw: 'Withdraw', review: 'Review', processed: 'Processed', emptyTeacher: 'No teaching course applications', emptyReviewer: 'No applications awaiting review', submitTitle: 'Apply for a teaching course', proposedCourse: 'Proposed course', statementPlaceholder: 'Describe relevant teaching experience, research interests, or other context', cancel: 'Cancel', submitReview: 'Submit for college review', reviewTitle: 'Review teaching eligibility', teacherStatement: 'Teacher statement', notProvided: 'Not provided', conclusion: 'Decision', approve: 'Approve', reject: 'Reject', confirmReview: 'Confirm review', assignmentTitle: 'Assign teaching eligibility directly', assignmentHint: 'No teacher application is required. Saving immediately grants eligibility for the selected term and course.', teacherPlaceholder: 'Select by employee number or name', courseLabel: 'Course', coursePlaceholder: 'Select by code or name', credits: '{count} credits', assignmentComment: 'Assignment note', assignmentPlaceholder: 'Enter department arrangements, specialization, or other basis', confirmAssign: 'Confirm assignment', statuses: { Pending: 'Pending review', Approved: 'Approved', Rejected: 'Rejected', Withdrawn: 'Withdrawn' }, messages: { selectTermCourse: 'Select a term and course.', submitted: 'Course application submitted for college review.', withdrawConfirm: 'Withdraw the teaching application for “{course}”?', withdrawTitle: 'Withdraw application', approved: 'Application approved.', rejected: 'Application rejected.', selectAll: 'Select a term, teacher, and course.', assigned: 'Teaching eligibility assigned directly.' }, }, - statusChangeImpact: { classTransition: 'Class change', demotionTermHint: 'Incomplete classes exclusive to the original class are removed; shared classes and independent electives are kept.', resumptionTerm: 'Resumption term', resumptionTermHint: 'Takes effect upon approval; classes missed during leave are not automatically added.', serviceDate: 'Enlistment date', serviceDateRequired: 'Select the enlistment date', dischargeDate: 'Discharge date', dischargeDateRequired: 'Select the discharge date', retained: 'Status retained', targetClass: 'Target class', targetClassRequired: 'Select the target class', targetClassHint: 'Select an active class in the original major; a change of major requires separate approval.', affectedTerm: 'First affected term', affectedTermRequired: 'Select the first affected term', affectedTermHint: 'Incomplete courses from this term onward will be removed; valid results will be retained.', courseImpact: 'Course impact preview', courseImpactHint: 'The final review recalculates this list. Unpublished or exceptional results require prior review.', course: 'Teaching class', disposition: 'Disposition', impact: { Remove: 'Remove course', RemoveEmptyGrade: 'Remove course and empty grade row', KeepGrade: 'Keep valid result', ReviewRequired: 'Review grade first' } }, + statusChangeImpact: { majorTransferHint: 'Transfers are limited to the same college; cross-college transfers require separate receiving-college review. Course recognition is handled under university rules.', classTransition: 'Class change', demotionTermHint: 'Incomplete classes exclusive to the original class are removed; shared classes and independent electives are kept.', resumptionTerm: 'Resumption term', resumptionTermHint: 'Takes effect upon approval; classes missed during leave are not automatically added.', serviceDate: 'Enlistment date', serviceDateRequired: 'Select the enlistment date', dischargeDate: 'Discharge date', dischargeDateRequired: 'Select the discharge date', retained: 'Status retained', targetClass: 'Target class', targetClassRequired: 'Select the target class', targetClassHint: 'Select an active class in the original major; a change of major requires separate approval.', affectedTerm: 'First affected term', affectedTermRequired: 'Select the first affected term', affectedTermHint: 'Incomplete courses from this term onward will be removed; valid results will be retained.', courseImpact: 'Course impact preview', courseImpactHint: 'The final review recalculates this list. Unpublished or exceptional results require prior review.', course: 'Teaching class', disposition: 'Disposition', impact: { Remove: 'Remove course', RemoveEmptyGrade: 'Remove course and empty grade row', KeepGrade: 'Keep valid result', ReviewRequired: 'Review grade first' } }, performance: { title: 'System performance', description: 'Trace response-time costs from API endpoints into the database.', rangeAria: 'Performance report time range', refreshAria: 'Refresh performance report', notConfigured: 'Waiting for a performance data source', unavailable: 'Performance data is unavailable', fallbackNote: 'Business APIs continue operating normally. The report will not fall back to reading the academic business database.', openDashboard: 'Open monitoring platform', sampleConclusion: 'Sample conclusion', requestCount: 'Total requests', endpointP95: 'Endpoint P95', errorRate: '5xx rate', databaseP95: 'Database P95', slowQueries: 'Slow queries', queryFailures: 'Query failures', chartAria: 'Request rate and endpoint P95 trend', noSamples: 'The data source is connected, but no request metrics were received in this time range.', endpointRanking: 'Endpoint latency ranking', endpointMetrics: 'P95 / requests / 5xx', endpointCounts: '{count} requests · {errors} errors', noEndpoints: 'No endpoint metrics in this range.', databaseRanking: 'Database query ranking', databaseMetrics: 'P95 / calls / slow queries', databaseCounts: '{count} calls · {slow} slow', noDatabase: 'No database metrics in this range.', generatedAt: 'Generated {date} · Page data uses a short cache', viewTraces: 'View raw traces', requestsPerSecond: 'Requests / second', requestRate: 'Request rate', ranges: { '15m': '15 minutes', '1h': '1 hour', '24h': '24 hours', '7d': '7 days' }, notes: { waiting: 'Waiting for metric samples', failedDatabase: 'Database command failures detected', serverErrors: 'Server error rate needs attention', slowQueries: 'Queries exceeded the slow-query threshold', healthy: 'No significant anomalies in the current sample window' }, }, appUpdates: { title: 'App web hot updates', description: 'Upload a built ZIP and publish by native version and channel, retaining previous packages for fast rollback.', refresh: 'Refresh', upload: 'Upload update', boundary: 'Release boundary', webOnly: 'HTML, JavaScript, CSS, and static assets only', nativeBoundary: 'New native plugins, permissions, or Android/iOS code require a new native release', autoRollback: 'The app automatically returns to the last usable version if an update fails', allPlatforms: 'All platforms', allChannels: 'All channels', production: 'Production channel', staging: 'Staging channel', search: 'Search', version: 'Version', nativeVersionValue: 'Native {version}', target: 'Target', status: 'Status', releaseNotes: 'Release notes', bundle: 'Update bundle', time: 'Time', actions: 'Actions', rollback: 'Roll back to this version', publish: 'Publish', delete: 'Delete', active: 'Currently active', empty: 'No App hot-update packages uploaded.', previous: 'Previous batch', page: 'Batch {page}', next: 'Next batch', uploadTitle: 'Upload App hot update', platform: 'Platform', channel: 'Channel', hotVersion: 'Hot-update version', versionPlaceholder: 'For example 1.0.1', compatibleNative: 'Compatible native version', nativePlaceholder: 'Current Android version: 1.0', notesPlaceholder: 'Describe the fixes without including sensitive information.', updateZip: 'Update ZIP', selectZip: 'Select ZIP', zipHint: 'Maximum 30 MB. index.html must be directly in the ZIP root.', cancel: 'Cancel', uploadDraft: 'Upload as draft', confirmRollback: 'Confirm rollback', channels: { Production: 'Production', Staging: 'Staging' }, statuses: { Published: 'Published', Archived: 'Archived', Draft: 'Draft' }, messages: { selectZip: 'Select an update ZIP.', versionRequired: 'Enter the hot-update version and compatible native version.', uploaded: 'Update uploaded as a draft. Review it before publishing.', rollbackConfirm: 'Roll back the {platform} {native} production channel to {version}. Newly started apps will download this version.', publishConfirm: 'Publish {version}? The currently active update for the same platform, channel, and native version will be archived.', rollbackTitle: 'Confirm version rollback', publishTitle: 'Confirm update publication', rolledBack: 'Rolled back to the selected version.', published: 'Update published.', deleteConfirm: 'Permanently delete the {version} release history and ZIP package ({file})? Installed versions are unaffected, and this cannot be recovered.', deleteTitle: 'Delete update package', deleted: 'Release history and update package deleted.' } }, - statusChanges: { studentTitle: 'Student status change application', reviewTitle: 'Student status change review', studentDescription: 'Apply online for suspension, resumption, or withdrawal and track every review stage.', reviewDescription: 'Review applications through counselor, college, and university levels. The final result updates the student record.', apply: 'Start application', refresh: 'Refresh queue', pendingHint: 'An application is currently in progress. Wait for it to be processed.', availableHint: 'You can submit a new student status change application.', availableTypes: 'Available applications', noAvailableTypes: 'No applications are available for the current status', actionable: 'Awaiting my review', total: 'Applications in scope', finished: 'Finished', itemUnit: 'items', securityNote: 'Only actions for the current review level are available. The server rejects every attempt to bypass levels.', applicationTitle: '{name} · {type} application', transition: '{from} → {to} · Submitted {date}', reason: 'Application statement', stepPassed: 'Passed', stepActive: 'In progress', stepWaiting: 'Waiting', latestComment: 'Latest review comment', processId: 'Process ID', cancelApplication: 'Withdraw application', reject: 'Reject', approve: 'Approve', emptyStudent: 'No student status change applications submitted', emptyReviewer: 'No student status change applications in this scope', applyTitle: 'Start student status change application', type: 'Application type', reasonPlaceholder: 'Describe the reason, expected timing, and anything the university should know (at least 10 characters)', cancel: 'Cancel', submit: 'Submit application', approveTitle: 'Approve application', rejectTitle: 'Reject application', optionalComment: 'Review comment (optional)', requiredReason: 'Rejection reason (required)', confirmApprove: 'Confirm approval', confirmReject: 'Confirm rejection', confirmCancel: 'Confirm withdrawal', types: { Suspension: 'Suspension', Resumption: 'Resumption', Withdrawal: 'Withdrawal', Enlistment: 'Enlistment and retained status', Demotion: 'Move to a lower year' }, statuses: { Active: 'Active', Suspended: 'Suspended', Retained: 'Status retained', Withdrawn: 'Withdrawn', Graduated: 'Graduated' }, states: { Submitted: 'Awaiting counselor review', CounselorApproved: 'Awaiting college review', CollegeApproved: 'Awaiting university review', Approved: 'Approved', Rejected: 'Rejected', Cancelled: 'Withdrawn' }, steps: { Submitted: 'Counselor review', CounselorApproved: 'College review', CollegeApproved: 'University approval' }, messages: { invalidApplication: 'Select a change type and enter an application statement of at least 10 characters.', submitted: 'Application submitted for counselor review.', cancelConfirm: 'Withdrawing ends this application. You can submit another one later if needed.', cancelTitle: 'Withdraw application', cancelled: 'Application withdrawn.', commentRequired: 'A review comment is required when rejecting an application.', approved: 'Review approved. The application has moved to the next stage.', rejected: 'Application rejected.' } }, + statusChanges: { studentTitle: 'Student status change application', reviewTitle: 'Student status change review', studentDescription: 'Apply online for suspension, resumption, or withdrawal and track every review stage.', reviewDescription: 'Review applications through counselor, college, and university levels. The final result updates the student record.', apply: 'Start application', refresh: 'Refresh queue', pendingHint: 'An application is currently in progress. Wait for it to be processed.', availableHint: 'You can submit a new student status change application.', availableTypes: 'Available applications', noAvailableTypes: 'No applications are available for the current status', actionable: 'Awaiting my review', total: 'Applications in scope', finished: 'Finished', itemUnit: 'items', securityNote: 'Only actions for the current review level are available. The server rejects every attempt to bypass levels.', applicationTitle: '{name} · {type} application', transition: '{from} → {to} · Submitted {date}', reason: 'Application statement', stepPassed: 'Passed', stepActive: 'In progress', stepWaiting: 'Waiting', latestComment: 'Latest review comment', processId: 'Process ID', cancelApplication: 'Withdraw application', reject: 'Reject', approve: 'Approve', emptyStudent: 'No student status change applications submitted', emptyReviewer: 'No student status change applications in this scope', applyTitle: 'Start student status change application', type: 'Application type', reasonPlaceholder: 'Describe the reason, expected timing, and anything the university should know (at least 10 characters)', cancel: 'Cancel', submit: 'Submit application', approveTitle: 'Approve application', rejectTitle: 'Reject application', optionalComment: 'Review comment (optional)', requiredReason: 'Rejection reason (required)', confirmApprove: 'Confirm approval', confirmReject: 'Confirm rejection', confirmCancel: 'Confirm withdrawal', types: { Suspension: 'Suspension', Resumption: 'Resumption', Withdrawal: 'Withdrawal', Enlistment: 'Enlistment and retained status', Demotion: 'Move to a lower year', ClassTransfer: 'Change class', MajorTransfer: 'Change major within college' }, statuses: { Active: 'Active', Suspended: 'Suspended', Retained: 'Status retained', Withdrawn: 'Withdrawn', Graduated: 'Graduated' }, states: { Submitted: 'Awaiting counselor review', CounselorApproved: 'Awaiting college review', CollegeApproved: 'Awaiting university review', Approved: 'Approved', Rejected: 'Rejected', Cancelled: 'Withdrawn' }, steps: { Submitted: 'Counselor review', CounselorApproved: 'College review', CollegeApproved: 'University approval' }, messages: { invalidApplication: 'Select a change type and enter an application statement of at least 10 characters.', submitted: 'Application submitted for counselor review.', cancelConfirm: 'Withdrawing ends this application. You can submit another one later if needed.', cancelTitle: 'Withdraw application', cancelled: 'Application withdrawn.', commentRequired: 'A review comment is required when rejecting an application.', approved: 'Review approved. The application has moved to the next stage.', rejected: 'Application rejected.' } }, api: { 'data.constraint_conflict': 'A data constraint conflict occurred.', 'server.unhandled_error': 'The server encountered an error while processing the request.', diff --git a/web/src/i18n/messages/zh-CN.ts b/web/src/i18n/messages/zh-CN.ts index 32e63fe..509b978 100644 --- a/web/src/i18n/messages/zh-CN.ts +++ b/web/src/i18n/messages/zh-CN.ts @@ -246,12 +246,12 @@ export default { teachingPreferences: { teacherTitle: '授课科目申报', reviewerTitle: '授课资格审核', teacherDescription: '在排课前申报本学期愿意承担的课程,学院审核通过后才能分配公共课教学任务。', reviewerDescription: '审核教师申报,或由学院直接指定教师;通过后进入相应学期和课程的可分配教师池。', apply: '申报课程', assign: '直接分配教师', teacher: '教师', selectTermSubject: '选择学期与科目', college: '学院', reviewAssign: '审核或直接分配', academicOffice: '教务', mergeAssign: '合班并分配教师', scheduling: '排课', generateTimetable: '生成课表', allTerms: '全部学期', allStatuses: '全部状态', refresh: '刷新', total: '共 {count} 条', applicant: '申报教师', course: '申报课程', term: '学期', statement: '申报说明', status: '状态', reviewComment: '审核意见', actions: '操作', withdraw: '撤回', review: '审核', processed: '已处理', emptyTeacher: '尚未申报授课科目', emptyReviewer: '没有待处理的授课申报', submitTitle: '申报授课科目', proposedCourse: '拟授课程', statementPlaceholder: '可填写相关教学经历、研究方向或其他说明', cancel: '取消', submitReview: '提交学院审核', reviewTitle: '审核授课资格', teacherStatement: '教师说明', notProvided: '未填写', conclusion: '审核结论', approve: '通过', reject: '驳回', confirmReview: '确认审核', assignmentTitle: '直接分配授课教师', assignmentHint: '无需教师先申报,保存后立即取得所选学期与课程的授课资格。', teacherPlaceholder: '按工号或姓名选择', courseLabel: '课程', coursePlaceholder: '按编码或名称选择', credits: '{count} 学分', assignmentComment: '分配说明', assignmentPlaceholder: '可填写教研室安排、专业方向等依据', confirmAssign: '确认分配', statuses: { Pending: '待审核', Approved: '已通过', Rejected: '已驳回', Withdrawn: '已撤回' }, messages: { selectTermCourse: '请选择学期和课程。', submitted: '课程申报已提交,等待学院审核。', withdrawConfirm: '撤回“{course}”的授课申报?', withdrawTitle: '撤回申报', approved: '已审核通过。', rejected: '已驳回申报。', selectAll: '请选择学期、教师和课程。', assigned: '授课资格已直接分配。' }, }, - statusChangeImpact: { classTransition: '班级变化', demotionTermHint: '退出原班级独有的未完成教学班;两班共用的教学班和独立选修课保留。', resumptionTerm: '复学生效学期', resumptionTermHint: '批准后立即生效;休学期间落下的教学班不会自动加入名单。', serviceDate: '入伍日期', serviceDateRequired: '请选择入伍日期', dischargeDate: '退役日期', dischargeDateRequired: '请选择退役日期', retained: '保留学籍', targetClass: '目标班级', targetClassRequired: '请选择目标班级', targetClassHint: '请选择原专业的有效班级,跨专业调整需另行审批。', affectedTerm: '受影响起始学期', affectedTermRequired: '请选择受影响起始学期', affectedTermHint: '该学期及之后未完成的课程将退出;已形成有效成绩的课程保留。', courseImpact: '课程影响预览', courseImpactHint: '终审时会重新计算。未发布或异常成绩需先由教务处理。', course: '教学班', disposition: '处理方式', impact: { Remove: '退出课程', RemoveEmptyGrade: '退出课程并移除空白成绩行', KeepGrade: '保留有效成绩', ReviewRequired: '成绩需先处理' } }, + statusChangeImpact: { majorTransferHint: '仅支持院内转专业;跨学院需另行办理转入学院审核。课程认定仍需按学校规定办理。', classTransition: '班级变化', demotionTermHint: '退出原班级独有的未完成教学班;两班共用的教学班和独立选修课保留。', resumptionTerm: '复学生效学期', resumptionTermHint: '批准后立即生效;休学期间落下的教学班不会自动加入名单。', serviceDate: '入伍日期', serviceDateRequired: '请选择入伍日期', dischargeDate: '退役日期', dischargeDateRequired: '请选择退役日期', retained: '保留学籍', targetClass: '目标班级', targetClassRequired: '请选择目标班级', targetClassHint: '请选择原专业的有效班级,跨专业调整需另行审批。', affectedTerm: '受影响起始学期', affectedTermRequired: '请选择受影响起始学期', affectedTermHint: '该学期及之后未完成的课程将退出;已形成有效成绩的课程保留。', courseImpact: '课程影响预览', courseImpactHint: '终审时会重新计算。未发布或异常成绩需先由教务处理。', course: '教学班', disposition: '处理方式', impact: { Remove: '退出课程', RemoveEmptyGrade: '退出课程并移除空白成绩行', KeepGrade: '保留有效成绩', ReviewRequired: '成绩需先处理' } }, performance: { title: '系统性能', description: '从接口进入数据库,定位响应时间消耗在哪里。', rangeAria: '性能报表时间范围', refreshAria: '刷新性能报表', notConfigured: '等待连接性能数据源', unavailable: '性能数据暂不可用', fallbackNote: '业务接口继续正常运行;报表不会回退读取教务业务数据库。', openDashboard: '打开监控平台', sampleConclusion: '采样结论', requestCount: '请求总量', endpointP95: '接口 P95', errorRate: '5xx 比例', databaseP95: '数据库 P95', slowQueries: '慢查询', queryFailures: '查询失败', chartAria: '请求速率与接口 P95 趋势图', noSamples: '数据源已连接,但该时间范围内尚未收到请求指标。', endpointRanking: '接口耗时排行', endpointMetrics: 'P95 / 请求量 / 5xx', endpointCounts: '{count} 次 · {errors} 错误', noEndpoints: '该范围内没有接口指标。', databaseRanking: '数据库查询排行', databaseMetrics: 'P95 / 调用量 / 慢查询', databaseCounts: '{count} 次 · {slow} 慢', noDatabase: '该范围内没有数据库指标。', generatedAt: '生成于 {date} · 页面数据采用短时缓存', viewTraces: '查看原始调用链', requestsPerSecond: '请求 / 秒', requestRate: '请求速率', ranges: { '15m': '15 分钟', '1h': '1 小时', '24h': '24 小时', '7d': '7 天' }, notes: { waiting: '等待指标样本', failedDatabase: '存在失败的数据库命令', serverErrors: '服务端错误率需要关注', slowQueries: '存在超过阈值的慢查询', healthy: '当前采样窗口内未见明显异常' }, }, appUpdates: { title: 'App 前端热更新', description: '上传构建后的 ZIP,按原生版本和通道发布;保留历史包用于快速回滚。', refresh: '刷新', upload: '上传更新包', boundary: '发布边界', webOnly: '仅限 HTML、JavaScript、CSS 和静态资源', nativeBoundary: '新增原生插件、权限或 Android/iOS 代码必须重新发版', autoRollback: '更新失败时 App 自动回退到上一个可用版本', allPlatforms: '全部平台', allChannels: '全部通道', production: '正式通道', staging: '测试通道', search: '查询', version: '版本', nativeVersionValue: '原生 {version}', target: '目标', status: '状态', releaseNotes: '更新说明', bundle: '更新包', time: '时间', actions: '操作', rollback: '回滚至此版本', publish: '发布', delete: '删除', active: '当前生效', empty: '尚未上传 App 热更新包。', previous: '上一批', page: '第 {page} 批', next: '下一批', uploadTitle: '上传 App 热更新包', platform: '平台', channel: '通道', hotVersion: '热更新版本', versionPlaceholder: '例如 1.0.1', compatibleNative: '兼容的原生版本', nativePlaceholder: '当前 Android 为 1.0', notesPlaceholder: '说明本次修复内容,不要包含敏感信息。', updateZip: '更新 ZIP', selectZip: '选择 ZIP', zipHint: '最大 30 MB,ZIP 根目录必须直接包含 index.html。', cancel: '取消', uploadDraft: '上传为草稿', confirmRollback: '确认回滚', channels: { Production: '正式', Staging: '测试' }, statuses: { Published: '已发布', Archived: '已归档', Draft: '草稿' }, messages: { selectZip: '请选择更新 ZIP。', versionRequired: '请填写热更新版本和兼容的原生版本。', uploaded: '更新包已上传为草稿,确认无误后再发布。', rollbackConfirm: '将把 {platform} {native} 的正式通道回滚到 {version}。新启动的 App 将下载此版本。', publishConfirm: '确认发布 {version}?同平台、通道和原生版本下当前生效的更新将自动归档。', rollbackTitle: '确认版本回滚', publishTitle: '确认发布更新', rolledBack: '已回滚到指定版本。', published: '更新已发布。', deleteConfirm: '将永久删除 {version} 的发布历史和 ZIP 更新包({file})。此操作不会影响已安装到设备的版本,且不可恢复。', deleteTitle: '删除更新包', deleted: '发布历史和更新包已删除。' } }, - statusChanges: { studentTitle: '学籍异动申请', reviewTitle: '学籍异动审核', studentDescription: '在线办理休学、复学或退学申请,清晰跟踪每一级审核进度。', reviewDescription: '按辅导员、学院、学校三级权限逐级审核,最终结果同步学生学籍。', apply: '发起申请', refresh: '刷新队列', pendingHint: '当前有申请正在流转,请等待处理。', availableHint: '当前可以提交新的学籍异动申请。', availableTypes: '可申请业务', noAvailableTypes: '当前状态无可申请业务', actionable: '当前待我审核', total: '辖区申请总数', finished: '已结束', itemUnit: '件', securityNote: '系统仅开放当前审核层级的操作,所有越级请求都会由服务端拒绝。', applicationTitle: '{name} · {type}申请', transition: '{from} → {to} · 提交于 {date}', reason: '申请说明', stepPassed: '已通过', stepActive: '处理中', stepWaiting: '待流转', latestComment: '最近审核意见', processId: '流程编号', cancelApplication: '撤回申请', reject: '驳回', approve: '审核通过', emptyStudent: '尚未提交学籍异动申请', emptyReviewer: '当前辖区暂无学籍异动申请', applyTitle: '发起学籍异动申请', type: '申请类型', reasonPlaceholder: '请说明申请原因、预计时间以及需要学校了解的情况(至少 10 个字)', cancel: '取消', submit: '提交申请', approveTitle: '审核通过', rejectTitle: '驳回申请', optionalComment: '审核意见(选填)', requiredReason: '驳回原因(必填)', confirmApprove: '确认通过', confirmReject: '确认驳回', confirmCancel: '确认撤回', types: { Suspension: '休学', Resumption: '复学', Withdrawal: '退学', Enlistment: '入伍保留学籍', Demotion: '降级' }, statuses: { Active: '在籍', Suspended: '休学', Retained: '保留学籍', Withdrawn: '退学', Graduated: '毕业' }, states: { Submitted: '待辅导员审核', CounselorApproved: '待学院审核', CollegeApproved: '待校级审核', Approved: '已批准', Rejected: '已驳回', Cancelled: '已撤回' }, steps: { Submitted: '辅导员审核', CounselorApproved: '学院审核', CollegeApproved: '校级审批' }, messages: { invalidApplication: '请选择异动类型,并填写至少 10 个字的申请说明。', submitted: '申请已提交,等待辅导员审核。', cancelConfirm: '撤回后本次申请将结束,需要时可重新提交。', cancelTitle: '撤回申请', cancelled: '申请已撤回。', commentRequired: '驳回申请时必须填写审核意见。', approved: '审核已通过,申请进入下一环节。', rejected: '申请已驳回。' } }, + statusChanges: { studentTitle: '学籍异动申请', reviewTitle: '学籍异动审核', studentDescription: '在线办理休学、复学或退学申请,清晰跟踪每一级审核进度。', reviewDescription: '按辅导员、学院、学校三级权限逐级审核,最终结果同步学生学籍。', apply: '发起申请', refresh: '刷新队列', pendingHint: '当前有申请正在流转,请等待处理。', availableHint: '当前可以提交新的学籍异动申请。', availableTypes: '可申请业务', noAvailableTypes: '当前状态无可申请业务', actionable: '当前待我审核', total: '辖区申请总数', finished: '已结束', itemUnit: '件', securityNote: '系统仅开放当前审核层级的操作,所有越级请求都会由服务端拒绝。', applicationTitle: '{name} · {type}申请', transition: '{from} → {to} · 提交于 {date}', reason: '申请说明', stepPassed: '已通过', stepActive: '处理中', stepWaiting: '待流转', latestComment: '最近审核意见', processId: '流程编号', cancelApplication: '撤回申请', reject: '驳回', approve: '审核通过', emptyStudent: '尚未提交学籍异动申请', emptyReviewer: '当前辖区暂无学籍异动申请', applyTitle: '发起学籍异动申请', type: '申请类型', reasonPlaceholder: '请说明申请原因、预计时间以及需要学校了解的情况(至少 10 个字)', cancel: '取消', submit: '提交申请', approveTitle: '审核通过', rejectTitle: '驳回申请', optionalComment: '审核意见(选填)', requiredReason: '驳回原因(必填)', confirmApprove: '确认通过', confirmReject: '确认驳回', confirmCancel: '确认撤回', types: { Suspension: '休学', Resumption: '复学', Withdrawal: '退学', Enlistment: '入伍保留学籍', Demotion: '降级', ClassTransfer: '转班', MajorTransfer: '院内转专业' }, statuses: { Active: '在籍', Suspended: '休学', Retained: '保留学籍', Withdrawn: '退学', Graduated: '毕业' }, states: { Submitted: '待辅导员审核', CounselorApproved: '待学院审核', CollegeApproved: '待校级审核', Approved: '已批准', Rejected: '已驳回', Cancelled: '已撤回' }, steps: { Submitted: '辅导员审核', CounselorApproved: '学院审核', CollegeApproved: '校级审批' }, messages: { invalidApplication: '请选择异动类型,并填写至少 10 个字的申请说明。', submitted: '申请已提交,等待辅导员审核。', cancelConfirm: '撤回后本次申请将结束,需要时可重新提交。', cancelTitle: '撤回申请', cancelled: '申请已撤回。', commentRequired: '驳回申请时必须填写审核意见。', approved: '审核已通过,申请进入下一环节。', rejected: '申请已驳回。' } }, api: { 'data.constraint_conflict': '数据约束冲突。', 'server.unhandled_error': '服务器处理请求时发生错误。', diff --git a/web/src/views/StudentStatusChangesView.vue b/web/src/views/StudentStatusChangesView.vue index 6d7977d..e01f318 100644 --- a/web/src/views/StudentStatusChangesView.vue +++ b/web/src/views/StudentStatusChangesView.vue @@ -36,8 +36,16 @@ const actionableTotal = ref(0) const finishedTotal = ref(0) const pageSize = 20 watch(() => applyForm.type, type => { - applyForm.targetClassId = type === 'Demotion' ? '' : (options.value?.currentClassId ?? '') + applyForm.targetClassId = ['Demotion', 'ClassTransfer', 'MajorTransfer'].includes(type) ? '' : (options.value?.currentClassId ?? '') }) +const targetClasses = computed(() => classes.value.filter(item => { + if (!item.isEnabled) return false + if (applyForm.type === 'MajorTransfer') return item.collegeId === options.value?.collegeId && item.majorId !== options.value?.majorId + if (item.majorId !== options.value?.majorId) return false + if (applyForm.type === 'Demotion') return item.grade > options.value?.currentGrade + if (applyForm.type === 'ClassTransfer') return item.grade === options.value?.currentGrade && item.id !== options.value?.currentClassId + return true +})) const typeLabel = (value: string) => t(`statusChanges.types.${value}`) const statusLabel = (value: string) => t(`statusChanges.statuses.${value}`) @@ -123,7 +131,7 @@ async function submitApply() { ElMessage.warning(t('statusChangeImpact.affectedTermRequired')) return } - if (['Resumption', 'Demotion'].includes(applyForm.type) && !applyForm.targetClassId) { + if (['Resumption', 'Demotion', 'ClassTransfer', 'MajorTransfer'].includes(applyForm.type) && !applyForm.targetClassId) { ElMessage.warning(t('statusChangeImpact.targetClassRequired')) return } @@ -136,7 +144,7 @@ async function submitApply() { return } try { - await http.post('/student-status-changes', { ...applyForm, affectedTermId: applyForm.affectedTermId, targetClassId: ['Resumption', 'Demotion'].includes(applyForm.type) ? applyForm.targetClassId : null, serviceStartDate: applyForm.type === 'Enlistment' ? applyForm.serviceStartDate : null, dischargeDate: applyForm.type === 'Resumption' && applyForm.dischargeDate ? applyForm.dischargeDate : null }) + await http.post('/student-status-changes', { ...applyForm, affectedTermId: applyForm.affectedTermId, targetClassId: ['Resumption', 'Demotion', 'ClassTransfer', 'MajorTransfer'].includes(applyForm.type) ? applyForm.targetClassId : null, serviceStartDate: applyForm.type === 'Enlistment' ? applyForm.serviceStartDate : null, dischargeDate: applyForm.type === 'Resumption' && applyForm.dischargeDate ? applyForm.dischargeDate : null }) applyDialog.value = false ElMessage.success(t('statusChanges.messages.submitted')) await load(true) @@ -163,7 +171,7 @@ async function openReview(change: any, approved: boolean) { reviewDialog.value = true courseImpact.value = [] impactError.value = false - if (approved && ['Suspension', 'Withdrawal', 'Enlistment', 'Demotion'].includes(change.type)) { + if (approved && ['Suspension', 'Withdrawal', 'Enlistment', 'Demotion', 'ClassTransfer', 'MajorTransfer'].includes(change.type)) { impactLoading.value = true try { const response = await http.get(`/student-status-changes/${change.id}/course-impact`) @@ -307,13 +315,13 @@ onMounted(async () => { - {{ t(applyForm.type === 'Resumption' ? 'statusChangeImpact.resumptionTermHint' : applyForm.type === 'Demotion' ? 'statusChangeImpact.demotionTermHint' : 'statusChangeImpact.affectedTermHint') }} + {{ t(applyForm.type === 'Resumption' ? 'statusChangeImpact.resumptionTermHint' : ['Demotion', 'ClassTransfer', 'MajorTransfer'].includes(applyForm.type) ? 'statusChangeImpact.demotionTermHint' : 'statusChangeImpact.affectedTermHint') }} - + - + - {{ t('statusChangeImpact.targetClassHint') }} + {{ t(applyForm.type === 'MajorTransfer' ? 'statusChangeImpact.majorTransferHint' : 'statusChangeImpact.targetClassHint') }} @@ -334,7 +342,7 @@ onMounted(async () => {

{{ selected.collegeName }} · {{ selected.className }}

-
+

{{ t('statusChangeImpact.courseImpact') }}

{{ t('statusChangeImpact.courseImpactHint') }}