Skip to content

Commit

Permalink
Release 1.0.0-beta.1
Browse files Browse the repository at this point in the history
Release 1.0.0-beta.1
  • Loading branch information
sven1103 authored Apr 27, 2021
2 parents 5550a67 + 861d6a3 commit 18dce26
Show file tree
Hide file tree
Showing 46 changed files with 1,277 additions and 15,811 deletions.
2 changes: 1 addition & 1 deletion .qube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ full_name: Sven Fillinger
email: [email protected]
project_name: qoffer-2-portlet
project_short_description: qOffer assists in managing and creating offers
version: 1.0.0-SNAPSHOT
version: 1.0.0-beta.1
domain: portlet
language: groovy
project_slug: qoffer-2-portlet
Expand Down
50 changes: 47 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,52 @@ Changelog

This project adheres to `Semantic Versioning <https://semver.org/>`_.

1.0.0-beta.1 (2021-04-27)
-----------------------------------

**Added**

* Product selection now notifies a user if the provided input is incorrect and disables the button until the given information is valid (`#407 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/407>`_)

* Experimental designs can be defined for an offer (`#263 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/263>`_)

* New dropdown menu bar (`#490 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/490>`_)

* Jump back to maintain view after product creation/update (`#481 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/481>`_)

* Search for affiliations is now possible (`#533 <https://github.com/qbicsoftware/offer-manager-2-portlet/pull/533>`_)

* Add confirmation request for product archiving (`#528 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/528>`_)

* Allow offer updated when experimental design has changed (`#515 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/515>`_)

**Fixed**

* Add timeout of 10 second to PDF rendering (`#494 <https://github.com/qbicsoftware/offer-manager-2-portlet/pull/494>`_)

* Allow resetting the date picker in the offer overview (`#486 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/486>`_)

* Naming of the downloaded offer pdf is consistent (`#498 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/498>`_)

* Reset the view after an offer has been created (`#495 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/495>`_)

* Provide ISO 8601 date format renderer for offer overview table (`#299 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/299>`_)

* Provide functionality to remove items from an offer (`#516 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/516>`_)

* Adds amount to existing items on the offer (`#462 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/462>`_)

* Make filter for service product view work (`#523 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/523>`_)

* Add validation for project information input for offer creation/update (`#488 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/488>`_)

**Dependencies**

* Bump Vaadin 8.12.0 -> 8.12.3

**Deprecated**


1.0.0-alpha.6 (2021-04-13)
-----------------------------------

Expand Down Expand Up @@ -125,7 +171,7 @@ This project adheres to `Semantic Versioning <https://semver.org/>`_.

* Update offers without changes is not possible anymore (`#222 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/222>`_)

* Rename CreateCustomer and UpdateCustomer classes and methods (`#315 https://github.com/qbicsoftware/offer-manager-2-portlet/issues/315`_)
* Rename CreateCustomer and UpdateCustomer classes and methods (`#315 <https://github.com/qbicsoftware/offer-manager-2-portlet/issues/315>`_)

**Dependencies**

Expand All @@ -134,9 +180,7 @@ This project adheres to `Semantic Versioning <https://semver.org/>`_.


1.0.0-SNAPSHOT (2020-11-09)
----------------------------------------------

**Added**

* Create project with QUBE

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
# the built documents.
#
# The short X.Y version.
version = '1.0.0-SNAPSHOT'
version = '1.0.0-beta.1'
# The full version, including alpha/beta/rc tags.
release = '1.0.0-SNAPSHOT'
release = '1.0.0-beta.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
6 changes: 3 additions & 3 deletions offer-manager-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>offer-manager</artifactId>
<groupId>life.qbic</groupId>
<version>1.0.0-alpha.6</version>
<version>1.0.0-beta.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
Expand All @@ -15,7 +15,7 @@
<dependency>
<groupId>life.qbic</groupId>
<artifactId>offer-manager-domain</artifactId>
<version>1.0.0-alpha.6</version>
<version>1.0.0-beta.1</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand All @@ -42,7 +42,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.23</version>
<version>8.0.24</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-dbcp2 -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import life.qbic.datamodel.dtos.business.services.Product
import life.qbic.datamodel.dtos.general.Person
import life.qbic.datamodel.dtos.projectmanagement.Project
import life.qbic.portal.offermanager.communication.EventEmitter
import life.qbic.portal.offermanager.components.affiliation.search.SearchAffiliationView
import life.qbic.portal.offermanager.components.affiliation.search.SearchAffiliationViewModel
import life.qbic.portal.offermanager.components.offer.overview.OfferOverviewController
import life.qbic.portal.offermanager.components.offer.overview.OfferOverviewPresenter
import life.qbic.portal.offermanager.components.offer.overview.projectcreation.CreateProjectController
Expand Down Expand Up @@ -97,6 +99,7 @@ class DependencyManager {
private CreatePersonViewModel createCustomerViewModel
private UpdatePersonViewModel updatePersonViewModel
private CreateAffiliationViewModel createAffiliationViewModel
private SearchAffiliationViewModel searchAffiliationViewModel
private CreateOfferViewModel createOfferViewModel
private CreateOfferViewModel updateOfferViewModel
private OfferOverviewModel offerOverviewModel
Expand Down Expand Up @@ -371,6 +374,13 @@ class DependencyManager {
}catch (Exception e) {
log.error("Unexpected exception during ${CopyProductViewModel.getSimpleName()} view model setup.", e)
}

try {
this.searchAffiliationViewModel = new SearchAffiliationViewModel(affiliationService)
} catch (Exception e) {
log.error("Unexpected exception during ${SearchAffiliationViewModel.getSimpleName()} creation.")
log.debug("Unexpected exception during ${SearchAffiliationViewModel.getSimpleName()} creation.", e)
}
}

private void setupPresenters() {
Expand Down Expand Up @@ -636,9 +646,10 @@ class DependencyManager {
.viewModel, createCustomerViewModel)
CreateAffiliationView createAffiliationView2 = new CreateAffiliationView(this.viewModel,
createAffiliationViewModel, createAffiliationController)

SearchAffiliationView searchAffiliationView = new SearchAffiliationView(this.searchAffiliationViewModel)
portletView = new AppView(this.viewModel, createCustomerView2,
createAffiliationView2,
searchAffiliationView,
createOfferView,
overviewView,
updateOfferView,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package life.qbic.portal.offermanager

import life.qbic.datamodel.dtos.business.Offer

import java.time.LocalDate

/**
* <h1>Formats the filename for an offer</h1>
*
* <p>An offers file name should contain the date of the offer creation, the project conserved part and the offer version</p>
*
* @since 1.0.0
*
*/
class OfferFileNameFormatter {

/**
* Returns an offer file name in this schema:
*
* Q_<year>_<month>_<day>_<project-conserved-part>_<random-id-part>_v<offer-version>.pdf
* @param offer
* @return
*/
static String getFileNameForOffer(Offer offer) {
LocalDate date = offer.modificationDate.toLocalDate()
String dateString = createDateString(date)
return "Q_${dateString}_" +
"${offer.identifier.projectConservedPart}_${offer.identifier.randomPart}_" +
"v${offer.identifier.version}.pdf"
}

private static String createDateString(LocalDate date) {
return String.format("%04d_%02d_%02d", date.getYear(), date.getMonthValue(), date.getDayOfMonth())
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import java.nio.file.Paths
import java.nio.file.StandardCopyOption
import java.text.DateFormat
import java.text.DecimalFormat
import java.util.concurrent.TimeUnit

/**
* Handles the conversion of offers to pdf files
Expand Down Expand Up @@ -164,6 +165,7 @@ class OfferToPDFConverter implements OfferExporter {
private void setProjectInformation() {
htmlContent.getElementById("project-title").text(offer.projectTitle)
htmlContent.getElementById("project-description").text(offer.projectDescription)
if(offer.experimentalDesign.isPresent()) htmlContent.getElementById("experimental-design").text(offer.experimentalDesign.get())
}

private void setCustomerInformation() {
Expand Down Expand Up @@ -394,7 +396,7 @@ class OfferToPDFConverter implements OfferExporter {
builder.directory(new File(sourceFile.getParent().toString()))
builder.redirectErrorStream(true)
Process process = builder.start()
process.waitFor()
process.waitFor(10, TimeUnit.SECONDS)
process.getInputStream().eachLine {log.info(it)}
if (! new File(output.toString()).exists()) {
throw new RuntimeException("Offer PDF has not been generated.")
Expand Down
Loading

0 comments on commit 18dce26

Please sign in to comment.