Skip to content

Commit

Permalink
fix: merge fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
arturmagalhaesjr committed Dec 10, 2024
1 parent 3515020 commit 260087e
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions node/resolvers/Mutations/Organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import {
} from '../../mdSchema'
import type {
B2BSettingsInput,
Collection,
DefaultCostCenterInput,
NormalizedOrganizationInput,
Organization,
OrganizationInput,
NormalizedOrganizationInput,
OrganizationRequest,
PaymentTerm,
Price,
Collection,
} from '../../typings'
import {
ORGANIZATION_REQUEST_STATUSES,
Expand Down Expand Up @@ -246,6 +246,12 @@ const createOrganizationAndCostCenterWithAdminUser = async (
const { defaultCostCenter, costCenters } = organization
const { email, firstName, lastName } = organization.b2bCustomerAdmin

const settings = (await B2BSettings.getB2BSettings(
undefined,
undefined,
ctx
)) as B2BSettingsInput

if (costCenters?.length) {
await Promise.all(
costCenters?.map(async (costCenter: DefaultCostCenterInput) => {
Expand Down Expand Up @@ -307,17 +313,13 @@ const createOrganizationAndCostCenterWithAdminUser = async (
})
}

if(settings?.transactionEmailSettings?.organizationCreated) {
message({
logger,
mail,
storefrontPermissions,
}).organizationCreated(organizationInput.name)
}
logger,
mail,
storefrontPermissions,
}).organizationCreated(organizationInput.name)
if (settings?.transactionEmailSettings?.organizationCreated) {
message({
logger,
mail,
storefrontPermissions,
}).organizationCreated(organizationInput.name)
}

return {
href: createOrganizationResult.Href,
Expand Down

0 comments on commit 260087e

Please sign in to comment.