Changeset 497d129
- Timestamp:
- 01/06/23 22:23:41 (2 years ago)
- Branches:
- main
- Children:
- 7e10599
- Parents:
- e278ff8
- Location:
- FullyStocked/src/main
- Files:
-
- 4 added
- 2 edited
- 7 moved
Legend:
- Unmodified
- Added
- Removed
-
FullyStocked/src/main/java/com/bazi/fullystocked/Services/Implementations/InvoicesServiceImpl.java
re278ff8 r497d129 58 58 throw new ArticleNotAvailableException(); 59 59 } 60 storedArticle.setQuantity(storedArticle.getQuantity()-quantity); 60 61 InvoicedArticles invoicedArticles=new InvoicedArticles(price, quantity, invoice, article); 61 62 invoicedArticlesRepository.save(invoicedArticles); … … 63 64 return Optional.of(invoicesRepository.save(invoice)); 64 65 } 66 67 @Override 68 public Optional<Invoices> findById(Integer id) { 69 return invoicesRepository.findById(id); 70 } 65 71 } -
FullyStocked/src/main/java/com/bazi/fullystocked/Services/InvoicesService.java
re278ff8 r497d129 9 9 Optional<Invoices> create(Integer workerId); 10 10 Optional<Invoices> addArticleToInvoice(Integer invoiceId, Integer articleId, int price, int quantity); 11 Optional<Invoices> findById(Integer id); 11 12 } -
FullyStocked/src/main/java/com/bazi/fullystocked/Web/Controller/HomeController.java
re278ff8 r497d129 1 package com.bazi.fullystocked. Controller;1 package com.bazi.fullystocked.Web.Controller; 2 2 3 3 import org.springframework.stereotype.Controller; -
FullyStocked/src/main/java/com/bazi/fullystocked/Web/Controller/LogOutController.java
re278ff8 r497d129 1 package com.bazi.fullystocked. Controller;1 package com.bazi.fullystocked.Web.Controller; 2 2 3 3 import org.springframework.stereotype.Controller; -
FullyStocked/src/main/java/com/bazi/fullystocked/Web/Controller/LoginController.java
re278ff8 r497d129 1 package com.bazi.fullystocked. Controller;1 package com.bazi.fullystocked.Web.Controller; 2 2 3 3 import com.bazi.fullystocked.Models.Exceptions.InvalidUserCredentialsException; … … 60 60 return "redirect:/home"; 61 61 } 62 catch ( InvalidUserCredentialsException exception) {62 catch (Exception exception) { 63 63 model.addAttribute("hasError", true); 64 64 model.addAttribute("error", exception.getMessage()); -
FullyStocked/src/main/java/com/bazi/fullystocked/Web/Controller/ManagerController.java
re278ff8 r497d129 1 package com.bazi.fullystocked. Controller;1 package com.bazi.fullystocked.Web.Controller; 2 2 3 3 import org.springframework.stereotype.Controller; -
FullyStocked/src/main/java/com/bazi/fullystocked/Web/Controller/RegisterController.java
re278ff8 r497d129 1 package com.bazi.fullystocked. Controller;1 package com.bazi.fullystocked.Web.Controller; 2 2 3 3 import com.bazi.fullystocked.Models.Exceptions.InvalidArgumentsException; -
FullyStocked/src/main/java/com/bazi/fullystocked/Web/Controller/SupplierController.java
re278ff8 r497d129 1 package com.bazi.fullystocked. Controller;1 package com.bazi.fullystocked.Web.Controller; 2 2 3 3 import org.springframework.stereotype.Controller; -
FullyStocked/src/main/java/com/bazi/fullystocked/Web/Controller/WorkerController.java
re278ff8 r497d129 1 package com.bazi.fullystocked. Controller;1 package com.bazi.fullystocked.Web.Controller; 2 2 3 3 import com.bazi.fullystocked.Models.SqlViews.ArticlesReport; … … 48 48 return "detailsArticle"; 49 49 } 50 return "redirect:/ articles?error=ArticleNotFound";50 return "redirect:/worker/articles?error=ArticleNotFound"; 51 51 } 52 52 }
Note:
See TracChangeset
for help on using the changeset viewer.