draft order func. complete
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
|
||||
export class paymentLinkTemplate1613634008478 implements MigrationInterface {
|
||||
name = 'paymentLinkTemplate1613634008478'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "store" ADD "payment_link_template" character varying`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "store" DROP COLUMN "payment_link_template"`);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -274,9 +274,9 @@ class DraftOrderService extends BaseService {
|
||||
delete where.display_id
|
||||
|
||||
query.join = {
|
||||
alias: "draftOrder",
|
||||
alias: "draft_order",
|
||||
innerJoin: {
|
||||
cart: "draftOrder.cart",
|
||||
cart: "draft_order.cart",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -287,7 +287,9 @@ class DraftOrderService extends BaseService {
|
||||
new Brackets(qb => {
|
||||
qb.where(`cart.email ILIKE :q`, {
|
||||
q: `%${q}%`,
|
||||
}).orWhere(`display_id::varchar(255) ILIKE :dId`, { dId: `${q}` })
|
||||
}).orWhere(`draft_order.display_id::varchar(255) ILIKE :dId`, {
|
||||
dId: `${q}`,
|
||||
})
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user