Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5195 | Rev 5307 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5195 Rev 5206
Línea 14... Línea 14...
14
import Datetime from 'react-datetime'
14
import Datetime from 'react-datetime'
15
import { addNotification } from '../../../redux/notification/notification.actions'
15
import { addNotification } from '../../../redux/notification/notification.actions'
16
import Spinner from '../../../shared/loading-spinner/Spinner'
16
import Spinner from '../../../shared/loading-spinner/Spinner'
17
import { useDispatch } from 'react-redux'
17
import { useDispatch } from 'react-redux'
18
import SearchIcon from '@mui/icons-material/Search'
18
import SearchIcon from '@mui/icons-material/Search'
-
 
19
import EmptySection from '../../../shared/empty-section/EmptySection'
Línea 19... Línea 20...
19
 
20
 
20
const StyledChatHead = styled.div`
21
const StyledChatHead = styled.div`
21
  .notify {
22
  .notify {
22
    animation: notify 2s infinite;
23
    animation: notify 2s infinite;
Línea 459... Línea 460...
459
              onClick={() => handleChangeTab(optionTabs.add_person_to_group)}
460
              onClick={() => handleChangeTab(optionTabs.add_person_to_group)}
460
            >
461
            >
461
              <span className="optionsTab__option__icon">
462
              <span className="optionsTab__option__icon">
462
                <i className="fa fa-user-plus"></i>
463
                <i className="fa fa-user-plus"></i>
463
              </span>
464
              </span>
464
              Agregar contactos
465
              {CHAT_LABELS.ADD_CONTACTS}
465
            </li>
466
            </li>
466
          )}
467
          )}
467
          {
468
          {
468
            url_zoom &&
469
            url_zoom &&
469
            <li
470
            <li
Línea 471... Línea 472...
471
              onClick={displayConferenceModal}
472
              onClick={displayConferenceModal}
472
            >
473
            >
473
              <span className="optionsTab__option__icon">
474
              <span className="optionsTab__option__icon">
474
                <i className="fa fa-user-plus" />
475
                <i className="fa fa-user-plus" />
475
              </span>
476
              </span>
476
              Crear conferencia
477
              {CHAT_LABELS.CREATE_CONFERENCE}
477
            </li>
478
            </li>
478
          }
479
          }
479
          {!!url_delete && (
480
          {!!url_delete && (
480
            <li
481
            <li
481
              className="optionsTab__option"
482
              className="optionsTab__option"
Línea 516... Línea 517...
516
      <span className="optionBack" onClick={() => handleShowOptions()}>
517
      <span className="optionBack" onClick={() => handleShowOptions()}>
517
        <i className="fa icon-arrow-left" />
518
        <i className="fa icon-arrow-left" />
518
      </span>
519
      </span>
519
      <div className="optionsTab">
520
      <div className="optionsTab">
520
        <ul>
521
        <ul>
521
          <li
-
 
522
            className="optionsTab__option"
-
 
523
            onClick={displayConferenceModal}
522
          <li className="optionsTab__option" onClick={displayConferenceModal}>
524
          >
-
 
525
            <span className="optionsTab__option__icon">
523
            <span className="optionsTab__option__icon">
526
              <i className="fa fa-user-plus" />
524
              <i className="fa fa-user-plus" />
527
            </span>
525
            </span>
528
            Crear conferencia
526
            {CHAT_LABELS.CREATE_CONFERENCE}
529
          </li>
527
          </li>
530
        </ul>
528
        </ul>
531
      </div>
529
      </div>
532
    </>
530
    </>
533
  )
531
  )
Línea 534... Línea 532...
534
 
532
 
535
  const addPersonToGroupTab = (
-
 
536
    <React.Fragment>
533
  const addPersonToGroupTab = (
537
      <span
-
 
538
        className="optionBack"
534
    <>
539
        onClick={() => handleChangeTab(optionTabs.default)}
-
 
540
      >
535
      <span className="optionBack" onClick={() => handleChangeTab(optionTabs.default)}>
541
        <i className="fa icon-arrow-left"></i>
536
        <i className="fa icon-arrow-left" />
542
      </span>
537
      </span>
543
      <div className="addPersonToGroupTab">
538
      <div className="addPersonToGroupTab">
544
        {availableContactsToAdd.length
539
        !{availableContactsToAdd.length
545
          ? (
540
        ? <EmptySection message={CHAT_LABELS.NOT_CONTACTS} align='left' />
546
              availableContactsToAdd.map(({ image, name, id }) => (
541
        : availableContactsToAdd.map(({ image, name, id }) =>
547
            <div className="addPersonToGroupTab__person" key={id}>
542
            <div className="addPersonToGroupTab__person" key={id}>
548
              <div className="d-inline-flex" style={{ gap: '5px' }}>
543
              <div className="d-inline-flex" style={{ gap: '5px' }}>
549
                <img
544
                <img
550
                  className="chat-image img-circle pull-left"
545
                  className="chat-image img-circle pull-left"
Línea 553... Línea 548...
553
                  src={image}
548
                  src={image}
554
                  alt="image-image"
549
                  alt="image-image"
555
                />
550
                />
556
                <div className="name">{name}</div>
551
                <div className="name">{name}</div>
557
              </div>
552
              </div>
558
              <span
-
 
559
                style={{
-
 
560
                  cursor: 'pointer'
-
 
561
                }}
-
 
562
                onClick={() => {
-
 
563
                  handleAddPersonToGroup(id)
553
              <span className='cursor-pointer' onClick={() => handleAddPersonToGroup(id)}>
564
                }}
-
 
565
              >
-
 
566
                <i className="fa fa-plus-circle"></i>
554
                <i className="fa fa-plus-circle" />
567
              </span>
555
              </span>
568
            </div>
556
            </div>
569
              ))
-
 
570
            )
-
 
571
          : (
-
 
572
          <div className="addPersonToGroupTab__person">No hay Contactos</div>
-
 
573
            )}
557
        )}
574
      </div>
558
      </div>
575
    </React.Fragment>
559
    </>
576
  )
560
  )
Línea 577... Línea 561...
577
 
561
 
578
  const groupContactsListTab = (
562
  const groupContactsListTab = (
579
    <>
563
    <>
Línea 582... Línea 566...
582
      </span>
566
      </span>
583
      <div className='group__search'>
567
      <div className='group__search'>
584
        <SearchIcon />
568
        <SearchIcon />
585
        <input
569
        <input
586
          type='text'
570
          type='text'
587
          placeholder='Buscar'
571
          placeholder={CHAT_LABELS.SEARCH}
588
          onChange={(e) => setSearch(e.target.value)}
572
          onChange={(e) => setSearch(e.target.value)}
589
        />
573
        />
590
      </div>
574
      </div>
591
      <div className="addPersonToGroupTab">
575
      <div className="addPersonToGroupTab">
592
        {filtredGroupList.length
576
        {filtredGroupList.length
Línea 609... Línea 593...
609
                  </span>
593
                  </span>
610
                }
594
                }
611
              </div>
595
              </div>
612
            )
596
            )
613
          })
597
          })
614
          : <div className="addPersonToGroupTab__person">No hay Contactos</div>
598
          : <div className="addPersonToGroupTab__person">{CHAT_LABELS.NOT_CONTACTS}</div>
615
        }
599
        }
616
      </div>
600
      </div>
617
    </>
601
    </>
618
  )
602
  )
Línea 619... Línea 603...
619
 
603
 
620
  const userChat = (
604
  const userChat = (
621
    <>
605
    <>
622
      <div className="chatbox active-chat" style={{ display: 'block' }}>
-
 
623
        <div className="chatbox-icon">
-
 
624
          <div className="contact-floating red">
-
 
625
            <img className="chat-image img-circle pull-left" src={image} />
-
 
626
            <small className="unread-msg">2</small>
-
 
627
          </div>
-
 
628
        </div>
606
      <div className="chatbox active-chat" style={{ display: 'block' }}>
629
        <div className="panel personal-chat">
607
        <div className="panel personal-chat">
630
          <StyledChatHead>
608
          <StyledChatHead>
631
            <div className={`panel-heading chatboxhead ${not_seen_messages ? 'notify' : ''}`}>
609
            <div className={`panel-heading chatboxhead ${not_seen_messages ? 'notify' : ''}`}>
632
              <div className="panel-title">
610
              <div className="panel-title">
Línea 643... Línea 621...
643
                  </a>
621
                  </a>
644
                  <br />
622
                  <br />
645
                  <small className={`status ${online ? 'Online' : 'Offline'}`}>
623
                  <small className={`status ${online ? 'Online' : 'Offline'}`}>
646
                    <b>{online ? 'En línea' : 'Desconectado'}</b>
624
                    <b>{online ? 'En línea' : 'Desconectado'}</b>
647
                  </small>
625
                  </small>
-
 
626
 
648
                  <div className="pull-right options">
627
                  <div className="pull-right options">
649
                    <div className="btn-group uploadFile">
-
 
650
                      {/* <span>
-
 
651
                      <i className="fa fa-trash"></i>
-
 
652
                    </span> */}
-
 
653
                    </div>
-
 
654
                    <div className="btn-group">
-
 
655
                      {/* <span>
-
 
656
                      <i className="fa fa-trash"></i>
-
 
657
                    </span> */}
-
 
658
                    </div>
-
 
659
                    <div className="btn-group">
628
                    <div className="btn-group">
660
                      <span>
-
 
661
                        <i className="fa fa-gear" onClick={() => {
629
                      <i className="fa fa-gear" onClick={() => {
662
                          handleChangeTab(optionTabs.meet)
630
                        handleChangeTab(optionTabs.meet)
663
                          handleShowOptions()
631
                        handleShowOptions()
664
                        }}
-
 
665
                        />
632
                      }} />
666
                      </span>
-
 
667
                    </div>
633
                    </div>
668
                    <div className="btn-group">
634
                    <div className="btn-group">
669
                      <span>
-
 
670
                        <i className={'fa fa-minus-circle'} onClick={handleActive} />
635
                      <i className={'fa fa-minus-circle'} onClick={handleActive} />
671
                      </span>
-
 
672
                    </div>
636
                    </div>
673
                    <div className="btn-group">
637
                    <div className="btn-group">
674
                      <span>
-
 
675
                        <i className="fa fa-times-circle" onClick={handleCloseChat} />
638
                      <i className="fa fa-times-circle" onClick={handleCloseChat} />
676
                      </span>
-
 
677
                    </div>
639
                    </div>
678
                  </div>
640
                  </div>
-
 
641
 
679
                </div>
642
                </div>
680
              </div>
643
              </div>
681
            </div>
644
            </div>
682
          </StyledChatHead>
645
          </StyledChatHead>
683
          <div
646
          <div
Línea 731... Línea 694...
731
                      <div className="input-emoji">
694
                      <div className="input-emoji">
732
                        <div
695
                        <div
733
                          className="input-placeholder"
696
                          className="input-placeholder"
734
                          style={{ visibility: 'hidden', display: 'none' }}
697
                          style={{ visibility: 'hidden', display: 'none' }}
735
                        >
698
                        >
736
                          Escribe un mensaje
699
                          {CHAT_LABELS.WRITE_A_MESSAGE}
737
                        </div>
700
                        </div>
738
                        <textarea
701
                        <textarea
739
                          className="input chatboxtextarea"
702
                          className="input chatboxtextarea"
740
                          id="chatboxtextarea"
703
                          id="chatboxtextarea"
741
                          name="chattxt"
704
                          name="chattxt"
742
                          style={{ resize: 'none', height: '20px' }}
705
                          style={{ resize: 'none', height: '20px' }}
743
                          placeholder="Escribe un mensaje"
706
                          placeholder={CHAT_LABELS.WRITE_A_MESSAGE}
744
                          onKeyDown={handleChatBoxKeyDown}
707
                          onKeyDown={handleChatBoxKeyDown}
745
                          ref={textAreaEl}
708
                          ref={textAreaEl}
746
                          onBlur={() => responseMessage && setResponseMessage(null)}
709
                          onBlur={() => responseMessage && setResponseMessage(null)}
747
                          onFocus={() => not_seen_messages && onRead(entity)}
710
                          onFocus={() => not_seen_messages && onRead(entity)}
748
                        />
711
                        />
749
                        <input
-
 
750
                          id="to_uname"
-
 
751
                          name="to_uname"
-
 
752
                          value="'+chatboxtitle+'"
-
 
753
                          type="hidden"
-
 
754
                        />
-
 
755
                        <input
-
 
756
                          id="from_uname"
-
 
757
                          name="from_uname"
-
 
758
                          value="Beenny"
-
 
759
                          type="hidden"
-
 
760
                        />
-
 
761
                      </div>
712
                      </div>
762
                    </div>
713
                    </div>
763
                  </div>
714
                  </div>
764
                </div>
715
                </div>
Línea 790... Línea 741...
790
      />
741
      />
791
    </>
742
    </>
792
  )
743
  )
Línea 793... Línea 744...
793
 
744
 
794
  const groupChat = (
-
 
795
    <React.Fragment>
-
 
796
      <div
-
 
797
        className="chatbox active-chat "
-
 
798
        ref={chatboxEl}
745
  const groupChat = (
799
      >
746
    <>
800
        <div className="chatbox-icon">
-
 
801
          <div className="contact-floating red">
-
 
802
            <img className="chat-image img-circle pull-left" src={image} />
-
 
803
            <small className="unread-msg">2</small>
-
 
804
          </div>
-
 
805
        </div>
747
      <div className="chatbox active-chat " ref={chatboxEl}>
806
        <div className="panel personal-chat">
748
        <div className="panel personal-chat">
807
          <StyledChatHead>
749
          <StyledChatHead>
808
            <div className={`panel-heading chatboxhead ${not_seen_messages ? 'notify' : ''}`}>
750
            <div className={`panel-heading chatboxhead ${not_seen_messages ? 'notify' : ''}`}>
809
              <div className="panel-title-group">
751
              <div className="panel-title-group">
Línea 812... Línea 754...
812
                  height="36"
754
                  height="36"
813
                  width="36"
755
                  width="36"
814
                  src="/images/users-group.png"
756
                  src="/images/users-group.png"
815
                  alt="avatar-image"
757
                  alt="avatar-image"
816
                />
758
                />
-
 
759
 
817
                <div className="header-elements">
760
                <div className="header-elements">
818
                  <p>{name}</p>
761
                  <p>{name}</p>
819
                  <br />
-
 
-
 
762
 
820
                  <div className="pull-right options">
763
                  <div className="pull-right options">
821
                    <div
-
 
822
                      className="btn-group uploadFile"
-
 
823
                      id="uploadFile"
-
 
824
                      data-client="'+chatboxtitle+'"
-
 
825
                    >
-
 
826
                    </div>
-
 
827
                    <div className="btn-group">
-
 
828
                    </div>
-
 
829
                    <div
-
 
830
                      className="btn-group addUser"
764
                    <div className="btn-group addUser" />
831
                      data-client="8cb2a840-56c2-4f93-9cf1-27ad598acd8f"
-
 
832
                      data-name="Grupo de jesus"
-
 
833
                    >
-
 
834
                      <span>
-
 
835
                        <i
-
 
836
                          className="fa fa-gear"
-
 
837
                          onClick={handleShowOptions}
765
                    <i className="fa fa-gear" onClick={handleShowOptions} />
838
                        ></i>
-
 
839
                      </span>
-
 
840
                    </div>
766
                  </div>
841
                    <div className="btn-group">
767
                  <div className="btn-group">
842
                      <span>
-
 
843
                        <i
-
 
844
                          className={'fa fa-minus-circle'}
768
                    <i className='fa fa-minus-circle' onClick={handleActive} />
845
                          onClick={handleActive}
-
 
846
                        ></i>
-
 
847
                      </span>
-
 
848
                    </div>
769
                  </div>
849
                    <div className="btn-group">
770
                  <div className="btn-group">
850
                      <span>
-
 
851
                        <i
-
 
852
                          className="fa fa-times-circle"
771
                    <i className="fa fa-times-circle" onClick={handleCloseChat} />
853
                          onClick={handleCloseChat}
-
 
854
                        ></i>
-
 
855
                      </span>
-
 
856
                    </div>
-
 
857
                  </div>
772
                  </div>
858
                </div>
773
                </div>
-
 
774
 
859
              </div>
775
              </div>
860
            </div>
776
            </div>
861
          </StyledChatHead>
777
          </StyledChatHead>
862
          <div
778
 
863
            className="panel-body"
-
 
864
            style={{ display: !minimized ? 'block' : 'none' }}
779
          <div className="panel-body" style={{ display: !minimized ? 'block' : 'none' }}>
865
          >
-
 
866
            <StyledShowOptions className={` ${showOptions ? 'show' : 'hide'}`}>
780
            <StyledShowOptions className={` ${showOptions ? 'show' : 'hide'}`}>
867
              {optionRender()}
781
              {optionRender()}
868
            </StyledShowOptions>
782
            </StyledShowOptions>
Línea 869... Línea 783...
869
 
783
 
Línea 899... Línea 813...
899
                      <div className="input-emoji">
813
                      <div className="input-emoji">
900
                        <div
814
                        <div
901
                          className="input-placeholder"
815
                          className="input-placeholder"
902
                          style={{ visibility: 'hidden', display: 'none' }}
816
                          style={{ visibility: 'hidden', display: 'none' }}
903
                        >
817
                        >
904
                          Escribe un mensaje
818
                          {CHAT_LABELS.WRITE_A_MESSAGE}
905
                        </div>
819
                        </div>
906
                        <textarea
820
                        <textarea
907
                          className="input chatboxtextarea"
821
                          className="input chatboxtextarea"
908
                          id="chatboxtextarea"
-
 
909
                          name="chattxt"
822
                          name="chattxt"
910
                          style={{ resize: 'none', height: '20px' }}
823
                          style={{ resize: 'none', height: '20px' }}
911
                          placeholder="Escribe un mensaje"
824
                          placeholder={CHAT_LABELS.WRITE_A_MESSAGE}
912
                          onKeyDown={handleChatBoxKeyDown}
825
                          onKeyDown={handleChatBoxKeyDown}
913
                          ref={textAreaEl}
826
                          ref={textAreaEl}
914
                          onFocus={() => not_seen_messages && onRead(entity)}
827
                          onFocus={() => not_seen_messages && onRead(entity)}
915
                          onBlur={() => responseMessage && setResponseMessage(null)}
828
                          onBlur={() => responseMessage && setResponseMessage(null)}
916
                        ></textarea>
829
                        />
917
                        <input
830
                        <input
918
                          id="to_uname"
831
                          id="to_uname"
919
                          name="to_uname"
832
                          name="to_uname"
920
                          value="'+chatboxtitle+'"
833
                          value="'+chatboxtitle+'"
921
                          type="hidden"
834
                          type="hidden"
Línea 966... Línea 879...
966
      <SendFileModal
879
      <SendFileModal
967
        show={shareFileModalShow}
880
        show={shareFileModalShow}
968
        onHide={() => setShareFileModalShow(false)}
881
        onHide={() => setShareFileModalShow(false)}
969
        urlUpload={url_upload}
882
        urlUpload={url_upload}
970
      />
883
      />
971
    </React.Fragment>
884
    </>
972
  )
885
  )
Línea 973... Línea 886...
973
 
886
 
974
  switch (type) {
887
  switch (type) {
975
    case 'user':
888
    case 'user':
Línea 1180... Línea 1093...
1180
        </div>
1093
        </div>
1181
        <button className="btn btn-primary" type="submit">
1094
        <button className="btn btn-primary" type="submit">
1182
          Crear
1095
          Crear
1183
        </button>
1096
        </button>
1184
      </form>
1097
      </form>
1185
    </StyleModal >
1098
    </StyleModal>
1186
  )
1099
  )
1187
}
1100
}
Línea 1188... Línea 1101...
1188
 
1101