Skip to content

Commit

Permalink
LPD-43435 Remove productChannel parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardo-diniz authored and brianchandotcom committed Dec 10, 2024
1 parent 5d687b5 commit 7500a1d
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {TYPES} from '../AppContext/actionTypes';
import './DefineAppProfilePage.scss';
import MultiSelect from '../../../../../../components/MultiSelect/MultiSelect';
import UploadLogo from '../../../../../../components/UploadLogo/UploadLogo';
import {useMarketplaceContext} from '../../../../../../context/MarketplaceContext';
import {PRODUCT_SPECIFICATION_KEY} from '../../../../../../enums/Product';
import i18n from '../../../../../../i18n';
import HeadlessCommerceAdminCatalogImpl from '../../../../../../services/rest/HeadlessCommerceAdminCatalog';
Expand Down Expand Up @@ -63,7 +62,6 @@ export function DefineAppProfilePage({
},
dispatch,
] = useAppContext();
const {channel} = useMarketplaceContext();

const handleLogoUpload = (files: FileList) => {
const file = files[0];
Expand Down Expand Up @@ -123,17 +121,6 @@ export function DefineAppProfilePage({
appDescription: appDescription?.replace(/\n/g, '<br>'),
appName,
catalogId,
productChannels: [
{
channelId: channel?.id as number,
currencyCode: channel?.currencyCode as string,
externalReferenceCode:
channel?.externalReferenceCode as string,
id: channel?.id as number,
name: channel?.name as string,
type: channel?.type as string,
},
],
productSpecifications: [
{
specificationKey:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Apps = () => {
.build(),
'images.accountId': '-1',
'nestedFields':
'attachments,images,productChannels,productSpecifications,skus',
'attachments,images,productSpecifications,skus',
'page': page.toString(),
'skus.accountId': '-1',
'sort': 'createDate:desc',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const Solutions = () => {
.build(),
'images.accountId': '-1',
'nestedFields':
'attachments,images,productChannels,productSpecifications,skus',
'attachments,images,productSpecifications,skus',
'page': page.toString(),
'skus.accountId': '-1',
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ class HeadlessCommerceAdminCatalog {
categories,
description,
name,
productChannels,
productStatus,
workflowStatusInfo,
}: {
catalogId: number;
categories: Partial<Categories>[];
description: string;
name: string;
productChannels?: Partial<Channel>[];
productStatus?: number;
workflowStatusInfo?: number;
}) {
Expand All @@ -60,7 +58,6 @@ class HeadlessCommerceAdminCatalog {
categories,
description: {en_US: description},
name: {en_US: name},
productChannels,
productConfiguration: {
allowBackOrder: true,
maxOrderQuantity: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,6 @@ interface Product {
modifiedDate: string;
name: {[key: string]: string};
price?: number;
productChannelFilter?: boolean;
productChannels: Channel[];
productId: number;
productSpecifications: ProductSpecification[];
productStatus: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@ export function createApp({
appDescription,
appName,
catalogId,
productChannels,
productSpecifications,
}: {
appCategories: Categories[];
appDescription: string;
appName: string;
catalogId: number;
productChannels?: Partial<Channel>[];
productSpecifications?: ProductSpecification[];
}) {
return fetch(
Expand All @@ -65,8 +63,6 @@ export function createApp({
categories: appCategories,
description: {en_US: appDescription},
name: {en_US: appName},
productChannelFilter: true,
productChannels,
productConfiguration: {allowBackOrder: true},
productSpecifications,
productStatus: 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,6 @@
"roleName": "Guest",
"scope": "1"
},
{
"actionIds": [
"UPDATE"
],
"primKey": "0",
"resourceName": "com.liferay.commerce.product.model.CommerceChannel",
"roleName": "Supplier",
"scope": "1"
},
{
"actionIds": [
"VIEW"
Expand Down

0 comments on commit 7500a1d

Please sign in to comment.