From 1d4cf45a923927bfcaac9ca051cb25da0a3b8bc6 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Mon, 11 Oct 2021 22:48:34 -0400 Subject: [PATCH] fix issue with corp export popup --- src/Corporation/ui/ExpandIndustryTab.tsx | 18 ++++++++++++++---- src/Corporation/ui/ExpandNewCity.tsx | 13 +++++++++---- src/Corporation/ui/ExportModal.tsx | 4 +++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/Corporation/ui/ExpandIndustryTab.tsx b/src/Corporation/ui/ExpandIndustryTab.tsx index dccee99c0..060667b36 100644 --- a/src/Corporation/ui/ExpandIndustryTab.tsx +++ b/src/Corporation/ui/ExpandIndustryTab.tsx @@ -80,10 +80,20 @@ export function ExpandIndustryTab(props: IProps): React.ReactElement { Division name: - - + + Expand + + ), + }} + /> ); diff --git a/src/Corporation/ui/ExpandNewCity.tsx b/src/Corporation/ui/ExpandNewCity.tsx index 6fa75ce34..2c0ce2f5e 100644 --- a/src/Corporation/ui/ExpandNewCity.tsx +++ b/src/Corporation/ui/ExpandNewCity.tsx @@ -43,16 +43,21 @@ export function ExpandNewCity(props: IProps): React.ReactElement { Would you like to expand into a new city by opening an office? This would cost{" "} - + Confirm + + } + value={city} + onChange={onCityChange} + > {possibleCities.map((cityName: string) => ( {cityName} ))} - ); } diff --git a/src/Corporation/ui/ExportModal.tsx b/src/Corporation/ui/ExportModal.tsx index 14f7a5fbe..54460583c 100644 --- a/src/Corporation/ui/ExportModal.tsx +++ b/src/Corporation/ui/ExportModal.tsx @@ -39,7 +39,9 @@ export function ExportModal(props: IProps): React.ReactElement { } function onIndustryChange(event: SelectChangeEvent): void { - setIndustry(event.target.value); + const div = event.target.value; + setIndustry(div); + setCity(Object.keys(corp.divisions[0].warehouses)[0]); } function onAmtChange(event: React.ChangeEvent): void {