2022-03-17 15:00:17 +00:00
|
|
|
import { ApolloProvider } from "@apollo/client";
|
2021-09-17 08:09:45 +00:00
|
|
|
import DemoBanner from "@saleor/components/DemoBanner";
|
2022-03-09 08:56:55 +00:00
|
|
|
import { PermissionEnum } from "@saleor/graphql";
|
2020-06-30 17:41:43 +00:00
|
|
|
import useAppState from "@saleor/hooks/useAppState";
|
2021-07-21 08:59:52 +00:00
|
|
|
import { ThemeProvider } from "@saleor/macaw-ui";
|
2022-03-17 15:00:17 +00:00
|
|
|
import { SaleorProvider } from "@saleor/sdk";
|
2020-06-30 17:41:43 +00:00
|
|
|
import React from "react";
|
|
|
|
import { render } from "react-dom";
|
|
|
|
import ErrorBoundary from "react-error-boundary";
|
|
|
|
import TagManager from "react-gtm-module";
|
|
|
|
import { useIntl } from "react-intl";
|
|
|
|
import { BrowserRouter, Route, Switch } from "react-router-dom";
|
|
|
|
|
2020-07-22 10:54:15 +00:00
|
|
|
import AppsSection from "./apps";
|
2021-08-20 13:58:53 +00:00
|
|
|
import { ExternalAppProvider } from "./apps/components/ExternalAppContext";
|
2020-07-22 10:54:15 +00:00
|
|
|
import { appsSection } from "./apps/urls";
|
2019-08-09 11:14:35 +00:00
|
|
|
import AttributeSection from "./attributes";
|
2020-06-30 17:41:43 +00:00
|
|
|
import { attributeSection } from "./attributes/urls";
|
2021-12-17 11:10:54 +00:00
|
|
|
import Auth, { useUser } from "./auth";
|
|
|
|
import AuthProvider from "./auth/AuthProvider";
|
2020-06-30 17:41:43 +00:00
|
|
|
import LoginLoading from "./auth/components/LoginLoading/LoginLoading";
|
|
|
|
import SectionRoute from "./auth/components/SectionRoute";
|
2019-06-19 14:40:52 +00:00
|
|
|
import CategorySection from "./categories";
|
Multichannel (#833)
* add multichannel to configuration view
* create multichannels list view
* create multichannels list view
* add ChannelsCreate view
* update channels in configuration
* add stories
* update default messages
* fix ChannelForm props
* update channels list styles
* update snapshots
* update channel form currency input
* update Channels fragments
* extract messages
* remove tabs from channelsList
* channel details, channel delete modal (#598)
* create Channel details view
* create ChannelDeleteDialog
* add channels delete dialog to channels list
* update messages and types
* fixes after review
* channels availability (#609)
* create Channel details view
* update messages and types
* create ChannelsAvailability component
* create more product channels components
* create channels stories, update fixtures, types
* update product views with channels data
* update schema and snapshots
* update defaultMessages
* update ProductUpdate view
* create ChannelsAvailabilityDropdown component
* add product channels to local storage
* update globalTypes
* Update to new schema and resolve issues
* Update messages
* create deleteChannel mutation
* add channels availability component to product create view
* refactor ProductCreate and ProductUpdate views
* CollectionProducts view cleanup
* add disabled prop to ActionDialog
* use updateChannels mutation in ProductCreate view
* ProductCreate - update submit function
* fixes after review
* update snapshots and messages
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
* channels shipping components (#655)
* create PricingCard, OrderValue and OrderWeight components
* create ShippingZoneRatesPage and DeleteShippingRateDialog
* update ChannelsAvailability component
* updates after review
* channels shipping views (#662)
* update ChannelsAvailability component
* updates after review
* create PriceRate views, update types
* create weight rates views
* update shipping views, stories, messages
* update snapshots
* update snapshots
* update useChannels hook
* orders channels components (#698)
* create OrderChannelSectionCard component
* update OrderDetailsPage
* update DraftOrderChannelCard
* update snapshots
* update fixtures
* small change after review, update snapshots
* product pricing (#702)
* update product types
* update Pricing in simple product view
* use productVariantCreate mutation in simple product view
* update snapshots and messages
* handle create variant (#715)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update snapshots and messages
* fix update and create product handlers
* update pricing types
* channels modal - new styles, search input (#717)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update pricing types
* add search input in ChannelsAvailabilityDialog
* update ChannelsAvailabilityDialog in all views
* update snapshots
* fix search input label styles
* update toggleAllChannels function
* update variant creator (#724)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update pricing types
* add search input in ChannelsAvailabilityDialog
* update ChannelsAvailabilityDialog in all views
* update snapshots
* add channelLisitngs to variant creator
* update variant creator price styles
* update product variant creator reducer tests
* update createVariants tests
* update error handling in product variant creator
* add Skip pricing for now option
* use PriceField instead of TextField in ProductVariantCreatorSummary
* create price validation function
* fix errors handling in ProductVariantPrice component
* fixes after review
* Product List - remove publish/unpublish buttons (#727)
* ProductList - remove publish and unpublish buttons
* update messages
* update snapshots, messages
* revert changes in ChannelsAvailabilityDropdown
* products/shipping/discount list settings (#739)
* create ChannelSettingsDialog component
* update snapshots
* ProductList - open settings modal when there is no selected channel
* add settings modal to vouchers list
* add settings dialog to sales list
* add setting modal to shipping list
* update shipping
* update snapshots, messages
* useChannelsSettings - remove selectedChannelSlug
* fix channels update handler in product and shipping view
* messages update in ChannelSettingsDialog
* handle product/discount list when there is no channels
* update onSettingsOpen prop
* collection availability dropdown (#743)
* add availability dropdown to collection products list
* update channelListingProduct fragment name
* update voucher view/components with channels (#746)
* update voucher view/components with channels
* update VoucherSummary, remove defaultCurrency from voucher components
* update snapshots
* move getChannelsVariables func to discounts handlers
* update voucher messages
* sale view/components with channels (#750)
* update sale views with channels
* small fixes in discounts
* order views with channels (#752)
* update draft orders with channels
* add channel activate/deactivate mutations
* remove sort by total in orders list
* add error notification on channel activate/deactivate
* product variants channel select (#755)
* add channels selector to ProductVariants component
* remove selectedChannel from ProductUpdate, update messages and snapshots
* update product fragments
* update translations (#762)
* update translations
* fix translation types
* update messages
* update Availability component (#766)
* update ChannelsAvailability component
* update product fixtures
* update collection and channel fixtures
* ChannelsAvailability - handle errors
* update product handlers
* update ChannelsAvailability styles
* update ProductVariant
* update snapshots
* fix missing things in multichannel (#785)
* add availability dropdown to discount products list
* fix error handling in shipping components
* update product views and components
* update messages
* update category view/components
* update CategoryProducts styles
* remove defaultCurrency from shipping components
* create ChannelsSelect component
* update channels error handling after review
* another fixes after review
* Add channels to collection views/components (#791)
** update collection components and views
* update create collection view
* update error handling in collection
* remove filter bar from collection list
* update products fragments
* small fix in collection create view
* use collectionFragment in useCatalogSearch
* update defaultMessages and snapshots
* update homepage view/drop defaultCurrency (#801)
* update homepage view
* drop defaultCurrency prop
* fix onChannelChange function in home view
* remove visibility from product list filters
* update export products with channels (#803)
* update ProductExportDialog with channels
* add new channel error code
* remover VISIBLE from product export dialog Financial information
* fix input size in ProductVariantCreatorSummary (#804)
* channels currency code select (#806)
* create select with currency codes
* fix ChannelDeleteDialog
* update defaultMessages, remove unneeded ChannelDetails handlers
* fixes after rebase
* replace channelListing with channelListings
* [multichannel] Update schema]
* Fix product create test
Co-authored-by: AlicjaSzu <alicja.szukuc@gmail.com>
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2020-11-17 16:10:42 +00:00
|
|
|
import ChannelsSection from "./channels";
|
|
|
|
import { channelsSection } from "./channels/urls";
|
2019-06-19 14:40:52 +00:00
|
|
|
import CollectionSection from "./collections";
|
2020-06-30 17:41:43 +00:00
|
|
|
import AppLayout from "./components/AppLayout";
|
2020-11-23 09:39:24 +00:00
|
|
|
import useAppChannel, {
|
|
|
|
AppChannelProvider
|
|
|
|
} from "./components/AppLayout/AppChannelContext";
|
2020-06-24 11:44:35 +00:00
|
|
|
import { DateProvider } from "./components/Date";
|
2022-02-01 09:58:06 +00:00
|
|
|
import ExitFormDialogProvider from "./components/Form/ExitFormDialogProvider";
|
2020-06-30 17:41:43 +00:00
|
|
|
import { LocaleProvider } from "./components/Locale";
|
|
|
|
import MessageManagerProvider from "./components/messages";
|
|
|
|
import { ShopProvider } from "./components/Shop";
|
|
|
|
import { WindowTitle } from "./components/WindowTitle";
|
2022-03-17 15:00:17 +00:00
|
|
|
import { APP_MOUNT_URI, DEMO_MODE, GTM_ID } from "./config";
|
2021-09-24 12:01:54 +00:00
|
|
|
import ConfigurationSection from "./configuration";
|
|
|
|
import { getConfigMenuItemsPermissions } from "./configuration/utils";
|
2020-06-30 17:41:43 +00:00
|
|
|
import AppStateProvider from "./containers/AppState";
|
|
|
|
import BackgroundTasksProvider from "./containers/BackgroundTasks";
|
2021-04-26 10:10:47 +00:00
|
|
|
import ServiceWorker from "./containers/ServiceWorker/ServiceWorker";
|
2020-06-30 17:41:43 +00:00
|
|
|
import { CustomerSection } from "./customers";
|
2019-06-19 14:40:52 +00:00
|
|
|
import DiscountSection from "./discounts";
|
2021-08-16 13:44:00 +00:00
|
|
|
import GiftCardSection from "./giftCards";
|
|
|
|
import { giftCardsSectionUrlName } from "./giftCards/urls";
|
2022-03-17 15:00:17 +00:00
|
|
|
import { apolloClient, saleorClient } from "./graphql/client";
|
2019-06-19 14:40:52 +00:00
|
|
|
import HomePage from "./home";
|
2020-06-30 17:41:43 +00:00
|
|
|
import { commonMessages } from "./intl";
|
2022-06-08 06:44:28 +00:00
|
|
|
import MarketplaceSection from "./marketplace";
|
|
|
|
import { marketplaceUrl } from "./marketplace/urls";
|
2019-06-19 14:40:52 +00:00
|
|
|
import NavigationSection from "./navigation";
|
2020-06-30 17:41:43 +00:00
|
|
|
import { navigationSection } from "./navigation/urls";
|
2019-06-19 14:40:52 +00:00
|
|
|
import { NotFound } from "./NotFound";
|
|
|
|
import OrdersSection from "./orders";
|
|
|
|
import PageSection from "./pages";
|
2020-11-19 14:42:14 +00:00
|
|
|
import PageTypesSection from "./pageTypes";
|
2020-05-14 09:30:32 +00:00
|
|
|
import PermissionGroupSection from "./permissionGroups";
|
2019-08-21 14:30:56 +00:00
|
|
|
import PluginsSection from "./plugins";
|
2019-06-19 14:40:52 +00:00
|
|
|
import ProductSection from "./products";
|
|
|
|
import ProductTypesSection from "./productTypes";
|
2021-01-22 14:05:26 +00:00
|
|
|
import errorTracker from "./services/errorTracking";
|
2019-06-19 14:40:52 +00:00
|
|
|
import ShippingSection from "./shipping";
|
|
|
|
import SiteSettingsSection from "./siteSettings";
|
|
|
|
import StaffSection from "./staff";
|
|
|
|
import TaxesSection from "./taxes";
|
2021-07-21 08:59:52 +00:00
|
|
|
import themeOverrides from "./themeOverrides";
|
2019-06-19 14:40:52 +00:00
|
|
|
import TranslationsSection from "./translations";
|
2020-01-30 11:46:35 +00:00
|
|
|
import WarehouseSection from "./warehouses";
|
2020-06-24 11:44:35 +00:00
|
|
|
import { warehouseSection } from "./warehouses/urls";
|
2021-09-24 12:01:54 +00:00
|
|
|
|
2020-11-23 09:39:24 +00:00
|
|
|
if (process.env.GTM_ID) {
|
2020-05-25 23:36:56 +00:00
|
|
|
TagManager.initialize({ gtmId: GTM_ID });
|
|
|
|
}
|
|
|
|
|
2021-01-22 14:05:26 +00:00
|
|
|
errorTracker.init();
|
|
|
|
|
2021-07-21 08:59:52 +00:00
|
|
|
const App: React.FC = () => (
|
2021-12-17 11:10:54 +00:00
|
|
|
<SaleorProvider client={saleorClient}>
|
|
|
|
<ApolloProvider client={apolloClient}>
|
|
|
|
<BrowserRouter basename={APP_MOUNT_URI}>
|
|
|
|
<ThemeProvider overrides={themeOverrides}>
|
|
|
|
<DateProvider>
|
|
|
|
<LocaleProvider>
|
|
|
|
<MessageManagerProvider>
|
|
|
|
<ServiceWorker />
|
|
|
|
<BackgroundTasksProvider>
|
|
|
|
<AppStateProvider>
|
|
|
|
<AuthProvider>
|
|
|
|
<ShopProvider>
|
|
|
|
<AppChannelProvider>
|
|
|
|
<ExternalAppProvider>
|
2022-02-01 09:58:06 +00:00
|
|
|
<ExitFormDialogProvider>
|
|
|
|
<Routes />
|
|
|
|
</ExitFormDialogProvider>
|
2021-12-17 11:10:54 +00:00
|
|
|
</ExternalAppProvider>
|
|
|
|
</AppChannelProvider>
|
|
|
|
</ShopProvider>
|
|
|
|
</AuthProvider>
|
|
|
|
</AppStateProvider>
|
|
|
|
</BackgroundTasksProvider>
|
|
|
|
</MessageManagerProvider>
|
|
|
|
</LocaleProvider>
|
|
|
|
</DateProvider>
|
|
|
|
</ThemeProvider>
|
|
|
|
</BrowserRouter>
|
|
|
|
</ApolloProvider>
|
|
|
|
</SaleorProvider>
|
2021-07-21 08:59:52 +00:00
|
|
|
);
|
2019-06-19 14:40:52 +00:00
|
|
|
|
2019-08-26 12:56:31 +00:00
|
|
|
const Routes: React.FC = () => {
|
|
|
|
const intl = useIntl();
|
2019-11-14 14:10:52 +00:00
|
|
|
const [, dispatchAppState] = useAppState();
|
2021-12-17 11:10:54 +00:00
|
|
|
const { authenticated, authenticating } = useUser();
|
2021-08-19 16:12:25 +00:00
|
|
|
|
2020-11-23 09:39:24 +00:00
|
|
|
const { channel } = useAppChannel(false);
|
2019-08-26 12:56:31 +00:00
|
|
|
|
2021-01-13 09:33:38 +00:00
|
|
|
const channelLoaded = typeof channel !== "undefined";
|
|
|
|
|
2021-12-17 11:10:54 +00:00
|
|
|
const homePageLoaded = channelLoaded && authenticated;
|
2021-01-13 09:33:38 +00:00
|
|
|
|
2021-12-17 11:10:54 +00:00
|
|
|
const homePageLoading = (authenticated && !channelLoaded) || authenticating;
|
2021-01-13 09:33:38 +00:00
|
|
|
|
2019-08-26 12:56:31 +00:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<WindowTitle title={intl.formatMessage(commonMessages.dashboard)} />
|
2021-09-17 08:09:45 +00:00
|
|
|
{DEMO_MODE && <DemoBanner />}
|
2021-01-13 09:33:38 +00:00
|
|
|
{homePageLoaded ? (
|
2020-07-14 08:11:43 +00:00
|
|
|
<AppLayout>
|
|
|
|
<ErrorBoundary
|
2021-01-22 14:05:26 +00:00
|
|
|
onError={e => {
|
|
|
|
const errorId = errorTracker.captureException(e);
|
|
|
|
|
2020-07-14 08:11:43 +00:00
|
|
|
dispatchAppState({
|
|
|
|
payload: {
|
2021-02-23 08:58:25 +00:00
|
|
|
error: "unhandled",
|
|
|
|
errorId
|
2020-07-14 08:11:43 +00:00
|
|
|
},
|
|
|
|
type: "displayError"
|
2021-01-22 14:05:26 +00:00
|
|
|
});
|
|
|
|
}}
|
2020-07-14 08:11:43 +00:00
|
|
|
>
|
|
|
|
<Switch>
|
|
|
|
<SectionRoute exact path="/" component={HomePage} />
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_PRODUCTS]}
|
|
|
|
path="/categories"
|
|
|
|
component={CategorySection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_PRODUCTS]}
|
|
|
|
path="/collections"
|
|
|
|
component={CollectionSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_USERS]}
|
|
|
|
path="/customers"
|
|
|
|
component={CustomerSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
2021-08-19 16:12:25 +00:00
|
|
|
permissions={[PermissionEnum.MANAGE_GIFT_CARD]}
|
2021-08-16 13:44:00 +00:00
|
|
|
path={giftCardsSectionUrlName}
|
|
|
|
component={GiftCardSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
2020-07-14 08:11:43 +00:00
|
|
|
permissions={[PermissionEnum.MANAGE_DISCOUNTS]}
|
|
|
|
path="/discounts"
|
|
|
|
component={DiscountSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_PAGES]}
|
|
|
|
path="/pages"
|
|
|
|
component={PageSection}
|
|
|
|
/>
|
2020-11-19 14:42:14 +00:00
|
|
|
<SectionRoute
|
2021-09-24 12:01:54 +00:00
|
|
|
permissions={[
|
|
|
|
PermissionEnum.MANAGE_PAGES,
|
|
|
|
PermissionEnum.MANAGE_PAGE_TYPES_AND_ATTRIBUTES
|
|
|
|
]}
|
2020-11-19 14:42:14 +00:00
|
|
|
path="/page-types"
|
|
|
|
component={PageTypesSection}
|
2021-09-24 12:01:54 +00:00
|
|
|
matchPermission="any"
|
2020-11-19 14:42:14 +00:00
|
|
|
/>
|
2020-07-14 08:11:43 +00:00
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_PLUGINS]}
|
|
|
|
path="/plugins"
|
|
|
|
component={PluginsSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_ORDERS]}
|
|
|
|
path="/orders"
|
|
|
|
component={OrdersSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_PRODUCTS]}
|
|
|
|
path="/products"
|
|
|
|
component={ProductSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
2020-12-01 15:43:08 +00:00
|
|
|
permissions={[
|
|
|
|
PermissionEnum.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES
|
|
|
|
]}
|
2020-07-14 08:11:43 +00:00
|
|
|
path="/product-types"
|
|
|
|
component={ProductTypesSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_STAFF]}
|
|
|
|
path="/staff"
|
|
|
|
component={StaffSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_STAFF]}
|
|
|
|
path="/permission-groups"
|
|
|
|
component={PermissionGroupSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_SETTINGS]}
|
|
|
|
path="/site-settings"
|
|
|
|
component={SiteSettingsSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_SETTINGS]}
|
|
|
|
path="/taxes"
|
|
|
|
component={TaxesSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_SHIPPING]}
|
|
|
|
path="/shipping"
|
|
|
|
component={ShippingSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_TRANSLATIONS]}
|
|
|
|
path="/translations"
|
|
|
|
component={TranslationsSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_MENUS]}
|
|
|
|
path={navigationSection}
|
|
|
|
component={NavigationSection}
|
|
|
|
/>
|
|
|
|
<SectionRoute
|
2020-12-01 15:43:08 +00:00
|
|
|
permissions={[
|
2021-09-24 12:01:54 +00:00
|
|
|
PermissionEnum.MANAGE_PRODUCT_TYPES_AND_ATTRIBUTES,
|
|
|
|
PermissionEnum.MANAGE_PAGE_TYPES_AND_ATTRIBUTES
|
2020-12-01 15:43:08 +00:00
|
|
|
]}
|
2020-07-14 08:11:43 +00:00
|
|
|
path={attributeSection}
|
|
|
|
component={AttributeSection}
|
2021-09-24 12:01:54 +00:00
|
|
|
matchPermission="any"
|
2020-07-14 08:11:43 +00:00
|
|
|
/>
|
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_APPS]}
|
|
|
|
path={appsSection}
|
|
|
|
component={AppsSection}
|
|
|
|
/>
|
2022-06-08 06:44:28 +00:00
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_APPS]}
|
|
|
|
path={marketplaceUrl}
|
|
|
|
component={MarketplaceSection}
|
|
|
|
/>
|
2020-07-14 08:11:43 +00:00
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_PRODUCTS]}
|
|
|
|
path={warehouseSection}
|
|
|
|
component={WarehouseSection}
|
|
|
|
/>
|
Multichannel (#833)
* add multichannel to configuration view
* create multichannels list view
* create multichannels list view
* add ChannelsCreate view
* update channels in configuration
* add stories
* update default messages
* fix ChannelForm props
* update channels list styles
* update snapshots
* update channel form currency input
* update Channels fragments
* extract messages
* remove tabs from channelsList
* channel details, channel delete modal (#598)
* create Channel details view
* create ChannelDeleteDialog
* add channels delete dialog to channels list
* update messages and types
* fixes after review
* channels availability (#609)
* create Channel details view
* update messages and types
* create ChannelsAvailability component
* create more product channels components
* create channels stories, update fixtures, types
* update product views with channels data
* update schema and snapshots
* update defaultMessages
* update ProductUpdate view
* create ChannelsAvailabilityDropdown component
* add product channels to local storage
* update globalTypes
* Update to new schema and resolve issues
* Update messages
* create deleteChannel mutation
* add channels availability component to product create view
* refactor ProductCreate and ProductUpdate views
* CollectionProducts view cleanup
* add disabled prop to ActionDialog
* use updateChannels mutation in ProductCreate view
* ProductCreate - update submit function
* fixes after review
* update snapshots and messages
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
* channels shipping components (#655)
* create PricingCard, OrderValue and OrderWeight components
* create ShippingZoneRatesPage and DeleteShippingRateDialog
* update ChannelsAvailability component
* updates after review
* channels shipping views (#662)
* update ChannelsAvailability component
* updates after review
* create PriceRate views, update types
* create weight rates views
* update shipping views, stories, messages
* update snapshots
* update snapshots
* update useChannels hook
* orders channels components (#698)
* create OrderChannelSectionCard component
* update OrderDetailsPage
* update DraftOrderChannelCard
* update snapshots
* update fixtures
* small change after review, update snapshots
* product pricing (#702)
* update product types
* update Pricing in simple product view
* use productVariantCreate mutation in simple product view
* update snapshots and messages
* handle create variant (#715)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update snapshots and messages
* fix update and create product handlers
* update pricing types
* channels modal - new styles, search input (#717)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update pricing types
* add search input in ChannelsAvailabilityDialog
* update ChannelsAvailabilityDialog in all views
* update snapshots
* fix search input label styles
* update toggleAllChannels function
* update variant creator (#724)
* update product types
* update Pricing in simple product view
* handle product create and update errors
* update pricing types
* add search input in ChannelsAvailabilityDialog
* update ChannelsAvailabilityDialog in all views
* update snapshots
* add channelLisitngs to variant creator
* update variant creator price styles
* update product variant creator reducer tests
* update createVariants tests
* update error handling in product variant creator
* add Skip pricing for now option
* use PriceField instead of TextField in ProductVariantCreatorSummary
* create price validation function
* fix errors handling in ProductVariantPrice component
* fixes after review
* Product List - remove publish/unpublish buttons (#727)
* ProductList - remove publish and unpublish buttons
* update messages
* update snapshots, messages
* revert changes in ChannelsAvailabilityDropdown
* products/shipping/discount list settings (#739)
* create ChannelSettingsDialog component
* update snapshots
* ProductList - open settings modal when there is no selected channel
* add settings modal to vouchers list
* add settings dialog to sales list
* add setting modal to shipping list
* update shipping
* update snapshots, messages
* useChannelsSettings - remove selectedChannelSlug
* fix channels update handler in product and shipping view
* messages update in ChannelSettingsDialog
* handle product/discount list when there is no channels
* update onSettingsOpen prop
* collection availability dropdown (#743)
* add availability dropdown to collection products list
* update channelListingProduct fragment name
* update voucher view/components with channels (#746)
* update voucher view/components with channels
* update VoucherSummary, remove defaultCurrency from voucher components
* update snapshots
* move getChannelsVariables func to discounts handlers
* update voucher messages
* sale view/components with channels (#750)
* update sale views with channels
* small fixes in discounts
* order views with channels (#752)
* update draft orders with channels
* add channel activate/deactivate mutations
* remove sort by total in orders list
* add error notification on channel activate/deactivate
* product variants channel select (#755)
* add channels selector to ProductVariants component
* remove selectedChannel from ProductUpdate, update messages and snapshots
* update product fragments
* update translations (#762)
* update translations
* fix translation types
* update messages
* update Availability component (#766)
* update ChannelsAvailability component
* update product fixtures
* update collection and channel fixtures
* ChannelsAvailability - handle errors
* update product handlers
* update ChannelsAvailability styles
* update ProductVariant
* update snapshots
* fix missing things in multichannel (#785)
* add availability dropdown to discount products list
* fix error handling in shipping components
* update product views and components
* update messages
* update category view/components
* update CategoryProducts styles
* remove defaultCurrency from shipping components
* create ChannelsSelect component
* update channels error handling after review
* another fixes after review
* Add channels to collection views/components (#791)
** update collection components and views
* update create collection view
* update error handling in collection
* remove filter bar from collection list
* update products fragments
* small fix in collection create view
* use collectionFragment in useCatalogSearch
* update defaultMessages and snapshots
* update homepage view/drop defaultCurrency (#801)
* update homepage view
* drop defaultCurrency prop
* fix onChannelChange function in home view
* remove visibility from product list filters
* update export products with channels (#803)
* update ProductExportDialog with channels
* add new channel error code
* remover VISIBLE from product export dialog Financial information
* fix input size in ProductVariantCreatorSummary (#804)
* channels currency code select (#806)
* create select with currency codes
* fix ChannelDeleteDialog
* update defaultMessages, remove unneeded ChannelDetails handlers
* fixes after rebase
* replace channelListing with channelListings
* [multichannel] Update schema]
* Fix product create test
Co-authored-by: AlicjaSzu <alicja.szukuc@gmail.com>
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2020-11-17 16:10:42 +00:00
|
|
|
<SectionRoute
|
|
|
|
permissions={[PermissionEnum.MANAGE_CHANNELS]}
|
|
|
|
path={channelsSection}
|
|
|
|
component={ChannelsSection}
|
|
|
|
/>
|
2021-09-24 12:01:54 +00:00
|
|
|
<SectionRoute
|
|
|
|
matchPermission="any"
|
|
|
|
permissions={getConfigMenuItemsPermissions(intl)}
|
|
|
|
exact
|
|
|
|
path="/configuration"
|
|
|
|
component={ConfigurationSection}
|
|
|
|
/>
|
2020-07-14 08:11:43 +00:00
|
|
|
<Route component={NotFound} />
|
|
|
|
</Switch>
|
|
|
|
</ErrorBoundary>
|
|
|
|
</AppLayout>
|
2021-01-13 09:33:38 +00:00
|
|
|
) : homePageLoading ? (
|
2020-07-14 08:11:43 +00:00
|
|
|
<LoginLoading />
|
|
|
|
) : (
|
2020-07-21 16:49:20 +00:00
|
|
|
<Auth />
|
2020-07-14 08:11:43 +00:00
|
|
|
)}
|
2019-08-26 12:56:31 +00:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2019-06-19 14:40:52 +00:00
|
|
|
render(<App />, document.querySelector("#dashboard-app"));
|