Skip to content

Commit 52720da

Browse files
Fixed mapping.
1 parent 4186809 commit 52720da

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

SCM.Web/scm/src/app/client/select-course/select-course.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
<ng-container matColumnDef="totalPrice">
5353
<th mat-header-cell *matHeaderCellDef>Total Price</th>
54-
<td mat-cell *matCellDef="let row">{{row.totalPrice}}</td>
54+
<td mat-cell *matCellDef="let row">{{row.totalPrice | currency}}</td>
5555
</ng-container>
5656

5757
<ng-container matColumnDef="delete">

SCM.Web/scm/src/app/client/select-course/select-course.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,8 @@ export class SelectCourseComponent implements OnInit {
139139
PhoneNumber:this.users.find(x=>x.emailAddress==b.userEmail)?.phoneNumber??"",
140140
Subjects:b.subjects,
141141
TotalPrice:b.totalPrice}))
142-
debugger
143142

144-
this._dataService.post(this.coursePurchaseURL,courses).subscribe(x=>alert(JSON.stringify(x)));
143+
this._dataService.post(this.coursePurchaseURL,courses).subscribe(x=> this._util.openSnackBar("Sending Order..",ResponseSnackbar.Pending));
145144
});
146145
}
147146

StudentCourse/src/StudentCourse.Application/StudentCourse/DTO/StudentCourseDTO.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
using System;
33
using StudentCourse.Application.Common.Mappings;
44
using StudentCourseEntity = StudentCourse.Domain.Entities.StudentCourse;
5+
using EventBusRabbitMQ.Events;
56

67
namespace StudentCourse.Application.StudentCourse.DTO
78
{
8-
public class StudentCourseDTO : IMapFrom<StudentCourseEntity>
9+
public class StudentCourseDTO : IMapFrom<StudentCourseEntity>, IMapFrom<CourseCheckoutEvent>
910
{
1011
public int StudentCourseID { get; set; }
1112
public string Subjects { get; set; }
@@ -27,6 +28,9 @@ public void Mapping(Profile profile)
2728
{
2829
profile.CreateMap<StudentCourseDTO, StudentCourseEntity>();
2930
profile.CreateMap<StudentCourseEntity, StudentCourseDTO>();
31+
32+
profile.CreateMap<StudentCourseDTO, CourseCheckoutEvent>();
33+
profile.CreateMap<CourseCheckoutEvent, StudentCourseDTO>();
3034
}
3135
}
3236
}

0 commit comments

Comments
 (0)