Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 4906 Rev 4932
Línea 1... Línea 1...
1
import axios from 'axios'
1
import axios from 'axios'
2
import React, { useEffect, useState } from 'react'
2
import React, { useEffect, useState } from 'react'
-
 
3
import Table from './Table';
Línea 3... Línea 4...
3
 
4
 
Línea 4... Línea 5...
4
const CompanySizesView = ({ urlsVar }) => {
5
const CompanySizesView = ({ urlsVar }) => {
5
 
6
 
Línea 29... Línea 30...
29
            .catch((err) => console.log(err))
30
            .catch((err) => console.log(err))
30
    }
31
    }
Línea 31... Línea 32...
31
 
32
 
32
    useEffect(() => {
33
    useEffect(() => {
33
        getData()
-
 
34
        console.log(companyData)
34
        getData()
Línea 35... Línea 35...
35
    }, [search, dataLength, page]);
35
    }, [search, dataLength, page]);
36
 
36
 
37
    return (
37
    return (
Línea 84... Línea 84...
84
                                                </div>
84
                                                </div>
85
                                            </div>
85
                                            </div>
86
                                        </div>
86
                                        </div>
87
                                        <div className="row">
87
                                        <div className="row">
88
                                            <div className="col-sm-12">
88
                                            <div className="col-sm-12">
89
                                                <table
-
 
90
                                                    className="table table-hover dataTable no-footer dtr-inline" role="grid"
-
 
91
                                                    aria-describedby="gridTable_info"
-
 
92
                                                >
89
                                                {
93
                                                    <thead>
-
 
94
                                                        <tr role="row">
-
 
95
                                                            <th
-
 
96
                                                                className="text-vertical-middle sorting sorting_asc"
-
 
97
                                                                aria-sort="ascending"
-
 
98
                                                                aria-label="Nombre:Activar para ordenar la columna de manera descendente"
-
 
99
                                                            >
-
 
100
                                                                Nombre
-
 
101
                                                            </th>
-
 
102
                                                            <th
-
 
103
                                                                className="text-right text-vertical-middle sorting"
-
 
104
                                                                aria-sort="ascending"
-
 
105
                                                            >
-
 
106
                                                                Mínimo
-
 
107
                                                            </th>
90
                                                    companyData.items
108
                                                        </tr>
-
 
109
                                                    </thead>
-
 
110
                                                    <tbody>
91
                                                    &&
111
                                                        {
92
                                                    <Table
112
                                                            companyData.items
93
                                                        data={companyData.items}
113
                                                            &&
-
 
114
                                                            companyData.items.map((item) => (
-
 
115
                                                                <tr key={item.id}>
-
 
116
                                                                    <td
-
 
117
                                                                        className="text-vertical-middle sorting_1 dtr-control">
-
 
118
                                                                        {item.name}
-
 
119
                                                                    </td>
-
 
120
                                                                    <td
-
 
121
                                                                        className="text-right text-vertical-middle sorting_1 dtr-control">
-
 
122
                                                                        {item.minimum_no_of_employee}
-
 
123
                                                                    </td>
-
 
124
                                                                    <td className="text-right text-vertical-middle">
-
 
125
                                                                        {item.maximum_no_of_employee}
-
 
126
                                                                    </td>
-
 
127
                                                                    <td className=" text-center">
-
 
128
                                                                        {
-
 
129
                                                                            item.status === 'a'
-
 
130
                                                                                ? <i className='fa fa-check' />
-
 
131
                                                                                : <i className='fa fa-xmark' />
-
 
132
                                                                        }
-
 
133
                                                                    </td>
-
 
134
                                                                    <td>
-
 
135
                                                                        <button className="btn btn-primary btn-edit">
-
 
136
                                                                            <a href={item.actions.link_delete}>
-
 
137
                                                                                <i className="fa fa-pencil" />
-
 
138
                                                                                Editar
-
 
139
                                                                            </a>
-
 
140
                                                                        </button>
-
 
141
                                                                        <button className="btn btn-danger btn-delete">
-
 
142
                                                                            <a href={item.actions.link_edit}>
-
 
143
                                                                                <i className="fa fa-trash" />
-
 
144
                                                                                Borrar
-
 
145
                                                                            </a>
-
 
146
                                                                        </button>
-
 
147
                                                                    </td>
-
 
148
                                                                </tr>
-
 
149
                                                            ))
-
 
150
                                                        }
94
                                                    />
151
                                                    </tbody>
-
 
152
                                                </table>
95
                                                }
153
                                            </div>
96
                                            </div>
154
                                        </div>
97
                                        </div>
155
                                    </div>
98
                                    </div>
156
                                </div>
99
                                </div>
157
                            </div>
100
                            </div>