Fixed bug causing duplication on locations each time projects were updated

This commit is contained in:
Franklin 2023-04-27 12:51:54 -04:00
parent 16b2b9ff6c
commit d2b60a904c
1 changed files with 3 additions and 3 deletions

View File

@ -197,8 +197,8 @@ pub fn generate_fields_for_project(props: &ProjectFieldsProps) -> Html {
wasm_bindgen_futures::spawn_local(async move {
let location = match get_location_with_city_and_district(
(*location_city_handle).clone(),
(*location_district_handle).clone(),
(*location_city_handle).clone().trim().to_string(),
(*location_district_handle).clone().trim().to_string(),
)
.await
{
@ -329,7 +329,7 @@ pub fn generate_fields_for_project(props: &ProjectFieldsProps) -> Html {
}
}
<TextField label={"Ciudad"} value={location_city} required={true} onchange={ontype_cb.clone()}/>
<TextField label={"Distrito"} value={location_district} required={true} onchange={ontype_cb.clone()} />
<TextField label={"Sector"} value={location_district} required={true} onchange={ontype_cb.clone()} />
<MediaPicker value={media} onchange={ontype_cb.clone()} item={jl_types::dto::item::Item::Project}/>
{if (*agent).clone().is_none() {
match props.edittype.clone() {