MISC: Several typo fix in corporation modals (#1029)

This commit is contained in:
Shockwave 2024-01-15 05:12:28 +08:00 committed by GitHub
parent 44f0a77c4e
commit 63574bca0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 8 deletions

@ -144,7 +144,7 @@ export function PurchaseMaterialModal(props: IProps): React.ReactElement {
<Typography> <Typography>
Enter the amount of {props.mat.name} you would like to purchase per second. This material's cost changes Enter the amount of {props.mat.name} you would like to purchase per second. This material's cost changes
constantly. constantly.
{props.disablePurchaseLimit ? "Note: Purchase amount is disabled as smart supply is enabled" : ""} {props.disablePurchaseLimit ? " Note: Purchase amount is disabled as smart supply is enabled" : ""}
</Typography> </Typography>
<TextField <TextField
value={buyAmt} value={buyAmt}

@ -2,6 +2,8 @@ import React, { useState } from "react";
import { Modal } from "../../../ui/React/Modal"; import { Modal } from "../../../ui/React/Modal";
import { Money } from "../../../ui/React/Money"; import { Money } from "../../../ui/React/Money";
import { MoneyRate } from "../../../ui/React/MoneyRate";
import { StatsTable } from "../../../ui/React/StatsTable";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import Button from "@mui/material/Button"; import Button from "@mui/material/Button";
import MenuItem from "@mui/material/MenuItem"; import MenuItem from "@mui/material/MenuItem";
@ -34,7 +36,7 @@ export function SellDivisionModal(props: IProps): React.ReactElement {
props.onClose(); props.onClose();
dialogBoxCreate( dialogBoxCreate(
<Typography> <Typography>
Sold <b>{divisionToSell.name}</b> for <Money money={soldPrice} />, you now have space for Sold <b>{divisionToSell.name}</b> for <Money money={soldPrice} />, you now have space for{" "}
{corp.maxDivisions - corp.divisions.size} more divisions. {corp.maxDivisions - corp.divisions.size} more divisions.
</Typography>, </Typography>,
); );
@ -56,12 +58,20 @@ export function SellDivisionModal(props: IProps): React.ReactElement {
))} ))}
</Select> </Select>
<Typography>Division {divisionToSell.name} has:</Typography> <Typography>Division {divisionToSell.name} has:</Typography>
<Typography> <StatsTable
Profit: <Money money={(divisionToSell.lastCycleRevenue - divisionToSell.lastCycleExpenses) / 10} /> / sec{" "} rows={[
</Typography> [
<Typography>Cities:{getRecordKeys(divisionToSell.offices).length}</Typography> "Profit:",
<Typography>Warehouses:{getRecordKeys(divisionToSell.warehouses).length}</Typography> <MoneyRate
{divisionToSell.makesProducts ?? <Typography>Products: {divisionToSell.products.size}</Typography>} key="profit"
money={(divisionToSell.lastCycleRevenue - divisionToSell.lastCycleExpenses) / 10}
/>,
],
["Cities:", getRecordKeys(divisionToSell.offices).length],
["Warehouses:", getRecordKeys(divisionToSell.warehouses).length],
divisionToSell.makesProducts ? ["Products:", divisionToSell.products.size] : [],
]}
/>
<br /> <br />
<Typography> <Typography>
Sell price: <Money money={price} /> Sell price: <Money money={price} />