From 075e792025ff9848220e894816213c28af4a7fdf Mon Sep 17 00:00:00 2001 From: patrol16d Date: Fri, 16 Dec 2022 04:09:27 +0100 Subject: [PATCH] bug fix - bad merge --- frontend/src/api/leaders.ts | 1 + frontend/src/views/coordinator/AddLeader.tsx | 30 +++++++++----------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/frontend/src/api/leaders.ts b/frontend/src/api/leaders.ts index c35af71..a6fe3f0 100644 --- a/frontend/src/api/leaders.ts +++ b/frontend/src/api/leaders.ts @@ -12,6 +12,7 @@ export interface Leader { first_name: string last_name: string email: string + stationary_mode: boolean limit_group?: number count_groups: number } diff --git a/frontend/src/views/coordinator/AddLeader.tsx b/frontend/src/views/coordinator/AddLeader.tsx index 9c5723d..eeb68c2 100644 --- a/frontend/src/views/coordinator/AddLeader.tsx +++ b/frontend/src/views/coordinator/AddLeader.tsx @@ -7,6 +7,7 @@ import InputError from '../../components/InputError' const AddLeader = () => { const [isAlertVisible, setIsAlertVisible] = useState(false) + const [stationaryMode, setStationaryMode] = useState(false) const { register, handleSubmit, @@ -20,6 +21,8 @@ const AddLeader = () => { 'createLeader', (payload: Leader) => { delete payload.limit_group + payload.stationary_mode = stationaryMode + console.log(payload) return createLeader(payload) }, { @@ -101,28 +104,23 @@ const AddLeader = () => { Email jest wymagany )} -
-