Commit Graph

68 Commits

Author SHA1 Message Date
Derek Wene 89472b7d88 fix(medusa): order tax_rate type (#879)
* fix(order): tax_rate column should be numeric, not integer, since region.tax_rate uses numeric

* chore: cleanup

* fix(tax_rate): use REAL database numeric type for tax_rate column on order and region
2021-12-06 09:58:04 +01:00
zakariaelas 7cdd628997 merge develop and resolve conflicts 2021-10-14 15:44:58 +01:00
zakariaelas 3d088c351b fix: more adjustments
add: composite unique constraint for shipping_option_id and cart_id
fix: fetchCartOptions to format custom shipping options like normal shipping options
fix: addShippingMethod should throw when custom shipping options is not empty and no optionId corresponds to custom shipping options
2021-10-07 14:54:05 +01:00
zakariaelas 52be911e50 fix: adjustments based on feedback
rename RMAShippingOption to CustomShippingOption
update models and relations
update unit and integration tests
update services
2021-10-06 14:17:36 +01:00
Kasper Fabricius Kristensen 22f3f2af93 fix: shipping option updates (#426)
* fix to remove req

* tested fix
2021-10-01 08:18:56 +02:00
zakariaelas 632ad17e3f fix: merge conflicts 2021-09-30 20:29:58 +01:00
zakariaelas 77ee0bf186 feat: rma shipping option + unit tests 2021-09-30 14:52:34 +01:00
pKorsholm 9b64828ec3 Feat:discount expiration date (#403)
* discount expiration validation and testing

* integration testing

* double quotes

* add iso8601 package

* api testing

* add joi validation of start and end dates as well as valid_duration

* valid_duration column

* service testing

* discount validation in services

* integration test with invalid date interval

* include valid_duration when fetching a discount

* rename variable for clarity

* add test for dynamic discount with expiration date

* remove debug code

* adjust tests to reflect valid_duration being included in default fields

* additional discount update validation

* fixed failing test

* set ends_at on dynamic discount creation

* discount integration tests

* removed unused console.log

* removed validation of dynamic discounts by duration and added ends_at to dynamic discount creation

* integration tests for dynamic discount with and without duration

* optional valid duration for dynamic discounts

* allow nullable dynamic discount durations

* expect assertions

* fix unit test after change to dynamic discounts without duration

* change to date instead of string

* add assertions

* error handling

* addressed feedback
2021-09-30 12:13:59 +02:00
pKorsholm 42cdfde6d9 Feat/nested return reasons (#418)
* api endpoints for nested return_reasons

* add nested return reasons to database

* add parent reason to update

* integration tests

* add children relation

* integration tests for nested returns and failing doubly nesting returns

* add delete-route and nested relations

* delete return reason route

* doubly nested return reason creation check and deletion

* nested return reasons migration

* list only parent reasons

* removed null filter

* remove empty migration

* add return reason filter to get list of categories with children

* removed console log

* corrected delete route

* return reason testing

* return reasons query

* listREasonsFromIDs

* create return testing

* listReasonsFromIds

* return reason tests

* failing if returnreason has child on return

* integration tests

* cascading deletes on return reasons

* more elegant checking for children of return reasons when creating a return

* remove console.log

* pr adjust

Co-authored-by: Philip Korsholm <phko@MacBook-Pro.localdomain>
2021-09-29 09:22:09 +02:00
Sebastian Mateos Nicolajsen 897ccf475a Feat/note on order (#399)
* added NoteService and related endpoints && tests

* removed snapshots

* corrected error in service

* removed snapshot

* added the ability to note down author using a string

* updated model for note

* refactored to access logged in user

* added other user id option

* removed snapshot

* updated according to feedback

* removed snapshots

* reintroduced snapshots

* updated to snake case

* removed try catch from use-db
2021-09-22 15:19:35 +02:00
Kasper Fabricius Kristensen a82332da3e feat: add product status (#400)
* added statuses to product + unit test for updating status

* add update to product model

* added integration tests

* added integration test to validate that updating status to null results in invalid_data error

* removed comment

* update GET /store/products integration test

* fixed unit test with IdMap

* changed dbehaviour on invalid status input on admin list products

* updated migration to add status = published on all existing products + added integration test on GET /admin/products when status null is provided

* made requested changes to migration and GET /store/products

* fixed test

* made requested changes to migration
2021-09-21 11:22:17 +02:00
Oliver Windall Juhl 00ab03f3a2 feat: Allow backorder on swaps (#404) 2021-09-19 15:33:43 +02:00
Oliver Windall Juhl 27150959ff fix: Ensure uniqueness for products, variants, collections and discounts (#382) 2021-09-10 16:03:44 +02:00
Sebastian Mateos Nicolajsen cf66f97758 feat: update and cancel swaps, claims, and returns (#310) 2021-09-10 13:57:34 +02:00
pKorsholm 1331a7d4ce rename migraiton 2021-09-09 09:23:38 +02:00
pKorsholm 8e6bd6c97e nullable variant_rank with defaulvalue of 0 excluded from select queries in database 2021-09-08 15:07:22 +02:00
pKorsholm 0c47c78c08 change variant column 'rank' to 'variant_rank' 2021-09-06 13:29:24 +02:00
olivermrbl 1a87a463b4 adds money amount migration 2021-09-05 21:39:00 +02:00
olivermrbl 8fdfc87049 integration tests passing 2021-09-05 21:34:13 +02:00
Oliver Windall Juhl 6053c4a8dd feat: Add discountable flag to product (#329) 2021-08-05 10:40:12 +02:00
--list 92710eb1de Merge branch 'develop' into feat/disabling-of-notification 2021-07-02 12:11:45 +02:00
Oliver Windall Juhl 6358f8fc75 fix(medusa): Resolve issue with soft-delete and unique indexes in DB (#296) 2021-07-01 14:59:44 +02:00
--list e86f4656a9 testing 2021-06-28 12:42:26 +02:00
--list f0f5d175da Merge branch 'develop' into feat/disabling-of-notification 2021-06-24 08:51:45 +02:00
Sebastian Rindom 5829550517 fix: lint 2021-06-21 17:13:42 +02:00
Sebastian Rindom c88c407096 fix: giftcard-order relation 2021-06-21 17:10:50 +02:00
--list 0f2fe26b0e properly removed all merge conflicts 2021-06-17 08:51:57 +02:00
--list 99c95c8bfb fixed merge conflicts 2021-06-17 08:37:54 +02:00
--list 24a8b242b2 added draft-cart no_notification element to allow passing this to orders as admin 2021-06-15 17:29:42 +02:00
--list 2934acab67 trimmed migration 2021-06-10 13:14:42 +02:00
--list 1df4bb5086 removed wrong migration 2021-06-10 13:14:08 +02:00
--list b8833055b2 began impl. of no_notification 2021-06-10 13:14:08 +02:00
--list f34474957e added no_notification to services and api endpoints 2021-06-10 13:09:33 +02:00
--list 32c212c193 removed wrong migration 2021-06-10 13:05:00 +02:00
--list 5fd1993139 added no_notification to services and api endpoints 2021-06-10 13:05:00 +02:00
--list 4d560a5045 removed not working migration 2021-06-10 13:05:00 +02:00
--list bc3fc2188c began impl. of no_notification 2021-06-10 13:05:00 +02:00
--list 9c3035b5d5 trimmed migration 2021-06-09 11:54:12 +02:00
--list 61a8f53a79 removed wrong migration 2021-06-09 10:54:42 +02:00
--list 26bfe37806 solved merge conflict 2021-06-09 10:26:40 +02:00
--list b6b24e1c5b added no_notification to services and api endpoints 2021-06-09 10:20:38 +02:00
--list 29ffae3b6b removed not working migration 2021-06-08 16:01:03 +02:00
--list ad7825ab16 began impl. of no_notification 2021-06-08 16:01:03 +02:00
Sebastian Rindom 3d16a24a2a Merge branch 'develop' into feat/draft-orders 2021-06-08 15:48:17 +02:00
olivermrbl 71c995ecfb completed_at allow null 2021-06-08 08:31:51 +02:00
olivermrbl c8b134c488 merges migration files 2021-06-08 08:24:00 +02:00
olivermrbl c0f2d629ab PR Review fixes 2021-06-07 15:23:41 +02:00
--list b47be51d16 began impl. of no_notification 2021-06-03 12:07:03 +02:00
olivermrbl e3343f74a7 fix merge conflicts from develop 2021-05-25 15:44:26 +02:00
Sebastian Rindom bbd2f02d54 fix: setup to allow login to Medusa Cloud 2021-04-22 18:44:55 +02:00