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

fix(appManagement): not getting Emails on the Rejection of App Release Request #1017

Merged
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
28 changes: 12 additions & 16 deletions src/marketplace/Offers.Library/Service/OfferService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,23 +485,21 @@ public async Task ApproveOfferRequestAsync(Guid offerId, OfferTypeId offerTypeId
await notificationService.CreateNotifications(approveOfferRoles, _identityData.IdentityId, content, offerDetails.ProviderCompanyId.Value).AwaitAll().ConfigureAwait(false);
await notificationService.SetNotificationsForOfferToDone(catenaAdminRoles, submitOfferNotificationTypeIds, offerId).ConfigureAwait(ConfigureAwaitOptions.None);

await portalRepositories.SaveAsync().ConfigureAwait(ConfigureAwaitOptions.None);

await mailingProcessCreation.RoleBaseSendMail(
notificationRecipients,
new[]
{
[
("offerName", offerDetails.OfferName),
("offerSubscriptionUrl", mailParams.SubscriptionUrl),
("offerDetailUrl", $"{mailParams.DetailUrl}/{offerId}"),
(offerTypeId == OfferTypeId.APP ? "appId" : "serviceId", offerId.ToString())
},
],
("offerProviderName", "User"),
new[]
{
[
$"{offerTypeId.ToString().ToLower()}-release-activation"
},
],
offerDetails.ProviderCompanyId.Value).ConfigureAwait(ConfigureAwaitOptions.None);

await portalRepositories.SaveAsync().ConfigureAwait(ConfigureAwaitOptions.None);
}

/// <inheritdoc />
Expand Down Expand Up @@ -560,22 +558,20 @@ public async Task DeclineOfferAsync(Guid offerId, OfferDeclineRequest data, Offe
await notificationService.CreateNotifications(notificationRecipients, _identityData.IdentityId, content, declineData.CompanyId.Value).AwaitAll().ConfigureAwait(false);
await notificationService.SetNotificationsForOfferToDone(catenaAdminRoles, submitOfferNotificationTypeIds, offerId).ConfigureAwait(ConfigureAwaitOptions.None);

await portalRepositories.SaveAsync().ConfigureAwait(ConfigureAwaitOptions.None);

await mailingProcessCreation.RoleBaseSendMail(
notificationRecipients,
new[]
{
[
("offerName", declineData.OfferName),
("url", basePortalAddress),
("declineMessage", data.Message),
},
],
("offerProviderName", "Service Manager"),
new[]
{
[
$"{offerType.ToString().ToLower()}-request-decline"
},
],
declineData.CompanyId.Value).ConfigureAwait(ConfigureAwaitOptions.None);

await portalRepositories.SaveAsync().ConfigureAwait(ConfigureAwaitOptions.None);
}

private async Task CheckLanguageCodesExist(IEnumerable<string> languageCodes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,14 @@ public async Task<Guid> AddOfferSubscriptionAsync(Guid offerId, IEnumerable<Offe

await _mailingProcessCreation.RoleBaseSendMail(
notificationRecipients,
new[]
{
[
("offerName", offerProviderDetails.OfferName!),
("url", basePortalAddress)
},
],
("offerProviderName", "User"),
new[]
{
[
$"{offerTypeId.ToString().ToLower()}-subscription-request"
},
],
offerProviderDetails.ProviderCompanyId.Value).ConfigureAwait(ConfigureAwaitOptions.None);
await _portalRepositories.SaveAsync().ConfigureAwait(ConfigureAwaitOptions.None);

Expand Down
Loading