Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 11347 Rev 15801
Línea 1... Línea 1...
1
import React from 'react'
1
import React from "react";
2
import ChatMail from "./ChatRoom"
2
import ChatMail from "./ChatRoom";
3
import Sidebar from './Sidebar'
3
import Sidebar from "./Sidebar";
4
import { Modal } from 'react-bootstrap'
4
import { Modal } from "react-bootstrap";
5
import { axios } from '../../../utils'
5
import { axios } from "../../../utils";
6
import Chat from '../chat/Chat'
6
import Chat from "../chat/Chat";
7
import styled from "styled-components";
7
import styled from "styled-components";
8
import Spinner from '../../../shared/loading-spinner/Spinner'
8
import Spinner from "../../../shared/loading-spinner/Spinner";
Línea 9... Línea 9...
9
 
9
 
10
const StyledSpinnerContainer = styled.div`
10
const StyledSpinnerContainer = styled.div`
11
  position: absolute;
11
  position: absolute;
12
  left: 0;
12
  left: 0;
Línea 17... Línea 17...
17
  display: flex;
17
  display: flex;
18
  justify-content: center;
18
  justify-content: center;
19
  align-items: center;
19
  align-items: center;
20
  z-index: 300;
20
  z-index: 300;
21
`;
21
`;
201
                    </div>
170
                    </div>
202
                    <div className="messages-sec">
-
 
203
                        <div className="row">
171
                    <div className="col-4">
204
                            <div className="col-lg-4 col-md-12 no-pdd">
-
 
205
                                <div className="msgs-list">
-
 
206
                                    <div
-
 
207
                                        className="msg-title d-flex align-items-center"
-
 
208
                                        style={{
-
 
209
                                            minHeight: '13vh'
-
 
210
                                        }}
-
 
211
                                    >
-
 
212
                                        <h3>Personas y grupos</h3>
-
 
213
                                        {/* <button
-
 
214
                                            className='btn btn-link text-dark btn-sm'
-
 
215
                                            onClick={() => setVisible(true)}
-
 
216
                                        >
-
 
217
                                            <i className='fa fa-plus text-dark' />
-
 
218
                                        </button> */}
-
 
219
                                    </div>
-
 
220
                                    <Sidebar
-
 
221
                                        onClick={conversation => handleChangeConversation(conversation)}
-
 
222
                                        conversations={[... props.chatUsers, ... props.chatGroups]}
-
 
223
                                        selectedConversation={selectedConversation}
-
 
224
                                    />
-
 
225
                                </div>
-
 
226
                            </div>
-
 
227
                            <div
-
 
228
                                className="col-lg-8 col-md-12 pd-right-none pd-left-none"
-
 
229
                                style={{
-
 
230
                                    maxHeight: '85vh'
-
 
231
                                }}
-
 
232
                            >
172
                      <button
233
                                {
-
 
234
                                    !!selectedConversation ? 
-
 
235
                                    <Chat
173
                        className="btn btn-primary"
236
                                        entity={selectedConversation}
-
 
237
                                        onCloseChat={handleCloseChat}
174
                        onClick={() => handleInmailPerson(element.value)}
238
                                    />
-
 
239
                                    :
-
 
240
                                    <div>
-
 
241
                                        <p>Seleccione un chat</p>
-
 
242
                                    </div>
-
 
243
                                }
175
                      >
244
                                {/* <ChatMail
-
 
245
                                    getMoreMessages={() => getMoreMessages()}
-
 
246
                                    backendVars={props.backendVars}
-
 
247
                                    onSend={text => handleSend(text)}
-
 
248
                                    messages={messages}
176
                        <i className="fa fa-check" />
249
                                    selectedConversation={selectedConversation}
-
 
250
                                /> */}
-
 
251
                            </div>
-
 
252
                        </div>
177
                      </button>
253
                    </div>
178
                    </div>
-
 
179
                  </div>
-
 
180
                );
-
 
181
              })}
-
 
182
            </div>
-
 
183
            <a href="#" onClick={onClose} className="btn btn-danger">
-
 
184
              Cerrar
-
 
185
            </a>
-
 
186
          </div>
-
 
187
        </div>
-
 
188
      </Modal>
-
 
189
      <section className="messages-page">
-
 
190
        <div className="messages-sec">
-
 
191
          <div className="row">
-
 
192
            <div className="col-lg-4 col-md-12 no-pdd">
-
 
193
              <div className="chat_contacts">
-
 
194
                <h2 className="chat-title">Personas y grupos</h2>
-
 
195
                <Sidebar
-
 
196
                  onClick={(conversation) =>
-
 
197
                    handleChangeConversation(conversation)
-
 
198
                  }
-
 
199
                  conversations={[...props.chatUsers, ...props.chatGroups]}
-
 
200
                  selectedConversation={selectedConversation}
-
 
201
                />
-
 
202
              </div>
-
 
203
            </div>
-
 
204
            <div className="col-12 col-md-8">
-
 
205
              {!!selectedConversation ? (
-
 
206
                <Chat
-
 
207
                  entity={selectedConversation}
-
 
208
                  onCloseChat={handleCloseChat}
-
 
209
                />
-
 
210
              ) : (
-
 
211
                <div>
-
 
212
                  <p>Seleccione un chat</p>
254
                </div>
213
                </div>
255
            </section>
-
 
256
        </>
-
 
257
    )
-
 
258
}
-
 
259
214
              )}
-
 
215
            </div>
-
 
216
          </div>
-
 
217
        </div>
-
 
218
      </section>
-
 
219
    </>
-
 
220
  );
-
 
221
};
-
 
222