Skip to content

Commit b941c6d

Browse files
authored
Merge pull request #728 from bcgov/ricander
Ricander
2 parents 2517c1b + 0444b23 commit b941c6d

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

database/ddl/STR_DSS_Views_Sprint_16.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ left join dss_platform_type dpt on dpt.platform_type = do2.platform_type
2929
left join dss_user_identity dui on dui.user_guid = do2.upd_user_guid
3030
left join dss_organization_contact_person docp on docp.contacted_through_organization_id = do2.organization_id and docp.email_message_type = 'Notice of Takedown' and docp.is_primary = true
3131
left join dss_organization_contact_person docp2 on docp2.contacted_through_organization_id = do2.organization_id and docp2.email_message_type = 'Takedown Request' and docp2.is_primary = true
32-
left join dss_organization_contact_person docp3 on docp3.contacted_through_organization_id = do2.organization_id and docp3.email_message_type = 'Notice of Takedown' and docp.is_primary != true
32+
left join dss_organization_contact_person docp3 on docp3.contacted_through_organization_id = do2.organization_id and docp3.email_message_type = 'Notice of Takedown' and docp3.is_primary != true
3333
left join dss_organization_contact_person docp4 on docp4.contacted_through_organization_id = do2.organization_id and docp4.email_message_type = 'Takedown Request' and docp4.is_primary != true
3434
where do2.organization_type = 'Platform';

server/StrDss.Data/Repositories/OrganizationRepository.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,11 @@ public async Task<DssOrganization> CreatePlatformSubAsync(PlatformSubCreateDto d
273273

274274
await _dbSet.AddAsync(entity);
275275

276+
CreateContact(entity, EmailMessageTypes.NoticeOfTakedown, dto.PrimaryNoticeOfTakedownContactEmail, true);
277+
CreateContact(entity, EmailMessageTypes.NoticeOfTakedown, dto.SecondaryNoticeOfTakedownContactEmail, false);
278+
CreateContact(entity, EmailMessageTypes.TakedownRequest, dto.PrimaryTakedownRequestContactEmail, true);
279+
CreateContact(entity, EmailMessageTypes.TakedownRequest, dto.SecondaryTakedownRequestContactEmail, false);
280+
276281
return entity;
277282
}
278283

@@ -283,6 +288,11 @@ public async Task UpdatePlatformSubAsync(PlatformSubUpdateDto dto)
283288
.FirstAsync(x => x.OrganizationId == dto.OrganizationId);
284289

285290
_mapper.Map(dto, entity);
291+
292+
UpdateContact(entity, EmailMessageTypes.NoticeOfTakedown, dto.PrimaryNoticeOfTakedownContactEmail, true);
293+
UpdateContact(entity, EmailMessageTypes.NoticeOfTakedown, dto.SecondaryNoticeOfTakedownContactEmail, false);
294+
UpdateContact(entity, EmailMessageTypes.TakedownRequest, dto.PrimaryTakedownRequestContactEmail, true);
295+
UpdateContact(entity, EmailMessageTypes.TakedownRequest, dto.SecondaryTakedownRequestContactEmail, false);
286296
}
287297
}
288298
}

server/StrDss.Model/OrganizationDtos/PlatformSubCreateDto.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ public class PlatformSubCreateDto : IPlatformCreateDto
77
public long ManagingOrganizationId { get; set; }
88
public bool? IsActive { get; set; } = true;
99
public DateTime UpdDtm { get; set; }
10+
public string? PrimaryNoticeOfTakedownContactEmail { get; set; }
11+
public string? PrimaryTakedownRequestContactEmail { get; set; }
12+
public string? SecondaryNoticeOfTakedownContactEmail { get; set; }
13+
public string? SecondaryTakedownRequestContactEmail { get; set; }
1014
}
1115
}

server/StrDss.Model/OrganizationDtos/PlatformSubUpdateDto.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ public class PlatformSubUpdateDto : IPlatformUpdateDto
55
public long OrganizationId { get; set; }
66
public string OrganizationNm { get; set; } = null!;
77
public long ManagingOrganizationId { get; set; }
8+
public string? PrimaryNoticeOfTakedownContactEmail { get; set; }
9+
public string? PrimaryTakedownRequestContactEmail { get; set; }
10+
public string? SecondaryNoticeOfTakedownContactEmail { get; set; }
11+
public string? SecondaryTakedownRequestContactEmail { get; set; }
812
public bool? IsActive { get; set; }
913
public DateTime UpdDtm { get; set; }
1014
}

0 commit comments

Comments
 (0)