professor and education updated
This commit is contained in:
@ -22,22 +22,22 @@ public class Course extends BaseEntity {
|
||||
@Column(nullable = false)
|
||||
private String title;
|
||||
|
||||
@Column(columnDefinition = "TEXT", nullable = false)
|
||||
@Column(columnDefinition = "TEXT")
|
||||
private String description;
|
||||
|
||||
@Column
|
||||
@Column(nullable = false)
|
||||
private String duration;
|
||||
|
||||
@Column
|
||||
@Column(nullable = false)
|
||||
private Integer seats;
|
||||
|
||||
@Column
|
||||
@Column(nullable = false)
|
||||
private String category;
|
||||
|
||||
@Column
|
||||
@Column(nullable = false)
|
||||
private String level;
|
||||
|
||||
@Column
|
||||
@Column(nullable = false)
|
||||
private String instructor;
|
||||
|
||||
private String price;
|
||||
|
||||
@ -17,17 +17,21 @@ public class CourseDto {
|
||||
@NotNull
|
||||
private String title;
|
||||
|
||||
@NotNull
|
||||
private String description;
|
||||
|
||||
@NotNull
|
||||
private String duration;
|
||||
|
||||
@NotNull
|
||||
private Integer seats;
|
||||
|
||||
@NotNull
|
||||
private String category;
|
||||
|
||||
@NotNull
|
||||
private String level;
|
||||
|
||||
@NotNull
|
||||
private String instructor;
|
||||
|
||||
private String price;
|
||||
|
||||
@ -1144,4 +1144,11 @@
|
||||
margin-left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Required field asterisk */
|
||||
.required-asterisk {
|
||||
color: #e53e3e;
|
||||
font-weight: bold;
|
||||
margin-left: 2px;
|
||||
}
|
||||
@ -103,7 +103,7 @@
|
||||
<div class="form-group">
|
||||
<label for="title">
|
||||
<i class="fa fa-book"></i>
|
||||
Course Title
|
||||
Course Title <span class="required-asterisk">*</span>
|
||||
</label>
|
||||
<input type="text" id="title" class="form-input" formControlName="title"
|
||||
placeholder="e.g., Advanced Cardiac Care Training">
|
||||
@ -120,7 +120,10 @@
|
||||
</label>
|
||||
<input type="text" id="instructor" class="form-input" formControlName="instructor"
|
||||
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>
|
||||
|
||||
@ -132,7 +135,10 @@
|
||||
</label>
|
||||
<input type="text" id="duration" class="form-input" formControlName="duration"
|
||||
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 class="form-group">
|
||||
@ -142,7 +148,10 @@
|
||||
</label>
|
||||
<input type="number" id="seats" class="form-input" formControlName="seats"
|
||||
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 class="form-group">
|
||||
@ -169,7 +178,10 @@
|
||||
<option value="Fellowship">Fellowship</option>
|
||||
<option value="Course">Course</option>
|
||||
</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 class="form-group">
|
||||
@ -185,7 +197,10 @@
|
||||
<option value="Professional">Professional</option>
|
||||
<option value="Post-Doctoral">Post-Doctoral</option>
|
||||
</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 class="form-group">
|
||||
@ -209,10 +224,6 @@
|
||||
</label>
|
||||
<textarea id="description" class="form-textarea" formControlName="description" rows="4"
|
||||
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 class="form-group">
|
||||
@ -326,7 +337,7 @@
|
||||
<div class="form-group">
|
||||
<label for="eventTitle">
|
||||
<i class="fa fa-heading"></i>
|
||||
Event Title
|
||||
Event Title <span class="required-asterisk">*</span>
|
||||
</label>
|
||||
<input type="text" id="eventTitle" class="form-input" formControlName="title"
|
||||
placeholder="Enter event title">
|
||||
@ -343,10 +354,6 @@
|
||||
</label>
|
||||
<textarea id="eventDescription" class="form-textarea" formControlName="description" rows="4"
|
||||
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 class="form-row">
|
||||
@ -357,7 +364,10 @@
|
||||
</label>
|
||||
<input type="text" id="eventSchedule" class="form-input" formControlName="schedule"
|
||||
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 class="form-group">
|
||||
|
||||
@ -43,12 +43,12 @@ export class EducationComponent implements OnInit {
|
||||
) {
|
||||
this.courseForm = this.fb.group({
|
||||
title: ['', Validators.required],
|
||||
description: ['', Validators.required],
|
||||
duration: [''],
|
||||
seats: [''],
|
||||
category: [''],
|
||||
level: [''],
|
||||
instructor: [''],
|
||||
description: [''],
|
||||
duration: ['', Validators.required],
|
||||
seats: ['', [Validators.required, Validators.min(1)]],
|
||||
category: ['', Validators.required],
|
||||
level: ['', Validators.required],
|
||||
instructor: ['', Validators.required],
|
||||
price: [''],
|
||||
startDate: [''],
|
||||
eligibility: [''],
|
||||
@ -58,8 +58,8 @@ export class EducationComponent implements OnInit {
|
||||
});
|
||||
this.upcomingEventForm = this.fb.group({
|
||||
title: ['', Validators.required],
|
||||
description: ['', Validators.required],
|
||||
schedule: [''],
|
||||
description: [''],
|
||||
schedule: ['', Validators.required],
|
||||
eventDate: [''],
|
||||
isActive: [true]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user