diff --git a/prototype/src/main/java/org/hso/ecommerce/controller/intern/suppliers/SupplierOfferController.java b/prototype/src/main/java/org/hso/ecommerce/controller/intern/suppliers/SupplierOfferController.java index 1b467db..bd27558 100644 --- a/prototype/src/main/java/org/hso/ecommerce/controller/intern/suppliers/SupplierOfferController.java +++ b/prototype/src/main/java/org/hso/ecommerce/controller/intern/suppliers/SupplierOfferController.java @@ -1,5 +1,8 @@ package org.hso.ecommerce.controller.intern.suppliers; +import java.util.ArrayList; +import java.util.List; + import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; @@ -12,14 +15,118 @@ public class SupplierOfferController { @GetMapping("supplierOffers") public String internListedArticles(Model model) { - - - - - - - + List totals = new ArrayList(); + + /* + * for (Article article : articleRepository.findAll()) { UImodelArticles tmp = + * new UImodelArticles(); tmp.addListedArticle(article, + * warehouseEntryRepository.getArticleStock(article.id).orElse(0)); + * totals.add(tmp); } + */ + + UImodelOfferedArticle tmp01 = new UImodelOfferedArticle(); + UImodelOfferedArticle tmp02 = new UImodelOfferedArticle(); + UImodelOfferedArticle tmp03 = new UImodelOfferedArticle(); + + tmp01.addData("Title01", "manufacturer01", "articlenumber01", "supplierName01", 4884, "42,42 €", "ads01", 5); + tmp02.addData("Title02", "manufacturer02", "articlenumber02", "supplierName02", 4884, "42,42 €", "ads02", 6); + tmp03.addData("Title03", "manufacturer03", "articlenumber03", "supplierName03", 4884, "42,42 €", "ads03", 7); + + totals.add(tmp01); + totals.add(tmp02); + totals.add(tmp03); + + model.addAttribute("OfferedArticles", totals); return "intern/offeredArticles/index"; + } + + public class UImodelOfferedArticle { + + String title; + String manufacturer; + String articlenumber; + String supplierName; + int supplierId; + String price; + String ads; + int listedArticleId; + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getManufacturer() { + return manufacturer; + } + + public void setManufacturer(String manufacturer) { + this.manufacturer = manufacturer; + } + + public String getArticlenumber() { + return articlenumber; + } + + public void setArticlenumber(String articlenumber) { + this.articlenumber = articlenumber; + } + + public String getSupplierName() { + return supplierName; + } + + public void setSupplierName(String supplierName) { + this.supplierName = supplierName; + } + + public int getSupplierId() { + return supplierId; + } + + public void setSupplierId(int supplierId) { + this.supplierId = supplierId; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getAds() { + return ads; + } + + public void setAds(String ads) { + this.ads = ads; + } + + public int getListedArticleId() { + return listedArticleId; + } + + public void setListedArticleId(int listedArticleId) { + this.listedArticleId = listedArticleId; + } + + public void addData(String title, String manufacturer, String articlenumber, String supplierName, + int supplierId, String price, String ads, int listedArticleId) { + + this.title = title; + this.manufacturer = manufacturer; + this.articlenumber = articlenumber; + this.supplierName = supplierName; + this.supplierId = supplierId; + this.price = price; + this.ads = ads; + this.listedArticleId = listedArticleId; + } } diff --git a/prototype/src/main/resources/templates/intern/listedArticles/id.html b/prototype/src/main/resources/templates/intern/listedArticles/id.html index 295bf80..3e18cb8 100644 --- a/prototype/src/main/resources/templates/intern/listedArticles/id.html +++ b/prototype/src/main/resources/templates/intern/listedArticles/id.html @@ -1,118 +1,106 @@ - - - - - - Bearbeiten: Artikel - - - - - - - -
- -
-

Gelisteter Artikel ID

- - -
- -

- - -

-

- - - Details -

-
-
-

- - -

-

- -

-
-
-

- -  EUR
- (19% Mwst.) -
- =  EUR Brutto -

-

- -  EUR -

-
-
+ + + + Bearbeiten: Artikel + + + + + + +
+ +
+

Gelisteter Artikel ID

+ +

+ + +

+

+ + + Details +

+
+
+

+ + +

+

+ +

+
+
+

+ +  EUR
+ (19% Mwst.) +
+ =  EUR Brutto +

+

+ +  EUR +

+
+


-
-
-
- -
- -

- Bitte jede Kategorien in eine eigene Zeile -

- -
- -
-

- - -

-

- Lagerbestand: -

-

- Der Wert wird nur für zukünftige Lagerbuchungen verwendet. - Bei Problemen kann können Einheiten aus- und wieder eingebucht werden. - -

-

- Lagerbuchung - -

-
- -

- - -

-
- - - -
- -
-
-
- - - +
+
+

+ + +

+

+ Lagerbestand: +

+

+ Der Wert wird nur für zukünftige Lagerbuchungen verwendet. + Bei Problemen kann können Einheiten aus- und wieder eingebucht werden. + +

+

+ Lagerbuchung +

+
+

+ + +

+
+ + + +
+ +
+
+
+ + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/intern/listedArticles/index.html b/prototype/src/main/resources/templates/intern/listedArticles/index.html index 94be11c..ad8a771 100644 --- a/prototype/src/main/resources/templates/intern/listedArticles/index.html +++ b/prototype/src/main/resources/templates/intern/listedArticles/index.html @@ -1,73 +1,69 @@ - - - - - - Gelistete Artikel - - - - - - - -
- -
-

- Weitere Artikel können über Artikelübersicht der Lieferanten hinzugefügt werden. - Jetzt Hinzufügen -

- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
BildNamePreis(Netto)KategorienLagerbestandAngebots IDArtikel IDAktion
-

-

-
-
- - - + + + + Gelistete Artikel + + + + + + +
+ +
+

+ Weitere Artikel können über Artikelübersicht der Lieferanten hinzugefügt werden. + Jetzt Hinzufügen +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
BildNamePreis(Netto)KategorienLagerbestandAngebots IDArtikel IDAktion
+
+
+

+

+
+
+ + \ No newline at end of file diff --git a/prototype/src/main/resources/templates/intern/offeredArticles/index.html b/prototype/src/main/resources/templates/intern/offeredArticles/index.html index 9ba3279..dfb36be 100644 --- a/prototype/src/main/resources/templates/intern/offeredArticles/index.html +++ b/prototype/src/main/resources/templates/intern/offeredArticles/index.html @@ -1,140 +1,59 @@ - - - - - - Händlerangebote - - - - - - - -
- -
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
NameHerstellerArtikelnummerLieferantKaufpreis (Netto)Werbungs-
anfrage
Status
KameraSonjizuK48431587EXGelistet 44048
Hans Guck GmbH584,50 EUR
Cheap AG84,54 EURX
Not Cheap AG184,54 EUR
EarbudsSonjizuG447#$XGelistet 448
Cheap AG50,54 EURX
MundschutzFarma CorpMu-15415Hinzufügen
Cheap AG150,54 EUR
Not Cheap AG250,54 EUR
GoldbarenBundesbankG1KGInaktiv 4888
Cheap AG10000,54 EURX
-

-
-
-
- - - + + + + Händlerangebote + + + + + + +
+ +
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
NameHerstellerArtikelnummerLieferantKaufpreis (Netto)Werbungs-
anfrage
Status
+

+
+
+ + + \ No newline at end of file