Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 14201 Rev 14253
Línea 118... Línea 118...
118
							<Card>
118
							<Card>
119
								<Card.Header>
119
								<Card.Header>
120
									<div className="row justify-content-end" style={{ gap: '10px' }}>
120
									<div className="row justify-content-end" style={{ gap: '10px' }}>
121
										{
121
										{
122
											permisions.allowAdd
122
											permisions.allowAdd
123
                                            &&
123
											&&
124
                                            <label
124
											<label
125
                                            	onClick={getImport}
125
												onClick={getImport}
126
                                            	className='d-flex align-items-center btn-add'
126
												className='d-flex align-items-center btn-add'
127
                                            	style={{ cursor: 'pointer' }}
127
												style={{ cursor: 'pointer' }}
128
                                            >
128
											>
129
                                            	<i className="fa fa-upload mr-2" />
129
												<i className="fa fa-upload mr-2" />
130
                                                Importar
130
												Importar
131
                                            </label>
131
											</label>
132
										}
132
										}
133
										{
133
										{
134
											permisions.allowAdd
134
											permisions.allowAdd
-
 
135
											&&
-
 
136
											<label
135
                                            &&
137
												onClick={() => {
136
                                            <label
138
													setActionLink(add_link)
137
                                            	onClick={() => setActionLink(add_link)}
139
													history.push('/settings/jobs-description/add')
-
 
140
												}}
138
                                            	className='d-flex align-items-center btn-add'
141
												className='d-flex align-items-center btn-add'
139
                                            	style={{ cursor: 'pointer' }}
142
												style={{ cursor: 'pointer' }}
140
                                            >
143
											>
141
                                            	<i className="fa fa-plus mr-2" />
144
												<i className="fa fa-plus mr-2" />
142
                                                Agregar
145
												Agregar
143
                                            </label>
146
											</label>
144
										}
147
										}
145
										<label
148
										<label
146
											className='d-flex align-items-center'
149
											className='d-flex align-items-center'
147
											onClick={() => getData({
150
											onClick={() => getData({
148
												url: table_link,
151
												url: table_link,
Línea 153... Línea 156...
153
												}
156
												}
154
											})}
157
											})}
155
											style={{ cursor: 'pointer' }}
158
											style={{ cursor: 'pointer' }}
156
										>
159
										>
157
											<i className='fa fa-refresh mr-2' />
160
											<i className='fa fa-refresh mr-2' />
158
                                            Actualizar
161
											Actualizar
159
										</label>
162
										</label>
160
									</div>
163
									</div>
161
									<div className="row justify-content-between align-items-center">
164
									<div className="row justify-content-between align-items-center">
162
										<LengthFilter onChange={(e) => setDataLength(e.target.value)} />
165
										<LengthFilter onChange={(e) => setDataLength(e.target.value)} />
163
										<SearchInput onChange={(e) => setSearch(e.target.value)} />
166
										<SearchInput onChange={(e) => setSearch(e.target.value)} />
Línea 166... Línea 169...
166
								<Card.Body>
169
								<Card.Body>
167
									<div className="table-responsive">
170
									<div className="table-responsive">
168
										<Table data={items} headers={headers} setData={setItems}>
171
										<Table data={items} headers={headers} setData={setItems}>
169
											{
172
											{
170
												items.length
173
												items.length
171
                                                &&
174
												&&
172
                                                items.map((item, index) => (
175
												items.map((item, index) => (
173
                                                	<tr key={index}>
176
													<tr key={index}>
174
                                                		<td className='text-vertical-middle'>{item.name}</td>
177
														<td className='text-vertical-middle'>{item.name}</td>
175
                                                		<td className='text-vertical-middle'>
178
														<td className='text-vertical-middle'>
176
                                                			{item.status === 'a'
179
															{item.status === 'a'
177
                                                				? 'Activo'
180
																? 'Activo'
178
                                                				: 'Inactivo'
181
																: 'Inactivo'
179
                                                			}
182
															}
180
                                                		</td>
183
														</td>
181
                                                		<td>
184
														<td>
182
                                                			<div className="d-flex align-items-center" style={{ gap: '.5rem' }}>
185
															<div className="d-flex align-items-center" style={{ gap: '.5rem' }}>
183
                                                				{
186
																{
184
                                                					permisions.allowEdit
187
																	permisions.allowEdit
185
                                                                    &&
188
																	&&
186
                                                                    <i
189
																	<i
187
                                                                    	onClick={() => {
190
																		onClick={() => {
188
                                                                    		setActionLink(item.actions.link_edit)
191
																			setActionLink(item.actions.link_edit)
189
                                                                    		history.push('/settings/jobs-description/edit')
192
																			history.push('/settings/jobs-description/edit')
190
                                                                    	}}
193
																		}}
191
                                                                    	className='fa fa-pencil'
194
																		className='fa fa-pencil'
192
                                                                    	style={{ cursor: 'pointer' }}
195
																		style={{ cursor: 'pointer' }}
193
                                                                    />
196
																	/>
194
                                                				}
197
																}
195
                                                				{
198
																{
196
                                                					permisions.allowDelete
199
																	permisions.allowDelete
197
                                                                    &&
200
																	&&
198
                                                                    <i
201
																	<i
199
                                                                    	className='fa fa-trash'
202
																		className='fa fa-trash'
200
                                                                    	onClick={() => {
203
																		onClick={() => {
201
                                                                    		setActionLink(item.actions.link_delete)
204
																			setActionLink(item.actions.link_delete)
202
                                                                    		setIsOpen(true)
205
																			setIsOpen(true)
203
                                                                    	}}
206
																		}}
204
                                                                    	style={{ cursor: 'pointer' }}
207
																		style={{ cursor: 'pointer' }}
205
                                                                    />
208
																	/>
206
                                                				}
209
																}
207
                                                				{
210
																{
208
                                                					permisions.allowReport
211
																	permisions.allowReport
209
                                                                    &&
212
																	&&
210
                                                                    <a
213
																	<a
211
                                                                    	href={item.actions.link_report}
214
																		href={item.actions.link_report}
212
                                                                    	target='_blank'
215
																		target='_blank'
213
                                                                    	rel="noreferrer"
216
																		rel="noreferrer"
214
                                                                    >
217
																	>
215
                                                                    	<i
218
																		<i
216
                                                                    		className='fa fa-file'
219
																			className='fa fa-file'
217
                                                                    		style={{ cursor: 'pointer' }}
220
																			style={{ cursor: 'pointer' }}
218
                                                                    	/>
221
																		/>
219
                                                                    </a>
222
																	</a>
220
                                                				}
223
																}
221
                                                			</div>
224
															</div>
222
                                                		</td>
225
														</td>
223
                                                	</tr>
226
													</tr>
224
                                                ))
227
												))
225
											}
228
											}
226
										</Table>
229
										</Table>
227
									</div>
230
									</div>
228
									<div className='row justify-content-between align-items-center'>
231
									<div className='row justify-content-between align-items-center'>
229
										<p className='mb-0'>
232
										<p className='mb-0'>