Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 11421 Rev 11426
Línea 5... Línea 5...
5
import axios from 'axios'
5
import axios from 'axios'
6
import { addNotification } from '../../../redux/notification/notification.actions'
6
import { addNotification } from '../../../redux/notification/notification.actions'
7
import ContentTitle from '../../../shared/ContentTitle'
7
import ContentTitle from '../../../shared/ContentTitle'
8
import { LengthFilter, SearchInput, Table, TablePagination } from '../../../recruitment_and_selection/components/TableComponents'
8
import { LengthFilter, SearchInput, Table, TablePagination } from '../../../recruitment_and_selection/components/TableComponents'
9
import DeleteModal from '../../../shared/DeleteModal'
9
import DeleteModal from '../../../shared/DeleteModal'
-
 
10
import { useHistory } from 'react-router-dom'
Línea 10... Línea 11...
10
 
11
 
11
const headers = [
12
const headers = [
12
	{ key: 'title', label: 'Nombre', isSorteable: true },
13
	{ key: 'title', label: 'Nombre', isSorteable: true },
13
	{ key: 'description', label: 'Descripción', isSorteable: true },
14
	{ key: 'description', label: 'Descripción', isSorteable: true },
Línea 16... Línea 17...
16
	{ key: 'cost', label: 'Costo', isSorteable: true },
17
	{ key: 'cost', label: 'Costo', isSorteable: true },
17
	{ key: 'status', label: 'Estatus', isSorteable: true },
18
	{ key: 'status', label: 'Estatus', isSorteable: true },
18
	{ key: 'actions', label: 'Acciones', isSorteable: false }
19
	{ key: 'actions', label: 'Acciones', isSorteable: false }
19
]
20
]
Línea 20... Línea 21...
20
 
21
 
Línea 21... Línea 22...
21
const ObjectivesAndGoals = ({ add_link, table_link, permisions }) => {
22
const ObjectivesAndGoals = ({ add_link, table_link, permisions, setExternalLink }) => {
-
 
23
 
22
 
24
	const dispatch = useDispatch()
23
	const dispatch = useDispatch()
25
	const history = useHistory()
24
	const [modalToShow, setModalToShow] = useState('')
26
	const [modalToShow, setModalToShow] = useState('')
25
	const [actionLink, setActionLink] = useState(add_link)
27
	const [actionLink, setActionLink] = useState(add_link)
26
	const [items, setItems] = useState([])
28
	const [items, setItems] = useState([])
Línea 140... Línea 142...
140
                                                				item.status === 'a'
142
                                                				item.status === 'a'
141
                                                					? 'Activo'
143
                                                					? 'Activo'
142
                                                					: 'Inactivo'
144
                                                					: 'Inactivo'
143
                                                			}
145
                                                			}
144
                                                		</td>
146
                                                		</td>
-
 
147
                                                		<td>
145
                                                		<td style={{ gap: '10px', display: 'flex' }}>
148
                                                			<div className="d-flex" style={{ gap: '5px' }}>
-
 
149
                                                				{
-
 
150
                                                					permisions.allowObjective
-
 
151
                                                                    &&
-
 
152
                                                                    <i
-
 
153
                                                                    	className='fa fa-level-down'
-
 
154
                                                                    	onClick={() => {
-
 
155
                                                                    		setExternalLink(item.actions.link_objective)
-
 
156
                                                                    		history.push('/goals')
-
 
157
                                                                    	}}
-
 
158
                                                                    	style={{ cursor: 'pointer' }}
-
 
159
                                                                    />
-
 
160
                                                				}
146
                                                			{
161
                                                				{
147
                                                				permisions.allowEdit
162
                                                					permisions.allowEdit
148
                                                                &&
163
                                                                    &&
149
                                                                <i
164
                                                                    <i
150
                                                                	className='fa fa-pencil'
165
                                                                    	className='fa fa-pencil'
151
                                                                	onClick={() => {
166
                                                                    	onClick={() => {
152
                                                                		setActionLink(item.actions.link_edit)
167
                                                                    		setActionLink(item.actions.link_edit)
153
                                                                		setModalToShow('edit')
168
                                                                    		setModalToShow('edit')
154
                                                                	}}
169
                                                                    	}}
155
                                                                	style={{ cursor: 'pointer' }}
170
                                                                    	style={{ cursor: 'pointer' }}
156
                                                                />
171
                                                                    />
157
                                                			}
172
                                                				}
158
                                                			{
173
                                                				{
159
                                                				permisions.allowDelete
174
                                                					permisions.allowDelete
160
                                                                &&
175
                                                                    &&
161
                                                                <i
176
                                                                    <i
162
                                                                	className='fa fa-trash'
177
                                                                    	className='fa fa-trash'
163
                                                                	onClick={() => {
178
                                                                    	onClick={() => {
164
                                                                		setActionLink(item.actions.link_delete)
179
                                                                    		setActionLink(item.actions.link_delete)
165
                                                                		setModalToShow('delete')
180
                                                                    		setModalToShow('delete')
166
                                                                	}}
181
                                                                    	}}
167
                                                                	style={{ cursor: 'pointer' }}
182
                                                                    	style={{ cursor: 'pointer' }}
168
                                                                />
183
                                                                    />
-
 
184
                                                				}
-
 
185
                                                				{
-
 
186
                                                					permisions.allowObjectiveReport
-
 
187
                                                                    &&
-
 
188
                                                                    <a href={item.actions.link_objective_report} target='_blank' rel="noreferrer">
-
 
189
                                                                    	<i
-
 
190
                                                                    		className='fa fa-file-down'
-
 
191
                                                                    		style={{ cursor: 'pointer' }}
-
 
192
                                                                    	/>
-
 
193
                                                                    </a>
169
                                                			}
194
                                                				}
-
 
195
                                                			</div>
170
                                                		</td>
196
                                                		</td>
171
                                                	</tr>
197
                                                	</tr>
172
                                                ))
198
                                                ))
173
											}
199
											}
174
										</Table>
200
										</Table>