mirror of
https://github.com/opelly27/WinStudentGoalTracker.git
synced 2026-05-20 01:47:41 +00:00
Changed grad date to next iep date
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ Content-Type: application/json
|
||||
"identifier": "WIN-1001",
|
||||
"programYear": 2026,
|
||||
"enrollmentDate": "2026-01-15",
|
||||
"expectedGrad": "2028-06-01"
|
||||
"nextIepDate": "2028-06-01"
|
||||
}
|
||||
|
||||
###
|
||||
|
||||
@@ -5,5 +5,5 @@ public class CreateStudentDto
|
||||
public string? Identifier { get; set; }
|
||||
public int? ProgramYear { get; set; }
|
||||
public DateTime? EnrollmentDate { get; set; }
|
||||
public DateTime? ExpectedGrad { get; set; }
|
||||
public DateTime? NextIepDate { get; set; }
|
||||
}
|
||||
|
||||
@@ -5,5 +5,5 @@ public class UpdateStudentDto
|
||||
public string? Identifier { get; set; }
|
||||
public int? ProgramYear { get; set; }
|
||||
public DateTime? EnrollmentDate { get; set; }
|
||||
public DateTime? ExpectedGrad { get; set; }
|
||||
public DateTime? NextIepDate { get; set; }
|
||||
}
|
||||
|
||||
@@ -7,6 +7,6 @@ public class dbStudent
|
||||
public string? Identifier { get; set; }
|
||||
public int? ProgramYear { get; set; }
|
||||
public DateTime? EnrollmentDate { get; set; }
|
||||
public DateTime? ExpectedGrad { get; set; }
|
||||
public DateTime? NextIepDate { get; set; }
|
||||
public DateTime? CreatedAt { get; set; }
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class StudentRepository
|
||||
p_identifier = dto.Identifier,
|
||||
p_program_year = dto.ProgramYear,
|
||||
p_enrollment_date = dto.EnrollmentDate,
|
||||
p_expected_grad = dto.ExpectedGrad
|
||||
p_next_iep_date = dto.NextIepDate
|
||||
},
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
@@ -68,7 +68,7 @@ public class StudentRepository
|
||||
p_identifier = dto.Identifier,
|
||||
p_program_year = dto.ProgramYear,
|
||||
p_enrollment_date = dto.EnrollmentDate,
|
||||
p_expected_grad = dto.ExpectedGrad
|
||||
p_next_iep_date = dto.NextIepDate
|
||||
},
|
||||
commandType: CommandType.StoredProcedure);
|
||||
return rowsAffected > 0;
|
||||
|
||||
@@ -4,7 +4,7 @@ public class StudentResponse
|
||||
{
|
||||
public Guid StudentId { get; set; }
|
||||
public string? Identifier { get; set; }
|
||||
public DateTime? ExpectedGradDate { get; set; }
|
||||
public DateTime? NextIepDate { get; set; }
|
||||
public DateTime? LastEntryDate { get; set; }
|
||||
public int GoalCount { get; set; }
|
||||
public int ProgressEventCount { get; set; }
|
||||
|
||||
@@ -28,7 +28,7 @@ BEGIN
|
||||
('e5f6a7b8-0002-4000-a000-000000000001', 'd4e5f6a7-0002-4000-a000-000000000001', 'b2c3d4e5-0001-4000-a000-000000000001', 'c3d4e5f6-0004-4000-a000-000000000001', 1, 'active', UTC_TIMESTAMP()),
|
||||
('e5f6a7b8-0003-4000-a000-000000000001', 'd4e5f6a7-0003-4000-a000-000000000001', 'b2c3d4e5-0001-4000-a000-000000000001', 'c3d4e5f6-0005-4000-a000-000000000001', 1, 'active', UTC_TIMESTAMP());
|
||||
-- 6. STUDENTS
|
||||
INSERT INTO student (id_student, id_program, identifier, program_year, enrollment_date, expected_grad, created_at) VALUES
|
||||
INSERT INTO student (id_student, id_program, identifier, program_year, enrollment_date, next_iep_date, created_at) VALUES
|
||||
('f6a7b8c9-0001-4000-a000-000000000001', 'b2c3d4e5-0001-4000-a000-000000000001', 'STU-001', 1, '2025-09-01', '2029-06-15', UTC_TIMESTAMP()),
|
||||
('f6a7b8c9-0002-4000-a000-000000000001', 'b2c3d4e5-0001-4000-a000-000000000001', 'STU-002', 1, '2025-09-01', '2029-06-15', UTC_TIMESTAMP()),
|
||||
('f6a7b8c9-0003-4000-a000-000000000001', 'b2c3d4e5-0001-4000-a000-000000000001', 'STU-003', 2, '2024-09-01', '2028-06-15', UTC_TIMESTAMP()),
|
||||
|
||||
@@ -4,7 +4,7 @@ BEGIN
|
||||
SELECT
|
||||
studentId,
|
||||
identifier,
|
||||
expectedGradDate,
|
||||
nextIepDate,
|
||||
lastEntryDate,
|
||||
goalCount,
|
||||
progressEventCount
|
||||
|
||||
@@ -4,7 +4,7 @@ BEGIN
|
||||
SELECT
|
||||
studentId,
|
||||
identifier,
|
||||
expectedGradDate,
|
||||
nextIepDate,
|
||||
lastEntryDate,
|
||||
goalCount,
|
||||
progressEventCount
|
||||
|
||||
@@ -8,7 +8,7 @@ BEGIN
|
||||
SELECT
|
||||
vc.studentId,
|
||||
vc.identifier,
|
||||
vc.expectedGradDate,
|
||||
vc.nextIepDate,
|
||||
vc.lastEntryDate,
|
||||
vc.goalCount,
|
||||
vc.progressEventCount
|
||||
|
||||
@@ -6,7 +6,7 @@ CREATE DEFINER=`root`@`%` PROCEDURE `sp_Student_Insert`(
|
||||
IN p_identifier VARCHAR(50),
|
||||
IN p_program_year INT,
|
||||
IN p_enrollment_date DATE,
|
||||
IN p_expected_grad DATE
|
||||
IN p_next_iep_date DATE
|
||||
)
|
||||
BEGIN
|
||||
INSERT INTO student
|
||||
@@ -16,7 +16,7 @@ BEGIN
|
||||
identifier,
|
||||
program_year,
|
||||
enrollment_date,
|
||||
expected_grad,
|
||||
next_iep_date,
|
||||
created_at
|
||||
)
|
||||
VALUES
|
||||
@@ -26,7 +26,7 @@ BEGIN
|
||||
p_identifier,
|
||||
p_program_year,
|
||||
p_enrollment_date,
|
||||
p_expected_grad,
|
||||
p_next_iep_date,
|
||||
UTC_TIMESTAMP()
|
||||
);
|
||||
INSERT INTO user_student (id_user_student, id_user, id_student, is_primary)
|
||||
@@ -37,7 +37,7 @@ BEGIN
|
||||
identifier,
|
||||
program_year,
|
||||
enrollment_date,
|
||||
expected_grad,
|
||||
next_iep_date,
|
||||
created_at
|
||||
FROM student
|
||||
WHERE id_student = p_id_student
|
||||
|
||||
@@ -4,7 +4,7 @@ CREATE DEFINER=`root`@`%` PROCEDURE `sp_Student_Update`(
|
||||
IN p_identifier VARCHAR(50),
|
||||
IN p_program_year INT,
|
||||
IN p_enrollment_date DATE,
|
||||
IN p_expected_grad DATE
|
||||
IN p_next_iep_date DATE
|
||||
)
|
||||
BEGIN
|
||||
UPDATE student
|
||||
@@ -12,7 +12,7 @@ BEGIN
|
||||
identifier = COALESCE(p_identifier, identifier),
|
||||
program_year = COALESCE(p_program_year, program_year),
|
||||
enrollment_date = COALESCE(p_enrollment_date, enrollment_date),
|
||||
expected_grad = COALESCE(p_expected_grad, expected_grad)
|
||||
next_iep_date = COALESCE(p_next_iep_date, next_iep_date)
|
||||
WHERE id_student = p_id_student;
|
||||
SELECT ROW_COUNT() AS rows_affected;
|
||||
END;;
|
||||
|
||||
@@ -4,7 +4,7 @@ CREATE TABLE `student` (
|
||||
`identifier` varchar(50) DEFAULT NULL,
|
||||
`program_year` int DEFAULT NULL,
|
||||
`enrollment_date` date DEFAULT NULL,
|
||||
`expected_grad` date DEFAULT NULL,
|
||||
`next_iep_date` date DEFAULT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id_student`),
|
||||
KEY `student_ibfk_1` (`id_program`),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `winstudentgoaltracker`.`v_student_card` AS
|
||||
select `s`.`id_student` AS `studentId`,`s`.`identifier` AS `identifier`,`s`.`expected_grad` AS `expectedGradDate`,max(`pe`.`created_at`) AS `lastEntryDate`,count(distinct `g`.`id_goal`) AS `goalCount`,count(distinct `pe`.`id_progress_event`) AS `progressEventCount`
|
||||
select `s`.`id_student` AS `studentId`,`s`.`identifier` AS `identifier`,`s`.`next_iep_date` AS `nextIepDate`,max(`pe`.`created_at`) AS `lastEntryDate`,count(distinct `g`.`id_goal`) AS `goalCount`,count(distinct `pe`.`id_progress_event`) AS `progressEventCount`
|
||||
from ((`winstudentgoaltracker`.`student` `s`
|
||||
left
|
||||
join `winstudentgoaltracker`.`goal` `g` on((`g`.`id_student` = `s`.`id_student`)))
|
||||
left
|
||||
join `winstudentgoaltracker`.`progress_event` `pe` on((`pe`.`id_goal` = `g`.`id_goal`))) group by `s`.`id_student`,`s`.`identifier`,`s`.`expected_grad`;
|
||||
join `winstudentgoaltracker`.`progress_event` `pe` on((`pe`.`id_goal` = `g`.`id_goal`))) group by `s`.`id_student`,`s`.`identifier`,`s`.`next_iep_date`;
|
||||
|
||||
+1
-1
@@ -1264,7 +1264,7 @@
|
||||
<td>—</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="col-name">expected_grad</span></td>
|
||||
<td><span class="col-name">next_iep_date</span></td>
|
||||
<td><span class="type-chip">date</span></td>
|
||||
<td><span class="null-yes">NULL</span></td>
|
||||
<td><span class="default-val">NULL</span></td>
|
||||
|
||||
+4
-4
@@ -42,12 +42,12 @@
|
||||
</div> -->
|
||||
|
||||
<div class="field">
|
||||
<label for="expectedGrad">Expected Graduation</label>
|
||||
<label for="nextIepDate">Next IEP Date</label>
|
||||
<input
|
||||
id="expectedGrad"
|
||||
id="nextIepDate"
|
||||
type="date"
|
||||
[(ngModel)]="form.expectedGrad"
|
||||
name="expectedGrad"
|
||||
[(ngModel)]="form.nextIepDate"
|
||||
name="nextIepDate"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ export class AddStudentModal {
|
||||
identifier: '',
|
||||
programYear: null,
|
||||
enrollmentDate: null,
|
||||
expectedGrad: null,
|
||||
nextIepDate: null,
|
||||
};
|
||||
|
||||
// ************************** Properties ***************************
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@
|
||||
<input id="identifier" class="field-input" type="text" [(ngModel)]="identifier" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="field-label" for="expectedGrad">Expected Graduation</label>
|
||||
<input id="expectedGrad" class="field-input" type="date" [(ngModel)]="expectedGradDate" />
|
||||
<label class="field-label" for="nextIepDate">Next IEP Date</label>
|
||||
<input id="nextIepDate" class="field-input" type="date" [(ngModel)]="nextIepDate" />
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
|
||||
+8
-8
@@ -40,11 +40,11 @@ export class StudentCardFull implements OnDestroy {
|
||||
|
||||
// Form fields — always editable
|
||||
protected identifier = '';
|
||||
protected expectedGradDate = '';
|
||||
protected nextIepDate = '';
|
||||
|
||||
// Snapshot of last-saved values for cancel
|
||||
private savedIdentifier = '';
|
||||
private savedExpectedGradDate = '';
|
||||
private savedNextIepDate = '';
|
||||
|
||||
// ************************** Properties ***************************
|
||||
|
||||
@@ -53,7 +53,7 @@ export class StudentCardFull implements OnDestroy {
|
||||
// *****************************************************************
|
||||
hasChanges(): boolean {
|
||||
return this.identifier !== this.savedIdentifier
|
||||
|| this.expectedGradDate !== this.savedExpectedGradDate;
|
||||
|| this.nextIepDate !== this.savedNextIepDate;
|
||||
}
|
||||
|
||||
// ************************ Public Methods *************************
|
||||
@@ -70,14 +70,14 @@ export class StudentCardFull implements OnDestroy {
|
||||
|
||||
const result = await this.studentService.updateStudent(this.studentId, {
|
||||
identifier: this.identifier,
|
||||
expectedGrad: this.expectedGradDate || null,
|
||||
nextIepDate: this.nextIepDate || null,
|
||||
});
|
||||
|
||||
this.saving.set(false);
|
||||
|
||||
if (result.success) {
|
||||
this.savedIdentifier = this.identifier;
|
||||
this.savedExpectedGradDate = this.expectedGradDate;
|
||||
this.savedNextIepDate = this.nextIepDate;
|
||||
this.showSuccessTemporarily('Changes saved.');
|
||||
this.studentService.notifyDataChanged();
|
||||
} else {
|
||||
@@ -90,7 +90,7 @@ export class StudentCardFull implements OnDestroy {
|
||||
// *****************************************************************
|
||||
onCancel() {
|
||||
this.identifier = this.savedIdentifier;
|
||||
this.expectedGradDate = this.savedExpectedGradDate;
|
||||
this.nextIepDate = this.savedNextIepDate;
|
||||
this.errorMessage.set(null);
|
||||
this.successMessage.set(null);
|
||||
}
|
||||
@@ -138,10 +138,10 @@ export class StudentCardFull implements OnDestroy {
|
||||
if (result.success && result.payload) {
|
||||
const s = result.payload;
|
||||
this.identifier = s.identifier;
|
||||
this.expectedGradDate = this.toDateInput(s.expectedGradDate);
|
||||
this.nextIepDate = this.toDateInput(s.nextIepDate);
|
||||
|
||||
this.savedIdentifier = this.identifier;
|
||||
this.savedExpectedGradDate = this.expectedGradDate;
|
||||
this.savedNextIepDate = this.nextIepDate;
|
||||
this.loaded.set(true);
|
||||
} else {
|
||||
this.errorMessage.set(result.message);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<h2 class="identifier">🎓 {{ student().identifier }}</h2>
|
||||
|
||||
<div class="meta">
|
||||
<span class="last-entry">Grad Date: {{ student().expectedGradDate | date:'M/d/yy'}}</span>
|
||||
<span class="last-entry">IEP Date: {{ student().nextIepDate | date:'M/d/yy'}}</span>
|
||||
<span class="last-entry">
|
||||
@if (student().lastEntryDate) {
|
||||
Last entry: {{ student().lastEntryDate | date:'M/d/yy' }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="card" (click)="onCardClick()">
|
||||
<h2 class="identifier">{{ student().identifier }}</h2>
|
||||
<span class="age-badge">Grad Date: {{ student().expectedGradDate | date:'M/d/yy' }}</span>
|
||||
<span class="age-badge">IEP Date: {{ student().nextIepDate | date:'M/d/yy' }}</span>
|
||||
<div class="stats">
|
||||
<span class="stat">{{ student().goalCount }} goals</span>
|
||||
<span class="stat">{{ student().progressEventCount }} events</span>
|
||||
|
||||
@@ -2,5 +2,5 @@ export interface CreateStudentDto {
|
||||
identifier: string;
|
||||
programYear: number | null;
|
||||
enrollmentDate: Date | null;
|
||||
expectedGrad: Date | null;
|
||||
nextIepDate: Date | null;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export interface StudentCardDto {
|
||||
studentId: string;
|
||||
identifier: string;
|
||||
expectedGradDate: Date;
|
||||
nextIepDate: Date;
|
||||
lastEntryDate: Date | null;
|
||||
goalCount: number;
|
||||
progressEventCount: number;
|
||||
|
||||
@@ -71,7 +71,7 @@ export class DummyStudentService {
|
||||
{
|
||||
studentId: '1',
|
||||
identifier: 'J.B',
|
||||
expectedGradDate: new Date('2027-02-27'),
|
||||
nextIepDate: new Date('2027-02-27'),
|
||||
lastEntryDate: new Date('2026-02-21'),
|
||||
goalCount: 3,
|
||||
progressEventCount: 5,
|
||||
@@ -79,7 +79,7 @@ export class DummyStudentService {
|
||||
{
|
||||
studentId: '2',
|
||||
identifier: 'M.K',
|
||||
expectedGradDate: new Date('2027-02-27'),
|
||||
nextIepDate: new Date('2027-02-27'),
|
||||
lastEntryDate: new Date('2026-02-25'),
|
||||
goalCount: 4,
|
||||
progressEventCount: 8,
|
||||
@@ -87,7 +87,7 @@ export class DummyStudentService {
|
||||
{
|
||||
studentId: '3',
|
||||
identifier: 'A.R',
|
||||
expectedGradDate: new Date('2027-02-27'),
|
||||
nextIepDate: new Date('2027-02-27'),
|
||||
lastEntryDate: null,
|
||||
goalCount: 2,
|
||||
progressEventCount: 0,
|
||||
|
||||
@@ -154,7 +154,7 @@ export class StudentService {
|
||||
// *****************************************************************
|
||||
// Updates a student and returns the refreshed student data.
|
||||
// *****************************************************************
|
||||
async updateStudent(studentId: string, data: { identifier?: string; programYear?: number | null; enrollmentDate?: string | null; expectedGrad?: string | null }): Promise<ApiResult<StudentCardDto>> {
|
||||
async updateStudent(studentId: string, data: { identifier?: string; programYear?: number | null; enrollmentDate?: string | null; nextIepDate?: string | null }): Promise<ApiResult<StudentCardDto>> {
|
||||
try {
|
||||
const result = await firstValueFrom(
|
||||
this.http.put<ResponseResult<StudentCardDto>>(`${this.base}/api/Student/${studentId}`, data)
|
||||
|
||||
Reference in New Issue
Block a user