Loading web/src/data/datasource/api/place_datasource.ts +1 −1 Original line number Diff line number Diff line Loading @@ -132,6 +132,6 @@ export class PlaceDatasourceProd implements PlaceDatasourceInf { * @returns A promise that resolves when the place is deleted. */ async deletePlace(idPlace: number): Promise<void> { //await axios.patch(APIUrl + `/place/${idPlace}`) await axios.delete(APIUrl + `/place/${idPlace}`) } } web/src/presentation/admin/admin_panel_places/admin_panel_place_list/admin_panel_place_list.tsx +6 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ interface props { setIsWindowActiveDelete: Dispatch<SetStateAction<boolean>>; setActualPlace: Dispatch<SetStateAction<Place | undefined>>; setIsRegisterPane: Dispatch<SetStateAction<boolean>>; forceRenderList: () => void; } // Define the AdminPanelPlaceList component Loading @@ -28,9 +29,11 @@ export const AdminPanelPlaceList = ({ setActualPlace, setIsRegisterPane, setIsWindowActiveDelete, forceRenderList, }: props) => { // Use the custom hook to fetch place data const { placeList, pending, updatePlacesByTown, deletePlace } = usePlace(); const { placeList, pending, updatePlacesByTown, deletePlace } = usePlace(forceRenderList); // State variables for managing dialog and deletion const [isDialogOpen, setIsDialogOpen] = useState(false); Loading Loading @@ -113,7 +116,8 @@ export const AdminPanelPlaceList = ({ } }} /> <span style={{ margin: "0 10px" }}></span> {/* Separation between icons */} <span style={{ margin: "0 10px" }}></span>{" "} {/* Separation between icons */} <FontAwesomeIcon style={isWindowActive ? { color: "gray" } : { cursor: "pointer" }} icon={faEdit} Loading web/src/presentation/admin/admin_panel_places/admin_panel_place_screen/admin_panel_place_screen.tsx +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ export const AdminPanelPlaceScreen = ({ setActualPlace={setActualPlace} setIsRegisterPane={setIsRegisterPane} setIsWindowActiveDelete={setIsWindowActive} forceRenderList={forceRenderList} /> </div> </div> Loading Loading
web/src/data/datasource/api/place_datasource.ts +1 −1 Original line number Diff line number Diff line Loading @@ -132,6 +132,6 @@ export class PlaceDatasourceProd implements PlaceDatasourceInf { * @returns A promise that resolves when the place is deleted. */ async deletePlace(idPlace: number): Promise<void> { //await axios.patch(APIUrl + `/place/${idPlace}`) await axios.delete(APIUrl + `/place/${idPlace}`) } }
web/src/presentation/admin/admin_panel_places/admin_panel_place_list/admin_panel_place_list.tsx +6 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ interface props { setIsWindowActiveDelete: Dispatch<SetStateAction<boolean>>; setActualPlace: Dispatch<SetStateAction<Place | undefined>>; setIsRegisterPane: Dispatch<SetStateAction<boolean>>; forceRenderList: () => void; } // Define the AdminPanelPlaceList component Loading @@ -28,9 +29,11 @@ export const AdminPanelPlaceList = ({ setActualPlace, setIsRegisterPane, setIsWindowActiveDelete, forceRenderList, }: props) => { // Use the custom hook to fetch place data const { placeList, pending, updatePlacesByTown, deletePlace } = usePlace(); const { placeList, pending, updatePlacesByTown, deletePlace } = usePlace(forceRenderList); // State variables for managing dialog and deletion const [isDialogOpen, setIsDialogOpen] = useState(false); Loading Loading @@ -113,7 +116,8 @@ export const AdminPanelPlaceList = ({ } }} /> <span style={{ margin: "0 10px" }}></span> {/* Separation between icons */} <span style={{ margin: "0 10px" }}></span>{" "} {/* Separation between icons */} <FontAwesomeIcon style={isWindowActive ? { color: "gray" } : { cursor: "pointer" }} icon={faEdit} Loading
web/src/presentation/admin/admin_panel_places/admin_panel_place_screen/admin_panel_place_screen.tsx +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ export const AdminPanelPlaceScreen = ({ setActualPlace={setActualPlace} setIsRegisterPane={setIsRegisterPane} setIsWindowActiveDelete={setIsWindowActive} forceRenderList={forceRenderList} /> </div> </div> Loading