Commit graph

6 commits

Author SHA1 Message Date
Krzysztof Żuraw
03d9e92c97
Add prettier command and run it inside src folder (#3892) 2023-07-11 08:34:08 +02:00
Krzysztof Żuraw
04247d3f95
Migrate from @saleor alias to @dashboard (#2981) 2023-01-16 10:45:12 +01:00
Michał Droń
d5c9a3dae8
Add trailing commas (#2062)
* Require trailing commas

* Add trailing commas

* Add trailing commas in testUtils dir

* Add trailing commas
2022-06-21 11:36:55 +02:00
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
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
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