Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 671 Rev 672
Línea 14... Línea 14...
14
import ProfileInfo from '../../components/widgets/default/ProfileWidget'
14
import ProfileInfo from '../../components/widgets/default/ProfileWidget'
15
import styled from 'styled-components'
15
import styled from 'styled-components'
16
import StyledContainer from '../../components/widgets/WidgetLayout'
16
import StyledContainer from '../../components/widgets/WidgetLayout'
17
import Paraphrase from '../../components/UI/Paraphrase'
17
import Paraphrase from '../../components/UI/Paraphrase'
Línea 18... Línea 18...
18
 
18
 
-
 
19
const StyledNotificationItem = styled(StyledContainer)`
19
const StyledNotificationsContainer = styled(StyledContainer)`
20
  position: relative;
-
 
21
  display: flex;
-
 
22
  flex-direction: column;
-
 
23
  margin-bottom: 0.5rem;
-
 
24
  p {
-
 
25
    margin-bottom: 0;
20
  padding: 10px;
26
  }
Línea 21... Línea 27...
21
`
27
`
22
 
28
 
23
const StyledActionButton = styled(IconButton)`
29
const StyledActionButton = styled(IconButton)`
24
  position: absolute;
30
  position: absolute !important;
25
  right: 0.5rem;
31
  right: 0.5rem;
26
  top: 50%;
32
  top: 50%;
Línea 153... Línea 159...
153
              country={country}
159
              country={country}
154
              connections={connections}
160
              connections={connections}
155
            />
161
            />
156
          </Col>
162
          </Col>
157
          <Col as='section' md='8'>
163
          <Col as='section' md='8'>
158
            <StyledNotificationsContainer>
164
            <StyledContainer>
159
              <StyledNotificationsContainer.Header title='Notificaciones'>
165
              <StyledContainer.Header title='Notificaciones'>
160
                <Options
166
                <Options
161
                  options={[
167
                  options={[
162
                    {
168
                    {
163
                      label: 'Borrar notificaciones',
169
                      label: 'Borrar notificaciones',
164
                      action: toggleConfirmModal
170
                      action: toggleConfirmModal
165
                    }
171
                    }
166
                  ]}
172
                  ]}
167
                />
173
                />
168
              </StyledNotificationsContainer.Header>
174
              </StyledContainer.Header>
Línea -... Línea 175...
-
 
175
 
169
 
176
              <StyledContainer.Body>
170
              {notifications.length ? (
177
                {notifications.length ? (
171
                [...notifications].reverse().map((notification, index) => (
178
                  [...notifications].reverse().map((notification, index) => (
172
                  <div key={index}>
179
                    <div key={index}>
173
                    <NotificationsPage.Item
180
                      <NotificationsPage.Item
174
                      onDelete={deleteNotification}
181
                        onDelete={deleteNotification}
175
                      {...notification}
182
                        {...notification}
176
                    />
183
                      />
177
                  </div>
184
                    </div>
178
                ))
185
                  ))
-
 
186
                ) : (
179
              ) : (
187
                  <EmptySection
-
 
188
                    message='No hay notificaciones'
-
 
189
                    align='center'
180
                <EmptySection message='No hay notificaciones' align='center' />
190
                  />
-
 
191
                )}
181
              )}
192
              </StyledContainer.Body>
182
            </StyledNotificationsContainer>
193
            </StyledContainer>
183
          </Col>
194
          </Col>
184
        </Row>
195
        </Row>
185
      </Container>
196
      </Container>
186
      <ConfirmModal
197
      <ConfirmModal
Línea 195... Línea 206...
195
  )
206
  )
196
}
207
}
Línea 197... Línea 208...
197
 
208
 
198
const Item = ({ link_delete, link, message, time_elapsed, onDelete }) => {
209
const Item = ({ link_delete, link, message, time_elapsed, onDelete }) => {
199
  return (
210
  return (
200
    <div className='notification-item'>
211
    <StyledNotificationItem>
201
      <Link to={link}>
212
      <Link to={link}>
202
        <Paraphrase>{message}</Paraphrase>
213
        <Paraphrase>{message}</Paraphrase>
203
      </Link>
214
      </Link>
Línea 204... Línea 215...
204
      <span>{time_elapsed}</span>
215
      <span>{time_elapsed}</span>
205
 
216
 
206
      <StyledActionButton onClick={() => onDelete(link_delete)}>
217
      <StyledActionButton onClick={() => onDelete(link_delete)}>
207
        <DeleteOutline />
218
        <DeleteOutline />
208
      </StyledActionButton>
219
      </StyledActionButton>
209
    </div>
220
    </StyledNotificationItem>
Línea 210... Línea 221...
210
  )
221
  )