diff --git a/src/pages/admin/edit.rs b/src/pages/admin/edit.rs
index 35aba56..72c6e53 100644
--- a/src/pages/admin/edit.rs
+++ b/src/pages/admin/edit.rs
@@ -1,38 +1,17 @@
use std::{fmt::Display, str::FromStr};
-use chrono::NaiveTime;
-use jl_types::{
- domain::{
- agent::Agent, media::MediaList, project_condition::ProjectCondition,
- project_state::ProjectState, project_type::ProjectType, unit::Unit,
- },
- dto::{
- listing::Listing,
- payloads::{
- location::NewLocationPayload,
- project::{NewProjectPayload, UpdateProjectPayload},
- },
- },
-};
use uuid::Uuid;
use yew::prelude::*;
use yew_router::prelude::use_navigator;
use crate::{
api::backend::{
- create_location, create_new_project, get_all_agents, get_location_with_city_and_district,
- get_project_listing, update_project,
+ get_project_listing,
},
components::{
admin_nav_bar::AdminNavigationBar,
- datepicker::DatePicker,
- dropdown::DropDown,
- media_picker::MediaPicker,
- new_widget::NewThingWidget,
- textfield::{TextField, TextFieldType},
},
- pages::admin::units::AdminUnits,
- routes::main_router::Route,
+ pages::admin::{fields::project::ProjectFields},
};
/// All of the editing actions of the admin panel will lead to here. This should take an id of anything. A unit, a project, an agent. And its corresponding ID.
@@ -114,393 +93,6 @@ pub struct AdminEditPageProps {
pub edit_type: EditType,
}
-#[derive(Properties, PartialEq, Clone)]
-pub struct ProjectFieldsProps {
- pub listing: Option
,
- pub edittype: EditType,
-}
-
-#[allow(unused)]
-#[function_component(ProjectFields)]
-pub fn generate_fields_for_project(props: &ProjectFieldsProps) -> Html {
- let navigator = use_navigator().unwrap();
- let user_typed = use_state(|| false);
- let listing_opt = props.listing.clone();
-
- let location_city = use_state_eq(|| String::new());
- let location_district = use_state_eq(|| String::new());
- let agent: UseStateHandle