Commit Graph

74 Commits

Author SHA1 Message Date
Kasper Fabricius Kristensen
596faf2ad3 chore(dashboard): Cleanup Pricing domain (#7035)
**What**
- Adds missing translations
- Minor cleanup

**Note**
- The domain is still missing features that are supported in V1, but are currently not available in V2. The types are also all wrong, so will need to revisit after the pricing domain is revisited, types have been added, and missing features implemented.

CLOSES CORE-1901
2024-04-09 14:53:09 +00:00
Kasper Fabricius Kristensen
21be6ff7ed feat(dashboard): Secret keys domain (#7030)
* setup secret keys

* add secret keys

* fix merge
2024-04-09 15:11:32 +02:00
Oli Juhl
3882cac622 feat: Admin V2 customer group (#7000) 2024-04-09 12:32:27 +02:00
Kasper Fabricius Kristensen
0f05790ae4 feat(dashboard): Initial pricing domain (#6996)
**What**
- Sets up the initial work for Pricing domain
- Fixes Store domain

**Todo in follow up PR**
- Translations
- Add status when creating the Price List and allow updating it
- Improve DataGrid component
- Add missing functionality once backend support is added (customer_groups, region prices and update prices)

CLOSES CORE-1931
2024-04-08 18:22:53 +00:00
Oli Juhl
6cc9a5e469 feat: Categories retrieve + list API (#7009) 2024-04-08 19:26:34 +02:00
Frane Polić
9b5e025863 fix: close create form on success (#7011) 2024-04-08 16:31:42 +02:00
Stevche Radevski
fa5c9bbe8f feat: Improve how options are defined and handled for product (#7007)
* feat: Improve how options are defined and handled for product

* fix: Updating option values supports passing without id
2024-04-08 15:29:41 +02:00
Kasper Fabricius Kristensen
7b4ff1ae57 align color for draft (#7005) 2024-04-08 13:29:21 +02:00
Stevche Radevski
2a0e010f73 feat: Add variant creation and editing in the products UI (#6997) 2024-04-08 09:32:12 +02:00
Oli Juhl
4f88743591 feat: Admin V2 Customers (#6998) 2024-04-07 21:38:50 +02:00
Stevche Radevski
f65fbff535 feat: Improvements to the products details page in the admin (#6994) 2024-04-07 17:52:47 +02:00
Stevche Radevski
4d6306f57b feat: Revamp product details page and several product fixes and cleanups (#6988) 2024-04-07 15:29:37 +02:00
Oli Juhl
31b07aea3d feat: Add tax regions table (#6983) 2024-04-07 15:02:48 +02:00
Stevche Radevski
e8587e9f95 feat: Add support for defining options when creating product (#6981) 2024-04-06 18:58:53 +02:00
Oli Juhl
5724d80286 feat: Bring back API key sales channel management (#6976)
- Add API key sales channel management
- Add HTTP responses for API keys and sales channels
- Use HTTP responses in `dashboard` and remove now redundant types
2024-04-06 16:30:27 +00:00
Frane Polić
58c68f6715 feat(dashboard): Admin UI regions v2 (#6943) 2024-04-06 17:41:54 +02:00
Riqwan Thamir
5e30b8cce6 feat(dashboard): added details page for promotions + edit sliders (#6882)
* chore: added details page for promotions

* chore: add edit rules, edit details and edit campaign pages

* chore: change to type button

* chore: connection for rules

* chore: listing rule labels of multiple modules

* chore: add badge summary list

* chore: fix campaigns
2024-04-06 13:20:31 +02:00
Stevche Radevski
07fb058d96 feat: Add product routes and components to v2 in admin-next (#6958) 2024-04-06 11:59:52 +02:00
Kasper Fabricius Kristensen
8a5c6928f7 feat(dashboard): Migrate to new hooks and API client (#6963) 2024-04-05 18:27:08 +02:00
Oli Juhl
eadc5e8a79 feat: Admin V2 API keys (#6883)
Add API key management UI for V2

This PR only adds publishable API key UI. Secret API key management will come in a follow-up PR.
2024-04-05 09:55:59 +00:00
Kasper Fabricius Kristensen
e915169e11 feat(dashboard): Edit variant options + create option callback for combobox (#6920) 2024-04-05 11:40:33 +02:00
Kasper Fabricius Kristensen
849010d875 feat(dashboard): Setup workflows in V2 routes (#6939) 2024-04-04 21:27:48 +02:00
Kasper Fabricius Kristensen
880bbbd4af feat(dashboard): Add forms for edit and create product options (#6907) 2024-04-04 18:14:05 +02:00
Philip Korsholm
fd3fc1384b Feat(dashboard): admin locations v2 (#6868)
* initial create

* add list for stock locations

* add changeset

* redo changes for stock locatino module'

* add changeset

* naming

* prep for pr

* move integration tests

* fix pr feedback

* add changeset

* update changeset

* init

* undo versioning updates

* rm whitespace

* move common files to modules

* Update packages/admin-next/dashboard/src/v2-routes/locations/location-edit/location-edit.tsx

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>

* rm logs

* fields instead of expands

---------

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
2024-04-04 14:45:05 +02:00
Kasper Fabricius Kristensen
6c6e5307cf feat(dashboard): Setup V2 collections (#6935) 2024-04-04 14:06:44 +02:00
Stevche Radevski
06b2f0a8dc feat: Add some of the missing pieces in the create product form (#6918)
The changes are still partial, there is more work to be done to have everything function properly.
Also, refactored the file upload from the product media form to a separate component
2024-04-04 10:27:33 +00:00
Kasper Fabricius Kristensen
7385a67dc7 feat(dashboard): Update v2 store domain to follow conventions, and abstract some logic (#6927)
**What**
- Updates the V2 store domain.
- Abstracts some of the API requests logic into re-usable hooks

**Note**
- Partial PR as we need to add support for setting a default currency, region and location. Currently the `q` param is missing on all V2 endpoints, so we can't use our combobox component to list these options. Will be added later when that has been fixed in core.
- The PR includes a generic hook for fetching combobox data, that I added before realising that `q` is not currently supported. But keeping it as it will be useful once support is added.
2024-04-04 07:15:17 +00:00
Kasper Fabricius Kristensen
3044ecaf61 fix promotions loader (#6928) 2024-04-04 07:34:43 +02:00
Kasper Fabricius Kristensen
982fb44cde fix(dashboard): Combobox should not disable body after being closed (#6909)
**What**
- Fixes an issue where opening a Combobox inside a modal, and then closing the modal would result in the body preserving the `pointer-events: none;` style.
2024-04-02 14:31:27 +00:00
Oli Juhl
7895ff3849 feat: add sales channel management (#6761)
Add V2 sales channel management to admin

`@medusajs/medusa`
- Add `POST /admin/sales-channels/:id/products/batch/remove`
- Refactor cross-module filter middleware to comply with the latest convention

`@medusajs/admin-next`
- Add all sales channel routes
- Moves the following sales channel UI to shared components in `modules/sales-channel`:
  - sales-channel-list
  - sales-channel-edit
  - sales-channel-details
    - sales-channel-general-section
  - sales-channel-create

The sales-channel-product-section is not shared because the API in V2 will change.
The sales-channel-add-products component is not shared because the API in V2 will change.

`@medusajs/core-flows`
- Add `detachProductsFromSalesChannelsStep`
- Add `removeProductsFromSalesChannelsWorkflow`
2024-04-02 13:38:33 +00:00
Kasper Fabricius Kristensen
b2763647f7 feat(dashboard): Variant edit form (#6870)
**What**
- Adds form to edit variant details.
- If stock and inventory modules are installed we omit inputs for stock and inventory as they should be managed in a separate form in that case. (Still a bit unsure about this, but its what we have in the current admin)
2024-04-01 16:38:49 +00:00
Oli Juhl
9fdced2c27 feat: Admin V2 users domain (#6844) 2024-04-01 15:03:48 +02:00
Frane Polić
e58e81fd25 feat(dashboard): admin 3.0 order refund form (#6850) 2024-04-01 10:55:42 +02:00
Riqwan Thamir
0c0b425de7 feat(medusa-react,medusa,types,dashboard): added empty state + table for promotions list page (#6827)
what:

- adds empty state for promotions list page
- lists all promotions with pagination

<img width="1663" alt="Screenshot 2024-03-26 at 14 19 27" src="https://github.com/medusajs/medusa/assets/5105988/ed0d5c65-d003-40f5-b899-540970d892f5">


<img width="1664" alt="Screenshot 2024-03-27 at 20 46 17" src="https://github.com/medusajs/medusa/assets/5105988/4aa40f09-fe3f-4f34-af7a-f5c183254c76">
2024-03-29 11:22:42 +00:00
Oli Juhl
d97af91a8d feat(admin-next): Email password invite flow in admin 2.0 (#6821) 2024-03-29 08:05:11 +01:00
Frane Polić
9766266b97 fix(admin-next): admin v2 flag parsing and loading user data (#6843) 2024-03-27 18:18:48 +01:00
Riqwan Thamir
448a30d030 chore(dashboard): render main layout as home page for v2 (#6823)
* chore(dashboard): render main layout as home page for v2

* chore: throw an error on store not existing
2024-03-26 15:29:06 +01:00
Kasper Fabricius Kristensen
26531c5a38 feat(dashboard): Draft orders create (#6680)
**What**
- Adds Create draft order form
- Updates draft order details page to also display "custom" items.

**Note**
- Currently, the form is missing a way to input a discount code. Need to rethink this a bit, as the we can't implement the design in Figma.
- The current design is missing a way to select from a customers existing shipping addresses, we should add that to keep the features we have today.
- This PR uses `useInfiniteQuery` which does not work on our staging (due to duplicate dependencies as a result of building straight from the monorepo), so you will need to test locally.
2024-03-25 17:18:24 +00:00
Kasper Fabricius Kristensen
71efa15088 feat(dashboard): Order timeline (#6815)
**What**
- Adds the initial Timeline component.
- Not all events have been added, as it makes sense to add them with their respective RMA flows.
- Emoji picker is omitted from initial PR as it's a nice-to-have that we can add later.
2024-03-25 14:50:27 +00:00
Kasper Fabricius Kristensen
247ca3c3fa feat(dashboard, ui): Product image modals (#6779)
**What**
- Adds Media modals gallery and edit mode
- Fixes an issue with Hint from medusajs/ui.
2024-03-25 11:22:30 +00:00
Kasper Fabricius Kristensen
1b2e0b4031 feat(dashboard): Price List configurations section (#6663)
**What**
- Adds section for displaying price list configurations.

Closes CORE-1857
2024-03-25 11:07:47 +00:00
Frane Polić
2ae8eaa779 feat(dashboard) admin 3.0 return creation (#6713)
**What**
- request return flow

Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
2024-03-22 16:57:18 +00:00
Oli Juhl
8155e2cfad feat: Init. v2 implementation in admin (#6715) 2024-03-20 14:28:28 +01:00
Frane Polić
189b03c485 feat(dashboard) admin 3.0 order edit (#6665)
**What**
- added Order Edit creation flow

**NOTES**
- since the state is managed on the server upon changing input / adding items a request is fired to update the edit
- on save we only confirm the edit

---

**TODO**
- [x] item removal functionality

---

https://github.com/medusajs/medusa/assets/16856471/01aa85ea-1fb1-4dff-9cf4-d8d79029c2cc
2024-03-20 07:54:22 +00:00
Frane Polić
a1b4aff127 feat(dashboard): manage discounts conditions (#6620)
**What**
- forms for managing discount conditions

---

https://github.com/medusajs/medusa/assets/16856471/bb0b3fe8-fa60-479b-bc42-6db9d422bcdf





Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
2024-03-15 11:56:23 +00:00
Kasper Fabricius Kristensen
c3f26a6826 feat(dashboard,medusa): Draft order detail (#6703)
**What**
- Adds draft order details page
- Adds Shipping and Billing address forms to both draft order and order pages
- Adds Email form to both draft order and order pages
- Adds transfer ownership form to draft order, order and customer pages
- Update Combobox component allowing it to work with async data (`useInfiniteQuery`)

**@medusajs/medusa**
- Include country as a default relation of draft order addresses
2024-03-15 10:29:59 +00:00
Kasper Fabricius Kristensen
c384ede3b1 feat(dashboard): Setup parallel V2 routes (#6691)
**What**
- Moves all current route definitions to `v1.tsx`
- Creates a new `v2.tsx` file for future V2 routes.
- Updates RouteProvider to serve V1 or V2 routes based on if `MEDUSA_V2` is set.

**How to use it**
When working on V2 domains you should set `MEDUSA_V2=true` in `/packages/admin-next/dashboard/.env`. We can't use the Feature Flag in the Medusa project since there are breaking changes in the `/admin/store` endpoint between the two versions, so it needs to be managed manually.

**For people implementing V2 domains**
To add a new route you should:

- Add the route component in `/v2-routes`
- Define which path will render it in `v2.tsx`.

I would prefer that we don't try to implement a lot of conditional code that will make the codebase unnecessarily complex. So if I was to implement the V2 login page, I would copy/past the v1 login route into `v2-routes`, make the required changes, eg. replace `useAdminLogin` with `useAdminCustomPost(...)`, instead of trying to force the current V1 Login page to work with both APIs.

There will hopefully be a lot of components/sections from each domain that is re-usable between versions. As an example if you are working on the Product details page for V2 you might want to reuse the `product-general-section.tsx` file, as it works without having to make any modifications. In that case I propose that we create a `modules/product` folder and move the component in there which we can them import into both the v1 and v2 version of the route.
2024-03-14 18:05:44 +00:00
Shahed Nasser
480b4744af fix(dashboard): fixed some strings (#6686)
Fixed some strings in the admin dashboard.
2024-03-14 15:43:14 +00:00
Kasper Fabricius Kristensen
78e5ec459a feat(dashboard,medusa): Draft order list page (#6658)
**What**
- (dashboard) Adds list page for Draft Order domain
- (medusa) Adds the ability to filter draft orders
2024-03-11 13:22:35 +00:00
Kasper Fabricius Kristensen
e124762873 feat(medusa,dahsboard): Initial work on pricing domain (#6633)
**What**
- Initial work on pricing domain.
- List page
- Details page
- Partial edit form
- Fixes admin/price-lists/:id/products endpoint to allow filtering products by multiple ids.

**Note**
Pushing this now as the current design need a bit of tweaking so we display all relevant data to users. Future PR will include completed Edit moda, Create modal, Edit prices modal and Add prices modal.
2024-03-11 09:56:41 +00:00