Ticket now shows who submitted it
This commit is contained in:
@@ -28,6 +28,8 @@ pub struct Ticket {
|
||||
pub status: String,
|
||||
pub date: chrono::NaiveDateTime,
|
||||
pub user_id: i16,
|
||||
pub user_first_name: String,
|
||||
pub user_last_name: String,
|
||||
}
|
||||
|
||||
#[derive(Properties, PartialEq)]
|
||||
@@ -73,6 +75,8 @@ pub fn submit_ticket_component() -> Html {
|
||||
};
|
||||
|
||||
let request = Request::post("/api/tickets/create")
|
||||
.header("Content-Type", "application/json")
|
||||
.credentials(web_sys::RequestCredentials::Include)
|
||||
.json(&payload)
|
||||
.expect("Failed to build request");
|
||||
|
||||
@@ -308,6 +312,7 @@ pub fn ticket_by_id_component(props: &TicketProps) -> Html {
|
||||
"Archived" => "Archiviert",
|
||||
_ => "Ungültiger Status"
|
||||
}}</p>
|
||||
<p><strong>{ "Name: "}</strong>{ format!{"{} {}", t.user_first_name, t.user_last_name } }</p>
|
||||
|
||||
<form {onsubmit}>
|
||||
<label>{ "Status ändern" }
|
||||
|
||||
Reference in New Issue
Block a user