Co-authored-by: andrzejewsky <vox3r69@gmail.com>
Co-authored-by: timur <timuric@gmail.com>
Co-authored-by: Krzysztof Żuraw <9116238+krzysztofzuraw@users.noreply.github.com>
* Fix missing metadata and payment balance on unconfirmed orders
* Update changelog with fix missing fields on order page
Co-authored-by: Patryk Andrzejewski <vox3r69@gmail.com>
* 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
* 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
* Pass query params to iframe from dashboard
* Pass search params in product details and order details extensions
* Move released features in Changelog
* Add entry to chagnelog
* Fix ESLint issues
* 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>
* Use generated hooks in apps
* Remove unused files
* Use proper types in apps
* Use generated hooks in attributes
* Use generated hooks in auth module
* Use generated hooks in categories
* Use generated hooks in channels
* Use generated types in collections
* Remove legacy types from background tasks
* Use generated hooks in customers
* Use generated hooks in discounts
* Use generated hook in file upload
* Use generated types in gift cards
* Use generated types in home
* Use generated hooks in navigation
* Use generated hooks in orders
* Use generated hooks in pages
* Use generated hooks in page types
* Use generated hooks in permission groups
* Use generated hooks in plugins
* Use generated hooks in products
* Use fragment to mark product variants
* Improve code a bit
* Use generated hooks in page types
* Use generated types in searches
* Use generated hooks in shipping
* Use generated hooks in site settings
* Use generated hooks in staff members
* Use generated hooks in taxes
* Place all gql generated files in one directory
* Use generated hooks in translations
* Use global types from new generated module
* Use generated hooks in warehouses
* Use generated hooks in webhooks
* Use generated fragment types
* Unclutter types
* Remove hoc components
* Split hooks and types
* Fetch introspection file
* Delete obsolete schema file
* Fix rebase artifacts
* Fix autoreplace
* Fix auth provider tests
* Fix urls
* Remove leftover types
* Fix rebase artifacts
* Move cardMenu to page header
* Update tests
* Fix extension menu items
* Refactor card menu in page header
* Update tests
* Apply new page styling to gift cards list
* 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
* 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>
* 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
* 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
* 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>
* Make sure invoices card is visible only on orders other than unconfirmed
* Replace div with React.Fragment
* Use short form of fragment and remove key
* 1721 - add refunds miscellaneous view (#860)
* Create new page for Miscellaneous Refunds
* Replace refund order dialog with dedicated page
* Add data test ids
* Update order details view for refunds (#874)
* 1719 - add refund entry to order history (#875)
* Add refund order history entry
* Update refund event with the right query
* 1722 - add refunds product view (#873)
* Create new page for Miscellaneous Refunds
* Replace refund order dialog with dedicated page
* Add data test ids
* Create refund products table
* Implement refund products view
* Update refund mutation with product lines input
* Fix products quantities on refund page
* Fix order refund submission
* Fix products refund submission input variables
* Filter out fulfillments on refund page
* Update refund page in storybook
* Fix test snapshots after wrong refunds rebase
* Set max refund as captured amount
* Refund queries adjustments
* Display refund values with nullish coalescing operator
* Update test snapshots with refunds
* Refactor order refund values calculation
* Create and use refund order line fragment
* Use old simple refund mutation for miscellaneous refund
* Submit for refund only lines with non-zero quantity set
* Fix showing refund error
* Fix refund details on order details page (#879)
* Update order details view for refunds (#874)
* 1719 - add refund entry to order history (#875)
* Add refund order history entry
* Update refund event with the right query
* 1722 - add refunds product view (#873)
* Create new page for Miscellaneous Refunds
* Replace refund order dialog with dedicated page
* Add data test ids
* Create refund products table
* Implement refund products view
* Update refund mutation with product lines input
* Fix products quantities on refund page
* Fix order refund submission
* Fix products refund submission input variables
* Filter out fulfillments on refund page
* Update refund page in storybook
* Fix test snapshots after wrong refunds rebase
* Set max refund as captured amount
* Refund queries adjustments
* Display refund values with nullish coalescing operator
* Update test snapshots with refunds
* Refactor order refund values calculation
* Create and use refund order line fragment
* Use old simple refund mutation for miscellaneous refund
* Submit for refund only lines with non-zero quantity set
* Fix showing refund error
* Add missing refund amount to order history
* Merge repeated order lines in fulfillment lines
* Update order history events types and test snapshots
* Update changelog with refunds changes
* Order confirmed webhook
* Add status chip component and update order details page header
* refactor
* refactor and update types
* Remove rebase leftovers
* Create order settings page
* Add order setting query
* Connct order settings view with api
* Show order settings update error message
* Popup menu routing to order settings
* Fix circular import error with order settings form types
* Update order settings story
* Update order settings messages
* wip
* Add order confirm mutation and types
* Add confirm order feature to order details
* Update global types
* refactor after review
* refactor after review
* update types
* Revert settings menu removal
* Add changelog entry
Co-authored-by: Tomasz Szymanski <lime129@gmail.com>
Co-authored-by: Magdalena Markusik <magdalena.markusik@mirumee.com>
Co-authored-by: Dawid Tarasiuk <tarasiukdawid@gmail.com>
* Add transaction reference input at order page
* Add spacer between cards in order details
Co-authored-by: Karolina Kuźniewicz <karolina.kuzniewicz@mirumee.com>
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>