Commit graph

2507 commits

Author SHA1 Message Date
Wojciech Mista
bb752d3bad
Fix an issue where adornment can't be clicked in multi-select input fields (#1435)
* WIP

* Make adornment click-through

* Fix adornemnt in single autocomplete select field

* Added stories tests
2021-10-04 09:40:24 +02:00
Cezary Miącz
4193894191
Fix demo deployment workflow (#1461) 2021-10-01 15:59:22 +02:00
Cezary Miącz
601add997f
Add demo deployment workflow (#1460) 2021-10-01 15:48:09 +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
Łukasz Szewczyk
6ddb537445
Prevent from mapping over undefined (#1457) 2021-10-01 14:23:01 +02:00
Cezary Miącz
d03bf9c791
Change cloud deployment trigger to repository_dispatch (#1455)
* Change cloud deployment trigger to repository_dispatch

* Refactor staging deployments
2021-09-30 16:03:04 +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
Karolina Rakoczy
2407ae6f76
gift cards in checkout (#1376)
* gift cards in checkout

* complete checkout after trying to add gift card

* fix gift cards tests

* fix gift cards

* update snapshots

* fix tests

* fix gift cards in checkout

* delete created channels
2021-09-29 15:24:47 +02:00
Danijel Dedic
c9678c5167
Save as empty value, when trying to save undefined var to local storage (#1443)
* Save empty value, when trying to save undefined var to localstorage

* Lint fix

* Newline at the end of file to satisfy linter?

* Linter again
2021-09-28 17:29:57 +02:00
Jakub Majorek
d4ebf69bc7
Remove image white background in dark mode (#1432) (#1446)
Co-authored-by: Kamil Pastuszka <33246308+kamilpastuszka@users.noreply.github.com>
2021-09-28 14:25:00 +02:00
marbin274
a47667a9fb
Add missing rowNumber dependency to update queryVariables (#1256)
* fix: add rowNumber like dependency to update queryVariables

* Add resetPagination hook and refactor

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
Co-authored-by: Magdalena Markusik <magdalena.markusik@mirumee.com>
2021-09-28 14:24:45 +02:00
Wojciech Mista
04dac84d63
Add margin to notification box (#1436)
* Add margin to notification box

* Code fix
2021-09-28 12:46:34 +02:00
Wojciech Mista
e018ea5b7d
Change values in create sale page when percentage/fixed amount is switched (#1431)
* WIP

* Fix get sale channel bug

* Add sale value field text

* Extract logic to useEffect

* Code cleanup
2021-09-28 09:06:05 +02:00
Jakub Majorek
9c92332d3c
Add draft order webhook events (#1438) (#1439) 2021-09-27 16:06:21 +02:00
Karolina Rakoczy
2c64a966cc
Saleor 4437 refactor tests (#1389)
* reference type cypress working

* refactor

* remove screenshots

* add reference

* add slash marker

* run tests based on shop version

* fix run tests based on shop version

* fix run tests based on shop version

* change base url to localhost

* fix plugins

* fix plugins

* fix plugins

* fix plugins

* fix plugins

* fix plugins

* fix yml

* fix yml

* chage file names

* fix files names

* fix broken imports add checking for errors in grpah responses

* fix broken imports add checking for errors in grpah responses

* update jest

* fix snapshot
2021-09-27 12:04:21 +02:00
Wojciech Mista
b98f069aab
Add page type and attributes permissions handling (#1425)
* WIP add new configuration menu

* Add missing permissions

* Changed filtering to one based on arrays of permissions

* Add hasAnyPermissions and hasAllPermissions functions

* Simplify getConfigMenuItemsPermissions function

* Simplify routing logic
2021-09-24 14:01:54 +02:00
Kamil Pastuszka
d4ffd88752
Display app versions (#1433)
apply changes from review

apply changes from review

use useShop hook for core version
2021-09-23 16:18:38 +02:00
Dawid Tarasiuk
eaed88a23a
Refactor Gift Card List Top Alert (#1388) 2021-09-22 08:45:24 +02:00
Magdalena Markusik
c566539cc1
Add tab selector util for lists and refactor (#1421)
* Add tab selector util for lists, refactor

* Remove unnecessary imports

* Update types

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

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2021-09-21 16:06:45 +02:00
Jakub Majorek
6e102964a1
Fetch shop data after user is authenticated (#1427) 2021-09-21 15:30:41 +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
Kamil Pastuszka
ffa065d301
fix placeholder text issue for autocomplete component (#1423)
with new logic

improve logic

update snapshot
2021-09-20 16:28:44 +02:00
Kamil Pastuszka
901ab2a505
Fix products table content display (#1422) 2021-09-20 16:28:15 +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
Dominik Żegleń
ffe44be733
Fix back button on manage channels at product details (#1380) (#1417)
* Simplify "changed" logic

* Improve code composition

* Test base state and setters

* Add more tests

* Fix changed logic

* Rename hasChanged output

* Move channel data outside hook

* Move some logic to utils

* Save data in dialog and pass to view

* Split hooks

* Fix react warnings

* Fix story

* Alias type

* Fix stories

* Remove rebase artifact

* Reset state after closing modal

* Capitalize type name
2021-09-17 18:02:44 +02:00
Wojciech Mista
90717b7ed0
Add saving and retreiving currency from localstorage in giftcard create dialog (#1415) 2021-09-17 15:28:50 +02:00
Dominik Żegleń
51e204076f
Fix initial list settings (#1401)
* Allow ocalStorage values to be initialized by cb

* Initialize list settings if not found

* Fix settings merging

* Refactor types
2021-09-17 11:59:28 +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
Dominik Żegleń
9b3d90e9c7
Target only security updates (#1400) 2021-09-14 15:32:41 +02:00
Dominik Żegleń
1fbdac8d38
Add dependabot config file (#1386) 2021-09-14 13:12:36 +02:00
Dominik Żegleń
5fe4575d3d
Fix update notifications (#1387)
* Fix service worker reloading error

* Fix syntax
2021-09-14 11:06:28 +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ń
cda3cfa4c0
channel picker hidden on simple products (#1377) (#1381) 2021-09-13 13:25:00 +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
Karolina Rakoczy
19e9b0ffc2
Saleor 4033 tests for plugins (#1317)
* tests for plugins

* tests for plugins

* add default country to create channel mutation

* change data-test-ids

* update snapshots
2021-09-10 11:03:42 +02:00
Karolina Rakoczy
e7a06281f1
fix failing tests (#1302)
* fix failing tests

* no retries

* add waiting for confirmation msg

* remove unused import

* fix test for staff

* fix test for staff

* fix tests for orders

* fix tests for channels

* fix autocomplete

* fix filters

* fix filters

* fix create shipping method
2021-09-10 10:59:46 +02:00
Tomasz Szymański
457d50c251
Modify order return page to handle waiting fulfillments (#1349)
* Modify return page to show quantityToFulfill

* Include calculation of waiting items on refunds

* Cleanups

* Fix return option

* Fix tests, cleanup

* Refactor getProductsAmountValues

* Fix unfulfilled max quantity selection

* Count waiting fulfillments when choosing if replace is possible

* Trigger deploy

* Fix empty unfulfilled line display when no lines presnt on return
2021-09-09 12:59:37 +02:00
Karolina Rakoczy
0dc82f5825
tests for gift cards (#1361) 2021-09-08 13:32:05 +02:00
GrzegorzKowalik
e134dff532
Fix typo in deploy production workflow (#1369) 2021-09-08 10:11:05 +02:00
GrzegorzKowalik
93d5a5fdd3
Fix variables passing between staging workflow steps (#1368) 2021-09-08 09:31:52 +02:00
Cezary Miącz
97b4333c73
Merge pull request #1359 from mirumee/feature/production-deployment-workflow
Add workflow for production deployment
2021-09-07 15:25:16 +02:00
Grzegorz Kowalik
e7720da33b Add manual trigger for staging deployment workflow 2021-09-07 12:55:40 +02:00
Grzegorz Kowalik
f97d13ceef Add workflow for production deployment 2021-09-06 11:51:40 +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
Jakub Majorek
9b2f5e3db2
Enforce category selection in product creator (#1337) (#1354)
Co-authored-by: SektorDV <35644259+SektorDV@users.noreply.github.com>
2021-09-03 13:40:06 +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
Kamil Pastuszka
6cb744bd93
Fix modal overflow visibility (#1352) 2021-09-02 13:44:00 +02:00