Commit graph

165 commits

Author SHA1 Message Date
Jonatan Witoszek
13ca6bbba8
Remove transactions feature flag (#3557)
* Update schema, remove transaction specific files

* Merge `.transaction` queries and mutations into regular files

* Merge OrderDetails fragments

* Remove usage of `.transaction` graphl types

* Update fixtures

* Remove usage of useFlag, remove duplicated queries & mutations

* Fix displayed event type for INFO

* Remove type alias from order/types.ts, remove type casting

* Fix failing tests

* Add preview label and better description in Channel settings

* Update button in GrantRefund page

* Fix missing data-test-id

* Extract messages

* Visual fixes

* Revert changes to generated files

* Revert changes to generated files

* Fix psp reference hover

* Fix colors on manu refunds screen

* Revert "Fix colors on manu refunds screen"

This reverts commit 02302930ab502a4fdc3c71558532a2d74f2e32c9.

---------

Co-authored-by: andrzejewsky <vox3r69@gmail.com>
Co-authored-by: Michal Miszczyszyn <michal@mmiszy.pl>
2023-04-28 13:24:10 +02:00
Krzysztof Żuraw
fc8f4be4e9
Add author field to app details page (#3455) 2023-04-20 09:39:54 +02:00
Krzysztof Żuraw
97c7a32455
Revert author field on app details page (#3453) 2023-04-04 10:55:12 +02:00
Krzysztof Żuraw
9690313d16
Add author field to app details page (#3379) 2023-03-22 13:17:48 +01:00
Bartłomiej Wiaduch
ab2ce01c8a
Add WebhookHeaders component (#3107)
* Add custom request headers to webhook form
2023-02-22 14:14:51 +01:00
Paweł Chyła
b040a0deb8
Product variants bulk update (#3032) 2023-02-15 14:31:45 +01:00
Bartłomiej Wiaduch
6dbb8e4ecc
Webhook query dry run (#2960) 2023-01-30 13:06:54 +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
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
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
Dawid
3a3a4a7ae6
Add metadata webhook events (#2375) 2022-11-02 13:31:17 +01: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
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
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
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
Dominik Żegleń
f058f4d01f
Update types (#2229) 2022-08-11 17:52:55 +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
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
Tomasz Magulski
1c131053d6
[SALEOR-6851] Replace appUrl with manifestUrl in 3rd-party apps list (#2115) 2022-06-29 10:08:46 +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
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
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ń
7254c2d3df
Update schema and types (#2018) 2022-04-26 18:52:26 +02:00
Dominik Żegleń
b7b6def0c2
Update schema (#1987)
* Update generated API types

* Save schema
2022-04-14 14:11:50 +02:00
Michał Droń
560ed2cd6e
Add build-schema tool (#1947)
* Add build-schema tool

* Include build-schema in fetch schema
2022-03-29 10:39:33 +02: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
Dawid Tarasiuk
a76c6a0e5f
Support apps in navigation (#1785)
* Support apps in dashboard navigation

* Update macaw-ui sidebar

Trigger CI

* Update app routing

* Update app extensions schema

* Update navigation external app routing

* Refactor sidebar extension menu items open handling

* Update macaw-ui

* Update messages

* Update prettier config

* Refactor

* Update extensions manu item active indication

* Update macaw-ui
2022-02-02 16:30:34 +01:00
Wojciech Mista
8f9c1ba19e
Gift cards post mvp (#1632)
* Add gift bulk create (#1490)

* Add gift card bulk create dialog WIP

* Update schema, add gift card bulk create mutation and types

* Add gift card bulk create modal and mutation

* Fix types and update messages

* Refactor gift card bulk create

* Add closing gift card bulk create dialog after success

* Change gift card list closeDialog prop name to onClose

* Review fixes

* Review fixes

* Add error message to invalid expiryDate (#1518)

* Add error message to invalid expiryDate

* Add default messages

* Replace filter with some

* Add gift card export (#1499)

* wip

* Add exporting gift cards

* Update messages

* Fix types

* Review fixes

* Review fixes

* Refactor passing messages to export settings component

* Refactor

* Update messages

* Gift card customer page (#1520)

* Add gift cards card to customer page (#1456)

* WIP

* WIP

* Extract activate/deactivate logic to a hook

* add optional side action

* Add query for customer's gift cards

* Add component for giftcard status chip

* Graphql run types

* Add gift card card to customer page

* Fix status chip header

* Revert style change

* Unify status chip logic

* Fix naming scheme

* Add currentOpts to act/deactivate gift cards hook

* Add queries to refetch prop

* Simplify gift card list component

* Fix order status chip

* Extract messages to separate file

* Remove unused lines of code

* Tests and messages

* Fix card list rendering

* Type fix

* Code review fixes

* Review changes

* Scripts

* Change variable name

* Fix formatted message

* Check if giftcards exist before rendering collection

* Add loading button to CardMenu component (#1476)

* WIP

* WIP

* Add gift card card to customer page

* Fix status chip header

* Fix naming scheme

* Add currentOpts to act/deactivate gift cards hook

* Remove unused lines of code

* Revert style change

* Tests and messages

* Fix card list rendering

* Type fix

* Code review fixes

* Review changes

* Scripts

* Add loading animation to card menu buttons

* Added default messages

* Change conditional prop checking to filtering

* Issue gift card in customer page (#1468)

* WIP

* WIP

* Replace typed query with make query

* Add customer details context to customer page

* Add context to customer gift cards

* Disable customer select when initial customer is present

* Pass initial customer to create gift card form

* Fixes after cherry-pick

* Code cleanup

* Remove getInitialData function

* Remove unused package

* Remove new line

* Post-rebase fixes

* Code cleanup & extract messages

* Remove unused code

* Create customer details hook

* Minor fixes

* Update default messages

* Update gift card types

* Type fixes

* Change directory of useCustomerDetails hook

* CR Fixes

* Update tests

* Make PageTitleWithStatusChip use ExtendedPageHeader

* Update tests

* Update hook name

* Post-rebase fixes

* Eslint fix

* Fix scrollbar appearing in menu issue (#1539)

* Change displayCode to last4CodeChars (#1573)

* Add filtered redirect to gift card page from customer details (#1556)

* Limit number of channel list items (#1607)

* Add max height to single select field menu items container

* Add storybook case

* Update stories tests

* Fix gift card product changing to preorder on save issue (#1583)

* Variant preorder fix

* Global threshold input should be optional

* update snapshot

* Add displaying logic gift cards list toolbar (#1617)

* add displaying logic for gift card toolbar

* Logic fix

* Handle bulk export after creation (#1544)

* Add gift bulk create (#1490)

* Add gift card bulk create dialog WIP

* Update schema, add gift card bulk create mutation and types

* Add gift card bulk create modal and mutation

* Fix types and update messages

* Refactor gift card bulk create

* Add closing gift card bulk create dialog after success

* Change gift card list closeDialog prop name to onClose

* Review fixes

* Review fixes

* Add gift card export (#1499)

* wip

* Add exporting gift cards

* Update messages

* Fix types

* Review fixes

* Review fixes

* Refactor passing messages to export settings component

* Refactor

* Update messages

* Handle export after bulk gift card creation

* Add default messages

* Create an util function to get correct input for export

* Update component's name

* Change modal's title

* Update messages

Co-authored-by: Magdalena Markusik <magdalena@markusik.com>

* Gift Card List item number change doesn't refetch fix (#1643)

* Fix number of rows change not refetching list

* Add pagination reset

* Update descriptions for gift card messages to be more descriptive (#1648)

* Gift card history timeline  (#1597)

* Update queries and mutations

* Allow title to be a react node

* Show user name if it exists in data object

* Update types

* Refresh queries on note add

* Add gift card history

* type fix

* Update messages

* Fix timeline note

* Add event fragment to form update result

* Update types

* Fix typo

* Update messages

* Disable input if gift card is expired

* Remove unused imports

* CR Fixes

* Change messages location

* Change message to include user in order

* Allow adding notes to expired gift cards

* Fix disabled input showing dropdown issue (#1636)

* On click is disabled when component is disabled

* update tests

* Order filtering for gift cards in Order List View (#1628)

* Add gift card order filter

* Add gift card filter card in orders view

* Bump macaw version

* Update messages

* Update tests

* Code review changes

* update messages

* Change info card message to use only one message

* Fix order gift card filter

* Gift card filter in product list view (#1621)

* Add GiftCard or Normal filter in Product List View

* Fix tests

* Fix type check

* Don't filter if query param is not in enum

* Update messages

* Update tests

* Code cleanup

* Add default messages

* Pass intl rather than initialise it in util

* Post-rebase fixes

* Change product type details messages (#1642)

* Update product type gift card options messages

* update tests

* Add sorting to gift card list (#1569)

* Update queries and types for sorting

* Add optional handleError method to makeQuery

* Add sorting to gift card list

* Sorting hook uses useGiftCardList hook

* Convert to boolean

* Add default sorting field

* format fix

* Add expiry error handling for issuing gift cards (#1634)

* Add expiry error handling for issuing gift cards

* Add expiry error message to gift card bulk issue

* Update Gift Card tag queries to utilise multiple tags (#1685)

* Change displayCode to last4CodeChars (#1573)

* Update types

* WIP

* Update gift card forms to utilise multiple tags

* Code cleanup

* Update gift card event types

* Fixes

* Change column with no click handler behaviour

* Remove an ability to sort by tags

* Remove unused code

* Update tests

* Update timeline events

* Update messages

* change array reduce to join

* Add Y scroll to dialog content

* Bulk create Y scroll fix

* Endless loading fix (#1732)

* Order filtering for gift cards in Order List View (#1628)

* Add gift card order filter

* Add gift card filter card in orders view

* Bump macaw version

* Update messages

* Update tests

* Code review changes

* update messages

* Change info card message to use only one message

* Fix order gift card filter

* Wip

* Extract dialog component outside of gift card create

* Update component's name

* Extract dialog component outside of export component to provider

* Update tests

* Various gift card bugs fixes (#1749)

* Change currency to options field

* Fix hover and font size

* Fix gift card list width

* Fix bulk delete dialog

* Allow balance to be sorted only when currency is filtered

* Sorting by balance after removing currency filter defualts to usedBy

* Fix trash icon

* Add filter dependency

* Fix single deletion with bulk

* Update tests

* Refactor Links used in Gift Cards

* Fix export dialog (#1791)

Co-authored-by: Magdalena Markusik <magdalena@markusik.com>
2022-01-25 13:44:19 +01:00
Rafał Pitoń
b13ecfc197
Update schema (#1787) 2022-01-25 10:27:59 +01:00
Krzysztof Kulig
80f3af4e5e
Port new shipping method schema to 3.1 (#1768)
* Update schema

* refactor(shippingMethods): change name from availableShippingMethods to shippingMethod

* refactor(shippingMethods): change shippingMethod to shippingMethodType

* Add missing files

* refactor(order): add active and message prop to the shippingMethod field

* Add support for new webhook types

* refactor(OrderShippingMethodEditDialog): show inactive shipping method as disabled

* refactor(SingleSelectField): change the disabled prop strictly boolean

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

* refactor(OrderShippingMethodEditDialog): remove unused style

Co-authored-by: Michal Zajac <michal.99.zajac@gmail.com>
Co-authored-by: Michal Zajac <50200782+Michal99Zajac@users.noreply.github.com>
Co-authored-by: Dominik Żegleń <flesz3@o2.pl>
2022-01-24 14:50:17 +01:00
Dominik Żegleń
ff14720e23
Display error if no invoicing plugin is active (#1709)
* Add error message if no invoice plugin installed

* Fix types

* Update messages
2021-12-23 13:42:10 +01:00
Dawid Tarasiuk
147d8c89cb
Separate sync and async app webhooks (#1635)
* Separate sync and async app webhooks

* Remove create webhook page and cleanups

* Update util

* Auto unselect events when anyEvent choice is selected

* Update test snapshots
2021-12-13 15:43:30 +01:00
Paweł Kucharski
05cc720b6e
Limit quantity per checkout (#1536)
* Add site settings and variant detail text fields related with limit per checkout

* Add message translations

* Fix review issues pt.1

* Update snapshots

* Apply fixes after review pt.2
2021-12-07 10:43:24 +01:00
Magdalena Markusik
bdaeb8b621
Add preorder and click&collect filters to order list (#1568)
* Add preorder and click&collect filters to order list

* Update messages

* Add fixtures

* Update snapshots

* Update snapshots and extract messages
2021-12-02 16:42:01 +01:00
Szymon Wiszczuk
39dabc8ea2
Variant selection attributes (#1463)
* Create separate table for variant attributes and handle variant selection state

* implemented most required changes

* implementation

* localize leftover string

* implement most cr changes

* implemented most of cr changes

* add additional comment and fix ci

* reorder update mutation for BE consistency

Co-authored-by: bonifacy1 <szewczyk134@gmail.com>
2021-10-19 10:38:54 +02:00
Magdalena Markusik
185a48b421
Add filters and search to gift cards list (#1466)
* Fix filters not handling autocomplete values properly

* Add handling single selection to filter autocomplete field

* Change giftCardsListUrl function name to GiftCardListUrl for consistency

* Update schema

* Add gift card currencies query and update types

* Add validating function for filter number fields

* Add util function for mapping person node to select choice, fix types

* Add gift card list filters and search

* Add handling of gift card list search and filters dialogs in dialogs provider

* Add gift card search bar in gift card list

* Update gift card list queries and types, add filters to gift card list provider

* Fix types

* Fix types

* Fix currency filters in gift card list

* Update messages

* Remove unnecessary usages of maybe

* Change gift card balance filters not to be send to api when currency filter not present

* Update messages
2021-10-13 14:42:20 +03:00
Dawid Tarasiuk
22db86ed65
Add stock reservation settings (#1459)
* Add stock reservation settings

* Update page section header

* Fix test snapshots

* Fix stock reservation inputs

* Update test snapshots

* Trigger CI
2021-10-13 14:35:00 +03:00
JanChodorowski
25f7c8e4d8
Preorders (#1426)
* Feed preorder data to product variant forms

* Add end preorder date input and handle date data

* Translate strings, refactor date parsing

* Fix snapshots

* CR response

* CR response

* CR response

* Fix negative threshold, product variant preorder toggle, product variant update, and simple product creation

* Make preorder data optional

* Prevent setting past date as preorder end

* Disable replacing preorder variant in order

* Adjust fulfill view to preorder in variant

* CR response + prevent subbmiting form when endPreorderDate is in the past and display warning

* Add ErrorNoticeBar

* Translate preorder end date in past error message, fix form submissison disabling logic

* Rebase fixes

* Fix preorder form disabling logic, remove isPreorder field

* Fix edge cases aroud preorder inputs

* Update storyshots
2021-10-01 14:41:31 +02:00
Dawid Tarasiuk
d21e688f7d
Update dashboard to work without SKU (#1440)
* Update dashboard to work without SKU

* Allow variant ID export in products export

* Update messages

* Update test snapshots

* Update schema

* Update order line detials without SKU

* Update test ssnapshots

* Make SKU optional for prodduct without variants
2021-09-30 15:08:22 +02:00
Marcin Gębala
d8f3d0145f
Add sales webhooks (#1454) 2021-09-30 15:06:39 +02:00
Łukasz Szewczyk
ec230e55c0
Add variants to sale view (#1420)
* Update schema and biuld types for sale per variant

* Create variant search module and generate types for it

* Add listing component for sale view

* Create dialog for variant assignment

* Expand sale page with vairnats

* Add new sale fixtures

* Add transaltions for variants on sale view

* Update snapshot

* Refactor sales dialogs and tables, move styles and ittl to local files

* Rework search dialog. Create item/subitem selectable table for variants, update spapshot

* Adjust table columns width

* Standardize the tables

* Unify messages

* Drop whole variant object in favor of just ids, simplify filtring functions

* Update snapshots

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2021-09-30 14:51:13 +02:00
Jakub Majorek
9c92332d3c
Add draft order webhook events (#1438) (#1439) 2021-09-27 16:06:21 +02:00
Piotr Grundas
ebe56da583
Add swatch attributes (#1301)
* Initial work

* #

* Base color logic

* Handle file urls

* Improvements, fix snapshots

* Add messages

* Update changelog

* Update storybook

* Improvements

* Messages

* Review corrections

* Bugfixes
2021-09-21 15:16:21 +02:00
Magdalena Markusik
aaa0a9f309
Feature - Gift Cards (#1366)
* Add deletion to gift cards (#1298)

* Add gift cards section to menu and add empty list component

* Update messages

* Change styling of app wide page header to match design

* Add gift cards list table wip

* Update prop name for status chip component to make it more consistent with other components

* Replace old trash icon with new one

* Add Size type based on action dialog sizes to be used app wide

* Add delete icon button

* Add new sizes option to status chip component

* Add / update gift cards list components

* Add bulk actions type

* Work on gift cards list WIP

* Small refactor

* Fix styling of gift cards table

* Remove temp files

* Remove unnecessary type

* Add gift cards section to menu and add empty list component

* Update schema and types

* Add link to gift card update page to gift cards list and add route to gift cards index

* Extract order page title with status chip into a separate generic component and use it in order page title

* wip

* Update money component

* Add gift card details card balance section

* Refactor gift card details

* Add vertical spacer component

* Update schema and types

* Add gift card tag input component along with necessary queries

* Add gift card tag input to gift card update page

* Add gift card update details card expiry section WIP

* Add time period select field WIP

* Post rebase refactor

* Add time period select field to gift card update view

* Update schema, types and gift cards query

* Add getFullName util function and replace existing manual usages

* Add text with select field component

* Add gift card update info card and refactor

* Fixes after review

* Fix import

* Add displaying order link in gift card update

* Refactor

* Connect gift card list to api

* refactor

* Add gift card create dialog

* Fix gift card list styles, change location for gift card list query, minor refactor

* Fix menu structure data for gift cards

* Add channel currencies type to shop

* Refactor text with select field

* Add gift card expiry select component

* Add gift card error type and fragment

* Update global types

* Add default prop to getFormErrors function

* Move gift card details provider to providers dir

* Update global utils with mapSingleValueNodeToChoice function

* Update gift card tag input

* Move and refactor time period field

* Update schema

* move format money function to other money ulities

* Update gift card urls

* Add content or skeleton component

* Add gift card create util for extracting expiry settings input data

* Remove content or skeleton component and move displaying logic to existing skeleton

* Move displaying logic of gift card create dialog to list

* Refactor

* Add hooks for gift card bulk actions and gift card list to be used instead of context directly

* Fix types for text with select field + add parsing for number typed field

* Add initial currency to gift card create form

* Fix gift card create dialog closing animation

* Add gift card update info card

* Refactor gift card update details card

* Add gift card balance dialog

* Move gift card update form providers to providers dir

* Connect gift card update page to api, add necessary contexts etc.

* Refactor

* Refactor

* Add hooks to use instead of gift card contexts directly

* Fix types

* Fix text field target name missing in passed event in text with select field

* Add minimal value option to text with select field, add to gift card inputs

* Fix gift card update balance dialog not changing hasChanged prop after submit

* Refactor

* Add enable / disable section to gift card update

* Refactor

* Refactor

* Fix update balance dialog crashing the app when enetered wrong amount

* Fix gift card list table header styles

* Refactor

* Add metadata to gift card update

* Update messages ids

* Refactor

* Refactor

* Refactor

* Refactor

* Update schema and types, add gift card delete and bulk delete mutations

* Fix url change after gift card delete

* Refactor

* Update messages

* Change gift card list providers order

* Refactor/fix after merge

* Add gift card resend mutation and update types

* Add use dialog form reset hook and make update balance dialog use it, to fix it displaying form errors after modal close and open

* Add gift card resend code dialog

* Add button to open gift card resend code dialog

* Update messages

* Add gift card list bulk enable disable section

* Add refetching gift card list query after bulk activate / deactivate, refactor

* Refactor

* Refactor

* Update messages

* Update schema

* Change gift card update expiry settings

* Refactor

* Add gift card settings view (#1300)

* Add gift card settings view

* Refactor

* Create gift card sttings expiry select

* Update test snapshots

* Update schema

* Update gift card settings page title

* Refactor to match rest of the gift cards flow (#1308)

Co-authored-by: Magdalena Markusik <magdalena.markusik@mirumee.com>

* Refactor

* Refactor

* Set common error codes in string union

Co-authored-by: Magdalena Markusik <magdalena.markusik@mirumee.com>

* Add gift card kind to product type (#1307)

* Add gift card kind to product type

* Fix radio label alignment

* Update test snapshots

* Refactor

* Set default kind in product type create

* Change styling of activate / deactivate button in gift card update

* Add week option to time period select field

* Update messages

* Change labels and update messages

* Add auto fulfill non shippable gift cards to order settings

* Fix fixture

* Update messages

* Update snapshots

* Refactor

* Update types

* Add gift card used in order money amount in order payment section

* Remove unnecessary schema changes

* Change types

* Update fixtures and messages

* Refactor

* Add top card to gift card list (#1327)

* Add top card to gift card  list

* Update no gift card products notification messages

* Use alert instead of notification

* Update prodduct and product  type counts

* Return null if none of the conditions pass

* Update messages

* Fix unused product type deletion

* Update types

* Update imports

* Update messages

* Update test snapshots

* Change gift card dialog expiry settings

* Update form of create gift card dialog

* Add activation option to create gift card dialog

* Update event handling

* Update test snapshots

* Use date context provider for moment time

* Update types

* Refactor

* Update messages

* Update snapshots

* Add channel picker to gift card create modal

* Fix styling

* Add channel picker to gift card resend code dialog

* Update schema and types

* Refactor

* Update messages

* Refactor

* Update messages and snapshots

* Fix order gift card money amount (#1371)

* Update messages and snapshots

* Fix order gift card money in payment card when multiple gift cards used

* Fix missing order id check in gift card events in order gift card money used util

* Fix channel selection in gift card create dialog

* Fix order number not showing in gift card update view

* Add gift card settings to gift card create dialog (#1372)

* Fix gift cards number inputs to accept floats

* Fix order number showing as null in gift card update info card

* Fix channel slug adding in gift card create dialog

* Fix gift card list header top card links to display correctly

* Remove unused imports

Co-authored-by: Dawid Tarasiuk <tarasiukdawid@gmail.com>
2021-09-14 15:57:02 +02:00
Jakub Majorek
d5a36e47fc
Add channel picker product details (#1355)
* Add channel picker product details (#1353)

* Enable channel picker on product details page

* Add channel picker to product details

* Simplify category details page

* Update snapshots and translations

* Update types

* Update testId, bump macaw-ui

* Update snapshots, types and schema
2021-09-03 14:27:34 +02:00
mstrumeck
8ef3c06efe
SALEOR-2993: Add Two new webhooks - product back in stock and product out of stock (#1321)
* SALEOR-2993: Add product variant back in stock and product variant out of stock webhooks:

* Revert "SALEOR-2993: Add product variant back in stock and product variant out of stock webhooks:"

This reverts commit bff95285195ede3cae97fd6a0ebd2c100937986c.

* SALEOR-2993: Add product back in stock and product out of stock webhooks:

* SALEOR-2993 update stories and messages

* SALEOR-2993: Schema update
2021-09-03 13:36:35 +02:00
Paweł Kucharski
386a2488e7
Click & Collect (#1268)
* Add initial form of c&c related properties for warehouse

* Add Typography & styling to RadioButtons, drop duplicated state

* Add fields for warehouse fixtures + cleanup

* Add order collectionPointName field + handle click&collect display in order

* Fix review issues + add snapshots

* Modify choices in WarehouseZones with filter

* Rename WarehouseZones to WarehouseSettings

* Add translations messages

* Update schema

* Fix review issues pt.2

* Fix review issues pt.3

* Fix review issues

* Align defaultMessages.json to messages refactor

* Rename interface WarehouseInfo -> WarehouseSettings

* Add pickup annotation to shipping address in order details

* Introduce fragment matcher + small change in deliveryMethod query

* Fixes after rebase

* Add resolve fulfillment option for local warehouse

* Align types after rebase

* Update snapshots

* Repair weird union behaviour

* Add entry to CHANGELOG.md
2021-08-27 10:10:41 +02:00