@@ -77,7 +77,7 @@ export const PresenceConfirmationPanel = ({userId, onConfirmation}) => {
77
77
const [ chosenDate , setChosenDate ] = useState ( TODAY )
78
78
const [ chosenStartTime , setChosenStartTime ] = useState ( ( ) => getStartTimeValue ( userPreferences , chosenDate ) )
79
79
const [ chosenEndTime , setChosenEndTime ] = useState ( ( ) => getEndTimeValue ( userPreferences , chosenDate ) )
80
-
80
+
81
81
useEffect ( ( ) => {
82
82
setChosenStartTime ( ( ) => getStartTimeValue ( userPreferences , chosenDate ) )
83
83
setChosenEndTime ( ( ) => getEndTimeValue ( userPreferences , chosenDate ) )
@@ -128,58 +128,54 @@ export const PresenceConfirmationPanel = ({userId, onConfirmation}) => {
128
128
}
129
129
130
130
return (
131
- < Row >
132
- < Col xs = { { span : 7 , offset : 5 } } >
133
- < div className = { styles . mainContainer } >
134
- < Col xs = { 10 } lg = { 5 } className = { styles . mainContentContainer } >
135
- < div className = { styles . header } > Rejestracja godzin obecności</ div >
136
- < div className = { styles . flexContainer } >
137
- < InputWrapper >
138
- < DatePicker
139
- withWeekend = { false }
140
- customInput = { < DateTimePickerInput /> }
141
- chosenDate = { chosenDate }
142
- onChange = { date => setChosenDate ( date ) }
143
- />
144
- </ InputWrapper >
145
- < div className = { styles . timePickersContainer } >
146
- < InputWrapper >
147
- < TimePicker
148
- customInput = { < DateTimePickerInput /> }
149
- chosenTime = { chosenStartTime }
150
- onChange = { date => setChosenStartTime ( date ) }
151
- />
152
- </ InputWrapper >
153
- < InputWrapper >
154
- < LineBreak />
155
- < div className = { styles . dash } />
156
- </ InputWrapper >
157
- < InputWrapper >
158
- < TimePicker
159
- customInput = { < DateTimePickerInput /> }
160
- chosenTime = { chosenEndTime }
161
- onChange = { date => setChosenEndTime ( date ) }
162
- />
163
- </ InputWrapper >
164
- </ div >
165
- </ div >
166
- < ConfirmationLabel
167
- fetching = { fetching }
168
- confirmation = { getConfirmation ( chosenDate ) }
169
- isOwnPresence = { ownPresence }
170
- isOnVacation = { isUserOnVacation ( ) }
171
- isNotWorking = { isNotWorking ( userPreferences , chosenDate ) }
131
+ < div className = { styles . mainContainer } >
132
+ < Col xs = { 10 } lg = { 5 } className = { styles . mainContentContainer } >
133
+ < div className = { styles . header } > Rejestracja godzin obecności</ div >
134
+ < div className = { styles . flexContainer } >
135
+ < InputWrapper >
136
+ < DatePicker
137
+ withWeekend = { false }
138
+ customInput = { < DateTimePickerInput /> }
139
+ chosenDate = { chosenDate }
140
+ onChange = { date => setChosenDate ( date ) }
172
141
/>
173
- < button
174
- className = { styles . presenceConfirmationButton }
175
- onClick = { ( ) => handlePresenceConfirmation ( ) }
176
- >
177
- { getConfirmation ( chosenDate ) ? "zaktualizuj godziny obecności" : "zgłoś obecność" }
178
- </ button >
179
- </ Col >
142
+ </ InputWrapper >
143
+ < div className = { styles . timePickersContainer } >
144
+ < InputWrapper >
145
+ < TimePicker
146
+ customInput = { < DateTimePickerInput /> }
147
+ chosenTime = { chosenStartTime }
148
+ onChange = { date => setChosenStartTime ( date ) }
149
+ />
150
+ </ InputWrapper >
151
+ < InputWrapper >
152
+ < LineBreak />
153
+ < div className = { styles . dash } />
154
+ </ InputWrapper >
155
+ < InputWrapper >
156
+ < TimePicker
157
+ customInput = { < DateTimePickerInput /> }
158
+ chosenTime = { chosenEndTime }
159
+ onChange = { date => setChosenEndTime ( date ) }
160
+ />
161
+ </ InputWrapper >
162
+ </ div >
180
163
</ div >
164
+ < ConfirmationLabel
165
+ fetching = { fetching }
166
+ confirmation = { getConfirmation ( chosenDate ) }
167
+ isOwnPresence = { ownPresence }
168
+ isOnVacation = { isUserOnVacation ( ) }
169
+ isNotWorking = { isNotWorking ( userPreferences , chosenDate ) }
170
+ />
171
+ < button
172
+ className = { styles . presenceConfirmationButton }
173
+ onClick = { ( ) => handlePresenceConfirmation ( ) }
174
+ >
175
+ { getConfirmation ( chosenDate ) ? "zaktualizuj godziny obecności" : "zgłoś obecność" }
176
+ </ button >
181
177
</ Col >
182
- </ Row >
178
+ </ div >
183
179
)
184
180
}
185
181
0 commit comments