Merge branch 'jhipster-generated'
This commit is contained in:
commit
5ac1277e7e
@ -46,10 +46,10 @@
|
|||||||
"otherEntityRelationshipName": "asset",
|
"otherEntityRelationshipName": "asset",
|
||||||
"relationshipValidateRules": "required",
|
"relationshipValidateRules": "required",
|
||||||
"relationshipName": "membership",
|
"relationshipName": "membership",
|
||||||
"otherEntityField": "documentDate"
|
"otherEntityField": "admissionDocumentDate"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"changelogDate": "20190418143053",
|
"changelogDate": "20190424123258",
|
||||||
"entityTableName": "asset",
|
"entityTableName": "asset",
|
||||||
"dto": "mapstruct",
|
"dto": "mapstruct",
|
||||||
"pagination": "infinite-scroll",
|
"pagination": "infinite-scroll",
|
||||||
|
@ -34,6 +34,58 @@
|
|||||||
],
|
],
|
||||||
"fieldValidateRulesMaxlength": 80
|
"fieldValidateRulesMaxlength": 80
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "kind",
|
||||||
|
"fieldType": "CustomerKind",
|
||||||
|
"fieldValues": "NATURAL,LEGAL",
|
||||||
|
"fieldValidateRules": [
|
||||||
|
"required"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "birthDate",
|
||||||
|
"fieldType": "LocalDate"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "birthPlace",
|
||||||
|
"fieldType": "String",
|
||||||
|
"fieldValidateRules": [
|
||||||
|
"maxlength"
|
||||||
|
],
|
||||||
|
"fieldValidateRulesMaxlength": 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "registrationCourt",
|
||||||
|
"fieldType": "String",
|
||||||
|
"fieldValidateRules": [
|
||||||
|
"maxlength"
|
||||||
|
],
|
||||||
|
"fieldValidateRulesMaxlength": 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "registrationNumber",
|
||||||
|
"fieldType": "String",
|
||||||
|
"fieldValidateRules": [
|
||||||
|
"maxlength"
|
||||||
|
],
|
||||||
|
"fieldValidateRulesMaxlength": 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "vatRegion",
|
||||||
|
"fieldType": "VatRegion",
|
||||||
|
"fieldValues": "DOMESTIC,EU,OTHER",
|
||||||
|
"fieldValidateRules": [
|
||||||
|
"required"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "vatNumber",
|
||||||
|
"fieldType": "String",
|
||||||
|
"fieldValidateRules": [
|
||||||
|
"maxlength"
|
||||||
|
],
|
||||||
|
"fieldValidateRulesMaxlength": 40
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "contractualSalutation",
|
"fieldName": "contractualSalutation",
|
||||||
"fieldType": "String",
|
"fieldType": "String",
|
||||||
@ -90,7 +142,7 @@
|
|||||||
"relationshipName": "sepamandate"
|
"relationshipName": "sepamandate"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"changelogDate": "20190418143050",
|
"changelogDate": "20190424123255",
|
||||||
"entityTableName": "customer",
|
"entityTableName": "customer",
|
||||||
"dto": "mapstruct",
|
"dto": "mapstruct",
|
||||||
"pagination": "infinite-scroll",
|
"pagination": "infinite-scroll",
|
||||||
|
@ -2,21 +2,25 @@
|
|||||||
"name": "Membership",
|
"name": "Membership",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldName": "documentDate",
|
"fieldName": "admissionDocumentDate",
|
||||||
"fieldType": "LocalDate",
|
"fieldType": "LocalDate",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"required"
|
"required"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "memberFrom",
|
"fieldName": "cancellationDocumentDate",
|
||||||
|
"fieldType": "LocalDate"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "memberFromDate",
|
||||||
"fieldType": "LocalDate",
|
"fieldType": "LocalDate",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"required"
|
"required"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "memberUntil",
|
"fieldName": "memberUntilDate",
|
||||||
"fieldType": "LocalDate"
|
"fieldType": "LocalDate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -50,7 +54,7 @@
|
|||||||
"otherEntityField": "prefix"
|
"otherEntityField": "prefix"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"changelogDate": "20190418143051",
|
"changelogDate": "20190424123256",
|
||||||
"entityTableName": "membership",
|
"entityTableName": "membership",
|
||||||
"dto": "mapstruct",
|
"dto": "mapstruct",
|
||||||
"pagination": "infinite-scroll",
|
"pagination": "infinite-scroll",
|
||||||
|
@ -28,29 +28,29 @@
|
|||||||
"fieldValidateRulesMaxlength": 11
|
"fieldValidateRulesMaxlength": 11
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "documentDate",
|
"fieldName": "grantingDocumentDate",
|
||||||
"fieldType": "LocalDate",
|
"fieldType": "LocalDate",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"required"
|
"required"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "validFrom",
|
"fieldName": "revokationDocumentDate",
|
||||||
|
"fieldType": "LocalDate"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "validFromDate",
|
||||||
"fieldType": "LocalDate",
|
"fieldType": "LocalDate",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"required"
|
"required"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "validUntil",
|
"fieldName": "validUntilDate",
|
||||||
"fieldType": "LocalDate"
|
"fieldType": "LocalDate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "lastUsed",
|
"fieldName": "lastUsedDate",
|
||||||
"fieldType": "LocalDate"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldName": "cancellationDate",
|
|
||||||
"fieldType": "LocalDate"
|
"fieldType": "LocalDate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -72,7 +72,7 @@
|
|||||||
"otherEntityField": "prefix"
|
"otherEntityField": "prefix"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"changelogDate": "20190418143054",
|
"changelogDate": "20190424123259",
|
||||||
"entityTableName": "sepa_mandate",
|
"entityTableName": "sepa_mandate",
|
||||||
"dto": "mapstruct",
|
"dto": "mapstruct",
|
||||||
"pagination": "infinite-scroll",
|
"pagination": "infinite-scroll",
|
||||||
|
@ -46,10 +46,10 @@
|
|||||||
"otherEntityRelationshipName": "share",
|
"otherEntityRelationshipName": "share",
|
||||||
"relationshipValidateRules": "required",
|
"relationshipValidateRules": "required",
|
||||||
"relationshipName": "membership",
|
"relationshipName": "membership",
|
||||||
"otherEntityField": "documentDate"
|
"otherEntityField": "admissionDocumentDate"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"changelogDate": "20190418143052",
|
"changelogDate": "20190424123257",
|
||||||
"entityTableName": "share",
|
"entityTableName": "share",
|
||||||
"dto": "mapstruct",
|
"dto": "mapstruct",
|
||||||
"pagination": "infinite-scroll",
|
"pagination": "infinite-scroll",
|
||||||
|
@ -50,8 +50,8 @@ public class Asset implements Serializable {
|
|||||||
@Column(name = "remark", length = 160)
|
@Column(name = "remark", length = 160)
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@ManyToOne(optional = false)
|
@ManyToOne(optional = false)
|
||||||
|
@NotNull
|
||||||
@JsonIgnoreProperties("assets")
|
@JsonIgnoreProperties("assets")
|
||||||
private Membership membership;
|
private Membership membership;
|
||||||
|
|
||||||
|
@ -7,10 +7,15 @@ import javax.persistence.*;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import org.hostsharing.hsadminng.domain.enumeration.CustomerKind;
|
||||||
|
|
||||||
|
import org.hostsharing.hsadminng.domain.enumeration.VatRegion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Customer.
|
* A Customer.
|
||||||
*/
|
*/
|
||||||
@ -42,6 +47,35 @@ public class Customer implements Serializable {
|
|||||||
@Column(name = "name", length = 80, nullable = false)
|
@Column(name = "name", length = 80, nullable = false)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
|
@Column(name = "kind", nullable = false)
|
||||||
|
private CustomerKind kind;
|
||||||
|
|
||||||
|
@Column(name = "birth_date")
|
||||||
|
private LocalDate birthDate;
|
||||||
|
|
||||||
|
@Size(max = 80)
|
||||||
|
@Column(name = "birth_place", length = 80)
|
||||||
|
private String birthPlace;
|
||||||
|
|
||||||
|
@Size(max = 80)
|
||||||
|
@Column(name = "registration_court", length = 80)
|
||||||
|
private String registrationCourt;
|
||||||
|
|
||||||
|
@Size(max = 80)
|
||||||
|
@Column(name = "registration_number", length = 80)
|
||||||
|
private String registrationNumber;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
|
@Column(name = "vat_region", nullable = false)
|
||||||
|
private VatRegion vatRegion;
|
||||||
|
|
||||||
|
@Size(max = 40)
|
||||||
|
@Column(name = "vat_number", length = 40)
|
||||||
|
private String vatNumber;
|
||||||
|
|
||||||
@Size(max = 80)
|
@Size(max = 80)
|
||||||
@Column(name = "contractual_salutation", length = 80)
|
@Column(name = "contractual_salutation", length = 80)
|
||||||
private String contractualSalutation;
|
private String contractualSalutation;
|
||||||
@ -115,6 +149,97 @@ public class Customer implements Serializable {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CustomerKind getKind() {
|
||||||
|
return kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Customer kind(CustomerKind kind) {
|
||||||
|
this.kind = kind;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKind(CustomerKind kind) {
|
||||||
|
this.kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getBirthDate() {
|
||||||
|
return birthDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Customer birthDate(LocalDate birthDate) {
|
||||||
|
this.birthDate = birthDate;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBirthDate(LocalDate birthDate) {
|
||||||
|
this.birthDate = birthDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBirthPlace() {
|
||||||
|
return birthPlace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Customer birthPlace(String birthPlace) {
|
||||||
|
this.birthPlace = birthPlace;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBirthPlace(String birthPlace) {
|
||||||
|
this.birthPlace = birthPlace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegistrationCourt() {
|
||||||
|
return registrationCourt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Customer registrationCourt(String registrationCourt) {
|
||||||
|
this.registrationCourt = registrationCourt;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationCourt(String registrationCourt) {
|
||||||
|
this.registrationCourt = registrationCourt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegistrationNumber() {
|
||||||
|
return registrationNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Customer registrationNumber(String registrationNumber) {
|
||||||
|
this.registrationNumber = registrationNumber;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationNumber(String registrationNumber) {
|
||||||
|
this.registrationNumber = registrationNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VatRegion getVatRegion() {
|
||||||
|
return vatRegion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Customer vatRegion(VatRegion vatRegion) {
|
||||||
|
this.vatRegion = vatRegion;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVatRegion(VatRegion vatRegion) {
|
||||||
|
this.vatRegion = vatRegion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVatNumber() {
|
||||||
|
return vatNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Customer vatNumber(String vatNumber) {
|
||||||
|
this.vatNumber = vatNumber;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVatNumber(String vatNumber) {
|
||||||
|
this.vatNumber = vatNumber;
|
||||||
|
}
|
||||||
|
|
||||||
public String getContractualSalutation() {
|
public String getContractualSalutation() {
|
||||||
return contractualSalutation;
|
return contractualSalutation;
|
||||||
}
|
}
|
||||||
@ -195,6 +320,16 @@ public class Customer implements Serializable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Customer removeMembership(Membership membership) {
|
||||||
|
this.memberships.remove(membership);
|
||||||
|
membership.setCustomer(null);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberships(Set<Membership> memberships) {
|
||||||
|
this.memberships = memberships;
|
||||||
|
}
|
||||||
|
|
||||||
public Set<SepaMandate> getSepamandates() {
|
public Set<SepaMandate> getSepamandates() {
|
||||||
return sepamandates;
|
return sepamandates;
|
||||||
}
|
}
|
||||||
@ -210,6 +345,15 @@ public class Customer implements Serializable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Customer removeSepamandate(SepaMandate sepaMandate) {
|
||||||
|
this.sepamandates.remove(sepaMandate);
|
||||||
|
sepaMandate.setCustomer(null);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSepamandates(Set<SepaMandate> sepaMandates) {
|
||||||
|
this.sepamandates = sepaMandates;
|
||||||
|
}
|
||||||
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
|
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -239,6 +383,13 @@ public class Customer implements Serializable {
|
|||||||
", reference=" + getReference() +
|
", reference=" + getReference() +
|
||||||
", prefix='" + getPrefix() + "'" +
|
", prefix='" + getPrefix() + "'" +
|
||||||
", name='" + getName() + "'" +
|
", name='" + getName() + "'" +
|
||||||
|
", kind='" + getKind() + "'" +
|
||||||
|
", birthDate='" + getBirthDate() + "'" +
|
||||||
|
", birthPlace='" + getBirthPlace() + "'" +
|
||||||
|
", registrationCourt='" + getRegistrationCourt() + "'" +
|
||||||
|
", registrationNumber='" + getRegistrationNumber() + "'" +
|
||||||
|
", vatRegion='" + getVatRegion() + "'" +
|
||||||
|
", vatNumber='" + getVatNumber() + "'" +
|
||||||
", contractualSalutation='" + getContractualSalutation() + "'" +
|
", contractualSalutation='" + getContractualSalutation() + "'" +
|
||||||
", contractualAddress='" + getContractualAddress() + "'" +
|
", contractualAddress='" + getContractualAddress() + "'" +
|
||||||
", billingSalutation='" + getBillingSalutation() + "'" +
|
", billingSalutation='" + getBillingSalutation() + "'" +
|
||||||
|
@ -30,15 +30,18 @@ public class Membership implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Column(name = "document_date", nullable = false)
|
@Column(name = "admission_document_date", nullable = false)
|
||||||
private LocalDate documentDate;
|
private LocalDate admissionDocumentDate;
|
||||||
|
|
||||||
|
@Column(name = "cancellation_document_date")
|
||||||
|
private LocalDate cancellationDocumentDate;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Column(name = "member_from", nullable = false)
|
@Column(name = "member_from_date", nullable = false)
|
||||||
private LocalDate memberFrom;
|
private LocalDate memberFromDate;
|
||||||
|
|
||||||
@Column(name = "member_until")
|
@Column(name = "member_until_date")
|
||||||
private LocalDate memberUntil;
|
private LocalDate memberUntilDate;
|
||||||
|
|
||||||
@Size(max = 160)
|
@Size(max = 160)
|
||||||
@Column(name = "remark", length = 160)
|
@Column(name = "remark", length = 160)
|
||||||
@ -62,43 +65,56 @@ public class Membership implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getDocumentDate() {
|
public LocalDate getAdmissionDocumentDate() {
|
||||||
return documentDate;
|
return admissionDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Membership documentDate(LocalDate documentDate) {
|
public Membership admissionDocumentDate(LocalDate admissionDocumentDate) {
|
||||||
this.documentDate = documentDate;
|
this.admissionDocumentDate = admissionDocumentDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDocumentDate(LocalDate documentDate) {
|
public void setAdmissionDocumentDate(LocalDate admissionDocumentDate) {
|
||||||
this.documentDate = documentDate;
|
this.admissionDocumentDate = admissionDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getMemberFrom() {
|
public LocalDate getCancellationDocumentDate() {
|
||||||
return memberFrom;
|
return cancellationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Membership memberFrom(LocalDate memberFrom) {
|
public Membership cancellationDocumentDate(LocalDate cancellationDocumentDate) {
|
||||||
this.memberFrom = memberFrom;
|
this.cancellationDocumentDate = cancellationDocumentDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMemberFrom(LocalDate memberFrom) {
|
public void setCancellationDocumentDate(LocalDate cancellationDocumentDate) {
|
||||||
this.memberFrom = memberFrom;
|
this.cancellationDocumentDate = cancellationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getMemberUntil() {
|
public LocalDate getMemberFromDate() {
|
||||||
return memberUntil;
|
return memberFromDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Membership memberUntil(LocalDate memberUntil) {
|
public Membership memberFromDate(LocalDate memberFromDate) {
|
||||||
this.memberUntil = memberUntil;
|
this.memberFromDate = memberFromDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMemberUntil(LocalDate memberUntil) {
|
public void setMemberFromDate(LocalDate memberFromDate) {
|
||||||
this.memberUntil = memberUntil;
|
this.memberFromDate = memberFromDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getMemberUntilDate() {
|
||||||
|
return memberUntilDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Membership memberUntilDate(LocalDate memberUntilDate) {
|
||||||
|
this.memberUntilDate = memberUntilDate;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberUntilDate(LocalDate memberUntilDate) {
|
||||||
|
this.memberUntilDate = memberUntilDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
@ -129,6 +145,16 @@ public class Membership implements Serializable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Membership removeShare(Share share) {
|
||||||
|
this.shares.remove(share);
|
||||||
|
share.setMembership(null);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShares(Set<Share> shares) {
|
||||||
|
this.shares = shares;
|
||||||
|
}
|
||||||
|
|
||||||
public Set<Asset> getAssets() {
|
public Set<Asset> getAssets() {
|
||||||
return assets;
|
return assets;
|
||||||
}
|
}
|
||||||
@ -144,6 +170,16 @@ public class Membership implements Serializable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Membership removeAsset(Asset asset) {
|
||||||
|
this.assets.remove(asset);
|
||||||
|
asset.setMembership(null);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAssets(Set<Asset> assets) {
|
||||||
|
this.assets = assets;
|
||||||
|
}
|
||||||
|
|
||||||
public Customer getCustomer() {
|
public Customer getCustomer() {
|
||||||
return customer;
|
return customer;
|
||||||
}
|
}
|
||||||
@ -182,9 +218,10 @@ public class Membership implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "Membership{" +
|
return "Membership{" +
|
||||||
"id=" + getId() +
|
"id=" + getId() +
|
||||||
", documentDate='" + getDocumentDate() + "'" +
|
", admissionDocumentDate='" + getAdmissionDocumentDate() + "'" +
|
||||||
", memberFrom='" + getMemberFrom() + "'" +
|
", cancellationDocumentDate='" + getCancellationDocumentDate() + "'" +
|
||||||
", memberUntil='" + getMemberUntil() + "'" +
|
", memberFromDate='" + getMemberFromDate() + "'" +
|
||||||
|
", memberUntilDate='" + getMemberUntilDate() + "'" +
|
||||||
", remark='" + getRemark() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
|
@ -38,21 +38,21 @@ public class SepaMandate implements Serializable {
|
|||||||
private String bic;
|
private String bic;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Column(name = "document_date", nullable = false)
|
@Column(name = "granting_document_date", nullable = false)
|
||||||
private LocalDate documentDate;
|
private LocalDate grantingDocumentDate;
|
||||||
|
|
||||||
|
@Column(name = "revokation_document_date")
|
||||||
|
private LocalDate revokationDocumentDate;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Column(name = "valid_from", nullable = false)
|
@Column(name = "valid_from_date", nullable = false)
|
||||||
private LocalDate validFrom;
|
private LocalDate validFromDate;
|
||||||
|
|
||||||
@Column(name = "valid_until")
|
@Column(name = "valid_until_date")
|
||||||
private LocalDate validUntil;
|
private LocalDate validUntilDate;
|
||||||
|
|
||||||
@Column(name = "last_used")
|
@Column(name = "last_used_date")
|
||||||
private LocalDate lastUsed;
|
private LocalDate lastUsedDate;
|
||||||
|
|
||||||
@Column(name = "cancellation_date")
|
|
||||||
private LocalDate cancellationDate;
|
|
||||||
|
|
||||||
@Size(max = 160)
|
@Size(max = 160)
|
||||||
@Column(name = "remark", length = 160)
|
@Column(name = "remark", length = 160)
|
||||||
@ -111,69 +111,69 @@ public class SepaMandate implements Serializable {
|
|||||||
this.bic = bic;
|
this.bic = bic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getDocumentDate() {
|
public LocalDate getGrantingDocumentDate() {
|
||||||
return documentDate;
|
return grantingDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SepaMandate documentDate(LocalDate documentDate) {
|
public SepaMandate grantingDocumentDate(LocalDate grantingDocumentDate) {
|
||||||
this.documentDate = documentDate;
|
this.grantingDocumentDate = grantingDocumentDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDocumentDate(LocalDate documentDate) {
|
public void setGrantingDocumentDate(LocalDate grantingDocumentDate) {
|
||||||
this.documentDate = documentDate;
|
this.grantingDocumentDate = grantingDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getValidFrom() {
|
public LocalDate getRevokationDocumentDate() {
|
||||||
return validFrom;
|
return revokationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SepaMandate validFrom(LocalDate validFrom) {
|
public SepaMandate revokationDocumentDate(LocalDate revokationDocumentDate) {
|
||||||
this.validFrom = validFrom;
|
this.revokationDocumentDate = revokationDocumentDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValidFrom(LocalDate validFrom) {
|
public void setRevokationDocumentDate(LocalDate revokationDocumentDate) {
|
||||||
this.validFrom = validFrom;
|
this.revokationDocumentDate = revokationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getValidUntil() {
|
public LocalDate getValidFromDate() {
|
||||||
return validUntil;
|
return validFromDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SepaMandate validUntil(LocalDate validUntil) {
|
public SepaMandate validFromDate(LocalDate validFromDate) {
|
||||||
this.validUntil = validUntil;
|
this.validFromDate = validFromDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValidUntil(LocalDate validUntil) {
|
public void setValidFromDate(LocalDate validFromDate) {
|
||||||
this.validUntil = validUntil;
|
this.validFromDate = validFromDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getLastUsed() {
|
public LocalDate getValidUntilDate() {
|
||||||
return lastUsed;
|
return validUntilDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SepaMandate lastUsed(LocalDate lastUsed) {
|
public SepaMandate validUntilDate(LocalDate validUntilDate) {
|
||||||
this.lastUsed = lastUsed;
|
this.validUntilDate = validUntilDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastUsed(LocalDate lastUsed) {
|
public void setValidUntilDate(LocalDate validUntilDate) {
|
||||||
this.lastUsed = lastUsed;
|
this.validUntilDate = validUntilDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getCancellationDate() {
|
public LocalDate getLastUsedDate() {
|
||||||
return cancellationDate;
|
return lastUsedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SepaMandate cancellationDate(LocalDate cancellationDate) {
|
public SepaMandate lastUsedDate(LocalDate lastUsedDate) {
|
||||||
this.cancellationDate = cancellationDate;
|
this.lastUsedDate = lastUsedDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCancellationDate(LocalDate cancellationDate) {
|
public void setLastUsedDate(LocalDate lastUsedDate) {
|
||||||
this.cancellationDate = cancellationDate;
|
this.lastUsedDate = lastUsedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
@ -230,11 +230,11 @@ public class SepaMandate implements Serializable {
|
|||||||
", reference='" + getReference() + "'" +
|
", reference='" + getReference() + "'" +
|
||||||
", iban='" + getIban() + "'" +
|
", iban='" + getIban() + "'" +
|
||||||
", bic='" + getBic() + "'" +
|
", bic='" + getBic() + "'" +
|
||||||
", documentDate='" + getDocumentDate() + "'" +
|
", grantingDocumentDate='" + getGrantingDocumentDate() + "'" +
|
||||||
", validFrom='" + getValidFrom() + "'" +
|
", revokationDocumentDate='" + getRevokationDocumentDate() + "'" +
|
||||||
", validUntil='" + getValidUntil() + "'" +
|
", validFromDate='" + getValidFromDate() + "'" +
|
||||||
", lastUsed='" + getLastUsed() + "'" +
|
", validUntilDate='" + getValidUntilDate() + "'" +
|
||||||
", cancellationDate='" + getCancellationDate() + "'" +
|
", lastUsedDate='" + getLastUsedDate() + "'" +
|
||||||
", remark='" + getRemark() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,8 @@ public class Share implements Serializable {
|
|||||||
@Column(name = "remark", length = 160)
|
@Column(name = "remark", length = 160)
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@ManyToOne(optional = false)
|
@ManyToOne(optional = false)
|
||||||
|
@NotNull
|
||||||
@JsonIgnoreProperties("shares")
|
@JsonIgnoreProperties("shares")
|
||||||
private Membership membership;
|
private Membership membership;
|
||||||
|
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
package org.hostsharing.hsadminng.domain.enumeration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The CustomerKind enumeration.
|
||||||
|
*/
|
||||||
|
public enum CustomerKind {
|
||||||
|
NATURAL, LEGAL
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
package org.hostsharing.hsadminng.domain.enumeration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The VatRegion enumeration.
|
||||||
|
*/
|
||||||
|
public enum VatRegion {
|
||||||
|
DOMESTIC, EU, OTHER
|
||||||
|
}
|
@ -42,9 +42,7 @@ public class AssetService {
|
|||||||
*/
|
*/
|
||||||
public AssetDTO save(AssetDTO assetDTO) {
|
public AssetDTO save(AssetDTO assetDTO) {
|
||||||
log.debug("Request to save Asset : {}", assetDTO);
|
log.debug("Request to save Asset : {}", assetDTO);
|
||||||
|
|
||||||
assetValidator.validate(assetDTO);
|
assetValidator.validate(assetDTO);
|
||||||
|
|
||||||
Asset asset = assetMapper.toEntity(assetDTO);
|
Asset asset = assetMapper.toEntity(assetDTO);
|
||||||
asset = assetRepository.save(asset);
|
asset = assetRepository.save(asset);
|
||||||
return assetMapper.toDto(asset);
|
return assetMapper.toDto(asset);
|
||||||
|
@ -98,6 +98,27 @@ public class CustomerQueryService extends QueryService<Customer> {
|
|||||||
if (criteria.getName() != null) {
|
if (criteria.getName() != null) {
|
||||||
specification = specification.and(buildStringSpecification(criteria.getName(), Customer_.name));
|
specification = specification.and(buildStringSpecification(criteria.getName(), Customer_.name));
|
||||||
}
|
}
|
||||||
|
if (criteria.getKind() != null) {
|
||||||
|
specification = specification.and(buildSpecification(criteria.getKind(), Customer_.kind));
|
||||||
|
}
|
||||||
|
if (criteria.getBirthDate() != null) {
|
||||||
|
specification = specification.and(buildRangeSpecification(criteria.getBirthDate(), Customer_.birthDate));
|
||||||
|
}
|
||||||
|
if (criteria.getBirthPlace() != null) {
|
||||||
|
specification = specification.and(buildStringSpecification(criteria.getBirthPlace(), Customer_.birthPlace));
|
||||||
|
}
|
||||||
|
if (criteria.getRegistrationCourt() != null) {
|
||||||
|
specification = specification.and(buildStringSpecification(criteria.getRegistrationCourt(), Customer_.registrationCourt));
|
||||||
|
}
|
||||||
|
if (criteria.getRegistrationNumber() != null) {
|
||||||
|
specification = specification.and(buildStringSpecification(criteria.getRegistrationNumber(), Customer_.registrationNumber));
|
||||||
|
}
|
||||||
|
if (criteria.getVatRegion() != null) {
|
||||||
|
specification = specification.and(buildSpecification(criteria.getVatRegion(), Customer_.vatRegion));
|
||||||
|
}
|
||||||
|
if (criteria.getVatNumber() != null) {
|
||||||
|
specification = specification.and(buildStringSpecification(criteria.getVatNumber(), Customer_.vatNumber));
|
||||||
|
}
|
||||||
if (criteria.getContractualSalutation() != null) {
|
if (criteria.getContractualSalutation() != null) {
|
||||||
specification = specification.and(buildStringSpecification(criteria.getContractualSalutation(), Customer_.contractualSalutation));
|
specification = specification.and(buildStringSpecification(criteria.getContractualSalutation(), Customer_.contractualSalutation));
|
||||||
}
|
}
|
||||||
|
@ -89,14 +89,17 @@ public class MembershipQueryService extends QueryService<Membership> {
|
|||||||
if (criteria.getId() != null) {
|
if (criteria.getId() != null) {
|
||||||
specification = specification.and(buildSpecification(criteria.getId(), Membership_.id));
|
specification = specification.and(buildSpecification(criteria.getId(), Membership_.id));
|
||||||
}
|
}
|
||||||
if (criteria.getDocumentDate() != null) {
|
if (criteria.getAdmissionDocumentDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getDocumentDate(), Membership_.documentDate));
|
specification = specification.and(buildRangeSpecification(criteria.getAdmissionDocumentDate(), Membership_.admissionDocumentDate));
|
||||||
}
|
}
|
||||||
if (criteria.getMemberFrom() != null) {
|
if (criteria.getCancellationDocumentDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getMemberFrom(), Membership_.memberFrom));
|
specification = specification.and(buildRangeSpecification(criteria.getCancellationDocumentDate(), Membership_.cancellationDocumentDate));
|
||||||
}
|
}
|
||||||
if (criteria.getMemberUntil() != null) {
|
if (criteria.getMemberFromDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getMemberUntil(), Membership_.memberUntil));
|
specification = specification.and(buildRangeSpecification(criteria.getMemberFromDate(), Membership_.memberFromDate));
|
||||||
|
}
|
||||||
|
if (criteria.getMemberUntilDate() != null) {
|
||||||
|
specification = specification.and(buildRangeSpecification(criteria.getMemberUntilDate(), Membership_.memberUntilDate));
|
||||||
}
|
}
|
||||||
if (criteria.getRemark() != null) {
|
if (criteria.getRemark() != null) {
|
||||||
specification = specification.and(buildStringSpecification(criteria.getRemark(), Membership_.remark));
|
specification = specification.and(buildStringSpecification(criteria.getRemark(), Membership_.remark));
|
||||||
|
@ -98,20 +98,20 @@ public class SepaMandateQueryService extends QueryService<SepaMandate> {
|
|||||||
if (criteria.getBic() != null) {
|
if (criteria.getBic() != null) {
|
||||||
specification = specification.and(buildStringSpecification(criteria.getBic(), SepaMandate_.bic));
|
specification = specification.and(buildStringSpecification(criteria.getBic(), SepaMandate_.bic));
|
||||||
}
|
}
|
||||||
if (criteria.getDocumentDate() != null) {
|
if (criteria.getGrantingDocumentDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getDocumentDate(), SepaMandate_.documentDate));
|
specification = specification.and(buildRangeSpecification(criteria.getGrantingDocumentDate(), SepaMandate_.grantingDocumentDate));
|
||||||
}
|
}
|
||||||
if (criteria.getValidFrom() != null) {
|
if (criteria.getRevokationDocumentDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getValidFrom(), SepaMandate_.validFrom));
|
specification = specification.and(buildRangeSpecification(criteria.getRevokationDocumentDate(), SepaMandate_.revokationDocumentDate));
|
||||||
}
|
}
|
||||||
if (criteria.getValidUntil() != null) {
|
if (criteria.getValidFromDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getValidUntil(), SepaMandate_.validUntil));
|
specification = specification.and(buildRangeSpecification(criteria.getValidFromDate(), SepaMandate_.validFromDate));
|
||||||
}
|
}
|
||||||
if (criteria.getLastUsed() != null) {
|
if (criteria.getValidUntilDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getLastUsed(), SepaMandate_.lastUsed));
|
specification = specification.and(buildRangeSpecification(criteria.getValidUntilDate(), SepaMandate_.validUntilDate));
|
||||||
}
|
}
|
||||||
if (criteria.getCancellationDate() != null) {
|
if (criteria.getLastUsedDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getCancellationDate(), SepaMandate_.cancellationDate));
|
specification = specification.and(buildRangeSpecification(criteria.getLastUsedDate(), SepaMandate_.lastUsedDate));
|
||||||
}
|
}
|
||||||
if (criteria.getRemark() != null) {
|
if (criteria.getRemark() != null) {
|
||||||
specification = specification.and(buildStringSpecification(criteria.getRemark(), SepaMandate_.remark));
|
specification = specification.and(buildStringSpecification(criteria.getRemark(), SepaMandate_.remark));
|
||||||
|
@ -31,7 +31,7 @@ public class AssetDTO implements Serializable {
|
|||||||
|
|
||||||
private Long membershipId;
|
private Long membershipId;
|
||||||
|
|
||||||
private String membershipDocumentDate;
|
private String membershipAdmissionDocumentDate;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -89,12 +89,12 @@ public class AssetDTO implements Serializable {
|
|||||||
this.membershipId = membershipId;
|
this.membershipId = membershipId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMembershipDocumentDate() {
|
public String getMembershipAdmissionDocumentDate() {
|
||||||
return membershipDocumentDate;
|
return membershipAdmissionDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMembershipDocumentDate(String membershipDocumentDate) {
|
public void setMembershipAdmissionDocumentDate(String membershipAdmissionDocumentDate) {
|
||||||
this.membershipDocumentDate = membershipDocumentDate;
|
this.membershipAdmissionDocumentDate = membershipAdmissionDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -128,7 +128,7 @@ public class AssetDTO implements Serializable {
|
|||||||
", amount=" + getAmount() +
|
", amount=" + getAmount() +
|
||||||
", remark='" + getRemark() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
", membership=" + getMembershipId() +
|
", membership=" + getMembershipId() +
|
||||||
", membership='" + getMembershipDocumentDate() + "'" +
|
", membership='" + getMembershipAdmissionDocumentDate() + "'" +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@ package org.hostsharing.hsadminng.service.dto;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import org.hostsharing.hsadminng.domain.enumeration.CustomerKind;
|
||||||
|
import org.hostsharing.hsadminng.domain.enumeration.VatRegion;
|
||||||
import io.github.jhipster.service.filter.BooleanFilter;
|
import io.github.jhipster.service.filter.BooleanFilter;
|
||||||
import io.github.jhipster.service.filter.DoubleFilter;
|
import io.github.jhipster.service.filter.DoubleFilter;
|
||||||
import io.github.jhipster.service.filter.Filter;
|
import io.github.jhipster.service.filter.Filter;
|
||||||
@ -9,6 +11,7 @@ import io.github.jhipster.service.filter.FloatFilter;
|
|||||||
import io.github.jhipster.service.filter.IntegerFilter;
|
import io.github.jhipster.service.filter.IntegerFilter;
|
||||||
import io.github.jhipster.service.filter.LongFilter;
|
import io.github.jhipster.service.filter.LongFilter;
|
||||||
import io.github.jhipster.service.filter.StringFilter;
|
import io.github.jhipster.service.filter.StringFilter;
|
||||||
|
import io.github.jhipster.service.filter.LocalDateFilter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Criteria class for the Customer entity. This class is used in CustomerResource to
|
* Criteria class for the Customer entity. This class is used in CustomerResource to
|
||||||
@ -19,6 +22,16 @@ import io.github.jhipster.service.filter.StringFilter;
|
|||||||
* fix type specific filters.
|
* fix type specific filters.
|
||||||
*/
|
*/
|
||||||
public class CustomerCriteria implements Serializable {
|
public class CustomerCriteria implements Serializable {
|
||||||
|
/**
|
||||||
|
* Class for filtering CustomerKind
|
||||||
|
*/
|
||||||
|
public static class CustomerKindFilter extends Filter<CustomerKind> {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Class for filtering VatRegion
|
||||||
|
*/
|
||||||
|
public static class VatRegionFilter extends Filter<VatRegion> {
|
||||||
|
}
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ -30,6 +43,20 @@ public class CustomerCriteria implements Serializable {
|
|||||||
|
|
||||||
private StringFilter name;
|
private StringFilter name;
|
||||||
|
|
||||||
|
private CustomerKindFilter kind;
|
||||||
|
|
||||||
|
private LocalDateFilter birthDate;
|
||||||
|
|
||||||
|
private StringFilter birthPlace;
|
||||||
|
|
||||||
|
private StringFilter registrationCourt;
|
||||||
|
|
||||||
|
private StringFilter registrationNumber;
|
||||||
|
|
||||||
|
private VatRegionFilter vatRegion;
|
||||||
|
|
||||||
|
private StringFilter vatNumber;
|
||||||
|
|
||||||
private StringFilter contractualSalutation;
|
private StringFilter contractualSalutation;
|
||||||
|
|
||||||
private StringFilter contractualAddress;
|
private StringFilter contractualAddress;
|
||||||
@ -76,6 +103,62 @@ public class CustomerCriteria implements Serializable {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CustomerKindFilter getKind() {
|
||||||
|
return kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKind(CustomerKindFilter kind) {
|
||||||
|
this.kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateFilter getBirthDate() {
|
||||||
|
return birthDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBirthDate(LocalDateFilter birthDate) {
|
||||||
|
this.birthDate = birthDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StringFilter getBirthPlace() {
|
||||||
|
return birthPlace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBirthPlace(StringFilter birthPlace) {
|
||||||
|
this.birthPlace = birthPlace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StringFilter getRegistrationCourt() {
|
||||||
|
return registrationCourt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationCourt(StringFilter registrationCourt) {
|
||||||
|
this.registrationCourt = registrationCourt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StringFilter getRegistrationNumber() {
|
||||||
|
return registrationNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationNumber(StringFilter registrationNumber) {
|
||||||
|
this.registrationNumber = registrationNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VatRegionFilter getVatRegion() {
|
||||||
|
return vatRegion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVatRegion(VatRegionFilter vatRegion) {
|
||||||
|
this.vatRegion = vatRegion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StringFilter getVatNumber() {
|
||||||
|
return vatNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVatNumber(StringFilter vatNumber) {
|
||||||
|
this.vatNumber = vatNumber;
|
||||||
|
}
|
||||||
|
|
||||||
public StringFilter getContractualSalutation() {
|
public StringFilter getContractualSalutation() {
|
||||||
return contractualSalutation;
|
return contractualSalutation;
|
||||||
}
|
}
|
||||||
@ -147,6 +230,13 @@ public class CustomerCriteria implements Serializable {
|
|||||||
Objects.equals(reference, that.reference) &&
|
Objects.equals(reference, that.reference) &&
|
||||||
Objects.equals(prefix, that.prefix) &&
|
Objects.equals(prefix, that.prefix) &&
|
||||||
Objects.equals(name, that.name) &&
|
Objects.equals(name, that.name) &&
|
||||||
|
Objects.equals(kind, that.kind) &&
|
||||||
|
Objects.equals(birthDate, that.birthDate) &&
|
||||||
|
Objects.equals(birthPlace, that.birthPlace) &&
|
||||||
|
Objects.equals(registrationCourt, that.registrationCourt) &&
|
||||||
|
Objects.equals(registrationNumber, that.registrationNumber) &&
|
||||||
|
Objects.equals(vatRegion, that.vatRegion) &&
|
||||||
|
Objects.equals(vatNumber, that.vatNumber) &&
|
||||||
Objects.equals(contractualSalutation, that.contractualSalutation) &&
|
Objects.equals(contractualSalutation, that.contractualSalutation) &&
|
||||||
Objects.equals(contractualAddress, that.contractualAddress) &&
|
Objects.equals(contractualAddress, that.contractualAddress) &&
|
||||||
Objects.equals(billingSalutation, that.billingSalutation) &&
|
Objects.equals(billingSalutation, that.billingSalutation) &&
|
||||||
@ -163,6 +253,13 @@ public class CustomerCriteria implements Serializable {
|
|||||||
reference,
|
reference,
|
||||||
prefix,
|
prefix,
|
||||||
name,
|
name,
|
||||||
|
kind,
|
||||||
|
birthDate,
|
||||||
|
birthPlace,
|
||||||
|
registrationCourt,
|
||||||
|
registrationNumber,
|
||||||
|
vatRegion,
|
||||||
|
vatNumber,
|
||||||
contractualSalutation,
|
contractualSalutation,
|
||||||
contractualAddress,
|
contractualAddress,
|
||||||
billingSalutation,
|
billingSalutation,
|
||||||
@ -180,6 +277,13 @@ public class CustomerCriteria implements Serializable {
|
|||||||
(reference != null ? "reference=" + reference + ", " : "") +
|
(reference != null ? "reference=" + reference + ", " : "") +
|
||||||
(prefix != null ? "prefix=" + prefix + ", " : "") +
|
(prefix != null ? "prefix=" + prefix + ", " : "") +
|
||||||
(name != null ? "name=" + name + ", " : "") +
|
(name != null ? "name=" + name + ", " : "") +
|
||||||
|
(kind != null ? "kind=" + kind + ", " : "") +
|
||||||
|
(birthDate != null ? "birthDate=" + birthDate + ", " : "") +
|
||||||
|
(birthPlace != null ? "birthPlace=" + birthPlace + ", " : "") +
|
||||||
|
(registrationCourt != null ? "registrationCourt=" + registrationCourt + ", " : "") +
|
||||||
|
(registrationNumber != null ? "registrationNumber=" + registrationNumber + ", " : "") +
|
||||||
|
(vatRegion != null ? "vatRegion=" + vatRegion + ", " : "") +
|
||||||
|
(vatNumber != null ? "vatNumber=" + vatNumber + ", " : "") +
|
||||||
(contractualSalutation != null ? "contractualSalutation=" + contractualSalutation + ", " : "") +
|
(contractualSalutation != null ? "contractualSalutation=" + contractualSalutation + ", " : "") +
|
||||||
(contractualAddress != null ? "contractualAddress=" + contractualAddress + ", " : "") +
|
(contractualAddress != null ? "contractualAddress=" + contractualAddress + ", " : "") +
|
||||||
(billingSalutation != null ? "billingSalutation=" + billingSalutation + ", " : "") +
|
(billingSalutation != null ? "billingSalutation=" + billingSalutation + ", " : "") +
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
package org.hostsharing.hsadminng.service.dto;
|
package org.hostsharing.hsadminng.service.dto;
|
||||||
|
import java.time.LocalDate;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import org.hostsharing.hsadminng.domain.enumeration.CustomerKind;
|
||||||
|
import org.hostsharing.hsadminng.domain.enumeration.VatRegion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A DTO for the Customer entity.
|
* A DTO for the Customer entity.
|
||||||
@ -24,6 +27,26 @@ public class CustomerDTO implements Serializable {
|
|||||||
@Size(max = 80)
|
@Size(max = 80)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private CustomerKind kind;
|
||||||
|
|
||||||
|
private LocalDate birthDate;
|
||||||
|
|
||||||
|
@Size(max = 80)
|
||||||
|
private String birthPlace;
|
||||||
|
|
||||||
|
@Size(max = 80)
|
||||||
|
private String registrationCourt;
|
||||||
|
|
||||||
|
@Size(max = 80)
|
||||||
|
private String registrationNumber;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private VatRegion vatRegion;
|
||||||
|
|
||||||
|
@Size(max = 40)
|
||||||
|
private String vatNumber;
|
||||||
|
|
||||||
@Size(max = 80)
|
@Size(max = 80)
|
||||||
private String contractualSalutation;
|
private String contractualSalutation;
|
||||||
|
|
||||||
@ -73,6 +96,62 @@ public class CustomerDTO implements Serializable {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CustomerKind getKind() {
|
||||||
|
return kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKind(CustomerKind kind) {
|
||||||
|
this.kind = kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getBirthDate() {
|
||||||
|
return birthDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBirthDate(LocalDate birthDate) {
|
||||||
|
this.birthDate = birthDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBirthPlace() {
|
||||||
|
return birthPlace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBirthPlace(String birthPlace) {
|
||||||
|
this.birthPlace = birthPlace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegistrationCourt() {
|
||||||
|
return registrationCourt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationCourt(String registrationCourt) {
|
||||||
|
this.registrationCourt = registrationCourt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegistrationNumber() {
|
||||||
|
return registrationNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationNumber(String registrationNumber) {
|
||||||
|
this.registrationNumber = registrationNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VatRegion getVatRegion() {
|
||||||
|
return vatRegion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVatRegion(VatRegion vatRegion) {
|
||||||
|
this.vatRegion = vatRegion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVatNumber() {
|
||||||
|
return vatNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVatNumber(String vatNumber) {
|
||||||
|
this.vatNumber = vatNumber;
|
||||||
|
}
|
||||||
|
|
||||||
public String getContractualSalutation() {
|
public String getContractualSalutation() {
|
||||||
return contractualSalutation;
|
return contractualSalutation;
|
||||||
}
|
}
|
||||||
@ -141,6 +220,13 @@ public class CustomerDTO implements Serializable {
|
|||||||
", reference=" + getReference() +
|
", reference=" + getReference() +
|
||||||
", prefix='" + getPrefix() + "'" +
|
", prefix='" + getPrefix() + "'" +
|
||||||
", name='" + getName() + "'" +
|
", name='" + getName() + "'" +
|
||||||
|
", kind='" + getKind() + "'" +
|
||||||
|
", birthDate='" + getBirthDate() + "'" +
|
||||||
|
", birthPlace='" + getBirthPlace() + "'" +
|
||||||
|
", registrationCourt='" + getRegistrationCourt() + "'" +
|
||||||
|
", registrationNumber='" + getRegistrationNumber() + "'" +
|
||||||
|
", vatRegion='" + getVatRegion() + "'" +
|
||||||
|
", vatNumber='" + getVatNumber() + "'" +
|
||||||
", contractualSalutation='" + getContractualSalutation() + "'" +
|
", contractualSalutation='" + getContractualSalutation() + "'" +
|
||||||
", contractualAddress='" + getContractualAddress() + "'" +
|
", contractualAddress='" + getContractualAddress() + "'" +
|
||||||
", billingSalutation='" + getBillingSalutation() + "'" +
|
", billingSalutation='" + getBillingSalutation() + "'" +
|
||||||
|
@ -25,11 +25,13 @@ public class MembershipCriteria implements Serializable {
|
|||||||
|
|
||||||
private LongFilter id;
|
private LongFilter id;
|
||||||
|
|
||||||
private LocalDateFilter documentDate;
|
private LocalDateFilter admissionDocumentDate;
|
||||||
|
|
||||||
private LocalDateFilter memberFrom;
|
private LocalDateFilter cancellationDocumentDate;
|
||||||
|
|
||||||
private LocalDateFilter memberUntil;
|
private LocalDateFilter memberFromDate;
|
||||||
|
|
||||||
|
private LocalDateFilter memberUntilDate;
|
||||||
|
|
||||||
private StringFilter remark;
|
private StringFilter remark;
|
||||||
|
|
||||||
@ -47,28 +49,36 @@ public class MembershipCriteria implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getDocumentDate() {
|
public LocalDateFilter getAdmissionDocumentDate() {
|
||||||
return documentDate;
|
return admissionDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDocumentDate(LocalDateFilter documentDate) {
|
public void setAdmissionDocumentDate(LocalDateFilter admissionDocumentDate) {
|
||||||
this.documentDate = documentDate;
|
this.admissionDocumentDate = admissionDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getMemberFrom() {
|
public LocalDateFilter getCancellationDocumentDate() {
|
||||||
return memberFrom;
|
return cancellationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMemberFrom(LocalDateFilter memberFrom) {
|
public void setCancellationDocumentDate(LocalDateFilter cancellationDocumentDate) {
|
||||||
this.memberFrom = memberFrom;
|
this.cancellationDocumentDate = cancellationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getMemberUntil() {
|
public LocalDateFilter getMemberFromDate() {
|
||||||
return memberUntil;
|
return memberFromDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMemberUntil(LocalDateFilter memberUntil) {
|
public void setMemberFromDate(LocalDateFilter memberFromDate) {
|
||||||
this.memberUntil = memberUntil;
|
this.memberFromDate = memberFromDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateFilter getMemberUntilDate() {
|
||||||
|
return memberUntilDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberUntilDate(LocalDateFilter memberUntilDate) {
|
||||||
|
this.memberUntilDate = memberUntilDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StringFilter getRemark() {
|
public StringFilter getRemark() {
|
||||||
@ -115,9 +125,10 @@ public class MembershipCriteria implements Serializable {
|
|||||||
final MembershipCriteria that = (MembershipCriteria) o;
|
final MembershipCriteria that = (MembershipCriteria) o;
|
||||||
return
|
return
|
||||||
Objects.equals(id, that.id) &&
|
Objects.equals(id, that.id) &&
|
||||||
Objects.equals(documentDate, that.documentDate) &&
|
Objects.equals(admissionDocumentDate, that.admissionDocumentDate) &&
|
||||||
Objects.equals(memberFrom, that.memberFrom) &&
|
Objects.equals(cancellationDocumentDate, that.cancellationDocumentDate) &&
|
||||||
Objects.equals(memberUntil, that.memberUntil) &&
|
Objects.equals(memberFromDate, that.memberFromDate) &&
|
||||||
|
Objects.equals(memberUntilDate, that.memberUntilDate) &&
|
||||||
Objects.equals(remark, that.remark) &&
|
Objects.equals(remark, that.remark) &&
|
||||||
Objects.equals(shareId, that.shareId) &&
|
Objects.equals(shareId, that.shareId) &&
|
||||||
Objects.equals(assetId, that.assetId) &&
|
Objects.equals(assetId, that.assetId) &&
|
||||||
@ -128,9 +139,10 @@ public class MembershipCriteria implements Serializable {
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(
|
return Objects.hash(
|
||||||
id,
|
id,
|
||||||
documentDate,
|
admissionDocumentDate,
|
||||||
memberFrom,
|
cancellationDocumentDate,
|
||||||
memberUntil,
|
memberFromDate,
|
||||||
|
memberUntilDate,
|
||||||
remark,
|
remark,
|
||||||
shareId,
|
shareId,
|
||||||
assetId,
|
assetId,
|
||||||
@ -142,9 +154,10 @@ public class MembershipCriteria implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "MembershipCriteria{" +
|
return "MembershipCriteria{" +
|
||||||
(id != null ? "id=" + id + ", " : "") +
|
(id != null ? "id=" + id + ", " : "") +
|
||||||
(documentDate != null ? "documentDate=" + documentDate + ", " : "") +
|
(admissionDocumentDate != null ? "admissionDocumentDate=" + admissionDocumentDate + ", " : "") +
|
||||||
(memberFrom != null ? "memberFrom=" + memberFrom + ", " : "") +
|
(cancellationDocumentDate != null ? "cancellationDocumentDate=" + cancellationDocumentDate + ", " : "") +
|
||||||
(memberUntil != null ? "memberUntil=" + memberUntil + ", " : "") +
|
(memberFromDate != null ? "memberFromDate=" + memberFromDate + ", " : "") +
|
||||||
|
(memberUntilDate != null ? "memberUntilDate=" + memberUntilDate + ", " : "") +
|
||||||
(remark != null ? "remark=" + remark + ", " : "") +
|
(remark != null ? "remark=" + remark + ", " : "") +
|
||||||
(shareId != null ? "shareId=" + shareId + ", " : "") +
|
(shareId != null ? "shareId=" + shareId + ", " : "") +
|
||||||
(assetId != null ? "assetId=" + assetId + ", " : "") +
|
(assetId != null ? "assetId=" + assetId + ", " : "") +
|
||||||
|
@ -3,7 +3,6 @@ import java.time.LocalDate;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.Consumer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A DTO for the Membership entity.
|
* A DTO for the Membership entity.
|
||||||
@ -13,12 +12,14 @@ public class MembershipDTO implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private LocalDate documentDate;
|
private LocalDate admissionDocumentDate;
|
||||||
|
|
||||||
|
private LocalDate cancellationDocumentDate;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private LocalDate memberFrom;
|
private LocalDate memberFromDate;
|
||||||
|
|
||||||
private LocalDate memberUntil;
|
private LocalDate memberUntilDate;
|
||||||
|
|
||||||
@Size(max = 160)
|
@Size(max = 160)
|
||||||
private String remark;
|
private String remark;
|
||||||
@ -28,12 +29,6 @@ public class MembershipDTO implements Serializable {
|
|||||||
|
|
||||||
private String customerPrefix;
|
private String customerPrefix;
|
||||||
|
|
||||||
public MembershipDTO with(
|
|
||||||
Consumer<MembershipDTO> builderFunction) {
|
|
||||||
builderFunction.accept(this);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -42,28 +37,36 @@ public class MembershipDTO implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getDocumentDate() {
|
public LocalDate getAdmissionDocumentDate() {
|
||||||
return documentDate;
|
return admissionDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDocumentDate(LocalDate documentDate) {
|
public void setAdmissionDocumentDate(LocalDate admissionDocumentDate) {
|
||||||
this.documentDate = documentDate;
|
this.admissionDocumentDate = admissionDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getMemberFrom() {
|
public LocalDate getCancellationDocumentDate() {
|
||||||
return memberFrom;
|
return cancellationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMemberFrom(LocalDate memberFrom) {
|
public void setCancellationDocumentDate(LocalDate cancellationDocumentDate) {
|
||||||
this.memberFrom = memberFrom;
|
this.cancellationDocumentDate = cancellationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getMemberUntil() {
|
public LocalDate getMemberFromDate() {
|
||||||
return memberUntil;
|
return memberFromDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMemberUntil(LocalDate memberUntil) {
|
public void setMemberFromDate(LocalDate memberFromDate) {
|
||||||
this.memberUntil = memberUntil;
|
this.memberFromDate = memberFromDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getMemberUntilDate() {
|
||||||
|
return memberUntilDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberUntilDate(LocalDate memberUntilDate) {
|
||||||
|
this.memberUntilDate = memberUntilDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
@ -115,9 +118,10 @@ public class MembershipDTO implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "MembershipDTO{" +
|
return "MembershipDTO{" +
|
||||||
"id=" + getId() +
|
"id=" + getId() +
|
||||||
", documentDate='" + getDocumentDate() + "'" +
|
", admissionDocumentDate='" + getAdmissionDocumentDate() + "'" +
|
||||||
", memberFrom='" + getMemberFrom() + "'" +
|
", cancellationDocumentDate='" + getCancellationDocumentDate() + "'" +
|
||||||
", memberUntil='" + getMemberUntil() + "'" +
|
", memberFromDate='" + getMemberFromDate() + "'" +
|
||||||
|
", memberUntilDate='" + getMemberUntilDate() + "'" +
|
||||||
", remark='" + getRemark() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
", customer=" + getCustomerId() +
|
", customer=" + getCustomerId() +
|
||||||
", customer='" + getCustomerPrefix() + "'" +
|
", customer='" + getCustomerPrefix() + "'" +
|
||||||
|
@ -31,15 +31,15 @@ public class SepaMandateCriteria implements Serializable {
|
|||||||
|
|
||||||
private StringFilter bic;
|
private StringFilter bic;
|
||||||
|
|
||||||
private LocalDateFilter documentDate;
|
private LocalDateFilter grantingDocumentDate;
|
||||||
|
|
||||||
private LocalDateFilter validFrom;
|
private LocalDateFilter revokationDocumentDate;
|
||||||
|
|
||||||
private LocalDateFilter validUntil;
|
private LocalDateFilter validFromDate;
|
||||||
|
|
||||||
private LocalDateFilter lastUsed;
|
private LocalDateFilter validUntilDate;
|
||||||
|
|
||||||
private LocalDateFilter cancellationDate;
|
private LocalDateFilter lastUsedDate;
|
||||||
|
|
||||||
private StringFilter remark;
|
private StringFilter remark;
|
||||||
|
|
||||||
@ -77,44 +77,44 @@ public class SepaMandateCriteria implements Serializable {
|
|||||||
this.bic = bic;
|
this.bic = bic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getDocumentDate() {
|
public LocalDateFilter getGrantingDocumentDate() {
|
||||||
return documentDate;
|
return grantingDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDocumentDate(LocalDateFilter documentDate) {
|
public void setGrantingDocumentDate(LocalDateFilter grantingDocumentDate) {
|
||||||
this.documentDate = documentDate;
|
this.grantingDocumentDate = grantingDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getValidFrom() {
|
public LocalDateFilter getRevokationDocumentDate() {
|
||||||
return validFrom;
|
return revokationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValidFrom(LocalDateFilter validFrom) {
|
public void setRevokationDocumentDate(LocalDateFilter revokationDocumentDate) {
|
||||||
this.validFrom = validFrom;
|
this.revokationDocumentDate = revokationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getValidUntil() {
|
public LocalDateFilter getValidFromDate() {
|
||||||
return validUntil;
|
return validFromDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValidUntil(LocalDateFilter validUntil) {
|
public void setValidFromDate(LocalDateFilter validFromDate) {
|
||||||
this.validUntil = validUntil;
|
this.validFromDate = validFromDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getLastUsed() {
|
public LocalDateFilter getValidUntilDate() {
|
||||||
return lastUsed;
|
return validUntilDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastUsed(LocalDateFilter lastUsed) {
|
public void setValidUntilDate(LocalDateFilter validUntilDate) {
|
||||||
this.lastUsed = lastUsed;
|
this.validUntilDate = validUntilDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getCancellationDate() {
|
public LocalDateFilter getLastUsedDate() {
|
||||||
return cancellationDate;
|
return lastUsedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCancellationDate(LocalDateFilter cancellationDate) {
|
public void setLastUsedDate(LocalDateFilter lastUsedDate) {
|
||||||
this.cancellationDate = cancellationDate;
|
this.lastUsedDate = lastUsedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StringFilter getRemark() {
|
public StringFilter getRemark() {
|
||||||
@ -148,11 +148,11 @@ public class SepaMandateCriteria implements Serializable {
|
|||||||
Objects.equals(reference, that.reference) &&
|
Objects.equals(reference, that.reference) &&
|
||||||
Objects.equals(iban, that.iban) &&
|
Objects.equals(iban, that.iban) &&
|
||||||
Objects.equals(bic, that.bic) &&
|
Objects.equals(bic, that.bic) &&
|
||||||
Objects.equals(documentDate, that.documentDate) &&
|
Objects.equals(grantingDocumentDate, that.grantingDocumentDate) &&
|
||||||
Objects.equals(validFrom, that.validFrom) &&
|
Objects.equals(revokationDocumentDate, that.revokationDocumentDate) &&
|
||||||
Objects.equals(validUntil, that.validUntil) &&
|
Objects.equals(validFromDate, that.validFromDate) &&
|
||||||
Objects.equals(lastUsed, that.lastUsed) &&
|
Objects.equals(validUntilDate, that.validUntilDate) &&
|
||||||
Objects.equals(cancellationDate, that.cancellationDate) &&
|
Objects.equals(lastUsedDate, that.lastUsedDate) &&
|
||||||
Objects.equals(remark, that.remark) &&
|
Objects.equals(remark, that.remark) &&
|
||||||
Objects.equals(customerId, that.customerId);
|
Objects.equals(customerId, that.customerId);
|
||||||
}
|
}
|
||||||
@ -164,11 +164,11 @@ public class SepaMandateCriteria implements Serializable {
|
|||||||
reference,
|
reference,
|
||||||
iban,
|
iban,
|
||||||
bic,
|
bic,
|
||||||
documentDate,
|
grantingDocumentDate,
|
||||||
validFrom,
|
revokationDocumentDate,
|
||||||
validUntil,
|
validFromDate,
|
||||||
lastUsed,
|
validUntilDate,
|
||||||
cancellationDate,
|
lastUsedDate,
|
||||||
remark,
|
remark,
|
||||||
customerId
|
customerId
|
||||||
);
|
);
|
||||||
@ -181,11 +181,11 @@ public class SepaMandateCriteria implements Serializable {
|
|||||||
(reference != null ? "reference=" + reference + ", " : "") +
|
(reference != null ? "reference=" + reference + ", " : "") +
|
||||||
(iban != null ? "iban=" + iban + ", " : "") +
|
(iban != null ? "iban=" + iban + ", " : "") +
|
||||||
(bic != null ? "bic=" + bic + ", " : "") +
|
(bic != null ? "bic=" + bic + ", " : "") +
|
||||||
(documentDate != null ? "documentDate=" + documentDate + ", " : "") +
|
(grantingDocumentDate != null ? "grantingDocumentDate=" + grantingDocumentDate + ", " : "") +
|
||||||
(validFrom != null ? "validFrom=" + validFrom + ", " : "") +
|
(revokationDocumentDate != null ? "revokationDocumentDate=" + revokationDocumentDate + ", " : "") +
|
||||||
(validUntil != null ? "validUntil=" + validUntil + ", " : "") +
|
(validFromDate != null ? "validFromDate=" + validFromDate + ", " : "") +
|
||||||
(lastUsed != null ? "lastUsed=" + lastUsed + ", " : "") +
|
(validUntilDate != null ? "validUntilDate=" + validUntilDate + ", " : "") +
|
||||||
(cancellationDate != null ? "cancellationDate=" + cancellationDate + ", " : "") +
|
(lastUsedDate != null ? "lastUsedDate=" + lastUsedDate + ", " : "") +
|
||||||
(remark != null ? "remark=" + remark + ", " : "") +
|
(remark != null ? "remark=" + remark + ", " : "") +
|
||||||
(customerId != null ? "customerId=" + customerId + ", " : "") +
|
(customerId != null ? "customerId=" + customerId + ", " : "") +
|
||||||
"}";
|
"}";
|
||||||
|
@ -22,16 +22,16 @@ public class SepaMandateDTO implements Serializable {
|
|||||||
private String bic;
|
private String bic;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private LocalDate documentDate;
|
private LocalDate grantingDocumentDate;
|
||||||
|
|
||||||
|
private LocalDate revokationDocumentDate;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private LocalDate validFrom;
|
private LocalDate validFromDate;
|
||||||
|
|
||||||
private LocalDate validUntil;
|
private LocalDate validUntilDate;
|
||||||
|
|
||||||
private LocalDate lastUsed;
|
private LocalDate lastUsedDate;
|
||||||
|
|
||||||
private LocalDate cancellationDate;
|
|
||||||
|
|
||||||
@Size(max = 160)
|
@Size(max = 160)
|
||||||
private String remark;
|
private String remark;
|
||||||
@ -73,44 +73,44 @@ public class SepaMandateDTO implements Serializable {
|
|||||||
this.bic = bic;
|
this.bic = bic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getDocumentDate() {
|
public LocalDate getGrantingDocumentDate() {
|
||||||
return documentDate;
|
return grantingDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDocumentDate(LocalDate documentDate) {
|
public void setGrantingDocumentDate(LocalDate grantingDocumentDate) {
|
||||||
this.documentDate = documentDate;
|
this.grantingDocumentDate = grantingDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getValidFrom() {
|
public LocalDate getRevokationDocumentDate() {
|
||||||
return validFrom;
|
return revokationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValidFrom(LocalDate validFrom) {
|
public void setRevokationDocumentDate(LocalDate revokationDocumentDate) {
|
||||||
this.validFrom = validFrom;
|
this.revokationDocumentDate = revokationDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getValidUntil() {
|
public LocalDate getValidFromDate() {
|
||||||
return validUntil;
|
return validFromDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValidUntil(LocalDate validUntil) {
|
public void setValidFromDate(LocalDate validFromDate) {
|
||||||
this.validUntil = validUntil;
|
this.validFromDate = validFromDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getLastUsed() {
|
public LocalDate getValidUntilDate() {
|
||||||
return lastUsed;
|
return validUntilDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastUsed(LocalDate lastUsed) {
|
public void setValidUntilDate(LocalDate validUntilDate) {
|
||||||
this.lastUsed = lastUsed;
|
this.validUntilDate = validUntilDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getCancellationDate() {
|
public LocalDate getLastUsedDate() {
|
||||||
return cancellationDate;
|
return lastUsedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCancellationDate(LocalDate cancellationDate) {
|
public void setLastUsedDate(LocalDate lastUsedDate) {
|
||||||
this.cancellationDate = cancellationDate;
|
this.lastUsedDate = lastUsedDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
@ -165,11 +165,11 @@ public class SepaMandateDTO implements Serializable {
|
|||||||
", reference='" + getReference() + "'" +
|
", reference='" + getReference() + "'" +
|
||||||
", iban='" + getIban() + "'" +
|
", iban='" + getIban() + "'" +
|
||||||
", bic='" + getBic() + "'" +
|
", bic='" + getBic() + "'" +
|
||||||
", documentDate='" + getDocumentDate() + "'" +
|
", grantingDocumentDate='" + getGrantingDocumentDate() + "'" +
|
||||||
", validFrom='" + getValidFrom() + "'" +
|
", revokationDocumentDate='" + getRevokationDocumentDate() + "'" +
|
||||||
", validUntil='" + getValidUntil() + "'" +
|
", validFromDate='" + getValidFromDate() + "'" +
|
||||||
", lastUsed='" + getLastUsed() + "'" +
|
", validUntilDate='" + getValidUntilDate() + "'" +
|
||||||
", cancellationDate='" + getCancellationDate() + "'" +
|
", lastUsedDate='" + getLastUsedDate() + "'" +
|
||||||
", remark='" + getRemark() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
", customer=" + getCustomerId() +
|
", customer=" + getCustomerId() +
|
||||||
", customer='" + getCustomerPrefix() + "'" +
|
", customer='" + getCustomerPrefix() + "'" +
|
||||||
|
@ -30,7 +30,7 @@ public class ShareDTO implements Serializable {
|
|||||||
|
|
||||||
private Long membershipId;
|
private Long membershipId;
|
||||||
|
|
||||||
private String membershipDocumentDate;
|
private String membershipAdmissionDocumentDate;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -88,12 +88,12 @@ public class ShareDTO implements Serializable {
|
|||||||
this.membershipId = membershipId;
|
this.membershipId = membershipId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMembershipDocumentDate() {
|
public String getMembershipAdmissionDocumentDate() {
|
||||||
return membershipDocumentDate;
|
return membershipAdmissionDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMembershipDocumentDate(String membershipDocumentDate) {
|
public void setMembershipAdmissionDocumentDate(String membershipAdmissionDocumentDate) {
|
||||||
this.membershipDocumentDate = membershipDocumentDate;
|
this.membershipAdmissionDocumentDate = membershipAdmissionDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -127,7 +127,7 @@ public class ShareDTO implements Serializable {
|
|||||||
", quantity=" + getQuantity() +
|
", quantity=" + getQuantity() +
|
||||||
", remark='" + getRemark() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
", membership=" + getMembershipId() +
|
", membership=" + getMembershipId() +
|
||||||
", membership='" + getMembershipDocumentDate() + "'" +
|
", membership='" + getMembershipAdmissionDocumentDate() + "'" +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ import org.mapstruct.*;
|
|||||||
public interface AssetMapper extends EntityMapper<AssetDTO, Asset> {
|
public interface AssetMapper extends EntityMapper<AssetDTO, Asset> {
|
||||||
|
|
||||||
@Mapping(source = "membership.id", target = "membershipId")
|
@Mapping(source = "membership.id", target = "membershipId")
|
||||||
@Mapping(source = "membership.documentDate", target = "membershipDocumentDate")
|
@Mapping(source = "membership.admissionDocumentDate", target = "membershipAdmissionDocumentDate")
|
||||||
AssetDTO toDto(Asset asset);
|
AssetDTO toDto(Asset asset);
|
||||||
|
|
||||||
@Mapping(source = "membershipId", target = "membership")
|
@Mapping(source = "membershipId", target = "membership")
|
||||||
|
@ -12,7 +12,7 @@ import org.mapstruct.*;
|
|||||||
public interface ShareMapper extends EntityMapper<ShareDTO, Share> {
|
public interface ShareMapper extends EntityMapper<ShareDTO, Share> {
|
||||||
|
|
||||||
@Mapping(source = "membership.id", target = "membershipId")
|
@Mapping(source = "membership.id", target = "membershipId")
|
||||||
@Mapping(source = "membership.documentDate", target = "membershipDocumentDate")
|
@Mapping(source = "membership.admissionDocumentDate", target = "membershipAdmissionDocumentDate")
|
||||||
ShareDTO toDto(Share share);
|
ShareDTO toDto(Share share);
|
||||||
|
|
||||||
@Mapping(source = "membershipId", target = "membership")
|
@Mapping(source = "membershipId", target = "membership")
|
||||||
|
@ -3,10 +3,28 @@ dto all with mapstruct
|
|||||||
service all with serviceClass
|
service all with serviceClass
|
||||||
paginate all with infinite-scroll
|
paginate all with infinite-scroll
|
||||||
|
|
||||||
|
enum CustomerKind {
|
||||||
|
NATURAL,
|
||||||
|
LEGAL
|
||||||
|
}
|
||||||
|
|
||||||
|
enum VatRegion {
|
||||||
|
DOMESTIC,
|
||||||
|
EU,
|
||||||
|
OTHER
|
||||||
|
}
|
||||||
|
|
||||||
entity Customer {
|
entity Customer {
|
||||||
reference Integer required unique min(10000) max(99999),
|
reference Integer required unique min(10000) max(99999),
|
||||||
prefix String required maxlength(3) unique pattern(/[a-z][a-z0-9]+/),
|
prefix String required maxlength(3) unique pattern(/[a-z][a-z0-9]+/),
|
||||||
name String required maxlength(80),
|
name String required maxlength(80),
|
||||||
|
kind CustomerKind required,
|
||||||
|
birthDate LocalDate,
|
||||||
|
birthPlace String maxlength(80),
|
||||||
|
registrationCourt String maxlength(80),
|
||||||
|
registrationNumber String maxlength(80),
|
||||||
|
vatRegion VatRegion required,
|
||||||
|
vatNumber String maxlength(40),
|
||||||
contractualSalutation String maxlength(80),
|
contractualSalutation String maxlength(80),
|
||||||
contractualAddress String required maxlength(400),
|
contractualAddress String required maxlength(400),
|
||||||
billingSalutation String maxlength(80),
|
billingSalutation String maxlength(80),
|
||||||
@ -15,9 +33,10 @@ entity Customer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
entity Membership {
|
entity Membership {
|
||||||
documentDate LocalDate required,
|
admissionDocumentDate LocalDate required,
|
||||||
memberFrom LocalDate required,
|
cancellationDocumentDate LocalDate,
|
||||||
memberUntil LocalDate,
|
memberFromDate LocalDate required,
|
||||||
|
memberUntilDate LocalDate,
|
||||||
remark String maxlength(160)
|
remark String maxlength(160)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,17 +74,17 @@ entity SepaMandate {
|
|||||||
reference String maxlength(40) unique required,
|
reference String maxlength(40) unique required,
|
||||||
iban String maxlength(34),
|
iban String maxlength(34),
|
||||||
bic String maxlength(11),
|
bic String maxlength(11),
|
||||||
documentDate LocalDate required,
|
grantingDocumentDate LocalDate required,
|
||||||
validFrom LocalDate required,
|
revokationDocumentDate LocalDate,
|
||||||
validUntil LocalDate,
|
validFromDate LocalDate required,
|
||||||
lastUsed LocalDate,
|
validUntilDate LocalDate,
|
||||||
cancellationDate LocalDate,
|
lastUsedDate LocalDate,
|
||||||
remark String maxlength(160)
|
remark String maxlength(160)
|
||||||
}
|
}
|
||||||
|
|
||||||
relationship OneToMany {
|
relationship OneToMany {
|
||||||
Customer{membership} to Membership{customer(prefix) required},
|
Customer{membership} to Membership{customer(prefix) required},
|
||||||
Customer{sepamandate} to SepaMandate{customer(prefix) required},
|
Customer{sepamandate} to SepaMandate{customer(prefix) required},
|
||||||
Membership{share} to Share{membership(documentDate) required},
|
Membership{share} to Share{membership(admissionDocumentDate) required},
|
||||||
Membership{asset} to Asset{membership(documentDate) required}
|
Membership{asset} to Asset{membership(admissionDocumentDate) required}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,89 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
|
||||||
|
|
||||||
|
<property name="now" value="now()" dbms="h2"/>
|
||||||
|
|
||||||
|
<property name="now" value="current_timestamp" dbms="postgresql"/>
|
||||||
|
|
||||||
|
<property name="floatType" value="float4" dbms="postgresql, h2"/>
|
||||||
|
<property name="floatType" value="float" dbms="mysql, oracle, mssql"/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Added the entity Customer.
|
||||||
|
-->
|
||||||
|
<changeSet id="20190424123255-1" author="jhipster">
|
||||||
|
<createTable tableName="customer">
|
||||||
|
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
||||||
|
<constraints primaryKey="true" nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="reference" type="integer">
|
||||||
|
<constraints nullable="false" unique="true" uniqueConstraintName="ux_customer_reference" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="prefix" type="varchar(3)">
|
||||||
|
<constraints nullable="false" unique="true" uniqueConstraintName="ux_customer_prefix" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="name" type="varchar(80)">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="kind" type="varchar(255)">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="birth_date" type="date">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="birth_place" type="varchar(80)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="registration_court" type="varchar(80)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="registration_number" type="varchar(80)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="vat_region" type="varchar(255)">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="vat_number" type="varchar(40)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="contractual_salutation" type="varchar(80)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="contractual_address" type="varchar(400)">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="billing_salutation" type="varchar(80)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="billing_address" type="varchar(400)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="remark" type="varchar(160)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
|
||||||
|
</createTable>
|
||||||
|
|
||||||
|
</changeSet>
|
||||||
|
<!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
|
||||||
|
</databaseChangeLog>
|
@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
|
||||||
|
|
||||||
|
<property name="now" value="now()" dbms="h2"/>
|
||||||
|
|
||||||
|
<property name="now" value="current_timestamp" dbms="postgresql"/>
|
||||||
|
|
||||||
|
<property name="floatType" value="float4" dbms="postgresql, h2"/>
|
||||||
|
<property name="floatType" value="float" dbms="mysql, oracle, mssql"/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Added the entity Membership.
|
||||||
|
-->
|
||||||
|
<changeSet id="20190424123256-1" author="jhipster">
|
||||||
|
<createTable tableName="membership">
|
||||||
|
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
||||||
|
<constraints primaryKey="true" nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="admission_document_date" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="cancellation_document_date" type="date">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="member_from_date" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="member_until_date" type="date">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="remark" type="varchar(160)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="customer_id" type="bigint">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
|
||||||
|
</createTable>
|
||||||
|
|
||||||
|
</changeSet>
|
||||||
|
<!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
|
||||||
|
</databaseChangeLog>
|
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
|
||||||
|
<!--
|
||||||
|
Added the constraints for entity Membership.
|
||||||
|
-->
|
||||||
|
<changeSet id="20190424123256-2" author="jhipster">
|
||||||
|
|
||||||
|
<addForeignKeyConstraint baseColumnNames="customer_id"
|
||||||
|
baseTableName="membership"
|
||||||
|
constraintName="fk_membership_customer_id"
|
||||||
|
referencedColumnNames="id"
|
||||||
|
referencedTableName="customer"/>
|
||||||
|
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
|
||||||
|
|
||||||
|
<property name="now" value="now()" dbms="h2"/>
|
||||||
|
|
||||||
|
<property name="now" value="current_timestamp" dbms="postgresql"/>
|
||||||
|
|
||||||
|
<property name="floatType" value="float4" dbms="postgresql, h2"/>
|
||||||
|
<property name="floatType" value="float" dbms="mysql, oracle, mssql"/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Added the entity Share.
|
||||||
|
-->
|
||||||
|
<changeSet id="20190424123257-1" author="jhipster">
|
||||||
|
<createTable tableName="share">
|
||||||
|
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
||||||
|
<constraints primaryKey="true" nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="document_date" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="value_date" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="action" type="varchar(255)">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="quantity" type="integer">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="remark" type="varchar(160)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="membership_id" type="bigint">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
|
||||||
|
</createTable>
|
||||||
|
|
||||||
|
</changeSet>
|
||||||
|
<!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
|
||||||
|
</databaseChangeLog>
|
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
|
||||||
|
<!--
|
||||||
|
Added the constraints for entity Share.
|
||||||
|
-->
|
||||||
|
<changeSet id="20190424123257-2" author="jhipster">
|
||||||
|
|
||||||
|
<addForeignKeyConstraint baseColumnNames="membership_id"
|
||||||
|
baseTableName="share"
|
||||||
|
constraintName="fk_share_membership_id"
|
||||||
|
referencedColumnNames="id"
|
||||||
|
referencedTableName="membership"/>
|
||||||
|
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
|
||||||
|
|
||||||
|
<property name="now" value="now()" dbms="h2"/>
|
||||||
|
|
||||||
|
<property name="now" value="current_timestamp" dbms="postgresql"/>
|
||||||
|
|
||||||
|
<property name="floatType" value="float4" dbms="postgresql, h2"/>
|
||||||
|
<property name="floatType" value="float" dbms="mysql, oracle, mssql"/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Added the entity Asset.
|
||||||
|
-->
|
||||||
|
<changeSet id="20190424123258-1" author="jhipster">
|
||||||
|
<createTable tableName="asset">
|
||||||
|
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
||||||
|
<constraints primaryKey="true" nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="document_date" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="value_date" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="action" type="varchar(255)">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="amount" type="decimal(10,2)">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="remark" type="varchar(160)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="membership_id" type="bigint">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
|
||||||
|
</createTable>
|
||||||
|
|
||||||
|
</changeSet>
|
||||||
|
<!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
|
||||||
|
</databaseChangeLog>
|
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
|
||||||
|
<!--
|
||||||
|
Added the constraints for entity Asset.
|
||||||
|
-->
|
||||||
|
<changeSet id="20190424123258-2" author="jhipster">
|
||||||
|
|
||||||
|
<addForeignKeyConstraint baseColumnNames="membership_id"
|
||||||
|
baseTableName="asset"
|
||||||
|
constraintName="fk_asset_membership_id"
|
||||||
|
referencedColumnNames="id"
|
||||||
|
referencedTableName="membership"/>
|
||||||
|
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd
|
||||||
|
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
|
||||||
|
|
||||||
|
<property name="now" value="now()" dbms="h2"/>
|
||||||
|
|
||||||
|
<property name="now" value="current_timestamp" dbms="postgresql"/>
|
||||||
|
|
||||||
|
<property name="floatType" value="float4" dbms="postgresql, h2"/>
|
||||||
|
<property name="floatType" value="float" dbms="mysql, oracle, mssql"/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Added the entity SepaMandate.
|
||||||
|
-->
|
||||||
|
<changeSet id="20190424123259-1" author="jhipster">
|
||||||
|
<createTable tableName="sepa_mandate">
|
||||||
|
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
||||||
|
<constraints primaryKey="true" nullable="false"/>
|
||||||
|
</column>
|
||||||
|
<column name="reference" type="varchar(40)">
|
||||||
|
<constraints nullable="false" unique="true" uniqueConstraintName="ux_sepa_mandate_reference" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="iban" type="varchar(34)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="bic" type="varchar(11)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="granting_document_date" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="revokation_document_date" type="date">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="valid_from_date" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="valid_until_date" type="date">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="last_used_date" type="date">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="remark" type="varchar(160)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="customer_id" type="bigint">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
|
||||||
|
</createTable>
|
||||||
|
|
||||||
|
</changeSet>
|
||||||
|
<!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
|
||||||
|
</databaseChangeLog>
|
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
|
||||||
|
<!--
|
||||||
|
Added the constraints for entity SepaMandate.
|
||||||
|
-->
|
||||||
|
<changeSet id="20190424123259-2" author="jhipster">
|
||||||
|
|
||||||
|
<addForeignKeyConstraint baseColumnNames="customer_id"
|
||||||
|
baseTableName="sepa_mandate"
|
||||||
|
constraintName="fk_sepa_mandate_customer_id"
|
||||||
|
referencedColumnNames="id"
|
||||||
|
referencedTableName="customer"/>
|
||||||
|
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
@ -5,15 +5,15 @@
|
|||||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
|
||||||
|
|
||||||
<include file="config/liquibase/changelog/00000000000000_initial_schema.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/00000000000000_initial_schema.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418143050_added_entity_Customer.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190424123255_added_entity_Customer.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418143051_added_entity_Membership.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190424123256_added_entity_Membership.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418143052_added_entity_Share.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190424123257_added_entity_Share.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418143053_added_entity_Asset.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190424123258_added_entity_Asset.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418143054_added_entity_SepaMandate.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190424123259_added_entity_SepaMandate.xml" relativeToChangelogFile="false"/>
|
||||||
<!-- jhipster-needle-liquibase-add-changelog - JHipster will add liquibase changelogs here -->
|
<!-- jhipster-needle-liquibase-add-changelog - JHipster will add liquibase changelogs here -->
|
||||||
<include file="config/liquibase/changelog/20190418143051_added_entity_constraints_Membership.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190424123256_added_entity_constraints_Membership.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418143052_added_entity_constraints_Share.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190424123257_added_entity_constraints_Share.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418143053_added_entity_constraints_Asset.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190424123258_added_entity_constraints_Asset.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418143054_added_entity_constraints_SepaMandate.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190424123259_added_entity_constraints_SepaMandate.xml" relativeToChangelogFile="false"/>
|
||||||
<!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here -->
|
<!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here -->
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<dt><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div *ngIf="asset.membershipId">
|
<div *ngIf="asset.membershipId">
|
||||||
<a [routerLink]="['/membership', asset.membershipId, 'view']">{{asset.membershipDocumentDate}}</a>
|
<a [routerLink]="['/membership', asset.membershipId, 'view']">{{asset.membershipAdmissionDocumentDate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.asset.membership" for="field_membership">Membership</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.asset.membership" for="field_membership">Membership</label>
|
||||||
<select class="form-control" id="field_membership" name="membership" [(ngModel)]="asset.membershipId" required>
|
<select class="form-control" id="field_membership" name="membership" [(ngModel)]="asset.membershipId" required>
|
||||||
<option *ngIf="!editForm.value.membership" [ngValue]="null" selected></option>
|
<option *ngIf="!editForm.value.membership" [ngValue]="null" selected></option>
|
||||||
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.documentDate}}</option>
|
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.admissionDocumentDate}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="!(editForm.controls.membership?.dirty && editForm.controls.membership?.invalid)">
|
<div [hidden]="!(editForm.controls.membership?.dirty && editForm.controls.membership?.invalid)">
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<th jhiSortBy="action"><span jhiTranslate="hsadminNgApp.asset.action">Action</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="action"><span jhiTranslate="hsadminNgApp.asset.action">Action</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="amount"><span jhiTranslate="hsadminNgApp.asset.amount">Amount</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="amount"><span jhiTranslate="hsadminNgApp.asset.amount">Amount</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.asset.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.asset.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="membershipDocumentDate"><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="membershipAdmissionDocumentDate"><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
<td>{{asset.remark}}</td>
|
<td>{{asset.remark}}</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="asset.membershipId">
|
<div *ngIf="asset.membershipId">
|
||||||
<a [routerLink]="['../membership', asset.membershipId , 'view' ]" >{{asset.membershipDocumentDate}}</a>
|
<a [routerLink]="['../membership', asset.membershipId , 'view' ]" >{{asset.membershipAdmissionDocumentDate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
|
@ -17,6 +17,34 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<span>{{customer.name}}</span>
|
<span>{{customer.name}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.customer.kind">Kind</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span jhiTranslate="{{'hsadminNgApp.CustomerKind.' + customer.kind}}">{{customer.kind}}</span>
|
||||||
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.customer.birthDate">Birth Date</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span>{{customer.birthDate}}</span>
|
||||||
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.customer.birthPlace">Birth Place</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span>{{customer.birthPlace}}</span>
|
||||||
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.customer.registrationCourt">Registration Court</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span>{{customer.registrationCourt}}</span>
|
||||||
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.customer.registrationNumber">Registration Number</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span>{{customer.registrationNumber}}</span>
|
||||||
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.customer.vatRegion">Vat Region</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span jhiTranslate="{{'hsadminNgApp.VatRegion.' + customer.vatRegion}}">{{customer.vatRegion}}</span>
|
||||||
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.customer.vatNumber">Vat Number</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span>{{customer.vatNumber}}</span>
|
||||||
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual Salutation</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual Salutation</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{customer.contractualSalutation}}</span>
|
<span>{{customer.contractualSalutation}}</span>
|
||||||
|
@ -66,6 +66,87 @@
|
|||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.kind" for="field_kind">Kind</label>
|
||||||
|
<select class="form-control" name="kind" [(ngModel)]="customer.kind" id="field_kind" required>
|
||||||
|
<option value="NATURAL">{{'hsadminNgApp.CustomerKind.NATURAL' | translate}}</option>
|
||||||
|
<option value="LEGAL">{{'hsadminNgApp.CustomerKind.LEGAL' | translate}}</option>
|
||||||
|
</select>
|
||||||
|
<div [hidden]="!(editForm.controls.kind?.dirty && editForm.controls.kind?.invalid)">
|
||||||
|
<small class="form-text text-danger"
|
||||||
|
[hidden]="!editForm.controls.kind?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
|
This field is required.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.birthDate" for="field_birthDate">Birth Date</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="field_birthDate" type="text" class="form-control" name="birthDate" ngbDatepicker #birthDateDp="ngbDatepicker" [(ngModel)]="customer.birthDate"
|
||||||
|
/>
|
||||||
|
<span class="input-group-append">
|
||||||
|
<button type="button" class="btn btn-secondary" (click)="birthDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.birthPlace" for="field_birthPlace">Birth Place</label>
|
||||||
|
<input type="text" class="form-control" name="birthPlace" id="field_birthPlace"
|
||||||
|
[(ngModel)]="customer.birthPlace" maxlength="80"/>
|
||||||
|
<div [hidden]="!(editForm.controls.birthPlace?.dirty && editForm.controls.birthPlace?.invalid)">
|
||||||
|
<small class="form-text text-danger"
|
||||||
|
[hidden]="!editForm.controls.birthPlace?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
|
||||||
|
This field cannot be longer than 80 characters.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.registrationCourt" for="field_registrationCourt">Registration Court</label>
|
||||||
|
<input type="text" class="form-control" name="registrationCourt" id="field_registrationCourt"
|
||||||
|
[(ngModel)]="customer.registrationCourt" maxlength="80"/>
|
||||||
|
<div [hidden]="!(editForm.controls.registrationCourt?.dirty && editForm.controls.registrationCourt?.invalid)">
|
||||||
|
<small class="form-text text-danger"
|
||||||
|
[hidden]="!editForm.controls.registrationCourt?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
|
||||||
|
This field cannot be longer than 80 characters.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.registrationNumber" for="field_registrationNumber">Registration Number</label>
|
||||||
|
<input type="text" class="form-control" name="registrationNumber" id="field_registrationNumber"
|
||||||
|
[(ngModel)]="customer.registrationNumber" maxlength="80"/>
|
||||||
|
<div [hidden]="!(editForm.controls.registrationNumber?.dirty && editForm.controls.registrationNumber?.invalid)">
|
||||||
|
<small class="form-text text-danger"
|
||||||
|
[hidden]="!editForm.controls.registrationNumber?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
|
||||||
|
This field cannot be longer than 80 characters.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.vatRegion" for="field_vatRegion">Vat Region</label>
|
||||||
|
<select class="form-control" name="vatRegion" [(ngModel)]="customer.vatRegion" id="field_vatRegion" required>
|
||||||
|
<option value="DOMESTIC">{{'hsadminNgApp.VatRegion.DOMESTIC' | translate}}</option>
|
||||||
|
<option value="EU">{{'hsadminNgApp.VatRegion.EU' | translate}}</option>
|
||||||
|
<option value="OTHER">{{'hsadminNgApp.VatRegion.OTHER' | translate}}</option>
|
||||||
|
</select>
|
||||||
|
<div [hidden]="!(editForm.controls.vatRegion?.dirty && editForm.controls.vatRegion?.invalid)">
|
||||||
|
<small class="form-text text-danger"
|
||||||
|
[hidden]="!editForm.controls.vatRegion?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
|
This field is required.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.vatNumber" for="field_vatNumber">Vat Number</label>
|
||||||
|
<input type="text" class="form-control" name="vatNumber" id="field_vatNumber"
|
||||||
|
[(ngModel)]="customer.vatNumber" maxlength="40"/>
|
||||||
|
<div [hidden]="!(editForm.controls.vatNumber?.dirty && editForm.controls.vatNumber?.invalid)">
|
||||||
|
<small class="form-text text-danger"
|
||||||
|
[hidden]="!editForm.controls.vatNumber?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 40 }">
|
||||||
|
This field cannot be longer than 40 characters.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.contractualSalutation" for="field_contractualSalutation">Contractual Salutation</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.contractualSalutation" for="field_contractualSalutation">Contractual Salutation</label>
|
||||||
<input type="text" class="form-control" name="contractualSalutation" id="field_contractualSalutation"
|
<input type="text" class="form-control" name="contractualSalutation" id="field_contractualSalutation"
|
||||||
|
@ -3,6 +3,7 @@ import { ActivatedRoute } from '@angular/router';
|
|||||||
import { HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
import { HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { filter, map } from 'rxjs/operators';
|
import { filter, map } from 'rxjs/operators';
|
||||||
|
import * as moment from 'moment';
|
||||||
import { ICustomer } from 'app/shared/model/customer.model';
|
import { ICustomer } from 'app/shared/model/customer.model';
|
||||||
import { CustomerService } from './customer.service';
|
import { CustomerService } from './customer.service';
|
||||||
|
|
||||||
@ -13,6 +14,7 @@ import { CustomerService } from './customer.service';
|
|||||||
export class CustomerUpdateComponent implements OnInit {
|
export class CustomerUpdateComponent implements OnInit {
|
||||||
customer: ICustomer;
|
customer: ICustomer;
|
||||||
isSaving: boolean;
|
isSaving: boolean;
|
||||||
|
birthDateDp: any;
|
||||||
|
|
||||||
constructor(protected customerService: CustomerService, protected activatedRoute: ActivatedRoute) {}
|
constructor(protected customerService: CustomerService, protected activatedRoute: ActivatedRoute) {}
|
||||||
|
|
||||||
|
@ -18,6 +18,13 @@
|
|||||||
<th jhiSortBy="reference"><span jhiTranslate="hsadminNgApp.customer.reference">Reference</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="reference"><span jhiTranslate="hsadminNgApp.customer.reference">Reference</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="prefix"><span jhiTranslate="hsadminNgApp.customer.prefix">Prefix</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="prefix"><span jhiTranslate="hsadminNgApp.customer.prefix">Prefix</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="name"><span jhiTranslate="hsadminNgApp.customer.name">Name</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="name"><span jhiTranslate="hsadminNgApp.customer.name">Name</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
|
<th jhiSortBy="kind"><span jhiTranslate="hsadminNgApp.customer.kind">Kind</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
|
<th jhiSortBy="birthDate"><span jhiTranslate="hsadminNgApp.customer.birthDate">Birth Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
|
<th jhiSortBy="birthPlace"><span jhiTranslate="hsadminNgApp.customer.birthPlace">Birth Place</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
|
<th jhiSortBy="registrationCourt"><span jhiTranslate="hsadminNgApp.customer.registrationCourt">Registration Court</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
|
<th jhiSortBy="registrationNumber"><span jhiTranslate="hsadminNgApp.customer.registrationNumber">Registration Number</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
|
<th jhiSortBy="vatRegion"><span jhiTranslate="hsadminNgApp.customer.vatRegion">Vat Region</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
|
<th jhiSortBy="vatNumber"><span jhiTranslate="hsadminNgApp.customer.vatNumber">Vat Number</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="contractualSalutation"><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual Salutation</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="contractualSalutation"><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual Salutation</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="contractualAddress"><span jhiTranslate="hsadminNgApp.customer.contractualAddress">Contractual Address</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="contractualAddress"><span jhiTranslate="hsadminNgApp.customer.contractualAddress">Contractual Address</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="billingSalutation"><span jhiTranslate="hsadminNgApp.customer.billingSalutation">Billing Salutation</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="billingSalutation"><span jhiTranslate="hsadminNgApp.customer.billingSalutation">Billing Salutation</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
@ -32,6 +39,13 @@
|
|||||||
<td>{{customer.reference}}</td>
|
<td>{{customer.reference}}</td>
|
||||||
<td>{{customer.prefix}}</td>
|
<td>{{customer.prefix}}</td>
|
||||||
<td>{{customer.name}}</td>
|
<td>{{customer.name}}</td>
|
||||||
|
<td jhiTranslate="{{'hsadminNgApp.CustomerKind.' + customer.kind}}">{{customer.kind}}</td>
|
||||||
|
<td>{{customer.birthDate | date:'mediumDate'}}</td>
|
||||||
|
<td>{{customer.birthPlace}}</td>
|
||||||
|
<td>{{customer.registrationCourt}}</td>
|
||||||
|
<td>{{customer.registrationNumber}}</td>
|
||||||
|
<td jhiTranslate="{{'hsadminNgApp.VatRegion.' + customer.vatRegion}}">{{customer.vatRegion}}</td>
|
||||||
|
<td>{{customer.vatNumber}}</td>
|
||||||
<td>{{customer.contractualSalutation}}</td>
|
<td>{{customer.contractualSalutation}}</td>
|
||||||
<td>{{customer.contractualAddress}}</td>
|
<td>{{customer.contractualAddress}}</td>
|
||||||
<td>{{customer.billingSalutation}}</td>
|
<td>{{customer.billingSalutation}}</td>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||||
import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http';
|
import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http';
|
||||||
import { Subscription, Subject } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
import { filter, map } from 'rxjs/operators';
|
||||||
import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster';
|
import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster';
|
||||||
|
|
||||||
import { ICustomer } from 'app/shared/model/customer.model';
|
import { ICustomer } from 'app/shared/model/customer.model';
|
||||||
@ -24,9 +24,6 @@ export class CustomerComponent implements OnInit, OnDestroy {
|
|||||||
predicate: any;
|
predicate: any;
|
||||||
reverse: any;
|
reverse: any;
|
||||||
totalItems: number;
|
totalItems: number;
|
||||||
filterValue: any;
|
|
||||||
filterValueChanged = new Subject<string>();
|
|
||||||
subscription: Subscription;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected customerService: CustomerService,
|
protected customerService: CustomerService,
|
||||||
@ -43,25 +40,11 @@ export class CustomerComponent implements OnInit, OnDestroy {
|
|||||||
};
|
};
|
||||||
this.predicate = 'id';
|
this.predicate = 'id';
|
||||||
this.reverse = true;
|
this.reverse = true;
|
||||||
this.resetFilter();
|
|
||||||
}
|
|
||||||
|
|
||||||
resetFilter() {
|
|
||||||
this.filterValue = {
|
|
||||||
number: null,
|
|
||||||
prefix: null
|
|
||||||
};
|
|
||||||
this.loadAll();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadAll() {
|
loadAll() {
|
||||||
const criteria = {
|
|
||||||
...(this.filterValue.number && { 'number.equals': this.filterValue.number }),
|
|
||||||
...(this.filterValue.prefix && { 'prefix.contains': this.filterValue.prefix })
|
|
||||||
};
|
|
||||||
this.customerService
|
this.customerService
|
||||||
.query({
|
.query({
|
||||||
...criteria,
|
|
||||||
page: this.page,
|
page: this.page,
|
||||||
size: this.itemsPerPage,
|
size: this.itemsPerPage,
|
||||||
sort: this.sort()
|
sort: this.sort()
|
||||||
@ -72,10 +55,6 @@ export class CustomerComponent implements OnInit, OnDestroy {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
filter($event) {
|
|
||||||
this.filterValueChanged.next($event.target.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
this.page = 0;
|
this.page = 0;
|
||||||
this.customers = [];
|
this.customers = [];
|
||||||
@ -93,15 +72,6 @@ export class CustomerComponent implements OnInit, OnDestroy {
|
|||||||
this.currentAccount = account;
|
this.currentAccount = account;
|
||||||
});
|
});
|
||||||
this.registerChangeInCustomers();
|
this.registerChangeInCustomers();
|
||||||
|
|
||||||
this.subscription = this.filterValueChanged
|
|
||||||
.pipe(
|
|
||||||
debounceTime(500),
|
|
||||||
distinctUntilChanged((previous: any, current: any) => previous === current)
|
|
||||||
)
|
|
||||||
.subscribe(() => {
|
|
||||||
this.loadAll();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
@ -127,8 +97,6 @@ export class CustomerComponent implements OnInit, OnDestroy {
|
|||||||
protected paginateCustomers(data: ICustomer[], headers: HttpHeaders) {
|
protected paginateCustomers(data: ICustomer[], headers: HttpHeaders) {
|
||||||
this.links = this.parseLinks.parse(headers.get('link'));
|
this.links = this.parseLinks.parse(headers.get('link'));
|
||||||
this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
|
this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
|
||||||
this.page = 0;
|
|
||||||
this.customers = [];
|
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
this.customers.push(data[i]);
|
this.customers.push(data[i]);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient, HttpResponse } from '@angular/common/http';
|
import { HttpClient, HttpResponse } from '@angular/common/http';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
import * as moment from 'moment';
|
||||||
|
import { DATE_FORMAT } from 'app/shared/constants/input.constants';
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
import { SERVER_API_URL } from 'app/app.constants';
|
import { SERVER_API_URL } from 'app/app.constants';
|
||||||
import { createRequestOption } from 'app/shared';
|
import { createRequestOption } from 'app/shared';
|
||||||
@ -16,23 +19,56 @@ export class CustomerService {
|
|||||||
constructor(protected http: HttpClient) {}
|
constructor(protected http: HttpClient) {}
|
||||||
|
|
||||||
create(customer: ICustomer): Observable<EntityResponseType> {
|
create(customer: ICustomer): Observable<EntityResponseType> {
|
||||||
return this.http.post<ICustomer>(this.resourceUrl, customer, { observe: 'response' });
|
const copy = this.convertDateFromClient(customer);
|
||||||
|
return this.http
|
||||||
|
.post<ICustomer>(this.resourceUrl, copy, { observe: 'response' })
|
||||||
|
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
|
||||||
}
|
}
|
||||||
|
|
||||||
update(customer: ICustomer): Observable<EntityResponseType> {
|
update(customer: ICustomer): Observable<EntityResponseType> {
|
||||||
return this.http.put<ICustomer>(this.resourceUrl, customer, { observe: 'response' });
|
const copy = this.convertDateFromClient(customer);
|
||||||
|
return this.http
|
||||||
|
.put<ICustomer>(this.resourceUrl, copy, { observe: 'response' })
|
||||||
|
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
|
||||||
}
|
}
|
||||||
|
|
||||||
find(id: number): Observable<EntityResponseType> {
|
find(id: number): Observable<EntityResponseType> {
|
||||||
return this.http.get<ICustomer>(`${this.resourceUrl}/${id}`, { observe: 'response' });
|
return this.http
|
||||||
|
.get<ICustomer>(`${this.resourceUrl}/${id}`, { observe: 'response' })
|
||||||
|
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
|
||||||
}
|
}
|
||||||
|
|
||||||
query(req?: any): Observable<EntityArrayResponseType> {
|
query(req?: any): Observable<EntityArrayResponseType> {
|
||||||
const options = createRequestOption(req);
|
const options = createRequestOption(req);
|
||||||
return this.http.get<ICustomer[]>(this.resourceUrl, { params: options, observe: 'response' });
|
return this.http
|
||||||
|
.get<ICustomer[]>(this.resourceUrl, { params: options, observe: 'response' })
|
||||||
|
.pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res)));
|
||||||
}
|
}
|
||||||
|
|
||||||
delete(id: number): Observable<HttpResponse<any>> {
|
delete(id: number): Observable<HttpResponse<any>> {
|
||||||
return this.http.delete<any>(`${this.resourceUrl}/${id}`, { observe: 'response' });
|
return this.http.delete<any>(`${this.resourceUrl}/${id}`, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected convertDateFromClient(customer: ICustomer): ICustomer {
|
||||||
|
const copy: ICustomer = Object.assign({}, customer, {
|
||||||
|
birthDate: customer.birthDate != null && customer.birthDate.isValid() ? customer.birthDate.format(DATE_FORMAT) : null
|
||||||
|
});
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
|
||||||
|
if (res.body) {
|
||||||
|
res.body.birthDate = res.body.birthDate != null ? moment(res.body.birthDate) : null;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
|
||||||
|
if (res.body) {
|
||||||
|
res.body.forEach((customer: ICustomer) => {
|
||||||
|
customer.birthDate = customer.birthDate != null ? moment(customer.birthDate) : null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,17 +5,21 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<jhi-alert-error></jhi-alert-error>
|
<jhi-alert-error></jhi-alert-error>
|
||||||
<dl class="row-md jh-entity-details">
|
<dl class="row-md jh-entity-details">
|
||||||
<dt><span jhiTranslate="hsadminNgApp.membership.documentDate">Document Date</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.membership.admissionDocumentDate">Admission Document Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{membership.documentDate}}</span>
|
<span>{{membership.admissionDocumentDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.membership.memberFrom">Member From</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.membership.cancellationDocumentDate">Cancellation Document Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{membership.memberFrom}}</span>
|
<span>{{membership.cancellationDocumentDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.membership.memberUntil">Member Until</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.membership.memberFromDate">Member From Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{membership.memberUntil}}</span>
|
<span>{{membership.memberFromDate}}</span>
|
||||||
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.membership.memberUntilDate">Member Until Date</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span>{{membership.memberUntilDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.membership.remark">Remark</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.membership.remark">Remark</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
@ -10,44 +10,54 @@
|
|||||||
[(ngModel)]="membership.id" readonly />
|
[(ngModel)]="membership.id" readonly />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.documentDate" for="field_documentDate">Document Date</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.admissionDocumentDate" for="field_admissionDocumentDate">Admission Document Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_documentDate" type="text" class="form-control" name="documentDate" ngbDatepicker #documentDateDp="ngbDatepicker" [(ngModel)]="membership.documentDate"
|
<input id="field_admissionDocumentDate" type="text" class="form-control" name="admissionDocumentDate" ngbDatepicker #admissionDocumentDateDp="ngbDatepicker" [(ngModel)]="membership.admissionDocumentDate"
|
||||||
required/>
|
required/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="documentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="admissionDocumentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="!(editForm.controls.documentDate?.dirty && editForm.controls.documentDate?.invalid)">
|
<div [hidden]="!(editForm.controls.admissionDocumentDate?.dirty && editForm.controls.admissionDocumentDate?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.documentDate?.errors?.required" jhiTranslate="entity.validation.required">
|
[hidden]="!editForm.controls.admissionDocumentDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
This field is required.
|
This field is required.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.memberFrom" for="field_memberFrom">Member From</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.cancellationDocumentDate" for="field_cancellationDocumentDate">Cancellation Document Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_memberFrom" type="text" class="form-control" name="memberFrom" ngbDatepicker #memberFromDp="ngbDatepicker" [(ngModel)]="membership.memberFrom"
|
<input id="field_cancellationDocumentDate" type="text" class="form-control" name="cancellationDocumentDate" ngbDatepicker #cancellationDocumentDateDp="ngbDatepicker" [(ngModel)]="membership.cancellationDocumentDate"
|
||||||
required/>
|
|
||||||
<span class="input-group-append">
|
|
||||||
<button type="button" class="btn btn-secondary" (click)="memberFromDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div [hidden]="!(editForm.controls.memberFrom?.dirty && editForm.controls.memberFrom?.invalid)">
|
|
||||||
<small class="form-text text-danger"
|
|
||||||
[hidden]="!editForm.controls.memberFrom?.errors?.required" jhiTranslate="entity.validation.required">
|
|
||||||
This field is required.
|
|
||||||
</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.memberUntil" for="field_memberUntil">Member Until</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input id="field_memberUntil" type="text" class="form-control" name="memberUntil" ngbDatepicker #memberUntilDp="ngbDatepicker" [(ngModel)]="membership.memberUntil"
|
|
||||||
/>
|
/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="memberUntilDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="cancellationDocumentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.memberFromDate" for="field_memberFromDate">Member From Date</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="field_memberFromDate" type="text" class="form-control" name="memberFromDate" ngbDatepicker #memberFromDateDp="ngbDatepicker" [(ngModel)]="membership.memberFromDate"
|
||||||
|
required/>
|
||||||
|
<span class="input-group-append">
|
||||||
|
<button type="button" class="btn btn-secondary" (click)="memberFromDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div [hidden]="!(editForm.controls.memberFromDate?.dirty && editForm.controls.memberFromDate?.invalid)">
|
||||||
|
<small class="form-text text-danger"
|
||||||
|
[hidden]="!editForm.controls.memberFromDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
|
This field is required.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.memberUntilDate" for="field_memberUntilDate">Member Until Date</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="field_memberUntilDate" type="text" class="form-control" name="memberUntilDate" ngbDatepicker #memberUntilDateDp="ngbDatepicker" [(ngModel)]="membership.memberUntilDate"
|
||||||
|
/>
|
||||||
|
<span class="input-group-append">
|
||||||
|
<button type="button" class="btn btn-secondary" (click)="memberUntilDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,9 +19,10 @@ export class MembershipUpdateComponent implements OnInit {
|
|||||||
isSaving: boolean;
|
isSaving: boolean;
|
||||||
|
|
||||||
customers: ICustomer[];
|
customers: ICustomer[];
|
||||||
documentDateDp: any;
|
admissionDocumentDateDp: any;
|
||||||
memberFromDp: any;
|
cancellationDocumentDateDp: any;
|
||||||
memberUntilDp: any;
|
memberFromDateDp: any;
|
||||||
|
memberUntilDateDp: any;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected jhiAlertService: JhiAlertService,
|
protected jhiAlertService: JhiAlertService,
|
||||||
|
@ -15,9 +15,10 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="reset.bind(this)">
|
<tr jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="reset.bind(this)">
|
||||||
<th jhiSortBy="id"><span jhiTranslate="global.field.id">ID</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="id"><span jhiTranslate="global.field.id">ID</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="documentDate"><span jhiTranslate="hsadminNgApp.membership.documentDate">Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="admissionDocumentDate"><span jhiTranslate="hsadminNgApp.membership.admissionDocumentDate">Admission Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="memberFrom"><span jhiTranslate="hsadminNgApp.membership.memberFrom">Member From</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="cancellationDocumentDate"><span jhiTranslate="hsadminNgApp.membership.cancellationDocumentDate">Cancellation Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="memberUntil"><span jhiTranslate="hsadminNgApp.membership.memberUntil">Member Until</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="memberFromDate"><span jhiTranslate="hsadminNgApp.membership.memberFromDate">Member From Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
|
<th jhiSortBy="memberUntilDate"><span jhiTranslate="hsadminNgApp.membership.memberUntilDate">Member Until Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.membership.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.membership.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="customerPrefix"><span jhiTranslate="hsadminNgApp.membership.customer">Customer</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="customerPrefix"><span jhiTranslate="hsadminNgApp.membership.customer">Customer</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
@ -26,9 +27,10 @@
|
|||||||
<tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
|
<tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
|
||||||
<tr *ngFor="let membership of memberships ;trackBy: trackId">
|
<tr *ngFor="let membership of memberships ;trackBy: trackId">
|
||||||
<td><a [routerLink]="['/membership', membership.id, 'view' ]">{{membership.id}}</a></td>
|
<td><a [routerLink]="['/membership', membership.id, 'view' ]">{{membership.id}}</a></td>
|
||||||
<td>{{membership.documentDate | date:'mediumDate'}}</td>
|
<td>{{membership.admissionDocumentDate | date:'mediumDate'}}</td>
|
||||||
<td>{{membership.memberFrom | date:'mediumDate'}}</td>
|
<td>{{membership.cancellationDocumentDate | date:'mediumDate'}}</td>
|
||||||
<td>{{membership.memberUntil | date:'mediumDate'}}</td>
|
<td>{{membership.memberFromDate | date:'mediumDate'}}</td>
|
||||||
|
<td>{{membership.memberUntilDate | date:'mediumDate'}}</td>
|
||||||
<td>{{membership.remark}}</td>
|
<td>{{membership.remark}}</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="membership.customerId">
|
<div *ngIf="membership.customerId">
|
||||||
|
@ -51,20 +51,33 @@ export class MembershipService {
|
|||||||
|
|
||||||
protected convertDateFromClient(membership: IMembership): IMembership {
|
protected convertDateFromClient(membership: IMembership): IMembership {
|
||||||
const copy: IMembership = Object.assign({}, membership, {
|
const copy: IMembership = Object.assign({}, membership, {
|
||||||
documentDate:
|
admissionDocumentDate:
|
||||||
membership.documentDate != null && membership.documentDate.isValid() ? membership.documentDate.format(DATE_FORMAT) : null,
|
membership.admissionDocumentDate != null && membership.admissionDocumentDate.isValid()
|
||||||
memberFrom: membership.memberFrom != null && membership.memberFrom.isValid() ? membership.memberFrom.format(DATE_FORMAT) : null,
|
? membership.admissionDocumentDate.format(DATE_FORMAT)
|
||||||
memberUntil:
|
: null,
|
||||||
membership.memberUntil != null && membership.memberUntil.isValid() ? membership.memberUntil.format(DATE_FORMAT) : null
|
cancellationDocumentDate:
|
||||||
|
membership.cancellationDocumentDate != null && membership.cancellationDocumentDate.isValid()
|
||||||
|
? membership.cancellationDocumentDate.format(DATE_FORMAT)
|
||||||
|
: null,
|
||||||
|
memberFromDate:
|
||||||
|
membership.memberFromDate != null && membership.memberFromDate.isValid()
|
||||||
|
? membership.memberFromDate.format(DATE_FORMAT)
|
||||||
|
: null,
|
||||||
|
memberUntilDate:
|
||||||
|
membership.memberUntilDate != null && membership.memberUntilDate.isValid()
|
||||||
|
? membership.memberUntilDate.format(DATE_FORMAT)
|
||||||
|
: null
|
||||||
});
|
});
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
|
protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
|
||||||
if (res.body) {
|
if (res.body) {
|
||||||
res.body.documentDate = res.body.documentDate != null ? moment(res.body.documentDate) : null;
|
res.body.admissionDocumentDate = res.body.admissionDocumentDate != null ? moment(res.body.admissionDocumentDate) : null;
|
||||||
res.body.memberFrom = res.body.memberFrom != null ? moment(res.body.memberFrom) : null;
|
res.body.cancellationDocumentDate =
|
||||||
res.body.memberUntil = res.body.memberUntil != null ? moment(res.body.memberUntil) : null;
|
res.body.cancellationDocumentDate != null ? moment(res.body.cancellationDocumentDate) : null;
|
||||||
|
res.body.memberFromDate = res.body.memberFromDate != null ? moment(res.body.memberFromDate) : null;
|
||||||
|
res.body.memberUntilDate = res.body.memberUntilDate != null ? moment(res.body.memberUntilDate) : null;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -72,9 +85,12 @@ export class MembershipService {
|
|||||||
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
|
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
|
||||||
if (res.body) {
|
if (res.body) {
|
||||||
res.body.forEach((membership: IMembership) => {
|
res.body.forEach((membership: IMembership) => {
|
||||||
membership.documentDate = membership.documentDate != null ? moment(membership.documentDate) : null;
|
membership.admissionDocumentDate =
|
||||||
membership.memberFrom = membership.memberFrom != null ? moment(membership.memberFrom) : null;
|
membership.admissionDocumentDate != null ? moment(membership.admissionDocumentDate) : null;
|
||||||
membership.memberUntil = membership.memberUntil != null ? moment(membership.memberUntil) : null;
|
membership.cancellationDocumentDate =
|
||||||
|
membership.cancellationDocumentDate != null ? moment(membership.cancellationDocumentDate) : null;
|
||||||
|
membership.memberFromDate = membership.memberFromDate != null ? moment(membership.memberFromDate) : null;
|
||||||
|
membership.memberUntilDate = membership.memberUntilDate != null ? moment(membership.memberUntilDate) : null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
@ -17,25 +17,25 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.bic}}</span>
|
<span>{{sepaMandate.bic}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.documentDate">Document Date</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.grantingDocumentDate">Granting Document Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.documentDate}}</span>
|
<span>{{sepaMandate.grantingDocumentDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validFrom">Valid From</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.revokationDocumentDate">Revokation Document Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.validFrom}}</span>
|
<span>{{sepaMandate.revokationDocumentDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validUntil">Valid Until</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validFromDate">Valid From Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.validUntil}}</span>
|
<span>{{sepaMandate.validFromDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsed">Last Used</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validUntilDate">Valid Until Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.lastUsed}}</span>
|
<span>{{sepaMandate.validUntilDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.cancellationDate">Cancellation Date</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsedDate">Last Used Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.cancellationDate}}</span>
|
<span>{{sepaMandate.lastUsedDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.remark">Remark</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.remark">Remark</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
@ -47,64 +47,64 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.documentDate" for="field_documentDate">Document Date</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.grantingDocumentDate" for="field_grantingDocumentDate">Granting Document Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_documentDate" type="text" class="form-control" name="documentDate" ngbDatepicker #documentDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.documentDate"
|
<input id="field_grantingDocumentDate" type="text" class="form-control" name="grantingDocumentDate" ngbDatepicker #grantingDocumentDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.grantingDocumentDate"
|
||||||
required/>
|
required/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="documentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="grantingDocumentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="!(editForm.controls.documentDate?.dirty && editForm.controls.documentDate?.invalid)">
|
<div [hidden]="!(editForm.controls.grantingDocumentDate?.dirty && editForm.controls.grantingDocumentDate?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.documentDate?.errors?.required" jhiTranslate="entity.validation.required">
|
[hidden]="!editForm.controls.grantingDocumentDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
This field is required.
|
This field is required.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.validFrom" for="field_validFrom">Valid From</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.revokationDocumentDate" for="field_revokationDocumentDate">Revokation Document Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_validFrom" type="text" class="form-control" name="validFrom" ngbDatepicker #validFromDp="ngbDatepicker" [(ngModel)]="sepaMandate.validFrom"
|
<input id="field_revokationDocumentDate" type="text" class="form-control" name="revokationDocumentDate" ngbDatepicker #revokationDocumentDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.revokationDocumentDate"
|
||||||
required/>
|
/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="validFromDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="revokationDocumentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="!(editForm.controls.validFrom?.dirty && editForm.controls.validFrom?.invalid)">
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.validFromDate" for="field_validFromDate">Valid From Date</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="field_validFromDate" type="text" class="form-control" name="validFromDate" ngbDatepicker #validFromDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.validFromDate"
|
||||||
|
required/>
|
||||||
|
<span class="input-group-append">
|
||||||
|
<button type="button" class="btn btn-secondary" (click)="validFromDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div [hidden]="!(editForm.controls.validFromDate?.dirty && editForm.controls.validFromDate?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.validFrom?.errors?.required" jhiTranslate="entity.validation.required">
|
[hidden]="!editForm.controls.validFromDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
This field is required.
|
This field is required.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.validUntil" for="field_validUntil">Valid Until</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.validUntilDate" for="field_validUntilDate">Valid Until Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_validUntil" type="text" class="form-control" name="validUntil" ngbDatepicker #validUntilDp="ngbDatepicker" [(ngModel)]="sepaMandate.validUntil"
|
<input id="field_validUntilDate" type="text" class="form-control" name="validUntilDate" ngbDatepicker #validUntilDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.validUntilDate"
|
||||||
/>
|
/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="validUntilDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="validUntilDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.lastUsed" for="field_lastUsed">Last Used</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.lastUsedDate" for="field_lastUsedDate">Last Used Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_lastUsed" type="text" class="form-control" name="lastUsed" ngbDatepicker #lastUsedDp="ngbDatepicker" [(ngModel)]="sepaMandate.lastUsed"
|
<input id="field_lastUsedDate" type="text" class="form-control" name="lastUsedDate" ngbDatepicker #lastUsedDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.lastUsedDate"
|
||||||
/>
|
/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="lastUsedDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="lastUsedDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.cancellationDate" for="field_cancellationDate">Cancellation Date</label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input id="field_cancellationDate" type="text" class="form-control" name="cancellationDate" ngbDatepicker #cancellationDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.cancellationDate"
|
|
||||||
/>
|
|
||||||
<span class="input-group-append">
|
|
||||||
<button type="button" class="btn btn-secondary" (click)="cancellationDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,11 +19,11 @@ export class SepaMandateUpdateComponent implements OnInit {
|
|||||||
isSaving: boolean;
|
isSaving: boolean;
|
||||||
|
|
||||||
customers: ICustomer[];
|
customers: ICustomer[];
|
||||||
documentDateDp: any;
|
grantingDocumentDateDp: any;
|
||||||
validFromDp: any;
|
revokationDocumentDateDp: any;
|
||||||
validUntilDp: any;
|
validFromDateDp: any;
|
||||||
lastUsedDp: any;
|
validUntilDateDp: any;
|
||||||
cancellationDateDp: any;
|
lastUsedDateDp: any;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected jhiAlertService: JhiAlertService,
|
protected jhiAlertService: JhiAlertService,
|
||||||
|
@ -18,11 +18,11 @@
|
|||||||
<th jhiSortBy="reference"><span jhiTranslate="hsadminNgApp.sepaMandate.reference">Reference</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="reference"><span jhiTranslate="hsadminNgApp.sepaMandate.reference">Reference</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="iban"><span jhiTranslate="hsadminNgApp.sepaMandate.iban">Iban</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="iban"><span jhiTranslate="hsadminNgApp.sepaMandate.iban">Iban</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="bic"><span jhiTranslate="hsadminNgApp.sepaMandate.bic">Bic</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="bic"><span jhiTranslate="hsadminNgApp.sepaMandate.bic">Bic</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="documentDate"><span jhiTranslate="hsadminNgApp.sepaMandate.documentDate">Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="grantingDocumentDate"><span jhiTranslate="hsadminNgApp.sepaMandate.grantingDocumentDate">Granting Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="validFrom"><span jhiTranslate="hsadminNgApp.sepaMandate.validFrom">Valid From</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="revokationDocumentDate"><span jhiTranslate="hsadminNgApp.sepaMandate.revokationDocumentDate">Revokation Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="validUntil"><span jhiTranslate="hsadminNgApp.sepaMandate.validUntil">Valid Until</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="validFromDate"><span jhiTranslate="hsadminNgApp.sepaMandate.validFromDate">Valid From Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="lastUsed"><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsed">Last Used</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="validUntilDate"><span jhiTranslate="hsadminNgApp.sepaMandate.validUntilDate">Valid Until Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="cancellationDate"><span jhiTranslate="hsadminNgApp.sepaMandate.cancellationDate">Cancellation Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="lastUsedDate"><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsedDate">Last Used Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.sepaMandate.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.sepaMandate.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="customerPrefix"><span jhiTranslate="hsadminNgApp.sepaMandate.customer">Customer</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="customerPrefix"><span jhiTranslate="hsadminNgApp.sepaMandate.customer">Customer</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
@ -34,11 +34,11 @@
|
|||||||
<td>{{sepaMandate.reference}}</td>
|
<td>{{sepaMandate.reference}}</td>
|
||||||
<td>{{sepaMandate.iban}}</td>
|
<td>{{sepaMandate.iban}}</td>
|
||||||
<td>{{sepaMandate.bic}}</td>
|
<td>{{sepaMandate.bic}}</td>
|
||||||
<td>{{sepaMandate.documentDate | date:'mediumDate'}}</td>
|
<td>{{sepaMandate.grantingDocumentDate | date:'mediumDate'}}</td>
|
||||||
<td>{{sepaMandate.validFrom | date:'mediumDate'}}</td>
|
<td>{{sepaMandate.revokationDocumentDate | date:'mediumDate'}}</td>
|
||||||
<td>{{sepaMandate.validUntil | date:'mediumDate'}}</td>
|
<td>{{sepaMandate.validFromDate | date:'mediumDate'}}</td>
|
||||||
<td>{{sepaMandate.lastUsed | date:'mediumDate'}}</td>
|
<td>{{sepaMandate.validUntilDate | date:'mediumDate'}}</td>
|
||||||
<td>{{sepaMandate.cancellationDate | date:'mediumDate'}}</td>
|
<td>{{sepaMandate.lastUsedDate | date:'mediumDate'}}</td>
|
||||||
<td>{{sepaMandate.remark}}</td>
|
<td>{{sepaMandate.remark}}</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="sepaMandate.customerId">
|
<div *ngIf="sepaMandate.customerId">
|
||||||
|
@ -51,29 +51,35 @@ export class SepaMandateService {
|
|||||||
|
|
||||||
protected convertDateFromClient(sepaMandate: ISepaMandate): ISepaMandate {
|
protected convertDateFromClient(sepaMandate: ISepaMandate): ISepaMandate {
|
||||||
const copy: ISepaMandate = Object.assign({}, sepaMandate, {
|
const copy: ISepaMandate = Object.assign({}, sepaMandate, {
|
||||||
documentDate:
|
grantingDocumentDate:
|
||||||
sepaMandate.documentDate != null && sepaMandate.documentDate.isValid()
|
sepaMandate.grantingDocumentDate != null && sepaMandate.grantingDocumentDate.isValid()
|
||||||
? sepaMandate.documentDate.format(DATE_FORMAT)
|
? sepaMandate.grantingDocumentDate.format(DATE_FORMAT)
|
||||||
: null,
|
: null,
|
||||||
validFrom: sepaMandate.validFrom != null && sepaMandate.validFrom.isValid() ? sepaMandate.validFrom.format(DATE_FORMAT) : null,
|
revokationDocumentDate:
|
||||||
validUntil:
|
sepaMandate.revokationDocumentDate != null && sepaMandate.revokationDocumentDate.isValid()
|
||||||
sepaMandate.validUntil != null && sepaMandate.validUntil.isValid() ? sepaMandate.validUntil.format(DATE_FORMAT) : null,
|
? sepaMandate.revokationDocumentDate.format(DATE_FORMAT)
|
||||||
lastUsed: sepaMandate.lastUsed != null && sepaMandate.lastUsed.isValid() ? sepaMandate.lastUsed.format(DATE_FORMAT) : null,
|
: null,
|
||||||
cancellationDate:
|
validFromDate:
|
||||||
sepaMandate.cancellationDate != null && sepaMandate.cancellationDate.isValid()
|
sepaMandate.validFromDate != null && sepaMandate.validFromDate.isValid()
|
||||||
? sepaMandate.cancellationDate.format(DATE_FORMAT)
|
? sepaMandate.validFromDate.format(DATE_FORMAT)
|
||||||
: null
|
: null,
|
||||||
|
validUntilDate:
|
||||||
|
sepaMandate.validUntilDate != null && sepaMandate.validUntilDate.isValid()
|
||||||
|
? sepaMandate.validUntilDate.format(DATE_FORMAT)
|
||||||
|
: null,
|
||||||
|
lastUsedDate:
|
||||||
|
sepaMandate.lastUsedDate != null && sepaMandate.lastUsedDate.isValid() ? sepaMandate.lastUsedDate.format(DATE_FORMAT) : null
|
||||||
});
|
});
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
|
protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
|
||||||
if (res.body) {
|
if (res.body) {
|
||||||
res.body.documentDate = res.body.documentDate != null ? moment(res.body.documentDate) : null;
|
res.body.grantingDocumentDate = res.body.grantingDocumentDate != null ? moment(res.body.grantingDocumentDate) : null;
|
||||||
res.body.validFrom = res.body.validFrom != null ? moment(res.body.validFrom) : null;
|
res.body.revokationDocumentDate = res.body.revokationDocumentDate != null ? moment(res.body.revokationDocumentDate) : null;
|
||||||
res.body.validUntil = res.body.validUntil != null ? moment(res.body.validUntil) : null;
|
res.body.validFromDate = res.body.validFromDate != null ? moment(res.body.validFromDate) : null;
|
||||||
res.body.lastUsed = res.body.lastUsed != null ? moment(res.body.lastUsed) : null;
|
res.body.validUntilDate = res.body.validUntilDate != null ? moment(res.body.validUntilDate) : null;
|
||||||
res.body.cancellationDate = res.body.cancellationDate != null ? moment(res.body.cancellationDate) : null;
|
res.body.lastUsedDate = res.body.lastUsedDate != null ? moment(res.body.lastUsedDate) : null;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -81,11 +87,13 @@ export class SepaMandateService {
|
|||||||
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
|
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
|
||||||
if (res.body) {
|
if (res.body) {
|
||||||
res.body.forEach((sepaMandate: ISepaMandate) => {
|
res.body.forEach((sepaMandate: ISepaMandate) => {
|
||||||
sepaMandate.documentDate = sepaMandate.documentDate != null ? moment(sepaMandate.documentDate) : null;
|
sepaMandate.grantingDocumentDate =
|
||||||
sepaMandate.validFrom = sepaMandate.validFrom != null ? moment(sepaMandate.validFrom) : null;
|
sepaMandate.grantingDocumentDate != null ? moment(sepaMandate.grantingDocumentDate) : null;
|
||||||
sepaMandate.validUntil = sepaMandate.validUntil != null ? moment(sepaMandate.validUntil) : null;
|
sepaMandate.revokationDocumentDate =
|
||||||
sepaMandate.lastUsed = sepaMandate.lastUsed != null ? moment(sepaMandate.lastUsed) : null;
|
sepaMandate.revokationDocumentDate != null ? moment(sepaMandate.revokationDocumentDate) : null;
|
||||||
sepaMandate.cancellationDate = sepaMandate.cancellationDate != null ? moment(sepaMandate.cancellationDate) : null;
|
sepaMandate.validFromDate = sepaMandate.validFromDate != null ? moment(sepaMandate.validFromDate) : null;
|
||||||
|
sepaMandate.validUntilDate = sepaMandate.validUntilDate != null ? moment(sepaMandate.validUntilDate) : null;
|
||||||
|
sepaMandate.lastUsedDate = sepaMandate.lastUsedDate != null ? moment(sepaMandate.lastUsedDate) : null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<dt><span jhiTranslate="hsadminNgApp.share.membership">Membership</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.share.membership">Membership</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div *ngIf="share.membershipId">
|
<div *ngIf="share.membershipId">
|
||||||
<a [routerLink]="['/membership', share.membershipId, 'view']">{{share.membershipDocumentDate}}</a>
|
<a [routerLink]="['/membership', share.membershipId, 'view']">{{share.membershipAdmissionDocumentDate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.share.membership" for="field_membership">Membership</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.share.membership" for="field_membership">Membership</label>
|
||||||
<select class="form-control" id="field_membership" name="membership" [(ngModel)]="share.membershipId" required>
|
<select class="form-control" id="field_membership" name="membership" [(ngModel)]="share.membershipId" required>
|
||||||
<option *ngIf="!editForm.value.membership" [ngValue]="null" selected></option>
|
<option *ngIf="!editForm.value.membership" [ngValue]="null" selected></option>
|
||||||
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.documentDate}}</option>
|
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.admissionDocumentDate}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="!(editForm.controls.membership?.dirty && editForm.controls.membership?.invalid)">
|
<div [hidden]="!(editForm.controls.membership?.dirty && editForm.controls.membership?.invalid)">
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<th jhiSortBy="action"><span jhiTranslate="hsadminNgApp.share.action">Action</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="action"><span jhiTranslate="hsadminNgApp.share.action">Action</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="quantity"><span jhiTranslate="hsadminNgApp.share.quantity">Quantity</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="quantity"><span jhiTranslate="hsadminNgApp.share.quantity">Quantity</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.share.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.share.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th jhiSortBy="membershipDocumentDate"><span jhiTranslate="hsadminNgApp.share.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="membershipAdmissionDocumentDate"><span jhiTranslate="hsadminNgApp.share.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
<td>{{share.remark}}</td>
|
<td>{{share.remark}}</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="share.membershipId">
|
<div *ngIf="share.membershipId">
|
||||||
<a [routerLink]="['../membership', share.membershipId , 'view' ]" >{{share.membershipDocumentDate}}</a>
|
<a [routerLink]="['../membership', share.membershipId , 'view' ]" >{{share.membershipAdmissionDocumentDate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
|
@ -16,7 +16,7 @@ export interface IAsset {
|
|||||||
action?: AssetAction;
|
action?: AssetAction;
|
||||||
amount?: number;
|
amount?: number;
|
||||||
remark?: string;
|
remark?: string;
|
||||||
membershipDocumentDate?: string;
|
membershipAdmissionDocumentDate?: string;
|
||||||
membershipId?: number;
|
membershipId?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ export class Asset implements IAsset {
|
|||||||
public action?: AssetAction,
|
public action?: AssetAction,
|
||||||
public amount?: number,
|
public amount?: number,
|
||||||
public remark?: string,
|
public remark?: string,
|
||||||
public membershipDocumentDate?: string,
|
public membershipAdmissionDocumentDate?: string,
|
||||||
public membershipId?: number
|
public membershipId?: number
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,30 @@
|
|||||||
|
import { Moment } from 'moment';
|
||||||
import { IMembership } from 'app/shared/model/membership.model';
|
import { IMembership } from 'app/shared/model/membership.model';
|
||||||
import { ISepaMandate } from 'app/shared/model/sepa-mandate.model';
|
import { ISepaMandate } from 'app/shared/model/sepa-mandate.model';
|
||||||
|
|
||||||
|
export const enum CustomerKind {
|
||||||
|
NATURAL = 'NATURAL',
|
||||||
|
LEGAL = 'LEGAL'
|
||||||
|
}
|
||||||
|
|
||||||
|
export const enum VatRegion {
|
||||||
|
DOMESTIC = 'DOMESTIC',
|
||||||
|
EU = 'EU',
|
||||||
|
OTHER = 'OTHER'
|
||||||
|
}
|
||||||
|
|
||||||
export interface ICustomer {
|
export interface ICustomer {
|
||||||
id?: number;
|
id?: number;
|
||||||
reference?: number;
|
reference?: number;
|
||||||
prefix?: string;
|
prefix?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
kind?: CustomerKind;
|
||||||
|
birthDate?: Moment;
|
||||||
|
birthPlace?: string;
|
||||||
|
registrationCourt?: string;
|
||||||
|
registrationNumber?: string;
|
||||||
|
vatRegion?: VatRegion;
|
||||||
|
vatNumber?: string;
|
||||||
contractualSalutation?: string;
|
contractualSalutation?: string;
|
||||||
contractualAddress?: string;
|
contractualAddress?: string;
|
||||||
billingSalutation?: string;
|
billingSalutation?: string;
|
||||||
@ -21,6 +40,13 @@ export class Customer implements ICustomer {
|
|||||||
public reference?: number,
|
public reference?: number,
|
||||||
public prefix?: string,
|
public prefix?: string,
|
||||||
public name?: string,
|
public name?: string,
|
||||||
|
public kind?: CustomerKind,
|
||||||
|
public birthDate?: Moment,
|
||||||
|
public birthPlace?: string,
|
||||||
|
public registrationCourt?: string,
|
||||||
|
public registrationNumber?: string,
|
||||||
|
public vatRegion?: VatRegion,
|
||||||
|
public vatNumber?: string,
|
||||||
public contractualSalutation?: string,
|
public contractualSalutation?: string,
|
||||||
public contractualAddress?: string,
|
public contractualAddress?: string,
|
||||||
public billingSalutation?: string,
|
public billingSalutation?: string,
|
||||||
|
@ -4,9 +4,10 @@ import { IAsset } from 'app/shared/model/asset.model';
|
|||||||
|
|
||||||
export interface IMembership {
|
export interface IMembership {
|
||||||
id?: number;
|
id?: number;
|
||||||
documentDate?: Moment;
|
admissionDocumentDate?: Moment;
|
||||||
memberFrom?: Moment;
|
cancellationDocumentDate?: Moment;
|
||||||
memberUntil?: Moment;
|
memberFromDate?: Moment;
|
||||||
|
memberUntilDate?: Moment;
|
||||||
remark?: string;
|
remark?: string;
|
||||||
shares?: IShare[];
|
shares?: IShare[];
|
||||||
assets?: IAsset[];
|
assets?: IAsset[];
|
||||||
@ -17,9 +18,10 @@ export interface IMembership {
|
|||||||
export class Membership implements IMembership {
|
export class Membership implements IMembership {
|
||||||
constructor(
|
constructor(
|
||||||
public id?: number,
|
public id?: number,
|
||||||
public documentDate?: Moment,
|
public admissionDocumentDate?: Moment,
|
||||||
public memberFrom?: Moment,
|
public cancellationDocumentDate?: Moment,
|
||||||
public memberUntil?: Moment,
|
public memberFromDate?: Moment,
|
||||||
|
public memberUntilDate?: Moment,
|
||||||
public remark?: string,
|
public remark?: string,
|
||||||
public shares?: IShare[],
|
public shares?: IShare[],
|
||||||
public assets?: IAsset[],
|
public assets?: IAsset[],
|
||||||
|
@ -5,11 +5,11 @@ export interface ISepaMandate {
|
|||||||
reference?: string;
|
reference?: string;
|
||||||
iban?: string;
|
iban?: string;
|
||||||
bic?: string;
|
bic?: string;
|
||||||
documentDate?: Moment;
|
grantingDocumentDate?: Moment;
|
||||||
validFrom?: Moment;
|
revokationDocumentDate?: Moment;
|
||||||
validUntil?: Moment;
|
validFromDate?: Moment;
|
||||||
lastUsed?: Moment;
|
validUntilDate?: Moment;
|
||||||
cancellationDate?: Moment;
|
lastUsedDate?: Moment;
|
||||||
remark?: string;
|
remark?: string;
|
||||||
customerPrefix?: string;
|
customerPrefix?: string;
|
||||||
customerId?: number;
|
customerId?: number;
|
||||||
@ -21,11 +21,11 @@ export class SepaMandate implements ISepaMandate {
|
|||||||
public reference?: string,
|
public reference?: string,
|
||||||
public iban?: string,
|
public iban?: string,
|
||||||
public bic?: string,
|
public bic?: string,
|
||||||
public documentDate?: Moment,
|
public grantingDocumentDate?: Moment,
|
||||||
public validFrom?: Moment,
|
public revokationDocumentDate?: Moment,
|
||||||
public validUntil?: Moment,
|
public validFromDate?: Moment,
|
||||||
public lastUsed?: Moment,
|
public validUntilDate?: Moment,
|
||||||
public cancellationDate?: Moment,
|
public lastUsedDate?: Moment,
|
||||||
public remark?: string,
|
public remark?: string,
|
||||||
public customerPrefix?: string,
|
public customerPrefix?: string,
|
||||||
public customerId?: number
|
public customerId?: number
|
||||||
|
@ -12,7 +12,7 @@ export interface IShare {
|
|||||||
action?: ShareAction;
|
action?: ShareAction;
|
||||||
quantity?: number;
|
quantity?: number;
|
||||||
remark?: string;
|
remark?: string;
|
||||||
membershipDocumentDate?: string;
|
membershipAdmissionDocumentDate?: string;
|
||||||
membershipId?: number;
|
membershipId?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ export class Share implements IShare {
|
|||||||
public action?: ShareAction,
|
public action?: ShareAction,
|
||||||
public quantity?: number,
|
public quantity?: number,
|
||||||
public remark?: string,
|
public remark?: string,
|
||||||
public membershipDocumentDate?: string,
|
public membershipAdmissionDocumentDate?: string,
|
||||||
public membershipId?: number
|
public membershipId?: number
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,13 @@
|
|||||||
"reference": "Reference",
|
"reference": "Reference",
|
||||||
"prefix": "Prefix",
|
"prefix": "Prefix",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
|
"kind": "Kind",
|
||||||
|
"birthDate": "Birth Date",
|
||||||
|
"birthPlace": "Birth Place",
|
||||||
|
"registrationCourt": "Registration Court",
|
||||||
|
"registrationNumber": "Registration Number",
|
||||||
|
"vatRegion": "Vat Region",
|
||||||
|
"vatNumber": "Vat Number",
|
||||||
"contractualSalutation": "Contractual Salutation",
|
"contractualSalutation": "Contractual Salutation",
|
||||||
"contractualAddress": "Contractual Address",
|
"contractualAddress": "Contractual Address",
|
||||||
"billingSalutation": "Billing Salutation",
|
"billingSalutation": "Billing Salutation",
|
||||||
|
9
src/main/webapp/i18n/de/customerKind.json
Normal file
9
src/main/webapp/i18n/de/customerKind.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"hsadminNgApp": {
|
||||||
|
"CustomerKind": {
|
||||||
|
"null": "",
|
||||||
|
"NATURAL": "NATURAL",
|
||||||
|
"LEGAL": "LEGAL"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,26 +2,27 @@
|
|||||||
"hsadminNgApp": {
|
"hsadminNgApp": {
|
||||||
"membership": {
|
"membership": {
|
||||||
"home": {
|
"home": {
|
||||||
"title": "Mitgliedschaften",
|
"title": "Memberships",
|
||||||
"createLabel": "Mitgliedschaft erfassen",
|
"createLabel": "Membership erstellen",
|
||||||
"createOrEditLabel": "Mitgliedschaft erfassen oder bearbeiten"
|
"createOrEditLabel": "Membership erstellen oder bearbeiten"
|
||||||
},
|
},
|
||||||
"created": "Mitgliedschaft erfasst mit ID {{ param }}",
|
"created": "Membership erstellt mit ID {{ param }}",
|
||||||
"updated": "Mitgliedschaft aktualisiert mit ID {{ param }}",
|
"updated": "Membership aktualisiert mit ID {{ param }}",
|
||||||
"deleted": "Mitgliedschaft gelöscht mit ID {{ param }}",
|
"deleted": "Membership gelöscht mit ID {{ param }}",
|
||||||
"delete": {
|
"delete": {
|
||||||
"question": "Soll die Mitgliedschaft {{ id }} wirklich dauerhaft gelöscht werden?"
|
"question": "Soll Membership {{ id }} wirklich dauerhaft gelöscht werden?"
|
||||||
},
|
},
|
||||||
"detail": {
|
"detail": {
|
||||||
"title": "Mitgliedschaft"
|
"title": "Membership"
|
||||||
},
|
},
|
||||||
"documentDate": "Belegdatum",
|
"admissionDocumentDate": "Admission Document Date",
|
||||||
"memberFrom": "Mitglied ab",
|
"cancellationDocumentDate": "Cancellation Document Date",
|
||||||
"memberUntil": "Mitglied bis",
|
"memberFromDate": "Member From Date",
|
||||||
"remark": "Bemerkung",
|
"memberUntilDate": "Member Until Date",
|
||||||
"share": "Geschäftsanteile",
|
"remark": "Remark",
|
||||||
"asset": "Geschäftsguthaben",
|
"share": "Share",
|
||||||
"customer": "Kunde/Kundin"
|
"asset": "Asset",
|
||||||
|
"customer": "Customer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,11 +18,11 @@
|
|||||||
"reference": "Reference",
|
"reference": "Reference",
|
||||||
"iban": "Iban",
|
"iban": "Iban",
|
||||||
"bic": "Bic",
|
"bic": "Bic",
|
||||||
"documentDate": "Document Date",
|
"grantingDocumentDate": "Granting Document Date",
|
||||||
"validFrom": "Valid From",
|
"revokationDocumentDate": "Revokation Document Date",
|
||||||
"validUntil": "Valid Until",
|
"validFromDate": "Valid From Date",
|
||||||
"lastUsed": "Last Used",
|
"validUntilDate": "Valid Until Date",
|
||||||
"cancellationDate": "Cancellation Date",
|
"lastUsedDate": "Last Used Date",
|
||||||
"remark": "Remark",
|
"remark": "Remark",
|
||||||
"customer": "Customer"
|
"customer": "Customer"
|
||||||
}
|
}
|
||||||
|
10
src/main/webapp/i18n/de/vatRegion.json
Normal file
10
src/main/webapp/i18n/de/vatRegion.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"hsadminNgApp": {
|
||||||
|
"VatRegion": {
|
||||||
|
"null": "",
|
||||||
|
"DOMESTIC": "DOMESTIC",
|
||||||
|
"EU": "EU",
|
||||||
|
"OTHER": "OTHER"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -18,6 +18,13 @@
|
|||||||
"reference": "Reference",
|
"reference": "Reference",
|
||||||
"prefix": "Prefix",
|
"prefix": "Prefix",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
|
"kind": "Kind",
|
||||||
|
"birthDate": "Birth Date",
|
||||||
|
"birthPlace": "Birth Place",
|
||||||
|
"registrationCourt": "Registration Court",
|
||||||
|
"registrationNumber": "Registration Number",
|
||||||
|
"vatRegion": "Vat Region",
|
||||||
|
"vatNumber": "Vat Number",
|
||||||
"contractualSalutation": "Contractual Salutation",
|
"contractualSalutation": "Contractual Salutation",
|
||||||
"contractualAddress": "Contractual Address",
|
"contractualAddress": "Contractual Address",
|
||||||
"billingSalutation": "Billing Salutation",
|
"billingSalutation": "Billing Salutation",
|
||||||
|
9
src/main/webapp/i18n/en/customerKind.json
Normal file
9
src/main/webapp/i18n/en/customerKind.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"hsadminNgApp": {
|
||||||
|
"CustomerKind": {
|
||||||
|
"null": "",
|
||||||
|
"NATURAL": "NATURAL",
|
||||||
|
"LEGAL": "LEGAL"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -3,24 +3,25 @@
|
|||||||
"membership": {
|
"membership": {
|
||||||
"home": {
|
"home": {
|
||||||
"title": "Memberships",
|
"title": "Memberships",
|
||||||
"createLabel": "Register a new Membership",
|
"createLabel": "Create a new Membership",
|
||||||
"createOrEditLabel": "Register or edit a Membership"
|
"createOrEditLabel": "Create or edit a Membership"
|
||||||
},
|
},
|
||||||
"created": "A new membership is registered with identifier {{ param }}",
|
"created": "A new Membership is created with identifier {{ param }}",
|
||||||
"updated": "A membership is updated with identifier {{ param }}",
|
"updated": "A Membership is updated with identifier {{ param }}",
|
||||||
"deleted": "A membership is deleted with identifier {{ param }}",
|
"deleted": "A Membership is deleted with identifier {{ param }}",
|
||||||
"delete": {
|
"delete": {
|
||||||
"question": "Are you sure you want to delete membership {{ id }}?"
|
"question": "Are you sure you want to delete Membership {{ id }}?"
|
||||||
},
|
},
|
||||||
"detail": {
|
"detail": {
|
||||||
"title": "Membership"
|
"title": "Membership"
|
||||||
},
|
},
|
||||||
"documentDate": "Document date",
|
"admissionDocumentDate": "Admission Document Date",
|
||||||
"memberFrom": "Member from",
|
"cancellationDocumentDate": "Cancellation Document Date",
|
||||||
"memberUntil": "Member until",
|
"memberFromDate": "Member From Date",
|
||||||
|
"memberUntilDate": "Member Until Date",
|
||||||
"remark": "Remark",
|
"remark": "Remark",
|
||||||
"share": "Shares",
|
"share": "Share",
|
||||||
"asset": "Assets",
|
"asset": "Asset",
|
||||||
"customer": "Customer"
|
"customer": "Customer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,11 +18,11 @@
|
|||||||
"reference": "Reference",
|
"reference": "Reference",
|
||||||
"iban": "Iban",
|
"iban": "Iban",
|
||||||
"bic": "Bic",
|
"bic": "Bic",
|
||||||
"documentDate": "Document Date",
|
"grantingDocumentDate": "Granting Document Date",
|
||||||
"validFrom": "Valid From",
|
"revokationDocumentDate": "Revokation Document Date",
|
||||||
"validUntil": "Valid Until",
|
"validFromDate": "Valid From Date",
|
||||||
"lastUsed": "Last Used",
|
"validUntilDate": "Valid Until Date",
|
||||||
"cancellationDate": "Cancellation Date",
|
"lastUsedDate": "Last Used Date",
|
||||||
"remark": "Remark",
|
"remark": "Remark",
|
||||||
"customer": "Customer"
|
"customer": "Customer"
|
||||||
}
|
}
|
||||||
|
10
src/main/webapp/i18n/en/vatRegion.json
Normal file
10
src/main/webapp/i18n/en/vatRegion.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"hsadminNgApp": {
|
||||||
|
"VatRegion": {
|
||||||
|
"null": "",
|
||||||
|
"DOMESTIC": "DOMESTIC",
|
||||||
|
"EU": "EU",
|
||||||
|
"OTHER": "OTHER"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -4,12 +4,12 @@ import org.hostsharing.hsadminng.HsadminNgApp;
|
|||||||
|
|
||||||
import org.hostsharing.hsadminng.domain.Asset;
|
import org.hostsharing.hsadminng.domain.Asset;
|
||||||
import org.hostsharing.hsadminng.domain.Membership;
|
import org.hostsharing.hsadminng.domain.Membership;
|
||||||
import org.hostsharing.hsadminng.domain.Share;
|
|
||||||
import org.hostsharing.hsadminng.repository.AssetRepository;
|
import org.hostsharing.hsadminng.repository.AssetRepository;
|
||||||
import org.hostsharing.hsadminng.service.AssetService;
|
import org.hostsharing.hsadminng.service.AssetService;
|
||||||
import org.hostsharing.hsadminng.service.dto.AssetDTO;
|
import org.hostsharing.hsadminng.service.dto.AssetDTO;
|
||||||
import org.hostsharing.hsadminng.service.mapper.AssetMapper;
|
import org.hostsharing.hsadminng.service.mapper.AssetMapper;
|
||||||
import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator;
|
import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator;
|
||||||
|
import org.hostsharing.hsadminng.service.dto.AssetCriteria;
|
||||||
import org.hostsharing.hsadminng.service.AssetQueryService;
|
import org.hostsharing.hsadminng.service.AssetQueryService;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
@ -129,26 +129,6 @@ public class AssetResourceIntTest {
|
|||||||
return asset;
|
return asset;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a persistent entity related to the given persistent membership for testing purposes.
|
|
||||||
*
|
|
||||||
* This is a static method, as tests for other entities might also need it,
|
|
||||||
* if they test an entity which requires the current entity.
|
|
||||||
*/
|
|
||||||
public static Asset createPersistentEntity(EntityManager em, final Membership membership) {
|
|
||||||
Asset asset = new Asset()
|
|
||||||
.documentDate(DEFAULT_DOCUMENT_DATE)
|
|
||||||
.valueDate(DEFAULT_VALUE_DATE)
|
|
||||||
.action(DEFAULT_ACTION)
|
|
||||||
.amount(DEFAULT_AMOUNT)
|
|
||||||
.remark(DEFAULT_REMARK);
|
|
||||||
// Add required entity
|
|
||||||
asset.setMembership(membership);
|
|
||||||
membership.addAsset(asset);
|
|
||||||
em.persist(asset);
|
|
||||||
em.flush();
|
|
||||||
return asset;
|
|
||||||
}
|
|
||||||
@Before
|
@Before
|
||||||
public void initTest() {
|
public void initTest() {
|
||||||
asset = createEntity(em);
|
asset = createEntity(em);
|
||||||
@ -562,7 +542,7 @@ public class AssetResourceIntTest {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public void getAllAssetsByMembershipIsEqualToSomething() throws Exception {
|
public void getAllAssetsByMembershipIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
Membership membership = MembershipResourceIntTest.createPersistentEntity(em, CustomerResourceIntTest.createPersistentEntity(em));
|
Membership membership = MembershipResourceIntTest.createEntity(em);
|
||||||
em.persist(membership);
|
em.persist(membership);
|
||||||
em.flush();
|
em.flush();
|
||||||
asset.setMembership(membership);
|
asset.setMembership(membership);
|
||||||
@ -646,17 +626,17 @@ public class AssetResourceIntTest {
|
|||||||
restAssetMockMvc.perform(put("/api/assets")
|
restAssetMockMvc.perform(put("/api/assets")
|
||||||
.contentType(TestUtil.APPLICATION_JSON_UTF8)
|
.contentType(TestUtil.APPLICATION_JSON_UTF8)
|
||||||
.content(TestUtil.convertObjectToJsonBytes(assetDTO)))
|
.content(TestUtil.convertObjectToJsonBytes(assetDTO)))
|
||||||
.andExpect(status().isBadRequest());
|
.andExpect(status().isOk());
|
||||||
|
|
||||||
// Validate the Asset in the database
|
// Validate the Asset in the database
|
||||||
List<Asset> assetList = assetRepository.findAll();
|
List<Asset> assetList = assetRepository.findAll();
|
||||||
assertThat(assetList).hasSize(databaseSizeBeforeUpdate);
|
assertThat(assetList).hasSize(databaseSizeBeforeUpdate);
|
||||||
Asset testAsset = assetList.get(assetList.size() - 1);
|
Asset testAsset = assetList.get(assetList.size() - 1);
|
||||||
assertThat(testAsset.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE);
|
assertThat(testAsset.getDocumentDate()).isEqualTo(UPDATED_DOCUMENT_DATE);
|
||||||
assertThat(testAsset.getValueDate()).isEqualTo(DEFAULT_VALUE_DATE);
|
assertThat(testAsset.getValueDate()).isEqualTo(UPDATED_VALUE_DATE);
|
||||||
assertThat(testAsset.getAction()).isEqualByComparingTo(DEFAULT_ACTION);
|
assertThat(testAsset.getAction()).isEqualTo(UPDATED_ACTION);
|
||||||
assertThat(testAsset.getAmount()).isEqualByComparingTo(DEFAULT_AMOUNT);
|
assertThat(testAsset.getAmount()).isEqualTo(UPDATED_AMOUNT);
|
||||||
assertThat(testAsset.getRemark()).isEqualTo(DEFAULT_REMARK);
|
assertThat(testAsset.getRemark()).isEqualTo(UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -689,11 +669,11 @@ public class AssetResourceIntTest {
|
|||||||
// Delete the asset
|
// Delete the asset
|
||||||
restAssetMockMvc.perform(delete("/api/assets/{id}", asset.getId())
|
restAssetMockMvc.perform(delete("/api/assets/{id}", asset.getId())
|
||||||
.accept(TestUtil.APPLICATION_JSON_UTF8))
|
.accept(TestUtil.APPLICATION_JSON_UTF8))
|
||||||
.andExpect(status().isBadRequest());
|
.andExpect(status().isOk());
|
||||||
|
|
||||||
// Validate the database still contains the same number of assets
|
// Validate the database is empty
|
||||||
List<Asset> assetList = assetRepository.findAll();
|
List<Asset> assetList = assetRepository.findAll();
|
||||||
assertThat(assetList).hasSize(databaseSizeBeforeDelete);
|
assertThat(assetList).hasSize(databaseSizeBeforeDelete - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -10,6 +10,7 @@ import org.hostsharing.hsadminng.service.CustomerService;
|
|||||||
import org.hostsharing.hsadminng.service.dto.CustomerDTO;
|
import org.hostsharing.hsadminng.service.dto.CustomerDTO;
|
||||||
import org.hostsharing.hsadminng.service.mapper.CustomerMapper;
|
import org.hostsharing.hsadminng.service.mapper.CustomerMapper;
|
||||||
import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator;
|
import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator;
|
||||||
|
import org.hostsharing.hsadminng.service.dto.CustomerCriteria;
|
||||||
import org.hostsharing.hsadminng.service.CustomerQueryService;
|
import org.hostsharing.hsadminng.service.CustomerQueryService;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
@ -28,6 +29,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.validation.Validator;
|
import org.springframework.validation.Validator;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.ZoneId;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@ -37,6 +40,8 @@ import static org.hamcrest.Matchers.hasItem;
|
|||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
|
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
|
||||||
|
|
||||||
|
import org.hostsharing.hsadminng.domain.enumeration.CustomerKind;
|
||||||
|
import org.hostsharing.hsadminng.domain.enumeration.VatRegion;
|
||||||
/**
|
/**
|
||||||
* Test class for the CustomerResource REST controller.
|
* Test class for the CustomerResource REST controller.
|
||||||
*
|
*
|
||||||
@ -74,6 +79,27 @@ public class CustomerResourceIntTest {
|
|||||||
private static final String DEFAULT_REMARK = "Default Remark";
|
private static final String DEFAULT_REMARK = "Default Remark";
|
||||||
private static final String UPDATED_REMARK = "Updated Remark";
|
private static final String UPDATED_REMARK = "Updated Remark";
|
||||||
|
|
||||||
|
private static final CustomerKind DEFAULT_KIND = CustomerKind.NATURAL;
|
||||||
|
private static final CustomerKind UPDATED_KIND = CustomerKind.LEGAL;
|
||||||
|
|
||||||
|
private static final LocalDate DEFAULT_BIRTH_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_BIRTH_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
private static final String DEFAULT_BIRTH_PLACE = "AAAAAAAAAA";
|
||||||
|
private static final String UPDATED_BIRTH_PLACE = "BBBBBBBBBB";
|
||||||
|
|
||||||
|
private static final String DEFAULT_REGISTRATION_COURT = "AAAAAAAAAA";
|
||||||
|
private static final String UPDATED_REGISTRATION_COURT = "BBBBBBBBBB";
|
||||||
|
|
||||||
|
private static final String DEFAULT_REGISTRATION_NUMBER = "AAAAAAAAAA";
|
||||||
|
private static final String UPDATED_REGISTRATION_NUMBER = "BBBBBBBBBB";
|
||||||
|
|
||||||
|
private static final VatRegion DEFAULT_VAT_REGION = VatRegion.DOMESTIC;
|
||||||
|
private static final VatRegion UPDATED_VAT_REGION = VatRegion.EU;
|
||||||
|
|
||||||
|
private static final String DEFAULT_VAT_NUMBER = "AAAAAAAAAA";
|
||||||
|
private static final String UPDATED_VAT_NUMBER = "BBBBBBBBBB";
|
||||||
|
|
||||||
private static int otherCounter = 0;
|
private static int otherCounter = 0;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -130,11 +156,17 @@ public class CustomerResourceIntTest {
|
|||||||
.reference(DEFAULT_REFERENCE)
|
.reference(DEFAULT_REFERENCE)
|
||||||
.prefix(DEFAULT_PREFIX)
|
.prefix(DEFAULT_PREFIX)
|
||||||
.name(DEFAULT_NAME)
|
.name(DEFAULT_NAME)
|
||||||
|
.kind(DEFAULT_KIND)
|
||||||
|
.birthDate(DEFAULT_BIRTH_DATE)
|
||||||
|
.birthPlace(DEFAULT_BIRTH_PLACE)
|
||||||
|
.registrationCourt(DEFAULT_REGISTRATION_COURT)
|
||||||
|
.registrationNumber(DEFAULT_REGISTRATION_NUMBER)
|
||||||
|
.vatRegion(DEFAULT_VAT_REGION)
|
||||||
|
.vatNumber(DEFAULT_VAT_NUMBER)
|
||||||
.contractualSalutation(DEFAULT_CONTRACTUAL_SALUTATION)
|
.contractualSalutation(DEFAULT_CONTRACTUAL_SALUTATION)
|
||||||
.contractualAddress(DEFAULT_CONTRACTUAL_ADDRESS)
|
.contractualAddress(DEFAULT_CONTRACTUAL_ADDRESS)
|
||||||
.billingSalutation(DEFAULT_BILLING_SALUTATION)
|
.billingSalutation(DEFAULT_BILLING_SALUTATION)
|
||||||
.billingAddress(DEFAULT_BILLING_ADDRESS)
|
.billingAddress(DEFAULT_BILLING_ADDRESS)
|
||||||
.billingSalutation(DEFAULT_BILLING_SALUTATION)
|
|
||||||
.remark(DEFAULT_REMARK);
|
.remark(DEFAULT_REMARK);
|
||||||
return customer;
|
return customer;
|
||||||
}
|
}
|
||||||
@ -150,6 +182,8 @@ public class CustomerResourceIntTest {
|
|||||||
.reference(OTHER_REFERENCE_BASE + otherCounter)
|
.reference(OTHER_REFERENCE_BASE + otherCounter)
|
||||||
.prefix(OTHER_PREFIX_BASE + String.format("%02d", otherCounter))
|
.prefix(OTHER_PREFIX_BASE + String.format("%02d", otherCounter))
|
||||||
.name(OTHER_NAME_BASE + otherCounter)
|
.name(OTHER_NAME_BASE + otherCounter)
|
||||||
|
.kind(OTHER_KIND)
|
||||||
|
.vatRegion(OTHER_VAT_REGION)
|
||||||
.contractualAddress(OTHER_CONTRACTUAL_ADDRESS_BASE + otherCounter);
|
.contractualAddress(OTHER_CONTRACTUAL_ADDRESS_BASE + otherCounter);
|
||||||
em.persist(customer);
|
em.persist(customer);
|
||||||
em.flush();
|
em.flush();
|
||||||
@ -181,6 +215,13 @@ public class CustomerResourceIntTest {
|
|||||||
assertThat(testCustomer.getReference()).isEqualTo(DEFAULT_REFERENCE);
|
assertThat(testCustomer.getReference()).isEqualTo(DEFAULT_REFERENCE);
|
||||||
assertThat(testCustomer.getPrefix()).isEqualTo(DEFAULT_PREFIX);
|
assertThat(testCustomer.getPrefix()).isEqualTo(DEFAULT_PREFIX);
|
||||||
assertThat(testCustomer.getName()).isEqualTo(DEFAULT_NAME);
|
assertThat(testCustomer.getName()).isEqualTo(DEFAULT_NAME);
|
||||||
|
assertThat(testCustomer.getKind()).isEqualTo(DEFAULT_KIND);
|
||||||
|
assertThat(testCustomer.getBirthDate()).isEqualTo(DEFAULT_BIRTH_DATE);
|
||||||
|
assertThat(testCustomer.getBirthPlace()).isEqualTo(DEFAULT_BIRTH_PLACE);
|
||||||
|
assertThat(testCustomer.getRegistrationCourt()).isEqualTo(DEFAULT_REGISTRATION_COURT);
|
||||||
|
assertThat(testCustomer.getRegistrationNumber()).isEqualTo(DEFAULT_REGISTRATION_NUMBER);
|
||||||
|
assertThat(testCustomer.getVatRegion()).isEqualTo(DEFAULT_VAT_REGION);
|
||||||
|
assertThat(testCustomer.getVatNumber()).isEqualTo(DEFAULT_VAT_NUMBER);
|
||||||
assertThat(testCustomer.getContractualSalutation()).isEqualTo(DEFAULT_CONTRACTUAL_SALUTATION);
|
assertThat(testCustomer.getContractualSalutation()).isEqualTo(DEFAULT_CONTRACTUAL_SALUTATION);
|
||||||
assertThat(testCustomer.getContractualAddress()).isEqualTo(DEFAULT_CONTRACTUAL_ADDRESS);
|
assertThat(testCustomer.getContractualAddress()).isEqualTo(DEFAULT_CONTRACTUAL_ADDRESS);
|
||||||
assertThat(testCustomer.getBillingSalutation()).isEqualTo(DEFAULT_BILLING_SALUTATION);
|
assertThat(testCustomer.getBillingSalutation()).isEqualTo(DEFAULT_BILLING_SALUTATION);
|
||||||
@ -265,6 +306,44 @@ public class CustomerResourceIntTest {
|
|||||||
assertThat(customerList).hasSize(databaseSizeBeforeTest);
|
assertThat(customerList).hasSize(databaseSizeBeforeTest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void checkKindIsRequired() throws Exception {
|
||||||
|
int databaseSizeBeforeTest = customerRepository.findAll().size();
|
||||||
|
// set the field null
|
||||||
|
customer.setKind(null);
|
||||||
|
|
||||||
|
// Create the Customer, which fails.
|
||||||
|
CustomerDTO customerDTO = customerMapper.toDto(customer);
|
||||||
|
|
||||||
|
restCustomerMockMvc.perform(post("/api/customers")
|
||||||
|
.contentType(TestUtil.APPLICATION_JSON_UTF8)
|
||||||
|
.content(TestUtil.convertObjectToJsonBytes(customerDTO)))
|
||||||
|
.andExpect(status().isBadRequest());
|
||||||
|
|
||||||
|
List<Customer> customerList = customerRepository.findAll();
|
||||||
|
assertThat(customerList).hasSize(databaseSizeBeforeTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void checkVatRegionIsRequired() throws Exception {
|
||||||
|
int databaseSizeBeforeTest = customerRepository.findAll().size();
|
||||||
|
// set the field null
|
||||||
|
customer.setVatRegion(null);
|
||||||
|
|
||||||
|
// Create the Customer, which fails.
|
||||||
|
CustomerDTO customerDTO = customerMapper.toDto(customer);
|
||||||
|
|
||||||
|
restCustomerMockMvc.perform(post("/api/customers")
|
||||||
|
.contentType(TestUtil.APPLICATION_JSON_UTF8)
|
||||||
|
.content(TestUtil.convertObjectToJsonBytes(customerDTO)))
|
||||||
|
.andExpect(status().isBadRequest());
|
||||||
|
|
||||||
|
List<Customer> customerList = customerRepository.findAll();
|
||||||
|
assertThat(customerList).hasSize(databaseSizeBeforeTest);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void checkContractualAddressIsRequired() throws Exception {
|
public void checkContractualAddressIsRequired() throws Exception {
|
||||||
@ -298,6 +377,13 @@ public class CustomerResourceIntTest {
|
|||||||
.andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE)))
|
.andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE)))
|
||||||
.andExpect(jsonPath("$.[*].prefix").value(hasItem(DEFAULT_PREFIX.toString())))
|
.andExpect(jsonPath("$.[*].prefix").value(hasItem(DEFAULT_PREFIX.toString())))
|
||||||
.andExpect(jsonPath("$.[*].name").value(hasItem(DEFAULT_NAME.toString())))
|
.andExpect(jsonPath("$.[*].name").value(hasItem(DEFAULT_NAME.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].kind").value(hasItem(DEFAULT_KIND.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].birthDate").value(hasItem(DEFAULT_BIRTH_DATE.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].birthPlace").value(hasItem(DEFAULT_BIRTH_PLACE.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].registrationCourt").value(hasItem(DEFAULT_REGISTRATION_COURT.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].registrationNumber").value(hasItem(DEFAULT_REGISTRATION_NUMBER.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].vatRegion").value(hasItem(DEFAULT_VAT_REGION.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].vatNumber").value(hasItem(DEFAULT_VAT_NUMBER.toString())))
|
||||||
.andExpect(jsonPath("$.[*].contractualSalutation").value(hasItem(DEFAULT_CONTRACTUAL_SALUTATION.toString())))
|
.andExpect(jsonPath("$.[*].contractualSalutation").value(hasItem(DEFAULT_CONTRACTUAL_SALUTATION.toString())))
|
||||||
.andExpect(jsonPath("$.[*].contractualAddress").value(hasItem(DEFAULT_CONTRACTUAL_ADDRESS.toString())))
|
.andExpect(jsonPath("$.[*].contractualAddress").value(hasItem(DEFAULT_CONTRACTUAL_ADDRESS.toString())))
|
||||||
.andExpect(jsonPath("$.[*].billingSalutation").value(hasItem(DEFAULT_BILLING_SALUTATION.toString())))
|
.andExpect(jsonPath("$.[*].billingSalutation").value(hasItem(DEFAULT_BILLING_SALUTATION.toString())))
|
||||||
@ -319,6 +405,13 @@ public class CustomerResourceIntTest {
|
|||||||
.andExpect(jsonPath("$.reference").value(DEFAULT_REFERENCE))
|
.andExpect(jsonPath("$.reference").value(DEFAULT_REFERENCE))
|
||||||
.andExpect(jsonPath("$.prefix").value(DEFAULT_PREFIX.toString()))
|
.andExpect(jsonPath("$.prefix").value(DEFAULT_PREFIX.toString()))
|
||||||
.andExpect(jsonPath("$.name").value(DEFAULT_NAME.toString()))
|
.andExpect(jsonPath("$.name").value(DEFAULT_NAME.toString()))
|
||||||
|
.andExpect(jsonPath("$.kind").value(DEFAULT_KIND.toString()))
|
||||||
|
.andExpect(jsonPath("$.birthDate").value(DEFAULT_BIRTH_DATE.toString()))
|
||||||
|
.andExpect(jsonPath("$.birthPlace").value(DEFAULT_BIRTH_PLACE.toString()))
|
||||||
|
.andExpect(jsonPath("$.registrationCourt").value(DEFAULT_REGISTRATION_COURT.toString()))
|
||||||
|
.andExpect(jsonPath("$.registrationNumber").value(DEFAULT_REGISTRATION_NUMBER.toString()))
|
||||||
|
.andExpect(jsonPath("$.vatRegion").value(DEFAULT_VAT_REGION.toString()))
|
||||||
|
.andExpect(jsonPath("$.vatNumber").value(DEFAULT_VAT_NUMBER.toString()))
|
||||||
.andExpect(jsonPath("$.contractualSalutation").value(DEFAULT_CONTRACTUAL_SALUTATION.toString()))
|
.andExpect(jsonPath("$.contractualSalutation").value(DEFAULT_CONTRACTUAL_SALUTATION.toString()))
|
||||||
.andExpect(jsonPath("$.contractualAddress").value(DEFAULT_CONTRACTUAL_ADDRESS.toString()))
|
.andExpect(jsonPath("$.contractualAddress").value(DEFAULT_CONTRACTUAL_ADDRESS.toString()))
|
||||||
.andExpect(jsonPath("$.billingSalutation").value(DEFAULT_BILLING_SALUTATION.toString()))
|
.andExpect(jsonPath("$.billingSalutation").value(DEFAULT_BILLING_SALUTATION.toString()))
|
||||||
@ -470,6 +563,306 @@ public class CustomerResourceIntTest {
|
|||||||
defaultCustomerShouldNotBeFound("name.specified=false");
|
defaultCustomerShouldNotBeFound("name.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByKindIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where kind equals to DEFAULT_KIND
|
||||||
|
defaultCustomerShouldBeFound("kind.equals=" + DEFAULT_KIND);
|
||||||
|
|
||||||
|
// Get all the customerList where kind equals to UPDATED_KIND
|
||||||
|
defaultCustomerShouldNotBeFound("kind.equals=" + UPDATED_KIND);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByKindIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where kind in DEFAULT_KIND or UPDATED_KIND
|
||||||
|
defaultCustomerShouldBeFound("kind.in=" + DEFAULT_KIND + "," + UPDATED_KIND);
|
||||||
|
|
||||||
|
// Get all the customerList where kind equals to UPDATED_KIND
|
||||||
|
defaultCustomerShouldNotBeFound("kind.in=" + UPDATED_KIND);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByKindIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where kind is not null
|
||||||
|
defaultCustomerShouldBeFound("kind.specified=true");
|
||||||
|
|
||||||
|
// Get all the customerList where kind is null
|
||||||
|
defaultCustomerShouldNotBeFound("kind.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByBirthDateIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where birthDate equals to DEFAULT_BIRTH_DATE
|
||||||
|
defaultCustomerShouldBeFound("birthDate.equals=" + DEFAULT_BIRTH_DATE);
|
||||||
|
|
||||||
|
// Get all the customerList where birthDate equals to UPDATED_BIRTH_DATE
|
||||||
|
defaultCustomerShouldNotBeFound("birthDate.equals=" + UPDATED_BIRTH_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByBirthDateIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where birthDate in DEFAULT_BIRTH_DATE or UPDATED_BIRTH_DATE
|
||||||
|
defaultCustomerShouldBeFound("birthDate.in=" + DEFAULT_BIRTH_DATE + "," + UPDATED_BIRTH_DATE);
|
||||||
|
|
||||||
|
// Get all the customerList where birthDate equals to UPDATED_BIRTH_DATE
|
||||||
|
defaultCustomerShouldNotBeFound("birthDate.in=" + UPDATED_BIRTH_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByBirthDateIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where birthDate is not null
|
||||||
|
defaultCustomerShouldBeFound("birthDate.specified=true");
|
||||||
|
|
||||||
|
// Get all the customerList where birthDate is null
|
||||||
|
defaultCustomerShouldNotBeFound("birthDate.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByBirthDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where birthDate greater than or equals to DEFAULT_BIRTH_DATE
|
||||||
|
defaultCustomerShouldBeFound("birthDate.greaterOrEqualThan=" + DEFAULT_BIRTH_DATE);
|
||||||
|
|
||||||
|
// Get all the customerList where birthDate greater than or equals to UPDATED_BIRTH_DATE
|
||||||
|
defaultCustomerShouldNotBeFound("birthDate.greaterOrEqualThan=" + UPDATED_BIRTH_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByBirthDateIsLessThanSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where birthDate less than or equals to DEFAULT_BIRTH_DATE
|
||||||
|
defaultCustomerShouldNotBeFound("birthDate.lessThan=" + DEFAULT_BIRTH_DATE);
|
||||||
|
|
||||||
|
// Get all the customerList where birthDate less than or equals to UPDATED_BIRTH_DATE
|
||||||
|
defaultCustomerShouldBeFound("birthDate.lessThan=" + UPDATED_BIRTH_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByBirthPlaceIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where birthPlace equals to DEFAULT_BIRTH_PLACE
|
||||||
|
defaultCustomerShouldBeFound("birthPlace.equals=" + DEFAULT_BIRTH_PLACE);
|
||||||
|
|
||||||
|
// Get all the customerList where birthPlace equals to UPDATED_BIRTH_PLACE
|
||||||
|
defaultCustomerShouldNotBeFound("birthPlace.equals=" + UPDATED_BIRTH_PLACE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByBirthPlaceIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where birthPlace in DEFAULT_BIRTH_PLACE or UPDATED_BIRTH_PLACE
|
||||||
|
defaultCustomerShouldBeFound("birthPlace.in=" + DEFAULT_BIRTH_PLACE + "," + UPDATED_BIRTH_PLACE);
|
||||||
|
|
||||||
|
// Get all the customerList where birthPlace equals to UPDATED_BIRTH_PLACE
|
||||||
|
defaultCustomerShouldNotBeFound("birthPlace.in=" + UPDATED_BIRTH_PLACE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByBirthPlaceIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where birthPlace is not null
|
||||||
|
defaultCustomerShouldBeFound("birthPlace.specified=true");
|
||||||
|
|
||||||
|
// Get all the customerList where birthPlace is null
|
||||||
|
defaultCustomerShouldNotBeFound("birthPlace.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByRegistrationCourtIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where registrationCourt equals to DEFAULT_REGISTRATION_COURT
|
||||||
|
defaultCustomerShouldBeFound("registrationCourt.equals=" + DEFAULT_REGISTRATION_COURT);
|
||||||
|
|
||||||
|
// Get all the customerList where registrationCourt equals to UPDATED_REGISTRATION_COURT
|
||||||
|
defaultCustomerShouldNotBeFound("registrationCourt.equals=" + UPDATED_REGISTRATION_COURT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByRegistrationCourtIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where registrationCourt in DEFAULT_REGISTRATION_COURT or UPDATED_REGISTRATION_COURT
|
||||||
|
defaultCustomerShouldBeFound("registrationCourt.in=" + DEFAULT_REGISTRATION_COURT + "," + UPDATED_REGISTRATION_COURT);
|
||||||
|
|
||||||
|
// Get all the customerList where registrationCourt equals to UPDATED_REGISTRATION_COURT
|
||||||
|
defaultCustomerShouldNotBeFound("registrationCourt.in=" + UPDATED_REGISTRATION_COURT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByRegistrationCourtIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where registrationCourt is not null
|
||||||
|
defaultCustomerShouldBeFound("registrationCourt.specified=true");
|
||||||
|
|
||||||
|
// Get all the customerList where registrationCourt is null
|
||||||
|
defaultCustomerShouldNotBeFound("registrationCourt.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByRegistrationNumberIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where registrationNumber equals to DEFAULT_REGISTRATION_NUMBER
|
||||||
|
defaultCustomerShouldBeFound("registrationNumber.equals=" + DEFAULT_REGISTRATION_NUMBER);
|
||||||
|
|
||||||
|
// Get all the customerList where registrationNumber equals to UPDATED_REGISTRATION_NUMBER
|
||||||
|
defaultCustomerShouldNotBeFound("registrationNumber.equals=" + UPDATED_REGISTRATION_NUMBER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByRegistrationNumberIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where registrationNumber in DEFAULT_REGISTRATION_NUMBER or UPDATED_REGISTRATION_NUMBER
|
||||||
|
defaultCustomerShouldBeFound("registrationNumber.in=" + DEFAULT_REGISTRATION_NUMBER + "," + UPDATED_REGISTRATION_NUMBER);
|
||||||
|
|
||||||
|
// Get all the customerList where registrationNumber equals to UPDATED_REGISTRATION_NUMBER
|
||||||
|
defaultCustomerShouldNotBeFound("registrationNumber.in=" + UPDATED_REGISTRATION_NUMBER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByRegistrationNumberIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where registrationNumber is not null
|
||||||
|
defaultCustomerShouldBeFound("registrationNumber.specified=true");
|
||||||
|
|
||||||
|
// Get all the customerList where registrationNumber is null
|
||||||
|
defaultCustomerShouldNotBeFound("registrationNumber.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByVatRegionIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where vatRegion equals to DEFAULT_VAT_REGION
|
||||||
|
defaultCustomerShouldBeFound("vatRegion.equals=" + DEFAULT_VAT_REGION);
|
||||||
|
|
||||||
|
// Get all the customerList where vatRegion equals to UPDATED_VAT_REGION
|
||||||
|
defaultCustomerShouldNotBeFound("vatRegion.equals=" + UPDATED_VAT_REGION);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByVatRegionIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where vatRegion in DEFAULT_VAT_REGION or UPDATED_VAT_REGION
|
||||||
|
defaultCustomerShouldBeFound("vatRegion.in=" + DEFAULT_VAT_REGION + "," + UPDATED_VAT_REGION);
|
||||||
|
|
||||||
|
// Get all the customerList where vatRegion equals to UPDATED_VAT_REGION
|
||||||
|
defaultCustomerShouldNotBeFound("vatRegion.in=" + UPDATED_VAT_REGION);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByVatRegionIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where vatRegion is not null
|
||||||
|
defaultCustomerShouldBeFound("vatRegion.specified=true");
|
||||||
|
|
||||||
|
// Get all the customerList where vatRegion is null
|
||||||
|
defaultCustomerShouldNotBeFound("vatRegion.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByVatNumberIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where vatNumber equals to DEFAULT_VAT_NUMBER
|
||||||
|
defaultCustomerShouldBeFound("vatNumber.equals=" + DEFAULT_VAT_NUMBER);
|
||||||
|
|
||||||
|
// Get all the customerList where vatNumber equals to UPDATED_VAT_NUMBER
|
||||||
|
defaultCustomerShouldNotBeFound("vatNumber.equals=" + UPDATED_VAT_NUMBER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByVatNumberIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where vatNumber in DEFAULT_VAT_NUMBER or UPDATED_VAT_NUMBER
|
||||||
|
defaultCustomerShouldBeFound("vatNumber.in=" + DEFAULT_VAT_NUMBER + "," + UPDATED_VAT_NUMBER);
|
||||||
|
|
||||||
|
// Get all the customerList where vatNumber equals to UPDATED_VAT_NUMBER
|
||||||
|
defaultCustomerShouldNotBeFound("vatNumber.in=" + UPDATED_VAT_NUMBER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByVatNumberIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where vatNumber is not null
|
||||||
|
defaultCustomerShouldBeFound("vatNumber.specified=true");
|
||||||
|
|
||||||
|
// Get all the customerList where vatNumber is null
|
||||||
|
defaultCustomerShouldNotBeFound("vatNumber.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllCustomersByContractualSalutationIsEqualToSomething() throws Exception {
|
public void getAllCustomersByContractualSalutationIsEqualToSomething() throws Exception {
|
||||||
@ -713,6 +1106,13 @@ public class CustomerResourceIntTest {
|
|||||||
.andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE)))
|
.andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE)))
|
||||||
.andExpect(jsonPath("$.[*].prefix").value(hasItem(DEFAULT_PREFIX)))
|
.andExpect(jsonPath("$.[*].prefix").value(hasItem(DEFAULT_PREFIX)))
|
||||||
.andExpect(jsonPath("$.[*].name").value(hasItem(DEFAULT_NAME)))
|
.andExpect(jsonPath("$.[*].name").value(hasItem(DEFAULT_NAME)))
|
||||||
|
.andExpect(jsonPath("$.[*].kind").value(hasItem(DEFAULT_KIND.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].birthDate").value(hasItem(DEFAULT_BIRTH_DATE.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].birthPlace").value(hasItem(DEFAULT_BIRTH_PLACE)))
|
||||||
|
.andExpect(jsonPath("$.[*].registrationCourt").value(hasItem(DEFAULT_REGISTRATION_COURT)))
|
||||||
|
.andExpect(jsonPath("$.[*].registrationNumber").value(hasItem(DEFAULT_REGISTRATION_NUMBER)))
|
||||||
|
.andExpect(jsonPath("$.[*].vatRegion").value(hasItem(DEFAULT_VAT_REGION.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].vatNumber").value(hasItem(DEFAULT_VAT_NUMBER)))
|
||||||
.andExpect(jsonPath("$.[*].contractualSalutation").value(hasItem(DEFAULT_CONTRACTUAL_SALUTATION)))
|
.andExpect(jsonPath("$.[*].contractualSalutation").value(hasItem(DEFAULT_CONTRACTUAL_SALUTATION)))
|
||||||
.andExpect(jsonPath("$.[*].contractualAddress").value(hasItem(DEFAULT_CONTRACTUAL_ADDRESS)))
|
.andExpect(jsonPath("$.[*].contractualAddress").value(hasItem(DEFAULT_CONTRACTUAL_ADDRESS)))
|
||||||
.andExpect(jsonPath("$.[*].billingSalutation").value(hasItem(DEFAULT_BILLING_SALUTATION)))
|
.andExpect(jsonPath("$.[*].billingSalutation").value(hasItem(DEFAULT_BILLING_SALUTATION)))
|
||||||
@ -768,6 +1168,13 @@ public class CustomerResourceIntTest {
|
|||||||
.reference(UPDATED_REFERENCE)
|
.reference(UPDATED_REFERENCE)
|
||||||
.prefix(UPDATED_PREFIX)
|
.prefix(UPDATED_PREFIX)
|
||||||
.name(UPDATED_NAME)
|
.name(UPDATED_NAME)
|
||||||
|
.kind(UPDATED_KIND)
|
||||||
|
.birthDate(UPDATED_BIRTH_DATE)
|
||||||
|
.birthPlace(UPDATED_BIRTH_PLACE)
|
||||||
|
.registrationCourt(UPDATED_REGISTRATION_COURT)
|
||||||
|
.registrationNumber(UPDATED_REGISTRATION_NUMBER)
|
||||||
|
.vatRegion(UPDATED_VAT_REGION)
|
||||||
|
.vatNumber(UPDATED_VAT_NUMBER)
|
||||||
.contractualSalutation(UPDATED_CONTRACTUAL_SALUTATION)
|
.contractualSalutation(UPDATED_CONTRACTUAL_SALUTATION)
|
||||||
.contractualAddress(UPDATED_CONTRACTUAL_ADDRESS)
|
.contractualAddress(UPDATED_CONTRACTUAL_ADDRESS)
|
||||||
.billingSalutation(UPDATED_BILLING_SALUTATION)
|
.billingSalutation(UPDATED_BILLING_SALUTATION)
|
||||||
@ -787,6 +1194,13 @@ public class CustomerResourceIntTest {
|
|||||||
assertThat(testCustomer.getReference()).isEqualTo(UPDATED_REFERENCE);
|
assertThat(testCustomer.getReference()).isEqualTo(UPDATED_REFERENCE);
|
||||||
assertThat(testCustomer.getPrefix()).isEqualTo(UPDATED_PREFIX);
|
assertThat(testCustomer.getPrefix()).isEqualTo(UPDATED_PREFIX);
|
||||||
assertThat(testCustomer.getName()).isEqualTo(UPDATED_NAME);
|
assertThat(testCustomer.getName()).isEqualTo(UPDATED_NAME);
|
||||||
|
assertThat(testCustomer.getKind()).isEqualTo(UPDATED_KIND);
|
||||||
|
assertThat(testCustomer.getBirthDate()).isEqualTo(UPDATED_BIRTH_DATE);
|
||||||
|
assertThat(testCustomer.getBirthPlace()).isEqualTo(UPDATED_BIRTH_PLACE);
|
||||||
|
assertThat(testCustomer.getRegistrationCourt()).isEqualTo(UPDATED_REGISTRATION_COURT);
|
||||||
|
assertThat(testCustomer.getRegistrationNumber()).isEqualTo(UPDATED_REGISTRATION_NUMBER);
|
||||||
|
assertThat(testCustomer.getVatRegion()).isEqualTo(UPDATED_VAT_REGION);
|
||||||
|
assertThat(testCustomer.getVatNumber()).isEqualTo(UPDATED_VAT_NUMBER);
|
||||||
assertThat(testCustomer.getContractualSalutation()).isEqualTo(UPDATED_CONTRACTUAL_SALUTATION);
|
assertThat(testCustomer.getContractualSalutation()).isEqualTo(UPDATED_CONTRACTUAL_SALUTATION);
|
||||||
assertThat(testCustomer.getContractualAddress()).isEqualTo(UPDATED_CONTRACTUAL_ADDRESS);
|
assertThat(testCustomer.getContractualAddress()).isEqualTo(UPDATED_CONTRACTUAL_ADDRESS);
|
||||||
assertThat(testCustomer.getBillingSalutation()).isEqualTo(UPDATED_BILLING_SALUTATION);
|
assertThat(testCustomer.getBillingSalutation()).isEqualTo(UPDATED_BILLING_SALUTATION);
|
||||||
|
@ -7,10 +7,19 @@ import org.hostsharing.hsadminng.domain.Membership;
|
|||||||
import org.hostsharing.hsadminng.domain.Share;
|
import org.hostsharing.hsadminng.domain.Share;
|
||||||
import org.hostsharing.hsadminng.repository.MembershipRepository;
|
import org.hostsharing.hsadminng.repository.MembershipRepository;
|
||||||
import org.hostsharing.hsadminng.service.MembershipQueryService;
|
import org.hostsharing.hsadminng.service.MembershipQueryService;
|
||||||
|
|
||||||
|
import org.hostsharing.hsadminng.domain.Membership;
|
||||||
|
import org.hostsharing.hsadminng.domain.Share;
|
||||||
|
import org.hostsharing.hsadminng.domain.Asset;
|
||||||
|
import org.hostsharing.hsadminng.domain.Customer;
|
||||||
|
import org.hostsharing.hsadminng.repository.MembershipRepository;
|
||||||
import org.hostsharing.hsadminng.service.MembershipService;
|
import org.hostsharing.hsadminng.service.MembershipService;
|
||||||
import org.hostsharing.hsadminng.service.dto.MembershipDTO;
|
import org.hostsharing.hsadminng.service.dto.MembershipDTO;
|
||||||
import org.hostsharing.hsadminng.service.mapper.MembershipMapper;
|
import org.hostsharing.hsadminng.service.mapper.MembershipMapper;
|
||||||
import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator;
|
import org.hostsharing.hsadminng.web.rest.errors.ExceptionTranslator;
|
||||||
|
import org.hostsharing.hsadminng.service.dto.MembershipCriteria;
|
||||||
|
import org.hostsharing.hsadminng.service.MembershipQueryService;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
@ -35,6 +44,11 @@ import java.util.Objects;
|
|||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.hamcrest.Matchers.hasItem;
|
import static org.hamcrest.Matchers.hasItem;
|
||||||
import static org.hostsharing.hsadminng.web.rest.TestUtil.createFormattingConversionService;
|
import static org.hostsharing.hsadminng.web.rest.TestUtil.createFormattingConversionService;
|
||||||
|
|
||||||
|
|
||||||
|
import static org.hostsharing.hsadminng.web.rest.TestUtil.createFormattingConversionService;
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
import static org.hamcrest.Matchers.hasItem;
|
||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
|
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
|
||||||
|
|
||||||
@ -55,6 +69,17 @@ public class MembershipResourceIntTest {
|
|||||||
|
|
||||||
private static final LocalDate DEFAULT_MEMBER_UNTIL = DEFAULT_MEMBER_FROM.plusYears(1).withMonth(12).withDayOfMonth(31);
|
private static final LocalDate DEFAULT_MEMBER_UNTIL = DEFAULT_MEMBER_FROM.plusYears(1).withMonth(12).withDayOfMonth(31);
|
||||||
private static final LocalDate UPDATED_MEMBER_UNTIL = UPDATED_MEMBER_FROM.plusYears(7).withMonth(12).withDayOfMonth(31);
|
private static final LocalDate UPDATED_MEMBER_UNTIL = UPDATED_MEMBER_FROM.plusYears(7).withMonth(12).withDayOfMonth(31);
|
||||||
|
private static final LocalDate DEFAULT_ADMISSION_DOCUMENT_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_ADMISSION_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
private static final LocalDate DEFAULT_CANCELLATION_DOCUMENT_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_CANCELLATION_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
private static final LocalDate DEFAULT_MEMBER_FROM_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_MEMBER_FROM_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
private static final LocalDate DEFAULT_MEMBER_UNTIL_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_MEMBER_UNTIL_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
private static final String DEFAULT_REMARK = "AAAAAAAAAA";
|
private static final String DEFAULT_REMARK = "AAAAAAAAAA";
|
||||||
private static final String UPDATED_REMARK = "BBBBBBBBBB";
|
private static final String UPDATED_REMARK = "BBBBBBBBBB";
|
||||||
@ -104,15 +129,16 @@ public class MembershipResourceIntTest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an entity for this test.
|
* Create an entity for this test.
|
||||||
* <p>
|
*
|
||||||
* This is a static method, as tests for other entities might also need it,
|
* This is a static method, as tests for other entities might also need it,
|
||||||
* if they test an entity which requires the current entity.
|
* if they test an entity which requires the current entity.
|
||||||
*/
|
*/
|
||||||
public static Membership createEntity(EntityManager em) {
|
public static Membership createEntity(EntityManager em) {
|
||||||
Membership membership = new Membership()
|
Membership membership = new Membership()
|
||||||
.documentDate(DEFAULT_DOCUMENT_DATE)
|
.admissionDocumentDate(DEFAULT_ADMISSION_DOCUMENT_DATE)
|
||||||
.memberFrom(DEFAULT_MEMBER_FROM)
|
.cancellationDocumentDate(DEFAULT_CANCELLATION_DOCUMENT_DATE)
|
||||||
.memberUntil(DEFAULT_MEMBER_UNTIL)
|
.memberFromDate(DEFAULT_MEMBER_FROM_DATE)
|
||||||
|
.memberUntilDate(DEFAULT_MEMBER_UNTIL_DATE)
|
||||||
.remark(DEFAULT_REMARK);
|
.remark(DEFAULT_REMARK);
|
||||||
// Add required entity
|
// Add required entity
|
||||||
Customer customer = CustomerResourceIntTest.createEntity(em);
|
Customer customer = CustomerResourceIntTest.createEntity(em);
|
||||||
@ -130,7 +156,7 @@ public class MembershipResourceIntTest {
|
|||||||
*/
|
*/
|
||||||
public static Membership createPersistentEntity(EntityManager em, final Customer customer) {
|
public static Membership createPersistentEntity(EntityManager em, final Customer customer) {
|
||||||
Membership membership = new Membership()
|
Membership membership = new Membership()
|
||||||
.documentDate(DEFAULT_DOCUMENT_DATE)
|
.admissionDate(DEFAULT_ADMISSION_DATE)
|
||||||
.memberFrom(DEFAULT_MEMBER_FROM)
|
.memberFrom(DEFAULT_MEMBER_FROM)
|
||||||
.memberUntil(DEFAULT_MEMBER_UNTIL)
|
.memberUntil(DEFAULT_MEMBER_UNTIL)
|
||||||
.remark(DEFAULT_REMARK);
|
.remark(DEFAULT_REMARK);
|
||||||
@ -162,9 +188,10 @@ public class MembershipResourceIntTest {
|
|||||||
List<Membership> membershipList = membershipRepository.findAll();
|
List<Membership> membershipList = membershipRepository.findAll();
|
||||||
assertThat(membershipList).hasSize(databaseSizeBeforeCreate + 1);
|
assertThat(membershipList).hasSize(databaseSizeBeforeCreate + 1);
|
||||||
Membership testMembership = membershipList.get(membershipList.size() - 1);
|
Membership testMembership = membershipList.get(membershipList.size() - 1);
|
||||||
assertThat(testMembership.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE);
|
assertThat(testMembership.getAdmissionDocumentDate()).isEqualTo(DEFAULT_ADMISSION_DOCUMENT_DATE);
|
||||||
assertThat(testMembership.getMemberFrom()).isEqualTo(DEFAULT_MEMBER_FROM);
|
assertThat(testMembership.getCancellationDocumentDate()).isEqualTo(DEFAULT_CANCELLATION_DOCUMENT_DATE);
|
||||||
assertThat(testMembership.getMemberUntil()).isEqualTo(DEFAULT_MEMBER_UNTIL);
|
assertThat(testMembership.getMemberFromDate()).isEqualTo(DEFAULT_MEMBER_FROM_DATE);
|
||||||
|
assertThat(testMembership.getMemberUntilDate()).isEqualTo(DEFAULT_MEMBER_UNTIL_DATE);
|
||||||
assertThat(testMembership.getRemark()).isEqualTo(DEFAULT_REMARK);
|
assertThat(testMembership.getRemark()).isEqualTo(DEFAULT_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,10 +217,10 @@ public class MembershipResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void checkDocumentDateIsRequired() throws Exception {
|
public void checkAdmissionDocumentDateIsRequired() throws Exception {
|
||||||
int databaseSizeBeforeTest = membershipRepository.findAll().size();
|
int databaseSizeBeforeTest = membershipRepository.findAll().size();
|
||||||
// set the field null
|
// set the field null
|
||||||
membership.setDocumentDate(null);
|
membership.setAdmissionDocumentDate(null);
|
||||||
|
|
||||||
// Create the Membership, which fails.
|
// Create the Membership, which fails.
|
||||||
MembershipDTO membershipDTO = membershipMapper.toDto(membership);
|
MembershipDTO membershipDTO = membershipMapper.toDto(membership);
|
||||||
@ -209,10 +236,10 @@ public class MembershipResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void checkMemberFromIsRequired() throws Exception {
|
public void checkMemberFromDateIsRequired() throws Exception {
|
||||||
int databaseSizeBeforeTest = membershipRepository.findAll().size();
|
int databaseSizeBeforeTest = membershipRepository.findAll().size();
|
||||||
// set the field null
|
// set the field null
|
||||||
membership.setMemberFrom(null);
|
membership.setMemberFromDate(null);
|
||||||
|
|
||||||
// Create the Membership, which fails.
|
// Create the Membership, which fails.
|
||||||
MembershipDTO membershipDTO = membershipMapper.toDto(membership);
|
MembershipDTO membershipDTO = membershipMapper.toDto(membership);
|
||||||
@ -237,9 +264,10 @@ public class MembershipResourceIntTest {
|
|||||||
.andExpect(status().isOk())
|
.andExpect(status().isOk())
|
||||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
|
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
|
||||||
.andExpect(jsonPath("$.[*].id").value(hasItem(membership.getId().intValue())))
|
.andExpect(jsonPath("$.[*].id").value(hasItem(membership.getId().intValue())))
|
||||||
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
.andExpect(jsonPath("$.[*].admissionDocumentDate").value(hasItem(DEFAULT_ADMISSION_DOCUMENT_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].memberFrom").value(hasItem(DEFAULT_MEMBER_FROM.toString())))
|
.andExpect(jsonPath("$.[*].cancellationDocumentDate").value(hasItem(DEFAULT_CANCELLATION_DOCUMENT_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].memberUntil").value(hasItem(DEFAULT_MEMBER_UNTIL.toString())))
|
.andExpect(jsonPath("$.[*].memberFromDate").value(hasItem(DEFAULT_MEMBER_FROM_DATE.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].memberUntilDate").value(hasItem(DEFAULT_MEMBER_UNTIL_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK.toString())));
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK.toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,207 +282,274 @@ public class MembershipResourceIntTest {
|
|||||||
.andExpect(status().isOk())
|
.andExpect(status().isOk())
|
||||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
|
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
|
||||||
.andExpect(jsonPath("$.id").value(membership.getId().intValue()))
|
.andExpect(jsonPath("$.id").value(membership.getId().intValue()))
|
||||||
.andExpect(jsonPath("$.documentDate").value(DEFAULT_DOCUMENT_DATE.toString()))
|
.andExpect(jsonPath("$.admissionDocumentDate").value(DEFAULT_ADMISSION_DOCUMENT_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.memberFrom").value(DEFAULT_MEMBER_FROM.toString()))
|
.andExpect(jsonPath("$.cancellationDocumentDate").value(DEFAULT_CANCELLATION_DOCUMENT_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.memberUntil").value(DEFAULT_MEMBER_UNTIL.toString()))
|
.andExpect(jsonPath("$.memberFromDate").value(DEFAULT_MEMBER_FROM_DATE.toString()))
|
||||||
|
.andExpect(jsonPath("$.memberUntilDate").value(DEFAULT_MEMBER_UNTIL_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.remark").value(DEFAULT_REMARK.toString()));
|
.andExpect(jsonPath("$.remark").value(DEFAULT_REMARK.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByDocumentDateIsEqualToSomething() throws Exception {
|
public void getAllMembershipsByAdmissionDocumentDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where documentDate equals to DEFAULT_DOCUMENT_DATE
|
// Get all the membershipList where admissionDocumentDate equals to DEFAULT_ADMISSION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("documentDate.equals=" + DEFAULT_DOCUMENT_DATE);
|
defaultMembershipShouldBeFound("admissionDocumentDate.equals=" + DEFAULT_ADMISSION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where documentDate equals to UPDATED_DOCUMENT_DATE
|
// Get all the membershipList where admissionDocumentDate equals to UPDATED_ADMISSION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("documentDate.equals=" + UPDATED_DOCUMENT_DATE);
|
defaultMembershipShouldNotBeFound("admissionDocumentDate.equals=" + UPDATED_ADMISSION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByDocumentDateIsInShouldWork() throws Exception {
|
public void getAllMembershipsByAdmissionDocumentDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where documentDate in DEFAULT_DOCUMENT_DATE or UPDATED_DOCUMENT_DATE
|
// Get all the membershipList where admissionDocumentDate in DEFAULT_ADMISSION_DOCUMENT_DATE or UPDATED_ADMISSION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("documentDate.in=" + DEFAULT_DOCUMENT_DATE + "," + UPDATED_DOCUMENT_DATE);
|
defaultMembershipShouldBeFound("admissionDocumentDate.in=" + DEFAULT_ADMISSION_DOCUMENT_DATE + "," + UPDATED_ADMISSION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where documentDate equals to UPDATED_DOCUMENT_DATE
|
// Get all the membershipList where admissionDocumentDate equals to UPDATED_ADMISSION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("documentDate.in=" + UPDATED_DOCUMENT_DATE);
|
defaultMembershipShouldNotBeFound("admissionDocumentDate.in=" + UPDATED_ADMISSION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByDocumentDateIsNullOrNotNull() throws Exception {
|
public void getAllMembershipsByAdmissionDocumentDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where documentDate is not null
|
// Get all the membershipList where admissionDocumentDate is not null
|
||||||
defaultMembershipShouldBeFound("documentDate.specified=true");
|
defaultMembershipShouldBeFound("admissionDocumentDate.specified=true");
|
||||||
|
|
||||||
// Get all the membershipList where documentDate is null
|
// Get all the membershipList where admissionDocumentDate is null
|
||||||
defaultMembershipShouldNotBeFound("documentDate.specified=false");
|
defaultMembershipShouldNotBeFound("admissionDocumentDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByDocumentDateIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllMembershipsByAdmissionDocumentDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where documentDate greater than or equals to DEFAULT_DOCUMENT_DATE
|
// Get all the membershipList where admissionDocumentDate greater than or equals to DEFAULT_ADMISSION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("documentDate.greaterOrEqualThan=" + DEFAULT_DOCUMENT_DATE);
|
defaultMembershipShouldBeFound("admissionDocumentDate.greaterOrEqualThan=" + DEFAULT_ADMISSION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where documentDate greater than or equals to UPDATED_DOCUMENT_DATE
|
// Get all the membershipList where admissionDocumentDate greater than or equals to UPDATED_ADMISSION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("documentDate.greaterOrEqualThan=" + UPDATED_DOCUMENT_DATE);
|
defaultMembershipShouldNotBeFound("admissionDocumentDate.greaterOrEqualThan=" + UPDATED_ADMISSION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByDocumentDateIsLessThanSomething() throws Exception {
|
public void getAllMembershipsByAdmissionDocumentDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where documentDate less than or equals to DEFAULT_DOCUMENT_DATE
|
// Get all the membershipList where admissionDocumentDate less than or equals to DEFAULT_ADMISSION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("documentDate.lessThan=" + DEFAULT_DOCUMENT_DATE);
|
defaultMembershipShouldNotBeFound("admissionDocumentDate.lessThan=" + DEFAULT_ADMISSION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where documentDate less than or equals to UPDATED_DOCUMENT_DATE
|
// Get all the membershipList where admissionDocumentDate less than or equals to UPDATED_ADMISSION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("documentDate.lessThan=" + UPDATED_DOCUMENT_DATE);
|
defaultMembershipShouldBeFound("admissionDocumentDate.lessThan=" + UPDATED_ADMISSION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByMemberFromIsEqualToSomething() throws Exception {
|
public void getAllMembershipsByCancellationDocumentDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where memberFrom equals to DEFAULT_MEMBER_FROM
|
// Get all the membershipList where cancellationDocumentDate equals to DEFAULT_CANCELLATION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("memberFrom.equals=" + DEFAULT_MEMBER_FROM);
|
defaultMembershipShouldBeFound("cancellationDocumentDate.equals=" + DEFAULT_CANCELLATION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where memberFrom equals to UPDATED_MEMBER_FROM
|
// Get all the membershipList where cancellationDocumentDate equals to UPDATED_CANCELLATION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("memberFrom.equals=" + UPDATED_MEMBER_FROM);
|
defaultMembershipShouldNotBeFound("cancellationDocumentDate.equals=" + UPDATED_CANCELLATION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByMemberFromIsInShouldWork() throws Exception {
|
public void getAllMembershipsByCancellationDocumentDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where memberFrom in DEFAULT_MEMBER_FROM or UPDATED_MEMBER_FROM
|
// Get all the membershipList where cancellationDocumentDate in DEFAULT_CANCELLATION_DOCUMENT_DATE or UPDATED_CANCELLATION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("memberFrom.in=" + DEFAULT_MEMBER_FROM + "," + UPDATED_MEMBER_FROM);
|
defaultMembershipShouldBeFound("cancellationDocumentDate.in=" + DEFAULT_CANCELLATION_DOCUMENT_DATE + "," + UPDATED_CANCELLATION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where memberFrom equals to UPDATED_MEMBER_FROM
|
// Get all the membershipList where cancellationDocumentDate equals to UPDATED_CANCELLATION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("memberFrom.in=" + UPDATED_MEMBER_FROM);
|
defaultMembershipShouldNotBeFound("cancellationDocumentDate.in=" + UPDATED_CANCELLATION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByMemberFromIsNullOrNotNull() throws Exception {
|
public void getAllMembershipsByCancellationDocumentDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where memberFrom is not null
|
// Get all the membershipList where cancellationDocumentDate is not null
|
||||||
defaultMembershipShouldBeFound("memberFrom.specified=true");
|
defaultMembershipShouldBeFound("cancellationDocumentDate.specified=true");
|
||||||
|
|
||||||
// Get all the membershipList where memberFrom is null
|
// Get all the membershipList where cancellationDocumentDate is null
|
||||||
defaultMembershipShouldNotBeFound("memberFrom.specified=false");
|
defaultMembershipShouldNotBeFound("cancellationDocumentDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByMemberFromIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllMembershipsByCancellationDocumentDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where memberFrom greater than or equals to DEFAULT_MEMBER_FROM
|
// Get all the membershipList where cancellationDocumentDate greater than or equals to DEFAULT_CANCELLATION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("memberFrom.greaterOrEqualThan=" + DEFAULT_MEMBER_FROM);
|
defaultMembershipShouldBeFound("cancellationDocumentDate.greaterOrEqualThan=" + DEFAULT_CANCELLATION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where memberFrom greater than or equals to UPDATED_MEMBER_FROM
|
// Get all the membershipList where cancellationDocumentDate greater than or equals to UPDATED_CANCELLATION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("memberFrom.greaterOrEqualThan=" + UPDATED_MEMBER_FROM);
|
defaultMembershipShouldNotBeFound("cancellationDocumentDate.greaterOrEqualThan=" + UPDATED_CANCELLATION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByMemberFromIsLessThanSomething() throws Exception {
|
public void getAllMembershipsByCancellationDocumentDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where memberFrom less than or equals to DEFAULT_MEMBER_FROM
|
// Get all the membershipList where cancellationDocumentDate less than or equals to DEFAULT_CANCELLATION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("memberFrom.lessThan=" + DEFAULT_MEMBER_FROM);
|
defaultMembershipShouldNotBeFound("cancellationDocumentDate.lessThan=" + DEFAULT_CANCELLATION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where memberFrom less than or equals to UPDATED_MEMBER_FROM
|
// Get all the membershipList where cancellationDocumentDate less than or equals to UPDATED_CANCELLATION_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("memberFrom.lessThan=" + UPDATED_MEMBER_FROM);
|
defaultMembershipShouldBeFound("cancellationDocumentDate.lessThan=" + UPDATED_CANCELLATION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByMemberUntilIsEqualToSomething() throws Exception {
|
public void getAllMembershipsByMemberFromDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where memberUntil equals to DEFAULT_MEMBER_UNTIL
|
// Get all the membershipList where memberFromDate equals to DEFAULT_MEMBER_FROM_DATE
|
||||||
defaultMembershipShouldBeFound("memberUntil.equals=" + DEFAULT_MEMBER_UNTIL);
|
defaultMembershipShouldBeFound("memberFromDate.equals=" + DEFAULT_MEMBER_FROM_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where memberUntil equals to UPDATED_MEMBER_UNTIL
|
// Get all the membershipList where memberFromDate equals to UPDATED_MEMBER_FROM_DATE
|
||||||
defaultMembershipShouldNotBeFound("memberUntil.equals=" + UPDATED_MEMBER_UNTIL);
|
defaultMembershipShouldNotBeFound("memberFromDate.equals=" + UPDATED_MEMBER_FROM_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByMemberUntilIsInShouldWork() throws Exception {
|
public void getAllMembershipsByMemberFromDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where memberUntil in DEFAULT_MEMBER_UNTIL or UPDATED_MEMBER_UNTIL
|
// Get all the membershipList where memberFromDate in DEFAULT_MEMBER_FROM_DATE or UPDATED_MEMBER_FROM_DATE
|
||||||
defaultMembershipShouldBeFound("memberUntil.in=" + DEFAULT_MEMBER_UNTIL + "," + UPDATED_MEMBER_UNTIL);
|
defaultMembershipShouldBeFound("memberFromDate.in=" + DEFAULT_MEMBER_FROM_DATE + "," + UPDATED_MEMBER_FROM_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where memberUntil equals to UPDATED_MEMBER_UNTIL
|
// Get all the membershipList where memberFromDate equals to UPDATED_MEMBER_FROM_DATE
|
||||||
defaultMembershipShouldNotBeFound("memberUntil.in=" + UPDATED_MEMBER_UNTIL);
|
defaultMembershipShouldNotBeFound("memberFromDate.in=" + UPDATED_MEMBER_FROM_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByMemberUntilIsNullOrNotNull() throws Exception {
|
public void getAllMembershipsByMemberFromDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where memberUntil is not null
|
// Get all the membershipList where memberFromDate is not null
|
||||||
defaultMembershipShouldBeFound("memberUntil.specified=true");
|
defaultMembershipShouldBeFound("memberFromDate.specified=true");
|
||||||
|
|
||||||
// Get all the membershipList where memberUntil is null
|
// Get all the membershipList where memberFromDate is null
|
||||||
defaultMembershipShouldNotBeFound("memberUntil.specified=false");
|
defaultMembershipShouldNotBeFound("memberFromDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByMemberUntilIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllMembershipsByMemberFromDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where memberUntil greater than or equals to DEFAULT_MEMBER_UNTIL
|
// Get all the membershipList where memberFromDate greater than or equals to DEFAULT_MEMBER_FROM_DATE
|
||||||
defaultMembershipShouldBeFound("memberUntil.greaterOrEqualThan=" + DEFAULT_MEMBER_UNTIL);
|
defaultMembershipShouldBeFound("memberFromDate.greaterOrEqualThan=" + DEFAULT_MEMBER_FROM_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where memberUntil greater than or equals to UPDATED_MEMBER_UNTIL
|
// Get all the membershipList where memberFromDate greater than or equals to UPDATED_MEMBER_FROM_DATE
|
||||||
defaultMembershipShouldNotBeFound("memberUntil.greaterOrEqualThan=" + UPDATED_MEMBER_UNTIL);
|
defaultMembershipShouldNotBeFound("memberFromDate.greaterOrEqualThan=" + UPDATED_MEMBER_FROM_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByMemberUntilIsLessThanSomething() throws Exception {
|
public void getAllMembershipsByMemberFromDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where memberUntil less than or equals to DEFAULT_MEMBER_UNTIL
|
// Get all the membershipList where memberFromDate less than or equals to DEFAULT_MEMBER_FROM_DATE
|
||||||
defaultMembershipShouldNotBeFound("memberUntil.lessThan=" + DEFAULT_MEMBER_UNTIL);
|
defaultMembershipShouldNotBeFound("memberFromDate.lessThan=" + DEFAULT_MEMBER_FROM_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where memberUntil less than or equals to UPDATED_MEMBER_UNTIL
|
// Get all the membershipList where memberFromDate less than or equals to UPDATED_MEMBER_FROM_DATE
|
||||||
defaultMembershipShouldBeFound("memberUntil.lessThan=" + UPDATED_MEMBER_UNTIL);
|
defaultMembershipShouldBeFound("memberFromDate.lessThan=" + UPDATED_MEMBER_FROM_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllMembershipsByMemberUntilDateIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntilDate equals to DEFAULT_MEMBER_UNTIL_DATE
|
||||||
|
defaultMembershipShouldBeFound("memberUntilDate.equals=" + DEFAULT_MEMBER_UNTIL_DATE);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntilDate equals to UPDATED_MEMBER_UNTIL_DATE
|
||||||
|
defaultMembershipShouldNotBeFound("memberUntilDate.equals=" + UPDATED_MEMBER_UNTIL_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllMembershipsByMemberUntilDateIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntilDate in DEFAULT_MEMBER_UNTIL_DATE or UPDATED_MEMBER_UNTIL_DATE
|
||||||
|
defaultMembershipShouldBeFound("memberUntilDate.in=" + DEFAULT_MEMBER_UNTIL_DATE + "," + UPDATED_MEMBER_UNTIL_DATE);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntilDate equals to UPDATED_MEMBER_UNTIL_DATE
|
||||||
|
defaultMembershipShouldNotBeFound("memberUntilDate.in=" + UPDATED_MEMBER_UNTIL_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllMembershipsByMemberUntilDateIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntilDate is not null
|
||||||
|
defaultMembershipShouldBeFound("memberUntilDate.specified=true");
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntilDate is null
|
||||||
|
defaultMembershipShouldNotBeFound("memberUntilDate.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllMembershipsByMemberUntilDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntilDate greater than or equals to DEFAULT_MEMBER_UNTIL_DATE
|
||||||
|
defaultMembershipShouldBeFound("memberUntilDate.greaterOrEqualThan=" + DEFAULT_MEMBER_UNTIL_DATE);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntilDate greater than or equals to UPDATED_MEMBER_UNTIL_DATE
|
||||||
|
defaultMembershipShouldNotBeFound("memberUntilDate.greaterOrEqualThan=" + UPDATED_MEMBER_UNTIL_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllMembershipsByMemberUntilDateIsLessThanSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntilDate less than or equals to DEFAULT_MEMBER_UNTIL_DATE
|
||||||
|
defaultMembershipShouldNotBeFound("memberUntilDate.lessThan=" + DEFAULT_MEMBER_UNTIL_DATE);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntilDate less than or equals to UPDATED_MEMBER_UNTIL_DATE
|
||||||
|
defaultMembershipShouldBeFound("memberUntilDate.lessThan=" + UPDATED_MEMBER_UNTIL_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -501,11 +596,12 @@ public class MembershipResourceIntTest {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByShareIsEqualToSomething() throws Exception {
|
public void getAllMembershipsByShareIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
Share share = ShareResourceIntTest.createEntity(em);
|
||||||
Share share = ShareResourceIntTest.createPersistentEntity(em, membership);
|
em.persist(share);
|
||||||
membership.addShare(share);
|
|
||||||
Long shareId = share.getId();
|
|
||||||
em.flush();
|
em.flush();
|
||||||
|
membership.addShare(share);
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
Long shareId = share.getId();
|
||||||
|
|
||||||
// Get all the membershipList where share equals to shareId
|
// Get all the membershipList where share equals to shareId
|
||||||
defaultMembershipShouldBeFound("shareId.equals=" + shareId);
|
defaultMembershipShouldBeFound("shareId.equals=" + shareId);
|
||||||
@ -514,14 +610,16 @@ public class MembershipResourceIntTest {
|
|||||||
defaultMembershipShouldNotBeFound("shareId.equals=" + (shareId + 1));
|
defaultMembershipShouldNotBeFound("shareId.equals=" + (shareId + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByAssetIsEqualToSomething() throws Exception {
|
public void getAllMembershipsByAssetIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
Asset asset = AssetResourceIntTest.createEntity(em);
|
||||||
Asset asset = AssetResourceIntTest.createPersistentEntity(em, membership);
|
em.persist(asset);
|
||||||
membership.addAsset(asset);
|
|
||||||
em.flush();
|
em.flush();
|
||||||
|
membership.addAsset(asset);
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
Long assetId = asset.getId();
|
Long assetId = asset.getId();
|
||||||
|
|
||||||
// Get all the membershipList where asset equals to assetId
|
// Get all the membershipList where asset equals to assetId
|
||||||
@ -536,7 +634,9 @@ public class MembershipResourceIntTest {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByCustomerIsEqualToSomething() throws Exception {
|
public void getAllMembershipsByCustomerIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
Customer customer = CustomerResourceIntTest.createPersistentEntity(em);
|
Customer customer = CustomerResourceIntTest.createEntity(em);
|
||||||
|
em.persist(customer);
|
||||||
|
em.flush();
|
||||||
membership.setCustomer(customer);
|
membership.setCustomer(customer);
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
Long customerId = customer.getId();
|
Long customerId = customer.getId();
|
||||||
@ -556,9 +656,10 @@ public class MembershipResourceIntTest {
|
|||||||
.andExpect(status().isOk())
|
.andExpect(status().isOk())
|
||||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
|
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
|
||||||
.andExpect(jsonPath("$.[*].id").value(hasItem(membership.getId().intValue())))
|
.andExpect(jsonPath("$.[*].id").value(hasItem(membership.getId().intValue())))
|
||||||
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
.andExpect(jsonPath("$.[*].admissionDocumentDate").value(hasItem(DEFAULT_ADMISSION_DOCUMENT_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].memberFrom").value(hasItem(DEFAULT_MEMBER_FROM.toString())))
|
.andExpect(jsonPath("$.[*].cancellationDocumentDate").value(hasItem(DEFAULT_CANCELLATION_DOCUMENT_DATE.toString())))
|
||||||
//.andExpect(jsonPath("$.[*].memberUntil").value(hasItem(DEFAULT_MEMBER_UNTIL.toString())))
|
.andExpect(jsonPath("$.[*].memberFromDate").value(hasItem(DEFAULT_MEMBER_FROM_DATE.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].memberUntilDate").value(hasItem(DEFAULT_MEMBER_UNTIL_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK)));
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK)));
|
||||||
|
|
||||||
// Check, that the count call also returns 1
|
// Check, that the count call also returns 1
|
||||||
@ -607,9 +708,10 @@ public class MembershipResourceIntTest {
|
|||||||
// Disconnect from session so that the updates on updatedMembership are not directly saved in db
|
// Disconnect from session so that the updates on updatedMembership are not directly saved in db
|
||||||
em.detach(updatedMembership);
|
em.detach(updatedMembership);
|
||||||
updatedMembership
|
updatedMembership
|
||||||
.documentDate(UPDATED_DOCUMENT_DATE)
|
.admissionDocumentDate(UPDATED_ADMISSION_DOCUMENT_DATE)
|
||||||
.memberFrom(UPDATED_MEMBER_FROM)
|
.cancellationDocumentDate(UPDATED_CANCELLATION_DOCUMENT_DATE)
|
||||||
.memberUntil(UPDATED_MEMBER_UNTIL)
|
.memberFromDate(UPDATED_MEMBER_FROM_DATE)
|
||||||
|
.memberUntilDate(UPDATED_MEMBER_UNTIL_DATE)
|
||||||
.remark(UPDATED_REMARK);
|
.remark(UPDATED_REMARK);
|
||||||
MembershipDTO membershipDTO = membershipMapper.toDto(updatedMembership);
|
MembershipDTO membershipDTO = membershipMapper.toDto(updatedMembership);
|
||||||
|
|
||||||
@ -622,9 +724,10 @@ public class MembershipResourceIntTest {
|
|||||||
List<Membership> membershipList = membershipRepository.findAll();
|
List<Membership> membershipList = membershipRepository.findAll();
|
||||||
assertThat(membershipList).hasSize(databaseSizeBeforeUpdate);
|
assertThat(membershipList).hasSize(databaseSizeBeforeUpdate);
|
||||||
Membership testMembership = membershipList.get(membershipList.size() - 1);
|
Membership testMembership = membershipList.get(membershipList.size() - 1);
|
||||||
assertThat(testMembership.getDocumentDate()).isEqualTo(UPDATED_DOCUMENT_DATE);
|
assertThat(testMembership.getAdmissionDocumentDate()).isEqualTo(UPDATED_ADMISSION_DOCUMENT_DATE);
|
||||||
assertThat(testMembership.getMemberFrom()).isEqualTo(UPDATED_MEMBER_FROM);
|
assertThat(testMembership.getCancellationDocumentDate()).isEqualTo(UPDATED_CANCELLATION_DOCUMENT_DATE);
|
||||||
assertThat(testMembership.getMemberUntil()).isEqualTo(UPDATED_MEMBER_UNTIL);
|
assertThat(testMembership.getMemberFromDate()).isEqualTo(UPDATED_MEMBER_FROM_DATE);
|
||||||
|
assertThat(testMembership.getMemberUntilDate()).isEqualTo(UPDATED_MEMBER_UNTIL_DATE);
|
||||||
assertThat(testMembership.getRemark()).isEqualTo(UPDATED_REMARK);
|
assertThat(testMembership.getRemark()).isEqualTo(UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -658,11 +761,11 @@ public class MembershipResourceIntTest {
|
|||||||
// Delete the membership
|
// Delete the membership
|
||||||
restMembershipMockMvc.perform(delete("/api/memberships/{id}", membership.getId())
|
restMembershipMockMvc.perform(delete("/api/memberships/{id}", membership.getId())
|
||||||
.accept(TestUtil.APPLICATION_JSON_UTF8))
|
.accept(TestUtil.APPLICATION_JSON_UTF8))
|
||||||
.andExpect(status().isBadRequest());
|
.andExpect(status().isOk());
|
||||||
|
|
||||||
// Validate the database still contains the same number of memberships
|
// Validate the database is empty
|
||||||
List<Membership> membershipList = membershipRepository.findAll();
|
List<Membership> membershipList = membershipRepository.findAll();
|
||||||
assertThat(membershipList).hasSize(databaseSizeBeforeDelete);
|
assertThat(membershipList).hasSize(databaseSizeBeforeDelete - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -71,6 +71,20 @@ public class SepaMandateResourceIntTest {
|
|||||||
|
|
||||||
private static final LocalDate DEFAULT_CANCELLATION_DATE = LocalDate.ofEpochDay(0L);
|
private static final LocalDate DEFAULT_CANCELLATION_DATE = LocalDate.ofEpochDay(0L);
|
||||||
private static final LocalDate UPDATED_CANCELLATION_DATE = LocalDate.now(ZoneId.systemDefault());
|
private static final LocalDate UPDATED_CANCELLATION_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
private static final LocalDate DEFAULT_GRANTING_DOCUMENT_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_GRANTING_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
private static final LocalDate DEFAULT_REVOKATION_DOCUMENT_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_REVOKATION_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
private static final LocalDate DEFAULT_VALID_FROM_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_VALID_FROM_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
private static final LocalDate DEFAULT_VALID_UNTIL_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_VALID_UNTIL_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
private static final LocalDate DEFAULT_LAST_USED_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_LAST_USED_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
private static final String DEFAULT_REMARK = "AAAAAAAAAA";
|
private static final String DEFAULT_REMARK = "AAAAAAAAAA";
|
||||||
private static final String UPDATED_REMARK = "BBBBBBBBBB";
|
private static final String UPDATED_REMARK = "BBBBBBBBBB";
|
||||||
@ -129,11 +143,11 @@ public class SepaMandateResourceIntTest {
|
|||||||
.reference(DEFAULT_REFERENCE)
|
.reference(DEFAULT_REFERENCE)
|
||||||
.iban(DEFAULT_IBAN)
|
.iban(DEFAULT_IBAN)
|
||||||
.bic(DEFAULT_BIC)
|
.bic(DEFAULT_BIC)
|
||||||
.documentDate(DEFAULT_DOCUMENT_DATE)
|
.grantingDocumentDate(DEFAULT_GRANTING_DOCUMENT_DATE)
|
||||||
.validFrom(DEFAULT_VALID_FROM)
|
.revokationDocumentDate(DEFAULT_REVOKATION_DOCUMENT_DATE)
|
||||||
.validUntil(DEFAULT_VALID_UNTIL)
|
.validFromDate(DEFAULT_VALID_FROM_DATE)
|
||||||
.lastUsed(DEFAULT_LAST_USED)
|
.validUntilDate(DEFAULT_VALID_UNTIL_DATE)
|
||||||
.cancellationDate(DEFAULT_CANCELLATION_DATE)
|
.lastUsedDate(DEFAULT_LAST_USED_DATE)
|
||||||
.remark(DEFAULT_REMARK);
|
.remark(DEFAULT_REMARK);
|
||||||
// Add required entity
|
// Add required entity
|
||||||
Customer customer = CustomerResourceIntTest.createEntity(em);
|
Customer customer = CustomerResourceIntTest.createEntity(em);
|
||||||
@ -143,28 +157,6 @@ public class SepaMandateResourceIntTest {
|
|||||||
return sepaMandate;
|
return sepaMandate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Create an entity for tests with a specific customer.
|
|
||||||
*
|
|
||||||
* This is a static method, as tests for other entities might also need it,
|
|
||||||
* if they test an entity which requires the current entity.
|
|
||||||
*/
|
|
||||||
public static SepaMandate createEntity(EntityManager em, final Customer customer) {
|
|
||||||
SepaMandate sepaMandate = new SepaMandate()
|
|
||||||
.reference(DEFAULT_REFERENCE)
|
|
||||||
.iban(DEFAULT_IBAN)
|
|
||||||
.bic(DEFAULT_BIC)
|
|
||||||
.documentDate(DEFAULT_DOCUMENT_DATE)
|
|
||||||
.validFrom(DEFAULT_VALID_FROM)
|
|
||||||
.validUntil(DEFAULT_VALID_UNTIL)
|
|
||||||
.lastUsed(DEFAULT_LAST_USED)
|
|
||||||
.cancellationDate(DEFAULT_CANCELLATION_DATE)
|
|
||||||
.remark(DEFAULT_REMARK);
|
|
||||||
// Add required entity
|
|
||||||
sepaMandate.setCustomer(customer);
|
|
||||||
return sepaMandate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void initTest() {
|
public void initTest() {
|
||||||
sepaMandate = createEntity(em);
|
sepaMandate = createEntity(em);
|
||||||
@ -189,11 +181,11 @@ public class SepaMandateResourceIntTest {
|
|||||||
assertThat(testSepaMandate.getReference()).isEqualTo(DEFAULT_REFERENCE);
|
assertThat(testSepaMandate.getReference()).isEqualTo(DEFAULT_REFERENCE);
|
||||||
assertThat(testSepaMandate.getIban()).isEqualTo(DEFAULT_IBAN);
|
assertThat(testSepaMandate.getIban()).isEqualTo(DEFAULT_IBAN);
|
||||||
assertThat(testSepaMandate.getBic()).isEqualTo(DEFAULT_BIC);
|
assertThat(testSepaMandate.getBic()).isEqualTo(DEFAULT_BIC);
|
||||||
assertThat(testSepaMandate.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE);
|
assertThat(testSepaMandate.getGrantingDocumentDate()).isEqualTo(DEFAULT_GRANTING_DOCUMENT_DATE);
|
||||||
assertThat(testSepaMandate.getValidFrom()).isEqualTo(DEFAULT_VALID_FROM);
|
assertThat(testSepaMandate.getRevokationDocumentDate()).isEqualTo(DEFAULT_REVOKATION_DOCUMENT_DATE);
|
||||||
assertThat(testSepaMandate.getValidUntil()).isEqualTo(DEFAULT_VALID_UNTIL);
|
assertThat(testSepaMandate.getValidFromDate()).isEqualTo(DEFAULT_VALID_FROM_DATE);
|
||||||
assertThat(testSepaMandate.getLastUsed()).isEqualTo(DEFAULT_LAST_USED);
|
assertThat(testSepaMandate.getValidUntilDate()).isEqualTo(DEFAULT_VALID_UNTIL_DATE);
|
||||||
assertThat(testSepaMandate.getCancellationDate()).isEqualTo(DEFAULT_CANCELLATION_DATE);
|
assertThat(testSepaMandate.getLastUsedDate()).isEqualTo(DEFAULT_LAST_USED_DATE);
|
||||||
assertThat(testSepaMandate.getRemark()).isEqualTo(DEFAULT_REMARK);
|
assertThat(testSepaMandate.getRemark()).isEqualTo(DEFAULT_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,10 +230,10 @@ public class SepaMandateResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void checkDocumentDateIsRequired() throws Exception {
|
public void checkGrantingDocumentDateIsRequired() throws Exception {
|
||||||
int databaseSizeBeforeTest = sepaMandateRepository.findAll().size();
|
int databaseSizeBeforeTest = sepaMandateRepository.findAll().size();
|
||||||
// set the field null
|
// set the field null
|
||||||
sepaMandate.setDocumentDate(null);
|
sepaMandate.setGrantingDocumentDate(null);
|
||||||
|
|
||||||
// Create the SepaMandate, which fails.
|
// Create the SepaMandate, which fails.
|
||||||
SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate);
|
SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate);
|
||||||
@ -257,10 +249,10 @@ public class SepaMandateResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void checkValidFromIsRequired() throws Exception {
|
public void checkValidFromDateIsRequired() throws Exception {
|
||||||
int databaseSizeBeforeTest = sepaMandateRepository.findAll().size();
|
int databaseSizeBeforeTest = sepaMandateRepository.findAll().size();
|
||||||
// set the field null
|
// set the field null
|
||||||
sepaMandate.setValidFrom(null);
|
sepaMandate.setValidFromDate(null);
|
||||||
|
|
||||||
// Create the SepaMandate, which fails.
|
// Create the SepaMandate, which fails.
|
||||||
SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate);
|
SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate);
|
||||||
@ -288,11 +280,11 @@ public class SepaMandateResourceIntTest {
|
|||||||
.andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE.toString())))
|
.andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].iban").value(hasItem(DEFAULT_IBAN.toString())))
|
.andExpect(jsonPath("$.[*].iban").value(hasItem(DEFAULT_IBAN.toString())))
|
||||||
.andExpect(jsonPath("$.[*].bic").value(hasItem(DEFAULT_BIC.toString())))
|
.andExpect(jsonPath("$.[*].bic").value(hasItem(DEFAULT_BIC.toString())))
|
||||||
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
.andExpect(jsonPath("$.[*].grantingDocumentDate").value(hasItem(DEFAULT_GRANTING_DOCUMENT_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].validFrom").value(hasItem(DEFAULT_VALID_FROM.toString())))
|
.andExpect(jsonPath("$.[*].revokationDocumentDate").value(hasItem(DEFAULT_REVOKATION_DOCUMENT_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].validUntil").value(hasItem(DEFAULT_VALID_UNTIL.toString())))
|
.andExpect(jsonPath("$.[*].validFromDate").value(hasItem(DEFAULT_VALID_FROM_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].lastUsed").value(hasItem(DEFAULT_LAST_USED.toString())))
|
.andExpect(jsonPath("$.[*].validUntilDate").value(hasItem(DEFAULT_VALID_UNTIL_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].cancellationDate").value(hasItem(DEFAULT_CANCELLATION_DATE.toString())))
|
.andExpect(jsonPath("$.[*].lastUsedDate").value(hasItem(DEFAULT_LAST_USED_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK.toString())));
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK.toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,11 +302,11 @@ public class SepaMandateResourceIntTest {
|
|||||||
.andExpect(jsonPath("$.reference").value(DEFAULT_REFERENCE.toString()))
|
.andExpect(jsonPath("$.reference").value(DEFAULT_REFERENCE.toString()))
|
||||||
.andExpect(jsonPath("$.iban").value(DEFAULT_IBAN.toString()))
|
.andExpect(jsonPath("$.iban").value(DEFAULT_IBAN.toString()))
|
||||||
.andExpect(jsonPath("$.bic").value(DEFAULT_BIC.toString()))
|
.andExpect(jsonPath("$.bic").value(DEFAULT_BIC.toString()))
|
||||||
.andExpect(jsonPath("$.documentDate").value(DEFAULT_DOCUMENT_DATE.toString()))
|
.andExpect(jsonPath("$.grantingDocumentDate").value(DEFAULT_GRANTING_DOCUMENT_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.validFrom").value(DEFAULT_VALID_FROM.toString()))
|
.andExpect(jsonPath("$.revokationDocumentDate").value(DEFAULT_REVOKATION_DOCUMENT_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.validUntil").value(DEFAULT_VALID_UNTIL.toString()))
|
.andExpect(jsonPath("$.validFromDate").value(DEFAULT_VALID_FROM_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.lastUsed").value(DEFAULT_LAST_USED.toString()))
|
.andExpect(jsonPath("$.validUntilDate").value(DEFAULT_VALID_UNTIL_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.cancellationDate").value(DEFAULT_CANCELLATION_DATE.toString()))
|
.andExpect(jsonPath("$.lastUsedDate").value(DEFAULT_LAST_USED_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.remark").value(DEFAULT_REMARK.toString()));
|
.andExpect(jsonPath("$.remark").value(DEFAULT_REMARK.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -437,331 +429,331 @@ public class SepaMandateResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByDocumentDateIsEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByGrantingDocumentDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where documentDate equals to DEFAULT_DOCUMENT_DATE
|
// Get all the sepaMandateList where grantingDocumentDate equals to DEFAULT_GRANTING_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("documentDate.equals=" + DEFAULT_DOCUMENT_DATE);
|
defaultSepaMandateShouldBeFound("grantingDocumentDate.equals=" + DEFAULT_GRANTING_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where documentDate equals to UPDATED_DOCUMENT_DATE
|
// Get all the sepaMandateList where grantingDocumentDate equals to UPDATED_GRANTING_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("documentDate.equals=" + UPDATED_DOCUMENT_DATE);
|
defaultSepaMandateShouldNotBeFound("grantingDocumentDate.equals=" + UPDATED_GRANTING_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByDocumentDateIsInShouldWork() throws Exception {
|
public void getAllSepaMandatesByGrantingDocumentDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where documentDate in DEFAULT_DOCUMENT_DATE or UPDATED_DOCUMENT_DATE
|
// Get all the sepaMandateList where grantingDocumentDate in DEFAULT_GRANTING_DOCUMENT_DATE or UPDATED_GRANTING_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("documentDate.in=" + DEFAULT_DOCUMENT_DATE + "," + UPDATED_DOCUMENT_DATE);
|
defaultSepaMandateShouldBeFound("grantingDocumentDate.in=" + DEFAULT_GRANTING_DOCUMENT_DATE + "," + UPDATED_GRANTING_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where documentDate equals to UPDATED_DOCUMENT_DATE
|
// Get all the sepaMandateList where grantingDocumentDate equals to UPDATED_GRANTING_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("documentDate.in=" + UPDATED_DOCUMENT_DATE);
|
defaultSepaMandateShouldNotBeFound("grantingDocumentDate.in=" + UPDATED_GRANTING_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByDocumentDateIsNullOrNotNull() throws Exception {
|
public void getAllSepaMandatesByGrantingDocumentDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where documentDate is not null
|
// Get all the sepaMandateList where grantingDocumentDate is not null
|
||||||
defaultSepaMandateShouldBeFound("documentDate.specified=true");
|
defaultSepaMandateShouldBeFound("grantingDocumentDate.specified=true");
|
||||||
|
|
||||||
// Get all the sepaMandateList where documentDate is null
|
// Get all the sepaMandateList where grantingDocumentDate is null
|
||||||
defaultSepaMandateShouldNotBeFound("documentDate.specified=false");
|
defaultSepaMandateShouldNotBeFound("grantingDocumentDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByDocumentDateIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByGrantingDocumentDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where documentDate greater than or equals to DEFAULT_DOCUMENT_DATE
|
// Get all the sepaMandateList where grantingDocumentDate greater than or equals to DEFAULT_GRANTING_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("documentDate.greaterOrEqualThan=" + DEFAULT_DOCUMENT_DATE);
|
defaultSepaMandateShouldBeFound("grantingDocumentDate.greaterOrEqualThan=" + DEFAULT_GRANTING_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where documentDate greater than or equals to UPDATED_DOCUMENT_DATE
|
// Get all the sepaMandateList where grantingDocumentDate greater than or equals to UPDATED_GRANTING_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("documentDate.greaterOrEqualThan=" + UPDATED_DOCUMENT_DATE);
|
defaultSepaMandateShouldNotBeFound("grantingDocumentDate.greaterOrEqualThan=" + UPDATED_GRANTING_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByDocumentDateIsLessThanSomething() throws Exception {
|
public void getAllSepaMandatesByGrantingDocumentDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where documentDate less than or equals to DEFAULT_DOCUMENT_DATE
|
// Get all the sepaMandateList where grantingDocumentDate less than or equals to DEFAULT_GRANTING_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("documentDate.lessThan=" + DEFAULT_DOCUMENT_DATE);
|
defaultSepaMandateShouldNotBeFound("grantingDocumentDate.lessThan=" + DEFAULT_GRANTING_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where documentDate less than or equals to UPDATED_DOCUMENT_DATE
|
// Get all the sepaMandateList where grantingDocumentDate less than or equals to UPDATED_GRANTING_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("documentDate.lessThan=" + UPDATED_DOCUMENT_DATE);
|
defaultSepaMandateShouldBeFound("grantingDocumentDate.lessThan=" + UPDATED_GRANTING_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidFromIsEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByRevokationDocumentDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validFrom equals to DEFAULT_VALID_FROM
|
// Get all the sepaMandateList where revokationDocumentDate equals to DEFAULT_REVOKATION_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("validFrom.equals=" + DEFAULT_VALID_FROM);
|
defaultSepaMandateShouldBeFound("revokationDocumentDate.equals=" + DEFAULT_REVOKATION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validFrom equals to UPDATED_VALID_FROM
|
// Get all the sepaMandateList where revokationDocumentDate equals to UPDATED_REVOKATION_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("validFrom.equals=" + UPDATED_VALID_FROM);
|
defaultSepaMandateShouldNotBeFound("revokationDocumentDate.equals=" + UPDATED_REVOKATION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidFromIsInShouldWork() throws Exception {
|
public void getAllSepaMandatesByRevokationDocumentDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validFrom in DEFAULT_VALID_FROM or UPDATED_VALID_FROM
|
// Get all the sepaMandateList where revokationDocumentDate in DEFAULT_REVOKATION_DOCUMENT_DATE or UPDATED_REVOKATION_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("validFrom.in=" + DEFAULT_VALID_FROM + "," + UPDATED_VALID_FROM);
|
defaultSepaMandateShouldBeFound("revokationDocumentDate.in=" + DEFAULT_REVOKATION_DOCUMENT_DATE + "," + UPDATED_REVOKATION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validFrom equals to UPDATED_VALID_FROM
|
// Get all the sepaMandateList where revokationDocumentDate equals to UPDATED_REVOKATION_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("validFrom.in=" + UPDATED_VALID_FROM);
|
defaultSepaMandateShouldNotBeFound("revokationDocumentDate.in=" + UPDATED_REVOKATION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidFromIsNullOrNotNull() throws Exception {
|
public void getAllSepaMandatesByRevokationDocumentDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validFrom is not null
|
// Get all the sepaMandateList where revokationDocumentDate is not null
|
||||||
defaultSepaMandateShouldBeFound("validFrom.specified=true");
|
defaultSepaMandateShouldBeFound("revokationDocumentDate.specified=true");
|
||||||
|
|
||||||
// Get all the sepaMandateList where validFrom is null
|
// Get all the sepaMandateList where revokationDocumentDate is null
|
||||||
defaultSepaMandateShouldNotBeFound("validFrom.specified=false");
|
defaultSepaMandateShouldNotBeFound("revokationDocumentDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidFromIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByRevokationDocumentDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validFrom greater than or equals to DEFAULT_VALID_FROM
|
// Get all the sepaMandateList where revokationDocumentDate greater than or equals to DEFAULT_REVOKATION_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("validFrom.greaterOrEqualThan=" + DEFAULT_VALID_FROM);
|
defaultSepaMandateShouldBeFound("revokationDocumentDate.greaterOrEqualThan=" + DEFAULT_REVOKATION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validFrom greater than or equals to UPDATED_VALID_FROM
|
// Get all the sepaMandateList where revokationDocumentDate greater than or equals to UPDATED_REVOKATION_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("validFrom.greaterOrEqualThan=" + UPDATED_VALID_FROM);
|
defaultSepaMandateShouldNotBeFound("revokationDocumentDate.greaterOrEqualThan=" + UPDATED_REVOKATION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidFromIsLessThanSomething() throws Exception {
|
public void getAllSepaMandatesByRevokationDocumentDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validFrom less than or equals to DEFAULT_VALID_FROM
|
// Get all the sepaMandateList where revokationDocumentDate less than or equals to DEFAULT_REVOKATION_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("validFrom.lessThan=" + DEFAULT_VALID_FROM);
|
defaultSepaMandateShouldNotBeFound("revokationDocumentDate.lessThan=" + DEFAULT_REVOKATION_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validFrom less than or equals to UPDATED_VALID_FROM
|
// Get all the sepaMandateList where revokationDocumentDate less than or equals to UPDATED_REVOKATION_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("validFrom.lessThan=" + UPDATED_VALID_FROM);
|
defaultSepaMandateShouldBeFound("revokationDocumentDate.lessThan=" + UPDATED_REVOKATION_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidUntilIsEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByValidFromDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validUntil equals to DEFAULT_VALID_UNTIL
|
// Get all the sepaMandateList where validFromDate equals to DEFAULT_VALID_FROM_DATE
|
||||||
defaultSepaMandateShouldBeFound("validUntil.equals=" + DEFAULT_VALID_UNTIL);
|
defaultSepaMandateShouldBeFound("validFromDate.equals=" + DEFAULT_VALID_FROM_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validUntil equals to UPDATED_VALID_UNTIL
|
// Get all the sepaMandateList where validFromDate equals to UPDATED_VALID_FROM_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("validUntil.equals=" + UPDATED_VALID_UNTIL);
|
defaultSepaMandateShouldNotBeFound("validFromDate.equals=" + UPDATED_VALID_FROM_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidUntilIsInShouldWork() throws Exception {
|
public void getAllSepaMandatesByValidFromDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validUntil in DEFAULT_VALID_UNTIL or UPDATED_VALID_UNTIL
|
// Get all the sepaMandateList where validFromDate in DEFAULT_VALID_FROM_DATE or UPDATED_VALID_FROM_DATE
|
||||||
defaultSepaMandateShouldBeFound("validUntil.in=" + DEFAULT_VALID_UNTIL + "," + UPDATED_VALID_UNTIL);
|
defaultSepaMandateShouldBeFound("validFromDate.in=" + DEFAULT_VALID_FROM_DATE + "," + UPDATED_VALID_FROM_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validUntil equals to UPDATED_VALID_UNTIL
|
// Get all the sepaMandateList where validFromDate equals to UPDATED_VALID_FROM_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("validUntil.in=" + UPDATED_VALID_UNTIL);
|
defaultSepaMandateShouldNotBeFound("validFromDate.in=" + UPDATED_VALID_FROM_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidUntilIsNullOrNotNull() throws Exception {
|
public void getAllSepaMandatesByValidFromDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validUntil is not null
|
// Get all the sepaMandateList where validFromDate is not null
|
||||||
defaultSepaMandateShouldBeFound("validUntil.specified=true");
|
defaultSepaMandateShouldBeFound("validFromDate.specified=true");
|
||||||
|
|
||||||
// Get all the sepaMandateList where validUntil is null
|
// Get all the sepaMandateList where validFromDate is null
|
||||||
defaultSepaMandateShouldNotBeFound("validUntil.specified=false");
|
defaultSepaMandateShouldNotBeFound("validFromDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidUntilIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByValidFromDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validUntil greater than or equals to DEFAULT_VALID_UNTIL
|
// Get all the sepaMandateList where validFromDate greater than or equals to DEFAULT_VALID_FROM_DATE
|
||||||
defaultSepaMandateShouldBeFound("validUntil.greaterOrEqualThan=" + DEFAULT_VALID_UNTIL);
|
defaultSepaMandateShouldBeFound("validFromDate.greaterOrEqualThan=" + DEFAULT_VALID_FROM_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validUntil greater than or equals to UPDATED_VALID_UNTIL
|
// Get all the sepaMandateList where validFromDate greater than or equals to UPDATED_VALID_FROM_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("validUntil.greaterOrEqualThan=" + UPDATED_VALID_UNTIL);
|
defaultSepaMandateShouldNotBeFound("validFromDate.greaterOrEqualThan=" + UPDATED_VALID_FROM_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidUntilIsLessThanSomething() throws Exception {
|
public void getAllSepaMandatesByValidFromDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validUntil less than or equals to DEFAULT_VALID_UNTIL
|
// Get all the sepaMandateList where validFromDate less than or equals to DEFAULT_VALID_FROM_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("validUntil.lessThan=" + DEFAULT_VALID_UNTIL);
|
defaultSepaMandateShouldNotBeFound("validFromDate.lessThan=" + DEFAULT_VALID_FROM_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validUntil less than or equals to UPDATED_VALID_UNTIL
|
// Get all the sepaMandateList where validFromDate less than or equals to UPDATED_VALID_FROM_DATE
|
||||||
defaultSepaMandateShouldBeFound("validUntil.lessThan=" + UPDATED_VALID_UNTIL);
|
defaultSepaMandateShouldBeFound("validFromDate.lessThan=" + UPDATED_VALID_FROM_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByLastUsedIsEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByValidUntilDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where lastUsed equals to DEFAULT_LAST_USED
|
// Get all the sepaMandateList where validUntilDate equals to DEFAULT_VALID_UNTIL_DATE
|
||||||
defaultSepaMandateShouldBeFound("lastUsed.equals=" + DEFAULT_LAST_USED);
|
defaultSepaMandateShouldBeFound("validUntilDate.equals=" + DEFAULT_VALID_UNTIL_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where lastUsed equals to UPDATED_LAST_USED
|
// Get all the sepaMandateList where validUntilDate equals to UPDATED_VALID_UNTIL_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("lastUsed.equals=" + UPDATED_LAST_USED);
|
defaultSepaMandateShouldNotBeFound("validUntilDate.equals=" + UPDATED_VALID_UNTIL_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByLastUsedIsInShouldWork() throws Exception {
|
public void getAllSepaMandatesByValidUntilDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where lastUsed in DEFAULT_LAST_USED or UPDATED_LAST_USED
|
// Get all the sepaMandateList where validUntilDate in DEFAULT_VALID_UNTIL_DATE or UPDATED_VALID_UNTIL_DATE
|
||||||
defaultSepaMandateShouldBeFound("lastUsed.in=" + DEFAULT_LAST_USED + "," + UPDATED_LAST_USED);
|
defaultSepaMandateShouldBeFound("validUntilDate.in=" + DEFAULT_VALID_UNTIL_DATE + "," + UPDATED_VALID_UNTIL_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where lastUsed equals to UPDATED_LAST_USED
|
// Get all the sepaMandateList where validUntilDate equals to UPDATED_VALID_UNTIL_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("lastUsed.in=" + UPDATED_LAST_USED);
|
defaultSepaMandateShouldNotBeFound("validUntilDate.in=" + UPDATED_VALID_UNTIL_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByLastUsedIsNullOrNotNull() throws Exception {
|
public void getAllSepaMandatesByValidUntilDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where lastUsed is not null
|
// Get all the sepaMandateList where validUntilDate is not null
|
||||||
defaultSepaMandateShouldBeFound("lastUsed.specified=true");
|
defaultSepaMandateShouldBeFound("validUntilDate.specified=true");
|
||||||
|
|
||||||
// Get all the sepaMandateList where lastUsed is null
|
// Get all the sepaMandateList where validUntilDate is null
|
||||||
defaultSepaMandateShouldNotBeFound("lastUsed.specified=false");
|
defaultSepaMandateShouldNotBeFound("validUntilDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByLastUsedIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByValidUntilDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where lastUsed greater than or equals to DEFAULT_LAST_USED
|
// Get all the sepaMandateList where validUntilDate greater than or equals to DEFAULT_VALID_UNTIL_DATE
|
||||||
defaultSepaMandateShouldBeFound("lastUsed.greaterOrEqualThan=" + DEFAULT_LAST_USED);
|
defaultSepaMandateShouldBeFound("validUntilDate.greaterOrEqualThan=" + DEFAULT_VALID_UNTIL_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where lastUsed greater than or equals to UPDATED_LAST_USED
|
// Get all the sepaMandateList where validUntilDate greater than or equals to UPDATED_VALID_UNTIL_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("lastUsed.greaterOrEqualThan=" + UPDATED_LAST_USED);
|
defaultSepaMandateShouldNotBeFound("validUntilDate.greaterOrEqualThan=" + UPDATED_VALID_UNTIL_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByLastUsedIsLessThanSomething() throws Exception {
|
public void getAllSepaMandatesByValidUntilDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where lastUsed less than or equals to DEFAULT_LAST_USED
|
// Get all the sepaMandateList where validUntilDate less than or equals to DEFAULT_VALID_UNTIL_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("lastUsed.lessThan=" + DEFAULT_LAST_USED);
|
defaultSepaMandateShouldNotBeFound("validUntilDate.lessThan=" + DEFAULT_VALID_UNTIL_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where lastUsed less than or equals to UPDATED_LAST_USED
|
// Get all the sepaMandateList where validUntilDate less than or equals to UPDATED_VALID_UNTIL_DATE
|
||||||
defaultSepaMandateShouldBeFound("lastUsed.lessThan=" + UPDATED_LAST_USED);
|
defaultSepaMandateShouldBeFound("validUntilDate.lessThan=" + UPDATED_VALID_UNTIL_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCancellationDateIsEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByLastUsedDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancellationDate equals to DEFAULT_CANCELLATION_DATE
|
// Get all the sepaMandateList where lastUsedDate equals to DEFAULT_LAST_USED_DATE
|
||||||
defaultSepaMandateShouldBeFound("cancellationDate.equals=" + DEFAULT_CANCELLATION_DATE);
|
defaultSepaMandateShouldBeFound("lastUsedDate.equals=" + DEFAULT_LAST_USED_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancellationDate equals to UPDATED_CANCELLATION_DATE
|
// Get all the sepaMandateList where lastUsedDate equals to UPDATED_LAST_USED_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("cancellationDate.equals=" + UPDATED_CANCELLATION_DATE);
|
defaultSepaMandateShouldNotBeFound("lastUsedDate.equals=" + UPDATED_LAST_USED_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCancellationDateIsInShouldWork() throws Exception {
|
public void getAllSepaMandatesByLastUsedDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancellationDate in DEFAULT_CANCELLATION_DATE or UPDATED_CANCELLATION_DATE
|
// Get all the sepaMandateList where lastUsedDate in DEFAULT_LAST_USED_DATE or UPDATED_LAST_USED_DATE
|
||||||
defaultSepaMandateShouldBeFound("cancellationDate.in=" + DEFAULT_CANCELLATION_DATE + "," + UPDATED_CANCELLATION_DATE);
|
defaultSepaMandateShouldBeFound("lastUsedDate.in=" + DEFAULT_LAST_USED_DATE + "," + UPDATED_LAST_USED_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancellationDate equals to UPDATED_CANCELLATION_DATE
|
// Get all the sepaMandateList where lastUsedDate equals to UPDATED_LAST_USED_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("cancellationDate.in=" + UPDATED_CANCELLATION_DATE);
|
defaultSepaMandateShouldNotBeFound("lastUsedDate.in=" + UPDATED_LAST_USED_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCancellationDateIsNullOrNotNull() throws Exception {
|
public void getAllSepaMandatesByLastUsedDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancellationDate is not null
|
// Get all the sepaMandateList where lastUsedDate is not null
|
||||||
defaultSepaMandateShouldBeFound("cancellationDate.specified=true");
|
defaultSepaMandateShouldBeFound("lastUsedDate.specified=true");
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancellationDate is null
|
// Get all the sepaMandateList where lastUsedDate is null
|
||||||
defaultSepaMandateShouldNotBeFound("cancellationDate.specified=false");
|
defaultSepaMandateShouldNotBeFound("lastUsedDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCancellationDateIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByLastUsedDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancellationDate greater than or equals to DEFAULT_CANCELLATION_DATE
|
// Get all the sepaMandateList where lastUsedDate greater than or equals to DEFAULT_LAST_USED_DATE
|
||||||
defaultSepaMandateShouldBeFound("cancellationDate.greaterOrEqualThan=" + DEFAULT_CANCELLATION_DATE);
|
defaultSepaMandateShouldBeFound("lastUsedDate.greaterOrEqualThan=" + DEFAULT_LAST_USED_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancellationDate greater than or equals to UPDATED_CANCELLATION_DATE
|
// Get all the sepaMandateList where lastUsedDate greater than or equals to UPDATED_LAST_USED_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("cancellationDate.greaterOrEqualThan=" + UPDATED_CANCELLATION_DATE);
|
defaultSepaMandateShouldNotBeFound("lastUsedDate.greaterOrEqualThan=" + UPDATED_LAST_USED_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCancellationDateIsLessThanSomething() throws Exception {
|
public void getAllSepaMandatesByLastUsedDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancellationDate less than or equals to DEFAULT_CANCELLATION_DATE
|
// Get all the sepaMandateList where lastUsedDate less than or equals to DEFAULT_LAST_USED_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("cancellationDate.lessThan=" + DEFAULT_CANCELLATION_DATE);
|
defaultSepaMandateShouldNotBeFound("lastUsedDate.lessThan=" + DEFAULT_LAST_USED_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancellationDate less than or equals to UPDATED_CANCELLATION_DATE
|
// Get all the sepaMandateList where lastUsedDate less than or equals to UPDATED_LAST_USED_DATE
|
||||||
defaultSepaMandateShouldBeFound("cancellationDate.lessThan=" + UPDATED_CANCELLATION_DATE);
|
defaultSepaMandateShouldBeFound("lastUsedDate.lessThan=" + UPDATED_LAST_USED_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -808,7 +800,9 @@ public class SepaMandateResourceIntTest {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCustomerIsEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByCustomerIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
Customer customer = CustomerResourceIntTest.createPersistentEntity(em);
|
Customer customer = CustomerResourceIntTest.createEntity(em);
|
||||||
|
em.persist(customer);
|
||||||
|
em.flush();
|
||||||
sepaMandate.setCustomer(customer);
|
sepaMandate.setCustomer(customer);
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
Long customerId = customer.getId();
|
Long customerId = customer.getId();
|
||||||
@ -831,11 +825,11 @@ public class SepaMandateResourceIntTest {
|
|||||||
.andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE)))
|
.andExpect(jsonPath("$.[*].reference").value(hasItem(DEFAULT_REFERENCE)))
|
||||||
.andExpect(jsonPath("$.[*].iban").value(hasItem(DEFAULT_IBAN)))
|
.andExpect(jsonPath("$.[*].iban").value(hasItem(DEFAULT_IBAN)))
|
||||||
.andExpect(jsonPath("$.[*].bic").value(hasItem(DEFAULT_BIC)))
|
.andExpect(jsonPath("$.[*].bic").value(hasItem(DEFAULT_BIC)))
|
||||||
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
.andExpect(jsonPath("$.[*].grantingDocumentDate").value(hasItem(DEFAULT_GRANTING_DOCUMENT_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].validFrom").value(hasItem(DEFAULT_VALID_FROM.toString())))
|
.andExpect(jsonPath("$.[*].revokationDocumentDate").value(hasItem(DEFAULT_REVOKATION_DOCUMENT_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].validUntil").value(hasItem(DEFAULT_VALID_UNTIL.toString())))
|
.andExpect(jsonPath("$.[*].validFromDate").value(hasItem(DEFAULT_VALID_FROM_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].lastUsed").value(hasItem(DEFAULT_LAST_USED.toString())))
|
.andExpect(jsonPath("$.[*].validUntilDate").value(hasItem(DEFAULT_VALID_UNTIL_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].cancellationDate").value(hasItem(DEFAULT_CANCELLATION_DATE.toString())))
|
.andExpect(jsonPath("$.[*].lastUsedDate").value(hasItem(DEFAULT_LAST_USED_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK)));
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK)));
|
||||||
|
|
||||||
// Check, that the count call also returns 1
|
// Check, that the count call also returns 1
|
||||||
@ -887,11 +881,11 @@ public class SepaMandateResourceIntTest {
|
|||||||
.reference(UPDATED_REFERENCE)
|
.reference(UPDATED_REFERENCE)
|
||||||
.iban(UPDATED_IBAN)
|
.iban(UPDATED_IBAN)
|
||||||
.bic(UPDATED_BIC)
|
.bic(UPDATED_BIC)
|
||||||
.documentDate(UPDATED_DOCUMENT_DATE)
|
.grantingDocumentDate(UPDATED_GRANTING_DOCUMENT_DATE)
|
||||||
.validFrom(UPDATED_VALID_FROM)
|
.revokationDocumentDate(UPDATED_REVOKATION_DOCUMENT_DATE)
|
||||||
.validUntil(UPDATED_VALID_UNTIL)
|
.validFromDate(UPDATED_VALID_FROM_DATE)
|
||||||
.lastUsed(UPDATED_LAST_USED)
|
.validUntilDate(UPDATED_VALID_UNTIL_DATE)
|
||||||
.cancellationDate(UPDATED_CANCELLATION_DATE)
|
.lastUsedDate(UPDATED_LAST_USED_DATE)
|
||||||
.remark(UPDATED_REMARK);
|
.remark(UPDATED_REMARK);
|
||||||
SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(updatedSepaMandate);
|
SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(updatedSepaMandate);
|
||||||
|
|
||||||
@ -907,11 +901,11 @@ public class SepaMandateResourceIntTest {
|
|||||||
assertThat(testSepaMandate.getReference()).isEqualTo(UPDATED_REFERENCE);
|
assertThat(testSepaMandate.getReference()).isEqualTo(UPDATED_REFERENCE);
|
||||||
assertThat(testSepaMandate.getIban()).isEqualTo(UPDATED_IBAN);
|
assertThat(testSepaMandate.getIban()).isEqualTo(UPDATED_IBAN);
|
||||||
assertThat(testSepaMandate.getBic()).isEqualTo(UPDATED_BIC);
|
assertThat(testSepaMandate.getBic()).isEqualTo(UPDATED_BIC);
|
||||||
assertThat(testSepaMandate.getDocumentDate()).isEqualTo(UPDATED_DOCUMENT_DATE);
|
assertThat(testSepaMandate.getGrantingDocumentDate()).isEqualTo(UPDATED_GRANTING_DOCUMENT_DATE);
|
||||||
assertThat(testSepaMandate.getValidFrom()).isEqualTo(UPDATED_VALID_FROM);
|
assertThat(testSepaMandate.getRevokationDocumentDate()).isEqualTo(UPDATED_REVOKATION_DOCUMENT_DATE);
|
||||||
assertThat(testSepaMandate.getValidUntil()).isEqualTo(UPDATED_VALID_UNTIL);
|
assertThat(testSepaMandate.getValidFromDate()).isEqualTo(UPDATED_VALID_FROM_DATE);
|
||||||
assertThat(testSepaMandate.getLastUsed()).isEqualTo(UPDATED_LAST_USED);
|
assertThat(testSepaMandate.getValidUntilDate()).isEqualTo(UPDATED_VALID_UNTIL_DATE);
|
||||||
assertThat(testSepaMandate.getCancellationDate()).isEqualTo(UPDATED_CANCELLATION_DATE);
|
assertThat(testSepaMandate.getLastUsedDate()).isEqualTo(UPDATED_LAST_USED_DATE);
|
||||||
assertThat(testSepaMandate.getRemark()).isEqualTo(UPDATED_REMARK);
|
assertThat(testSepaMandate.getRemark()).isEqualTo(UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,27 +128,6 @@ public class ShareResourceIntTest {
|
|||||||
return share;
|
return share;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a persistent entity related to the given persistent membership for testing purposes.
|
|
||||||
*
|
|
||||||
* This is a static method, as tests for other entities might also need it,
|
|
||||||
* if they test an entity which requires the current entity.
|
|
||||||
*/
|
|
||||||
public static Share createPersistentEntity(EntityManager em, final Membership membership) {
|
|
||||||
Share share = new Share()
|
|
||||||
.documentDate(DEFAULT_DOCUMENT_DATE)
|
|
||||||
.valueDate(DEFAULT_VALUE_DATE)
|
|
||||||
.action(DEFAULT_ACTION)
|
|
||||||
.quantity(DEFAULT_QUANTITY)
|
|
||||||
.remark(DEFAULT_REMARK);
|
|
||||||
// Add required entity
|
|
||||||
share.setMembership(membership);
|
|
||||||
membership.addShare(share);
|
|
||||||
em.persist(share);
|
|
||||||
em.flush();
|
|
||||||
return share;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void initTest() {
|
public void initTest() {
|
||||||
share = createEntity(em);
|
share = createEntity(em);
|
||||||
@ -589,7 +568,9 @@ public class ShareResourceIntTest {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSharesByMembershipIsEqualToSomething() throws Exception {
|
public void getAllSharesByMembershipIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
Membership membership = MembershipResourceIntTest.createPersistentEntity(em, CustomerResourceIntTest.createPersistentEntity(em));
|
Membership membership = MembershipResourceIntTest.createEntity(em);
|
||||||
|
em.persist(membership);
|
||||||
|
em.flush();
|
||||||
share.setMembership(membership);
|
share.setMembership(membership);
|
||||||
shareRepository.saveAndFlush(share);
|
shareRepository.saveAndFlush(share);
|
||||||
Long membershipId = membership.getId();
|
Long membershipId = membership.getId();
|
||||||
@ -671,17 +652,17 @@ public class ShareResourceIntTest {
|
|||||||
restShareMockMvc.perform(put("/api/shares")
|
restShareMockMvc.perform(put("/api/shares")
|
||||||
.contentType(TestUtil.APPLICATION_JSON_UTF8)
|
.contentType(TestUtil.APPLICATION_JSON_UTF8)
|
||||||
.content(TestUtil.convertObjectToJsonBytes(shareDTO)))
|
.content(TestUtil.convertObjectToJsonBytes(shareDTO)))
|
||||||
.andExpect(status().isBadRequest());
|
.andExpect(status().isOk());
|
||||||
|
|
||||||
// Validate the Share in the database
|
// Validate the Share in the database
|
||||||
List<Share> shareList = shareRepository.findAll();
|
List<Share> shareList = shareRepository.findAll();
|
||||||
assertThat(shareList).hasSize(databaseSizeBeforeUpdate);
|
assertThat(shareList).hasSize(databaseSizeBeforeUpdate);
|
||||||
Share testShare = shareList.get(shareList.size() - 1);
|
Share testShare = shareList.get(shareList.size() - 1);
|
||||||
assertThat(testShare.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE);
|
assertThat(testShare.getDocumentDate()).isEqualTo(UPDATED_DOCUMENT_DATE);
|
||||||
assertThat(testShare.getValueDate()).isEqualTo(DEFAULT_VALUE_DATE);
|
assertThat(testShare.getValueDate()).isEqualTo(UPDATED_VALUE_DATE);
|
||||||
assertThat(testShare.getAction()).isEqualTo(DEFAULT_ACTION);
|
assertThat(testShare.getAction()).isEqualTo(UPDATED_ACTION);
|
||||||
assertThat(testShare.getQuantity()).isEqualTo(DEFAULT_QUANTITY);
|
assertThat(testShare.getQuantity()).isEqualTo(UPDATED_QUANTITY);
|
||||||
assertThat(testShare.getRemark()).isEqualTo(DEFAULT_REMARK);
|
assertThat(testShare.getRemark()).isEqualTo(UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -714,11 +695,11 @@ public class ShareResourceIntTest {
|
|||||||
// Delete the share
|
// Delete the share
|
||||||
restShareMockMvc.perform(delete("/api/shares/{id}", share.getId())
|
restShareMockMvc.perform(delete("/api/shares/{id}", share.getId())
|
||||||
.accept(TestUtil.APPLICATION_JSON_UTF8))
|
.accept(TestUtil.APPLICATION_JSON_UTF8))
|
||||||
.andExpect(status().isBadRequest());
|
.andExpect(status().isOk());
|
||||||
|
|
||||||
// Validate the database still contains the same number of shares
|
// Validate the database is empty
|
||||||
List<Share> shareList = shareRepository.findAll();
|
List<Share> shareList = shareRepository.findAll();
|
||||||
assertThat(shareList).hasSize(databaseSizeBeforeDelete);
|
assertThat(shareList).hasSize(databaseSizeBeforeDelete - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -4,8 +4,10 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/
|
|||||||
import { HttpClient, HttpResponse } from '@angular/common/http';
|
import { HttpClient, HttpResponse } from '@angular/common/http';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { take, map } from 'rxjs/operators';
|
import { take, map } from 'rxjs/operators';
|
||||||
|
import * as moment from 'moment';
|
||||||
|
import { DATE_FORMAT } from 'app/shared/constants/input.constants';
|
||||||
import { CustomerService } from 'app/entities/customer/customer.service';
|
import { CustomerService } from 'app/entities/customer/customer.service';
|
||||||
import { ICustomer, Customer } from 'app/shared/model/customer.model';
|
import { ICustomer, Customer, CustomerKind, VatRegion } from 'app/shared/model/customer.model';
|
||||||
|
|
||||||
describe('Service Tests', () => {
|
describe('Service Tests', () => {
|
||||||
describe('Customer Service', () => {
|
describe('Customer Service', () => {
|
||||||
@ -13,6 +15,7 @@ describe('Service Tests', () => {
|
|||||||
let service: CustomerService;
|
let service: CustomerService;
|
||||||
let httpMock: HttpTestingController;
|
let httpMock: HttpTestingController;
|
||||||
let elemDefault: ICustomer;
|
let elemDefault: ICustomer;
|
||||||
|
let currentDate: moment.Moment;
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule]
|
imports: [HttpClientTestingModule]
|
||||||
@ -20,13 +23,36 @@ describe('Service Tests', () => {
|
|||||||
injector = getTestBed();
|
injector = getTestBed();
|
||||||
service = injector.get(CustomerService);
|
service = injector.get(CustomerService);
|
||||||
httpMock = injector.get(HttpTestingController);
|
httpMock = injector.get(HttpTestingController);
|
||||||
|
currentDate = moment();
|
||||||
|
|
||||||
elemDefault = new Customer(0, 0, 'AAAAAAA', 'AAAAAAA', 'AAAAAAA', 'AAAAAAA', 'AAAAAAA', 'AAAAAAA', 'AAAAAAA');
|
elemDefault = new Customer(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
'AAAAAAA',
|
||||||
|
'AAAAAAA',
|
||||||
|
CustomerKind.NATURAL,
|
||||||
|
currentDate,
|
||||||
|
'AAAAAAA',
|
||||||
|
'AAAAAAA',
|
||||||
|
'AAAAAAA',
|
||||||
|
VatRegion.DOMESTIC,
|
||||||
|
'AAAAAAA',
|
||||||
|
'AAAAAAA',
|
||||||
|
'AAAAAAA',
|
||||||
|
'AAAAAAA',
|
||||||
|
'AAAAAAA',
|
||||||
|
'AAAAAAA'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Service methods', async () => {
|
describe('Service methods', async () => {
|
||||||
it('should find an element', async () => {
|
it('should find an element', async () => {
|
||||||
const returnedFromService = Object.assign({}, elemDefault);
|
const returnedFromService = Object.assign(
|
||||||
|
{
|
||||||
|
birthDate: currentDate.format(DATE_FORMAT)
|
||||||
|
},
|
||||||
|
elemDefault
|
||||||
|
);
|
||||||
service
|
service
|
||||||
.find(123)
|
.find(123)
|
||||||
.pipe(take(1))
|
.pipe(take(1))
|
||||||
@ -39,11 +65,17 @@ describe('Service Tests', () => {
|
|||||||
it('should create a Customer', async () => {
|
it('should create a Customer', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
id: 0
|
id: 0,
|
||||||
|
birthDate: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign({}, returnedFromService);
|
const expected = Object.assign(
|
||||||
|
{
|
||||||
|
birthDate: currentDate
|
||||||
|
},
|
||||||
|
returnedFromService
|
||||||
|
);
|
||||||
service
|
service
|
||||||
.create(new Customer(null))
|
.create(new Customer(null))
|
||||||
.pipe(take(1))
|
.pipe(take(1))
|
||||||
@ -58,6 +90,13 @@ describe('Service Tests', () => {
|
|||||||
reference: 1,
|
reference: 1,
|
||||||
prefix: 'BBBBBB',
|
prefix: 'BBBBBB',
|
||||||
name: 'BBBBBB',
|
name: 'BBBBBB',
|
||||||
|
kind: 'BBBBBB',
|
||||||
|
birthDate: currentDate.format(DATE_FORMAT),
|
||||||
|
birthPlace: 'BBBBBB',
|
||||||
|
registrationCourt: 'BBBBBB',
|
||||||
|
registrationNumber: 'BBBBBB',
|
||||||
|
vatRegion: 'BBBBBB',
|
||||||
|
vatNumber: 'BBBBBB',
|
||||||
contractualSalutation: 'BBBBBB',
|
contractualSalutation: 'BBBBBB',
|
||||||
contractualAddress: 'BBBBBB',
|
contractualAddress: 'BBBBBB',
|
||||||
billingSalutation: 'BBBBBB',
|
billingSalutation: 'BBBBBB',
|
||||||
@ -67,7 +106,12 @@ describe('Service Tests', () => {
|
|||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
|
|
||||||
const expected = Object.assign({}, returnedFromService);
|
const expected = Object.assign(
|
||||||
|
{
|
||||||
|
birthDate: currentDate
|
||||||
|
},
|
||||||
|
returnedFromService
|
||||||
|
);
|
||||||
service
|
service
|
||||||
.update(expected)
|
.update(expected)
|
||||||
.pipe(take(1))
|
.pipe(take(1))
|
||||||
@ -82,6 +126,13 @@ describe('Service Tests', () => {
|
|||||||
reference: 1,
|
reference: 1,
|
||||||
prefix: 'BBBBBB',
|
prefix: 'BBBBBB',
|
||||||
name: 'BBBBBB',
|
name: 'BBBBBB',
|
||||||
|
kind: 'BBBBBB',
|
||||||
|
birthDate: currentDate.format(DATE_FORMAT),
|
||||||
|
birthPlace: 'BBBBBB',
|
||||||
|
registrationCourt: 'BBBBBB',
|
||||||
|
registrationNumber: 'BBBBBB',
|
||||||
|
vatRegion: 'BBBBBB',
|
||||||
|
vatNumber: 'BBBBBB',
|
||||||
contractualSalutation: 'BBBBBB',
|
contractualSalutation: 'BBBBBB',
|
||||||
contractualAddress: 'BBBBBB',
|
contractualAddress: 'BBBBBB',
|
||||||
billingSalutation: 'BBBBBB',
|
billingSalutation: 'BBBBBB',
|
||||||
@ -90,7 +141,12 @@ describe('Service Tests', () => {
|
|||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign({}, returnedFromService);
|
const expected = Object.assign(
|
||||||
|
{
|
||||||
|
birthDate: currentDate
|
||||||
|
},
|
||||||
|
returnedFromService
|
||||||
|
);
|
||||||
service
|
service
|
||||||
.query(expected)
|
.query(expected)
|
||||||
.pipe(
|
.pipe(
|
||||||
|
@ -25,16 +25,17 @@ describe('Service Tests', () => {
|
|||||||
httpMock = injector.get(HttpTestingController);
|
httpMock = injector.get(HttpTestingController);
|
||||||
currentDate = moment();
|
currentDate = moment();
|
||||||
|
|
||||||
elemDefault = new Membership(0, currentDate, currentDate, currentDate, 'AAAAAAA');
|
elemDefault = new Membership(0, currentDate, currentDate, currentDate, currentDate, 'AAAAAAA');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Service methods', async () => {
|
describe('Service methods', async () => {
|
||||||
it('should find an element', async () => {
|
it('should find an element', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
documentDate: currentDate.format(DATE_FORMAT),
|
admissionDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
memberFrom: currentDate.format(DATE_FORMAT),
|
cancellationDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
memberUntil: currentDate.format(DATE_FORMAT)
|
memberFromDate: currentDate.format(DATE_FORMAT),
|
||||||
|
memberUntilDate: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
@ -51,17 +52,19 @@ describe('Service Tests', () => {
|
|||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
documentDate: currentDate.format(DATE_FORMAT),
|
admissionDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
memberFrom: currentDate.format(DATE_FORMAT),
|
cancellationDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
memberUntil: currentDate.format(DATE_FORMAT)
|
memberFromDate: currentDate.format(DATE_FORMAT),
|
||||||
|
memberUntilDate: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
documentDate: currentDate,
|
admissionDocumentDate: currentDate,
|
||||||
memberFrom: currentDate,
|
cancellationDocumentDate: currentDate,
|
||||||
memberUntil: currentDate
|
memberFromDate: currentDate,
|
||||||
|
memberUntilDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -76,9 +79,10 @@ describe('Service Tests', () => {
|
|||||||
it('should update a Membership', async () => {
|
it('should update a Membership', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
documentDate: currentDate.format(DATE_FORMAT),
|
admissionDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
memberFrom: currentDate.format(DATE_FORMAT),
|
cancellationDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
memberUntil: currentDate.format(DATE_FORMAT),
|
memberFromDate: currentDate.format(DATE_FORMAT),
|
||||||
|
memberUntilDate: currentDate.format(DATE_FORMAT),
|
||||||
remark: 'BBBBBB'
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
@ -86,9 +90,10 @@ describe('Service Tests', () => {
|
|||||||
|
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
documentDate: currentDate,
|
admissionDocumentDate: currentDate,
|
||||||
memberFrom: currentDate,
|
cancellationDocumentDate: currentDate,
|
||||||
memberUntil: currentDate
|
memberFromDate: currentDate,
|
||||||
|
memberUntilDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -103,18 +108,20 @@ describe('Service Tests', () => {
|
|||||||
it('should return a list of Membership', async () => {
|
it('should return a list of Membership', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
documentDate: currentDate.format(DATE_FORMAT),
|
admissionDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
memberFrom: currentDate.format(DATE_FORMAT),
|
cancellationDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
memberUntil: currentDate.format(DATE_FORMAT),
|
memberFromDate: currentDate.format(DATE_FORMAT),
|
||||||
|
memberUntilDate: currentDate.format(DATE_FORMAT),
|
||||||
remark: 'BBBBBB'
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
documentDate: currentDate,
|
admissionDocumentDate: currentDate,
|
||||||
memberFrom: currentDate,
|
cancellationDocumentDate: currentDate,
|
||||||
memberUntil: currentDate
|
memberFromDate: currentDate,
|
||||||
|
memberUntilDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
|
@ -43,11 +43,11 @@ describe('Service Tests', () => {
|
|||||||
it('should find an element', async () => {
|
it('should find an element', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
documentDate: currentDate.format(DATE_FORMAT),
|
grantingDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
validFrom: currentDate.format(DATE_FORMAT),
|
revokationDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
validUntil: currentDate.format(DATE_FORMAT),
|
validFromDate: currentDate.format(DATE_FORMAT),
|
||||||
lastUsed: currentDate.format(DATE_FORMAT),
|
validUntilDate: currentDate.format(DATE_FORMAT),
|
||||||
cancellationDate: currentDate.format(DATE_FORMAT)
|
lastUsedDate: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
@ -64,21 +64,21 @@ describe('Service Tests', () => {
|
|||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
documentDate: currentDate.format(DATE_FORMAT),
|
grantingDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
validFrom: currentDate.format(DATE_FORMAT),
|
revokationDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
validUntil: currentDate.format(DATE_FORMAT),
|
validFromDate: currentDate.format(DATE_FORMAT),
|
||||||
lastUsed: currentDate.format(DATE_FORMAT),
|
validUntilDate: currentDate.format(DATE_FORMAT),
|
||||||
cancellationDate: currentDate.format(DATE_FORMAT)
|
lastUsedDate: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
documentDate: currentDate,
|
grantingDocumentDate: currentDate,
|
||||||
validFrom: currentDate,
|
revokationDocumentDate: currentDate,
|
||||||
validUntil: currentDate,
|
validFromDate: currentDate,
|
||||||
lastUsed: currentDate,
|
validUntilDate: currentDate,
|
||||||
cancellationDate: currentDate
|
lastUsedDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -96,11 +96,11 @@ describe('Service Tests', () => {
|
|||||||
reference: 'BBBBBB',
|
reference: 'BBBBBB',
|
||||||
iban: 'BBBBBB',
|
iban: 'BBBBBB',
|
||||||
bic: 'BBBBBB',
|
bic: 'BBBBBB',
|
||||||
documentDate: currentDate.format(DATE_FORMAT),
|
grantingDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
validFrom: currentDate.format(DATE_FORMAT),
|
revokationDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
validUntil: currentDate.format(DATE_FORMAT),
|
validFromDate: currentDate.format(DATE_FORMAT),
|
||||||
lastUsed: currentDate.format(DATE_FORMAT),
|
validUntilDate: currentDate.format(DATE_FORMAT),
|
||||||
cancellationDate: currentDate.format(DATE_FORMAT),
|
lastUsedDate: currentDate.format(DATE_FORMAT),
|
||||||
remark: 'BBBBBB'
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
@ -108,11 +108,11 @@ describe('Service Tests', () => {
|
|||||||
|
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
documentDate: currentDate,
|
grantingDocumentDate: currentDate,
|
||||||
validFrom: currentDate,
|
revokationDocumentDate: currentDate,
|
||||||
validUntil: currentDate,
|
validFromDate: currentDate,
|
||||||
lastUsed: currentDate,
|
validUntilDate: currentDate,
|
||||||
cancellationDate: currentDate
|
lastUsedDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -130,22 +130,22 @@ describe('Service Tests', () => {
|
|||||||
reference: 'BBBBBB',
|
reference: 'BBBBBB',
|
||||||
iban: 'BBBBBB',
|
iban: 'BBBBBB',
|
||||||
bic: 'BBBBBB',
|
bic: 'BBBBBB',
|
||||||
documentDate: currentDate.format(DATE_FORMAT),
|
grantingDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
validFrom: currentDate.format(DATE_FORMAT),
|
revokationDocumentDate: currentDate.format(DATE_FORMAT),
|
||||||
validUntil: currentDate.format(DATE_FORMAT),
|
validFromDate: currentDate.format(DATE_FORMAT),
|
||||||
lastUsed: currentDate.format(DATE_FORMAT),
|
validUntilDate: currentDate.format(DATE_FORMAT),
|
||||||
cancellationDate: currentDate.format(DATE_FORMAT),
|
lastUsedDate: currentDate.format(DATE_FORMAT),
|
||||||
remark: 'BBBBBB'
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
documentDate: currentDate,
|
grantingDocumentDate: currentDate,
|
||||||
validFrom: currentDate,
|
revokationDocumentDate: currentDate,
|
||||||
validUntil: currentDate,
|
validFromDate: currentDate,
|
||||||
lastUsed: currentDate,
|
validUntilDate: currentDate,
|
||||||
cancellationDate: currentDate
|
lastUsedDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user