ShiftScreen.js 25.7 KB
Newer Older
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
1
/* eslint-disable prettier/prettier */
2 3
/* eslint-disable react-native/no-inline-styles */

quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
4 5
import Moment from 'moment';
import React, {useState} from 'react';
6 7 8
import {
  Image,
  SafeAreaView,
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
9
  ScrollView,
10 11 12 13 14 15
  TouchableOpacity,
  View,
} from 'react-native';
import DateTimePickerModal from 'react-native-modal-datetime-picker';
import SelectDropdown from 'react-native-select-dropdown';
//import {ScrollView} from 'react-native-virtualized-view';
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
16
import Alert from 'react-native-awesome-alerts';
17 18 19 20
import ButtonComponent from '../../components/ButtonComponent';
import LoadingProgress from '../../components/LoadingProgress';
import TextInputComponent from '../../components/TextInputComponent';
import colors from '../../values/colors';
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
21
import {IconTimeSheet, IMAGES} from '../../values/images';
22 23
import ConfirmedShiftContainer from './shift-tabs/ConfirmedShiftScreen/ConfirmedShiftContainer';
import {contentStyle, mainStyle} from './style';
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
24
import AppText from '../../components/AppText';
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
const ShiftScreen = ({
  userDetails,
  prevWeek,
  nextWeek,
  managerDate,
  numberWeekOfYear,
  setTime,
  totalTime,
  dataDropDown,
  onChangeSelectDropDownProjectName,
  onChangeSelectDropDownJobName,
  managerTimePicker,
  managerDisabled,
  onJustSave,
  onPressSend,
  onPressRightIcon,
  onPressCloseDesInput,
  arrJob,
  addMoreJob,
  onChangeTextDes,
  onChangeTextNote,
  isLoading,
  error,
  onCollapseView,
  onExpandView,
  onDeleteItem,
  showAlert,
  onConfirmDelete,
  hideAlert,
  managerArr,
  onSelectManagement,
}) => {
  const [text, onChangeText] = useState();
  const [tabChange, setTabChange] = useState('MY-SHIFT');
  const onTabChange = tab => {
    setTabChange(tab);
  };
  const renderItem = (item, index, index_arr) => {
    return (
      <View
        key={`${item.title} ${index}`}
        style={{flex: 1, flexDirection: 'row'}}>
        {index !== 7 ? (
          <TouchableOpacity
            key={`${item.title} ${index}`}
            onPress={() => {
              !managerDisabled.datePicker
                ? managerTimePicker('open', item, index, index_arr)
                : null;
            }}
            style={{
              flex: 1,
              flexDirection: 'row',
              margin: 5,
              borderWidth: 0.5,
              height: 30,
            }}>
            <View style={contentStyle.viewItemDay}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
83
              <AppText>{item.title ? item.title : ''}</AppText>
84 85 86 87 88 89 90
            </View>
            <View
              style={{
                flex: 4,
                justifyContent: 'center',
                alignItems: 'center',
              }}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
91
              <AppText>
92 93 94 95 96
                {item.time && item.time.toString().includes(':')
                  ? item.time
                  : item.time !== 0 && item.time !== ''
                  ? Moment(item.time).format('HH:mm')
                  : '00:00'}
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
97
              </AppText>
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
              <DateTimePickerModal
                isVisible={item.isOpen}
                mode="time"
                date={new Date()}
                onConfirm={time => setTime(item, index, index_arr, time)}
                onCancel={() =>
                  managerTimePicker('close', item, index, index_arr)
                }
              />
            </View>
          </TouchableOpacity>
        ) : (
          <View
            style={{
              flex: 1,
              justifyContent: 'center',
              alignItems: 'center',
              margin: 5,
              borderWidth: 0.5,
              height: 30,
            }}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
119
            <AppText style={{color: '#ffa117', fontWeight: '500'}}>{`${
120
              item.title
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
121
            } ${totalTime || 0}`}</AppText>
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
          </View>
        )}
      </View>
    );
  };

  return (
    <SafeAreaView>
      <ScrollView
        nestedScrollEnabled={true}
        overScrollMode={'auto'}
        style={{padding: 10}}>
        <View
          style={[
            mainStyle.row,
            mainStyle.marginSpaceAround,
            {marginBottom: 10},
          ]}>
          <TouchableOpacity
            onPress={() => onTabChange('MY-SHIFT')}
            style={{
              borderBottomWidth: tabChange === 'MY-SHIFT' ? 1 : 0,
              borderBottomColor: '#5d78ff',
            }}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
146
            <AppText
147 148 149 150 151
              style={{
                color: tabChange === 'MY-SHIFT' ? '#5d78ff' : '#959595',
                fontWeight: '500',
              }}>
              Timesheet ca tôi
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
152
            </AppText>
153 154 155 156 157 158 159
          </TouchableOpacity>
          <TouchableOpacity
            style={{
              borderBottomWidth: tabChange !== 'MY-SHIFT' ? 1 : 0,
              borderBottomColor: '#5d78ff',
            }}
            onPress={() => onTabChange('CONFIRMED-SHIFT')}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
160
            <AppText
161 162 163 164 165
              style={{
                color: tabChange !== 'MY-SHIFT' ? '#5d78ff' : '#959595',
                fontWeight: '500',
              }}>
              Timesheet cn duyt
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
166
            </AppText>
167 168 169 170 171 172 173 174 175 176
          </TouchableOpacity>
        </View>
        {tabChange === 'MY-SHIFT' ? (
          <>
            <View style={mainStyle.row}>
              <Image
                source={{uri: 'https://meu.anawork.com' + userDetails.avatar}}
                style={{width: 70, height: 70}}
              />
              <View style={{marginLeft: 15, justifyContent: 'center'}}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
177
                <AppText style={{color: '#434349', fontWeight: '500'}}>{`${
178 179 180
                  userDetails.first_name
                } ${userDetails.middle_name ? userDetails.middle_name : ''} ${
                  userDetails.last_name
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
181 182 183 184
                } (${userDetails.employee_code})`}</AppText>
                <AppText style={{fontSize: 13}}>
                  {userDetails.department}
                </AppText>
185 186 187 188 189 190 191 192
              </View>
            </View>
            <View
              style={[
                mainStyle.row,
                {justifyContent: 'space-between', alignItems: 'center'},
              ]}>
              <View style={{flexDirection: 'row'}}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
193 194
                <AppText style={{color: '#5c65dc'}}>Tng gi tun này:</AppText>
                <AppText style={{color: '#ffa117'}}> {totalTime} gi</AppText>
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
              </View>
              <ButtonComponent
                iconSource={IconTimeSheet.IcCopyBlue}
                styleIcon={{height: 20, width: 20}}
                style={{
                  backgroundColor: '#e9eaf9',
                  padding: 5,
                }}
              />
            </View>
            <View style={[mainStyle.row, {justifyContent: 'space-between'}]}>
              <ButtonComponent
                style={{
                  backgroundColor: '#e9eaf9',
                  padding: 5,
                }}
                iconSource={IconTimeSheet.IcLeftForward}
                styleIcon={{height: 20, width: 20}}
                onPress={prevWeek}
              />
              <View
                style={{
                  flexDirection: 'row',
                  backgroundColor: '#e9eaf9',
                  justifyContent: 'center',
                  alignItems: 'center',
                  paddingLeft: 10,
                  paddingRight: 10,
                }}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
224
                <AppText style={{color: '#615f71', fontWeight: '500'}}>
225
                  {`Tuần ${numberWeekOfYear} `}{' '}
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
226 227
                </AppText>
                <AppText>{`${Moment(managerDate.currentDate).format(
228 229 230
                  'DD/MM/YYYY',
                )} - ${Moment(managerDate.theWeekend).format(
                  'DD/MM/YYYY',
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
231
                )}`}</AppText>
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
                <Image
                  source={IMAGES.IcCalendarGray}
                  style={{height: 20, width: 20, marginLeft: 10}}
                />
              </View>
              <ButtonComponent
                style={{
                  backgroundColor: '#e9eaf9',
                  padding: 5,
                }}
                iconSource={IconTimeSheet.IcRightForward}
                styleIcon={{height: 20, width: 20}}
                onPress={nextWeek}
              />
            </View>
            <ButtonComponent
              style={[mainStyle.row, contentStyle.btnAddJob]}
              leftIcon={IMAGES.IcAdd}
              styleIcon={{height: 15, width: 15, marginRight: 5}}
              text={'THÊM CÔNG VIỆC'}
              textStyle={{color: 'white'}}
              onPress={addMoreJob}
            />
            {arrJob &&
              arrJob.map((item, index_arr) => {
                // console.log("item", index_arr % 2 === 0 ? '#0abb87' : '#959595')
                return (
                  // expand view
                  (item?.isExpand && (
                    <View key={`_key${index_arr.toString()}`}>
                      <View
                        style={{
                          marginTop: 20,
                          backgroundColor: colors.white,
                          padding: 10,
                        }}>
                        <ButtonComponent
                          iconSource={IconTimeSheet.IcCollapse}
                          styleIcon={{width: 30, height: 30}}
                          onPress={() => onCollapseView(index_arr)}
                          style={{alignItems: 'flex-end'}}
                        />

                        {dataDropDown.projectName && (
                          <SelectDropdown
                            disabled={managerDisabled.dropdown}
                            data={dataDropDown.projectName}
                            dropdownIconPosition={'right'}
                            defaultButtonText={item.projectName || 'Dự án'}
                            buttonStyle={mainStyle.dropdown1BtnStyle}
                            onSelect={(selectedItem, index_item) => {
                              //console.log("dataDropDown", dataDropDown.projectId[index])
                              onChangeSelectDropDownProjectName(
                                selectedItem,
                                dataDropDown.projectId[index_item],
                                index_arr,
                              );
                            }}
                            placeholder
                            dropdownStyle={mainStyle.dropdown1DropdownStyle}
                            rowStyle={mainStyle.dropdown1RowStyle}
                            rowTextStyle={mainStyle.dropdown1RowTxtStyle}
                            buttonTextStyle={mainStyle.dropdown1BtnTxtStyle}
                            renderDropdownIcon={isOpened => {
                              return (
                                <Image
                                  source={
                                    isOpened
                                      ? IMAGES.IcUpArrow
                                      : IMAGES.IcDownArrow
                                  }
                                  style={{
                                    width: 20,
                                    height: 20,
                                    marginRight: 10,
                                  }}
                                />
                              );
                            }}
                          />
                        )}

                        <SelectDropdown
                          disabled={managerDisabled.dropdown}
                          data={dataDropDown.jobName || ''}
                          dropdownIconPosition={'right'}
                          defaultButtonText={item.jobName || 'Tên công việc'}
                          buttonStyle={mainStyle.dropdown1BtnStyle}
                          onSelect={(selectedItem, item_index) => {
                            //console.log(idLeavesCategory[index].id)

                            onChangeSelectDropDownJobName(
                              selectedItem,
                              dataDropDown.jobId[item_index],
                              index_arr,
                            );
                          }}
                          placeholder
                          dropdownStyle={mainStyle.dropdown1DropdownStyle}
                          rowStyle={mainStyle.dropdown1RowStyle}
                          rowTextStyle={mainStyle.dropdown1RowTxtStyle}
                          buttonTextStyle={mainStyle.dropdown1BtnTxtStyle}
                          renderDropdownIcon={isOpened => {
                            return (
                              <Image
                                source={
                                  isOpened
                                    ? IMAGES.IcUpArrow
                                    : IMAGES.IcDownArrow
                                }
                                style={{width: 20, height: 20, marginRight: 10}}
                              />
                            );
                          }}
                        />
                        <TextInputComponent
                          value={item.taskName}
                          noBorder={true}
                          styleAreaInput={{backgroundColor: colors.white}}
                          placeholder={'Chi tiết công việc'}
                          keyboardType={'email-address'}
                          rightIcon={IconTimeSheet.IcDocument}
                          onPressRightIcon={() => onPressRightIcon(index_arr)}
                          onChangeText={text =>
                            onChangeTextDes(text, index_arr)
                          }
                          disable={managerDisabled.desInput}
                        />
                        {error && (
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
361
                          <AppText style={{color: 'red', fontSize: 12}}>
362
                            Vui lòng nhp chi tiết công vic
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
363
                          </AppText>
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393
                        )}
                        {item.isDes && (
                          <TextInputComponent
                            value={item.description}
                            noBorder={true}
                            styleAreaInput={{backgroundColor: colors.white}}
                            placeholder={'Ghi chú công việc'}
                            keyboardType={'email-address'}
                            rightIcon={IconTimeSheet.IcClose}
                            onChangeText={text =>
                              onChangeTextNote(text, index_arr)
                            }
                            onPressRightIcon={() =>
                              onPressCloseDesInput(index_arr)
                            }
                            disable={managerDisabled.desInput}
                          />
                        )}
                        <View>
                          {/* <FlatList
                            data={item.calendar}
                            renderItem={({item, index}) =>
                              renderItem(item, index, index_arr)
                            }
                            listKey={(item, index) => `_key${index.toString()}`}
                            keyExtractor={(item, index) =>
                              `_key${index.toString()}`
                            }
                            numColumns={2}
                            ListHeaderComponent={() => {
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
394
                              <AppText>AAA</AppText>;
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423
                            }}
                          /> */}
                          {item.calendar &&
                            item.calendar.map((el, index) => {
                              return (
                                <View
                                  key={`${el.title} ${index}`}
                                  style={{flex: 1, flexDirection: 'row'}}>
                                  {index !== 7 ? (
                                    <TouchableOpacity
                                      key={`${el.title} ${index}`}
                                      onPress={() => {
                                        !managerDisabled.datePicker
                                          ? managerTimePicker(
                                              'open',
                                              el,
                                              index,
                                              index_arr,
                                            )
                                          : null;
                                      }}
                                      style={{
                                        flex: 1,
                                        flexDirection: 'row',
                                        margin: 5,
                                        borderWidth: 0.5,
                                        height: 30,
                                      }}>
                                      <View style={contentStyle.viewItemDay}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
424 425 426
                                        <AppText>
                                          {el.title ? el.title : ''}
                                        </AppText>
427 428 429 430 431 432 433
                                      </View>
                                      <View
                                        style={{
                                          flex: 4,
                                          justifyContent: 'center',
                                          alignItems: 'center',
                                        }}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
434
                                        <AppText>
435 436 437 438 439 440
                                          {el.time &&
                                          el.time.toString().includes(':')
                                            ? el.time
                                            : el.time !== 0 && el.time !== ''
                                            ? Moment(el.time).format('HH:mm')
                                            : '00:00'}
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
441
                                        </AppText>
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469
                                        <DateTimePickerModal
                                          isVisible={el.isOpen}
                                          mode="time"
                                          date={new Date()}
                                          onConfirm={time =>
                                            setTime(el, index, index_arr, time)
                                          }
                                          onCancel={() =>
                                            managerTimePicker(
                                              'close',
                                              el,
                                              index,
                                              index_arr,
                                            )
                                          }
                                        />
                                      </View>
                                    </TouchableOpacity>
                                  ) : (
                                    <View
                                      style={{
                                        flex: 1,
                                        justifyContent: 'center',
                                        alignItems: 'center',
                                        margin: 5,
                                        borderWidth: 0.5,
                                        height: 30,
                                      }}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
470
                                      <AppText
471 472 473 474 475
                                        style={{
                                          color: '#ffa117',
                                          fontWeight: '500',
                                        }}>{`${el.title} ${
                                        totalTime || 0
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
476
                                      }`}</AppText>
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517
                                    </View>
                                  )}
                                </View>
                              );
                            })}
                        </View>
                        {arrJob.length > 0 && !arrJob[0]?.isSubmit && (
                          <ButtonComponent
                            style={[mainStyle.deleteBtn]}
                            text={'Xóa'}
                            textStyle={[
                              mainStyle.saveAndSendBtn,
                              {color: '#e5493a'},
                            ]}
                            onPress={() => onDeleteItem(item)}
                          />
                        )}
                      </View>
                    </View>
                  )) || (
                    // collapse view
                    <TouchableOpacity
                      onPress={() => onExpandView(index_arr)}
                      key={`_key${index_arr.toString()}`}
                      style={[
                        mainStyle.collapseView,
                        {
                          borderLeftColor:
                            index_arr % 2 === 0 ? '#0abb87' : '#959595',
                        },
                      ]}>
                      {/* {arrJob.length > 0 && !arrJob[0]?.isSubmit && (
                        <ButtonComponent
                          onPress={() => onDeleteItem(item)}
                          style={{alignSelf: 'flex-end'}}
                          iconSource={IconProfile.IcCloseBlack}
                          styleIcon={{width: 20, height: 20}}
                        />
                      )} */}
                      <View style={{flexDirection: 'row'}}>
                        <View style={{justifyContent: 'flex-start', flex: 6}}>
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
518
                          <AppText
519 520 521 522 523 524
                            style={{
                              fontSize: 14,
                              color: 'black',
                              fontWeight: 'bold',
                            }}>
                            {item.projectName}
quynhquang400@gmail.com's avatar
quynhquang400@gmail.com committed
525 526
                          </AppText>
                          <AppText>{item.taskName}</AppText>
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640
                        </View>
                        <TouchableOpacity
                          onPress={() => onExpandView(index_arr)}
                          style={{flex: 1, justifyContent: 'center'}}>
                          <Image
                            source={IMAGES.IcArrowRight}
                            style={{height: 20, width: 20}}
                          />
                        </TouchableOpacity>
                      </View>
                    </TouchableOpacity>
                  )
                );
              })}
            {arrJob.length > 0 && arrJob[0].isSubmit ? (
              <View style={mainStyle.viewBtn}>
                <ButtonComponent
                  style={[
                    mainStyle.viewSaveAndSendBtn,
                    {
                      backgroundColor: colors.grayE9,
                      marginRight: 10,
                    },
                  ]}
                  text={'Timesheet đã nộp'}
                  textStyle={[mainStyle.saveAndSendBtn, {color: colors.blue5c}]}
                />
              </View>
            ) : (
              <View>
                {managerArr && managerArr?.nameManager?.length > 0 && (
                  <SelectDropdown
                    data={managerArr?.nameManager}
                    dropdownIconPosition={'right'}
                    defaultButtonText={'Cấp trên duyệt'}
                    buttonStyle={mainStyle.dropdown1BtnSelectManager}
                    onSelect={selectedItem => onSelectManagement(selectedItem)}
                    dropdownStyle={mainStyle.dropdown1DropdownStyle}
                    rowStyle={mainStyle.dropdown1RowStyle}
                    rowTextStyle={mainStyle.dropdown1RowTxtStyle}
                    buttonTextStyle={mainStyle.dropdown1BtnTxtStyle}
                    renderDropdownIcon={isOpened => {
                      return (
                        <Image
                          source={
                            isOpened ? IMAGES.IcUpArrow : IMAGES.IcArrowDown
                          }
                          style={{width: 20, height: 20}}
                        />
                      );
                    }}
                  />
                )}
                <View style={mainStyle.viewBtn}>
                  <ButtonComponent
                    style={[
                      mainStyle.viewSaveAndSendBtn,
                      {
                        backgroundColor: colors.white,
                        marginRight: 10,
                        borderColor: colors.green0a,
                        borderWidth: 1.5,
                      },
                    ]}
                    text={'Lưu và nộp'}
                    textStyle={[
                      mainStyle.saveAndSendBtn,
                      {color: colors.green0a},
                    ]}
                    onPress={onPressSend}
                  />
                  <ButtonComponent
                    style={[
                      mainStyle.viewSaveAndSendBtn,
                      {
                        backgroundColor: colors.grayE9,
                      },
                    ]}
                    text={'Lưu'}
                    textStyle={[
                      mainStyle.saveAndSendBtn,
                      {color: colors.blue5c},
                    ]}
                    onPress={onJustSave}
                  />
                </View>
              </View>
            )}
          </>
        ) : (
          <ConfirmedShiftContainer />
        )}
        <Alert
          show={showAlert.isError}
          showProgress={false}
          title={showAlert.title}
          message={showAlert.message}
          closeOnTouchOutside={true}
          closeOnHardwareBackPress={false}
          showConfirmButton={showAlert.isShowActionBtn}
          showCancelButton={true}
          cancelText={'Đóng'}
          confirmText="Xóa"
          confirmButtonColor="#DD6B55"
          onConfirmPressed={onConfirmDelete}
          onCancelPressed={hideAlert}
        />
      </ScrollView>
      {isLoading && <LoadingProgress />}
    </SafeAreaView>
  );
};

export default ShiftScreen;