No description
Find a file
Karolina Rakoczy 03f6034531
Always run critical tests (#1579)
* always run critical

* always run critical

* add opened type

* remove if

* run on click

* Always run critical - test PR (#1683)

* add extra condition for disabling button (#1530) (#1574)

* Fix overlapped content by sidebar (#1508)

* Fix overlapped content by sidebar

* Update app layout widths

* Update test snapshots

* Update macaw ui

* Update macaw-ui version

* Bump path-parse from 1.0.6 to 1.0.7 (#1585)

Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump axios from 0.21.1 to 0.21.4 (#1586)

Bumps [axios](https://github.com/axios/axios) from 0.21.1 to 0.21.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.1...v0.21.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump tmpl from 1.0.4 to 1.0.5 (#1587)

Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump semver-regex from 3.1.2 to 3.1.3 (#1588)

Bumps [semver-regex](https://github.com/sindresorhus/semver-regex) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/sindresorhus/semver-regex/releases)
- [Commits](https://github.com/sindresorhus/semver-regex/commits)

---
updated-dependencies:
- dependency-name: semver-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump dns-packet from 1.3.1 to 1.3.4 (#1591)

Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mafintosh/dns-packet/compare/v1.3.1...v1.3.4)

---
updated-dependencies:
- dependency-name: dns-packet
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump postcss from 7.0.35 to 7.0.39 (#1590)

Bumps [postcss](https://github.com/postcss/postcss) from 7.0.35 to 7.0.39.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/7.0.39/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/7.0.35...7.0.39)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump url-parse from 1.5.1 to 1.5.3 (#1589)

Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Change ExpansionPanel as Accordion (#1279)

* Fix variant creation - remove channels + prices

* Update messages and snapshots

* Change ExpansionPanel as Accordion

* Update snapshots

Co-authored-by: Magdalena Markusik <magdalena.markusik@mirumee.com>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>

* fix product list covering search bar (#1527) (#1577)

* 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

* Allow to create simple product with no channels (#1552) (#1575)

* 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

* Use order token for metadata updates (#1604)

* Change height of channels availability list (#1608)

* Add permissions to Catalog menu item (#1614)

* Allow returning & refunding partially paid orders (#1572) (#1612)

* allow returning & refunding partially paid orders

* change function name

* Add tests for creating products without sku (#1550)

* create products without sku

* update stories

* update stories

* Fix partially cut checkboxes in channel dialogs (#1560) (#1613)

* wip logic for indeterminate icon

* wip remove unused imports

* fix cutted off checkbox ripples

* refactor & cleanup

* Remove hover state from order lines (#1557) (#1615)

* tests for updating products sku (#1555)

* Test for creating order with product without sku (#1559)

* Fix assign countries dialogs (#1610)

* Add orders filter by payment status (#1619)

* Add orders filter by payment status

* Move messages to root intl file

* Refactor sale update and create forms (#1553) (#1622)

* Update form types to include fixed and percentage values

* Update createSalechannels to include new value types

* Merge two update mutations to one

* Make value text field rely on form state rather than internal state

* Update submit handler, error and loading

* Update create and update sale price validation

* Typo

* Fix saleUpdate mutation

* post-rebase fix

* Update types

* Add tests for creating preorders (#1563)

* add test for creating preorder variant

* all tests for creating & editing variants in preorder

* Add optional channel selection in price and weight rates view + voucher view (#1531)

* Add useChannels test

* Fix unnecessary re-render that caused overwrite of form list

* Change array diff check

* Channel selection in price and weight rates is optional

* Fix refunded value calculation in order view (#1601)

* Fix refunded value calculation in order view

* Fix orders price alignment to right

* Update test snapshots

* Fix saving initial variant attributes (#1624)

* Fix long name vouchers (#1626) (#1640)

* Fix long name vouchers

* update snapshots

* QA improvements - wrap page headers

* QA improvements - same changes for sales

* Use node v14 for running tests on CI (#1646)

* Use old default for unhandled rejections flag

* Update type import

* Use less strict flag, fix types

* Use node v14 for running tests

* 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

* 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

* Add tests for preorders- threshold and stocks (#1567)

* tests for preorder, stoks an threshold

* fix tests for ordering products in channel threshold

* Add new tests for login (#1580)

* always run critical

* tests for login

* tests for login

* Fix auto scroll (#1644)

* 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

* Fix initial discount calculation on draft order line (#1651)

* Fix typos on customer details page (#1659)

* Fix typos on customer details page

* update tests

* Update tests

* test PR

* 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

* Fix attributeValueDelete mutation error - required first/last value (#1665) (#1679)

* Add items response in updateMetadata mutation (#1667) (#1680)

* add items to updateMetadata mutation

* same changes for private metadata

* build types

* Add tests for swatch attributes (#1606)

* always run critical

* tests for swatch attributes

* Update cypress/integration/configuration/attributes/attributes.js

Co-authored-by: Ewa Czerniak <ewa.czerniak@saleor.io>

Co-authored-by: Ewa Czerniak <ewa.czerniak@saleor.io>

* Fix error when clicked on filter if list is loading (#1661)

* Fix error when clicked on filter if list is loading

* CR Fixes

* Update tests

* Fix tests for purchase digital product for 3.1 (#1684)

* purchase digital product for 3.1

* purchase digital product for 3.1

* Disable form change check in variant creation (#1681)

* Fix modal footer shadow issue (#1686)

* Add tests for variant selection (#1627)

* variant selection

* variant selection

* add empty space

* Add missing input value, cast values to number (#1692)

* Fix failing cypress tests (#1671)

* fix tests

* fix prorders & images

* change base url

* remove comment

* tests for gift cards (#1677)

* 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>

* fix login by API (#1700)

* Bump @saleor/sdk to 0.4.1 (#1708)

* Add tests for updating & deleting collections and categories (#1662) (#1693)

* tests for updating & deleting collections and categories

* add empty spaces

* fix create category

* Fix assign attributes dialog loader (#1705)

* Add tests for delete/update warehouse (#1676) (#1689)

* remove warehouse from shipping

* tests for warehouses

* tests for pages (#1695)

* Disable save in product create & edit when product name is empty (#1551) (#1710)

* disable save in product edit & create when name is empty

* code review refactor

* Fix disabled button

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

* fix incorrect logic

* fix incorrect logic

* fix disable form on product variant

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

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

* Display error if no invoicing plugin is active (#1709)

* Add error message if no invoice plugin installed

* Fix types

* Update messages

* Use variant prices in add product modal (#1698)

* Replace channel price with variant price; add new price label

* Update fixtures

* Remove unused code

* Remove unused style

* Lint fix

* Remove type conversion

* lint fix

* update queries and types

* CR Fixes

* Money align right

* Update tests for creating variants (#1718)

* merge

* add data-test-id to sku input

* remove data-test-id from sku input

* update stories

* remove duplicated attribute

* Fix EditorJS read-mode toggle race condition (#1711)

* Fix EditorJS read-mode toggle race condition

Fixes rare edge case when toggling read mode is peerformed at the same
time.

* Make PromiseQueue function

* Rename ExpansionPanel components to Accordion (#1727) (#1740)

* Logout redirects user to home page (#1721)

* Redirect to home page on logout

* Change internal redirect to use router

* Update authProvider test

* Add error handling to non-existent apps (#1723)

Co-authored-by: Michał Droń <dron.official@yahoo.com>
Co-authored-by: Dawid Tarasiuk <tarasiukdawid@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: whiteUnicorn <daehyun.baek1@gmail.com>
Co-authored-by: Magdalena Markusik <magdalena.markusik@mirumee.com>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
Co-authored-by: Wojciech Mista <wojciech.mista@saleor.io>
Co-authored-by: Magdalena Markusik <magdalena@markusik.com>
Co-authored-by: Paweł Kucharski <pawel.kucharski@mirumee.com>
Co-authored-by: Ewa Czerniak <ewa.czerniak@saleor.io>
Co-authored-by: Dominik Żegleń <flesz3@o2.pl>

Co-authored-by: Michał Droń <dron.official@yahoo.com>
Co-authored-by: Dawid Tarasiuk <tarasiukdawid@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: whiteUnicorn <daehyun.baek1@gmail.com>
Co-authored-by: Magdalena Markusik <magdalena.markusik@mirumee.com>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
Co-authored-by: Wojciech Mista <wojciech.mista@saleor.io>
Co-authored-by: Magdalena Markusik <magdalena@markusik.com>
Co-authored-by: Paweł Kucharski <pawel.kucharski@mirumee.com>
Co-authored-by: Ewa Czerniak <ewa.czerniak@saleor.io>
Co-authored-by: Dominik Żegleń <flesz3@o2.pl>
2022-01-21 14:56:26 +01:00
.circleci Bump node version 2020-06-08 17:00:39 +02:00
.github Always run critical tests (#1579) 2022-01-21 14:56:26 +01:00
.tx Use json files in translations 2020-02-13 12:54:23 +01:00
assets replaced logo with new version 2021-06-11 13:54:21 +02:00
cypress Add tests for attributes for 3.1 (#1725) 2022-01-17 11:03:52 +01:00
lint/rules Add rule fixer 2019-12-03 16:23:42 +01:00
locale Display error if no invoicing plugin is active (#1709) 2021-12-23 13:42:10 +01:00
nginx fixing 404 2019-11-04 02:21:48 +07:00
recordings/User_3768991250 Use Auth SDK (#1474) 2021-12-17 12:10:54 +01:00
scripts Store in snapshot LOCs that errored 2020-02-26 13:57:04 +01:00
src Scroll to top on main navigation routes change (#1752) 2022-01-20 14:56:55 +02:00
testUtils Use Auth SDK (#1474) 2021-12-17 12:10:54 +01:00
.codeclimate.yml Initial commit 2019-06-19 16:40:52 +02:00
.dockerignore add .dockerignore and fixing nginx conf for local deploy 2019-10-31 14:31:13 +07:00
.eslintrc.json Saleor 4437 refactor tests (#1389) 2021-09-27 12:04:21 +02:00
.gitignore Record test in cypress dashboard for 3.1 (#1748) 2022-01-13 13:59:39 +01:00
.npmrc Initial commit 2019-06-19 16:40:52 +02:00
.prettierignore Do not format type files 2019-11-21 18:46:28 +01:00
.prettierrc Add prettierrc config 2020-07-03 15:17:36 +02:00
.release-it.json Add release-it script (#1034) 2021-03-30 14:37:12 +02:00
_redirects Enable Netlify redirects 2019-11-14 13:01:45 +01:00
apollo.config.js Update apollo config 2019-08-21 15:26:24 +02:00
app.json Configure Heroku integration 2019-09-22 14:30:10 +02:00
babel.config.js Refunds (#870) 2020-12-01 14:13:05 +01:00
CHANGELOG.md Update organization name (#1484) 2021-10-11 09:53:22 +03:00
codegen.yml Click & Collect (#1268) 2021-08-27 10:10:41 +02:00
cypress.json Record test in cypress dashboard for 3.1 (#1748) 2022-01-13 13:59:39 +01:00
Dockerfile Define node requirements, ts cleanup (#1008) 2021-03-19 13:06:17 +01:00
Dockerfile.dev Define node requirements, ts cleanup (#1008) 2021-03-19 13:06:17 +01:00
eslint-local-rules.js Add local eslint rule to enforce naming styles 2019-12-03 16:09:57 +01:00
fragmentTypes.json Limit quantity per checkout (#1536) 2021-12-07 10:43:24 +01:00
LICENSE Update LICENSE 2021-06-28 15:57:24 +02:00
lighthouserc.json Add circleci config and enhance our linters (#519) 2020-05-14 11:30:32 +02:00
lws.config.js merge changes 2021-02-11 15:17:00 +01:00
package-lock.json Record test in cypress dashboard for 3.1 (#1748) 2022-01-13 13:59:39 +01:00
package.json Record test in cypress dashboard for 3.1 (#1748) 2022-01-13 13:59:39 +01:00
react-intl.d.ts Attach permission variables to all queries (#1000) 2021-03-09 09:44:09 +01:00
README.md Update organization name (#1484) 2021-10-11 09:53:22 +03:00
schema.graphql Display error if no invoicing plugin is active (#1709) 2021-12-23 13:42:10 +01:00
static.json Configure Heroku integration 2019-09-22 14:30:10 +02:00
tsconfig.json Saleor 4437 refactor tests (#1389) 2021-09-27 12:04:21 +02:00
webpack.config.js App adjustments (#1385) 2021-09-13 16:14:04 +02:00
webpack.d.ts Add PasswordCredential type (#868) 2020-11-30 11:26:51 +01:00

Saleor Dashboard

Saleor Dashboard

A GraphQL-powered, single-page dashboard application for Saleor.

Demo

See the public demo of Saleor Dashboard!

Or launch the demo on a free Heroku instance.

Deploy

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Node.js v14+
  • A running instance of Saleor.

Installing

Clone the repository:

$ git clone https://github.com/saleor/saleor-dashboard.git

Enter the project directory:

$ cd saleor-dashboard

Using stable release

To use the official stable release, checkout to a release tag:

$ git checkout 2.11.1

See the list of all releases here: https://github.com/saleor/saleor-dashboard/releases/

Using development version

If you want to use the latest development version, checkout to the main branch:

$ git checkout main

Install NPM dependencies:

$ npm i

Configuration

There following environment variables are available for configuration:

  • API_URI (required) - URI of a running instance of Saleor GraphQL API. If you are running Saleor locally with the default settings, set API_URI to: http://localhost:8000/graphql/.

  • APP_MOUNT_URI - URI at which the Dashboard app will be mounted. E.g. if you set APP_MOUNT_URI to /dashboard/, your app will be mounted at http://localhost:9000/dashboard/.

  • STATIC_URL - URL where the static files are located. E.g. if you use S3 bucket, you should set it to the bucket's URL. By default Saleor assumes you serve static files from the root of your site at http://localhost:9000/.

Development

To start the development server run:

$ npm start

Production

To build the application bundle run:

$ npm run build

Error Tracking

Saleor Dashboard is using a generic error tracking wrapper function that takes care of the most popular use cases:

  • initializing the tracker
  • capturing exceptions and (optionally) displaying the event id
  • setting basic user data (this is opt-in and disabled by default)

By default it ships with a Sentry adapter but any kind of error tracking software can be used by creating a custom adapter (using Sentry and TS types as an example).

Example:

// src/services/errorTracking/index.ts

import { CustomAdapter } from "./adapters/";

const errorTracker = ErrorTrackerFactory(CustomAdapter(config));
Usage with Sentry adapter:

Sentry is used as the default tracker so no changes in code are necessary and the configuration is done via environment variables.

The following environment variables are available:

# Required
SENTRY_DSN=

# Optional
# https://docs.sentry.io/product/cli/configuration/
SENTRY_AUTH_TOKEN=
SENTRY_ORG=
SENTRY_PROJECT=
SENTRY_URL_PREFIX=
ENVIRONMENT=

Crafted with ❤️ by Saleor Commerce