Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes some issue for Agent Name and Remove unnecessaryId in appointment #77

Merged
merged 2 commits into from
Sep 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions REMS.BackendApi/Features/Appointment/AppointmentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ public async Task<IActionResult> DeleteAppointment(int id)
}

[HttpGet("property/{id}/{pageNo}/{pageSize}")]
public async Task<IActionResult> GetAppointmentByPropertyIdAsync(int propertyId, int pageNo = 1, int pageSize = 10)
public async Task<IActionResult> GetAppointmentByPropertyIdAsync(int id, int pageNo = 1, int pageSize = 10)
{
try
{
var response = await _blAppointment.GetAppointmentByPropertyIdAsycn(propertyId, pageNo, pageSize);
var response = await _blAppointment.GetAppointmentByPropertyIdAsycn(id, pageNo, pageSize);
if (response.IsError)
return BadRequest(response);
return Ok(response);
Expand Down Expand Up @@ -75,11 +75,11 @@ public async Task<IActionResult> UpdateAppointment(int id, AppointmentRequestMod
}

[HttpGet("client/{id}/{pageNo}/{pageSize}", Name = "GetAppointmentByClientId")]
public async Task<IActionResult> GetAppointmentByClientId(int clientId, int pageNo, int pageSize)
public async Task<IActionResult> GetAppointmentByClientId(int id, int pageNo, int pageSize)
{
try
{
var response = await _blAppointment.GetAppointmentByClientId(clientId, pageNo, pageSize);
var response = await _blAppointment.GetAppointmentByClientId(id, pageNo, pageSize);
if (response.IsError)
return BadRequest(response);
return Ok(response);
Expand Down
2 changes: 2 additions & 0 deletions REMS.Models/Agent/AgentDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ public class AgentDto

public int? UserId { get; set; }

public string? AgentName { get; set; }

public string? AgencyName { get; set; } = null!;

public string? LicenseNumber { get; set; } = null!;
Expand Down
1 change: 1 addition & 0 deletions REMS.Modules/Features/Agent/DA_Agent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ join _user in _db.Users on ag.UserId equals _user.UserId
{
AgentId = ag.AgentId,
UserId = ag.UserId,
AgentName = _user.Name,
AgencyName = ag.AgencyName,
LicenseNumber = ag.LicenseNumber,
Email = _user.Email,
Expand Down
Loading