Commit graph

2299 commits

Author SHA1 Message Date
Michał Droń
8634aa4542
Fix exit form issue in product translations (#2644)
* Fix rich text exit form issue

* Add unit test for rich text submit hook

* Extract logic

* Fix tests

Co-authored-by: andrzejewsky <vox3r69@gmail.com>
2022-12-07 11:02:02 +01:00
Michał Droń
b0ba5cc2ab
Enable use unknown in catch variables (#2784)
* Enable use unknown in catch variables rule

* Add type guards in useAuthProvider

* Add type cast in FilterErrorsList

* Handle error in tasks
2022-12-07 11:00:42 +01:00
Dawid
0741d3ca2c
Improve saving variant images (#2640)
* Improve saving variant images

* Update storybook types

* Add getSelectedMedia function for products

* Add test for handleAssignMedia in products

* Follow AAA test convention

* Add confirm button to media dialog selector

* Move dialog styles to separate file
2022-12-06 12:03:41 +01:00
Dawid
b98d5d57ef
Fix visual regression in datetime attribute (#2787) 2022-12-06 12:02:45 +01:00
Patryk Andrzejewski
018b93aaa6
Prevent infinite reloading service worker (#2785)
* Respect interval for service worker

* Do not load sw by vie plugin

* Move comment above
2022-12-06 11:12:19 +01:00
Patryk Andrzejewski
c4f6a18d38
Remove snapshots (#2754)
* Remove snapshots

* Remove setup file

* Keep config
2022-12-02 12:58:43 +01:00
Michał Droń
347e32ef4a
Replace classnames with clsx (#2759)
* Replace classnames with clsx

* Add clsx to package.json

* Remove classnames

* Remove classnames types

* Restrict classnames in eslint rules
2022-12-02 11:45:19 +01:00
Karol
d2496679c0
[cypress] Add tests for delete several gift cards (#2646)
* done

* pr fixes part1

* wip

* pr adjustments

* remove cy log
2022-12-02 10:37:09 +01:00
Michał Droń
e900f2e1df
Fix strict null checks in webhooks (#2678)
* Fix strict null errors in webhooks

* Disable strict null checks

* Update snapshots

* Add migration comment in tsconfig

* Fix 404 on loading

* Fix loading case
2022-12-01 14:42:18 +01:00
Patryk Andrzejewski
9bd69248d4
Fix service worker (#2760) 2022-12-01 11:55:46 +01:00
Lukasz Ostrowski
e06d3bdf0d
Improve dashboard and marketplace connection (#2666)
* Change env variables related to marketplace, add navigation item

* Change apps order

* Add button to browse marketplace

* Add redirect to Saleor Apps Marketplace on button click

* Move apps tabs state to URL

* Pass theme for initial marketplace iframe load

* Improve marketplace mount

* fix types

* fix cr

* Update env variables to disable marketplace on envs other than master staging

* Extract locales

* update snapshots
2022-11-30 17:20:20 +01:00
Dawid
f2af4a1b23
Metadata settings in tax classes (#2680)
* feat: added metadata settings to tax classes

* test: update test snapshots

* refactor: update taxes error handling

* refactor: add TaxClassBase fragment

* refactor: update tax classes initial values definition
2022-11-30 17:18:44 +01:00
Michał Droń
20c69efe16
Enable no implicit this (#2709)
* Enable no implicit this

* Fix this reference in order return utils
2022-11-30 11:11:28 +01:00
Lukasz Ostrowski
46b0adec0e
Construct full API URL in case not full provided (#2738)
* Construct full API URL in case not full provided

* Resolve URL from base path

* Fix types
2022-11-29 11:45:51 +01:00
Michał Fijołek
3c260557a7
order list metadata filter can be saved (#2259) 2022-11-29 10:41:39 +01:00
Patryk Andrzejewski
aa10a1d08e
Introduce vite (#2677)
Co-authored-by: Krzysztof Żuraw <9116238+krzysztofzuraw@users.noreply.github.com>
2022-11-28 14:56:46 +01:00
Lukasz Ostrowski
17e3c4c8f2
Resolve saleor host/domain from full saleor api url (#2613) 2022-11-28 12:15:48 +01:00
Michał Droń
4f78d00534
Remove warehouse selection for preorder cases on fulfill page (#2515) 2022-11-25 14:59:11 +01:00
Dawid
7c1c7933e3
Fix account settings page when logged in with external auth (#2478)
* Fix account settings page when logged in with external auth

* Update staff details page types

* refactor: staff member page utils
2022-11-25 10:35:53 +01:00
Patryk Andrzejewski
9ef4d4c6ee
Revert "Introduce vite (#2580)" (#2676)
This reverts commit 9de945d61a.
2022-11-24 16:24:04 +01:00
Patryk Andrzejewski
9de945d61a
Introduce vite (#2580)
* Vite, remove webpack

* Clean deps

* Fix apollo types

* Fix types

* CI

* Fix types

* Fix types

* Keep required deps for storybook

* Rename build dir

* Sentry config, fix react-virtualized issue

* Set NODE_OPTIONS

* Fast-refresh rule for eslint

* Update deps

* Update deps

* Update deps

* Remove webpack

* Add sw

* Update dockerfile

* Update dockerfile

* Update readme, dev port
2022-11-24 15:24:08 +01:00
Wojciech Mista
9574e6a92c
Macaw UI update (#2512)
Co-authored-by: andrzejewsky <vox3r69@gmail.com>
Co-authored-by: timur <timuric@gmail.com>
Co-authored-by: Krzysztof Żuraw <9116238+krzysztofzuraw@users.noreply.github.com>
2022-11-24 13:16:51 +01:00
Dawid
dbe394f2a8
Fix images overflow in media picker (#2625)
* Fix scroll bar in media picker

* Update storybook types
2022-11-24 11:54:25 +01:00
Timur Carpeev
93b70cb2b7
Spacing nudges (#2472)
* Spacing nudges

* Use flex

* Added wrapping

* Update snapshot
2022-11-23 18:17:19 +01:00
Dawid
2e45f04802
Fix improper double attempt to get external access token (#2504)
* Fix improper double attempt to get external access token

* Update messages

* Add auth error types
2022-11-23 12:09:48 +01:00
Lukasz Ostrowski
1fa9213871
Add support for synchronizing App's routing with Dashboard path (#2551)
* Add draft redirection fix

* Update SDK
2022-11-22 10:29:29 +01:00
Krzysztof Żuraw
056aab2560
Allow to send 0 as price (#2620) 2022-11-18 15:59:58 +01:00
Dawid
e1b3d5b4f3
Add names of attributes translations (#2566)
* Add names of attributes translations

* Support plain text attributes translation

* Fix translation field type

* Refactor attribute translations input data

* Refactor translation fields code

* Fix translation fields invalid skeleton display
2022-11-17 15:14:45 +01:00
Lukasz Ostrowski
8ab43fd519
Provide full API URL of Saleor to app iframe, add test (#2579)
* Provide full API URL of Saleor to app iframe, add test

* Fix imports after refactor
2022-11-17 15:10:33 +01:00
Michał Droń
5c1a62171d
🦄 Simple taxes (#2072)
* Tax configuration - implement channels view (#2048)

* Add channels view

* Fix channels view import

* Remove legacy stories references

* Fix link in configuration

* Update snapshots

* Remove sample checkboxes props

* Disable hover in country exceptions

* Update snapshots

* Extract country exception rows to seperate component

* Extract components to seperate files

* Remove duplicated section name

* Remove backlink

* Add translations to section names

* Extract messages

* Add ListItemLink component

* Replace navigator with link in TaxChannelsMenu

* Fix horizontal scroll in TaxChannelsMenu

* Change codegen to build from custom schema

* Build types

* Update fragments

* Add fixtures

* Change any to proper types

* Add story for tax channels page

* Replace MUI Skeleton with Saleor Skeleton

* Change clsx import to classnames

* Fix checkboxes shadows in settings card

* Update IDs in fixtures

* Fix offset in TaxChannelsMenu

* Update snapshots

* Remove any from TaxSettings

* Fix todos

* Change relative marginLeft to before pseudoelement

* Extract styles to seperate files

* Change folder structure

* Extract redirect logic to custom hook

* Update snapshots

* Fix comment

* Add early return in channels view

* Tax configuration - implement countries view (#2053)

* Add channels view

* Remove sample checkboxes props

* Disable hover in country exceptions

* Extract country exception rows to seperate component

* Extract components to seperate files

* Remove duplicated section name

* Remove backlink

* Add translations to section names

* Replace navigator with link in TaxChannelsMenu

* Fix horizontal scroll in TaxChannelsMenu

* Change any to proper types

* Add story for tax channels page

* Replace MUI Skeleton with Saleor Skeleton

* Change clsx import to classnames

* Fix checkboxes shadows in settings card

* Update IDs in fixtures

* Fix offset in TaxChannelsMenu

* Remove any from TaxSettings

* Add countries list view

* Add TaxCountryMenu component

* Add CountryList page

* Change channels menu rows height

* Change countries menu rows height

* Add TaxInput component

* Add tax classes rates to countries page

* Fix search input padding

* Add minmax to TaxInput

* Add searching through tax class rates

* Extract messages

* Add better handlers

* Add fullWidth to TaxInput

* Specify type for TaxInputs

* Remove spinboxes on firefox

* Remove custom spinboxes

* Remove maxHeight from menu rows

* Post-rebase fix

* Change setter to formchagne

* Add TaxConfiguration fragment

* Add isDefault field to taxClass

* Add fixtures

* Shape data

* Replace useEffect with useTaxUrlRedirect

* Fix country names in menu

* Add country page story

* Add early return in countries view

* Unify loading states between channels and countries pages

* Handle special chars and case insensitiveness in local search

* Replace navigate function with ListItemLink

* Move styles to seperate file

* Move styles to seperate file

* Migrate to strict null checks

* Remove unnecessary optional chaining

* Change overflow scroll to Y only

* Add useMemo on finding selected country

* Add useMemo on local search

* Translate labels in page tabs

* Change url from /taxes/classes to /taxes/tax-classes

* Remove capitalization from strings

* Extract messages

* Bump macaw to 0.6.2

* Update snapshots

* Add spinboxes explanation comment

* Handle empty state

* Add tax classes view (#2093)

* Add TaxClass fragment

* Build types

* Add tax classes to fixtures

* Add tax classes view

* wip Add tax classes page

* Add tax classes menu

* Add TaxRate fragment

* Extract logic

* Handle loading state & add story

* Extract messages

* Update snapshots

* Change schema building from schema back to introspection

* Update schema

* Update fragments

* Build types

* Update fixtures

* Reshape data

* Move styles to seperate file

* Use getById

* Add explicit undefined

* Comment out unfinished modal stories

* Update snapshots

* Taxes - add API calls in channels view (#2106)

* Build types

* Add TaxRate fragment

* Update snapshots

* Add taxConfigurationList query

* Add taxCountriesList query

* Add TaxClassesList query

* Rename TaxConfigurationsList query

* Handle empty state

* Fix types post-rebase

* Add form to TaxChannelsPage

* wip Add dialog for handling country exceptions

* wip Fix dialog url

* wip Add update exceptions handlers

* Add dialog story

* Fix type errors

* Add mutation support

* Fix types in story

* Add transition state to submit button

* Add notifier

* Extract messages

* Remove unused import

* Add backlink in savebar

* Update snapshots

* Fix link in navigation

* Update snapshots

* Remove message from tax config error fragment

* Add hook description

* Use useStateFromProps

* Remove error handling

* Improve url & path function names

* Use theme.spacing in TaxCountryDialog styles

* Remove redundant key modification

* Revert "Use useStateFromProps"

This reverts commit d3c68b04701cf935e917d7baa3ed1361ca3446d5.

* Move initial map to parent & add open dependency to countries state

* Use useModalDialogOpen

* Fix state update

* Remove scrolls & add ellipsis in side menu

* Center checkboxes

* Update snapshots

* Add fake div for list alignment

* Trigger deployment

* Close modal on submit

* Remove divider on last ListItem

* Align add country button

* Wrap grid child in div to avoid card stretching

* Update snapshots

* Trigger changes in add/delete exceptions

* Trigger change on expcetion checkboxes

* Add trailing commas

* Connect countries view to API (#2178)

* Add empty states

* Update countries view urls

* Remove unused import

* Add country modal to countries view

* Update schema

* Implement country view mutations & error fragments

* Implement tax class update mutation

* Add sidebar temporary state for new configs

* Remove unused imports

* Wrap in form

* Add savebar & fix search

* Update schema

* Add form wrapper

* Fix types

* Extract messages

* Bump macaw

* Update snapshots

* Fix comma dangles

* Update snapshots

* Notify about mutation success

* Add logic for mixing current and new rates

* Workaround for sending null rates

* Fix filling form with correct data after submitting

* Handle deleting configuration

* Fix selected banner

* Remove leftover comment

* Add handler for country configuration delete

* Trigger deployment

* Clean up useEffects causing infinite render loops

* Sort countries from api by name

* Fix card bottom padding

* Remove bottom divider & fix padding

* Remove scroll wrapper in side menu

* Update snapshots

* Remove scroll wrapper from tax classes menu

* Update snapshots

* Refresh form to initial onSubmit

* Revert "Refresh form to initial onSubmit"

This reverts commit 42414237d35086da63f4aa088c8072411429b1d8.

* Allow only 3 decimal characters in tax inputs

* Update snapshots

* Update schema

* Update types

* Change logic from default tax class to null class

* Fix sorting

* Send empty country rates as nulls in mutation

* Extract messages

* Update lockfile

* Update schema

* Drop default tax classes

* Update snapshots

* Post-rebase fixes

* Connect tax classes view to API (#2334)

* Add mutations

* Handle empty state

* Wrap page in form

* Update stories

* Build types

* Handle tax class delete

* Handle update tax class

* Update stories

* Handle tax class change name

* Add mutation state to savebar

* Handle creating new tax classes

* Extract messages

* Specify type

* Update stories

* Sort rates

* Fix skeleton rendering

* Remove placeholders

* Fix skeleton rendering on country list

* Update snapshots

* Change initial pagination to 100

* Disallow creating multiple new tax classes

* Disallow creating multiple country configurations

* Fix messages

* Autofocus on new tax class name

* Add country name to header

* Temporarily comment out broken code in tax channels

* Update snapshots

* Update snapshots post-rebase

* Add tax strategies & assigning tax classes (#2369)

* Update fragments

* Add optional merging in useForm

* Handle tax strategies

* Update snapshots

* Update fixtures

* Extract messages

* Remove unused shop query fields

* Fix breaking bug when fetchMore is used in non-searchable SingleAutocompleteSelectFields

* Migrate product types to tax classes

* Add tax classes to shipping methods

* Use encapsulated logic in product types

* Fix product type stories

* Fix shipping fixtures

* Fix product type type mismatch

* Fix shipping stories

* Fix product type fixtures

* Fix mismatching types

* Extract messages

* Update snapshots

* Update snapshots

* Fix comment

* Drop deprecated graphql fields

* Replace tax types with tax classes in product create view

* Replace tax types with tax classes in product update view

* Fix tests, stories, fixtures

* Extract messages

* Update snapshots

* Move status messages to commonStatusMessages

* Handle empty array case in tax class change handler

* Reuse messages

* Simple taxes bugfixes (#2395)

* Fix tax channels menu - dense layout

* Change view names to fit convention

* Fix per country exceptions in tax channels view

* Fix skeleton rendering on tax countries card title

* Filter out existing countries from modal

* Update snapshots

* Fix deleting country configuration

* Disallow negative values in tax inputs

* Handle empty tax classes view

* Allow empty options in shipping & product types views tax class assignment field

* Modify undefined rates in tax classes view

* Update macaw-ui

* Fix UI on channels view

* Fix UI on countries view

* Fix UI on countries view

* Align tax class rate label to the right

* Updaste snapshots

* Extract messages

* Fix adding rates on new tax class

* Fix key errors

* Update schema

* Build types

* Allow empty rates in taxClassUpdate mutation

* Extract tax channels change country function as a handler

* Deprecate useStateFromProps

* Change useStateFromProps to useStateUpdate

* Fix dividers

* Delete delete icon on new tax classes

* Update snapshots

* Update lockfile

* Update macaw to 0.6.6

* Update snapshots

* Specify type of input in country change handler

* Extract autofocus logic to custom hook

* Replace alternative with switch statement

* Extract country exclusion logic from JSX

* Update lockfile

* Update lockfile

* Trigger deployment

* Fix invisible select markers

* Fix linter issue

* Fix crashing product details page

* Fix e2e error

* Update snapshots

* Allow view taxes with any staff permissions (#2510)

* Update after rebase

Co-authored-by: Dawid <tarasiukdawid@gmail.com>
2022-11-17 13:48:50 +01:00
Dawid
03f2b5c544
Fix product channels update error (#2528)
* Fix product channels update error

Fixed error occured after trying to update availability of variant
channel in datagrid, which (channel) was later on removed from being available on
product. Now variant channel availability shouldn't be appended to channel listing
update input when channel has been disabled on product.

* Add test of inferProductChannelsAfterUpdate
2022-11-17 12:47:11 +01:00
Krzysztof Żuraw
ac063c6410
Update Dockerfile (#2523)
Co-authored-by: Francisco Marques <franciscopcmarques@gmail.com>
2022-11-16 16:01:34 +01:00
Krzysztof Żuraw
32cc9c9bdb
Do not send availableForPurchaseDate if channel is unavailable (#2506) 2022-11-09 17:41:11 +01:00
Krzysztof Żuraw
5fdb51c0ee
Close datagrid modal by esc key (#2507) 2022-11-09 17:40:57 +01:00
Dawid
7fd2eb2a2c
Revert "Add names of attributes translations (#2433)" (#2531)
This reverts commit 796383637c.
2022-11-07 12:20:58 +00:00
Dawid
796383637c
Add names of attributes translations (#2433)
* Add names of attributes translations

* Support plain text attributes translation

* Fix translation field type

* Refactor attribute translations input data

* Refactor translation fields code

* Fix translation fields invalid skeleton display
2022-11-04 11:11:47 +01:00
Michał Droń
dc5a6ac76b
Update Typescript (#2494)
* Update TypeScript

* Fix recursive typing in navigation

* Fix linter issue

* Update lockfile
2022-11-03 11:43:44 +01:00
Dawid
3a3a4a7ae6
Add metadata webhook events (#2375) 2022-11-02 13:31:17 +01:00
Michał Droń
7387019288
Use single price value instead of range in product list (#2386)
* Render single value when amount of money is matching

* Use Intl.NumberFormat in money formatting

* Extract messages
2022-11-02 12:20:25 +01:00
Krzysztof Żuraw
da8e4e5a9c
Fallback data length to 0 on product dialog (#2485) 2022-10-31 11:39:42 +01:00
Krzysztof Żuraw
cac3e43702
Disable spellcheck for PII fields (#2416) 2022-10-31 11:37:07 +01:00
Patryk Andrzejewski
802524744b
Set different version of macaw (#2501)
* Set different version of macaw

* Spanshots
2022-10-28 11:29:07 +02:00
Patryk Andrzejewski
992aa64937
Update Macaw-UI (#2495)
* Update Macaw-UI

* Update snapshots
2022-10-27 17:52:13 +02:00
Patryk Andrzejewski
c009f07581
DataGrid full-screen mode (#2453)
* full screen mode

* add product title, review

* update snapshots

* Update messages
2022-10-27 17:26:09 +02:00
Timur Carpeev
cfb8be1893
Made headers smaller (#2466)
* Made headers smaller

* Changed to h3

* update snapshots

Co-authored-by: andrzejewsky <vox3r69@gmail.com>
2022-10-27 15:04:29 +02:00
Michał Droń
96650bb237
Update macaw to 0.6.6 (#2459)
* Update macaw-ui

* Update snapshots

* Change caret to tilde
2022-10-27 14:02:51 +02:00
Jonatan Witoszek
11a990d197
Remove hover from non-interactive table rows (#2358)
* Disable hover effect when TableRow is not clickable

* Replace TableRow with TableRowLink

* Update snapshots
2022-10-27 12:58:17 +02:00
Karolina Rakoczy
4dcc38cf48
Fix tests for products (#2447) 2022-10-27 11:27:34 +02:00
Patryk Andrzejewski
ea0d213683
handle the case when quantities are null (#2465) 2022-10-26 16:54:31 +02:00
Krzysztof Wolski
d3e2be165d
Add customer extensions mount points and pass object IDs to extensions (#2176)
* Pass additional page context to the popup via URL params

* Add customerID to available app params

* Handle the new customer app extensions

* Add extensions to the customer list

* Fix missing extensions from sidebar when no permission is required for them

* Pass selected products and customers to extension view
2022-10-26 13:19:20 +02:00
Krzysztof Żuraw
3c63b0baf1
Display all error messages on new-password page (#2410) 2022-10-26 12:12:37 +02:00
Krzysztof Żuraw
1fc82a08a0
Edit variant name on variant edit/create (#2388)
Co-authored-by: Michał Droń <dron.official@yahoo.com>
2022-10-25 14:19:48 +02:00
Lukasz Ostrowski
8f1a291c65
Change order of apps list and apps installations (#2452) 2022-10-24 15:56:03 +02:00
Dawid
158188002a
Update React to 17 and related packages (#2370)
* Update React to 17

* Update types for React 17

* Update references in useEffect cleanup functions

* Update react-error-boundary

* Update react-inlinesvg

* Update Apollo Client and Upload Link

* Update apollo-upload-client types

* Fix comment about csstypes

* Downgrade apollo-client version due to log-in bug

* Add missing apollo link

* Update package-lock version

* Fix button type

* Fix datagrid test after react update

* Fix polish language letter bug
2022-10-24 11:49:11 +02:00
Karolina Rakoczy
4b46b4891c
Fix test for creating app (#2439) 2022-10-24 10:22:45 +02:00
Lukasz Ostrowski
7a20c12d22
remove dead link (#2435) 2022-10-21 15:16:36 +02:00
Lukasz Ostrowski
cb9d6ad471
Ensure app doesnt break when manifestUrl in app doesnt exist (#2434) 2022-10-20 16:36:21 +02:00
Patryk Andrzejewski
faa41039fe
Add policy for use name instead of slug (#2402) 2022-10-20 13:55:55 +02:00
Lukasz Ostrowski
d67e4799b2
Apps tabs (#2380)
* Add tabs to apps page

* Detect app in tunnel

* Disable manifest install if Saleor Apps context

* Show only app origin instead full manifest

* Add copy manifest feature

* Update tests

* Add ENV with marketplace endpoint for fetching saleor apps

* Fetch Saleor apps for Marketplace and display them in the tab, otherwise hide

* Code review fixes

* Extract translation messages

* Update tests
2022-10-20 13:35:31 +02:00
Dominik Żegleń
31e0c11fea
New datagrid view for product variant management (#2162)
* New datagrid view for product variant management (#2040)

* Split simple and product with variants updates

* Simplify code

* Change selectedVariantsIds to availableVariants

selectedVariantsIds suggested that these variants *were just* selected

* Add datagrid component

Add datagrid component

Add actions column

Add column picker

Add ts-ignore comment

Remove unused import

Fix after rebase

Add story

Fix column picking

Fix column dragging

Add column resizing

Extract components to own files

Apply styles from class

Improve data storage

Extract state to hook

Expose handlers

Fix styles

Fix header overflow

Add select all option

Add cell types

Fix types

Add number type cell

Add min to stocks

Fix types

Generate columns from shop data

Add number type editor

Fix tests

Update src/components/Datagrid/Datagrid.tsx

Co-authored-by: Jonatan Witoszek <jonatanwitoszek@gmail.com>

Reconstruct data after column toggling

Minor fixes

Add missing id

Remove unused import

Fix container width

Keep changes in state

Drop onChange usage

Use glide datagrid

* Add column picker

* Memoize callbacks

* Add right toolbar

* Make toolbar as prop

* Clean up code

* Fix styling

* Lint files

* Save variant data in datagrid (#2161)

* Allow rows to be deleted

* Add row adding

* Clean up code

* Improve mutations

* Add stock saving

* Add sku and attribute saving

* Display notification after all mutations

* Fix types

* Save channels in datagrid (#2197)

* wip

* Merge simple and variantable handlers

* Move channel setting to form

* Link availability card to form

* Extract listing management to hook

* Update only touched channels

* Improve channel listing managemend

* Display channel data in datagrid

* Save variant channels

* Save changes in channel listings

* Group columns

* Fix types

* Display touched fields

* Return errors from hook

* Display errors in cells

* Improve naming

* Improve naming

* Use reliable called/loading state

* Update src/components/Datagrid/cells.ts

Co-authored-by: Michał Droń <dron.official@yahoo.com>

* Apply fixes from review

Co-authored-by: Michał Droń <dron.official@yahoo.com>

* Fix type error

* Trigger CI

* Trigger CI

* Save added and deleted variants (#2237)

* Save new variants

* Update channel data

* Remove bulk variant delete dialog

* Do not fetch products from api after save

* Extract types

* Reset errors after api response

* Display error when creating variants

* Fix variant reordering

* Remove commented code

* Fix imports

* Edit attributes in datagrid (#2305)

* Add basic dropdown cell

* Fix clickaway

* Add choice customization

* Add callback to fetch choices

* Add attriute value search

* wip

* Pass getSuggestions cb using props

* Fix row adding

* Fix choice creation

* Add styles to datagrid (#2315)

* Improve cell styling

* Prevent navigation when scrolling horizontally

* Fix text editor styles

* Remove unused variable

* Update whole row after editing cell

* Translate column names

* Improve empty message

* Highlight newly created rows

* Add name editing

* Add disabled context menu to added rows

* Add column groups

* Translate column groups names

* Save edited name

* Fix missing column id error

* Add card to datagrid

* Improve shadow on scroll

* Improve fonts

* Fix toolbar placement

* Update api type definitions

* Fix copypasting from excel

* Fix editor font weight

* Improve dark theme

* Improve cell coloring

* Drop styling from story

* Add docs to datagrid (#2339)

* Add docs

* Add summary

* Datagrid fix bugs (#2341)

* Pass refetch to form to avoid double calls

* Add missing prop

* Remove paddings (#2352)

* remove paddings

* remove paddings

* remove paddings

* remove vertical scroll

* update tests

* styles, currency

* Fix variants tests in datagrid (#2365)

* refactor variant test after adding datagrid

* adding assertion to check if datagrid table is visible

* adding check for datagrid

* fix flaky tests in variants

* fix flaky tests in variants

* small changes

* amedments

* update styles

* refactoring, handle prices

* update snapshots

* messages

* snap

* scrolling handle, css for safari

* snap, random mock

* update overflow

* history back hook

* fix cross-price changing, scroll optimization

* trigger ci

* channel checking when adding new variant

Co-authored-by: Michał Droń <dron.official@yahoo.com>
Co-authored-by: Patryk Andrzejewski <vox3r69@gmail.com>
Co-authored-by: Ewa Czerniak <ewa.czerniak@saleor.io>
2022-10-18 11:10:15 +02:00
Lukasz Ostrowski
1fb4479058
Add quick app install from manifest (#2378)
* Create a button that navigates to app install page

* Add translations keys

* Extract messages

* Change type literal to enum

* Update snapshots
2022-10-13 17:13:08 +02:00
Dawid
be76836e12
Add format tip for text attribute rows (#2340)
* Add format tip for text attribute rows

* Update changelog with added attribute tip

* Update attributes test snapshots

* Update question-help icons for dark mode
2022-10-13 12:41:26 +02:00
Dawid
943b96436c
Enable save button on channel pages (#2328)
* Enable save button on channel pages

* Update changelog with enable save button

* Remove disabling save while updating channel

* Trigger CI

Co-authored-by: Patryk Andrzejewski <vox3r69@gmail.com>
2022-10-13 10:34:21 +02:00
Dawid
2c49ea1af0
Revert "Update React to 17 and update related packages (#2344)" (#2367)
This reverts commit 3ba3dac2a7.
2022-10-11 12:01:17 +02:00
Lukasz Ostrowski
44eb27fed3
Hide app privacy URL if not provided (#2357) 2022-10-10 13:22:16 +02:00
Dawid
3ba3dac2a7
Update React to 17 and update related packages (#2344)
* Update React to 17

* Update types for React 17

* Update references in useEffect cleanup functions

* Update react-error-boundary

* Update react-inlinesvg

* Update Apollo Client and Upload Link

* Update apollo-upload-client types

* Trigger CI

* Fix comment about csstypes
2022-10-07 12:50:02 +02:00
Patryk Andrzejewski
f349bbc86a
prevent duplicated queries (channels, siteinfo) (#2343) 2022-10-06 13:46:23 +02:00
Timur Carpeev
0db6ef6377
Increase breakpoints (#2346) 2022-10-06 10:15:16 +02:00
Patryk Andrzejewski
636d6ce416
pick explicitly fields for mutation (#2353) 2022-10-05 12:35:37 +02:00
Dawid
1002a11f41
Fix pagination errors on voucher and sale pages (#2317)
* Fix pagination errors on voucher and sale pages

* Update messages on voucher and sale pages

* Update changelog with pagination fix

* Update test snapshots of voucher and sale pages

* Update types of voucher and sale pages
2022-10-04 16:45:24 +02:00
Dawid
43fb52bc56
Enable save button on page pages (#2325)
* Enable save button on page edit pages

* Update e2e page create tests

* Update page create tests snapshots

* Update changelog with enable save button

* Update messages of pages views

* Update page details messages
2022-10-04 16:02:17 +02:00
Jonatan Witoszek
aceae75ce7
Add rel=noopener to links that take users to external sites (#1980)
* Add rel=noopener to links that take users to external sites

* Update Storyshots for Link changes

* Fix invalid isExternalURL function usage

* Update snapshots
2022-10-04 14:28:26 +02:00
Jonatan Witoszek
58d2a2b438
ESLint: No unused variables (#1981)
* Update eslint config to inform about unused variables

* Remove unused variables
2022-10-04 13:30:51 +02:00
Michał Droń
ed59fe423f
Fix message in voucher view (#2338)
* Fix message

* Extract messages

* Update snapshots
2022-10-03 11:41:00 +02:00
Patryk Andrzejewski
2d2151abc0
Hide shipping zones when you do not have access (#2333)
* hide shipping zones when you do not have access

* use single style hook

* cover warehouses

* snapshot
2022-09-29 10:40:19 +02:00
Patryk Andrzejewski
02c4e8d6e2
reset pagination state once we change number of rows (#2337) 2022-09-29 10:14:57 +02:00
Patryk Andrzejewski
7dc06cef91
firefox checkbox overlap workaround (#2329) 2022-09-28 15:14:31 +02:00
Dawid
575a91b5e9
Enable save button on discount pages (#2319)
* Enable save button on discount pages

* Update changelog with save button enable update

* Refactor channel input map
2022-09-28 10:42:28 +02:00
Dawid
6738467304
Handle form errors before product creation (#2299)
* Handle form errors before product creation

* Update e2e product create tests

* Handle channel errors in product update

* Update changelog

* Fix invalid values of product type picker

* Refactor product create utils

* trigger ci

Co-authored-by: Patryk Andrzejewski <vox3r69@gmail.com>
2022-09-23 14:15:59 +02:00
Dawid
9f7c934dec
Fix dropdown select arrow clicks bugs (#2301)
* Fix dropdown arrow click

* Fix multi-select dropdown arrow click

* Update changelog

* Update test snapshots of select inputs

* Grey out select dropdowns bottom arrow

* Prevent clearing input value in multiselect on item select

Co-authored-by: Patryk Andrzejewski <vox3r69@gmail.com>
2022-09-23 13:39:25 +02:00
Dawid
4c62ebe45d
Fix invalid values of channel picker (#2313)
Co-authored-by: Patryk Andrzejewski <vox3r69@gmail.com>
2022-09-23 13:21:30 +02:00
Dawid
214b677684
Fix missing metadata and payment balance on unconfirmed orders (#2314)
* Fix missing metadata and payment balance on unconfirmed orders

* Update changelog with fix missing fields on order page

Co-authored-by: Patryk Andrzejewski <vox3r69@gmail.com>
2022-09-23 12:25:56 +02:00
Patryk Andrzejewski
32c2ff5f13
fix assign modal when we no pass selectedids (#2330) 2022-09-22 13:44:06 +02:00
Patryk Andrzejewski
ae9b7b31dc
Add UI to enable channel listing in variants view (#2303)
* syncg

* manage channels modal, price editing

* fix typings

* fix typings, splitting components

* fix typings, splitting components

* update snapshot

* update types

* update messages

* use toggle

* update e2e tests

* update messages

* add manage button to edit page

* add manage button to edit page

* re-organize components

* update modals

* fix toggle all

* cover scenario when we have no channels
2022-09-22 12:00:13 +02:00
Dawid
61fe80bb7a
Fix no product error on unconfirmed order lines (#2324)
* Fix no product error onunconfirmed order lines

* Update changelog with fix no product error
2022-09-22 11:03:21 +02:00
Michał Droń
88a0db22e1
Fix broken pagination in swatch attributes (#2282)
* Fix broken pagination in swatch attributes

* Do not apply styling when value is undefined

* Extract logic to function
2022-09-21 17:35:04 +02:00
Michał Droń
5dbd6fed8a
Fix assigning products to collection (#2320)
* Reset modal state in collection details

* cover initial state

* modal updates

* cover case when there is no items to add

Co-authored-by: andrzejewsky <vox3r69@gmail.com>
2022-09-21 15:35:05 +02:00
Dawid
20920f3cf2
Fix exit form dialog false positive (#2311)
* Fix exit form dialog false positive.

Fixed:
- saving legacy data due to assigned legacy ref of function data assigned to form
- lack of clearing dirty status of form data on successful submit
  causing improperly displaying exit form dialog

* Update changelog with exit form dialog fix
2022-09-16 16:16:26 +02:00
Michał Droń
ed95c423ae
Remove errors on fulfilling insufficient stock (#2298)
* Add error handling override for queries

* Handle errors in order fulfill view

* Handle errors in order details view

* Disable errors in approval mutation
2022-09-15 11:45:46 +02:00
Lukasz Ostrowski
a4804e2f3d
Inform App iframe about current and changed locale (#2304)
* Inform App iframe about current and changed locale

* Install production app-sdk@0.11.0
2022-09-15 08:18:43 +02:00
Michał Droń
b7a809f1fc
Improve error page message (#2287)
* Change error page content message

* Extract messages

* Update snapshots
2022-09-13 15:42:13 +02:00
Michał Droń
a989996b1f
Remove product type from product name cell in product list (#2283)
* Remove simple/configurable info from product list

* Update snapshots

* Remove unused import

* Extract messages

* Trigger deployment
2022-09-13 15:41:46 +02:00
Michał Droń
8f0cdf0134
Add fulfillment approve webhook (#2300)
* Update schema

* Update types

* Trigger deployment
2022-09-13 15:41:00 +02:00
Michał Droń
19d5e7e71d
Add product variant reference attribute (#2268)
* Handle variant references

* Update schema & types

* Update changelog

* Extract messages

* Fix handlers

* Update schema

* Build types

* Update types

* Improve assign reference value modals
2022-09-13 12:07:41 +02:00
Lukasz Ostrowski
ff09d04660
Send theme update event to marketplace app on theme change detected (#2289) 2022-09-13 09:15:48 +02:00
Michał Droń
7d3a0a776a
Fix overflowing error notifications (#2286) 2022-09-12 14:54:26 +02:00
Dominik Żegleń
fedf276e68
Do not confirm after removing fulfillment (#2296) 2022-09-09 14:09:31 +02:00
Dominik Żegleń
4ee5eb7795
Fix fulfillment page if not tracking stock (#2290)
* Fix fulfillment page if not tracking stock

* Update snapshots and messages
2022-09-07 16:08:41 +02:00
Michał Droń
884ea78cf5
Fix invisible popup in darkmode (#2274)
* Fix invisible popup

* Move styles to a separate file
2022-09-07 11:42:12 +02:00
Lukasz Ostrowski
84e179604d
Migrate @saleor/app-bridge to @saleor/app-sdk (#2266)
* Migrate @saleor/app-bridge to @saleor/app-sdk

app-bridge is deprecated and was merged into app-sdk.
This commit fixes imports and points to new package

* Downgrade package-lock version

* Update app-sdk to 0.9.1

* Change sdk version to production

* Refresh app-sdk install
2022-09-06 13:11:06 +02:00
Lukasz Ostrowski
daba8a381f
Fix styling of app install ui (#2254)
* Fix styling of app install ui

* Fix dark mode colors
2022-09-06 10:22:33 +02:00
Michał Droń
c1185198f5
Payment status card improvements (#2222)
* Change table layout to flexbox

* Move taxes before total

* Move discounts above subtotal

* Add type to util function

* Remove maybes

* Improve discounts

* Change taxes message

* Make font smaller

* Query total balance in order details

* Use totalBalance from api

* Show refunded when more than 0

* Make taxes grey

* Delete unused import

* Update fixtures

* Update snapshots

* Extract messages

* Move styles to seperate file

* Fix refunded amount

* Add settled message for zero balances

* Change payment status to payment balance

* Update snapshots

* Fix messages post rebase
2022-09-01 13:47:13 +02:00
Karolina Rakoczy
24d77b984a
Add test for thumbnails (#2219)
* Add test for thumbnails

* Add test for thumbnails

* split into functions

* update snapshot
2022-09-01 10:35:19 +02:00
Michał Droń
6789b73f00
Fix saving permission groups (#2239)
* Allow saving regardless of membersChanged value

* Fix in-place sorting on readonly value

* Fix capital letter in button message

* Update snapshots

* Fix stories

* Remove unused import
2022-08-29 13:37:42 +02:00
Dawid
e610aefcfa
Add allocation strategies with sortable warehouses (#2258)
* Add allocation strategy options in channel view

* Update schema with channel allocation strategy

* Reorder channel warehouses after channel saving

* Refactor and clean code of allocation strategy options

* Update schema with allocation strategy

* Trigger CI

* Update allocation starategy options UI

* Update allocation strategy messages

* Trigger CI

* Fix shipping zones and warehouses cards style

* Fix message

* Fix snapshots

Co-authored-by: Michał Droń <dron.official@yahoo.com>
2022-08-29 13:35:55 +02:00
Timur Carpeev
15274e14d7
[Small improvements] Fix webhook docs URL and change settings icon (#2235)
* Swap more icon with settings icon, to make settings more discoverable

* Update snapshot
2022-08-26 11:33:41 +02:00
Dominik Żegleń
ea87abda3c
Drop "manage products" permission requirement to view orders (#2248)
* Bump version

* Remove useless styles

* Ise isAvailableForPurchase field
2022-08-25 10:35:07 +02:00
Timur Carpeev
3684a55ba9
Add correct URL (#2253) 2022-08-24 11:41:59 +02:00
Dawid
df55dba571
Update product and page default availability settings (#2165)
* Update product and page default settings

* Update product and page test snapshots

* Update product create errors handling

* Fix preselected publication info of product with variant without any channel listing

* Update package lock file

* Fix page publication state and its date on page view

* Update page tests
2022-08-22 14:53:17 +01:00
Dominik Żegleń
8e2a3e0c75
Minor fixes to gift card list (#2218)
* Fix paginator interface

* Fix link to product

* Fix dropdown in gift card tags

* Do not pass trash to components
2022-08-18 12:50:09 +02:00
RyanTamulevicz
bf4b5f70a7
Fixes inability to update site settings (#2228) 2022-08-17 14:23:56 +02:00
Dominik Żegleń
f058f4d01f
Update types (#2229) 2022-08-11 17:52:55 +02:00
Wojciech Mista
c6e8537174
Update app actions for new action type (#2200) 2022-08-10 15:26:09 +02:00
Dawid
eea1ba235f
Remove bulk variant creator (#2179)
* Remove bulk vaariant creator

* Update variant test snapshots

* Update variant E2E tests

* fixed test for products variants (#2187)

Co-authored-by: Karolina Rakoczy <rakoczy.karolina@gmail.com>
2022-08-10 11:29:17 +01:00
Dawid
6fdec6e5f1
Update simple product availability card (#2144)
* Update simple product availability card

* Update channel availability messages
2022-08-10 10:15:01 +01:00
Dawid
f01966f0d4
Handle errors on finalizing draft order (#2191)
* Add warning alert before finilizing draft order

* Add line error indicators in draft order view

* Handle unfilled fields errors before draft order finalize

* Handle draft order line errors

* Differentiate line alert severity

* Fix order line alert margin

* Remove unnecessairy comment

* Refactor order draft alert components

* Update order draft test snapshots

* Refaactor order details code

* Hide add products button when no products available on order draft page

* Hide no shipping methods warning if they cannot be determined

* Update product assignment dialog messaages

* Update order channel error messages

* Fix missing order lines in error crash
2022-08-10 10:11:32 +01:00
Wojciech Mista
b0d7342e1f
Fix "Add Staff Member" form errors on inputs (#2186)
* Fix input errors in staff member forms

* Remove unused import
2022-08-04 08:40:14 +02:00
Dawid
2c97b2da41
Move fulfillment warehouse selection to fulfilll page (#2199)
* Move order fulfillment warehouse selection to fulfill page

* Use modal to select warehouse on fulfill order page

* Remove tracking number input from fulfill order page

* Update visual structure of fulfill order page

* Fix fulfill order page styles

* Update order fulfill utils
2022-08-02 14:57:18 +02:00
Michał Droń
804e14768b
Add sync webhooks for tax calculations (#2204)
* Update schema

* Build types

* Add badgesto MultiAutocompleteSelectField

* Reduce z-index on MultiAutocompleteSelectField

* Add preview pills for new webhooks

* Change grid variant to uniform in Webhook details view to reduce clipping

* Update snapshots

* Change isWebhookInPreview to more scalable solution
2022-08-02 14:50:37 +02:00
Michał Droń
40bdf1ecb8
Fix date format in mutations (#2207)
* Fix date format in mutations

* Change date format to UTC

* Change template literal to sliced isostring
2022-08-02 14:31:17 +02:00
Dawid
f9edc55a20
Fix assignment list search with no items found (#2206)
* Fix assignment list search with no items found

* Create warehouse and shipping zones separated count queries

* Remove total count displaying from assignment list
2022-08-02 11:04:45 +02:00
Michał Droń
4ee9e4fc59
Fix numeric attribute filters (#2145)
* Handle numeric attribute filters

* Fix filter behaviour

* Backwards compatibility
2022-08-01 11:39:20 +02:00
Dawid
1a974e380c
Make sortable chips accessible (#2175) 2022-07-29 18:47:09 +02:00
Dawid
3a85027934
Fix variant details/create page sidebar (#2180) 2022-07-29 18:45:52 +02:00
Carles López Magem
437a2130eb
Menu item translations (#2181)
* [Feat] Added MenuItem translations

* [Feat] Added MenuItem translations

* Stories snaps

* max
2022-07-26 11:12:02 +02:00
Dawid
62c9f10f64
Add plain text attribute (#2121) 2022-07-19 16:16:43 +02:00
Dawid
537cce95a7
Fix dropdown buttons styles (#2151)
* Fix filterStructure typo, fixes #2140

* Fix dropdown button styles

* Update assign warehouse button to product or variant

* Update test snapshots
2022-07-19 16:10:10 +02:00
Dawid
9aab4fb3a2
Fix sales/voucher page styles and fix date tooltips styles (#2154)
* Fix voucher sales page style

* Update date tooltips in sales and vouchers
2022-07-19 13:58:00 +02:00
Wojciech Mista
ef3c7a203b
Add Marketplace preview label (#2107)
* Add preview pill to marketplace view

* Update messages

* Remove marketplace

* Add margin
2022-07-19 10:41:49 +02:00
Dominik Żegleń
1879d0cfb3
Fix swatch and product list filters (#2087)
* Fix crashing

* Fix character limit

* Update snapshots
2022-07-15 12:00:19 +02:00
Timur Carpeev
f555e819af
Named months (#2130)
* Use named moths to avoid ambiguity

* Change format of gift card expiration
2022-07-15 11:46:59 +02:00
Dawid
ab8111a62d
Add status pills to webhooks list (#2153) 2022-07-13 13:12:58 +02:00
Dawid
b6312c2dff
Fix sortable chip dragging style (#2150) 2022-07-13 13:11:38 +02:00
Dawid
51baacd0ff
Remove copyright from login page (#2139) 2022-07-13 13:10:31 +02:00
Timur Carpeev
b9a53a6fde
Add rules of hooks (#2131)
* Fix conditional hooks

* Add rules of hooks lint

* Install dependencies with node 14
2022-07-13 11:13:58 +02:00
Wojciech Mista
e7f68f4c07
Periodical refresh of app token (#2091)
* Install jwt-decode

* Add token refetch hook

* Fix types

* Remove app settings

* Regenerate lock

* Fix jwt test issues

* CR fixes

* Bump node and npm

* Reinstall jwt-decode
2022-07-12 12:30:53 +02:00
Dominik Żegleń
0c3148893b
Update schema (#2159) 2022-07-12 10:38:49 +02:00
Dawid
f1ffb5093f
Add assign warehouse section in channel page (#2127)
* Add assign warehouse section in channel page

* Update data-test-ids on channel page

* Update channel page form details

* Update shipping zones and warehouses cards in chaannel page

* Assigning warehouses by channel in product and variant pages (#2135)

* Assigning warehouses by channel in product and variant pages

* Disable warehouse assignment when no channel on variant page

* Update products stocks section messages
2022-07-11 11:43:08 +02:00
Dawid
eff15075d4
Add transaction events to order history (#2138) 2022-07-08 12:14:42 +02:00
Michał Droń
10e5b8d331
Better input validation in Order Draft lines (#2003)
* Stop sending queries for empty & 0 values in TableLineForm

* Provide default value for incorrect ones

* Fix submit/change handlers

* Remove async
2022-07-07 17:31:26 +02:00
Michał Droń
7d3897f75f
Fix hover borders & remove scrollbar in assign product dialog (#2124)
* Fix hover borders & remove scrollbar

* Trigger deployment
2022-07-07 17:30:32 +02:00
Michał Droń
3ac4ac4c1b
Fix fulfilling deleted variants (#2090)
* Add optional chaining

* Fix type

* Fix a similar bug in the stock exceeded dialog

* Add keys to fulfillment lines

* Add undefined to return type
2022-07-07 17:28:12 +02:00
Michał Droń
a54fc0396b
Deprecate secret key in webhooks (#2119)
* Add deprecated message

* Extract messages

* Add deprecated pill to webhook secret key

* Update snapshots

* Move extra info to pill toolbar

* Extract messages

* Update snapshots

* Remove preventDefault

* Open link in a new tab

* Update snapshots

* Fix linter issue

* Make webhooks active by default when creating new ones

* Update snapshots
2022-07-07 10:29:33 +02:00
Michał Droń
fba74ab7d3
Sort orders by rank (#2114)
* Add rank sortfield to orders sort field enum

* Make useSortRedirects hook generic

* Add sorting by rank to orders list

* Move useSortRedirects to generic hooks dir

* Add hook description

* Add type parameters
2022-07-07 10:26:11 +02:00
Michał Droń
6bc7efc737
Fix filtering by boolean attribute (#2031)
* Fix parsing boolean value from query

* Change v to val
2022-07-07 10:23:58 +02:00
Dawid
e924fb001c
Fix app deep linking when mount path set (#2137) 2022-07-05 12:53:47 +02:00
Dawid
1f179f8fbd
Fix app deep url redirects (#2116)
* Fix app deep url redirects

* Update app-bridge

* Refactor useAppActions helper function

* Trigger CI
2022-07-05 10:39:58 +02:00
Dawid
079c25f16d
Fix app iframe resolution (#2111)
* Fix app frame sizes

* Update app frame height

* App page functions refactor

* Move useLocationState hook to apps

* Update apps test snapshots
2022-06-30 11:05:09 +02:00
Tomasz Magulski
1c131053d6
[SALEOR-6851] Replace appUrl with manifestUrl in 3rd-party apps list (#2115) 2022-06-29 10:08:46 +02:00
Jonatan Witoszek
69eeb4c280
Pass query params for product and order details app mounting points (#2100)
* Pass query params to iframe from dashboard

* Pass search params in product details and order details extensions

* Move released features in Changelog

* Add entry to chagnelog

* Fix ESLint issues
2022-06-24 14:17:58 +02:00
Michał Droń
d5c9a3dae8
Add trailing commas (#2062)
* Require trailing commas

* Add trailing commas

* Add trailing commas in testUtils dir

* Add trailing commas
2022-06-21 11:36:55 +02:00
Michał Droń
d7880350ae
Add new webhook events related to apps & warehouses (#2088)
* Update schema

* Build types
2022-06-08 14:45:29 +02:00
Dominik Żegleń
014ae0f362
Fix variant creator (#2085)
* Set channels for products without any variants

* Fix duplicated_input_item error

* Persist skus between steps

* Cleanup code

* Fix types
2022-06-08 13:27:33 +02:00
Wojciech Mista
c922dfb6fe
Application Marketplace available in dashboard (#2054)
* Add marketplace

* Update messages

* Extract styles

* Update test env

* Update config and rename uri

* Update template

* Trigger CI

* Possible fix

* Update deploy yml

* Add marketplace to staging

* Fix responsiveness

* Trigger CI

* Fix navigation tests (#2081)

* fix navigate through shop

* wait for progress bar not to exist

* simplify code

* add wait

* Fix navigate through shop (#2076)

* fix navigate through shop

* wait for progress bar not to exist

* simplify code

* Refine App about section (#2056)

* Trigger CI

* Trigger CI

* Trigger CI

* Trigger CI

* Fix app activation/deactivation

* Hide configuration url and policy if theres none

* Remove about and support links

* Remove unused code

* Update stories and tests

* Update messages

* Fix privacy policy

* Fix activation and "open app"

* Update tests

Co-authored-by: Karolina Rakoczy <rakoczy.karolina@gmail.com>
2022-06-08 08:44:28 +02:00
Jonatan Witoszek
5138608f86
Apps list page enchancements (#2035)
* Remove marketplace from Apps list

* Move apps in progress to bottom

* Remove pagination from InstalledApps

* Add apps permissions tooltip

* Activate/deactivate InstalledApps from list

* Add changes description to CHANGELOG

* Update package.json to include macaw required changes

* Upadte fixtures

* Rename Local Apps -> Third Party Apps

* Update macaw, fix TS errors

* Refactor AppPermission component to use permission fragment

* Add fragment for app list query, refactor InstalledApps props type

* Fix check for usage within context inside useAppListContext

* Remove redundant errors check in mutation hooks inside AppsList

* Update extracted messages

* Fix AppListPage stories failing

* Fix Tooltip not working in failed installed apps

* Update messages
2022-05-31 17:18:15 +02:00
Jonatan Witoszek
1a19289e43
Enhancements to pagination navigation (#2063)
* Update macaw to include Paginator changes

* Add link support to TablePagination component

* Rewrite usePaginator to use context and links instead of onClick

* Refactor ProductList to use new usePaginator hook

* Add decorator for PaginatorContext in ProductList stories

* Refactor AppList to use new usePaginator hook

* Refactor AttributeList to use new usePaginator hook

* Add missing pagination props for local pagination to AttributeValues

* Refactor CategoryList to use new usePaginator hook

* Refactor CategoryDetails to use useLocalPaginator and context

* Refactor CollectionList to use new usePaginator hook

* Refactor CollectionProducts to use new usePaginator hook

* Refactor CustomerList to use new usePaginator hook

* Refactor VoucherDetailsPage to use PaginationContext

* Refactor SaleDetails to use PaginatorContext

* Refactor SaleList to use new usePaginator hook

* Refactor VoucherList to use new usePaginator hook

* Fix type error in paginatorContextValues fixture

* Refactor GitfCardList to use new usePaginator hook

* Remove unused imports

* Refactor MenuList to use new usePaginator hook

* Refactor OrderDraftList to use new usePaginator hook

* Refactor OrderListPage to use new usePaginator hook

* Refactor PageList to use new usePaginator hook

* Refactor PageTypeList to use new usePaginator hook

* Refactor PermissionGroupList to use new usePaginator hook

* Refactor PluginsList to use new usePaginator hook

* Refactor ProductTypeList to use new usePaginator hook

* Refactor ShippingMethodProducts to use PaginationContext

* Refactor ShippingZonesList to use new usePaginator hook

* Refactor StaffList to use new usePaginator hook

* Fix TS errors

* Update TranslationEntities and TranslationFields to use new usePaginator

* Refactor WarehouseList to use new usePaginator hook

* Fix errors in stories that didn't use PaginationContextDecorator

* Mention changes in changelog

* Update to latest macaw version, update snapshots
2022-05-31 14:53:16 +02:00
Jonatan Witoszek
47ec01dd7c
Handle case when attribute value is empty on initial render (#2068)
* Handle case when attribute value is empty on initial render

* Fix useRichText when initial data is undefined

* Update snapshots

* Handle loading state in useRichText

* Add placeholder RichTextEditor when data is loading

* Update snapshots
2022-05-31 14:52:59 +02:00
Michał Droń
88bfffb2b4
Fix fulfillment page error (#2064) 2022-05-30 11:42:29 +02:00
Jonatan Witoszek
993a99ff07
Fix EditorJS inputs (#2052)
* Bump Editor.js version

* Refactor RichTextEditor to use react-editor-js wrapper

* fixup! Bump Editor.js version

* Rewrite RichTextEditor to use uncontrolled input

* Fix RichTextEditorContent not rendering any content due to missing id

* Fix RichTextEditorContent not working on initial render

* Remove editorjs-undo

* Refactor usage of RichTextEditor to get its data only during submit

* Add useMultipleRichText hook for managing rich text attributes

* fixup! Refactor usage of RichTextEditor to get its data only during submit

* Rewrite Attributes usage to use EditorJS .save() on submit

* Refactor RichTextContext into separate file

* Rewrite tests for useRichText

* Add PR changes to the changelog

* Update snaphosts

* Fix failing tests for components that use RichTextEditor

* Remove duplicated getSubmitData function
2022-05-26 10:06:46 +02:00
Jonatan Witoszek
a113c9202f
Update voucher creation text for "Only once per order" (#2059)
* Update voucher creation text for "Only once per order"

* Update snapshots
2022-05-25 10:53:19 +02:00
Jonatan Witoszek
f8ea5ec95e
Update text for variant price in some products (#2061)
* Update text for variant price in product that don't have channel
assigned

* Update snapshots
2022-05-25 10:52:55 +02:00
Jakub Majorek
0d4fecf8cd
Handle order extension mount points (#2055)
* Handle order extension mount points

* Add missing onClick to ButtonWithSelect component

* Update snapshots

* Fix ButtonWithSelect styles
2022-05-23 11:24:20 +02:00
Jonatan Witoszek
707c6b94a7
Fix cannot clear attribute value (#2047)
* Always send updated values of attributes

* Send only changed product attributes to API

* Add change to changelog

* Add tests for preparing upload attribute values
2022-05-20 10:00:53 +02:00
Karolina Rakoczy
7bfb10369e
add data-test-id in channel picker (#2036) 2022-05-16 10:30:34 +02:00
Jonatan Witoszek
9c2ed377cc
Fix redirect when modal is opened from table (#2034)
* Fix redirect when modal is opened on apps list

* Update snapshots

* Fix failing Cypress test

* Fix issues with TableRowLink and buttons that have onClick

* Fix CustomAppDetailsPage using wrong Backlink compponent

* Remove custom click event handler from TableRowLink

* Add TableButtonWrapper component

* Refactor Buttons and Links in TableRowLink to use TableButtonWrapper

* Refactor Buttons in SortableTableRowLink to use TableButtonWrapper

* Add comments about reasoning behind TableButtonWrapper
2022-05-13 13:04:16 +02:00
Jonatan Witoszek
66bfd1a32d
Fix subcategory creation (#2041)
* Fix subcategory create button didn't use Button from dashboard
* Update snapshots
2022-05-12 15:39:27 +02:00
Jonatan Witoszek
4c24d01d7a
Add stacking context to App wrapper (#2024) 2022-05-11 15:45:31 +02:00
Michał Droń
2d71c138b7
Fix flickering warehouse list in variant details (#2009)
* Fix merge functionin cached stocks

* Revert "Fix merge functionin cached stocks"

This reverts commit caf4956fde78abe33e893ed8b095f6275f73ef37.

* Change mutation order
2022-05-10 13:27:20 +02:00
Michał Droń
8fee2ccd4b
Fix overflowing page headers (#2008)
* Fix too long page headers

* Update snapshots

* Update snapshots
2022-05-10 13:25:39 +02:00
Jonatan Witoszek
1e38c14116
Use links instead of onClick navigate function (#1969)
Add links instead of navigate + onClick in:
* Lists - ex. product list (except Plugins, see below)
* SortableTables - ex. product variants
* Sidebar
* Buttons that open new page - ex. "Create product"
* Backlinks
* Menus - ex. "Account Settings"
* Links that actually used onClick - ex. warehouse shipping zone, reset password
2022-05-06 10:59:55 +02:00
Dominik Żegleń
a95a3021e4
Autocomplete in channel selection (#2020)
* Add autocomplete to channel picker

* Update macaw

* Update macaw

* Use filter from fuzzaldrin
2022-05-05 10:36:32 +02:00
Dominik Żegleń
7d9441a7ec
Use esbuild-loader (#1983)
* Minor fixes for intl messages

* Add esbuild-loader
* switch from babel to esbuild-loader
* use formatjs enforce-id linter

* Generate ids for intl messages

* id format defined by idInterpolationPattern

* Modify intl messages extraction

* remove react-intl-translations-manager
* remove transpile-tx.js
* use formatjs cli

* Modify defaultMessages.json

* modify ids in defaultMessages.json with defined idInterpolationPattern

* Fix errors

* Fix page crash

* Use babel to transpile tests

* Fix useStateFromProps

* Improve render count

* Add test to useStateFromProps

* Fix reloading state buh

* Do not check if form with channels is dirty

* Stop blocking save if form has not changed

* Remove debug code

* Fix form disabling

* Fix variant selection checkbox onClick

* Update translations

* Update messages

* Use esbuild to build storybook

Co-authored-by: Bartłomiej Wiaduch <tukan2can@gmail.com>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2022-05-05 09:54:28 +02:00
Michał Droń
6cf148c4c3
Fulfillment creation refactor (#1896)
* Create change warehouse dialog (#1850)

* Add allocations & variant stocks to order details query

* Add asc sorting to warehouse search query

* Add OrderChangeWarehouseDialog component

* Add key to warehouse list in dialog

* Update snapshots

* Remove debug directive

* Remove IDs from messages

* Fix typo in method name & extract messages

* Add quantity to allocations in order details query

* Add types to functions

* Move functions to local utils file

* Add utility type WithOptional

* Fix warehouse types

* Change multiple items unavailable message name

* Fix fetching onScroll

* Fix types in utils

* Add backdrop click support

* Add id to stocks and allocations

* Change unavailableLines from .map to .filter

Co-authored-by: Wojciech Mista <wojciech.mista@hotmail.com>

* Fix linter issue

Co-authored-by: Wojciech Mista <wojciech.mista@hotmail.com>

* Refactor order cards headers (#1875)

* Add keys to TableLines

* Bump macaw

* Move & rename CardTitle used in Cards with order lines

* Improve OrderCardTitle typography

* Replace StatusLabels with CircleIndicators

* Fix card title divs placement

* Add warehouse selection button to OrderUnfulfilledCard

* Fix fulfill button placement

* Update snapshots

* Make warehouse in order details view optional so that it works with uncofirmed orders

* Fix undefined lines in warehouse dialog

* Fix spacing in warehouse change button

* Fix macaw dependency

* Bump macaw-ui

* Extract messages

* Implement default warehouse selection logic

* Move CircleIndicator render condition to wrapper

* Fix failing reduce on orders with no lines

* Improve warehousesAvailable early return

* Drop counter in favor of filter().length

* Fix tests post-rebase

* Refactor fulfillment details page (#1915)

* Add shipment information card

* Refactor multiple warehouse fulfilling to one warehouse

* Fix fulfill button navigation

* Remove redundant code from OrderFulfill view

* Fix OrderFulfill story

* Move styling to seperate file & remove unused classes

* Replace colQuantityTotal class with colStock

* Add warehouse label under page header

* Fix preorder cases

* Change default values to maximum

* Simplify logic

* Add badge for preorder & deleted variant cases

* Remove unused data

* Add yellow outline for exceeding stock

* Fix failing tests

* Extract messages

* Fix tests post-rebase

* Add support for tracking number

* Block fulfilling no items

* Fix deleted variant order details bug

* Fix preorder & deleted variant cases

* Update snapshots

* Remove redundant import

* Fix linter issue

* Extract fulfillment lines as separate component

* Fix types

* Export styles & messages to seperate files

* Simplify formset changes

* Fix warning input styling

* Fix shouldEnableSave for overfulfillment cases

* Simplify preorder rendering

* Move empty line rendering

* Change Warehouse prop to just id of it

* Add endAdornment for deleted variant cases

* Update snapshots

* Fix linter issue

* Extract messages

* Fix incorrect operator precedence resulting in NaN values

* Extract fulfillment lines to fragment

* Replace nested types with fragment type

* Match fragment names

* Update snapshots

* Create exceeding stock confirmation dialog (#1970)

* Cherry-pick OrderFulfillStockExceededDialog

* Fix types to graphql-codegen

* Unify names in OrderFulfillStockExceededDialogLines

* Fix types in OrderFulfillStockExceededDialogLines

* Fix types in util

* Change utils for usage with single warehouse context

* Refactor OrderFulfillStockExceededDialogLine for usage with single warehouse context

* Fix deleted variant cases in OrderFulfillStockExceededDialogLine

* Include only exceeded lines

* Display stock exceeded dialog on error

* Add confirm button state

* Change fixed height in OrderFulfillStockExceededDialog to responsive

* Extract messages

* Move initial form data after interfaces

* Change nested type to fragment

* Reuse logic

* Remove unused import

* Remove redundant isStockError

* Remove unused imports

* Fix minor bugs in fulfillment creation refactor (#1972)

* Fix unfulfilled card header quantity calculation

* Fix formset default value for deleted variants

* Update snapshots

* Fix default warehouse selection in order draft (#1971)

* Fix default warehouse selection

* Replace Skeleton with circular progress

* Reuse logic

* Reuse logic

* Apply CR fixes

* Remove unused imports

* Fix canceled order header status

* Update snapshots

* Revert CircularProgress & change to Skeleton

* Change complex types to fragments

* Extract default warehouse logic to hook

* Fix linter issue

* Remove type assertion from OrderFulfillPage story

* Handle exceeding stock fulfillment approvals (#1988)

* wip Add OrderFulfillStockExceeded modal for fulfillment approvals

* wip Fix types & imports

* wip Fix union typing in stock exceeded dialog for both views

* Add allowStockToBeExceeded flag on submit

* Fix lines keys in FulfilledCard

* Remove redundant import

* Extract attributes caption function

* Use getById util

* Fix deleted warehouse cases in approvals

* Fix typo

* Fix styling for long warehouse names (#2019)

* Fix styling in change warehouse dialog

* Fix styling in warehouse selection button

* Add extra margin in button

* Update snapshots

Co-authored-by: Wojciech Mista <wojciech.mista@hotmail.com>
2022-04-29 11:16:58 +02:00
Klaudia
e0cc89478f
exluded test cases before those can be fixed ad part of the SALEOR-6… (#2025)
* exluded test cases before those can be fixed ad part of the  SALEOR-6705 Exclude all failing tests task

* exluded npm test -- -u
2022-04-29 10:21:53 +02:00
Karolina Rakoczy
6d5b894dd9
fix shipping method (#2014)
* fix shipping method

* shippings fixed

* fix jest
2022-04-28 10:56:56 +02:00
Dominik Żegleń
8fc48eb5f2
Allow all attributes to appear in grid in PLP (#1933)
* Remove unnecessary attribute filtering

* Enable all attribute types to be displayed in plp

* Improve attribute rendering in plp

* Remove obsolete filters

* Add story

* Rmove dashboard settings section

* Update snapshots

* Remove unused import

* Add column search

* Fix type

* Update messages

* Allow popper to appear on top of select

* Update snapshots

* Update label

* Use autocomplete from macaw

* Fix stories

* Remove unused imports

* Update macaw

* Update message

* Update messages and snapshots
2022-04-28 10:43:05 +02:00
Dominik Żegleń
dc07855b96
Update snapshots (#2022) 2022-04-27 16:01:07 +02:00
Dominik Żegleń
3e180c8d17
Minor improvements (#1924)
* Add basic tests

* Test if qs is preserved

* Preserve querystring

* Improve import performance
2022-04-27 14:57:10 +02:00
Michał Droń
fbf57bbbb1
Fix links in giftcard events created by apps (#1998)
* Fix links in giftcard events created by apps

* Trigger deployment
2022-04-27 14:12:01 +02:00
Klaudia
5c6c0b43f1
Adding missing test to collections tests (#1952)
* Adding missing test to collections tests

* Adding missing test to collections tests

* fixing merge issues

* fixing merge issues

* update to test-env-deploy

* update to test-env-deploy

* changing test-env-deploy

* adding sugestions

* fixing what Karolina suggested

* pulling from main
2022-04-27 13:14:05 +02:00
Tomasz Magulski
116b2568d2
[SALEOR-6645] Show appUrl in 3rd-party apps list (#2015)
* [SALEOR-6645] Show appUrl in 3rd-party apps list
2022-04-27 12:41:03 +02:00
Dominik Żegleń
7254c2d3df
Update schema and types (#2018) 2022-04-26 18:52:26 +02:00
Michał Droń
8f25e1b9ed
Navigate to order draft list after canceling order draft (#2010) 2022-04-26 15:32:09 +02:00
Michał Droń
ede1026a09
Fix invalid select header in vouchers (#1992)
* Fix selected header width in vouchers

* Update snapshots

* Change number of columns in customer list to correct value

* Update snapshots

* Same fix in navigation view

* Update snapshots

* Remove redundant import
2022-04-26 15:30:51 +02:00
Michał Droń
b9d94ccd83
Trim queries with whitespace (#2002)
* Disable rank sorting when query is empty

* Trim query in handlers

* Fix crash on empty query
2022-04-26 15:30:18 +02:00
Michał Droń
f24f7b3089
Fix unreadable alert boxes in dark mode (#2001) 2022-04-26 15:29:47 +02:00
Dominik Żegleń
8c667cc7b8
Add filtering by metadata (#1995)
* Add metadata field to filters

* Fix type

* Add metadata filters to orders list

* Refactor key value filter into separate component

* Update Filter types to support other values than string[]

* Rename IFilterElement to FilterElement, remove duplication in types

* Add new messages for Metadata filter

* Fix metadata key-value pair not formatted correctly in the URL

* Add delete metadata button

* Update snapshots

Co-authored-by: Jonatan Witoszek <jonatanwitoszek@gmail.com>
2022-04-26 10:10:12 +02:00
Wojciech Mista
522569f536
Pass appId to iframe src (#1990)
* Pass appId to iframe src

* Bump app-bridge version
2022-04-25 18:06:45 +02:00
Jonatan Witoszek
1cab89f297
Remove store name, store URL and Store description from dashboard settings (#1989)
* Disable store domain field in cloud, update query to save store name

* Update field label for domain to "Store API URL"

* Remove store name from store settings page

* Skip enitre shopDomainUpdate mutation when running in cloud

* Remove SiteDetailsSettingsCard

* Update snapshots
2022-04-25 14:00:06 +02:00
Jonatan Witoszek
c6d0ec8dbd
Update macaw-ui to 0.4.0 (#2004)
* Update macaw-ui to 0.4.0
* Update snapshots after macaw update
2022-04-20 17:52:26 +02:00
Michał Droń
2130a2a3e1
Fix richTextcase in prepareAttributeInput (#1994) 2022-04-15 16:33:01 +02:00
Jonatan Witoszek
0f237ad2e7
Fix event spread in PriceField (#1996)
* Fix event spread in PriceField

* Use synthetic event

Co-authored-by: Dominik Żegleń <flesz3@o2.pl>
2022-04-15 16:12:13 +02:00
Jonatan Witoszek
0686e1ae6b
Ignore more than 2 decimal numbers in price input (#1954)
* Ignore more than 2 decimal numbers in price input

* Handle currencies that don't support decimal values in PRiceField

* Fix helper function when no currency is provided, add calculated step
attribute

* Update storyshots for PriceField, replace $ currency symbol with USD

* Reject exponent character (e) in PriceField

* Add fallback when no currency symbol is provided

* Fix shortening decimal part in PriceField didn't work with >=3 numbers

* Update PriceField to use React.ChangeEventHandler

Co-authored-by: Dominik Żegleń <flesz3@o2.pl>

* Fix missing element type in React.ChgangeEventHandler

Co-authored-by: Dominik Żegleń <flesz3@o2.pl>
2022-04-14 15:06:45 +02:00
Dominik Żegleń
fe3b965019
Set descending order when ordering by rank (#1976) 2022-04-14 14:15:09 +02:00
Dominik Żegleń
b7b6def0c2
Update schema (#1987)
* Update generated API types

* Save schema
2022-04-14 14:11:50 +02:00
Michał Droń
2de4acb4a8
Skip empty attributes (#1968) 2022-04-14 14:06:01 +02:00
Wojciech Mista
168887ac3b
Prevent form submit if country is not selected (#1966)
* Prevent form submit if country is not selected

* Refactor error checking function

* Make address forms not invoke chrome's autofill

* Add a comment

* Update tests
2022-04-06 11:32:31 +02:00
Jonatan Witoszek
90807bb0cf
Update unassignProductAttributeMutation to use new array parameter types (#1957)
* Update unassignProductAttributeMutation to use new array parameter types

* Replace [Collection]! with [Collection!]! in queries to match API changes

* Fix failing test on ProductVariantPage
2022-03-31 14:45:48 +02:00
Michał Droń
5dcd9751a0
Add fallback paginationState for useSectionLocalPaginationState hook (#1959) 2022-03-30 15:59:37 +02:00
Michał Droń
26f8a776be
Fix variant create null thumbnail (#1956)
* Fix null thumbnail error

* Fix too few hooks rendered on non-existent products & variants
2022-03-30 15:50:47 +02:00
Michał Droń
879e1da69e
Fix shifted text in create variants dialog (#1950)
* Fix radio labels misalignment

* Remove DialogContent padding & move styles to external file
2022-03-30 15:48:12 +02:00
Wojciech Mista
7b45ef2758
Fetch only published producs in draft order (#1921) 2022-03-30 09:01:14 +02:00
Dominik Żegleń
40d9575cad
Fix plugin auth section crash (#1951)
* Fix plugin auth section crash

* Simplify code
2022-03-25 15:24:28 +01:00
Michał Droń
d273706ef8
Fix search permission groups at staff member edit page (#1937)
* Fix undefined choices in multi autocomplete select field

* Replace optional chaining with empty array default prop
2022-03-25 13:46:43 +01:00
Michał Droń
e186b2f8c3
Fix sidebar items not showing up with partial permissions (#1949)
* Skip navigator's customerSearch query on dashboard load

* Fetch extensions list only with MANAGE_APPS permission

* Show sidebar sections with partial permissions

* Trigger deployment

* Change skipping query from always to when query is empty
2022-03-25 13:41:54 +01:00
Jakub Majorek
cf7a51ab8e
Use sandbox on App iframe (#1893)
* Use sandbox, handle external redirect

* Add allow-same-origin flag

* Update translations
2022-03-25 13:39:09 +01:00
Dominik Żegleń
1e77665b4a
Minor visual fixes (#1927)
* Fix label

* Improve product organization widget labels

* Fix misaligned label

* Fix arrow behavior

* Add clickable rows to country picker

* Update snapshots

* Update messages

* Fix misaligned label

* Update snapshots
2022-03-25 13:37:01 +01:00
Michał Droń
2b7d514da5
Fix select address button on small resolutions (#1943) 2022-03-24 10:28:52 +01:00
Dominik Żegleń
ed1c189b02
Fix bugs in forms (#1941)
* Fix plugin config form

* Add missing webhooks

* Fix rate description field

* Fix auth race condition

* Fix customer removal

* Fix staff member deletion

* Fix shipping rate submitting
2022-03-23 15:12:56 +01:00
Wojciech Mista
26659a0be7
Remove redundant confirmLeave on tracking number dialog (#1926)
* Add onBeforeUnload handler to prevent accidental refresh

* Update button messages

* Fix exit form not working after submit

* Make onBeforeUnload disable if env is development

* Fix onClose

* Remove internal date time field state

* Update messages and dialog

* Prevent navigation on 400 error

* Add submit disabled ref in exit form

* Update exit form dialog for disabled save

* Update confirmLeave forms to set ref if save is disabled

* Remove unused error handling

* Remove explicit ref type

* Remove unused import

* Fix disabled type

* Add disable check function to generic forms

* Add custom isDisabled method to sale and voucher forms

* Add default isDisabled functions to confirmLeave forms

* Update tests

* Remove unused code

* Rebase fixes + update tests

* Refactor form and useform

* Refactor disabling forms

* Change "saveDisabled" name to "isSaveDisabled" for improved readability

* Change "isDisabled" function to "checkIfSaveIsDisabled"

* Remove redundant confirmLeave on tracking number dialog
2022-03-23 11:41:26 +01:00
Wojciech Mista
a5ac6bb92e
Exit form fixes (#1889)
* Add onBeforeUnload handler to prevent accidental refresh

* Update button messages

* Fix exit form not working after submit

* Make onBeforeUnload disable if env is development

* Fix onClose

* Remove internal date time field state

* Update messages and dialog

* Prevent navigation on 400 error

* Add submit disabled ref in exit form

* Update exit form dialog for disabled save

* Update confirmLeave forms to set ref if save is disabled

* Remove unused error handling

* Remove explicit ref type

* Remove unused import

* Fix disabled type

* Add disable check function to generic forms

* Add custom isDisabled method to sale and voucher forms

* Add default isDisabled functions to confirmLeave forms

* Update tests

* Remove unused code

* Rebase fixes + update tests

* Refactor form and useform

* Refactor disabling forms

* Change "saveDisabled" name to "isSaveDisabled" for improved readability

* Change "isDisabled" function to "checkIfSaveIsDisabled"

* Update exit form disabling conditions for zone rates forms
2022-03-23 10:13:23 +01:00
Wojciech Mista
7576afed4e
Don't fetch user details on login (#1909)
* Install sdk from commit

* Don't include user details on login

* Update recordings

* Update saleor-sdk version

* Update sdk version
2022-03-23 08:15:05 +01:00
Michał Droń
6b2a34872b
Change cost price placeholder (#1923)
* Change cost price label to cost

* Extract messages

* Update snapshots

* Revert header row label back to cost price
2022-03-22 14:40:18 +01:00
Michał Droń
32ddb72002
Fix undefined thumbnail url in variant details (#1934)
* Fix undefined thumbnail url

* Trigger deployment

* Remove thumbnail.url optional chaining

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2022-03-22 12:36:36 +01:00
Dominik Żegleń
be3f009ff0
Skip failing auth tests (#1939) 2022-03-22 09:55:41 +01:00
Wojciech Mista
5059557987
Add search and filters to Pages list page (#1901)
* Uppdate queries

* Add page list search and filters

* Update types

* Update tests

* Update messages

* Change pageType -> pageTypes

* Updae types for page list

* run lint
2022-03-22 09:53:31 +01:00
Dawid Tarasiuk
d35ca150dc
Refetch extension list when installing or uninstalling Apps (#1884) 2022-03-21 13:35:32 +01:00
Michał Droń
f3bca9af39
Fix invisible edit button in media tiles hover state (#1920)
* Fix control icons in media tiles

* Update snapshots

* Change divs to buttons

* Update snapshots
2022-03-21 12:37:55 +01:00
Dominik Żegleń
90ff0ebb5f
Remove initial data from tracking number form (#1910) 2022-03-21 12:35:19 +01:00
Dominik Żegleń
045f1d068d
Add information about immediate save (#1900)
* Add information about immediate save

* Remove leftover code

* Add info about immediate save in sales

* Add info about immediate save in orders

* Add info about immediate save in attributes

* Add info about immediate save in shipping

* Add saved notification

* Fix type errors

* Update messages

* Remove debug code

* Update messages

* Lint project
2022-03-21 12:29:08 +01:00
Dominik Żegleń
fc0e3757ae
Disable query batching (#1922)
* Remove query batching

* Fix imports

* Update changelog
2022-03-17 16:00:17 +01:00
Dominik Żegleń
2425ca59d8
Prevent navigation from variant page if form is dirty (#1913)
* Add basic tests

* Fix invalid return type
2022-03-17 15:59:04 +01:00
Tomasz Magulski
e4d160c453
Fix menu items permissions logic (#1932) 2022-03-17 10:28:12 +01:00
Dominik Żegleń
5304eeecc9
Fix empty rich text editor not loading (#1904)
* Fix empty rich text editor not loading

* Fix static rich text font size

* Add cleanup function

* Update snapshots
2022-03-16 11:09:12 +01:00
Dominik Żegleń
ac4a219023
Product variants enhancements (#1918)
* Remove savebar docking

* Hide attributes if empty

* Select text in autocomplete after initial click

* Update snapshots

* Use stable macaw version

* Remove maybes

* Add util filter function
2022-03-16 10:45:15 +01:00
Dominik Żegleń
3e96a68a6e
Indicate menu focus (#1928)
* Add active state to card menu

* Update macaw
2022-03-15 11:14:28 +01:00
Dominik Żegleń
2b2b4de4dd
Fix mutations without onCompleted (#1914) 2022-03-14 10:53:39 +01:00
Mika
29d9f676c1
Disable search engine indexing out of the box (#1907) 2022-03-10 12:04:07 +01:00
Wojciech Mista
e921ca1d7a
Fix country autocomplete field (#1899)
* Fix warehouse country input field

* Update tests

* Fix customer country autocomplete input select

* Update tests
2022-03-10 09:19:09 +01:00
Dominik Żegleń
4e9c5b8ddd
Fix invalid api path (#1911) 2022-03-09 12:17:10 +01:00
Dominik Żegleń
5b85d6c086
Use graphql-codegen (#1874)
* Use generated hooks in apps

* Remove unused files

* Use proper types in apps

* Use generated hooks in attributes

* Use generated hooks in auth module

* Use generated hooks in categories

* Use generated hooks in channels

* Use generated types in collections

* Remove legacy types from background tasks

* Use generated hooks in customers

* Use generated hooks in discounts

* Use generated hook in file upload

* Use generated types in gift cards

* Use generated types in home

* Use generated hooks in navigation

* Use generated hooks in orders

* Use generated hooks in pages

* Use generated hooks in page types

* Use generated hooks in permission groups

* Use generated hooks in plugins

* Use generated hooks in products

* Use fragment to mark product variants

* Improve code a bit

* Use generated hooks in page types

* Use generated types in searches

* Use generated hooks in shipping

* Use generated hooks in site settings

* Use generated hooks in staff members

* Use generated hooks in taxes

* Place all gql generated files in one directory

* Use generated hooks in translations

* Use global types from new generated module

* Use generated hooks in warehouses

* Use generated hooks in webhooks

* Use generated fragment types

* Unclutter types

* Remove hoc components

* Split hooks and types

* Fetch introspection file

* Delete obsolete schema file

* Fix rebase artifacts

* Fix autoreplace

* Fix auth provider tests

* Fix urls

* Remove leftover types

* Fix rebase artifacts
2022-03-09 09:56:55 +01:00
Wojciech Mista
29461658a2
Add api error log in notifications (#1873)
* add api error log in notifications

* Refactor graphql error handling

* Update messages

* Install macaw-ui from commit hash

* Make notification id be ref index rather than date

* Refactor notification container styles to allow scroll

* Add fix to apollo onError function to get operation name

* Fix userPermission race-condition

* Add refactored error handling

* Temporarly install macaw from pill PR

* Handle case when there are no graphql errors

* Update errors

* Run build-types

* Update stories to include messages

* Update shipping types

* Traverse through onCompleted data and show errors

* Update tests

* Update messages

* Clear error notifications on submit

* Check if context exists - fix tests
2022-03-04 11:52:58 +01:00
Karolina Rakoczy
4d02eb60c0
Add reports to tests (#1898)
* add reporter, fix tests

* remove unused import

* get functions duration

* merge

* update snaps
2022-03-03 11:25:27 +01:00
Wojciech Mista
66705e7f3e
Don't display pricing by default in Product List (#1891)
* Update build-types script

* Remove "pricing" where it's unused; exclude pricing query if no channel is selected

* Update fixtures

* Fix minor preorder issue

* Update types

* Fix build-types script

* Remove unnecessary product fragment

* Fetch only data that is visible in products list (#1892)

* Conditionally include attributes in product list query

* Add 'hasSelectedAtrributes' variable to product list query

* Refactor condition

* Create AttributeValueDetailsFragment fragment

* Use attributeValueDetailsFragment

* Update fragment in products
2022-03-03 11:14:18 +01:00
Wojciech Mista
d3db86a2d2
Fix currency autocomplete widget (#1865)
* bump downshift version

* Firther refactor for downshift bump

* Update tests

* Remove unnecessary id property

* Remove unnecessary !important
2022-03-01 16:04:44 +01:00
Wojciech Mista
9a7c9a3bc3
Add permission-based restrictions in Customer views (#1879)
* Update customer queries - add permissions

* Filter the customer filter by permissions

* Code refactor + optionally render components based on permissions

* Update stories

* Minor code refactor

* Move useUserPermissions to RequirePermissions component

* Change user provider component name

* Change macaw-ui version
2022-03-01 09:38:23 +01:00
Dominik Żegleń
8ab05ab8e1
Merge shipping rates views (#1851)
* Merge price and weight based rate pages

* Increate text field width

* Update messages
2022-02-25 16:04:11 +01:00
Wojciech Mista
3013cb29c6
Add preview pill in gift cards card (#1886)
* Add preview pill in gift cards card

* Temporararily disable triangle in preview pill
2022-02-22 11:20:46 +01:00
Wojciech Mista
2c494a1b01
Fix translation link color (#1882) 2022-02-22 11:12:12 +01:00
Wojciech Mista
b419fd9975
Fix menu reordering in navigation (#1871) 2022-02-22 10:29:18 +01:00
Jakub Majorek
5850644742
Change extensions naming (#1885)
* Change extensions to apps

* Update translations

* Use explicit translation, bump macaw to latest release
2022-02-22 09:15:55 +01:00
Wojciech Mista
4661a93c0f
Fix return/replace input and table (#1877)
* Add min width to input and add responsive table

* Move inline style to styles
2022-02-22 09:11:44 +01:00
Wojciech Mista
9579bbe2f2
Fix gift cards card in customer view (#1883) 2022-02-21 19:11:31 +01:00
Dominik Żegleń
2a52eb581c
Update apollo to v3 (#1837)
* Update apollo to v3

* Fix imports

* Add generated file to ignored

* Use proper import

* Tidy up code

* Remove unused packages

* Fix tests
2022-02-21 14:32:38 +01:00
Dominik Żegleń
1eab4ac8a6
Preview pills (#1880)
* Add pill component

* Add preview pill to gift card list

* Use outlined prop

* Add arrow to tooltip

* Add preview pill to gift card view headers

* Add preview pills to mark preview features

* Update macaw

* Update tests

* Update messages

* Add black color to pill preview tooltip

Co-authored-by: Wojciech <wojciech.mista@hotmail.com>
2022-02-21 12:38:27 +01:00
Klaudia
8e8fcc775c
fixed issues with CLA, and added tests for update translation (#1868)
* fixed issues with CLA, and added tests for update translation

* npm i
2022-02-21 12:31:50 +01:00
Jakub Majorek
7e6ef8b020
Fix TS issues on icon components (#1878) 2022-02-18 11:49:46 +01:00
Bartłomiej Wiaduch
80e8cb9221
Refactor createSvgIcon import for icons (#1694)
It fixes ts declarations resolution
2022-02-18 10:27:55 +01:00
Michal Zajac
190d2660c5
(SingleSelectField) Dont allow to select option when it is disabled (#1870)
* fix(SingleSelectField): dont allow to select an option when it is disabled

* feat(storybook): add story to the SingleSelectField

* fix(storybook): update snapshot
2022-02-18 09:53:58 +01:00
Michał Droń
f5f4858cf1
Change StatusLabels to Pills (#1867)
* Change StatusLabels to Pills (#1819)

* Refactor StatusLabel component to use Pills

* Remove StatusLabel component

* Remove StatusChip component

* Refactor ChannelsAvailibilityDropdown for usage with Pills

* Remove AvailabilityStatusLabel

* Fix FilterErrorsList dot

* Refactor plugin availability

* Update messages

* Update snapshots & solve rebase conflicts

* Fix rebase conflict - duplicate intl

* Handle products & collections without channels

* Change plugins messages from inactive to deactivated

* Remove redundant ChannelConfigPopup

* Change AvailabilityMenu from onClick to onHover

* Update snapshots & fix rebase conflicts

* Add order title

* Fix status colors

* Remove unused import

* Fix extra spacing in unfulfilled pill

* Add payment card title & move messages outside file

* Fix impromper skeleton rendering in product list

* Update snapshots & fix rebase conflicts

* Change plugins pills to interactive

* Update snapshots

* Trigger deployment

* Apply minor CR fixes

* Change callb
acks props to mapped objects in ChannelsAvailabilityMenu

* Rebase / update snapshots

* Fix fulfilled from label position

* Update snapshots

* Change messages names in oRderPayment

* Fix Pill overflowing

* Update snapshots
2022-02-17 12:08:17 +01:00