Skip to content

Commit 659250e

Browse files
authored
Merge pull request #546 from bcgov/yj
chore: biz info
2 parents a919ed9 + 4853aed commit 659250e

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

server/StrDss.Data/Mappings/EntityToModelProfile.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public EntityToModelProfile()
4747
CreateMap<DssBusinessLicenceStatusType, LicenseStatus>();
4848

4949
CreateMap<DssBusinessLicence, BizLicenseDto>()
50+
.ForMember(o => o.LicenseStatus, opt => opt.MapFrom(i => i.LicenceStatusTypeNavigation))
5051
.ForMember(o => o.UpdDtm, opt => opt.MapFrom(i => DateUtils.ConvertUtcToPacificTime(i.UpdDtm)));
5152
}
5253
}

server/StrDss.Data/Repositories/RentalListingRepository.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ var extraSort
218218

219219
listing.AddressChangeHistory = await GetAddressChangeHistoryAsync(rentalListingId);
220220

221-
listing.BizLicenseDto = _mapper.Map<BizLicenseDto>(await _dbContext.DssBusinessLicences.AsNoTracking().FirstOrDefaultAsync(x => x.BusinessLicenceId == listing.BusinessLicenceId));
221+
listing.BizLicenseInfo = _mapper.Map<BizLicenseDto>(
222+
await _dbContext.DssBusinessLicences.AsNoTracking().Include(x => x.LicenceStatusTypeNavigation)
223+
.FirstOrDefaultAsync(x => x.BusinessLicenceId == listing.BusinessLicenceId)
224+
);
222225

223226
return listing;
224227
}

server/StrDss.Model/RentalReportDtos/RentalListingViewDto.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public class RentalListingViewDto
8383
public DateTime? LastActionDtm { get; set; }
8484
public bool HasAtLeastOneValidHostEmail { get; set; }
8585
public List<HostInfo> HostsInfo { get; set; } = new List<HostInfo>();
86-
public BizLicenseDto? BizLicenseDto { get; set; }
86+
public BizLicenseDto? BizLicenseInfo { get; set; }
8787
public virtual ICollection<RentalListingContactDto> Hosts { get; set; } = new List<RentalListingContactDto>();
8888
public virtual ICollection<ListingHistoryDto> ListingHistory { get; set; } = new List<ListingHistoryDto>();
8989
public virtual ICollection<ActionHistoryDto> ActionHistory { get; set; } = new List<ActionHistoryDto>();

0 commit comments

Comments
 (0)