Skip to content

Commit

Permalink
build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bendemers committed Oct 29, 2023
1 parent a2e7887 commit 6ecfc9b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 14 deletions.
20 changes: 15 additions & 5 deletions client/src/Authentication/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,21 @@ function LoginPage() {
<ScreenGrid>
<FormGrid>
<FormCol>
<Grid item container justifyContent="center">
<Typography variant="h2" textAlign="center">
Small Things Log-in
</Typography>
<img src={Logo} alt="logo" style={{ width: '400px' }} />
<Grid
item
container
direction="column"
justifyContent="center"
alignItems="center"
>
<Grid item>
<Typography variant="h2" textAlign="center">
Small Things Log-in
</Typography>
</Grid>
<Grid item>
<img src={Logo} alt="logo" style={{ width: '400px' }} />
</Grid>
</Grid>
<Grid item width="1">
<TextField
Expand Down
8 changes: 4 additions & 4 deletions client/src/OrderPage/ModifyOrderForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ interface ModifyOrderFormProps {
settings: ISettings;
dates: Date;
order: IOrder;
handelSave: (order: IOrder | undefined) => void;
handleSave: (order: IOrder | undefined) => void;
cancel: () => void;
}

function ModifyOrderForm({
settings,
order,
dates,
handelSave,
handleSave,
cancel,
}: ModifyOrderFormProps) {
const originalValues = {
Expand Down Expand Up @@ -123,7 +123,7 @@ function ModifyOrderForm({
const modifiedOrder: IOrder = {
// eslint-disable-next-line no-underscore-dangle
_id: order._id,
advanced: settings.advanced,
advanced: order.advanced,
organization: order.organization,
status: order.status,
produce: values.produce,
Expand Down Expand Up @@ -444,7 +444,7 @@ function ModifyOrderForm({
variant="contained"
color="primary"
fullWidth
onClick={() => handelSave(buildOrder())}
onClick={() => handleSave(buildOrder())}
disabled={!canSubmit}
>
Save Changes
Expand Down
2 changes: 1 addition & 1 deletion client/src/OrderPage/OrderPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function OrderPage() {
order={order}
settings={settings}
dates={dates}
handelSave={handleModification}
handleSave={handleModification}
cancel={() => setModifying(false)}
/>
) : (
Expand Down
6 changes: 3 additions & 3 deletions server/src/controllers/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ const login = async (
failureMessage: true,
},
// Callback function defined by passport strategy in configPassport.ts
// eslint-disable-next-line @typescript-eslint/no-unused-vars
(err, user, info) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
(err: any, user: any, info: any) => {
if (err) {
next(ApiError.internal('Failed to authenticate user.'));
return;
Expand All @@ -57,7 +57,7 @@ const login = async (
next(ApiError.unauthorized('Incorrect credentials'));
return;
}
if (!user!.verified) {
if (!user?.verified) {
next(ApiError.unauthorized('Need to verify account by email'));
return;
}
Expand Down
2 changes: 1 addition & 1 deletion server/src/services/order.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const getAllApprovedOrders = async () => {

const getAllApprovedOrdersInDateRange = async (start: Date, end: Date) => {
const orders = await Order.find({
status: { $in: ['APPROVED', 'RELEASED'] },
status: { $in: ['APPROVED', 'RELEASED', 'COMPLETED'] },
pickup: { $gte: start, $lte: end },
}).exec();
return orders;
Expand Down

0 comments on commit 6ecfc9b

Please sign in to comment.