Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow staff member to receive notification about customers orders #4993

Conversation

kswiatek92
Copy link

@kswiatek92 kswiatek92 commented Nov 20, 2019

closes #4932

Pull Request Checklist

  1. Privileged views and APIs are guarded by proper permission checks.
  2. All visible strings are translated with proper context.
  3. All data-formatting is locale-aware (dates, numbers, and so on).
  4. Database queries are optimized and the number of queries is constant.
  5. Database migration files are up to date.
  6. The changes are tested.
  7. GraphQL schema and type definitions are up to date.
  8. Changes are mentioned in the changelog.

@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch from 644dbc4 to 90feccc Compare November 20, 2019 10:08
@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch 2 times, most recently from 6cba3be to 78e76a6 Compare November 20, 2019 10:19
@maarcingebala maarcingebala removed the request for review from korycins November 20, 2019 10:20
@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch from 78e76a6 to dc0c0f8 Compare November 20, 2019 10:23
saleor/graphql/account/types.py Outdated Show resolved Hide resolved
saleor/graphql/shop/types.py Outdated Show resolved Hide resolved
saleor/graphql/account/types.py Show resolved Hide resolved
saleor/graphql/shop/mutations.py Outdated Show resolved Hide resolved
saleor/graphql/shop/mutations.py Outdated Show resolved Hide resolved
saleor/order/emails.py Outdated Show resolved Hide resolved
@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch 2 times, most recently from af9fb24 to 24ba03b Compare November 20, 2019 12:42
@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch 2 times, most recently from 2dc85fb to 0a768eb Compare November 20, 2019 12:56
@IKarbowiak
Copy link
Member

Maybe some tests for StaffNotification mutations and collect_staff_data_for_email function?

@kswiatek92
Copy link
Author

Maybe some tests for StaffNotification mutations and collect_staff_data_for_email function?

i'm working on some tests :P

@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch from 0a768eb to 41d4cc3 Compare November 20, 2019 14:08
@codecov
Copy link

codecov bot commented Nov 20, 2019

Codecov Report

Merging #4993 into master will increase coverage by 0.03%.
The diff coverage is 98.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4993      +/-   ##
==========================================
+ Coverage   90.85%   90.89%   +0.03%     
==========================================
  Files         294      294              
  Lines       18170    18269      +99     
  Branches     1671     1679       +8     
==========================================
+ Hits        16508    16605      +97     
- Misses       1227     1228       +1     
- Partials      435      436       +1
Impacted Files Coverage Δ
saleor/graphql/shop/types.py 96.84% <100%> (+0.1%) ⬆️
saleor/account/models.py 89.93% <100%> (+0.39%) ⬆️
saleor/graphql/account/types.py 95.61% <100%> (+0.24%) ⬆️
saleor/order/emails.py 100% <100%> (ø) ⬆️
saleor/checkout/utils.py 83.83% <100%> (+0.02%) ⬆️
saleor/graphql/shop/schema.py 100% <100%> (ø) ⬆️
saleor/graphql/shop/mutations.py 96.2% <96.49%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a34733...348dff0. Read the comment docs.

Copy link

django-queries commented Nov 20, 2019

Here is the report for 348dff0 (kswiatek92/saleor @ receive-notification-about-customers-order)
Base comparison is 4a34733.

No differences were found. (click me)

# api.benchmark checkout
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  add billing address to checkout            	         34	         34	             20
  add shipping to checkout                   	          7	          7	              0
  checkout payment charge                    	         10	         10	              0
  complete checkout                          	          8	          8	              0
  create checkout                            	         50	         50	             24

# api.benchmark homepage
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  retrieve main menu                         	          5	          5	              0
  retrieve product list                      	          4	          4	              0
  retrieve secondary menu                    	          5	          5	              0
  retrieve shop                              	          2	          2	              0

# api.benchmark product
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  product details                            	         15	         15	              3
  retrieve product attributes                	          9	          9	              0

# api.benchmark variant
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  product variant bulk create                	         51	         51	              3
  retrieve variant list                      	         15	         15	              6

# api product sorting attributes
  test name                                  	left count 	right count	duplicate count
  -------------------------------------------	-----------	-----------	---------------
  sort product not having attribute data     	         21	         21	              0

Copy link
Member

@NyanKiyoshi NyanKiyoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

saleor/account/models.py Outdated Show resolved Hide resolved
saleor/account/models.py Outdated Show resolved Hide resolved
saleor/graphql/shop/mutations.py Outdated Show resolved Hide resolved
saleor/graphql/shop/mutations.py Outdated Show resolved Hide resolved
saleor/account/models.py Outdated Show resolved Hide resolved
saleor/graphql/account/types.py Outdated Show resolved Hide resolved
saleor/graphql/shop/mutations.py Outdated Show resolved Hide resolved
saleor/order/emails.py Outdated Show resolved Hide resolved
saleor/order/emails.py Outdated Show resolved Hide resolved
@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch from 41d4cc3 to 198ba16 Compare November 21, 2019 13:13
saleor/account/models.py Outdated Show resolved Hide resolved
saleor/account/models.py Outdated Show resolved Hide resolved
@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch from 198ba16 to 1900ad5 Compare November 21, 2019 13:28
saleor/graphql/account/types.py Outdated Show resolved Hide resolved
saleor/graphql/account/types.py Outdated Show resolved Hide resolved
saleor/graphql/account/types.py Outdated Show resolved Hide resolved
saleor/graphql/account/types.py Outdated Show resolved Hide resolved
saleor/graphql/account/types.py Outdated Show resolved Hide resolved
saleor/graphql/shop/mutations.py Outdated Show resolved Hide resolved
saleor/graphql/shop/types.py Outdated Show resolved Hide resolved
templates/templated_email/source/staff_confirm_order.mjml Outdated Show resolved Hide resolved
saleor/order/emails.py Outdated Show resolved Hide resolved
saleor/order/emails.py Outdated Show resolved Hide resolved
@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch 8 times, most recently from 8ca52b0 to 7ba8f8d Compare December 3, 2019 10:01
@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch 2 times, most recently from 6c18bd6 to c1b7243 Compare December 3, 2019 11:32
@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch 9 times, most recently from 1fbb45d to 207cb02 Compare December 3, 2019 15:50
@kswiatek92 kswiatek92 force-pushed the receive-notification-about-customers-order branch from 207cb02 to 891b03b Compare December 3, 2019 16:13
@maarcingebala maarcingebala dismissed NyanKiyoshi’s stale review December 4, 2019 13:53

Requested changes were made.

@maarcingebala maarcingebala merged commit 81383c0 into saleor:master Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to receive notification about customer's order?
6 participants