Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 15507 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 15507 Rev 15530
Línea 3... Línea 3...
3
import EditModal from './EditModal'
3
import EditModal from './EditModal'
4
import DeleteModal from '../../../shared/DeleteModal'
4
import DeleteModal from '../../../shared/DeleteModal'
5
import TableFilters from '../../../shared/table/TableFilters'
5
import TableFilters from '../../../shared/table/TableFilters'
6
import Table from '../../../shared/table/Table'
6
import Table from '../../../shared/table/Table'
Línea 7... Línea -...
7
 
-
 
8
const IndustriesView = ({ urlsVar }) => {
7
 
9
	const { linkTable, addUrl, allowAdd, allowEdit, allowDelete } = urlsVar
-
 
10
 
8
const IndustriesView = ({ linkTable, addUrl, allowAdd, allowEdit, allowDelete }) => {
11
	const [industries, setIndustries] = useState({})
-
 
12
 
9
	const [industries, setIndustries] = useState({})
13
	const [selectItem, setSelectItem] = useState(null)
10
	const [selectItem, setSelectItem] = useState(null)
14
	const [actionLink, setActionLink] = useState(addUrl)
-
 
15
 
11
	const [actionLink, setActionLink] = useState(addUrl)
16
	const [showModal, setShowModal] = useState(false)
12
	const [showModal, setShowModal] = useState(false)
Línea 17... Línea 13...
17
	const [showDeleteModal, setShowDeleteModal] = useState(false)
13
	const [showDeleteModal, setShowDeleteModal] = useState(false)
18
 
14
 
Línea 58... Línea 54...
58
		<>
54
		<>
59
			<section className="content">
55
			<section className="content">
60
				<section className="content-header">
56
				<section className="content-header">
61
					<h1>Industrias</h1>
57
					<h1>Industrias</h1>
62
				</section>
58
				</section>
63
				<div className="container-fluid">
59
				<section className="container-fluid">
64
					<TableFilters data={industries} getData={getData} onAdd={addItem} allowAdd={allowAdd}>
60
					<TableFilters data={industries} getData={getData} onAdd={addItem} allowAdd={allowAdd}>
65
						{industries.items && 
61
						{industries.items &&
66
						function() {
62
							function () {
67
							return (
63
								return (
68
								<Table
64
									<Table
69
									data={industries.items}
65
										data={industries.items}
70
									onEdit={editItem}
66
										onEdit={editItem}
71
									onDelete={deleteItem}
67
										onDelete={deleteItem}
72
									headers={headers}
68
										headers={headers}
73
									allowEdit={allowEdit}
69
										allowEdit={allowEdit}
74
									allowDelete={allowDelete}
70
										allowDelete={allowDelete}
75
								/>
71
									/>
76
							)
72
								)
77
						}()}
73
							}()}
78
					</TableFilters>
74
					</TableFilters>
79
				</div>
75
				</section>
80
			</section>
76
			</section>
81
			<EditModal
77
			<EditModal
-
 
78
				title='Indusrias'
82
				isOpen={showModal}
79
				isOpen={showModal}
83
				url={actionLink}
80
				url={actionLink}
84
				currentItem={selectItem}
81
				currentItem={selectItem}
85
				onComplete={()=> getData()}
82
				onComplete={() => getData()}
86
				onClose={()=> {
83
				onClose={() => {
87
					if(selectItem) setSelectItem(null)
84
					if (selectItem) setSelectItem(null)
88
					closeModal()
85
					closeModal()
89
				}}
86
				}}
90
			/>
87
			/>
91
			<DeleteModal
88
			<DeleteModal
92
				isOpen={showDeleteModal}
89
				isOpen={showDeleteModal}