Commit graph

443 commits

Author SHA1 Message Date
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
Michał Droń
ed59fe423f
Fix message in voucher view (#2338)
* Fix message

* Extract messages

* Update snapshots
2022-10-03 11:41:00 +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
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ń
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ń
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
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ń
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
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
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
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
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
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
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
Dawid
ab8111a62d
Add status pills to webhooks list (#2153) 2022-07-13 13:12:58 +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ń
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
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
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
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ń
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
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ń
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
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
Dominik Żegleń
74595a4266
Update translations (#1965)
* Update transifex config

* Update translations
2022-04-05 09:33:48 +02: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
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
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
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
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
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
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
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
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
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
Dawid Tarasiuk
a8f56defe1
Fix rest of the world checkbox on shipping zone create (#1672)
* Fix rest of the world checkbox on shipping zone create

* Add query to fetch rest of the world countries

* Fix query in shipping zone view

* Remove default shipping zonecountries

* Refactor rest of the world queries

* Refactor rest of the world

* Update shipping zone countries query

* Fix naming

* Handle no rest of the world countries left
2022-02-09 11:47:37 +02: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
Michał Droń
394c33c0b5
Refactor changing address in order details directly (#1697) (#1818)
* Refactor changing address in order details directly (#1697)

* wip change address edit buttons behaviour in order draft

* wip modify dialog view when customer is not changed

* wip remove old address edit modal

* wip rm old address modal storybook

* wip async search state change

* wip disable edit in draft when no customer is selected

* wip fix submitting issues

* wip allow single address mutation

* wip fix billing change & manual address change

* wip fix covered country dropdown

* wip add address clone checkbox

* wip normal order details & unconfirmed views

* wip messages minor fixes

* wip clone address checkbox on new address input option

* Storybook update

* cleanup

* billing same as shipping fixes

* improve stories titles & move to component folder

* improve continueToAddressSearchState readibility

* improve dialog title/description message descriptors

* change .then() to await

* Remove redundant onClick arrow function

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

* Improve OrderAddressFields component

* move shipping & billing address edit props outside file

* Update snapshots

* fix mutation output types in order views

* Fix confirm button state type

* fix skipping query when modal is refreshed

* fix cancel button to match designs

* update dialog headers

* fix customer address choice card styling for blue theme

* change hidecard to showcard

* export types to local file

* improve isAnyAddressEditModalOpen function

* fix cut hover effect on inputs

* fix submitting modal when modal is closed with x button

* fix validation & initial form data

* update messages

* Update partial mutation return type

* Add vertical spacer component

* Revert CardSpacer changes

* Change some of Form & Card spacers to Vertical Spacers

* Fix makeStyles import in VerticalSpacer

* Fix border color for AddressCards

* Add type to addressFieldsCommonProps object

* Change stories subtitles to lowercase

* Fix country choices type

* Fix setState react type

* Improve address change handlers

* Update snapshots

* Fix default country not showing up in address edit single autocomplete field

Co-authored-by: Dominik Żegleń <flesz3@o2.pl>
Co-authored-by: Magdalena Markusik <magdalena.markusik@mirumee.com>

* Fix linter issue

Co-authored-by: Dominik Żegleń <flesz3@o2.pl>
Co-authored-by: Magdalena Markusik <magdalena.markusik@mirumee.com>
2022-02-02 12:22:39 +01:00
Michał Droń
519b816afa
Add hover tooltip on sorting disabled columns (#1811)
* Add hover tooltip on sorting disabled columns in lists (#1784)

* Update macaw

* Add TooltipTableCellHeader component

* Add filterDependency type to lists

* Add tooltip to conditional columns in Voucher List

* Add tooltip to conditional columns in Sale List

* Add tooltip to conditional columns in Collection List

* Add tooltip to conditional columns in Product List

* Update snapshots

* Improve component clarity

* Change TableCellHeader to React.forwardRef component

* Change TooltipTableCellHeader to use TableCellHeader

* Remove RefTableCellHeader

* Bump macaw

* Update snapshots

* Remove merge conflict leftovers

* Add tooltip header to gift card list

* Refactor gift card list tooltip

Co-authored-by: Wojciech <wojciech.mista@hotmail.com>
2022-02-02 09:48:12 +01:00
Wojciech Mista
f9e1bb0569
Don't render delete button if user doesn't have an avatar (#1803)
* Make "delete" button appear only when user has an avatar

* Remove unused import

* Update tests

* Refetch user on avatar update
2022-02-01 15:41:31 +01:00
Wojciech Mista
44a8a1c182
Shipping zones button fix (#1804)
* update tests

* wip

* Post-rebase fix

* Revert "wip"

This reverts commit 225276edb5c0730ab0cefba0f98a663d6e4fb37a.

* Post-rebase fixes

* Update tests, messages and stories

* Fixes

* Update messages

* Update tests and messages
2022-02-01 14:28:30 +01:00
Magdalena Markusik
3d636f4789
Exit dirty form (#1816)
* Add Exit form prompt component and change some minor styles in other components to match

* Add Exit form prompt provider

* Adjust generic form and useform hook to allow using exit form prompt provider

* Add exit form prompt provider to index

* wip

* Fix types

* Fix styling

* Fix types

* Revert warehouse details refactor

* Add handling of edge cases to exit prompt

* Refactor, add comments, fix some types

* Refactor after exit form dialog name change

* fix types

* Fixes after review

* Add default value for useform prop opts so the app doesn't crash

* Add missing category prop to getting initial data for category details form

* Add exit dialog to everywhere WIP (#1600)

* Add Exit form prompt component and change some minor styles in other components to match

* Add Exit form prompt provider

* Adjust generic form and useform hook to allow using exit form prompt provider

* Add exit form prompt provider to index

* wip

* Fix types

* Fix styling

* Fix types

* Revert warehouse details refactor

* Add handling of edge cases to exit prompt

* Refactor, add comments, fix some types

* Refactor after exit form dialog name change

* fix types

* Add CommonUseFormResultWithHandlers type for later use and refactor handleFormSubmit util

* Refactor login form not to use custom form since it doesn't need to

* Add exit form dialog to order refund page

* Add exit form dialog to order return page

* Add exit form dialog to order order settings  page

* Add exit form dialog to product variant page

* Add exit form dialog to product create page

* Add exit form dialog to product update page

* Add exit form dialog to product variant create page

* Fix confirm leave prop passing in generic Form

* Add util function to handle for submit to extract errors

* Add confirmLeave prop to generic forms

* Move handleChange for custom forms to useForm

* Add exit dialog to more forms

* Add extract mutation errors util function

* Add extracting errors to submit functions that use metadata create handler

* Fix typo

* Add missing category prop to getting initial data for category details form

* Fix types

* wip

* wip

* wip

* wip

* Fix types & refactor

* Fix types & refactor

* Fix typescript

* Fix unmatching tag

* Fixes

* Add handling of multiple forms at once to exit dirty form provider

* Change all usages of ExitFormDialogContext to designated hook

* wip

* wip

* wip

* Fix types wip

* Fix types

* Remove console logs

* Add isSubmitting prop to exit form dialog in order to avoid enabling exit dialog while submit is still in progresS

* Replace handleSubmit global util with a hook to use exit form dialog props inside

* Move useHandleSubmit to general hooks dir, update imports

* Small fixes

* Update snapshots

* Fix types

* Small fixes due to extensive rebase

* Update package lock

* Fixes after rebase

* Remove exit form from customer address dialog

* Fix types and update messages

* Fix types

* Change imports names

* Refactor

* Remove unnecessary console.log

* Update types, snapshots. etc after rebase
2022-02-01 10:58:06 +01:00
Dominik Żegleń
f8254fd11b
Bump macaw to 0.3 (#1807)
* Update to new design theme (#1631)

* Update macaw to 0.3.0 (#1623)

* Update macaw to 0.3

* Use proper pagination component

* Fix type errors

* Remove leftover import

* Remove variant and color from confirm button

* Remove alias

* Update macaw

* Fix button type

* Random fixes (#1633)

* Improve layout components

* Use colored svgs

* Minor fixes

* Fix autocomplete loaders

* Fix padding

* Fix button variant

* Remove codegen file

* Fixes after bumping macaw to 0.3 part 2 (#1638)

* Fix various visual bugs

* Fix type errors

* Bump macaw

* Random fixes part 3 (#1647)

* wip

* Fix mismatched paddings

* Fix actions container padding

* Put story in the right directory

* Fix shipping zone picker

* Fix minor visual bugs

* Remove unused imports

* Move styles to separate file

* Random fixes part 4 (#1641)

* Fix various visual bugs

* Fix type errors

* Fix last table item padding

* Add outline on hover

* Fix spaces

* Fix spaces

* Remove dead code

* Fix elevation

* Remove dead code

* Fix shadows

* Add outline to expand button

* Fix spacing

* Fix spacings

* Fix selectable tables hover

* Use proper delete icon

* Fix ConfirmButtonTransitionState imports

* Update src/apps/components/CustomApps/CustomApps.tsx

Co-authored-by: Wojciech Mista <wojciech.mista@saleor.io>

Co-authored-by: Wojciech Mista <wojciech.mista@saleor.io>

* Rework error page (#1670)

* Remake error page

* Fix types

* Update error id styles

* Fix types

* Login page rework (#1703)

* Rework login page

* Remove outline

* Fix logo and footer placement

* Sort imports

* Random fixes part 5 (#1669)

* Fix text color in dark mode

* Update password reset pages (#1714)

* Update password reset pages

* Update src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx

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

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

* Fix collection page

* Update dark mode logo

* Bring back "create app" button

* Fix spacings

* Fix selects

* Fix login e2e test

* Fix not found page displaying

* Update selector

* Add missing package

* Let dropdown overflow through card

* Fix scroll

* Fix scroll

* Fix overflow on grid element

* Fix e2e tests

* Fix data-test-id

* Update snapshots

* Update messages

* Update macaw

* Update snapshots

* Use stable macaw version

Co-authored-by: Wojciech Mista <wojciech.mista@saleor.io>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>

* Update to new design theme (#1631)

* Update macaw to 0.3.0 (#1623)

* Update macaw to 0.3

* Use proper pagination component

* Fix type errors

* Remove leftover import

* Remove variant and color from confirm button

* Remove alias

* Update macaw

* Fix button type

* Random fixes (#1633)

* Improve layout components

* Use colored svgs

* Minor fixes

* Fix autocomplete loaders

* Fix padding

* Fix button variant

* Remove codegen file

* Fixes after bumping macaw to 0.3 part 2 (#1638)

* Fix various visual bugs

* Fix type errors

* Bump macaw

* Random fixes part 3 (#1647)

* wip

* Fix mismatched paddings

* Fix actions container padding

* Put story in the right directory

* Fix shipping zone picker

* Fix minor visual bugs

* Remove unused imports

* Move styles to separate file

* Random fixes part 4 (#1641)

* Fix various visual bugs

* Fix type errors

* Fix last table item padding

* Add outline on hover

* Fix spaces

* Fix spaces

* Remove dead code

* Fix elevation

* Remove dead code

* Fix shadows

* Add outline to expand button

* Fix spacing

* Fix spacings

* Fix selectable tables hover

* Use proper delete icon

* Fix ConfirmButtonTransitionState imports

* Update src/apps/components/CustomApps/CustomApps.tsx

Co-authored-by: Wojciech Mista <wojciech.mista@saleor.io>

Co-authored-by: Wojciech Mista <wojciech.mista@saleor.io>

* Rework error page (#1670)

* Remake error page

* Fix types

* Update error id styles

* Fix types

* Login page rework (#1703)

* Rework login page

* Remove outline

* Fix logo and footer placement

* Sort imports

* Random fixes part 5 (#1669)

* Fix text color in dark mode

* Update password reset pages (#1714)

* Update password reset pages

* Update src/auth/components/ResetPasswordPage/ResetPasswordPage.tsx

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

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

* Fix collection page

* Update dark mode logo

* Bring back "create app" button

* Fix spacings

* Fix selects

* Fix login e2e test

* Fix not found page displaying

* Update selector

* Add missing package

* Let dropdown overflow through card

* Fix scroll

* Fix scroll

* Fix overflow on grid element

* Fix e2e tests

* Fix data-test-id

* Update snapshots

* Update messages

* Update macaw

* Update snapshots

* Use stable macaw version

Co-authored-by: Wojciech Mista <wojciech.mista@saleor.io>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>

* Fix visual bugs and artifacts

* Fix dropdown menus being clipped (#1762)

* wip

* Fix clipped select menus

* Remove unused import

* Fix spacing

* Fix tests

* Fix select content appearing under dialogs (#1777)

* Fix type errors

* Fix bulk delete button placement

* Fix filter arrow buttons

* Fix messages

* Remove backling from pages list

* Move status above events

* Update messages and snapshots

Co-authored-by: Wojciech Mista <wojciech.mista@saleor.io>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2022-01-28 13:34:20 +01:00
Wojciech Mista
1ee2114153
Redirect user to created variant after variant create (#1790)
* Redirect user to the created variant after creation

* Refactor variant creation navigation to use onComplete
2022-01-28 09:06:21 +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
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
4880093f63
Use Auth SDK (#1474)
* Use Auth SDK

* Update auth provider hook

* Update sdk module mapping

* Update setting password

* Fix no user details on first login

* Update auth tests

* Cleanups

* Update SDK

Update SDK

Update SDK

Update test recordings

Update SDK

* Implement SDK External Auth

Update new password view

Hnalde external logout

Update SDK

Fix logout external redirect

* Fix login page style

* Update SDK

* Auth Provider cleanups

Update and refactor auth

Auth types cleanups and refactor

* Update channel context provider

* Fix login error handling

* Logout immidiatelly non-staff user

* Update test snapshots

* Trigger CI

* Update to SDK v0.4, remove duplicated UserContext hook

* Handle server errors during login

* Fix wrong login page form submition handling

* Update login error messages

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2021-12-17 12:10:54 +01:00
Dawid Tarasiuk
9df66818a1
Fix modal footer shadow issue (#1686) 2021-12-16 13:36:03 +02: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
Wojciech Mista
e875b02adc
Fix typos on customer details page (#1659)
* Fix typos on customer details page

* update tests

* Update tests
2021-12-08 12:20:59 +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
Michał Droń
78f7b5d4fb
Searching addresses in order drafts (#1618) (#1655)
* Searching addresses in order drafts (#1618)

* wip search addresses

* wip fix query regex verification

* wip move dialog title & add selected label

* wip move dialog title

* wip edit icon

* wip address selection logic

* wip change messages

* wip message when search is unsuccesful

* wip add billing address change support

* wip default address validation & cleanup

* wip run tests & extract messages

* wip bump macaw

* tests & cleanup

* fix scrollbars

* remove address card wrapper

* apply code review suggestions

* remove comments

* Bump macaw to 0.2.7

* Fix outside modal click state retention
2021-12-03 12:59:29 +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
Dawid Tarasiuk
7ac687d082
Add orders filter by payment status (#1619)
* Add orders filter by payment status

* Move messages to root intl file
2021-11-24 12:13:53 +02:00
Dawid Tarasiuk
b50225aaa2
Add sorting products by update at date (#1581)
* Add sorting products by update at date

* Update messages

* Change columns order in product list view

* Display updated date column by default
2021-11-17 14:49:22 +02:00
Michał Droń
3de07a4f3b
Add current usage on vouchers (#1519) (#1576)
* wip design label

* add usesLeft calculation

* snapshots & messages

* fix type errors

* add error on input and disable save button when value is invalid

* resetting input value to initial after checkbox state change

* remove uses left on new vouchers & set initial value to 1
2021-11-10 13:05:56 +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
Michał Droń
19f90d29e8
Fix wrapping issue & typos on homescreen (#1505) (#1517)
* fix wrapping issues & messages

* fix messages id & camelCase
2021-10-18 12:18:46 +02:00
Magdalena Markusik
314b043afa
Saleor 4626/fix shipping zone rate UI (#1511)
* Fix shipping zone rates ui

* Update tests and messages
2021-10-18 10:57:53 +02:00
JanChodorowski
cbeed52a30
[Fix] preorder fixes (#1477)
* Fix creating variant without preorder

* Fix creating simple product in preorder

* Proper stock display for variant in preorder

* Fix ending preorder for simple product

* CR response

* CR response

* Fix global threshold empty input
2021-10-14 14:15:59 +03: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
Jakub Majorek
81c29e2458
Refactor Translations Page (#1451) (#1470)
* refactoring

* rename parameter

* update messages

* changes after review

* change imports

Co-authored-by: Kamil Pastuszka <33246308+kamilpastuszka@users.noreply.github.com>
2021-10-06 13:10:12 +02:00
Jakub Majorek
8820ed01fe
Fix wrong words and ordering for staff member form (#1424) (#1471)
* fix wrong words and ordering for staff member form

* add messages

* remove line

* apply changes from review

* change to local messages

Co-authored-by: Kamil Pastuszka <33246308+kamilpastuszka@users.noreply.github.com>
2021-10-06 11:45:29 +02: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
705df796d2
Add gift card expired status (#1412)
* Add gift card expiry status to gift card details provider WIP

* Add gift card expiry handling in gift card update page header

* Add gift card expiry handling to gift card update details tag section & refactor

* Add gift card expiry handling to gift card update details expiry date section

* Add gift card expiry handling to gift card update metadata fields, add disabled prop to metadata cards

* Add comment

* Add gift card expiry handling to gift card list & refactor

* Change back some parts because of change of requirements

* Extract messages

* Remove comments, fix wrong expiry label being displayed in gift card list
2021-09-20 15:41:18 +02:00
Kamil Pastuszka
4fcc3eec5e
Add Demo Banner (#1416) 2021-09-17 10:09:45 +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
dbaed5478a
App adjustments (#1385)
* Use shop domain as backendHost, guard domain changes on cloud instances

* Update messages and snapshots

* Remove unused prop
2021-09-13 16:14:04 +02:00
Michał Droń
5c986799f0
Fix draft order incorrect label (#1375) (#1384)
* changed order draft label from 'add customers first' to 'add shipping address first'

* ran extract-messages

* moved messages to a separate file

* changed exports from default to named
2021-09-13 13:24:48 +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
SektorDV
afd2b1dddb
Merge pull request #1341 from mirumee/SALEOR-3561/3.0/broken-page-title-in-address-book (#1347)
add fallback page title for nameless customers
2021-08-31 14:34:25 +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
Jakub Majorek
7051181802
Add channel default country (#1330)
* Add channel default country (#1323)

* Add default country to channel

* Fix fixtures

* Update snapshots, extract messages

* Trigger deployment

* Update schema

* Update snapshots

* Trigger deployment
2021-08-25 12:45:23 +02:00
Dawid Tarasiuk
08637b27fd
Introduce fulfillment creation API (#1241)
* Display warehouse name for each fulfillment (#1259)

* Hide no-stocks columns in fulfillment view (#1260)

* Hide no-stocks columns in fulfillment view

* Update tests

* Refactor

* Update tests

* Add fulfillment settings card (#1242)

* Add fulfillment setting card

* Make fulfillment approvement naming consistent

* Fix mutation bug

* Update types

* Trigger CI

* Handle fulfillment acceptance on order details page (#1255)

* Handle fulfillment acceptance on order details page

* Make fulfillment approvement naming consistent

* Update fulfillment schema and its usage

* Render history events regarding waiting fulfillments (#1265)

* Add awaiting for approval fulfillment order event

* Fix warehouse name

* Change fulfillment quantity calculation (#1267)

* Change fulfillment quantity calculation

* Fix warehouse name

* Update messages

* Trigger CI

* Refactor

* Fix refactor

* Fix fulfillment for no variant

* Allow creating fulfillments waiting for acceptance (#1248)

* Fix fulfillment page style and typescript classname types perfomance issue

* Allow creating fulfillments waiting for acceptance

* Make fulfillment approvement naming consistent

* Update schema

* Add tooltip to fulfillment savebar

* Update unpaid fulfillment creation restriction

* Update fulfillment cration restriction

* Update test snapshots

* Add possibility to cancel "waiting" fulfillments (#1288)

* Allow to cancel waiting fulfillments

* Add delete button to fulfillment card

* Update test snapshots

* Handle waiting fulfillments on refund page (#1290)

* Handle waiting fulfillments on refund page

* Trigger CI

* Trigger CI

* Calculate quantity to refund on quantityToFulfill

* Update changelog

* Update snapshots

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2021-08-20 16:36:05 +02:00
mmarkusik
dae95cb410
Add Gift Cards #1 (#1291)
* 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

* Fixes after review

* 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

* 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

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

* Fix gift card list table header styles

* Add enable / disable section to gift card update

* Refactor

* Refactor

* Refactor

* Add metadata to gift card update

* Update messages ids

* Refactor

* Refactor

* Refactor

* Refactor

* Update types after rebase

* Fix types

* Fixes after qa

* Fix tests
2021-08-16 15:44:00 +02:00
Jakub Majorek
b65a632e07
Add product variant translation view (#1285)
* Add product variant translation view

* Final adjustments
2021-08-10 16:38:48 +02:00
Kamil Pastuszka
034eea0dcd
Add text attribute for product and page translations (#1276)
* initial commit

* Refactor translation components

* Wire up products

* Update types

* add logic for withChoices flag

* refactoring

* fixing errors

* change in intl.ts

* amended Changelog

* fix formatting

* fixing stuff

* Update translations

* remove unused declaration

* add changes

* Fixes

* Add newline

* Update displayName

* Update snapshots

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2021-08-09 16:59:12 +02:00
Marcin Gębala
19b0a9623e
Add translation webhook events (#1273) 2021-08-05 11:26:17 +02:00
Piotr Grundas
6abdc4613a
[SALEOR-3088] Date & DateTime attributes (#1180) 2021-07-29 14:15:14 +02:00
Kamil Pastuszka
db5ad19827
Fixed incorrectly handled image upload errors (#1223)
* fixed incorrectly handled image upload errors

* updated Changelog

* updated defaultMessages.json

* fix for collections and products

* fix for user avatar upload error

* implemented changes after review

* fixed conflict
2021-07-23 14:56:46 +02:00
Dawid Tarasiuk
b024a0fde6
Add variant create options dialog (#1238)
* Add variant create options dialog

* Update e2e tests

* Update option field name

* Refactor

* Use macaw UI in Variant create dialog

* Update messages
2021-07-22 11:56:13 +02:00
Dominik Żegleń
62817568a7
Use MacawUI (#1229)
* Replace withStyleswith useStyles (#1100)

* Replace withStyleswith useStyles

* Update messages

* Use rem as a spacing unit (#1101)

* Use rems as spacing units

* Fix visual bugs

* Update stories

* Use macaw-ui as theme provider (#1108)

* Use macaw ui as a theme provider

* Add react-dom to aliases

* Fix jest module resolution

* Update useTheme hook usage

* Fix test wrapper

* Use macaw from git repo

* Fix CI

* Update stories

* Fix aliasing

* Extract savebar to macaw ui (#1146)

* wip

* Use savebar from macaw

* Use confirm button from macaw

* Improve file structure

* Use sidebar context from macaw

* Update macaw

* Update macaw version

* Remove savebar from storybook

* Update stories

* Use alerts and notifications from macaw (#1166)

* Use alerts from macaw

* Add notifications from macaw

* Update stories

* Pin macaw version

* Encapsulate limit reached in one component

* Remove unused imports

* Use backlinks from macaw (#1183)

* Use backlink from macaw

* Update macaw version

* Use macaw sidebar (#1148)

* Use sidebar from macaw

* Use shipped logo

* Use lowercase

* Update stories

* Use user chip from macaw (#1191)

* Use user chip from macaw

* Use dedicated components for menu items

* Simplify code

* Bump version and fix types (#1210)

* Rename onBack to onClick

* Rename UserChip to UserChipMenu

* Rename IMenuItem to SidebarMenuItem

* Update macaw version

* Fix tables after changes in macaw (#1220)

* Update macaw version

* Update changelog

* Update stories

* Fix after rebase

* Update to macaw 0.2.0

* Lint files

* Update macaw to 0.2.2
2021-07-21 10:59:52 +02:00
Dominik Żegleń
3f378087a4
Fix crashes (#1216) 2021-07-07 09:59:08 +02:00
Jakub Majorek
29f6c5496b
Use root level channel argument (#1126)
* Use root level channel argument

* Update schema after rebase

* Adjust list views (#1187)

* Use root level channel argument

* Use channel from filters

* Handle sort keys that require channel

* Add channel filter on sales and vouchers pages

* Update queries

* Fix tests/fixtures

* Block sort on discount pages

* Add generic filter validation

* Fix tests, update changelog

* Channels availability status changes, code cleanup

* Update snapshots
2021-06-28 15:51:19 +02:00
Dawid Tarasiuk
4056ac395b
Support staff only voucher (#1174)
* Support staff only voucher

* Trigger CI

* Update messages

* Update changelog
2021-06-21 11:02:17 +02:00
Piotr Grundas
a0dce99b5d
[SALEOR-3090] Boolean attribute (#1157) 2021-06-20 01:13:16 +02:00
Dawid Tarasiuk
88e5db054f
Fix product type translations (#1163)
* Fix product type translations

* Update changelog
2021-06-15 10:10:13 +02:00
Marcin Gębala
4e65418c51
Add payment events to webhooks (#1021)
* Add payment events to webhooks

* Add payment permission

* Extract messages

* Update snapshots

* Rename MANAGE_PAYMENTS to HANDLE_PAYMENTS

* Update snapshots
2021-06-08 12:33:21 +02:00
Dawid Tarasiuk
d342bdb63b Variant attribute values pagination (#1133)
* Implement attribute values pagination in variant pages

* Implement attribute values pagination in variant creator

* Update variant creator design bugs

* Fix deleting attribute value error

* Refactor attribute value handling in variant creator

* Update after review

* Create local pagination state for attribute values

* Fix autocomplete select field scrolling on fetch more

* Change onAttributeSelect to onAttributeFocus

* Update cypress test function with attribute values pagination
2021-06-08 09:51:27 +02:00
Jakub Majorek
5ace78f279
Change rateType from enum to string (#1121)
* Change rateType from enum to string

* Update snapshots

* Fix accidental recurrency caused by race condition

* Handle null type on SEO form

* Trigger deployment

* Fallback to empty string for undefined/null values
2021-05-24 15:50:41 +02:00
Magdalena Markusik
232bfcc139 Extract messages 2021-05-13 12:27:33 +02:00
mmarkusik
19b8d30565
Feature - channels per plugin (#1093)
* Update schema

* Update queries, mutations, and types

* Add render with dividers util function

* Add plugin details channels card component

* Update plugin details to use channels

* Update stories

* Update plugin configuration type across the app, fix some other types, temporarily comment some things out in plugins list so types match"

* Update schema

* Update types

* Update plugins list to show channels and global statuses, add plugin channel status, update status label component

* Add render with dividers util function

* Comment out some stuff for types to match - temporary

* Add useChannelsSearchWithLoadMore util to imitate loading more from backend for channels list with load more

* Change filters logic to be able to display multiple fields in a field section and add it to plugins view

* Add scroll option to plugin availability popup on plugin list

* Fix plugin list page story

* Temporarily comment some stuff out, fix some types

* Add filters errors WIP

* Fix filters not updating list

* Add error handling to plugins list filters and filters in general

* Rename some components according to review

* Move useChannelsSearch and useChannelsSearchWithLoadMore to hooks, change some imports accordingly

* Fix imports

* Move render collection with dividers to a component, fix usages

* Replace channels with load more and search query to base channels query

* Change render with dividers function to take in a component instead of render function

* Update tests

* Extract messages

* Remove unnecessary imports

* Fix filters - autocomplete messing items order sometimes & some fields not working

* Update plugin update mutation variables - change channelId to channel

* fix failing tests

* Add test ids

* fix failing tests

* fix failing tests

* Rename misc.tsx to ts

* Remove usage of render collection with diviers, change it to CollectionWithDividers component

* Remove unnecessary imports

* Update messages ids

* Update snapshots

Co-authored-by: Karolina Rakoczy <rakoczy.karolina@gmail.com>
2021-05-11 15:58:09 +02:00
Dawid Tarasiuk
0e054cc1e4
Saleor 2798 user addresses selection for draft order (#1082)
* Create user addresses select modal

* Prepare user addresses select modal form

* Add user addresses select modal to order draft details page

* Update draft order validation of adresses in edit modal

* Add Customer Change modal

* Update snapshots and messages

* Indication of address form errors by address type

* Refactor addresses submiting

* Refactor address transform functions

* Add data-testids to addresses change dialog

* Update customer address choice style

* Trigger CI

* Update customer addresses edit flow

* Move styles outside of component files

* Refactor after review

* Refactor after review

* Do not update customer if the same selected

* Handle setting adress after edit customer with no addresses

* Trigger CI
2021-05-06 13:38:15 +02:00
Piotr Grundas
2a21609eae
Numeric attributes (#1065)
* Update schema, types

* Add numeric unit control

* Improvements, tests

* Cleanup

* Add messages

* Small fixes

* Add test id's

* Improve useForm, logic

* Use short names

* Review corrections

* Small improvements
2021-04-29 10:58:03 +02:00
Dominik Żegleń
d220914085
Add service worker (#1073)
* Add service worker

* Update messages

* Update changelog

* Remove debug code

* Refactor code and add interval config

* Clear interval

* Reload all pages simultaneously

* Update copy
2021-04-26 12:10:47 +02:00
Jakub Majorek
a83a245654
Drop deprecated fields (#1071)
* Drop deprecated fields

* Update changelog

* Update test recordings

* Fix e2e tests

* Fix product sorting (#1079)

* update stories

Co-authored-by: Karolina Rakoczy <rakoczy.karolina@gmail.com>
2021-04-26 09:49:55 +02:00
mmarkusik
9d6cc99103
Merge pull request #1066 from mirumee/SALEOR-2547/update-adding-draft-order-products-per-channel (#1070)
Update adding draft order products per channel
2021-04-20 16:06:39 +02:00
Jakub Majorek
e5df1b2dbf
Add shipping method description (#1058)
* Add shipping method description - WIP

* Wire up logic

* Handle more editorjs issues

* Fix minor issues

Co-authored-by: Dawid Tarasiuk <tarasiukdawid@gmail.com>
2021-04-16 14:33:14 +02:00
mmarkusik
8fe66a3bde
Add channel shipping zones (#1015)
* Add naked input option to SingleAutocompleteSelectField and update it's stories

* Add new icons - chevron up, down & trash

* Add deletable item component and stories

* Add card add items footer component to be used in warehouses and product stocks assign

* Update schema and types

* Add shipping zones card components

* Update channel details page form to also include shipping zones

* Update makeTopLevelSearch hook files directory and add getSearchFetchMoreProps function to avoid extracting it manually every time

* Update channels types & fragments

* Move getDefaultNotifierSuccessErrorData function to useNotifier utils, update dir etc., also make order discount provider use it from the new dir

* Add shippinh zone to channel update and create and add shipping zone search

* Update messages

* Fix types

* Fix lint, types etc

* Small refactor from review and quick fix styles of shipping zones card

* Refactor a bit and update snapshots

* Refactor a bit and update snapshots

* Addd / refactor channels availability components

* Add useChannelsWithProductVariants hook with utils and types

* Add / refactor more channels availability components

* Move avatar from table cell avatar to separate component for it to be usable outside of tables

* Add channels with variants logic to product create and update pages & views

* Refactor components to use updated channels availability components

* Remove unnecessary comments

* Update storybook

* Update types

* Update messages

* Fix prices for variants / simple product not uodating properly

* Post merge cleanup, update schema, types, etc.

* Change shipping zone details warehouses card into settings card and add ability to assign channels to shipping zone

* Update types

* Update snapshots

* Fix selecting / deselecting all channels in channels with variants modal

* Fixes after review, some types changes etc.

* Update snapshots

* Small types fixes

* Make price rates views use parent shipping method channels instead of all

* Make price rates views use parent shipping method channels instead of all

* Update types

* Fix bugs

* Fixes after review

* Fix channels availability data submission

* Fix lint

* Fix variant pricing card showing not related channels

* Fixes after review

* Fix types

* Hide unaviable variants in add products to draft order dialog

* Fix channels with variants availability modal showing confirm button as enabled when it shouldn't

* Fix types

* Update semi checked icon to match old designs

* Update types

* Update channels icon in channels with variants availability

* Fix product cypress test after product channels mutation changed

* Fix trash and chevron down colors in dark mode

* Fix shipping zones card footer not updating query after click away

* Fix types in schema, add condition not to display shipping zones select in channel details if all zones have already been selected

* Fix products adding in order draft dialog

* Fix simple productupdate

* Update snapshots after merge with master

* Update messages

* Fix product api request for cypress

* Add missing test id

* Fix selecting if product is simple -> form being submitted with empty data sometimes

* Update snapshots, messages and add fix for invalid date at product update

* Remove unnecessary imports

* Fix failing test in saleor 2552 (#1061)

* fix

* fix

* fix

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
Co-authored-by: Karolina <rakoczy.karolina@gmail.com>
2021-04-14 15:44:25 +02:00
Zachary Keeping
9362ea53b0
Fix "secret" typo (#993) 2021-04-14 09:39:34 +02:00
Dominik Żegleń
a3abb9c476
Handle Cloud limits (#1053)
* Handle limit reached error

* Update changelog

* Move notifications to higher layer

* Handle limits top-level

* Remove unused imports

* Add alert component

* Fetch limits from API

* Display limits in staff list

* Fix disabled text button color

* Display limits in products pages

* Display limits in channel list

* Display limits in warehouse list

* Display limits in order list

* Add stories for limits

* Move alert to corresponding section

* Update schema

* Update changelog

* Fetch only needed limitations

* Fix types

* Fix story

* Display limits in variant creator

* Improve type consistency

* Update snapshots

* Update limit counter after object deletion

* Fix copy

* Improve code readability

* Lint files

* Fix dark mode alerts

* Improve contrast

* Fix sku limit in product variant list

* Update stories

* Update messages

* Extract messages
2021-04-13 11:59:16 +02:00
Piotr Grundas
a3fd4bb6c2
Add rich text attribute input (#1023)
* Clean structure, add text input, add story

* Improvements

* Update tests, changelog

* Extract messages

* Improvements

* Generate messages, update snapshots

* Switch to rich text

* Handle transitions

* Update translations
2021-04-09 09:51:49 +02:00
Tomasz Szymanski
fc3abed23d Merge branch 'master' of github.com:mirumee/saleor-dashboard into feature/unconfirmed-order-line-manipulation 2021-04-02 06:20:26 +02:00
Dominik Żegleń
c1159861a9
Update schema (#1029)
* Update schema

* Update stories and changelog

* Update messages
2021-03-31 15:11:58 +02:00
Tomasz Szymanski
e5fdef53df Merge branch 'master' of github.com:mirumee/saleor-dashboard into feature/unconfirmed-order-line-manipulation 2021-03-31 12:38:10 +02:00
Jakub Majorek
5416c9f865
Ignore EditorJS errors (#1036)
* Ignore EditorJS error

* Update messages
2021-03-30 16:31:38 +02:00
Tomasz Szymanski
d44f293e2d Handle insufficient stock error 2021-03-24 14:00:50 +01:00
Tomasz Szymanski
8a7126f7a7 Fix tests and translations 2021-03-24 09:29:51 +01:00
Tomasz Szymanski
b4a7c9f471 Merge branch 'master' of github.com:mirumee/saleor-dashboard into feature/unconfirmed-order-line-manipulation 2021-03-23 08:52:27 +01:00
Tomasz Szymanski
755fed7cc7 Fix missing email event 2021-03-22 12:34:28 +01:00
Grzegorz Derdak
429e7b9d83
Add ability to upload video URL to product gallery (#972)
* Create a dropdown and modal for uploading Video URLs

* Add ability to upload video URL to product gallery

* Add support for other video providers, minor UI tweaks

* Extract translations

* Style changes

* Adjust dashboard to fetch media oembed data

* Update codebase to match the schema

* Changes after code review

* Update schema.graphql and fixtures

* Update defaultMessages.json

* Fix failing jest tests

* Update schema and types
2021-03-17 14:07:48 +01:00
Tomasz Szymanski
17e01508a6 Merge branch 'master' of github.com:mirumee/saleor-dashboard into feature/unconfirmed-order-line-manipulation 2021-03-16 11:11:47 +01:00
Piotr Grundas
824f1cdb9e
Add product variant events (#1006)
* Add product variant events to apps panel

* Update snapshots

* Update changelog

* Bump translations
2021-03-16 10:03:11 +01:00
Jakub Majorek
a7736e2bf9
Attach permission variables to all queries (#1000)
* [SALEOR-2190] Attach permission variables to all queries

* Fix TS linter issues

* Update package-lock
2021-03-09 09:44:09 +01:00
mmarkusik
2cd4ea9529
Saleor 1856/implement discount modal 2 (#978)
* Add currency to orderline unitprice and update hella lots of types

* wip

* Add diiscount modal component

* Refactor action dialog - move buttons to separate component so they can be reused

* Add discount provider to keep logic of discounts separated and wrap proper components

* Add discount ccalculator util class, and make draft details summary use it, along with discounts data, modal etc

* UUpdate lots of types, fragments, schema etc

* Update quries and mutations

* ARename OrderLineDiscountModal -> OrderDiscountCommonModal, add types etc

* Add order line discount provider + consumer, same for order discount

* Fix ts wip

* Update schema and types

* Update order discount provider

* Add nnetto price to order details fragment and update lots of types

* Adjust fixtures to order details containing net total

* Move both order and order line provider to same dir to make types and utils more accessible

* Update schema to match master

* Update schema and types

* Update order history, add some related components, add events etc.

* Fix types

* Fix schema to match master

* Update messages

* Update changelog

* Retrigger build

* Add stories and update common modal to display floats properly

* Add and update stories and tests

* Add optional displaying of reason in case it's empty

* Make user name label for history events return email if last name and first name are absent

* Update schema, types, and mutations to properly refresh

* Remove unnecessary imports

* Add discounts decorator to draft details page storybook

* Fixs after review

* Update messages

* Small fixes to timeline events

* Update types for order shipping price to use net as well, fix labels in draft summary and add colors to theme palette

* Updaste tests, messages

* Fixs after review

* Add theme highlighted active and inactive color text, add valuue conversion to discount modal when changing calculation mode

* Add change to changelog

* Add extra options to select employee display name for order event when some data is missing. Also add filtering null elements in event header when data missing alltogether and element is null

* Refactor selecting employee name in utils

* Add conditional to extended timeline event when orderline is null
2021-03-05 15:52:02 +01:00
Tomasz Szymanski
5d63968a6f Merge branch 'master' of github.com:mirumee/saleor-dashboard into feature/unconfirmed-order-line-manipulation 2021-03-03 09:35:09 +01:00
Tomasz Szymański
c30429f7f4
Implement inclusion feature of postal codes (#983)
* Temporary merged schema and types update

* Update typing for zipCodeRules -> postalCodeRules

* Refactor zipCodes to postalCodes

* Fix new schema webhooks

* Delete postal code unassign dialog

* Query inclusion type from backend

* Clean up schema from old mutations

* Proper new mutations structure, all postal code related changes

* Linter changes

* Fix bug with save not being refreshed after codes are added / deleted / inclusion change

* Tests and translations

* Fix warnings across app, minor variables refactor

* Linting

* Trigger deployment

* CR changes, cleanups and refactors

* Update snapshots

* Resolve bug with radio not shows correct value on page refresh

* Fix price and weight creation of codes

* Reducer

* Revert "Reducer"

This reverts commit 07a3aed9c88332bde7d9be61b6dbc29e34e4edba.
2021-02-23 09:58:25 +01:00
Piotr Grundas
35857cf717
Update webhooks (#982)
* Update webhooks

* Update snapshots

* Add messages

Co-authored-by: Marcin Gębala <5421321+maarcingebala@users.noreply.github.com>
2021-02-18 14:50:57 +01:00
Tomasz Szymanski
4f3fea10ff Merge branch 'master' of github.com:mirumee/saleor-dashboard into feature/unconfirmed-order-line-manipulation 2021-02-02 11:52:10 +01:00
Tomasz Szymanski
c7562ebb72 Linter, translations 2021-02-02 11:49:46 +01:00
Dawid Tarasiuk
1645e2fdab Implement Oauth2 flow with OpenID 2021-01-28 14:11:00 +01:00
Magdalena Markusik
679b532860 Update messages 2021-01-25 15:16:44 +01:00
Magdalena Markusik
708e381576 Update messages 2021-01-25 15:16:43 +01:00
Magdalena Markusik
93238f8f85 Update messages 2021-01-21 14:02:47 +01:00
Dawid Tarasiuk
11bddd3d1b
Product reference attributes (#948)
* Update changelog with product reference attributes

* 2068 - Add product reference type to attributes (#949)

* 2069 - Add product reference attribute search implementation (#951)
2021-01-20 17:37:36 +01:00
mmarkusik
f0f9fe9b85
Feature/order reissue (#910)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Add change to changelog

* Remove console.log

* Update tests

* Extract messages

* Add utils functions for selecting only ulfulfilled order lines

* Add optional value selection for line item

* Update
tests

* Add optional rendering of unfulfilled items card and refactor a bit

* Update displaying of items card title when refunded card

* UUpdate utils, form data etc. not to include refunded items when calculating replaced items amount

* Uppdate return items card not to display replace buttons for refunded items

* Refactor and small fixes after review

* Update extracted messages

* Fix card title when no fullfilemtn id

* wip

* Initially stitch returns page. Update types, add mutation

* remove unnecessary component display names

* Add loading status from form submission & refactor

* Add errors from response

* Add errors from response and refactor

* Remove comments

* Add optional error adding when no data from return create request

* Update messages

* wip

* Update snapshots

* Remove unnecessary console.log

* Add better typing for getParsedLineData function

* Update & refactor card title to match cards both in return and order details

* Add handling of new statuses to order details cards. Also refactor, and devide order fulfillment card into couple of smaller components

* Update messages

* Update schema to match api

* Update types

* Update status label component to match colors with new designs and order details cards

* RUpdate and refactor order fulfillment card components to be reusable. Also add replaced status handling

* Updayte card title component to handle all cases and statuses

* Update oorder unfulfilled items card and order details page, reduce some of the boilerplate

* Fix card title types and adjust returns card to match

* Update messages

* Update snapshots

* RUpdate order fulfillment card with subtitles and buttons for returned status

* Add onRefund to order fulfillment card

* Fix typo and wrong message in card title

* Add missing condition in return form submission utils to decice if to refund products

* Update fulfillment subtitles row and tests

* Update messages

* Change naming and locations of OrderFulfillment and items card components

* Update messages

* U[pdate names of components again to even better ones

* Update messages

* changelog

* Update schema and types so that order history event also includes user first and last name

* Add extended timeline event and event header components. Move some of the logic to utils and add way to display links in the event header.

* FFix types

* Update messages

* Change naming of isOfType -> isTimelineEventOfType and refactor extended timeline event messages selection to be less complicated

* Add ids and update messages

* Add ids and update messages some more

* Update storybook decorator to work with react router context in components and tests

* Refactor after review

* Update messages

* Add rredirecting to draft order

* Add handling draft creation from replacement

* Add related order to order event fragment and update lots and lots of types

* Update extended timeline event to match related order type on order history event

* Update fixtures

* Refactor ExtendedTimelineEvent

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

* Fix typing

* Update messages

* Fix missing history event for replacement draft created for replaced products

* Update messages

* Handle new statuses for returned and partially returned orders

* Update messages

* update snapshots

* BBump empty line to rebuild ci

* Change status to proper color

* Change replaceable items in return for replace to be auto off instead of on

* Add utils functions and make order details menu not show option to return items when there are returnable items in the order

* Fix replace checkbox showing when previously hidden and clicked set maximal quantities

* Fix return form invalid money values

* Add default values to avoid returning of NaN in utils for return amount and refactor

* Add ggeneral error alerts

* Add eproduct error box component and style. style a lot.

* Fixes

* Fix lint

* Add cannot refund error title + description

* Extract messages

* Refactor after review

* Add better, nicer and fancier imports to product error cell

* Use error color from palette in product error cell

* Fix max refund when 0 for return

* Add ddisable ability to refund products button so it's disabled when 0 products selected

* Add class for order return form data parsing and add condition to not do refund when total captured on order is 0

* Update snapshots

* Add condition for order lines quantity in order products table row

* Fix return amount submit button

* Add change to changelog

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2021-01-20 17:16:43 +01:00
Dawid Tarasiuk
5303d9f714 1992 - Add attribute references select dialog (#931)
* Add attribute references select dialog

* Add reference attribute support to products and variants

* Fix attribute select dialog selection

* Refactor reference attribute handlers

* Refactor reference attribute handlers

* Refactor searching for reference pages
2021-01-20 11:50:53 +01:00
Dawid Tarasiuk
8b0fe986b2 1425 - Support reference type attribute on attribute details page (#918)
* Support reference type attribute on attribute details page

* Trigger CI

* Prevent changing attribute entity type during attribute update

* Refactor attribute details components
2021-01-20 11:50:53 +01:00
Dawid Tarasiuk
ee05b090b8 1862 - Add references field to attributes section (#923)
* Add references field to attributes section

* Update messagees and test shapshots

* Remove unused style in sortable chips component
2021-01-20 11:50:53 +01:00
Jakub Majorek
18f09812a8
Saleor 2067 - Guard against non-staff users logging in (#947)
* Guard against non-staff users logging in

* Scope channel permissions

* Update changelog

* Update tests
2021-01-18 12:19:04 +01:00
Tomasz Szymański
167b77e18a
Mark shipping zone description as optional (#942) 2021-01-13 11:49:08 +01:00
Marek Choiński
4a8ebd5b1f
Saleor 1636 add possibility to filter through channels in order view (#929)
* Add possibility to filter through channels in order view

* Update storybook and locale

* Refactor

* Refactor to mapNodetoChoice

* Fix conditional value in array implicit syntax

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2021-01-13 10:50:54 +01:00