Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4115 Rev 4116
Línea 9... Línea 9...
9
import MessageTemplate from "./messageTemplate/MessageTemplate";
9
import MessageTemplate from "./messageTemplate/MessageTemplate";
10
import { Button, Modal } from "react-bootstrap";
10
import { Button, Modal } from "react-bootstrap";
11
import Spinner from "../../../shared/loading-spinner/Spinner";
11
import Spinner from "../../../shared/loading-spinner/Spinner";
12
import { useForm } from "react-hook-form";
12
import { useForm } from "react-hook-form";
13
import FormErrorFeedback from "../../../shared/form-error-feedback/FormErrorFeedback";
13
import FormErrorFeedback from "../../../shared/form-error-feedback/FormErrorFeedback";
-
 
14
import Datetime from "react-datetime";
Línea 14... Línea 15...
14
 
15
 
15
const StyledChatHead = styled.div`
16
const StyledChatHead = styled.div`
16
  .notify {
17
  .notify {
17
    animation: notify 2s infinite;
18
    animation: notify 2s infinite;
Línea 117... Línea 118...
117
 
118
 
118
  // optionTabs
119
  // optionTabs
119
  const optionTabs = {
120
  const optionTabs = {
120
    add_person_to_group: "add_person_to_group",
121
    add_person_to_group: "add_person_to_group",
-
 
122
    group_contacts_list: "group_contacts_list",
121
    group_contacts_list: "group_contacts_list",
123
    meet: 'meet',
122
    default: "default",
124
    default: "default",
Línea 123... Línea 125...
123
  };
125
  };
124
 
126
 
Línea 334... Línea 336...
334
      : setResponseMessage({ ...element, m: 'Archivo adjunto' })
336
      : setResponseMessage({ ...element, m: 'Archivo adjunto' })
Línea 335... Línea 337...
335
 
337
 
336
    textAreaEl.current && textAreaEl.current.focus()
338
    textAreaEl.current && textAreaEl.current.focus()
Línea 337... Línea 339...
337
  };
339
  };
Línea 338... Línea 340...
338
 
340
 
339
  const displayConferenceModal = () => setShowConferenceModal(!displayConferenceModal)
341
  const displayConferenceModal = () => setShowConferenceModal(!showConferenceModal)
340
 
342
 
341
  const messagesRender = () => {
343
  const messagesRender = () => {
Línea 385... Línea 387...
385
    switch (optionTab) {
387
    switch (optionTab) {
386
      case optionTabs.add_person_to_group:
388
      case optionTabs.add_person_to_group:
387
        return addPersonToGroupTab;
389
        return addPersonToGroupTab;
388
      case optionTabs.group_contacts_list:
390
      case optionTabs.group_contacts_list:
389
        return groupContactsListTab;
391
        return groupContactsListTab;
-
 
392
      case optionTabs.meet:
-
 
393
        return meetingOptionsTab;
390
      default:
394
      default:
391
        return optionsDefaultTab;
395
        return optionsDefaultTab;
392
    }
396
    }
393
  };
397
  };
Línea 611... Línea 615...
611
      urlUpload={url_upload}
615
      urlUpload={url_upload}
612
    />
616
    />
613
  );
617
  );
Línea 614... Línea 618...
614
 
618
 
615
  const userChat = (
619
  const userChat = (
616
    <React.Fragment>
620
    <>
617
      <div className="chatbox active-chat" style={{ display: 'block' }}>
621
      <div className="chatbox active-chat" style={{ display: 'block' }}>
618
        <div className="chatbox-icon">
622
        <div className="chatbox-icon">
619
          <div className="contact-floating red">
623
          <div className="contact-floating red">
620
            <img className="chat-image img-circle pull-left" src={image} />
624
            <img className="chat-image img-circle pull-left" src={image} />
Línea 655... Línea 659...
655
                      className="btn-group addUser"
659
                      className="btn-group addUser"
656
                      data-client="8cb2a840-56c2-4f93-9cf1-27ad598acd8f"
660
                      data-client="8cb2a840-56c2-4f93-9cf1-27ad598acd8f"
657
                      data-name="Grupo de jesus"
661
                      data-name="Grupo de jesus"
658
                    >
662
                    >
659
                      <span>
663
                      <span>
660
                        <i className="fa fa-gear" onClick={handleShowOptions} />
664
                        <i className="fa fa-camera" onClick={()=> {
-
 
665
                          handleChangeTab(optionTabs.meet)
-
 
666
                          handleShowOptions()
-
 
667
                        }} 
-
 
668
                          />
661
                      </span>
669
                      </span>
662
                    </div>
670
                    </div>
663
                    <div className="btn-group">
671
                    <div className="btn-group">
664
                      <span>
672
                      <span>
665
                        <i className={`fa fa-minus-circle`} onClick={handleActive} />
673
                        <i className={`fa fa-minus-circle`} onClick={handleActive} />
Línea 677... Línea 685...
677
          </StyledChatHead>
685
          </StyledChatHead>
678
          <div
686
          <div
679
            className="panel-body"
687
            className="panel-body"
680
            style={{ display: !minimized ? "block" : "none" }}
688
            style={{ display: !minimized ? "block" : "none" }}
681
          >
689
          >
-
 
690
            <StyledShowOptions className={` ${showOptions ? "show" : "hide"}`}>
-
 
691
              {optionRender()}
-
 
692
            </StyledShowOptions>
682
            <div
693
            <div
683
              id="uploader_'+chatboxtitle+'"
694
              id="uploader_'+chatboxtitle+'"
684
              style={{ display: "none", height: "342px" }}
695
              style={{ display: "none", height: "342px" }}
685
            >
696
            >
686
              <p>
697
              <p>
687
                Your browser does not have Flash, Silverlight or HTML5 support.
698
                Your browser does not have Flash, Silverlight or HTML5 support.
688
              </p>
699
              </p>
689
            </div>
700
            </div>
-
 
701
            <div
690
            <div className="chat-conversation" style={{ position: "relative" }}>
702
              className="chat-conversation"
-
 
703
              style={{ position: "relative", display: showOptions ? 'block' : 'none' }}
-
 
704
            >
691
              <div className="reverseChatBox" ref={conversationListEl}>
705
              <div className="reverseChatBox" ref={conversationListEl}>
692
                <ul
706
                <ul
693
                  className="conversation-list chatboxcontent"
707
                  className="conversation-list chatboxcontent"
694
                  id="resultchat_'+chatboxtitle+'"
708
                  id="resultchat_'+chatboxtitle+'"
695
                >
709
                >
Línea 770... Línea 784...
770
            </div>
784
            </div>
771
          </div>
785
          </div>
772
        </div>
786
        </div>
773
      </div>
787
      </div>
774
      {shareFileModal}
788
      {shareFileModal}
-
 
789
      <ConferenceModal show={showConferenceModal} />
775
    </React.Fragment>
790
    </>
776
  );
791
  );
Línea 777... Línea 792...
777
 
792
 
778
  const groupChat = (
793
  const groupChat = (
779
    <React.Fragment>
794
    <React.Fragment>
Línea 980... Línea 995...
980
  )
995
  )
981
}
996
}
Línea 982... Línea 997...
982
 
997
 
983
const ConferenceModal = ({
998
const ConferenceModal = ({
-
 
999
  show = false,
984
  show = false,
1000
  timezones = {}
Línea 985... Línea 1001...
985
}) => {
1001
}) => {
-
 
1002
 
Línea 986... Línea 1003...
986
 
1003
  const { handleSubmit, register, watch, errors, reset } = useForm()
987
  const { handleSubmit, register, errors, reset } = useForm()
1004
  const [year, setYear] = useState(new Intl.DateTimeFormat('en').format(new Date()))
988
 
1005
 
Línea 1006... Línea 1023...
1006
              {...register({ required: "Por favor un título" })}
1023
              {...register({ required: "Por favor un título" })}
1007
            />
1024
            />
1008
            {errors.title && <FormErrorFeedback> {errors.title.message}</FormErrorFeedback>}
1025
            {errors.title && <FormErrorFeedback> {errors.title.message}</FormErrorFeedback>}
1009
          </div>
1026
          </div>
1010
          <div className="cp-field">
1027
          <div className="cp-field">
1011
            <label htmlFor="first_name">Título</label>
1028
            <label htmlFor="timezone">Zona horaria</label>
1012
            <input
1029
            <select
1013
              type="text"
1030
              name="timezone"
1014
              name="title"
1031
              defaultValue=""
1015
              {...register({ required: "Por favor ingrese su nombre" })}
1032
              {...register({ required: "Por favor elige una Zona horaria" })}
-
 
1033
            >
-
 
1034
              <option value="" hidden>
-
 
1035
                Zona horaria
-
 
1036
              </option>
-
 
1037
              {Object.entries(timezones).map(([key, value]) => (
-
 
1038
                <option value={key} key={key}>
-
 
1039
                  {value}
-
 
1040
                </option>
-
 
1041
              ))}
-
 
1042
            </select>
-
 
1043
            {errors.timezone && <FormErrorFeedback>{errors.timezone.message}</FormErrorFeedback>}
-
 
1044
          </div>
-
 
1045
        </div>
-
 
1046
        <div className="d-flex flex-wrap pb-3" style={{ gap: '1rem' }}>
-
 
1047
          <div className="cp-field">
-
 
1048
            <label htmlFor="timezone">Tipo de conferencia</label>
-
 
1049
            <select
-
 
1050
              name="type"
-
 
1051
              {...register}
-
 
1052
            >
-
 
1053
              <option value="1">
-
 
1054
                Inmediata
-
 
1055
              </option>
-
 
1056
              <option value="2">
-
 
1057
                Programada
-
 
1058
              </option>
-
 
1059
            </select>
-
 
1060
          </div>
-
 
1061
          <div className="cp-field">
-
 
1062
            <label htmlFor="timezone">Tipo de conferencia</label>
-
 
1063
            <Datetime
-
 
1064
              dateFormat="DD-MM-YYYY"
-
 
1065
              onChange={(e) =>
-
 
1066
                setYear(new Intl.DateTimeFormat('en', { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric' }).format(e.toDate()))
-
 
1067
              }
-
 
1068
              inputProps={{ className: 'form-control' }}
-
 
1069
              initialValue={Date.parse(year)}
-
 
1070
              closeOnSelect
-
 
1071
              open={watch('type') === '1' ? false : true}
1016
            />
1072
            />
1017
            {errors.title && <FormErrorFeedback> {errors.title.message}</FormErrorFeedback>}
-
 
1018
          </div>
1073
          </div>
1019
        </div>
1074
        </div>
-
 
1075
        <button className="btn btn-primary">
-
 
1076
          Crear
-
 
1077
        </button>
1020
      </form>
1078
      </form>
1021
    </StyleModal>
1079
    </StyleModal>
1022
  )
1080
  )
1023
}
1081
}