feat: Add exchange return shipping (#8108)

* wip

* finalize tests

* feat: Add exchange return shipping

* add shipping to preview

* test input

* move utils and ignore already inserted shipping method

* use custom price

---------

Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
This commit is contained in:
Oli Juhl
2024-07-15 22:04:20 +02:00
committed by GitHub
parent b38c0488be
commit ffd4b195ee
25 changed files with 511 additions and 165 deletions

View File

@@ -2,6 +2,8 @@ import { DAL } from "@medusajs/types"
import {
createPsqlIndexStatementHelper,
generateEntityId,
OrderChangeStatus,
OrderChangeType,
} from "@medusajs/utils"
import {
BeforeCreate,
@@ -10,14 +12,14 @@ import {
Entity,
Enum,
ManyToOne,
OnInit,
OneToMany,
OnInit,
OptionalProps,
PrimaryKey,
Property,
Rel,
} from "@mikro-orm/core"
import { OrderChangeStatus, OrderChangeType } from "@types"
import {} from "@types"
import OrderClaim from "./claim"
import OrderExchange from "./exchange"
import Order from "./order"

View File

@@ -116,6 +116,9 @@ export default class Return {
@Enum({ items: () => ReturnStatus, default: ReturnStatus.REQUESTED })
status: ReturnStatus = ReturnStatus.REQUESTED
@Property({ columnType: "text", nullable: true })
location_id: string | null = null
@Property({ columnType: "boolean", nullable: true })
no_notification: boolean | null = null