Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 16227 Rev 16253
Línea 3... Línea 3...
3
import { useForm } from "react-hook-form";
3
import { useForm } from "react-hook-form";
Línea 4... Línea 4...
4
 
4
 
5
import Emojione from "./emojione/Emojione";
5
import Emojione from "./emojione/Emojione";
6
import FileModal from "./fileModal/FileModal";
6
import FileModal from "./fileModal/FileModal";
-
 
7
import MessagesList from "./messages/MessagesList";
7
import MessagesList from "./messages/MessagesList";
8
import ConferenceModal from "./components/ConferenceModal";
8
import IconButton from "@mui/material/IconButton";
9
import IconButton from "@mui/material/IconButton";
9
import AttachFileIcon from "@mui/icons-material/AttachFile";
10
import AttachFileIcon from "@mui/icons-material/AttachFile";
10
import InsertEmoticonIcon from "@mui/icons-material/InsertEmoticon";
11
import InsertEmoticonIcon from "@mui/icons-material/InsertEmoticon";
11
import SendIcon from "@mui/icons-material/Send";
12
import SendIcon from "@mui/icons-material/Send";
Línea 38... Línea 39...
38
    url_get_all_messages,
39
    url_get_all_messages,
39
    url_send,
40
    url_send,
40
    url_upload,
41
    url_upload,
41
    url_close,
42
    url_close,
42
    url_mark_seen,
43
    url_mark_seen,
-
 
44
    url_zoom,
43
    type,
45
    type,
44
  } = entity;
46
  } = entity;
Línea 45... Línea 47...
45
 
47
 
46
  // Get messages
48
  // Get messages
Línea 199... Línea 201...
199
 
201
 
Línea 200... Línea 202...
200
  useEffect(() => axios.post(url_mark_seen), []);
202
  useEffect(() => axios.post(url_mark_seen), []);
201
 
203
 
202
  return (
204
  return (
203
    <div className={styles.chat}>
205
    <div className={styles.chat}>
204
      <Chat.Header name={entity.name} />
206
      <Chat.Header name={entity.name} conferenceUrl={url_zoom} />
205
      <MessagesList
207
      <MessagesList
206
        isLastPage={currentPage >= totalPages}
208
        isLastPage={currentPage >= totalPages}
207
        messages={[...oldMessages, ...messages]}
209
        messages={[...oldMessages, ...messages]}
Línea 257... Línea 259...
257
      )}
259
      )}
258
    </div>
260
    </div>
259
  );
261
  );
260
};
262
};
Línea 261... Línea 263...
261
 
263
 
262
const Header = ({ name, conferenceUrl }) => {
264
const Header = ({ name, conferenceUrl, timezones = {} }) => {
Línea 263... Línea 265...
263
  const [isShowConferenceModal, setisShowConferenceModal] = useState(false);
265
  const [isShowConferenceModal, setisShowConferenceModal] = useState(false);
264
 
266
 
Línea 265... Línea 267...
265
  const toggleConferenceModal = () =>
267
  const toggleConferenceModal = () =>
266
    setisShowConferenceModal(!isShowConferenceModal);
268
    setisShowConferenceModal(!isShowConferenceModal);
267
 
269
 
Línea 268... Línea 270...
268
  const options = [
270
  const options = [
-
 
271
    { label: "Crear Conferencia", action: toggleConferenceModal },
269
    { label: "Crear Conferencia", action: toggleConferenceModal },
272
  ];
270
  ];
273
 
271
 
274
  return (
272
  return (
275
    <>
-
 
276
      <div className={styles.chat_header}>
-
 
277
        <h2>{name}</h2>
-
 
278
        <Header.Options options={options} />
-
 
279
      </div>
-
 
280
      <ConferenceModal
-
 
281
        show={isShowConferenceModal}
-
 
282
        timezones={timezones}
273
    <div className={styles.chat_header}>
283
        zoomUrl={conferenceUrl}
274
      <h2>{name}</h2>
284
        onCreate={() => toggleConferenceModal()}
Línea 275... Línea 285...
275
      <Header.Options options={options} />
285
      />
276
    </div>
286
    </>
Línea 292... Línea 302...
292
      <div className="position-relative">
302
      <div className="position-relative">
293
        <div className={`feed-options ${isShowMenu ? "active" : ""}`}>
303
        <div className={`feed-options ${isShowMenu ? "active" : ""}`}>
294
          <ul>
304
          <ul>
295
            {options.map((option, index) => (
305
            {options.map((option, index) => (
296
              <li key={index}>
306
              <li key={index}>
-
 
307
                <button
297
                <button className="btn option-btn" onClick={option.action}>
308
                  className="btn option-btn"
-
 
309
                  onClick={() => {
-
 
310
                    toggleOptions();
-
 
311
                    option.action();
-
 
312
                  }}
-
 
313
                >
298
                  {option.label}
314
                  {option.label}
299
                </button>
315
                </button>
300
              </li>
316
              </li>
301
            ))}
317
            ))}
302
          </ul>
318
          </ul>