Decrease visibility of NewItem(Class)Form*

This commit is contained in:
Simon Bruder 2024-07-21 18:23:08 +02:00
parent f4202a1ed5
commit b7adf03dcc
Signed by: simon
GPG key ID: 347FF8699CDA0776
2 changed files with 22 additions and 22 deletions

View file

@ -24,24 +24,24 @@ fn default_quantity() -> usize {
}
#[derive(Debug, Deserialize)]
pub struct NewItemForm {
struct NewItemForm {
#[serde(default = "default_quantity")]
pub quantity: usize,
pub name: Option<String>,
pub parent: Option<Uuid>,
pub class: Uuid,
pub original_packaging: Option<Uuid>,
pub description: String,
quantity: usize,
name: Option<String>,
parent: Option<Uuid>,
class: Uuid,
original_packaging: Option<Uuid>,
description: String,
}
#[derive(Debug, Deserialize)]
pub struct NewItemFormPrefilled {
pub quantity: Option<usize>,
pub name: Option<String>,
pub parent: Option<Uuid>,
pub class: Option<Uuid>,
pub original_packaging: Option<Uuid>,
pub description: Option<String>,
struct NewItemFormPrefilled {
quantity: Option<usize>,
name: Option<String>,
parent: Option<Uuid>,
class: Option<Uuid>,
original_packaging: Option<Uuid>,
description: Option<String>,
}
#[get("/items/add")]

View file

@ -20,17 +20,17 @@ pub fn config(cfg: &mut web::ServiceConfig) {
}
#[derive(Debug, Deserialize)]
pub struct NewItemClassForm {
pub name: String,
pub parent: Option<Uuid>,
pub description: String,
struct NewItemClassForm {
name: String,
parent: Option<Uuid>,
description: String,
}
#[derive(Debug, Deserialize)]
pub struct NewItemClassFormPrefilled {
pub name: Option<String>,
pub parent: Option<Uuid>,
pub description: Option<String>,
struct NewItemClassFormPrefilled {
name: Option<String>,
parent: Option<Uuid>,
description: Option<String>,
}
#[get("/item-classes/add")]