professor and education updated
This commit is contained in:
@ -22,22 +22,22 @@ public class Course extends BaseEntity {
|
|||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
@Column(columnDefinition = "TEXT", nullable = false)
|
@Column(columnDefinition = "TEXT")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
@Column
|
@Column(nullable = false)
|
||||||
private String duration;
|
private String duration;
|
||||||
|
|
||||||
@Column
|
@Column(nullable = false)
|
||||||
private Integer seats;
|
private Integer seats;
|
||||||
|
|
||||||
@Column
|
@Column(nullable = false)
|
||||||
private String category;
|
private String category;
|
||||||
|
|
||||||
@Column
|
@Column(nullable = false)
|
||||||
private String level;
|
private String level;
|
||||||
|
|
||||||
@Column
|
@Column(nullable = false)
|
||||||
private String instructor;
|
private String instructor;
|
||||||
|
|
||||||
private String price;
|
private String price;
|
||||||
|
|||||||
@ -17,17 +17,21 @@ public class CourseDto {
|
|||||||
@NotNull
|
@NotNull
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
private String duration;
|
private String duration;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
private Integer seats;
|
private Integer seats;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
private String category;
|
private String category;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
private String level;
|
private String level;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
private String instructor;
|
private String instructor;
|
||||||
|
|
||||||
private String price;
|
private String price;
|
||||||
|
|||||||
@ -1144,4 +1144,11 @@
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Required field asterisk */
|
||||||
|
.required-asterisk {
|
||||||
|
color: #e53e3e;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-left: 2px;
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="title">
|
<label for="title">
|
||||||
<i class="fa fa-book"></i>
|
<i class="fa fa-book"></i>
|
||||||
Course Title
|
Course Title <span class="required-asterisk">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="title" class="form-input" formControlName="title"
|
<input type="text" id="title" class="form-input" formControlName="title"
|
||||||
placeholder="e.g., Advanced Cardiac Care Training">
|
placeholder="e.g., Advanced Cardiac Care Training">
|
||||||
@ -120,7 +120,10 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text" id="instructor" class="form-input" formControlName="instructor"
|
<input type="text" id="instructor" class="form-input" formControlName="instructor"
|
||||||
placeholder="e.g., Dr. John Smith">
|
placeholder="e.g., Dr. John Smith">
|
||||||
|
<div *ngIf="courseForm.get('instructor')?.invalid && courseForm.get('instructor')?.touched" class="error-message">
|
||||||
|
<i class="fa fa-exclamation-circle"></i>
|
||||||
|
Instructor is required.
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -132,7 +135,10 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text" id="duration" class="form-input" formControlName="duration"
|
<input type="text" id="duration" class="form-input" formControlName="duration"
|
||||||
placeholder="e.g., 3 Days, 2 Years">
|
placeholder="e.g., 3 Days, 2 Years">
|
||||||
|
<div *ngIf="courseForm.get('duration')?.invalid && courseForm.get('duration')?.touched" class="error-message">
|
||||||
|
<i class="fa fa-exclamation-circle"></i>
|
||||||
|
Duration is required.
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -142,7 +148,10 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="number" id="seats" class="form-input" formControlName="seats"
|
<input type="number" id="seats" class="form-input" formControlName="seats"
|
||||||
placeholder="Enter available seats" min="1">
|
placeholder="Enter available seats" min="1">
|
||||||
|
<div *ngIf="courseForm.get('seats')?.invalid && courseForm.get('seats')?.touched" class="error-message">
|
||||||
|
<i class="fa fa-exclamation-circle"></i>
|
||||||
|
Number of seats is required.
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -169,7 +178,10 @@
|
|||||||
<option value="Fellowship">Fellowship</option>
|
<option value="Fellowship">Fellowship</option>
|
||||||
<option value="Course">Course</option>
|
<option value="Course">Course</option>
|
||||||
</select>
|
</select>
|
||||||
|
<div *ngIf="courseForm.get('category')?.invalid && courseForm.get('category')?.touched" class="error-message">
|
||||||
|
<i class="fa fa-exclamation-circle"></i>
|
||||||
|
Category is required.
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -185,7 +197,10 @@
|
|||||||
<option value="Professional">Professional</option>
|
<option value="Professional">Professional</option>
|
||||||
<option value="Post-Doctoral">Post-Doctoral</option>
|
<option value="Post-Doctoral">Post-Doctoral</option>
|
||||||
</select>
|
</select>
|
||||||
|
<div *ngIf="courseForm.get('level')?.invalid && courseForm.get('level')?.touched" class="error-message">
|
||||||
|
<i class="fa fa-exclamation-circle"></i>
|
||||||
|
Level is required.
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -209,10 +224,6 @@
|
|||||||
</label>
|
</label>
|
||||||
<textarea id="description" class="form-textarea" formControlName="description" rows="4"
|
<textarea id="description" class="form-textarea" formControlName="description" rows="4"
|
||||||
placeholder="Describe the course objectives, curriculum, and what students will learn..."></textarea>
|
placeholder="Describe the course objectives, curriculum, and what students will learn..."></textarea>
|
||||||
<div *ngIf="courseForm.get('description')?.invalid && courseForm.get('description')?.touched" class="error-message">
|
|
||||||
<i class="fa fa-exclamation-circle"></i>
|
|
||||||
Course description is required.
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -326,7 +337,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="eventTitle">
|
<label for="eventTitle">
|
||||||
<i class="fa fa-heading"></i>
|
<i class="fa fa-heading"></i>
|
||||||
Event Title
|
Event Title <span class="required-asterisk">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="eventTitle" class="form-input" formControlName="title"
|
<input type="text" id="eventTitle" class="form-input" formControlName="title"
|
||||||
placeholder="Enter event title">
|
placeholder="Enter event title">
|
||||||
@ -343,10 +354,6 @@
|
|||||||
</label>
|
</label>
|
||||||
<textarea id="eventDescription" class="form-textarea" formControlName="description" rows="4"
|
<textarea id="eventDescription" class="form-textarea" formControlName="description" rows="4"
|
||||||
placeholder="Describe the event details, objectives, and what attendees can expect..."></textarea>
|
placeholder="Describe the event details, objectives, and what attendees can expect..."></textarea>
|
||||||
<div *ngIf="upcomingEventForm.get('description')?.invalid && upcomingEventForm.get('description')?.touched" class="error-message">
|
|
||||||
<i class="fa fa-exclamation-circle"></i>
|
|
||||||
Event description is required.
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -357,7 +364,10 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text" id="eventSchedule" class="form-input" formControlName="schedule"
|
<input type="text" id="eventSchedule" class="form-input" formControlName="schedule"
|
||||||
placeholder="e.g., Q3 2025, Monthly Sessions, Ongoing">
|
placeholder="e.g., Q3 2025, Monthly Sessions, Ongoing">
|
||||||
|
<div *ngIf="upcomingEventForm.get('schedule')?.invalid && upcomingEventForm.get('schedule')?.touched" class="error-message">
|
||||||
|
<i class="fa fa-exclamation-circle"></i>
|
||||||
|
Schedule is required.
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@ -43,12 +43,12 @@ export class EducationComponent implements OnInit {
|
|||||||
) {
|
) {
|
||||||
this.courseForm = this.fb.group({
|
this.courseForm = this.fb.group({
|
||||||
title: ['', Validators.required],
|
title: ['', Validators.required],
|
||||||
description: ['', Validators.required],
|
description: [''],
|
||||||
duration: [''],
|
duration: ['', Validators.required],
|
||||||
seats: [''],
|
seats: ['', [Validators.required, Validators.min(1)]],
|
||||||
category: [''],
|
category: ['', Validators.required],
|
||||||
level: [''],
|
level: ['', Validators.required],
|
||||||
instructor: [''],
|
instructor: ['', Validators.required],
|
||||||
price: [''],
|
price: [''],
|
||||||
startDate: [''],
|
startDate: [''],
|
||||||
eligibility: [''],
|
eligibility: [''],
|
||||||
@ -58,8 +58,8 @@ export class EducationComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
this.upcomingEventForm = this.fb.group({
|
this.upcomingEventForm = this.fb.group({
|
||||||
title: ['', Validators.required],
|
title: ['', Validators.required],
|
||||||
description: ['', Validators.required],
|
description: [''],
|
||||||
schedule: [''],
|
schedule: ['', Validators.required],
|
||||||
eventDate: [''],
|
eventDate: [''],
|
||||||
isActive: [true]
|
isActive: [true]
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user