Commit Graph

342 Commits

Author SHA1 Message Date
Frane Polić
c9e0ba72da fix(dashboard): receive return form (#8955) 2024-09-03 09:22:51 +02:00
Frane Polić
6652db45ef feat(dashboard): allow custom shopping prices for claims/exchanges (#8912)
**What**
- add editing custom shipping price for claims and exchanges

---

CLOSES CC-369
2024-09-03 07:17:24 +00:00
Kasper Fabricius Kristensen
c6ff9efdea fix(dashboard,admin-shared): Fixes to inventory page (#8941)
**What**
- Adds qty column to reservations table.
- Adds missing injections zones
- Fixes layout on long description field.

Resolves CC-121
2024-09-02 17:38:56 +00:00
Kasper Fabricius Kristensen
d88e6474e9 fix(dashboard): Product create price columns race condition (#8943) 2024-09-02 18:56:05 +02:00
Adrien de Peretti
479e712c17 fix(core-flows): Handle variant creation duplicate inventory item ids (#8937)
* fix(core-flows): Handle variant creation duplicate inventory item ids

* disabled already selected options

* address feedback

* fix tests
2024-09-02 18:36:42 +02:00
Frane Polić
b5ec6c9003 fix(dashboard): format currency sign (#8936)
**What**
- change `formatCurrency` admin util to show sign only for negative numbers

---

FIXES CC-335
2024-09-02 11:57:45 +00:00
Frane Polić
56ceeeb4c7 fix(dashboard): product option delete message (#8934)
FIXES CC-408
2024-09-02 11:56:56 +00:00
Riqwan Thamir
25367734c7 fix(dashboard): fix campaign end date (#8935)
what:

- scopes the conditional to the right date attribute

<img width="1027" alt="Screenshot 2024-09-02 at 11 47 09" src="https://github.com/user-attachments/assets/87048b93-e118-4548-80ee-2564bc2e56e5">

RESOLVES CC-68
2024-09-02 09:59:24 +00:00
Kasper Fabricius Kristensen
3c2fa8cdad fix(dashboard): Fix copy invite link (#8933)
* fix invite url

* use window location instead of backend url
2024-09-02 11:40:18 +02:00
Frane Polić
dbb10ff051 feat(dashboard): order edits in timeline (#8899)
**What**
- add order edit confirmed/created events in the timeline
- add order change endpoint clients
- panel for active edit and pending edit
- few fixes around the edit domain
2024-09-01 07:49:14 +00:00
Oli Juhl
4350fe5368 chore: Remove @medusajs/medusa usage + local types from dashboard (#8883)
Closes CC-403
2024-08-30 15:37:44 +00:00
Frane Polić
48d4a97ad2 fix(dashboard): rma shipping floats (#8892) 2024-08-30 09:31:28 +00:00
Oli Juhl
e360a495b7 chore: Replace Error with FetchError (#8885) 2024-08-30 11:08:36 +02:00
Shahed Nasser
0ee5c2d501 fix(dashboard, js-sdk, types, medusa): separate between delete response with and without parent (#8852)
- Separate the previous `DeleteResponse` to `DeleteResponse` and `DeleteResponseWithParent`, as not every API route's delete response returns a parent. This ensures more accurate types shown in OAS / documentation.
- Use `DeleteResponse` or `DeleteResponseWithParent` in response API routes based on what they return
- Remove direct usage of `DeleteResponse` in API route, and instead create a type in the `type` package specific for the route / domain.
- Use the new types in the `js-sdk` and `dashboard`.
2024-08-30 07:15:02 +00:00
Oli Juhl
e0cb5ff0aa fix(dashboard): Fetch tags + types in product forms (#8887) 2024-08-30 08:35:46 +02:00
Frane Polić
f2496ef783 feat(dashboard): refactor dismissed quantity (#8842)
**What**
- refactor Receive return flow to use dismissed quantity instead of written off quantity 
- fix a few more edge cases

---

FIXES CC-392
2024-08-29 16:47:07 +00:00
Oli Juhl
9cf1a5d709 chore: Remove last trace of client in dashboard (#8873) 2024-08-29 17:48:01 +02:00
Riqwan Thamir
2a6c6fe590 feat(dashboard,types): split damaged activity from received (#8859)
what:

- split damaged activity from received
- adds a popover to view return details

<img width="1661" alt="Screenshot 2024-08-28 at 23 23 10" src="https://github.com/user-attachments/assets/064e982c-f850-452d-a60d-e5c267d0075a">

RESOLVES CC-363
2024-08-29 14:04:00 +00:00
Oli Juhl
00bd9271e3 chore: Workflow execution JS-SDK (#8851) 2024-08-29 11:22:43 +00:00
Frane Polić
e396c01260 fix(dashboard): RMAs shipping pricing (#8848)
* wip: allow unsetting price

* fix: use non return shipping for outbound

* fix: claims shipping

* fix: refactor

* fix: checks

* feat: polish
2024-08-29 11:54:29 +02:00
Oli Juhl
e652d03b98 chore: Replace reservation customer group client with JS-SDK + clean up (#8857) 2024-08-29 11:51:23 +02:00
Kasper Fabricius Kristensen
16d8fb1d20 fix(dashboard): Pass query params to list SC request (#8863)
Resolves CC-331
2024-08-29 08:35:39 +00:00
Kasper Fabricius Kristensen
b8572165cb feat(dashboard): DataGrid improvements [4/4] (#8798)
**What**
- Changes cell state strategy from tracking from lazy to eager. This has required some changes to the API of the DataGrid component, and createDataGridColumnHelper function.
- Displays error messages in both affected cells and their rows. The row indicator also provides an option to quickly jump to an error.
- Allows the user to hide all rows and columns that don't have errors, to help quickly get an overview of the errors in a large grid.
- The first column of a DataGrid is now pinned, making it easier for a user to tell which entity they are editing.
- Fixes and improvements to column visibility menu.
- Adds a shortcuts modal that explains the different available keyboard commands.
- Updates `@tanstack/react-table` to the latest version.

Resolves CC-269
2024-08-28 19:06:38 +00:00
Frane Polić
d8fdf4d0b2 fix(dashboard): active rma z-index (#8854) 2024-08-28 15:54:01 +00:00
Frane Polić
6ea5a15762 fix(dashboard): active RMA section border (#8849)
**What**
- fix border around active RMA section on larger screens

**Prev**
![Screenshot 2024-08-28 at 14 36 11](https://github.com/user-attachments/assets/89f2dba9-3d84-4b32-a44c-44b32fb605fb)

**Now**
![Screenshot 2024-08-28 at 14 35 23](https://github.com/user-attachments/assets/6e96acfd-8916-456a-bdeb-9485d491f22f)
2024-08-28 15:20:56 +00:00
Oli Juhl
37b7592fba chore: Remove unused clients in admin + clean up js-sdk (#8839)
* feat(js-sdk): Add API key

* chore: Remove unused clients in admin + clean up js-sdk

* fix sales channel hooks
2024-08-28 15:43:55 +02:00
Shahed Nasser
61e7b2eb24 fix(admin-next,types): fix some http type names (#8836) 2024-08-28 15:43:54 +03:00
Riqwan Thamir
8fbfb1445d fix(dashboard): align items inside quick view popover (#8847)
* fix(dashboard): align items inside quick view popover

* chore: remove unwanted w-* classes
2024-08-28 14:37:35 +02:00
Oli Juhl
dbe931ab00 feat(js-sdk): Add API key (#8838)
* feat(js-sdk): Add API key

* address PR comments

* Allow params to create + update
2024-08-28 13:07:06 +02:00
Riqwan Thamir
c72b4847b9 fix(dashboard,js-sdk): fixes from rma flows testing (#8826) 2024-08-28 10:59:36 +02:00
Frane Polić
e0a3b8fc2e feat(dashboard): summary shipping breakdown (#8779)
**What**
- display a shipping costs breakdown in the order summary
- allow to receive only non canceled returns
- show how many items is actually received with return in the timeline

**Question**
- should we display the shipping total somewhere as well

---

CLOSES CC-356
2024-08-28 06:44:22 +00:00
Frane Polić
9197bdd77b feat(dashboard): cancel return request (#8761)
* wip: cancel return request

* fix: refactor

* feat: correct endpoint, add hook, fix types

* feat: add prompt
2024-08-27 13:57:12 +02:00
Oli Juhl
c11ef01c15 feat: Separate registration from authentication in auth domain (#8683)
* wip

* feat: Introduce register

* fix: user command

* fix: Invite HTTP tests

* fix: Auth tests

* fix: Invite modules tests
2024-08-27 13:44:52 +02:00
Frane Polić
979f7704ee fix(dashboard): summary section return fixes (#8770)
**What**
- open receive Return if only one exists
- fix double dashed divider

---

FIXES CC-287 CC-361
2024-08-27 06:53:13 +00:00
Riqwan Thamir
531285c1e9 feat(dashboard,types): add active order change panel - claims, exchanges & returns (#8738)
* feat(dashboard,types): add active order change panel - claims, exchanges & returns

* Apply suggestions from code review
2024-08-23 13:24:38 +02:00
Riqwan Thamir
59599ac237 feat(core-flows,dashboard): adds item validations for claims, returns and exchanges (#8735)
what:

- adds item validations for claims, returns and exchanges
- prevents autofocus on item add
- reset item quantity when error
2024-08-23 09:30:27 +00:00
Frane Polić
49353f8c3c feat(dashboard): order edit UI (#8700)
**What**
- order edit create flow
- active order edit panel

**Note**
- basic implementation of the flow, edge cases from the design such as fulfilled quantities validation will be added in a followup
2024-08-23 06:42:06 +00:00
Riqwan Thamir
02c6574e01 fix(admin-next,types): fixes order page from breaking in admin server (#8730) 2024-08-23 08:07:04 +02:00
Riqwan Thamir
4219674ead fix: enable next actions bar when refund is available (#8719) 2024-08-22 10:02:43 +00:00
Riqwan Thamir
a5707fd3bc feat(dashboard): add activities for order - claim, exchange, payment (#8702)
what:

- add activities for order - claim, exchange, payment

<img width="382" alt="Screenshot 2024-08-21 at 16 12 31" src="https://github.com/user-attachments/assets/56627d63-69b4-4b9c-b9db-c670fe49bfc9">


RESOLVES CC-344
2024-08-21 14:38:18 +00:00
Riqwan Thamir
0da9445d80 fix(dashboard): bust order preview cache to reset fulfilled quantity (#8687) 2024-08-21 16:23:49 +02:00
Riqwan Thamir
a7d03ec562 feat(dashboard,core-flows): ability to refund payment post RMA flow (#8685) 2024-08-21 09:58:09 +02:00
Riqwan Thamir
8bd284779e feat(dashboard,core-flows,js-sdk,types): ability to mark payment as paid (#8679)
* feat(core-flows): create or update payment collections in RMA flows

* chore: change ui to pick payment link from unpaid payment collection

* Apply suggestions from code review

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>

* chore: fix mathbn

* feat(dashboard,core-flows,js-sdk,types): ability to mark payment as paid

* chore: add captured bt

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-08-20 22:58:28 +02:00
Riqwan Thamir
430d9a38c4 feat(core-flows): create or update payment collections in RMA flows (#8676)
* feat(core-flows): create or update payment collections in RMA flows

* chore: change ui to pick payment link from unpaid payment collection

* Apply suggestions from code review

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>

* chore: fix mathbn

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-08-20 18:40:58 +02:00
Kasper Fabricius Kristensen
3706bf51af feat(dashboard): Wrap each route in an ErrorBoundary (#8674)
**What**
- Updates the copy of the different error types
- Wraps each route (+ custom routes) in an ErrorBoundary to preserve app layout on error (sidebar and topbar)

![Skærmbillede 2024-08-20 kl  12 35 53](https://github.com/user-attachments/assets/0c589fc4-b279-4b66-9d66-1b99a7406696)

**Note**
If the user goes to a route that does not exist at all, e.g. `/some-weird-url`, then we have no way of knowing if the user is inside of a context where we can render the sidebar and topbar (as they require the user to be authenticated). So in this case we still show an ErrorBoundary where the two aren't included (see second picture), and include a button that takes the user to "/", which depending on whether the user is logged in will take them to "/login" or "/orders".

![image](https://github.com/user-attachments/assets/08dde48a-3bb8-41a1-9a0e-2c41716baf0b)

Resolves CC-248
2024-08-20 13:09:30 +00:00
Kasper Fabricius Kristensen
cfdd056d70 fix(dashboard): Fix minor issues with Reservations and Inventroy Create forms (#8657) 2024-08-20 13:31:31 +02:00
Riqwan Thamir
fa44e3f5a8 feat(dashboard,core-flows,js-sdk,types,link-modules,payment): ability to copy payment link (#8630)
what: 

- enables a button to create a payment link when a payment delta is present
- api to delete order payment collection
- adds a pending amount to payment collections

Note: Not the happiest with the decision on when to create a payment collection and when not to. The code should programatically create or delete payment collections currently to generate the right collection for the payment delta. Adding a more specific flow to create and manage a payment collection will help reduce this burden from the code path and onto CX/merchant.

Another issue I found is that the payment collection status doesn't get updated when payment is complete as it still gets stuck to "authorized" state

https://github.com/user-attachments/assets/037a10f9-3621-43c2-94ba-1ada4b0a041b
2024-08-20 10:30:17 +00:00
Kasper Fabricius Kristensen
a66bd3bd6b fix(dashboard): Use proper heading size (#8658) 2024-08-19 14:56:26 +02:00
Kasper Fabricius Kristensen
894db4a150 feat(dashboard): Hitting escape restores previous value (#8654)
* feat(dashboard): Hitting escape restores previous value

* update lock
2024-08-19 14:02:30 +02:00
Frane Polić
d571d564c3 fix(dashboard): disable RMAs if there is no shipped items (#8652) 2024-08-19 12:30:56 +02:00