fixed merge conflicts
This commit is contained in:
commit
99c95c8bfb
14 files changed
+15371
-2
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -149,7 +149,11 @@ export default async (req, res) => {
|
|||||||
.withTransaction(manager)
|
.withTransaction(manager)
|
||||||
.retrieve(id)
|
.retrieve(id)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
const evaluatedNoNotification = value.no_notification !== undefined && value.no_notification !== null ? value.no_notification : order.no_notification
|
const evaluatedNoNotification = value.no_notification !== undefined && value.no_notification !== null ? value.no_notification : order.no_notification
|
||||||
|
=======
|
||||||
|
const evaluatedNoNotification = value.no_notification !== undefined ? value.no_notification : order.no_notification
|
||||||
|
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
|
||||||
returnObj.no_notification = evaluatedNoNotification
|
returnObj.no_notification = evaluatedNoNotification
|
||||||
|
|
||||||
const createdReturn = await returnService
|
const createdReturn = await returnService
|
||||||
|
|||||||
@@ -8,16 +8,25 @@ export class noNotification1623231564533 implements MigrationInterface {
|
|||||||
await queryRunner.query(`ALTER TABLE "claim_order" ADD "no_notification" boolean`);
|
await queryRunner.query(`ALTER TABLE "claim_order" ADD "no_notification" boolean`);
|
||||||
await queryRunner.query(`ALTER TABLE "swap" ADD "no_notification" boolean`);
|
await queryRunner.query(`ALTER TABLE "swap" ADD "no_notification" boolean`);
|
||||||
await queryRunner.query(`ALTER TABLE "order" ADD "no_notification" boolean`);
|
await queryRunner.query(`ALTER TABLE "order" ADD "no_notification" boolean`);
|
||||||
|
<<<<<<< HEAD
|
||||||
await queryRunner.query(`ALTER TABLE "draft_order" ADD "no_notification_order" boolean`);
|
await queryRunner.query(`ALTER TABLE "draft_order" ADD "no_notification_order" boolean`);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "draft_order" DROP COLUMN "no_notification_order"`);
|
await queryRunner.query(`ALTER TABLE "draft_order" DROP COLUMN "no_notification_order"`);
|
||||||
|
=======
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
|
||||||
await queryRunner.query(`ALTER TABLE "order" DROP COLUMN "no_notification"`);
|
await queryRunner.query(`ALTER TABLE "order" DROP COLUMN "no_notification"`);
|
||||||
await queryRunner.query(`ALTER TABLE "swap" DROP COLUMN "no_notification"`);
|
await queryRunner.query(`ALTER TABLE "swap" DROP COLUMN "no_notification"`);
|
||||||
await queryRunner.query(`ALTER TABLE "claim_order" DROP COLUMN "no_notification"`);
|
await queryRunner.query(`ALTER TABLE "claim_order" DROP COLUMN "no_notification"`);
|
||||||
await queryRunner.query(`ALTER TABLE "return" DROP COLUMN "no_notification"`);
|
await queryRunner.query(`ALTER TABLE "return" DROP COLUMN "no_notification"`);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -169,7 +169,7 @@ export class Return {
|
|||||||
* type: string
|
* type: string
|
||||||
* format: date-time
|
* format: date-time
|
||||||
* no_notification:
|
* no_notification:
|
||||||
* description: "Flag for describing whether or not notifications related to this should be send."
|
* description: "When set to true, no notification will be sent related to this return."
|
||||||
* type: boolean
|
* type: boolean
|
||||||
* metadata:
|
* metadata:
|
||||||
* description: "An optional key-value map with additional information."
|
* description: "An optional key-value map with additional information."
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ export class Swap {
|
|||||||
* type: string
|
* type: string
|
||||||
* format: date-time
|
* format: date-time
|
||||||
* no_notification:
|
* no_notification:
|
||||||
* description: "Flag for describing whether or not notifications related to this should be send."
|
* description: "If set to true, no notification will be sent related to this swap"
|
||||||
* type: boolean
|
* type: boolean
|
||||||
* metadata:
|
* metadata:
|
||||||
* description: "An optional key-value map with additional information."
|
* description: "An optional key-value map with additional information."
|
||||||
|
|||||||
@@ -215,10 +215,16 @@ describe("ClaimService", () => {
|
|||||||
it.each(
|
it.each(
|
||||||
[
|
[
|
||||||
[false, false],
|
[false, false],
|
||||||
|
<<<<<<< HEAD
|
||||||
[undefined, true],
|
[undefined, true],
|
||||||
[null, true],
|
[null, true],
|
||||||
])
|
])
|
||||||
("passes correct no_notification status to event bus, with '%s'", async (input, expected) => {
|
("passes correct no_notification status to event bus, with '%s'", async (input, expected) => {
|
||||||
|
=======
|
||||||
|
[undefined, true]
|
||||||
|
],
|
||||||
|
"passes correct no_notification status to event bus", async (input, expected) => {
|
||||||
|
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
|
||||||
await claimService.create({
|
await claimService.create({
|
||||||
...testClaim,
|
...testClaim,
|
||||||
no_notification: input,
|
no_notification: input,
|
||||||
@@ -228,6 +234,10 @@ describe("ClaimService", () => {
|
|||||||
id: expect.any(String),
|
id: expect.any(String),
|
||||||
no_notification: expected
|
no_notification: expected
|
||||||
})
|
})
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1134,8 +1134,12 @@ describe("OrderService", () => {
|
|||||||
it.each([
|
it.each([
|
||||||
[false, false],
|
[false, false],
|
||||||
[undefined, true],
|
[undefined, true],
|
||||||
|
<<<<<<< HEAD
|
||||||
[null, true],
|
[null, true],
|
||||||
])("emits correct no_notification option with '%s'", async (input, expected) => {
|
])("emits correct no_notification option with '%s'", async (input, expected) => {
|
||||||
|
=======
|
||||||
|
],"emits correct no_notification option", async (input, expected) => {
|
||||||
|
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
|
||||||
await orderService.createRefund(
|
await orderService.createRefund(
|
||||||
IdMap.getId("order_123"),
|
IdMap.getId("order_123"),
|
||||||
100,
|
100,
|
||||||
|
|||||||
@@ -345,8 +345,12 @@ describe("SwapService", () => {
|
|||||||
[true, true],
|
[true, true],
|
||||||
[false, false],
|
[false, false],
|
||||||
[undefined, true],
|
[undefined, true],
|
||||||
|
<<<<<<< HEAD
|
||||||
[null, true],
|
[null, true],
|
||||||
])( "passes correct no_notification to eventBus with '%s'", async (input, expected) => {
|
])( "passes correct no_notification to eventBus with '%s'", async (input, expected) => {
|
||||||
|
=======
|
||||||
|
])( "passes correct no_notification to eventBus with %s", async (input, expected) => {
|
||||||
|
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
|
||||||
|
|
||||||
await swapService.create(
|
await swapService.create(
|
||||||
testOrder,
|
testOrder,
|
||||||
|
|||||||
@@ -241,7 +241,11 @@ class ClaimService extends BaseService {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
const evaluatedNoNotification = no_notification !== undefined && no_notification !== null ? no_notification : order.no_notification
|
const evaluatedNoNotification = no_notification !== undefined && no_notification !== null ? no_notification : order.no_notification
|
||||||
|
=======
|
||||||
|
const evaluatedNoNotification = no_notification !== undefined ? no_notification : order.no_notification
|
||||||
|
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
|
||||||
|
|
||||||
const created = claimRepo.create({
|
const created = claimRepo.create({
|
||||||
shipping_address_id: addressId,
|
shipping_address_id: addressId,
|
||||||
|
|||||||
@@ -164,6 +164,9 @@ class NotificationService extends BaseService {
|
|||||||
if (!subs) {
|
if (!subs) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(data['no_notification'] === true) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if(data['no_notification'] === true) {
|
if(data['no_notification'] === true) {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -987,6 +987,7 @@ class OrderService extends BaseService {
|
|||||||
"tax_total",
|
"tax_total",
|
||||||
"gift_card_total",
|
"gift_card_total",
|
||||||
"total",
|
"total",
|
||||||
|
"no_notification"
|
||||||
],
|
],
|
||||||
relations: [
|
relations: [
|
||||||
"discounts",
|
"discounts",
|
||||||
@@ -1135,7 +1136,11 @@ class OrderService extends BaseService {
|
|||||||
|
|
||||||
const result = await this.retrieve(orderId)
|
const result = await this.retrieve(orderId)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
const evaluatedNoNotification = noNotification !== undefined && noNotification !== null ? noNotification : order.no_notification
|
const evaluatedNoNotification = noNotification !== undefined && noNotification !== null ? noNotification : order.no_notification
|
||||||
|
=======
|
||||||
|
const evaluatedNoNotification = noNotification !== undefined ? noNotification : order.no_notification
|
||||||
|
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
|
||||||
|
|
||||||
this.eventBus_.emit(OrderService.Events.REFUND_CREATED, {
|
this.eventBus_.emit(OrderService.Events.REFUND_CREATED, {
|
||||||
id: result.id,
|
id: result.id,
|
||||||
|
|||||||
@@ -238,7 +238,11 @@ class SwapService extends BaseService {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
const evaluatedNoNotification = noNotification !== undefined && noNotification !== null ? noNotification : order.no_notification
|
const evaluatedNoNotification = noNotification !== undefined && noNotification !== null ? noNotification : order.no_notification
|
||||||
|
=======
|
||||||
|
const evaluatedNoNotification = noNotification !== undefined ? noNotification : order.no_notification
|
||||||
|
>>>>>>> 04fe5292f7e9dcd14cb1a4ea17db8978f9b52c03
|
||||||
|
|
||||||
const swapRepo = manager.getCustomRepository(this.swapRepository_)
|
const swapRepo = manager.getCustomRepository(this.swapRepository_)
|
||||||
const created = swapRepo.create({
|
const created = swapRepo.create({
|
||||||
|
|||||||
Reference in new issue
Block a user