-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/add-q-and-order-to-stock-location
- Loading branch information
Showing
54 changed files
with
1,364 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@medusajs/core-flows": patch | ||
"@medusajs/link-modules": patch | ||
"@medusajs/medusa": patch | ||
"@medusajs/modules-sdk": patch | ||
"@medusajs/types": patch | ||
--- | ||
|
||
feat: Sales Channel module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
export * as cart from "./cart-service" | ||
export * as customer from "./customer-service" | ||
export * as region from "./region-service" | ||
export * as salesChannel from "./sales-channel-service" | ||
export * as shippingProfile from "./shipping-profile-service" | ||
export * as publishableApiKey from "./publishable-api-key-service" |
32 changes: 0 additions & 32 deletions
32
packages/medusa/src/joiner-configs/sales-channel-service.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/dist | ||
node_modules | ||
.DS_store | ||
.env* | ||
.env | ||
*.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Sales Channel Module | ||
|
||
Sales Channel module enables management of sales channels that are used for grouping Products/Carts/Orders etc. |
40 changes: 40 additions & 0 deletions
40
packages/sales-channel/integration-tests/__fixtures__/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { SqlEntityManager } from "@mikro-orm/postgresql" | ||
import { SalesChannel } from "@models" | ||
|
||
const salesChannelData = [ | ||
{ | ||
id: "channel-1", | ||
name: "Channel 1", | ||
description: "Channel description 1", | ||
is_disabled: false, | ||
}, | ||
{ | ||
id: "channel-2", | ||
name: "Channel 2", | ||
description: "Channel description 2", | ||
is_disabled: false, | ||
}, | ||
{ | ||
id: "channel-3", | ||
name: "Channel 3", | ||
description: "Channel description 3", | ||
is_disabled: true, | ||
}, | ||
] | ||
|
||
export async function createSalesChannels( | ||
manager: SqlEntityManager, | ||
channelData: any[] = salesChannelData | ||
): Promise<SalesChannel[]> { | ||
const channels: SalesChannel[] = [] | ||
|
||
for (let data of channelData) { | ||
const sc = manager.create(SalesChannel, data) | ||
|
||
channels.push(sc) | ||
} | ||
|
||
await manager.persistAndFlush(channels) | ||
|
||
return channels | ||
} |
Oops, something went wrong.