-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/4 add put endpoint to update a ticket (#29)
**Refactoring:** * Restructured NewTicketForm.tsx * Renamed StatusChip to TicketStatusChip * Added ApiRequests util for uniformity * Add utility class for validation * Renamed NewTicketForm to TicketForm and added component TicketCardsGrid * Renamed type ApiResponseStatusSnackbar to SnackbarStatus * Renamed "openDrawer" and "setOpenDrawer" to "sidepanelStatus" and "setSidepanelStatus" * Changed sidePanelStatus from boolean to new SidePanelStatus type * Refactored SidePanelStatus.ts **Enhancement** * Add functionality, clicking on ticket card opens sidepanel with ticket title and description * Add put endpoint * Add validation, tests and custom exception (for put endpoint) * Added update functionality to frontend * Renamed `NewTicket` and `UpdateTicket` to `...DTO`
- Loading branch information
1 parent
d79b4f9
commit b7b127d
Showing
32 changed files
with
778 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
backend/src/main/java/com/github/jonashonecker/backend/ticket/domain/UpdateTicketDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.github.jonashonecker.backend.ticket.domain; | ||
|
||
import jakarta.validation.constraints.NotBlank; | ||
|
||
public record UpdateTicketDTO( | ||
@NotBlank(message = "Id must not be empty") | ||
String id, | ||
@NotBlank(message = "Title must not be empty") | ||
String title, | ||
@NotBlank(message = "Description must not be empty") | ||
String description | ||
) { | ||
} |
9 changes: 9 additions & 0 deletions
9
...rc/main/java/com/github/jonashonecker/backend/ticket/exception/NoSuchTicketException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.github.jonashonecker.backend.ticket.exception; | ||
|
||
import java.util.NoSuchElementException; | ||
|
||
public class NoSuchTicketException extends NoSuchElementException { | ||
public NoSuchTicketException(String message) { | ||
super(message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.