Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 7777 Rev 8051
Línea 4... Línea 4...
4
const Location = ({ locations = [], googleApiKey, locationsAddUrl }) => {
4
const Location = ({ locations = [], googleApiKey, locationsAddUrl }) => {
Línea 5... Línea 5...
5
 
5
 
6
    const [actionUrl, setActionUrl] = useState(locationsAddUrl)
6
    const [actionUrl, setActionUrl] = useState(locationsAddUrl)
7
    const [defaultData, setDefaultData] = useState('')
7
    const [defaultData, setDefaultData] = useState('')
-
 
8
    const [showModal, setShowModal] = useState(false)
-
 
9
    const [showDeleteModal, setShowDeleteModal] = useState(false)
Línea 8... Línea 10...
8
    const [showModal, setShowModal] = useState(false)
10
    const [deleteLink, setDeleteLink] = useState('')
9
 
11
 
10
    const addLocation = (url) => {
12
    const addLocation = (url) => {
11
        setShowModal(true)
13
        setShowModal(true)
Línea 17... Línea 19...
17
        setActionUrl(url)
19
        setActionUrl(url)
18
        setDefaultData(item)
20
        setDefaultData(item)
19
    }
21
    }
Línea 20... Línea 22...
20
 
22
 
-
 
23
    const closeModal = () => setShowModal(false)
Línea 21... Línea 24...
21
    const closeModal = () => setShowModal(false)
24
    const closeDeleteModal = () => setShowDeleteModal(false)
-
 
25
 
-
 
26
    const deleteLocation = (url) => {
-
 
27
        setShowDeleteModal(true)
Línea 22... Línea 28...
22
 
28
        setDeleteLink(url)
23
    const deleteLocation = (url) => { }
29
    }
24
 
30
 
25
    return (
31
    return (
Línea 72... Línea 78...
72
                    dataLink={actionUrl}
78
                    dataLink={actionUrl}
73
                    googleApiKey={googleApiKey}
79
                    googleApiKey={googleApiKey}
74
                    defaultData={defaultData}
80
                    defaultData={defaultData}
75
                />
81
                />
76
            }
82
            }
-
 
83
            {
-
 
84
                showDeleteModal
-
 
85
                &&
-
 
86
                <DeleteModal
-
 
87
                    url={deleteLink}
-
 
88
                    isOpen={showDeleteModal}
-
 
89
                    closeModal={closeDeleteModal}
-
 
90
                    title={`Esta seguro de eliminar esta ubicación?`}
-
 
91
                    onComplete={() => deleteLocation(locationToDelete)}
-
 
92
                    message={`Ubicación eliminada`}
-
 
93
                />
-
 
94
            }
77
        </>
95
        </>
78
    )
96
    )
79
}
97
}
Línea 80... Línea 98...
80
 
98
 
81
export default Location
99
export default Location