Skip to content

Commit

Permalink
Terminado carrito de compras
Browse files Browse the repository at this point in the history
  • Loading branch information
agustinintro11 committed Nov 24, 2019
1 parent 937d2d8 commit 39861e5
Show file tree
Hide file tree
Showing 16 changed files with 354 additions and 128 deletions.
2 changes: 1 addition & 1 deletion envases.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"categoria":"Cartón","imagen":"imagenes\/4b8a4e610ccf4c2ba0d23565df913119.jpg","id":"123","nombre":"Gabos"},{"categoria":"Vidrio \/ Cerámica","imagen":"imagenes\/fcc72ccd2a4246089e1ff526bc5daf07.jpg","id":"873","nombre":"Mortadela"},{"categoria":"Plástico","imagen":"","id":"2222","nombre":"22"},{"categoria":"Cartón","imagen":"","id":"34567","nombre":"345"},{"categoria":"Plástico","imagen":"imagenes\/373b579bc40c4129a11909075295b18c.jpg","id":"11123","nombre":"Bolsa de Plástico"},{"categoria":"Plástico","imagen":"","id":"12","nombre":"121"},{"categoria":"Cartón","imagen":"","id":"1223323","nombre":"12"}]
[{"categoria":"Cartón","imagen":"imagenes\/4b8a4e610ccf4c2ba0d23565df913119.jpg","id":"123","nombre":"Gabos"},{"categoria":"Vidrio \/ Cerámica","imagen":"imagenes\/fcc72ccd2a4246089e1ff526bc5daf07.jpg","id":"873","nombre":"Mortadela"},{"categoria":"Plástico","imagen":"","id":"2222","nombre":"22"},{"categoria":"Cartón","imagen":"","id":"34567","nombre":"345"},{"categoria":"Plástico","imagen":"imagenes\/373b579bc40c4129a11909075295b18c.jpg","id":"11123","nombre":"Bolsa de Plástico"},{"categoria":"Plástico","imagen":"","id":"12","nombre":"121"},{"categoria":"Cartón","imagen":"","id":"1223323","nombre":"12"},{"categoria":"Vidrio \/ Cerámica","imagen":"","id":"121","nombre":"12"}]
2 changes: 1 addition & 1 deletion productos.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"descripcion":"111","precio":"11","material":"111","imagen":"","envases":[{"id":"123"},{"id":"873"},{"id":"123123"}],"id":"111","nombre":"111"},{"descripcion":"123","precio":"123","material":"123","imagen":"","envases":[],"id":"23123123","nombre":"123"},{"descripcion":"2323","precio":"23","material":"23","imagen":"","envases":[],"id":"23232323","nombre":"23"},{"descripcion":"1","precio":"111","material":"111","imagen":"","envases":[],"id":"111111","nombre":"1111"},{"descripcion":"1","precio":"1","material":"11","imagen":"","envases":[],"id":"1111111","nombre":"11"},{"descripcion":"12","precio":"12","material":"12","imagen":"","envases":[],"id":"12","nombre":"12"},{"descripcion":"3","precio":"3","material":"3","imagen":"","envases":[],"id":"123333","nombre":"1233"},{"descripcion":"2","precio":"12","material":"12","imagen":"","envases":[],"id":"222222","nombre":"12"},{"descripcion":"122","precio":"12","material":"12","imagen":"","envases":[],"id":"122222","nombre":"12"},{"descripcion":"12","precio":"1","material":"12","imagen":"","envases":[],"id":"11111111","nombre":"11"},{"descripcion":"g","precio":"12","material":"ss","imagen":"","envases":[],"id":"7","nombre":"ss"},{"descripcion":"4","precio":"4","material":"4","imagen":"","envases":[],"id":"234","nombre":"34"},{"descripcion":"1212","precio":"1212","material":"1212","imagen":"","envases":[],"id":"112200","nombre":"1212"},{"descripcion":"5","precio":"5","material":"5","imagen":"","envases":[],"id":"5","nombre":"x"},{"descripcion":"12","precio":"12","material":"12","imagen":"","envases":[],"id":"1222222","nombre":"12"},{"descripcion":"7","precio":"78","material":"89","imagen":"","envases":[],"id":"56","nombre":"67"}]
[{"descripcion":"111","precio":"11","material":"111","imagen":"","envases":[{"id":"123"},{"id":"873"},{"id":"123123"}],"id":"111","nombre":"111"},{"descripcion":"123","precio":"123","material":"123","imagen":"","envases":[],"id":"23123123","nombre":"123"},{"descripcion":"2323","precio":"23","material":"23","imagen":"","envases":[],"id":"23232323","nombre":"23"},{"descripcion":"1","precio":"111","material":"111","imagen":"","envases":[],"id":"111111","nombre":"1111"},{"descripcion":"1","precio":"1","material":"11","imagen":"","envases":[],"id":"1111111","nombre":"11"},{"descripcion":"12","precio":"12","material":"12","imagen":"","envases":[],"id":"12","nombre":"12"},{"descripcion":"3","precio":"3","material":"3","imagen":"","envases":[],"id":"123333","nombre":"1233"},{"descripcion":"2","precio":"12","material":"12","imagen":"","envases":[],"id":"222222","nombre":"12"},{"descripcion":"122","precio":"12","material":"12","imagen":"","envases":[],"id":"122222","nombre":"12"},{"descripcion":"12","precio":"1","material":"12","imagen":"","envases":[],"id":"11111111","nombre":"11"},{"descripcion":"g","precio":"12","material":"ss","imagen":"","envases":[],"id":"7","nombre":"ss"},{"descripcion":"4","precio":"4","material":"4","imagen":"","envases":[],"id":"234","nombre":"34"},{"descripcion":"1212","precio":"1212","material":"1212","imagen":"","envases":[],"id":"112200","nombre":"1212"},{"descripcion":"5","precio":"5","material":"5","imagen":"","envases":[],"id":"5","nombre":"x"},{"descripcion":"12","precio":"12","material":"12","imagen":"","envases":[],"id":"1222222","nombre":"12"},{"descripcion":"7","precio":"78","material":"89","imagen":"","envases":[],"id":"56","nombre":"67"},{"descripcion":"45","precio":"34","material":"34","imagen":"","envases":[],"id":"1234","nombre":"345"}]
3 changes: 1 addition & 2 deletions src/ecoshop/MainInterfaz.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>


<Pane prefHeight="422.0" prefWidth="629.0" style="-fx-background-color: transparent;" xmlns="http:https://javafx.com/javafx/8" xmlns:fx="http:https://javafx.com/fxml/1" fx:controller="ecoshop.MainInterfazController">
<children>
<BorderPane layoutX="12.0" layoutY="9.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="597.0" style="-fx-background-color: white; -fx-background-radius: 20;">
Expand All @@ -29,7 +28,7 @@
<center>
<Pane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER">
<children>
<JFXButton fx:id="botonAdmin" contentDisplay="TOP" layoutX="45.0" layoutY="23.0" onMouseClicked="#clickBotonAdmin" prefHeight="172.0" prefWidth="251.0" styleClass="botonAgregar" stylesheets="@frontend/estilos/estilos.css" text="Usuario administrador" textFill="WHITE">
<JFXButton fx:id="botonAdmin" contentDisplay="TOP" layoutX="45.0" layoutY="23.0" onMouseClicked="#clickBotonAdmin" prefHeight="172.0" styleClass="botonAgregar" stylesheets="@frontend/estilos/estilos.css" text="Usuario administrador" textFill="WHITE">
<graphic>
<ImageView fitHeight="141.0" fitWidth="155.0" pickOnBounds="true" preserveRatio="true">
<image>
Expand Down
4 changes: 2 additions & 2 deletions src/ecoshop/frontend/AdminProductosController.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ private void clickBotonBuscar(ActionEvent event){

@FXML
private void clickBotonAgregarProducto(MouseEvent event){
Toast.show("El producto se agregó correctamente", "OK", 5, label);
Toast.show("El producto se agregó correctamente", "OK", 5, label);


boolean idValida = TBId.validate();
boolean nombreValido = TBNombre.validate();
Expand Down Expand Up @@ -311,7 +312,6 @@ private void clickBotonAgregarProducto(MouseEvent event){
nuevo.put("envases", envasesArray);

JSONAuxiliar.agregar(nuevo,NOMBRE_JSON);
Toast.show("El producto se agregó correctamente", "OK", 5, label);


volverEstadoInicial();
Expand Down
Loading

0 comments on commit 39861e5

Please sign in to comment.