Skip to content

Commit 8ba0664

Browse files
authored
Merge pull request #867 from bcgov/feature/DSS-1084-front-end
DSS-1084 Platforms upload expanded takedown report
2 parents 569bdd2 + 2b855f3 commit 8ba0664

File tree

12 files changed

+53
-3
lines changed

12 files changed

+53
-3
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
** @ychung-mot @larsenle @OleksandrBohuslavskyi @KFloodBCGov @skmetpalli
1+
** @KFloodBCGov @skmetpalli

frontend/src/app/common/models/listing-details.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export interface ListingDetails {
88
isActive: boolean;
99
isNew: boolean;
1010
isTakenDown: boolean;
11+
takeDownReason: string;
1112
offeringOrganizationId: number;
1213
offeringOrganizationNm: string;
1314
platformListingNo: number;

frontend/src/app/features/components/listings-table/listing-details/listing-details.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ <h2>Detailed Listing Information for</h2>
264264
</ng-template>
265265
<ng-template pTemplate="body" let-actionHistory>
266266
<tr class="small-text">
267-
<td>{{ actionHistory.action }}</td>
267+
<td>{{ actionHistory.action }}
268+
<span *ngIf="actionHistory.action == 'Takedown Reported' && listing.takeDownReason">: {{ listing.takeDownReason }}</span>
269+
</td>
268270
<td>{{ actionHistory.date |date:'yyyy-MM-dd'}}</td>
269271
<td>{{ actionHistory.user }}</td>
270272
</tr>

server/StrDss.Common/Constants.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,4 +565,10 @@ public static class ApiTags
565565
public const string Aps = "aps";
566566
public static readonly string[] ApsTagList = { "aps" };
567567
}
568+
569+
public static class TakeDownReasonStatus
570+
{
571+
public const string LGRequest = "LG Request";
572+
public const string InvalidRegistration = "Invalid Registration";
573+
}
568574
}

server/StrDss.Data/Entities/DssDbContext.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
951951
entity.Property(e => e.UpdUserGuid)
952952
.HasComment("The globally unique identifier (assigned by the identity provider) for the most recent user to record a change")
953953
.HasColumnName("upd_user_guid");
954+
entity.Property(e => e.TakeDownReason)
955+
.HasMaxLength(50)
956+
.HasComment("Indicates the reason why the listing was taken down")
957+
.HasColumnName("takedown_reason");
954958

955959
entity.HasOne(d => d.DerivedFromRentalListing).WithMany(p => p.InverseDerivedFromRentalListing)
956960
.HasForeignKey(d => d.DerivedFromRentalListingId)
@@ -1211,6 +1215,9 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
12111215
.HasColumnName("platform_listing_url");
12121216
entity.Property(e => e.RentalListingId).HasColumnName("rental_listing_id");
12131217
entity.Property(e => e.SeparateReservationsYtdQty).HasColumnName("separate_reservations_ytd_qty");
1218+
entity.Property(e => e.TakeDownReason)
1219+
.HasMaxLength(50)
1220+
.HasColumnName("takedown_reason");
12141221
});
12151222

12161223
modelBuilder.Entity<DssRentalUploadHistoryView>(entity =>

server/StrDss.Data/Entities/DssRentalListing.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ public partial class DssRentalListing
148148
/// </summary>
149149
public DateTime? LgTransferDtm { get; set; }
150150

151+
/// <summary>
152+
/// Indicates the reason why the listing was taken down
153+
/// </summary>
154+
public string? TakeDownReason { get; set; }
155+
151156
public virtual DssRentalListing? DerivedFromRentalListing { get; set; }
152157

153158
public virtual ICollection<DssEmailMessage> DssEmailMessages { get; set; } = new List<DssEmailMessage>();

server/StrDss.Data/Entities/DssRentalListingVw.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,6 @@ public partial class DssRentalListingVw
104104
public bool? IsChangedBusinessLicence { get; set; }
105105

106106
public DateTime? LgTransferDtm { get; set; }
107+
108+
public string? TakeDownReason { get; set; }
107109
}

server/StrDss.Model/IUploadLine.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ public class UploadLine
1414
public string ListingId { get; set; } = "";
1515
[Name("bus_lic_no")]
1616
public string BusinessLicenceNo { get; set; } = "";
17+
[Name("reason")]
18+
public string TakeDownReason { get; set; } = "";
1719
}
1820
}

server/StrDss.Model/RentalListingExportDto.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public class RentalListingExportDto
1515
public bool? IsNew { get; set; }
1616

1717
public bool? IsTakenDown { get; set; }
18+
19+
public string? TakeDownReason { get; set; }
20+
1821
public bool? IsLgTransferred { get; set; }
1922

2023
public bool? IsChangedAddress { get; set; }

server/StrDss.Model/RentalReportDtos/RentalListingViewDto.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public class RentalListingViewDto
1717
public bool? IsNew { get; set; }
1818

1919
public bool? IsTakenDown { get; set; }
20+
21+
public string? TakeDownReason { get; set; }
22+
2023
public bool? IsLgTransferred { get; set; }
2124

2225
public bool? IsChangedAddress { get; set; }

0 commit comments

Comments
 (0)