-
+
+ );
}
diff --git a/app/ui/LocationEditForm.tsx b/app/ui/LocationEditForm.tsx
index 31568d8..9b4aa27 100644
--- a/app/ui/LocationEditForm.tsx
+++ b/app/ui/LocationEditForm.tsx
@@ -12,10 +12,10 @@ export type LocationEditFormProps = {
/** location which should be edited */
location: BillingLocation,
/** year adn month at a new billing location should be assigned */
- yearMonth: undefined
+ yearMonth?: undefined
} | {
/** location which should be edited */
- location: undefined,
+ location?: undefined,
/** year adn month at a new billing location should be assigned */
yearMonth: YearMonth
}
@@ -23,7 +23,7 @@ export type LocationEditFormProps = {
export const LocationEditForm:FC
= ({ location, yearMonth }) =>
{
const initialState = { message: null, errors: {} };
- const handleAction = updateOrAddLocation.bind(null, location?._id, yearMonth);
+ const handleAction = updateOrAddLocation.bind(null, location?._id, location?.yearMonth ?? yearMonth);
const [ state, dispatch ] = useFormState(handleAction, initialState);
let { year, month } = location ? location.yearMonth : yearMonth;
diff --git a/docker-compose-deploy.yml b/docker-compose-deploy.yml
index d5b5838..a39518f 100644
--- a/docker-compose-deploy.yml
+++ b/docker-compose-deploy.yml
@@ -9,7 +9,7 @@ networks:
services:
web-app:
- image: utility-bills-tracker:1.7.0
+ image: utility-bills-tracker:1.8.0
networks:
- traefik-network
- mongo-network