Merge branch 'jhipster-generated'
This commit is contained in:
commit
1dc03456b2
@ -2,7 +2,14 @@
|
|||||||
"name": "Asset",
|
"name": "Asset",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldName": "date",
|
"fieldName": "documentDate",
|
||||||
|
"fieldType": "LocalDate",
|
||||||
|
"fieldValidateRules": [
|
||||||
|
"required"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "valueDate",
|
||||||
"fieldType": "LocalDate",
|
"fieldType": "LocalDate",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"required"
|
"required"
|
||||||
@ -24,7 +31,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "comment",
|
"fieldName": "remark",
|
||||||
"fieldType": "String",
|
"fieldType": "String",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"maxlength"
|
"maxlength"
|
||||||
@ -39,10 +46,10 @@
|
|||||||
"otherEntityRelationshipName": "asset",
|
"otherEntityRelationshipName": "asset",
|
||||||
"relationshipValidateRules": "required",
|
"relationshipValidateRules": "required",
|
||||||
"relationshipName": "membership",
|
"relationshipName": "membership",
|
||||||
"otherEntityField": "from"
|
"otherEntityField": "documentDate"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"changelogDate": "20190418073046",
|
"changelogDate": "20190403083740",
|
||||||
"entityTableName": "asset",
|
"entityTableName": "asset",
|
||||||
"dto": "mapstruct",
|
"dto": "mapstruct",
|
||||||
"pagination": "infinite-scroll",
|
"pagination": "infinite-scroll",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "Customer",
|
"name": "Customer",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldName": "number",
|
"fieldName": "reference",
|
||||||
"fieldType": "Integer",
|
"fieldType": "Integer",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"required",
|
"required",
|
||||||
@ -18,9 +18,11 @@
|
|||||||
"fieldType": "String",
|
"fieldType": "String",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"required",
|
"required",
|
||||||
|
"maxlength",
|
||||||
"unique",
|
"unique",
|
||||||
"pattern"
|
"pattern"
|
||||||
],
|
],
|
||||||
|
"fieldValidateRulesMaxlength": 3,
|
||||||
"fieldValidateRulesPattern": "[a-z][a-z0-9]+"
|
"fieldValidateRulesPattern": "[a-z][a-z0-9]+"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -64,6 +66,14 @@
|
|||||||
"maxlength"
|
"maxlength"
|
||||||
],
|
],
|
||||||
"fieldValidateRulesMaxlength": 400
|
"fieldValidateRulesMaxlength": 400
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "remark",
|
||||||
|
"fieldType": "String",
|
||||||
|
"fieldValidateRules": [
|
||||||
|
"maxlength"
|
||||||
|
],
|
||||||
|
"fieldValidateRulesMaxlength": 160
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"relationships": [
|
"relationships": [
|
||||||
@ -80,7 +90,7 @@
|
|||||||
"relationshipName": "sepamandate"
|
"relationshipName": "sepamandate"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"changelogDate": "20190418073043",
|
"changelogDate": "20190403083735",
|
||||||
"entityTableName": "customer",
|
"entityTableName": "customer",
|
||||||
"dto": "mapstruct",
|
"dto": "mapstruct",
|
||||||
"pagination": "infinite-scroll",
|
"pagination": "infinite-scroll",
|
||||||
|
@ -2,18 +2,25 @@
|
|||||||
"name": "Membership",
|
"name": "Membership",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldName": "from",
|
"fieldName": "documentDate",
|
||||||
"fieldType": "LocalDate",
|
"fieldType": "LocalDate",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"required"
|
"required"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "to",
|
"fieldName": "memberFrom",
|
||||||
|
"fieldType": "LocalDate",
|
||||||
|
"fieldValidateRules": [
|
||||||
|
"required"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "memberUntil",
|
||||||
"fieldType": "LocalDate"
|
"fieldType": "LocalDate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "comment",
|
"fieldName": "remark",
|
||||||
"fieldType": "String",
|
"fieldType": "String",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"maxlength"
|
"maxlength"
|
||||||
@ -43,7 +50,7 @@
|
|||||||
"otherEntityField": "prefix"
|
"otherEntityField": "prefix"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"changelogDate": "20190418073044",
|
"changelogDate": "20190403083738",
|
||||||
"entityTableName": "membership",
|
"entityTableName": "membership",
|
||||||
"dto": "mapstruct",
|
"dto": "mapstruct",
|
||||||
"pagination": "infinite-scroll",
|
"pagination": "infinite-scroll",
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
"fieldValidateRulesMaxlength": 11
|
"fieldValidateRulesMaxlength": 11
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "created",
|
"fieldName": "documentDate",
|
||||||
"fieldType": "LocalDate",
|
"fieldType": "LocalDate",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"required"
|
"required"
|
||||||
@ -42,7 +42,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "validTo",
|
"fieldName": "validUntil",
|
||||||
"fieldType": "LocalDate"
|
"fieldType": "LocalDate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -50,11 +50,11 @@
|
|||||||
"fieldType": "LocalDate"
|
"fieldType": "LocalDate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "cancelled",
|
"fieldName": "cancellationDate",
|
||||||
"fieldType": "LocalDate"
|
"fieldType": "LocalDate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "comment",
|
"fieldName": "remark",
|
||||||
"fieldType": "String",
|
"fieldType": "String",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"maxlength"
|
"maxlength"
|
||||||
@ -72,7 +72,7 @@
|
|||||||
"otherEntityField": "prefix"
|
"otherEntityField": "prefix"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"changelogDate": "20190418073047",
|
"changelogDate": "20190418100951",
|
||||||
"entityTableName": "sepa_mandate",
|
"entityTableName": "sepa_mandate",
|
||||||
"dto": "mapstruct",
|
"dto": "mapstruct",
|
||||||
"pagination": "infinite-scroll",
|
"pagination": "infinite-scroll",
|
||||||
|
@ -2,7 +2,14 @@
|
|||||||
"name": "Share",
|
"name": "Share",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldName": "date",
|
"fieldName": "documentDate",
|
||||||
|
"fieldType": "LocalDate",
|
||||||
|
"fieldValidateRules": [
|
||||||
|
"required"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldName": "valueDate",
|
||||||
"fieldType": "LocalDate",
|
"fieldType": "LocalDate",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"required"
|
"required"
|
||||||
@ -24,7 +31,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldName": "comment",
|
"fieldName": "remark",
|
||||||
"fieldType": "String",
|
"fieldType": "String",
|
||||||
"fieldValidateRules": [
|
"fieldValidateRules": [
|
||||||
"maxlength"
|
"maxlength"
|
||||||
@ -39,10 +46,10 @@
|
|||||||
"otherEntityRelationshipName": "share",
|
"otherEntityRelationshipName": "share",
|
||||||
"relationshipValidateRules": "required",
|
"relationshipValidateRules": "required",
|
||||||
"relationshipName": "membership",
|
"relationshipName": "membership",
|
||||||
"otherEntityField": "from"
|
"otherEntityField": "documentDate"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"changelogDate": "20190418073045",
|
"changelogDate": "20190403083739",
|
||||||
"entityTableName": "share",
|
"entityTableName": "share",
|
||||||
"dto": "mapstruct",
|
"dto": "mapstruct",
|
||||||
"pagination": "infinite-scroll",
|
"pagination": "infinite-scroll",
|
||||||
|
@ -28,8 +28,12 @@ public class Asset implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Column(name = "jhi_date", nullable = false)
|
@Column(name = "document_date", nullable = false)
|
||||||
private LocalDate date;
|
private LocalDate documentDate;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Column(name = "value_date", nullable = false)
|
||||||
|
private LocalDate valueDate;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@ -41,8 +45,8 @@ public class Asset implements Serializable {
|
|||||||
private BigDecimal amount;
|
private BigDecimal amount;
|
||||||
|
|
||||||
@Size(max = 160)
|
@Size(max = 160)
|
||||||
@Column(name = "jhi_comment", length = 160)
|
@Column(name = "remark", length = 160)
|
||||||
private String comment;
|
private String remark;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@ManyToOne(optional = false)
|
@ManyToOne(optional = false)
|
||||||
@ -58,17 +62,30 @@ public class Asset implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getDate() {
|
public LocalDate getDocumentDate() {
|
||||||
return date;
|
return documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Asset date(LocalDate date) {
|
public Asset documentDate(LocalDate documentDate) {
|
||||||
this.date = date;
|
this.documentDate = documentDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDate(LocalDate date) {
|
public void setDocumentDate(LocalDate documentDate) {
|
||||||
this.date = date;
|
this.documentDate = documentDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getValueDate() {
|
||||||
|
return valueDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Asset valueDate(LocalDate valueDate) {
|
||||||
|
this.valueDate = valueDate;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValueDate(LocalDate valueDate) {
|
||||||
|
this.valueDate = valueDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AssetAction getAction() {
|
public AssetAction getAction() {
|
||||||
@ -97,17 +114,17 @@ public class Asset implements Serializable {
|
|||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getComment() {
|
public String getRemark() {
|
||||||
return comment;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Asset comment(String comment) {
|
public Asset remark(String remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComment(String comment) {
|
public void setRemark(String remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Membership getMembership() {
|
public Membership getMembership() {
|
||||||
@ -148,10 +165,11 @@ public class Asset implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "Asset{" +
|
return "Asset{" +
|
||||||
"id=" + getId() +
|
"id=" + getId() +
|
||||||
", date='" + getDate() + "'" +
|
", documentDate='" + getDocumentDate() + "'" +
|
||||||
|
", valueDate='" + getValueDate() + "'" +
|
||||||
", action='" + getAction() + "'" +
|
", action='" + getAction() + "'" +
|
||||||
", amount=" + getAmount() +
|
", amount=" + getAmount() +
|
||||||
", comment='" + getComment() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,12 +28,13 @@ public class Customer implements Serializable {
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Min(value = 10000)
|
@Min(value = 10000)
|
||||||
@Max(value = 99999)
|
@Max(value = 99999)
|
||||||
@Column(name = "jhi_number", nullable = false, unique = true)
|
@Column(name = "reference", nullable = false, unique = true)
|
||||||
private Integer number;
|
private Integer reference;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@Size(max = 3)
|
||||||
@Pattern(regexp = "[a-z][a-z0-9]+")
|
@Pattern(regexp = "[a-z][a-z0-9]+")
|
||||||
@Column(name = "prefix", nullable = false, unique = true)
|
@Column(name = "prefix", length = 3, nullable = false, unique = true)
|
||||||
private String prefix;
|
private String prefix;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -58,12 +59,14 @@ public class Customer implements Serializable {
|
|||||||
@Column(name = "billing_address", length = 400)
|
@Column(name = "billing_address", length = 400)
|
||||||
private String billingAddress;
|
private String billingAddress;
|
||||||
|
|
||||||
|
@Size(max = 160)
|
||||||
|
@Column(name = "remark", length = 160)
|
||||||
|
private String remark;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "customer")
|
@OneToMany(mappedBy = "customer")
|
||||||
private Set<Membership> memberships = new HashSet<>();
|
private Set<Membership> memberships = new HashSet<>();
|
||||||
|
|
||||||
@OneToMany(mappedBy = "customer")
|
@OneToMany(mappedBy = "customer")
|
||||||
private Set<SepaMandate> sepamandates = new HashSet<>();
|
private Set<SepaMandate> sepamandates = new HashSet<>();
|
||||||
|
|
||||||
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
|
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -73,17 +76,17 @@ public class Customer implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getNumber() {
|
public Integer getReference() {
|
||||||
return number;
|
return reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Customer number(Integer number) {
|
public Customer reference(Integer reference) {
|
||||||
this.number = number;
|
this.reference = reference;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumber(Integer number) {
|
public void setReference(Integer reference) {
|
||||||
this.number = number;
|
this.reference = reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPrefix() {
|
public String getPrefix() {
|
||||||
@ -164,6 +167,19 @@ public class Customer implements Serializable {
|
|||||||
this.billingAddress = billingAddress;
|
this.billingAddress = billingAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Customer remark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
public Set<Membership> getMemberships() {
|
public Set<Membership> getMemberships() {
|
||||||
return memberships;
|
return memberships;
|
||||||
}
|
}
|
||||||
@ -239,13 +255,14 @@ public class Customer implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "Customer{" +
|
return "Customer{" +
|
||||||
"id=" + getId() +
|
"id=" + getId() +
|
||||||
", number=" + getNumber() +
|
", reference=" + getReference() +
|
||||||
", prefix='" + getPrefix() + "'" +
|
", prefix='" + getPrefix() + "'" +
|
||||||
", name='" + getName() + "'" +
|
", name='" + getName() + "'" +
|
||||||
", contractualSalutation='" + getContractualSalutation() + "'" +
|
", contractualSalutation='" + getContractualSalutation() + "'" +
|
||||||
", contractualAddress='" + getContractualAddress() + "'" +
|
", contractualAddress='" + getContractualAddress() + "'" +
|
||||||
", billingSalutation='" + getBillingSalutation() + "'" +
|
", billingSalutation='" + getBillingSalutation() + "'" +
|
||||||
", billingAddress='" + getBillingAddress() + "'" +
|
", billingAddress='" + getBillingAddress() + "'" +
|
||||||
|
", remark='" + getRemark() + "'" +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,22 +30,16 @@ public class Membership implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Column(name = "jhi_from", nullable = false)
|
@Column(name = "since_date", nullable = false)
|
||||||
private LocalDate from;
|
private LocalDate sinceDate;
|
||||||
|
|
||||||
@Column(name = "jhi_to")
|
@Column(name = "until_date")
|
||||||
private LocalDate to;
|
private LocalDate untilDate;
|
||||||
|
|
||||||
@Size(max = 160)
|
@OneToMany(mappedBy = "member")
|
||||||
@Column(name = "jhi_comment", length = 160)
|
|
||||||
private String comment;
|
|
||||||
|
|
||||||
@OneToMany(mappedBy = "membership")
|
|
||||||
private Set<Share> shares = new HashSet<>();
|
private Set<Share> shares = new HashSet<>();
|
||||||
|
@OneToMany(mappedBy = "member")
|
||||||
@OneToMany(mappedBy = "membership")
|
|
||||||
private Set<Asset> assets = new HashSet<>();
|
private Set<Asset> assets = new HashSet<>();
|
||||||
|
|
||||||
@ManyToOne(optional = false)
|
@ManyToOne(optional = false)
|
||||||
@NotNull
|
@NotNull
|
||||||
@JsonIgnoreProperties("memberships")
|
@JsonIgnoreProperties("memberships")
|
||||||
@ -60,43 +54,30 @@ public class Membership implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getFrom() {
|
public LocalDate getSinceDate() {
|
||||||
return from;
|
return sinceDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Membership from(LocalDate from) {
|
public Membership sinceDate(LocalDate sinceDate) {
|
||||||
this.from = from;
|
this.sinceDate = sinceDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFrom(LocalDate from) {
|
public void setSinceDate(LocalDate sinceDate) {
|
||||||
this.from = from;
|
this.sinceDate = sinceDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getTo() {
|
public LocalDate getUntilDate() {
|
||||||
return to;
|
return untilDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Membership to(LocalDate to) {
|
public Membership untilDate(LocalDate untilDate) {
|
||||||
this.to = to;
|
this.untilDate = untilDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTo(LocalDate to) {
|
public void setUntilDate(LocalDate untilDate) {
|
||||||
this.to = to;
|
this.untilDate = untilDate;
|
||||||
}
|
|
||||||
|
|
||||||
public String getComment() {
|
|
||||||
return comment;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Membership comment(String comment) {
|
|
||||||
this.comment = comment;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setComment(String comment) {
|
|
||||||
this.comment = comment;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<Share> getShares() {
|
public Set<Share> getShares() {
|
||||||
@ -187,9 +168,8 @@ public class Membership implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "Membership{" +
|
return "Membership{" +
|
||||||
"id=" + getId() +
|
"id=" + getId() +
|
||||||
", from='" + getFrom() + "'" +
|
", sinceDate='" + getSinceDate() + "'" +
|
||||||
", to='" + getTo() + "'" +
|
", untilDate='" + getUntilDate() + "'" +
|
||||||
", comment='" + getComment() + "'" +
|
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,25 +38,25 @@ public class SepaMandate implements Serializable {
|
|||||||
private String bic;
|
private String bic;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Column(name = "created", nullable = false)
|
@Column(name = "document_date", nullable = false)
|
||||||
private LocalDate created;
|
private LocalDate documentDate;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Column(name = "valid_from", nullable = false)
|
@Column(name = "valid_from", nullable = false)
|
||||||
private LocalDate validFrom;
|
private LocalDate validFrom;
|
||||||
|
|
||||||
@Column(name = "valid_to")
|
@Column(name = "valid_until")
|
||||||
private LocalDate validTo;
|
private LocalDate validUntil;
|
||||||
|
|
||||||
@Column(name = "last_used")
|
@Column(name = "last_used")
|
||||||
private LocalDate lastUsed;
|
private LocalDate lastUsed;
|
||||||
|
|
||||||
@Column(name = "cancelled")
|
@Column(name = "cancellation_date")
|
||||||
private LocalDate cancelled;
|
private LocalDate cancellationDate;
|
||||||
|
|
||||||
@Size(max = 160)
|
@Size(max = 160)
|
||||||
@Column(name = "jhi_comment", length = 160)
|
@Column(name = "remark", length = 160)
|
||||||
private String comment;
|
private String remark;
|
||||||
|
|
||||||
@ManyToOne(optional = false)
|
@ManyToOne(optional = false)
|
||||||
@NotNull
|
@NotNull
|
||||||
@ -111,17 +111,17 @@ public class SepaMandate implements Serializable {
|
|||||||
this.bic = bic;
|
this.bic = bic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getCreated() {
|
public LocalDate getDocumentDate() {
|
||||||
return created;
|
return documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SepaMandate created(LocalDate created) {
|
public SepaMandate documentDate(LocalDate documentDate) {
|
||||||
this.created = created;
|
this.documentDate = documentDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreated(LocalDate created) {
|
public void setDocumentDate(LocalDate documentDate) {
|
||||||
this.created = created;
|
this.documentDate = documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getValidFrom() {
|
public LocalDate getValidFrom() {
|
||||||
@ -137,17 +137,17 @@ public class SepaMandate implements Serializable {
|
|||||||
this.validFrom = validFrom;
|
this.validFrom = validFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getValidTo() {
|
public LocalDate getValidUntil() {
|
||||||
return validTo;
|
return validUntil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SepaMandate validTo(LocalDate validTo) {
|
public SepaMandate validUntil(LocalDate validUntil) {
|
||||||
this.validTo = validTo;
|
this.validUntil = validUntil;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValidTo(LocalDate validTo) {
|
public void setValidUntil(LocalDate validUntil) {
|
||||||
this.validTo = validTo;
|
this.validUntil = validUntil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getLastUsed() {
|
public LocalDate getLastUsed() {
|
||||||
@ -163,30 +163,30 @@ public class SepaMandate implements Serializable {
|
|||||||
this.lastUsed = lastUsed;
|
this.lastUsed = lastUsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getCancelled() {
|
public LocalDate getCancellationDate() {
|
||||||
return cancelled;
|
return cancellationDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SepaMandate cancelled(LocalDate cancelled) {
|
public SepaMandate cancellationDate(LocalDate cancellationDate) {
|
||||||
this.cancelled = cancelled;
|
this.cancellationDate = cancellationDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCancelled(LocalDate cancelled) {
|
public void setCancellationDate(LocalDate cancellationDate) {
|
||||||
this.cancelled = cancelled;
|
this.cancellationDate = cancellationDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getComment() {
|
public String getRemark() {
|
||||||
return comment;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SepaMandate comment(String comment) {
|
public SepaMandate remark(String remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComment(String comment) {
|
public void setRemark(String remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Customer getCustomer() {
|
public Customer getCustomer() {
|
||||||
@ -230,12 +230,12 @@ public class SepaMandate implements Serializable {
|
|||||||
", reference='" + getReference() + "'" +
|
", reference='" + getReference() + "'" +
|
||||||
", iban='" + getIban() + "'" +
|
", iban='" + getIban() + "'" +
|
||||||
", bic='" + getBic() + "'" +
|
", bic='" + getBic() + "'" +
|
||||||
", created='" + getCreated() + "'" +
|
", documentDate='" + getDocumentDate() + "'" +
|
||||||
", validFrom='" + getValidFrom() + "'" +
|
", validFrom='" + getValidFrom() + "'" +
|
||||||
", validTo='" + getValidTo() + "'" +
|
", validUntil='" + getValidUntil() + "'" +
|
||||||
", lastUsed='" + getLastUsed() + "'" +
|
", lastUsed='" + getLastUsed() + "'" +
|
||||||
", cancelled='" + getCancelled() + "'" +
|
", cancellationDate='" + getCancellationDate() + "'" +
|
||||||
", comment='" + getComment() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,12 @@ public class Share implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Column(name = "jhi_date", nullable = false)
|
@Column(name = "document_date", nullable = false)
|
||||||
private LocalDate date;
|
private LocalDate documentDate;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Column(name = "value_date", nullable = false)
|
||||||
|
private LocalDate valueDate;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@ -42,8 +46,8 @@ public class Share implements Serializable {
|
|||||||
private Integer quantity;
|
private Integer quantity;
|
||||||
|
|
||||||
@Size(max = 160)
|
@Size(max = 160)
|
||||||
@Column(name = "jhi_comment", length = 160)
|
@Column(name = "remark", length = 160)
|
||||||
private String comment;
|
private String remark;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@ManyToOne(optional = false)
|
@ManyToOne(optional = false)
|
||||||
@ -59,17 +63,30 @@ public class Share implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getDate() {
|
public LocalDate getDocumentDate() {
|
||||||
return date;
|
return documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Share date(LocalDate date) {
|
public Share documentDate(LocalDate documentDate) {
|
||||||
this.date = date;
|
this.documentDate = documentDate;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDate(LocalDate date) {
|
public void setDocumentDate(LocalDate documentDate) {
|
||||||
this.date = date;
|
this.documentDate = documentDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getValueDate() {
|
||||||
|
return valueDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Share valueDate(LocalDate valueDate) {
|
||||||
|
this.valueDate = valueDate;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValueDate(LocalDate valueDate) {
|
||||||
|
this.valueDate = valueDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShareAction getAction() {
|
public ShareAction getAction() {
|
||||||
@ -98,17 +115,17 @@ public class Share implements Serializable {
|
|||||||
this.quantity = quantity;
|
this.quantity = quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getComment() {
|
public String getRemark() {
|
||||||
return comment;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Share comment(String comment) {
|
public Share remark(String remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComment(String comment) {
|
public void setRemark(String remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Membership getMembership() {
|
public Membership getMembership() {
|
||||||
@ -149,10 +166,11 @@ public class Share implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "Share{" +
|
return "Share{" +
|
||||||
"id=" + getId() +
|
"id=" + getId() +
|
||||||
", date='" + getDate() + "'" +
|
", documentDate='" + getDocumentDate() + "'" +
|
||||||
|
", valueDate='" + getValueDate() + "'" +
|
||||||
", action='" + getAction() + "'" +
|
", action='" + getAction() + "'" +
|
||||||
", quantity=" + getQuantity() +
|
", quantity=" + getQuantity() +
|
||||||
", comment='" + getComment() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,8 +89,11 @@ public class AssetQueryService extends QueryService<Asset> {
|
|||||||
if (criteria.getId() != null) {
|
if (criteria.getId() != null) {
|
||||||
specification = specification.and(buildSpecification(criteria.getId(), Asset_.id));
|
specification = specification.and(buildSpecification(criteria.getId(), Asset_.id));
|
||||||
}
|
}
|
||||||
if (criteria.getDate() != null) {
|
if (criteria.getDocumentDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getDate(), Asset_.date));
|
specification = specification.and(buildRangeSpecification(criteria.getDocumentDate(), Asset_.documentDate));
|
||||||
|
}
|
||||||
|
if (criteria.getValueDate() != null) {
|
||||||
|
specification = specification.and(buildRangeSpecification(criteria.getValueDate(), Asset_.valueDate));
|
||||||
}
|
}
|
||||||
if (criteria.getAction() != null) {
|
if (criteria.getAction() != null) {
|
||||||
specification = specification.and(buildSpecification(criteria.getAction(), Asset_.action));
|
specification = specification.and(buildSpecification(criteria.getAction(), Asset_.action));
|
||||||
@ -98,8 +101,8 @@ public class AssetQueryService extends QueryService<Asset> {
|
|||||||
if (criteria.getAmount() != null) {
|
if (criteria.getAmount() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getAmount(), Asset_.amount));
|
specification = specification.and(buildRangeSpecification(criteria.getAmount(), Asset_.amount));
|
||||||
}
|
}
|
||||||
if (criteria.getComment() != null) {
|
if (criteria.getRemark() != null) {
|
||||||
specification = specification.and(buildStringSpecification(criteria.getComment(), Asset_.comment));
|
specification = specification.and(buildStringSpecification(criteria.getRemark(), Asset_.remark));
|
||||||
}
|
}
|
||||||
if (criteria.getMembershipId() != null) {
|
if (criteria.getMembershipId() != null) {
|
||||||
specification = specification.and(buildSpecification(criteria.getMembershipId(),
|
specification = specification.and(buildSpecification(criteria.getMembershipId(),
|
||||||
|
@ -89,8 +89,8 @@ public class CustomerQueryService extends QueryService<Customer> {
|
|||||||
if (criteria.getId() != null) {
|
if (criteria.getId() != null) {
|
||||||
specification = specification.and(buildSpecification(criteria.getId(), Customer_.id));
|
specification = specification.and(buildSpecification(criteria.getId(), Customer_.id));
|
||||||
}
|
}
|
||||||
if (criteria.getNumber() != null) {
|
if (criteria.getReference() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getNumber(), Customer_.number));
|
specification = specification.and(buildRangeSpecification(criteria.getReference(), Customer_.reference));
|
||||||
}
|
}
|
||||||
if (criteria.getPrefix() != null) {
|
if (criteria.getPrefix() != null) {
|
||||||
specification = specification.and(buildStringSpecification(criteria.getPrefix(), Customer_.prefix));
|
specification = specification.and(buildStringSpecification(criteria.getPrefix(), Customer_.prefix));
|
||||||
@ -110,6 +110,9 @@ public class CustomerQueryService extends QueryService<Customer> {
|
|||||||
if (criteria.getBillingAddress() != null) {
|
if (criteria.getBillingAddress() != null) {
|
||||||
specification = specification.and(buildStringSpecification(criteria.getBillingAddress(), Customer_.billingAddress));
|
specification = specification.and(buildStringSpecification(criteria.getBillingAddress(), Customer_.billingAddress));
|
||||||
}
|
}
|
||||||
|
if (criteria.getRemark() != null) {
|
||||||
|
specification = specification.and(buildStringSpecification(criteria.getRemark(), Customer_.remark));
|
||||||
|
}
|
||||||
if (criteria.getMembershipId() != null) {
|
if (criteria.getMembershipId() != null) {
|
||||||
specification = specification.and(buildSpecification(criteria.getMembershipId(),
|
specification = specification.and(buildSpecification(criteria.getMembershipId(),
|
||||||
root -> root.join(Customer_.memberships, JoinType.LEFT).get(Membership_.id)));
|
root -> root.join(Customer_.memberships, JoinType.LEFT).get(Membership_.id)));
|
||||||
|
@ -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.getFrom() != null) {
|
if (criteria.getDocumentDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getFrom(), Membership_.from));
|
specification = specification.and(buildRangeSpecification(criteria.getDocumentDate(), Membership_.documentDate));
|
||||||
}
|
}
|
||||||
if (criteria.getTo() != null) {
|
if (criteria.getMemberFrom() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getTo(), Membership_.to));
|
specification = specification.and(buildRangeSpecification(criteria.getMemberFrom(), Membership_.memberFrom));
|
||||||
}
|
}
|
||||||
if (criteria.getComment() != null) {
|
if (criteria.getMemberUntil() != null) {
|
||||||
specification = specification.and(buildStringSpecification(criteria.getComment(), Membership_.comment));
|
specification = specification.and(buildRangeSpecification(criteria.getMemberUntil(), Membership_.memberUntil));
|
||||||
|
}
|
||||||
|
if (criteria.getRemark() != null) {
|
||||||
|
specification = specification.and(buildStringSpecification(criteria.getRemark(), Membership_.remark));
|
||||||
}
|
}
|
||||||
if (criteria.getShareId() != null) {
|
if (criteria.getShareId() != null) {
|
||||||
specification = specification.and(buildSpecification(criteria.getShareId(),
|
specification = specification.and(buildSpecification(criteria.getShareId(),
|
||||||
|
@ -98,23 +98,23 @@ 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.getCreated() != null) {
|
if (criteria.getDocumentDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getCreated(), SepaMandate_.created));
|
specification = specification.and(buildRangeSpecification(criteria.getDocumentDate(), SepaMandate_.documentDate));
|
||||||
}
|
}
|
||||||
if (criteria.getValidFrom() != null) {
|
if (criteria.getValidFrom() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getValidFrom(), SepaMandate_.validFrom));
|
specification = specification.and(buildRangeSpecification(criteria.getValidFrom(), SepaMandate_.validFrom));
|
||||||
}
|
}
|
||||||
if (criteria.getValidTo() != null) {
|
if (criteria.getValidUntil() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getValidTo(), SepaMandate_.validTo));
|
specification = specification.and(buildRangeSpecification(criteria.getValidUntil(), SepaMandate_.validUntil));
|
||||||
}
|
}
|
||||||
if (criteria.getLastUsed() != null) {
|
if (criteria.getLastUsed() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getLastUsed(), SepaMandate_.lastUsed));
|
specification = specification.and(buildRangeSpecification(criteria.getLastUsed(), SepaMandate_.lastUsed));
|
||||||
}
|
}
|
||||||
if (criteria.getCancelled() != null) {
|
if (criteria.getCancellationDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getCancelled(), SepaMandate_.cancelled));
|
specification = specification.and(buildRangeSpecification(criteria.getCancellationDate(), SepaMandate_.cancellationDate));
|
||||||
}
|
}
|
||||||
if (criteria.getComment() != null) {
|
if (criteria.getRemark() != null) {
|
||||||
specification = specification.and(buildStringSpecification(criteria.getComment(), SepaMandate_.comment));
|
specification = specification.and(buildStringSpecification(criteria.getRemark(), SepaMandate_.remark));
|
||||||
}
|
}
|
||||||
if (criteria.getCustomerId() != null) {
|
if (criteria.getCustomerId() != null) {
|
||||||
specification = specification.and(buildSpecification(criteria.getCustomerId(),
|
specification = specification.and(buildSpecification(criteria.getCustomerId(),
|
||||||
|
@ -89,8 +89,11 @@ public class ShareQueryService extends QueryService<Share> {
|
|||||||
if (criteria.getId() != null) {
|
if (criteria.getId() != null) {
|
||||||
specification = specification.and(buildSpecification(criteria.getId(), Share_.id));
|
specification = specification.and(buildSpecification(criteria.getId(), Share_.id));
|
||||||
}
|
}
|
||||||
if (criteria.getDate() != null) {
|
if (criteria.getDocumentDate() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getDate(), Share_.date));
|
specification = specification.and(buildRangeSpecification(criteria.getDocumentDate(), Share_.documentDate));
|
||||||
|
}
|
||||||
|
if (criteria.getValueDate() != null) {
|
||||||
|
specification = specification.and(buildRangeSpecification(criteria.getValueDate(), Share_.valueDate));
|
||||||
}
|
}
|
||||||
if (criteria.getAction() != null) {
|
if (criteria.getAction() != null) {
|
||||||
specification = specification.and(buildSpecification(criteria.getAction(), Share_.action));
|
specification = specification.and(buildSpecification(criteria.getAction(), Share_.action));
|
||||||
@ -98,8 +101,8 @@ public class ShareQueryService extends QueryService<Share> {
|
|||||||
if (criteria.getQuantity() != null) {
|
if (criteria.getQuantity() != null) {
|
||||||
specification = specification.and(buildRangeSpecification(criteria.getQuantity(), Share_.quantity));
|
specification = specification.and(buildRangeSpecification(criteria.getQuantity(), Share_.quantity));
|
||||||
}
|
}
|
||||||
if (criteria.getComment() != null) {
|
if (criteria.getRemark() != null) {
|
||||||
specification = specification.and(buildStringSpecification(criteria.getComment(), Share_.comment));
|
specification = specification.and(buildStringSpecification(criteria.getRemark(), Share_.remark));
|
||||||
}
|
}
|
||||||
if (criteria.getMembershipId() != null) {
|
if (criteria.getMembershipId() != null) {
|
||||||
specification = specification.and(buildSpecification(criteria.getMembershipId(),
|
specification = specification.and(buildSpecification(criteria.getMembershipId(),
|
||||||
|
@ -32,13 +32,15 @@ public class AssetCriteria implements Serializable {
|
|||||||
|
|
||||||
private LongFilter id;
|
private LongFilter id;
|
||||||
|
|
||||||
private LocalDateFilter date;
|
private LocalDateFilter documentDate;
|
||||||
|
|
||||||
|
private LocalDateFilter valueDate;
|
||||||
|
|
||||||
private AssetActionFilter action;
|
private AssetActionFilter action;
|
||||||
|
|
||||||
private BigDecimalFilter amount;
|
private BigDecimalFilter amount;
|
||||||
|
|
||||||
private StringFilter comment;
|
private StringFilter remark;
|
||||||
|
|
||||||
private LongFilter membershipId;
|
private LongFilter membershipId;
|
||||||
|
|
||||||
@ -50,12 +52,20 @@ public class AssetCriteria implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getDate() {
|
public LocalDateFilter getDocumentDate() {
|
||||||
return date;
|
return documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDate(LocalDateFilter date) {
|
public void setDocumentDate(LocalDateFilter documentDate) {
|
||||||
this.date = date;
|
this.documentDate = documentDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateFilter getValueDate() {
|
||||||
|
return valueDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValueDate(LocalDateFilter valueDate) {
|
||||||
|
this.valueDate = valueDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AssetActionFilter getAction() {
|
public AssetActionFilter getAction() {
|
||||||
@ -74,12 +84,12 @@ public class AssetCriteria implements Serializable {
|
|||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StringFilter getComment() {
|
public StringFilter getRemark() {
|
||||||
return comment;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComment(StringFilter comment) {
|
public void setRemark(StringFilter remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LongFilter getMembershipId() {
|
public LongFilter getMembershipId() {
|
||||||
@ -102,10 +112,11 @@ public class AssetCriteria implements Serializable {
|
|||||||
final AssetCriteria that = (AssetCriteria) o;
|
final AssetCriteria that = (AssetCriteria) o;
|
||||||
return
|
return
|
||||||
Objects.equals(id, that.id) &&
|
Objects.equals(id, that.id) &&
|
||||||
Objects.equals(date, that.date) &&
|
Objects.equals(documentDate, that.documentDate) &&
|
||||||
|
Objects.equals(valueDate, that.valueDate) &&
|
||||||
Objects.equals(action, that.action) &&
|
Objects.equals(action, that.action) &&
|
||||||
Objects.equals(amount, that.amount) &&
|
Objects.equals(amount, that.amount) &&
|
||||||
Objects.equals(comment, that.comment) &&
|
Objects.equals(remark, that.remark) &&
|
||||||
Objects.equals(membershipId, that.membershipId);
|
Objects.equals(membershipId, that.membershipId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,10 +124,11 @@ public class AssetCriteria implements Serializable {
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(
|
return Objects.hash(
|
||||||
id,
|
id,
|
||||||
date,
|
documentDate,
|
||||||
|
valueDate,
|
||||||
action,
|
action,
|
||||||
amount,
|
amount,
|
||||||
comment,
|
remark,
|
||||||
membershipId
|
membershipId
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -125,10 +137,11 @@ public class AssetCriteria implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "AssetCriteria{" +
|
return "AssetCriteria{" +
|
||||||
(id != null ? "id=" + id + ", " : "") +
|
(id != null ? "id=" + id + ", " : "") +
|
||||||
(date != null ? "date=" + date + ", " : "") +
|
(documentDate != null ? "documentDate=" + documentDate + ", " : "") +
|
||||||
|
(valueDate != null ? "valueDate=" + valueDate + ", " : "") +
|
||||||
(action != null ? "action=" + action + ", " : "") +
|
(action != null ? "action=" + action + ", " : "") +
|
||||||
(amount != null ? "amount=" + amount + ", " : "") +
|
(amount != null ? "amount=" + amount + ", " : "") +
|
||||||
(comment != null ? "comment=" + comment + ", " : "") +
|
(remark != null ? "remark=" + remark + ", " : "") +
|
||||||
(membershipId != null ? "membershipId=" + membershipId + ", " : "") +
|
(membershipId != null ? "membershipId=" + membershipId + ", " : "") +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,10 @@ public class AssetDTO implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private LocalDate date;
|
private LocalDate documentDate;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private LocalDate valueDate;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private AssetAction action;
|
private AssetAction action;
|
||||||
@ -23,12 +26,12 @@ public class AssetDTO implements Serializable {
|
|||||||
private BigDecimal amount;
|
private BigDecimal amount;
|
||||||
|
|
||||||
@Size(max = 160)
|
@Size(max = 160)
|
||||||
private String comment;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
private Long membershipId;
|
private Long membershipId;
|
||||||
|
|
||||||
private String membershipFrom;
|
private String membershipDocumentDate;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -38,12 +41,20 @@ public class AssetDTO implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getDate() {
|
public LocalDate getDocumentDate() {
|
||||||
return date;
|
return documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDate(LocalDate date) {
|
public void setDocumentDate(LocalDate documentDate) {
|
||||||
this.date = date;
|
this.documentDate = documentDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getValueDate() {
|
||||||
|
return valueDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValueDate(LocalDate valueDate) {
|
||||||
|
this.valueDate = valueDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AssetAction getAction() {
|
public AssetAction getAction() {
|
||||||
@ -62,12 +73,12 @@ public class AssetDTO implements Serializable {
|
|||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getComment() {
|
public String getRemark() {
|
||||||
return comment;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComment(String comment) {
|
public void setRemark(String remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getMembershipId() {
|
public Long getMembershipId() {
|
||||||
@ -78,12 +89,12 @@ public class AssetDTO implements Serializable {
|
|||||||
this.membershipId = membershipId;
|
this.membershipId = membershipId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMembershipFrom() {
|
public String getMembershipDocumentDate() {
|
||||||
return membershipFrom;
|
return membershipDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMembershipFrom(String membershipFrom) {
|
public void setMembershipDocumentDate(String membershipDocumentDate) {
|
||||||
this.membershipFrom = membershipFrom;
|
this.membershipDocumentDate = membershipDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -111,12 +122,13 @@ public class AssetDTO implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "AssetDTO{" +
|
return "AssetDTO{" +
|
||||||
"id=" + getId() +
|
"id=" + getId() +
|
||||||
", date='" + getDate() + "'" +
|
", documentDate='" + getDocumentDate() + "'" +
|
||||||
|
", valueDate='" + getValueDate() + "'" +
|
||||||
", action='" + getAction() + "'" +
|
", action='" + getAction() + "'" +
|
||||||
", amount=" + getAmount() +
|
", amount=" + getAmount() +
|
||||||
", comment='" + getComment() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
", membership=" + getMembershipId() +
|
", membership=" + getMembershipId() +
|
||||||
", membership='" + getMembershipFrom() + "'" +
|
", membership='" + getMembershipDocumentDate() + "'" +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,10 @@ package org.hostsharing.hsadminng.service.dto;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import io.github.jhipster.service.filter.BooleanFilter;
|
||||||
|
import io.github.jhipster.service.filter.DoubleFilter;
|
||||||
import io.github.jhipster.service.filter.Filter;
|
import io.github.jhipster.service.filter.Filter;
|
||||||
|
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;
|
||||||
@ -21,7 +24,7 @@ public class CustomerCriteria implements Serializable {
|
|||||||
|
|
||||||
private LongFilter id;
|
private LongFilter id;
|
||||||
|
|
||||||
private IntegerFilter number;
|
private IntegerFilter reference;
|
||||||
|
|
||||||
private StringFilter prefix;
|
private StringFilter prefix;
|
||||||
|
|
||||||
@ -35,6 +38,8 @@ public class CustomerCriteria implements Serializable {
|
|||||||
|
|
||||||
private StringFilter billingAddress;
|
private StringFilter billingAddress;
|
||||||
|
|
||||||
|
private StringFilter remark;
|
||||||
|
|
||||||
private LongFilter membershipId;
|
private LongFilter membershipId;
|
||||||
|
|
||||||
private LongFilter sepamandateId;
|
private LongFilter sepamandateId;
|
||||||
@ -47,12 +52,12 @@ public class CustomerCriteria implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntegerFilter getNumber() {
|
public IntegerFilter getReference() {
|
||||||
return number;
|
return reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumber(IntegerFilter number) {
|
public void setReference(IntegerFilter reference) {
|
||||||
this.number = number;
|
this.reference = reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StringFilter getPrefix() {
|
public StringFilter getPrefix() {
|
||||||
@ -103,6 +108,14 @@ public class CustomerCriteria implements Serializable {
|
|||||||
this.billingAddress = billingAddress;
|
this.billingAddress = billingAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StringFilter getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(StringFilter remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
public LongFilter getMembershipId() {
|
public LongFilter getMembershipId() {
|
||||||
return membershipId;
|
return membershipId;
|
||||||
}
|
}
|
||||||
@ -131,13 +144,14 @@ public class CustomerCriteria implements Serializable {
|
|||||||
final CustomerCriteria that = (CustomerCriteria) o;
|
final CustomerCriteria that = (CustomerCriteria) o;
|
||||||
return
|
return
|
||||||
Objects.equals(id, that.id) &&
|
Objects.equals(id, that.id) &&
|
||||||
Objects.equals(number, that.number) &&
|
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(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) &&
|
||||||
Objects.equals(billingAddress, that.billingAddress) &&
|
Objects.equals(billingAddress, that.billingAddress) &&
|
||||||
|
Objects.equals(remark, that.remark) &&
|
||||||
Objects.equals(membershipId, that.membershipId) &&
|
Objects.equals(membershipId, that.membershipId) &&
|
||||||
Objects.equals(sepamandateId, that.sepamandateId);
|
Objects.equals(sepamandateId, that.sepamandateId);
|
||||||
}
|
}
|
||||||
@ -146,13 +160,14 @@ public class CustomerCriteria implements Serializable {
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(
|
return Objects.hash(
|
||||||
id,
|
id,
|
||||||
number,
|
reference,
|
||||||
prefix,
|
prefix,
|
||||||
name,
|
name,
|
||||||
contractualSalutation,
|
contractualSalutation,
|
||||||
contractualAddress,
|
contractualAddress,
|
||||||
billingSalutation,
|
billingSalutation,
|
||||||
billingAddress,
|
billingAddress,
|
||||||
|
remark,
|
||||||
membershipId,
|
membershipId,
|
||||||
sepamandateId
|
sepamandateId
|
||||||
);
|
);
|
||||||
@ -162,13 +177,14 @@ public class CustomerCriteria implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "CustomerCriteria{" +
|
return "CustomerCriteria{" +
|
||||||
(id != null ? "id=" + id + ", " : "") +
|
(id != null ? "id=" + id + ", " : "") +
|
||||||
(number != null ? "number=" + number + ", " : "") +
|
(reference != null ? "reference=" + reference + ", " : "") +
|
||||||
(prefix != null ? "prefix=" + prefix + ", " : "") +
|
(prefix != null ? "prefix=" + prefix + ", " : "") +
|
||||||
(name != null ? "name=" + name + ", " : "") +
|
(name != null ? "name=" + name + ", " : "") +
|
||||||
(contractualSalutation != null ? "contractualSalutation=" + contractualSalutation + ", " : "") +
|
(contractualSalutation != null ? "contractualSalutation=" + contractualSalutation + ", " : "") +
|
||||||
(contractualAddress != null ? "contractualAddress=" + contractualAddress + ", " : "") +
|
(contractualAddress != null ? "contractualAddress=" + contractualAddress + ", " : "") +
|
||||||
(billingSalutation != null ? "billingSalutation=" + billingSalutation + ", " : "") +
|
(billingSalutation != null ? "billingSalutation=" + billingSalutation + ", " : "") +
|
||||||
(billingAddress != null ? "billingAddress=" + billingAddress + ", " : "") +
|
(billingAddress != null ? "billingAddress=" + billingAddress + ", " : "") +
|
||||||
|
(remark != null ? "remark=" + remark + ", " : "") +
|
||||||
(membershipId != null ? "membershipId=" + membershipId + ", " : "") +
|
(membershipId != null ? "membershipId=" + membershipId + ", " : "") +
|
||||||
(sepamandateId != null ? "sepamandateId=" + sepamandateId + ", " : "") +
|
(sepamandateId != null ? "sepamandateId=" + sepamandateId + ", " : "") +
|
||||||
"}";
|
"}";
|
||||||
|
@ -13,9 +13,10 @@ public class CustomerDTO implements Serializable {
|
|||||||
@NotNull
|
@NotNull
|
||||||
@Min(value = 10000)
|
@Min(value = 10000)
|
||||||
@Max(value = 99999)
|
@Max(value = 99999)
|
||||||
private Integer number;
|
private Integer reference;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@Size(max = 3)
|
||||||
@Pattern(regexp = "[a-z][a-z0-9]+")
|
@Pattern(regexp = "[a-z][a-z0-9]+")
|
||||||
private String prefix;
|
private String prefix;
|
||||||
|
|
||||||
@ -36,6 +37,9 @@ public class CustomerDTO implements Serializable {
|
|||||||
@Size(max = 400)
|
@Size(max = 400)
|
||||||
private String billingAddress;
|
private String billingAddress;
|
||||||
|
|
||||||
|
@Size(max = 160)
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -45,12 +49,12 @@ public class CustomerDTO implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getNumber() {
|
public Integer getReference() {
|
||||||
return number;
|
return reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumber(Integer number) {
|
public void setReference(Integer reference) {
|
||||||
this.number = number;
|
this.reference = reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPrefix() {
|
public String getPrefix() {
|
||||||
@ -101,6 +105,14 @@ public class CustomerDTO implements Serializable {
|
|||||||
this.billingAddress = billingAddress;
|
this.billingAddress = billingAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
@ -126,13 +138,14 @@ public class CustomerDTO implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "CustomerDTO{" +
|
return "CustomerDTO{" +
|
||||||
"id=" + getId() +
|
"id=" + getId() +
|
||||||
", number=" + getNumber() +
|
", reference=" + getReference() +
|
||||||
", prefix='" + getPrefix() + "'" +
|
", prefix='" + getPrefix() + "'" +
|
||||||
", name='" + getName() + "'" +
|
", name='" + getName() + "'" +
|
||||||
", contractualSalutation='" + getContractualSalutation() + "'" +
|
", contractualSalutation='" + getContractualSalutation() + "'" +
|
||||||
", contractualAddress='" + getContractualAddress() + "'" +
|
", contractualAddress='" + getContractualAddress() + "'" +
|
||||||
", billingSalutation='" + getBillingSalutation() + "'" +
|
", billingSalutation='" + getBillingSalutation() + "'" +
|
||||||
", billingAddress='" + getBillingAddress() + "'" +
|
", billingAddress='" + getBillingAddress() + "'" +
|
||||||
|
", remark='" + getRemark() + "'" +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,11 +25,13 @@ public class MembershipCriteria implements Serializable {
|
|||||||
|
|
||||||
private LongFilter id;
|
private LongFilter id;
|
||||||
|
|
||||||
private LocalDateFilter from;
|
private LocalDateFilter documentDate;
|
||||||
|
|
||||||
private LocalDateFilter to;
|
private LocalDateFilter memberFrom;
|
||||||
|
|
||||||
private StringFilter comment;
|
private LocalDateFilter memberUntil;
|
||||||
|
|
||||||
|
private StringFilter remark;
|
||||||
|
|
||||||
private LongFilter shareId;
|
private LongFilter shareId;
|
||||||
|
|
||||||
@ -45,28 +47,36 @@ public class MembershipCriteria implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getFrom() {
|
public LocalDateFilter getDocumentDate() {
|
||||||
return from;
|
return documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFrom(LocalDateFilter from) {
|
public void setDocumentDate(LocalDateFilter documentDate) {
|
||||||
this.from = from;
|
this.documentDate = documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getTo() {
|
public LocalDateFilter getMemberFrom() {
|
||||||
return to;
|
return memberFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTo(LocalDateFilter to) {
|
public void setMemberFrom(LocalDateFilter memberFrom) {
|
||||||
this.to = to;
|
this.memberFrom = memberFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StringFilter getComment() {
|
public LocalDateFilter getMemberUntil() {
|
||||||
return comment;
|
return memberUntil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComment(StringFilter comment) {
|
public void setMemberUntil(LocalDateFilter memberUntil) {
|
||||||
this.comment = comment;
|
this.memberUntil = memberUntil;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StringFilter getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(StringFilter remark) {
|
||||||
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LongFilter getShareId() {
|
public LongFilter getShareId() {
|
||||||
@ -105,9 +115,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(from, that.from) &&
|
Objects.equals(documentDate, that.documentDate) &&
|
||||||
Objects.equals(to, that.to) &&
|
Objects.equals(memberFrom, that.memberFrom) &&
|
||||||
Objects.equals(comment, that.comment) &&
|
Objects.equals(memberUntil, that.memberUntil) &&
|
||||||
|
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) &&
|
||||||
Objects.equals(customerId, that.customerId);
|
Objects.equals(customerId, that.customerId);
|
||||||
@ -117,9 +128,10 @@ public class MembershipCriteria implements Serializable {
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(
|
return Objects.hash(
|
||||||
id,
|
id,
|
||||||
from,
|
documentDate,
|
||||||
to,
|
memberFrom,
|
||||||
comment,
|
memberUntil,
|
||||||
|
remark,
|
||||||
shareId,
|
shareId,
|
||||||
assetId,
|
assetId,
|
||||||
customerId
|
customerId
|
||||||
@ -130,9 +142,10 @@ public class MembershipCriteria implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "MembershipCriteria{" +
|
return "MembershipCriteria{" +
|
||||||
(id != null ? "id=" + id + ", " : "") +
|
(id != null ? "id=" + id + ", " : "") +
|
||||||
(from != null ? "from=" + from + ", " : "") +
|
(documentDate != null ? "documentDate=" + documentDate + ", " : "") +
|
||||||
(to != null ? "to=" + to + ", " : "") +
|
(memberFrom != null ? "memberFrom=" + memberFrom + ", " : "") +
|
||||||
(comment != null ? "comment=" + comment + ", " : "") +
|
(memberUntil != null ? "memberUntil=" + memberUntil + ", " : "") +
|
||||||
|
(remark != null ? "remark=" + remark + ", " : "") +
|
||||||
(shareId != null ? "shareId=" + shareId + ", " : "") +
|
(shareId != null ? "shareId=" + shareId + ", " : "") +
|
||||||
(assetId != null ? "assetId=" + assetId + ", " : "") +
|
(assetId != null ? "assetId=" + assetId + ", " : "") +
|
||||||
(customerId != null ? "customerId=" + customerId + ", " : "") +
|
(customerId != null ? "customerId=" + customerId + ", " : "") +
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
package org.hostsharing.hsadminng.service.dto;
|
package org.hostsharing.hsadminng.service.dto;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
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.
|
||||||
@ -15,14 +12,17 @@ public class MembershipDTO implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private LocalDate from;
|
private LocalDate documentDate;
|
||||||
|
|
||||||
private LocalDate to;
|
|
||||||
|
|
||||||
@Size(max = 160)
|
|
||||||
private String comment;
|
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
private LocalDate memberFrom;
|
||||||
|
|
||||||
|
private LocalDate memberUntil;
|
||||||
|
|
||||||
|
@Size(max = 160)
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
private Long customerId;
|
private Long customerId;
|
||||||
|
|
||||||
private String customerPrefix;
|
private String customerPrefix;
|
||||||
@ -41,28 +41,36 @@ public class MembershipDTO implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getFrom() {
|
public LocalDate getDocumentDate() {
|
||||||
return from;
|
return documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFrom(LocalDate from) {
|
public void setDocumentDate(LocalDate documentDate) {
|
||||||
this.from = from;
|
this.documentDate = documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getTo() {
|
public LocalDate getMemberFrom() {
|
||||||
return to;
|
return memberFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTo(LocalDate to) {
|
public void setMemberFrom(LocalDate memberFrom) {
|
||||||
this.to = to;
|
this.memberFrom = memberFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getComment() {
|
public LocalDate getMemberUntil() {
|
||||||
return comment;
|
return memberUntil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComment(String comment) {
|
public void setMemberUntil(LocalDate memberUntil) {
|
||||||
this.comment = comment;
|
this.memberUntil = memberUntil;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getCustomerId() {
|
public Long getCustomerId() {
|
||||||
@ -106,9 +114,10 @@ public class MembershipDTO implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "MembershipDTO{" +
|
return "MembershipDTO{" +
|
||||||
"id=" + getId() +
|
"id=" + getId() +
|
||||||
", from='" + getFrom() + "'" +
|
", documentDate='" + getDocumentDate() + "'" +
|
||||||
", to='" + getTo() + "'" +
|
", memberFrom='" + getMemberFrom() + "'" +
|
||||||
", comment='" + getComment() + "'" +
|
", memberUntil='" + getMemberUntil() + "'" +
|
||||||
|
", remark='" + getRemark() + "'" +
|
||||||
", customer=" + getCustomerId() +
|
", customer=" + getCustomerId() +
|
||||||
", customer='" + getCustomerPrefix() + "'" +
|
", customer='" + getCustomerPrefix() + "'" +
|
||||||
"}";
|
"}";
|
||||||
|
@ -31,17 +31,17 @@ public class SepaMandateCriteria implements Serializable {
|
|||||||
|
|
||||||
private StringFilter bic;
|
private StringFilter bic;
|
||||||
|
|
||||||
private LocalDateFilter created;
|
private LocalDateFilter documentDate;
|
||||||
|
|
||||||
private LocalDateFilter validFrom;
|
private LocalDateFilter validFrom;
|
||||||
|
|
||||||
private LocalDateFilter validTo;
|
private LocalDateFilter validUntil;
|
||||||
|
|
||||||
private LocalDateFilter lastUsed;
|
private LocalDateFilter lastUsed;
|
||||||
|
|
||||||
private LocalDateFilter cancelled;
|
private LocalDateFilter cancellationDate;
|
||||||
|
|
||||||
private StringFilter comment;
|
private StringFilter remark;
|
||||||
|
|
||||||
private LongFilter customerId;
|
private LongFilter customerId;
|
||||||
|
|
||||||
@ -77,12 +77,12 @@ public class SepaMandateCriteria implements Serializable {
|
|||||||
this.bic = bic;
|
this.bic = bic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getCreated() {
|
public LocalDateFilter getDocumentDate() {
|
||||||
return created;
|
return documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreated(LocalDateFilter created) {
|
public void setDocumentDate(LocalDateFilter documentDate) {
|
||||||
this.created = created;
|
this.documentDate = documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getValidFrom() {
|
public LocalDateFilter getValidFrom() {
|
||||||
@ -93,12 +93,12 @@ public class SepaMandateCriteria implements Serializable {
|
|||||||
this.validFrom = validFrom;
|
this.validFrom = validFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getValidTo() {
|
public LocalDateFilter getValidUntil() {
|
||||||
return validTo;
|
return validUntil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValidTo(LocalDateFilter validTo) {
|
public void setValidUntil(LocalDateFilter validUntil) {
|
||||||
this.validTo = validTo;
|
this.validUntil = validUntil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getLastUsed() {
|
public LocalDateFilter getLastUsed() {
|
||||||
@ -109,20 +109,20 @@ public class SepaMandateCriteria implements Serializable {
|
|||||||
this.lastUsed = lastUsed;
|
this.lastUsed = lastUsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getCancelled() {
|
public LocalDateFilter getCancellationDate() {
|
||||||
return cancelled;
|
return cancellationDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCancelled(LocalDateFilter cancelled) {
|
public void setCancellationDate(LocalDateFilter cancellationDate) {
|
||||||
this.cancelled = cancelled;
|
this.cancellationDate = cancellationDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StringFilter getComment() {
|
public StringFilter getRemark() {
|
||||||
return comment;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComment(StringFilter comment) {
|
public void setRemark(StringFilter remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LongFilter getCustomerId() {
|
public LongFilter getCustomerId() {
|
||||||
@ -148,12 +148,12 @@ 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(created, that.created) &&
|
Objects.equals(documentDate, that.documentDate) &&
|
||||||
Objects.equals(validFrom, that.validFrom) &&
|
Objects.equals(validFrom, that.validFrom) &&
|
||||||
Objects.equals(validTo, that.validTo) &&
|
Objects.equals(validUntil, that.validUntil) &&
|
||||||
Objects.equals(lastUsed, that.lastUsed) &&
|
Objects.equals(lastUsed, that.lastUsed) &&
|
||||||
Objects.equals(cancelled, that.cancelled) &&
|
Objects.equals(cancellationDate, that.cancellationDate) &&
|
||||||
Objects.equals(comment, that.comment) &&
|
Objects.equals(remark, that.remark) &&
|
||||||
Objects.equals(customerId, that.customerId);
|
Objects.equals(customerId, that.customerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,12 +164,12 @@ public class SepaMandateCriteria implements Serializable {
|
|||||||
reference,
|
reference,
|
||||||
iban,
|
iban,
|
||||||
bic,
|
bic,
|
||||||
created,
|
documentDate,
|
||||||
validFrom,
|
validFrom,
|
||||||
validTo,
|
validUntil,
|
||||||
lastUsed,
|
lastUsed,
|
||||||
cancelled,
|
cancellationDate,
|
||||||
comment,
|
remark,
|
||||||
customerId
|
customerId
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -181,12 +181,12 @@ 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 + ", " : "") +
|
||||||
(created != null ? "created=" + created + ", " : "") +
|
(documentDate != null ? "documentDate=" + documentDate + ", " : "") +
|
||||||
(validFrom != null ? "validFrom=" + validFrom + ", " : "") +
|
(validFrom != null ? "validFrom=" + validFrom + ", " : "") +
|
||||||
(validTo != null ? "validTo=" + validTo + ", " : "") +
|
(validUntil != null ? "validUntil=" + validUntil + ", " : "") +
|
||||||
(lastUsed != null ? "lastUsed=" + lastUsed + ", " : "") +
|
(lastUsed != null ? "lastUsed=" + lastUsed + ", " : "") +
|
||||||
(cancelled != null ? "cancelled=" + cancelled + ", " : "") +
|
(cancellationDate != null ? "cancellationDate=" + cancellationDate + ", " : "") +
|
||||||
(comment != null ? "comment=" + comment + ", " : "") +
|
(remark != null ? "remark=" + remark + ", " : "") +
|
||||||
(customerId != null ? "customerId=" + customerId + ", " : "") +
|
(customerId != null ? "customerId=" + customerId + ", " : "") +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
|
@ -22,19 +22,19 @@ public class SepaMandateDTO implements Serializable {
|
|||||||
private String bic;
|
private String bic;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private LocalDate created;
|
private LocalDate documentDate;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private LocalDate validFrom;
|
private LocalDate validFrom;
|
||||||
|
|
||||||
private LocalDate validTo;
|
private LocalDate validUntil;
|
||||||
|
|
||||||
private LocalDate lastUsed;
|
private LocalDate lastUsed;
|
||||||
|
|
||||||
private LocalDate cancelled;
|
private LocalDate cancellationDate;
|
||||||
|
|
||||||
@Size(max = 160)
|
@Size(max = 160)
|
||||||
private String comment;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
private Long customerId;
|
private Long customerId;
|
||||||
@ -73,12 +73,12 @@ public class SepaMandateDTO implements Serializable {
|
|||||||
this.bic = bic;
|
this.bic = bic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getCreated() {
|
public LocalDate getDocumentDate() {
|
||||||
return created;
|
return documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreated(LocalDate created) {
|
public void setDocumentDate(LocalDate documentDate) {
|
||||||
this.created = created;
|
this.documentDate = documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getValidFrom() {
|
public LocalDate getValidFrom() {
|
||||||
@ -89,12 +89,12 @@ public class SepaMandateDTO implements Serializable {
|
|||||||
this.validFrom = validFrom;
|
this.validFrom = validFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getValidTo() {
|
public LocalDate getValidUntil() {
|
||||||
return validTo;
|
return validUntil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setValidTo(LocalDate validTo) {
|
public void setValidUntil(LocalDate validUntil) {
|
||||||
this.validTo = validTo;
|
this.validUntil = validUntil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getLastUsed() {
|
public LocalDate getLastUsed() {
|
||||||
@ -105,20 +105,20 @@ public class SepaMandateDTO implements Serializable {
|
|||||||
this.lastUsed = lastUsed;
|
this.lastUsed = lastUsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getCancelled() {
|
public LocalDate getCancellationDate() {
|
||||||
return cancelled;
|
return cancellationDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCancelled(LocalDate cancelled) {
|
public void setCancellationDate(LocalDate cancellationDate) {
|
||||||
this.cancelled = cancelled;
|
this.cancellationDate = cancellationDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getComment() {
|
public String getRemark() {
|
||||||
return comment;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComment(String comment) {
|
public void setRemark(String remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getCustomerId() {
|
public Long getCustomerId() {
|
||||||
@ -165,12 +165,12 @@ public class SepaMandateDTO implements Serializable {
|
|||||||
", reference='" + getReference() + "'" +
|
", reference='" + getReference() + "'" +
|
||||||
", iban='" + getIban() + "'" +
|
", iban='" + getIban() + "'" +
|
||||||
", bic='" + getBic() + "'" +
|
", bic='" + getBic() + "'" +
|
||||||
", created='" + getCreated() + "'" +
|
", documentDate='" + getDocumentDate() + "'" +
|
||||||
", validFrom='" + getValidFrom() + "'" +
|
", validFrom='" + getValidFrom() + "'" +
|
||||||
", validTo='" + getValidTo() + "'" +
|
", validUntil='" + getValidUntil() + "'" +
|
||||||
", lastUsed='" + getLastUsed() + "'" +
|
", lastUsed='" + getLastUsed() + "'" +
|
||||||
", cancelled='" + getCancelled() + "'" +
|
", cancellationDate='" + getCancellationDate() + "'" +
|
||||||
", comment='" + getComment() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
", customer=" + getCustomerId() +
|
", customer=" + getCustomerId() +
|
||||||
", customer='" + getCustomerPrefix() + "'" +
|
", customer='" + getCustomerPrefix() + "'" +
|
||||||
"}";
|
"}";
|
||||||
|
@ -31,13 +31,15 @@ public class ShareCriteria implements Serializable {
|
|||||||
|
|
||||||
private LongFilter id;
|
private LongFilter id;
|
||||||
|
|
||||||
private LocalDateFilter date;
|
private LocalDateFilter documentDate;
|
||||||
|
|
||||||
|
private LocalDateFilter valueDate;
|
||||||
|
|
||||||
private ShareActionFilter action;
|
private ShareActionFilter action;
|
||||||
|
|
||||||
private IntegerFilter quantity;
|
private IntegerFilter quantity;
|
||||||
|
|
||||||
private StringFilter comment;
|
private StringFilter remark;
|
||||||
|
|
||||||
private LongFilter membershipId;
|
private LongFilter membershipId;
|
||||||
|
|
||||||
@ -49,12 +51,20 @@ public class ShareCriteria implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDateFilter getDate() {
|
public LocalDateFilter getDocumentDate() {
|
||||||
return date;
|
return documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDate(LocalDateFilter date) {
|
public void setDocumentDate(LocalDateFilter documentDate) {
|
||||||
this.date = date;
|
this.documentDate = documentDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateFilter getValueDate() {
|
||||||
|
return valueDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValueDate(LocalDateFilter valueDate) {
|
||||||
|
this.valueDate = valueDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShareActionFilter getAction() {
|
public ShareActionFilter getAction() {
|
||||||
@ -73,12 +83,12 @@ public class ShareCriteria implements Serializable {
|
|||||||
this.quantity = quantity;
|
this.quantity = quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StringFilter getComment() {
|
public StringFilter getRemark() {
|
||||||
return comment;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComment(StringFilter comment) {
|
public void setRemark(StringFilter remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LongFilter getMembershipId() {
|
public LongFilter getMembershipId() {
|
||||||
@ -101,10 +111,11 @@ public class ShareCriteria implements Serializable {
|
|||||||
final ShareCriteria that = (ShareCriteria) o;
|
final ShareCriteria that = (ShareCriteria) o;
|
||||||
return
|
return
|
||||||
Objects.equals(id, that.id) &&
|
Objects.equals(id, that.id) &&
|
||||||
Objects.equals(date, that.date) &&
|
Objects.equals(documentDate, that.documentDate) &&
|
||||||
|
Objects.equals(valueDate, that.valueDate) &&
|
||||||
Objects.equals(action, that.action) &&
|
Objects.equals(action, that.action) &&
|
||||||
Objects.equals(quantity, that.quantity) &&
|
Objects.equals(quantity, that.quantity) &&
|
||||||
Objects.equals(comment, that.comment) &&
|
Objects.equals(remark, that.remark) &&
|
||||||
Objects.equals(membershipId, that.membershipId);
|
Objects.equals(membershipId, that.membershipId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,10 +123,11 @@ public class ShareCriteria implements Serializable {
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(
|
return Objects.hash(
|
||||||
id,
|
id,
|
||||||
date,
|
documentDate,
|
||||||
|
valueDate,
|
||||||
action,
|
action,
|
||||||
quantity,
|
quantity,
|
||||||
comment,
|
remark,
|
||||||
membershipId
|
membershipId
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -124,10 +136,11 @@ public class ShareCriteria implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "ShareCriteria{" +
|
return "ShareCriteria{" +
|
||||||
(id != null ? "id=" + id + ", " : "") +
|
(id != null ? "id=" + id + ", " : "") +
|
||||||
(date != null ? "date=" + date + ", " : "") +
|
(documentDate != null ? "documentDate=" + documentDate + ", " : "") +
|
||||||
|
(valueDate != null ? "valueDate=" + valueDate + ", " : "") +
|
||||||
(action != null ? "action=" + action + ", " : "") +
|
(action != null ? "action=" + action + ", " : "") +
|
||||||
(quantity != null ? "quantity=" + quantity + ", " : "") +
|
(quantity != null ? "quantity=" + quantity + ", " : "") +
|
||||||
(comment != null ? "comment=" + comment + ", " : "") +
|
(remark != null ? "remark=" + remark + ", " : "") +
|
||||||
(membershipId != null ? "membershipId=" + membershipId + ", " : "") +
|
(membershipId != null ? "membershipId=" + membershipId + ", " : "") +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,10 @@ public class ShareDTO implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private LocalDate date;
|
private LocalDate documentDate;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private LocalDate valueDate;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private ShareAction action;
|
private ShareAction action;
|
||||||
@ -22,12 +25,12 @@ public class ShareDTO implements Serializable {
|
|||||||
private Integer quantity;
|
private Integer quantity;
|
||||||
|
|
||||||
@Size(max = 160)
|
@Size(max = 160)
|
||||||
private String comment;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
private Long membershipId;
|
private Long membershipId;
|
||||||
|
|
||||||
private String membershipFrom;
|
private String membershipDocumentDate;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -37,12 +40,20 @@ public class ShareDTO implements Serializable {
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalDate getDate() {
|
public LocalDate getDocumentDate() {
|
||||||
return date;
|
return documentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDate(LocalDate date) {
|
public void setDocumentDate(LocalDate documentDate) {
|
||||||
this.date = date;
|
this.documentDate = documentDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDate getValueDate() {
|
||||||
|
return valueDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValueDate(LocalDate valueDate) {
|
||||||
|
this.valueDate = valueDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShareAction getAction() {
|
public ShareAction getAction() {
|
||||||
@ -61,12 +72,12 @@ public class ShareDTO implements Serializable {
|
|||||||
this.quantity = quantity;
|
this.quantity = quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getComment() {
|
public String getRemark() {
|
||||||
return comment;
|
return remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComment(String comment) {
|
public void setRemark(String remark) {
|
||||||
this.comment = comment;
|
this.remark = remark;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getMembershipId() {
|
public Long getMembershipId() {
|
||||||
@ -77,12 +88,12 @@ public class ShareDTO implements Serializable {
|
|||||||
this.membershipId = membershipId;
|
this.membershipId = membershipId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMembershipFrom() {
|
public String getMembershipDocumentDate() {
|
||||||
return membershipFrom;
|
return membershipDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMembershipFrom(String membershipFrom) {
|
public void setMembershipDocumentDate(String membershipDocumentDate) {
|
||||||
this.membershipFrom = membershipFrom;
|
this.membershipDocumentDate = membershipDocumentDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -110,12 +121,13 @@ public class ShareDTO implements Serializable {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return "ShareDTO{" +
|
return "ShareDTO{" +
|
||||||
"id=" + getId() +
|
"id=" + getId() +
|
||||||
", date='" + getDate() + "'" +
|
", documentDate='" + getDocumentDate() + "'" +
|
||||||
|
", valueDate='" + getValueDate() + "'" +
|
||||||
", action='" + getAction() + "'" +
|
", action='" + getAction() + "'" +
|
||||||
", quantity=" + getQuantity() +
|
", quantity=" + getQuantity() +
|
||||||
", comment='" + getComment() + "'" +
|
", remark='" + getRemark() + "'" +
|
||||||
", membership=" + getMembershipId() +
|
", membership=" + getMembershipId() +
|
||||||
", membership='" + getMembershipFrom() + "'" +
|
", membership='" + getMembershipDocumentDate() + "'" +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.from", target = "membershipFrom")
|
@Mapping(source = "membership.documentDate", target = "membershipDocumentDate")
|
||||||
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.from", target = "membershipFrom")
|
@Mapping(source = "membership.documentDate", target = "membershipDocumentDate")
|
||||||
ShareDTO toDto(Share share);
|
ShareDTO toDto(Share share);
|
||||||
|
|
||||||
@Mapping(source = "membershipId", target = "membership")
|
@Mapping(source = "membershipId", target = "membership")
|
||||||
|
@ -4,19 +4,21 @@ service all with serviceClass
|
|||||||
paginate all with infinite-scroll
|
paginate all with infinite-scroll
|
||||||
|
|
||||||
entity Customer {
|
entity Customer {
|
||||||
number Integer required unique min(10000) max(99999),
|
reference Integer required unique min(10000) max(99999),
|
||||||
prefix String required 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),
|
||||||
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),
|
||||||
billingAddress String maxlength(400)
|
billingAddress String maxlength(400),
|
||||||
|
remark String maxlength(160)
|
||||||
}
|
}
|
||||||
|
|
||||||
entity Membership {
|
entity Membership {
|
||||||
from LocalDate required,
|
documentDate LocalDate required,
|
||||||
to LocalDate,
|
memberFrom LocalDate required,
|
||||||
comment String maxlength(160)
|
memberUntil LocalDate,
|
||||||
|
remark String maxlength(160)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ShareAction {
|
enum ShareAction {
|
||||||
@ -25,10 +27,11 @@ enum ShareAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
entity Share {
|
entity Share {
|
||||||
date LocalDate required,
|
documentDate LocalDate required,
|
||||||
|
valueDate LocalDate required,
|
||||||
action ShareAction required,
|
action ShareAction required,
|
||||||
quantity Integer required,
|
quantity Integer required,
|
||||||
comment String maxlength(160)
|
remark String maxlength(160)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum AssetAction {
|
enum AssetAction {
|
||||||
@ -41,27 +44,28 @@ enum AssetAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
entity Asset {
|
entity Asset {
|
||||||
date LocalDate required,
|
documentDate LocalDate required,
|
||||||
|
valueDate LocalDate required,
|
||||||
action AssetAction required,
|
action AssetAction required,
|
||||||
amount BigDecimal required,
|
amount BigDecimal required,
|
||||||
comment String maxlength(160)
|
remark String maxlength(160)
|
||||||
}
|
}
|
||||||
|
|
||||||
entity SepaMandate {
|
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),
|
||||||
created LocalDate required,
|
documentDate LocalDate required,
|
||||||
validFrom LocalDate required,
|
validFrom LocalDate required,
|
||||||
validTo LocalDate,
|
validUntil LocalDate,
|
||||||
lastUsed LocalDate,
|
lastUsed LocalDate,
|
||||||
cancelled LocalDate,
|
cancellationDate LocalDate,
|
||||||
comment 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(from) required},
|
Membership{share} to Share{membership(documentDate) required},
|
||||||
Membership{asset} to Asset{membership(from) required}
|
Membership{asset} to Asset{membership(documentDate) required}
|
||||||
}
|
}
|
||||||
|
@ -16,16 +16,16 @@
|
|||||||
<!--
|
<!--
|
||||||
Added the entity Customer.
|
Added the entity Customer.
|
||||||
-->
|
-->
|
||||||
<changeSet id="20190418073043-1" author="jhipster">
|
<changeSet id="20190403083735-1" author="jhipster">
|
||||||
<createTable tableName="customer">
|
<createTable tableName="customer">
|
||||||
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
||||||
<constraints primaryKey="true" nullable="false"/>
|
<constraints primaryKey="true" nullable="false"/>
|
||||||
</column>
|
</column>
|
||||||
<column name="jhi_number" type="integer">
|
<column name="reference" type="integer">
|
||||||
<constraints nullable="false" unique="true" uniqueConstraintName="ux_customer_jhi_number" />
|
<constraints nullable="false" unique="true" uniqueConstraintName="ux_customer_reference" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
<column name="prefix" type="varchar(255)">
|
<column name="prefix" type="varchar(3)">
|
||||||
<constraints nullable="false" unique="true" uniqueConstraintName="ux_customer_prefix" />
|
<constraints nullable="false" unique="true" uniqueConstraintName="ux_customer_prefix" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
@ -49,6 +49,10 @@
|
|||||||
<constraints nullable="true" />
|
<constraints nullable="true" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
|
<column name="remark" type="varchar(160)">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
<!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
|
<!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
|
||||||
</createTable>
|
</createTable>
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<databaseChangeLog
|
<databaseChangeLog
|
||||||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
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"
|
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">
|
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="now()" dbms="h2"/>
|
||||||
|
|
||||||
@ -14,20 +16,24 @@
|
|||||||
<!--
|
<!--
|
||||||
Added the entity Membership.
|
Added the entity Membership.
|
||||||
-->
|
-->
|
||||||
<changeSet id="20190418073044-1" author="jhipster">
|
<changeSet id="20190403083738-1" author="jhipster">
|
||||||
<createTable tableName="membership">
|
<createTable tableName="membership">
|
||||||
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
||||||
<constraints primaryKey="true" nullable="false"/>
|
<constraints primaryKey="true" nullable="false"/>
|
||||||
</column>
|
</column>
|
||||||
<column name="jhi_from" type="date">
|
<column name="document_date" type="date">
|
||||||
<constraints nullable="false" />
|
<constraints nullable="false" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
<column name="jhi_to" type="date">
|
<column name="member_from" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="member_until" type="date">
|
||||||
<constraints nullable="true" />
|
<constraints nullable="true" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
<column name="jhi_comment" type="varchar(160)">
|
<column name="remark" type="varchar(160)">
|
||||||
<constraints nullable="true" />
|
<constraints nullable="true" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
@ -39,6 +45,5 @@
|
|||||||
</createTable>
|
</createTable>
|
||||||
|
|
||||||
</changeSet>
|
</changeSet>
|
||||||
|
|
||||||
<!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
|
<!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
|
@ -21,7 +21,11 @@
|
|||||||
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
||||||
<constraints primaryKey="true" nullable="false"/>
|
<constraints primaryKey="true" nullable="false"/>
|
||||||
</column>
|
</column>
|
||||||
<column name="jhi_date" type="date">
|
<column name="document_date" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="value_date" type="date">
|
||||||
<constraints nullable="false" />
|
<constraints nullable="false" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
@ -33,7 +37,7 @@
|
|||||||
<constraints nullable="false" />
|
<constraints nullable="false" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
<column name="jhi_comment" type="varchar(160)">
|
<column name="remark" type="varchar(160)">
|
||||||
<constraints nullable="true" />
|
<constraints nullable="true" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
|
@ -21,7 +21,11 @@
|
|||||||
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
<column name="id" type="bigint" autoIncrement="${autoIncrement}">
|
||||||
<constraints primaryKey="true" nullable="false"/>
|
<constraints primaryKey="true" nullable="false"/>
|
||||||
</column>
|
</column>
|
||||||
<column name="jhi_date" type="date">
|
<column name="document_date" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="value_date" type="date">
|
||||||
<constraints nullable="false" />
|
<constraints nullable="false" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
@ -33,7 +37,7 @@
|
|||||||
<constraints nullable="false" />
|
<constraints nullable="false" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
<column name="jhi_comment" type="varchar(160)">
|
<column name="remark" type="varchar(160)">
|
||||||
<constraints nullable="true" />
|
<constraints nullable="true" />
|
||||||
</column>
|
</column>
|
||||||
|
|
||||||
|
@ -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="20190418100951-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="document_date" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="valid_from" type="date">
|
||||||
|
<constraints nullable="false" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="valid_until" type="date">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="last_used" type="date">
|
||||||
|
<constraints nullable="true" />
|
||||||
|
</column>
|
||||||
|
|
||||||
|
<column name="cancellation_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="20190418100951-2" author="jhipster">
|
||||||
|
|
||||||
|
<addForeignKeyConstraint baseColumnNames="customer_id"
|
||||||
|
baseTableName="sepa_mandate"
|
||||||
|
constraintName="fk_sepa_mandate_customer_id"
|
||||||
|
referencedColumnNames="id"
|
||||||
|
referencedTableName="customer"/>
|
||||||
|
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
@ -5,16 +5,19 @@
|
|||||||
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/20190418073043_added_entity_Customer.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190403083735_added_entity_Customer.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418073044_added_entity_Membership.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190403083736_added_entity_Contact.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418073045_added_entity_Share.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190403083737_added_entity_CustomerContact.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418073046_added_entity_Asset.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190403083738_added_entity_Membership.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418073047_added_entity_SepaMandate.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190403083739_added_entity_Share.xml" relativeToChangelogFile="false"/>
|
||||||
|
<include file="config/liquibase/changelog/20190403083740_added_entity_Asset.xml" relativeToChangelogFile="false"/>
|
||||||
|
<include file="config/liquibase/changelog/20190418100951_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/20190418073044_added_entity_constraints_Membership.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190403083737_added_entity_constraints_CustomerContact.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418073045_added_entity_constraints_Share.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190403083738_added_entity_constraints_Membership.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418073046_added_entity_constraints_Asset.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190403083739_added_entity_constraints_Share.xml" relativeToChangelogFile="false"/>
|
||||||
<include file="config/liquibase/changelog/20190418073047_added_entity_constraints_SepaMandate.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/20190403083740_added_entity_constraints_Asset.xml" relativeToChangelogFile="false"/>
|
||||||
|
<include file="config/liquibase/changelog/20190418100951_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 -->
|
||||||
|
|
||||||
<include file="config/liquibase/changelog/sample-data-Customer.xml" relativeToChangelogFile="false"/>
|
<include file="config/liquibase/changelog/sample-data-Customer.xml" relativeToChangelogFile="false"/>
|
||||||
|
@ -5,9 +5,13 @@
|
|||||||
<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.asset.date">Date</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.asset.documentDate">Document Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{asset.date}}</span>
|
<span>{{asset.documentDate}}</span>
|
||||||
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.asset.valueDate">Value Date</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span>{{asset.valueDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.asset.action">Action</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.asset.action">Action</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@ -17,14 +21,14 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<span>{{asset.amount}}</span>
|
<span>{{asset.amount}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.asset.comment">Comment</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.asset.remark">Remark</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{asset.comment}}</span>
|
<span>{{asset.remark}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<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.membershipFrom}}</a>
|
<a [routerLink]="['/membership', asset.membershipId, 'view']">{{asset.membershipDocumentDate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -10,17 +10,33 @@
|
|||||||
[(ngModel)]="asset.id" readonly />
|
[(ngModel)]="asset.id" readonly />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.asset.date" for="field_date">Date</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.asset.documentDate" for="field_documentDate">Document Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_date" type="text" class="form-control" name="date" ngbDatepicker #dateDp="ngbDatepicker" [(ngModel)]="asset.date"
|
<input id="field_documentDate" type="text" class="form-control" name="documentDate" ngbDatepicker #documentDateDp="ngbDatepicker" [(ngModel)]="asset.documentDate"
|
||||||
required/>
|
required/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="dateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="documentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="!(editForm.controls.date?.dirty && editForm.controls.date?.invalid)">
|
<div [hidden]="!(editForm.controls.documentDate?.dirty && editForm.controls.documentDate?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.date?.errors?.required" jhiTranslate="entity.validation.required">
|
[hidden]="!editForm.controls.documentDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
|
This field is required.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.asset.valueDate" for="field_valueDate">Value Date</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="field_valueDate" type="text" class="form-control" name="valueDate" ngbDatepicker #valueDateDp="ngbDatepicker" [(ngModel)]="asset.valueDate"
|
||||||
|
required/>
|
||||||
|
<span class="input-group-append">
|
||||||
|
<button type="button" class="btn btn-secondary" (click)="valueDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div [hidden]="!(editForm.controls.valueDate?.dirty && editForm.controls.valueDate?.invalid)">
|
||||||
|
<small class="form-text text-danger"
|
||||||
|
[hidden]="!editForm.controls.valueDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
This field is required.
|
This field is required.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
@ -58,12 +74,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.asset.comment" for="field_comment">Comment</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.asset.remark" for="field_remark">Remark</label>
|
||||||
<input type="text" class="form-control" name="comment" id="field_comment"
|
<input type="text" class="form-control" name="remark" id="field_remark"
|
||||||
[(ngModel)]="asset.comment" maxlength="160"/>
|
[(ngModel)]="asset.remark" maxlength="160"/>
|
||||||
<div [hidden]="!(editForm.controls.comment?.dirty && editForm.controls.comment?.invalid)">
|
<div [hidden]="!(editForm.controls.remark?.dirty && editForm.controls.remark?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.comment?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
|
[hidden]="!editForm.controls.remark?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
|
||||||
This field cannot be longer than 160 characters.
|
This field cannot be longer than 160 characters.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
@ -73,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.from}}</option>
|
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.documentDate}}</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)">
|
||||||
|
@ -19,7 +19,8 @@ export class AssetUpdateComponent implements OnInit {
|
|||||||
isSaving: boolean;
|
isSaving: boolean;
|
||||||
|
|
||||||
memberships: IMembership[];
|
memberships: IMembership[];
|
||||||
dateDp: any;
|
documentDateDp: any;
|
||||||
|
valueDateDp: any;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected jhiAlertService: JhiAlertService,
|
protected jhiAlertService: JhiAlertService,
|
||||||
|
@ -15,24 +15,26 @@
|
|||||||
<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="date"><span jhiTranslate="hsadminNgApp.asset.date">Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="documentDate"><span jhiTranslate="hsadminNgApp.asset.documentDate">Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
|
<th jhiSortBy="valueDate"><span jhiTranslate="hsadminNgApp.asset.valueDate">Value Date</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="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="comment"><span jhiTranslate="hsadminNgApp.asset.comment">Comment</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="membershipFrom"><span jhiTranslate="hsadminNgApp.asset.membership">Membership</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></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<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 asset of assets ;trackBy: trackId">
|
<tr *ngFor="let asset of assets ;trackBy: trackId">
|
||||||
<td><a [routerLink]="['/asset', asset.id, 'view' ]">{{asset.id}}</a></td>
|
<td><a [routerLink]="['/asset', asset.id, 'view' ]">{{asset.id}}</a></td>
|
||||||
<td>{{asset.date | date:'mediumDate'}}</td>
|
<td>{{asset.documentDate | date:'mediumDate'}}</td>
|
||||||
|
<td>{{asset.valueDate | date:'mediumDate'}}</td>
|
||||||
<td jhiTranslate="{{'hsadminNgApp.AssetAction.' + asset.action}}">{{asset.action}}</td>
|
<td jhiTranslate="{{'hsadminNgApp.AssetAction.' + asset.action}}">{{asset.action}}</td>
|
||||||
<td>{{asset.amount}}</td>
|
<td>{{asset.amount}}</td>
|
||||||
<td>{{asset.comment}}</td>
|
<td>{{asset.remark}}</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="asset.membershipId">
|
<div *ngIf="asset.membershipId">
|
||||||
<a [routerLink]="['../membership', asset.membershipId , 'view' ]" >{{asset.membershipFrom}}</a>
|
<a [routerLink]="['../membership', asset.membershipId , 'view' ]" >{{asset.membershipDocumentDate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
|
@ -51,14 +51,16 @@ export class AssetService {
|
|||||||
|
|
||||||
protected convertDateFromClient(asset: IAsset): IAsset {
|
protected convertDateFromClient(asset: IAsset): IAsset {
|
||||||
const copy: IAsset = Object.assign({}, asset, {
|
const copy: IAsset = Object.assign({}, asset, {
|
||||||
date: asset.date != null && asset.date.isValid() ? asset.date.format(DATE_FORMAT) : null
|
documentDate: asset.documentDate != null && asset.documentDate.isValid() ? asset.documentDate.format(DATE_FORMAT) : null,
|
||||||
|
valueDate: asset.valueDate != null && asset.valueDate.isValid() ? asset.valueDate.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.date = res.body.date != null ? moment(res.body.date) : null;
|
res.body.documentDate = res.body.documentDate != null ? moment(res.body.documentDate) : null;
|
||||||
|
res.body.valueDate = res.body.valueDate != null ? moment(res.body.valueDate) : null;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -66,7 +68,8 @@ export class AssetService {
|
|||||||
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
|
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
|
||||||
if (res.body) {
|
if (res.body) {
|
||||||
res.body.forEach((asset: IAsset) => {
|
res.body.forEach((asset: IAsset) => {
|
||||||
asset.date = asset.date != null ? moment(asset.date) : null;
|
asset.documentDate = asset.documentDate != null ? moment(asset.documentDate) : null;
|
||||||
|
asset.valueDate = asset.valueDate != null ? moment(asset.valueDate) : null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
<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.customer.number">Number</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.customer.reference">Reference</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{customer.number}}</span>
|
<span>{{customer.reference}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.customer.prefix">Prefix</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.customer.prefix">Prefix</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@ -33,6 +33,10 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<span>{{customer.billingAddress}}</span>
|
<span>{{customer.billingAddress}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.customer.remark">Remark</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span>{{customer.remark}}</span>
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
|
@ -10,24 +10,24 @@
|
|||||||
[(ngModel)]="customer.id" readonly />
|
[(ngModel)]="customer.id" readonly />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.number" for="field_number">Number</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.reference" for="field_reference">Reference</label>
|
||||||
<input type="number" class="form-control" name="number" id="field_number"
|
<input type="number" class="form-control" name="reference" id="field_reference"
|
||||||
[(ngModel)]="customer.number" required min="10000" jhiMin="10000" max="99999" jhiMax="99999"/>
|
[(ngModel)]="customer.reference" required min="10000" jhiMin="10000" max="99999" jhiMax="99999"/>
|
||||||
<div [hidden]="!(editForm.controls.number?.dirty && editForm.controls.number?.invalid)">
|
<div [hidden]="!(editForm.controls.reference?.dirty && editForm.controls.reference?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.number?.errors?.required" jhiTranslate="entity.validation.required">
|
[hidden]="!editForm.controls.reference?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
This field is required.
|
This field is required.
|
||||||
</small>
|
</small>
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.number?.errors?.min" jhiTranslate="entity.validation.min" [translateValues]="{ min: 10000 }">
|
[hidden]="!editForm.controls.reference?.errors?.min" jhiTranslate="entity.validation.min" [translateValues]="{ min: 10000 }">
|
||||||
This field should be at least 10000.
|
This field should be at least 10000.
|
||||||
</small>
|
</small>
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.number?.errors?.max" jhiTranslate="entity.validation.max" [translateValues]="{ max: 99999 }">
|
[hidden]="!editForm.controls.reference?.errors?.max" jhiTranslate="entity.validation.max" [translateValues]="{ max: 99999 }">
|
||||||
This field cannot be more than 99999.
|
This field cannot be more than 99999.
|
||||||
</small>
|
</small>
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.number?.errors?.number" jhiTranslate="entity.validation.number">
|
[hidden]="!editForm.controls.reference?.errors?.number" jhiTranslate="entity.validation.number">
|
||||||
This field should be a number.
|
This field should be a number.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
@ -35,12 +35,16 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.prefix" for="field_prefix">Prefix</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.prefix" for="field_prefix">Prefix</label>
|
||||||
<input type="text" class="form-control" name="prefix" id="field_prefix"
|
<input type="text" class="form-control" name="prefix" id="field_prefix"
|
||||||
[(ngModel)]="customer.prefix" required pattern="[a-z][a-z0-9]+"/>
|
[(ngModel)]="customer.prefix" required maxlength="3" pattern="[a-z][a-z0-9]+"/>
|
||||||
<div [hidden]="!(editForm.controls.prefix?.dirty && editForm.controls.prefix?.invalid)">
|
<div [hidden]="!(editForm.controls.prefix?.dirty && editForm.controls.prefix?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.prefix?.errors?.required" jhiTranslate="entity.validation.required">
|
[hidden]="!editForm.controls.prefix?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
This field is required.
|
This field is required.
|
||||||
</small>
|
</small>
|
||||||
|
<small class="form-text text-danger"
|
||||||
|
[hidden]="!editForm.controls.prefix?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 3 }">
|
||||||
|
This field cannot be longer than 3 characters.
|
||||||
|
</small>
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.prefix?.errors?.pattern" jhiTranslate="entity.validation.pattern" [translateValues]="{ pattern: 'Prefix' }">
|
[hidden]="!editForm.controls.prefix?.errors?.pattern" jhiTranslate="entity.validation.pattern" [translateValues]="{ pattern: 'Prefix' }">
|
||||||
This field should follow pattern for "Prefix".
|
This field should follow pattern for "Prefix".
|
||||||
@ -48,20 +52,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.name"
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.name" for="field_name">Name</label>
|
||||||
for="field_name">Name</label>
|
|
||||||
<input type="text" class="form-control" name="name" id="field_name"
|
<input type="text" class="form-control" name="name" id="field_name"
|
||||||
[(ngModel)]="customer.name" required maxlength="80"/>
|
[(ngModel)]="customer.name" required maxlength="80"/>
|
||||||
<div [hidden]="!(editForm.controls.name?.dirty && editForm.controls.name?.invalid)">
|
<div [hidden]="!(editForm.controls.name?.dirty && editForm.controls.name?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.name?.errors?.required"
|
[hidden]="!editForm.controls.name?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
jhiTranslate="entity.validation.required">
|
This field is required.
|
||||||
This field is required.
|
|
||||||
</small>
|
</small>
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.name?.errors?.maxlength"
|
[hidden]="!editForm.controls.name?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
|
||||||
jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
|
This field cannot be longer than 80 characters.
|
||||||
This field cannot be longer than 80 characters.
|
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -82,14 +83,12 @@
|
|||||||
[(ngModel)]="customer.contractualAddress" required maxlength="400"/>
|
[(ngModel)]="customer.contractualAddress" required maxlength="400"/>
|
||||||
<div [hidden]="!(editForm.controls.contractualAddress?.dirty && editForm.controls.contractualAddress?.invalid)">
|
<div [hidden]="!(editForm.controls.contractualAddress?.dirty && editForm.controls.contractualAddress?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.contractualAddress?.errors?.required"
|
[hidden]="!editForm.controls.contractualAddress?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
jhiTranslate="entity.validation.required">
|
This field is required.
|
||||||
This field is required.
|
|
||||||
</small>
|
</small>
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.contractualAddress?.errors?.maxlength"
|
[hidden]="!editForm.controls.contractualAddress?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
|
||||||
jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
|
This field cannot be longer than 400 characters.
|
||||||
This field cannot be longer than 400 characters.
|
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -110,9 +109,19 @@
|
|||||||
[(ngModel)]="customer.billingAddress" maxlength="400"/>
|
[(ngModel)]="customer.billingAddress" maxlength="400"/>
|
||||||
<div [hidden]="!(editForm.controls.billingAddress?.dirty && editForm.controls.billingAddress?.invalid)">
|
<div [hidden]="!(editForm.controls.billingAddress?.dirty && editForm.controls.billingAddress?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.billingAddress?.errors?.maxlength"
|
[hidden]="!editForm.controls.billingAddress?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
|
||||||
jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
|
This field cannot be longer than 400 characters.
|
||||||
This field cannot be longer than 400 characters.
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.remark" for="field_remark">Remark</label>
|
||||||
|
<input type="text" class="form-control" name="remark" id="field_remark"
|
||||||
|
[(ngModel)]="customer.remark" maxlength="160"/>
|
||||||
|
<div [hidden]="!(editForm.controls.remark?.dirty && editForm.controls.remark?.invalid)">
|
||||||
|
<small class="form-text text-danger"
|
||||||
|
[hidden]="!editForm.controls.remark?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
|
||||||
|
This field cannot be longer than 160 characters.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,26 +15,28 @@
|
|||||||
<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="number"><span jhiTranslate="hsadminNgApp.customer.number">Number</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="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>
|
||||||
<th jhiSortBy="billingAddress"><span jhiTranslate="hsadminNgApp.customer.billingAddress">Billing Address</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="billingAddress"><span jhiTranslate="hsadminNgApp.customer.billingAddress">Billing Address</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
|
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.customer.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<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 customer of customers ;trackBy: trackId">
|
<tr *ngFor="let customer of customers ;trackBy: trackId">
|
||||||
<td><a [routerLink]="['/customer', customer.id, 'view' ]">{{customer.id}}</a></td>
|
<td><a [routerLink]="['/customer', customer.id, 'view' ]">{{customer.id}}</a></td>
|
||||||
<td>{{customer.number}}</td>
|
<td>{{customer.reference}}</td>
|
||||||
<td>{{customer.prefix}}</td>
|
<td>{{customer.prefix}}</td>
|
||||||
<td>{{customer.name}}</td>
|
<td>{{customer.name}}</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>
|
||||||
<td>{{customer.billingAddress}}</td>
|
<td>{{customer.billingAddress}}</td>
|
||||||
|
<td>{{customer.remark}}</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<div class="btn-group flex-btn-group-container">
|
<div class="btn-group flex-btn-group-container">
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
|
@ -4,6 +4,46 @@ import { RouterModule } from '@angular/router';
|
|||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
RouterModule.forChild([
|
RouterModule.forChild([
|
||||||
|
{
|
||||||
|
path: 'customer',
|
||||||
|
loadChildren: './customer/customer.module#HsadminNgCustomerModule'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'contact',
|
||||||
|
loadChildren: './contact/contact.module#HsadminNgContactModule'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'customer-contact',
|
||||||
|
loadChildren: './customer-contact/customer-contact.module#HsadminNgCustomerContactModule'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'membership',
|
||||||
|
loadChildren: './membership/membership.module#HsadminNgMembershipModule'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'share',
|
||||||
|
loadChildren: './share/share.module#HsadminNgShareModule'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'asset',
|
||||||
|
loadChildren: './asset/asset.module#HsadminNgAssetModule'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'customer',
|
||||||
|
loadChildren: './customer/customer.module#HsadminNgCustomerModule'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'membership',
|
||||||
|
loadChildren: './membership/membership.module#HsadminNgMembershipModule'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'share',
|
||||||
|
loadChildren: './share/share.module#HsadminNgShareModule'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'asset',
|
||||||
|
loadChildren: './asset/asset.module#HsadminNgAssetModule'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'customer',
|
path: 'customer',
|
||||||
loadChildren: './customer/customer.module#HsadminNgCustomerModule'
|
loadChildren: './customer/customer.module#HsadminNgCustomerModule'
|
||||||
|
@ -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.from">From</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.membership.documentDate">Document Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{membership.from}}</span>
|
<span>{{membership.documentDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.membership.to">To</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.membership.memberFrom">Member From</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{membership.to}}</span>
|
<span>{{membership.memberFrom}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.membership.comment">Comment</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.membership.memberUntil">Member Until</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{membership.comment}}</span>
|
<span>{{membership.memberUntil}}</span>
|
||||||
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.membership.remark">Remark</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span>{{membership.remark}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.membership.customer">Customer</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.membership.customer">Customer</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
@ -10,38 +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.from" for="field_from">From</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.documentDate" for="field_documentDate">Document Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_from" type="text" class="form-control" name="from" ngbDatepicker #fromDp="ngbDatepicker" [(ngModel)]="membership.from"
|
<input id="field_documentDate" type="text" class="form-control" name="documentDate" ngbDatepicker #documentDateDp="ngbDatepicker" [(ngModel)]="membership.documentDate"
|
||||||
required/>
|
required/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="fromDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="documentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="!(editForm.controls.from?.dirty && editForm.controls.from?.invalid)">
|
<div [hidden]="!(editForm.controls.documentDate?.dirty && editForm.controls.documentDate?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.from?.errors?.required" jhiTranslate="entity.validation.required">
|
[hidden]="!editForm.controls.documentDate?.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.to" for="field_to">To</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.memberFrom" for="field_memberFrom">Member From</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_to" type="text" class="form-control" name="to" ngbDatepicker #toDp="ngbDatepicker" [(ngModel)]="membership.to"
|
<input id="field_memberFrom" type="text" class="form-control" name="memberFrom" ngbDatepicker #memberFromDp="ngbDatepicker" [(ngModel)]="membership.memberFrom"
|
||||||
|
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)="toDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="memberUntilDp.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.membership.comment" for="field_comment">Comment</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.remark" for="field_remark">Remark</label>
|
||||||
<input type="text" class="form-control" name="comment" id="field_comment"
|
<input type="text" class="form-control" name="remark" id="field_remark"
|
||||||
[(ngModel)]="membership.comment" maxlength="160"/>
|
[(ngModel)]="membership.remark" maxlength="160"/>
|
||||||
<div [hidden]="!(editForm.controls.comment?.dirty && editForm.controls.comment?.invalid)">
|
<div [hidden]="!(editForm.controls.remark?.dirty && editForm.controls.remark?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.comment?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
|
[hidden]="!editForm.controls.remark?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
|
||||||
This field cannot be longer than 160 characters.
|
This field cannot be longer than 160 characters.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,8 +19,9 @@ export class MembershipUpdateComponent implements OnInit {
|
|||||||
isSaving: boolean;
|
isSaving: boolean;
|
||||||
|
|
||||||
customers: ICustomer[];
|
customers: ICustomer[];
|
||||||
fromDp: any;
|
documentDateDp: any;
|
||||||
toDp: any;
|
memberFromDp: any;
|
||||||
|
memberUntilDp: 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="from"><span jhiTranslate="hsadminNgApp.membership.from">From</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="to"><span jhiTranslate="hsadminNgApp.membership.to">To</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="comment"><span jhiTranslate="hsadminNgApp.membership.comment">Comment</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="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>
|
||||||
</tr>
|
</tr>
|
||||||
@ -25,9 +26,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.from | date:'mediumDate'}}</td>
|
<td>{{membership.documentDate | date:'mediumDate'}}</td>
|
||||||
<td>{{membership.to | date:'mediumDate'}}</td>
|
<td>{{membership.memberFrom | date:'mediumDate'}}</td>
|
||||||
<td>{{membership.comment}}</td>
|
<td>{{membership.memberUntil | date:'mediumDate'}}</td>
|
||||||
|
<td>{{membership.remark}}</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="membership.customerId">
|
<div *ngIf="membership.customerId">
|
||||||
<a [routerLink]="['../customer', membership.customerId , 'view' ]" >{{membership.customerPrefix}}</a>
|
<a [routerLink]="['../customer', membership.customerId , 'view' ]" >{{membership.customerPrefix}}</a>
|
||||||
|
@ -51,16 +51,20 @@ 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, {
|
||||||
from: membership.from != null && membership.from.isValid() ? membership.from.format(DATE_FORMAT) : null,
|
documentDate:
|
||||||
to: membership.to != null && membership.to.isValid() ? membership.to.format(DATE_FORMAT) : null
|
membership.documentDate != null && membership.documentDate.isValid() ? membership.documentDate.format(DATE_FORMAT) : null,
|
||||||
|
memberFrom: membership.memberFrom != null && membership.memberFrom.isValid() ? membership.memberFrom.format(DATE_FORMAT) : null,
|
||||||
|
memberUntil:
|
||||||
|
membership.memberUntil != null && membership.memberUntil.isValid() ? membership.memberUntil.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.from = res.body.from != null ? moment(res.body.from) : null;
|
res.body.documentDate = res.body.documentDate != null ? moment(res.body.documentDate) : null;
|
||||||
res.body.to = res.body.to != null ? moment(res.body.to) : null;
|
res.body.memberFrom = res.body.memberFrom != null ? moment(res.body.memberFrom) : null;
|
||||||
|
res.body.memberUntil = res.body.memberUntil != null ? moment(res.body.memberUntil) : null;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -68,8 +72,9 @@ 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.from = membership.from != null ? moment(membership.from) : null;
|
membership.documentDate = membership.documentDate != null ? moment(membership.documentDate) : null;
|
||||||
membership.to = membership.to != null ? moment(membership.to) : null;
|
membership.memberFrom = membership.memberFrom != null ? moment(membership.memberFrom) : null;
|
||||||
|
membership.memberUntil = membership.memberUntil != null ? moment(membership.memberUntil) : null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
@ -17,29 +17,29 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.bic}}</span>
|
<span>{{sepaMandate.bic}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.created">Created</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.documentDate">Document Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.created}}</span>
|
<span>{{sepaMandate.documentDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validFrom">Valid From</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validFrom">Valid From</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.validFrom}}</span>
|
<span>{{sepaMandate.validFrom}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validTo">Valid To</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validUntil">Valid Until</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.validTo}}</span>
|
<span>{{sepaMandate.validUntil}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsed">Last Used</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsed">Last Used</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.lastUsed}}</span>
|
<span>{{sepaMandate.lastUsed}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.cancelled">Cancelled</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.cancellationDate">Cancellation Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.cancelled}}</span>
|
<span>{{sepaMandate.cancellationDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.comment">Comment</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.remark">Remark</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{sepaMandate.comment}}</span>
|
<span>{{sepaMandate.remark}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.customer">Customer</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.customer">Customer</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
@ -47,17 +47,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.created" for="field_created">Created</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.documentDate" for="field_documentDate">Document Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_created" type="text" class="form-control" name="created" ngbDatepicker #createdDp="ngbDatepicker" [(ngModel)]="sepaMandate.created"
|
<input id="field_documentDate" type="text" class="form-control" name="documentDate" ngbDatepicker #documentDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.documentDate"
|
||||||
required/>
|
required/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="createdDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="documentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="!(editForm.controls.created?.dirty && editForm.controls.created?.invalid)">
|
<div [hidden]="!(editForm.controls.documentDate?.dirty && editForm.controls.documentDate?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.created?.errors?.required" jhiTranslate="entity.validation.required">
|
[hidden]="!editForm.controls.documentDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
This field is required.
|
This field is required.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
@ -79,12 +79,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.validTo" for="field_validTo">Valid To</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.validUntil" for="field_validUntil">Valid Until</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_validTo" type="text" class="form-control" name="validTo" ngbDatepicker #validToDp="ngbDatepicker" [(ngModel)]="sepaMandate.validTo"
|
<input id="field_validUntil" type="text" class="form-control" name="validUntil" ngbDatepicker #validUntilDp="ngbDatepicker" [(ngModel)]="sepaMandate.validUntil"
|
||||||
/>
|
/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="validToDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="validUntilDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -99,22 +99,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.cancelled" for="field_cancelled">Cancelled</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.cancellationDate" for="field_cancellationDate">Cancellation Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_cancelled" type="text" class="form-control" name="cancelled" ngbDatepicker #cancelledDp="ngbDatepicker" [(ngModel)]="sepaMandate.cancelled"
|
<input id="field_cancellationDate" type="text" class="form-control" name="cancellationDate" ngbDatepicker #cancellationDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.cancellationDate"
|
||||||
/>
|
/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="cancelledDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="cancellationDateDp.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.comment" for="field_comment">Comment</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.remark" for="field_remark">Remark</label>
|
||||||
<input type="text" class="form-control" name="comment" id="field_comment"
|
<input type="text" class="form-control" name="remark" id="field_remark"
|
||||||
[(ngModel)]="sepaMandate.comment" maxlength="160"/>
|
[(ngModel)]="sepaMandate.remark" maxlength="160"/>
|
||||||
<div [hidden]="!(editForm.controls.comment?.dirty && editForm.controls.comment?.invalid)">
|
<div [hidden]="!(editForm.controls.remark?.dirty && editForm.controls.remark?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.comment?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
|
[hidden]="!editForm.controls.remark?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
|
||||||
This field cannot be longer than 160 characters.
|
This field cannot be longer than 160 characters.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
<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="created"><span jhiTranslate="hsadminNgApp.sepaMandate.created">Created</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="validFrom"><span jhiTranslate="hsadminNgApp.sepaMandate.validFrom">Valid From</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="validTo"><span jhiTranslate="hsadminNgApp.sepaMandate.validTo">Valid To</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="lastUsed"><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsed">Last Used</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="cancelled"><span jhiTranslate="hsadminNgApp.sepaMandate.cancelled">Cancelled</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="comment"><span jhiTranslate="hsadminNgApp.sepaMandate.comment">Comment</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>
|
||||||
</tr>
|
</tr>
|
||||||
@ -34,12 +34,12 @@
|
|||||||
<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.created | date:'mediumDate'}}</td>
|
<td>{{sepaMandate.documentDate | date:'mediumDate'}}</td>
|
||||||
<td>{{sepaMandate.validFrom | date:'mediumDate'}}</td>
|
<td>{{sepaMandate.validFrom | date:'mediumDate'}}</td>
|
||||||
<td>{{sepaMandate.validTo | date:'mediumDate'}}</td>
|
<td>{{sepaMandate.validUntil | date:'mediumDate'}}</td>
|
||||||
<td>{{sepaMandate.lastUsed | date:'mediumDate'}}</td>
|
<td>{{sepaMandate.lastUsed | date:'mediumDate'}}</td>
|
||||||
<td>{{sepaMandate.cancelled | date:'mediumDate'}}</td>
|
<td>{{sepaMandate.cancellationDate | date:'mediumDate'}}</td>
|
||||||
<td>{{sepaMandate.comment}}</td>
|
<td>{{sepaMandate.remark}}</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="sepaMandate.customerId">
|
<div *ngIf="sepaMandate.customerId">
|
||||||
<a [routerLink]="['../customer', sepaMandate.customerId , 'view' ]" >{{sepaMandate.customerPrefix}}</a>
|
<a [routerLink]="['../customer', sepaMandate.customerId , 'view' ]" >{{sepaMandate.customerPrefix}}</a>
|
||||||
|
@ -51,22 +51,29 @@ 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, {
|
||||||
created: sepaMandate.created != null && sepaMandate.created.isValid() ? sepaMandate.created.format(DATE_FORMAT) : null,
|
documentDate:
|
||||||
|
sepaMandate.documentDate != null && sepaMandate.documentDate.isValid()
|
||||||
|
? sepaMandate.documentDate.format(DATE_FORMAT)
|
||||||
|
: null,
|
||||||
validFrom: sepaMandate.validFrom != null && sepaMandate.validFrom.isValid() ? sepaMandate.validFrom.format(DATE_FORMAT) : null,
|
validFrom: sepaMandate.validFrom != null && sepaMandate.validFrom.isValid() ? sepaMandate.validFrom.format(DATE_FORMAT) : null,
|
||||||
validTo: sepaMandate.validTo != null && sepaMandate.validTo.isValid() ? sepaMandate.validTo.format(DATE_FORMAT) : null,
|
validUntil:
|
||||||
|
sepaMandate.validUntil != null && sepaMandate.validUntil.isValid() ? sepaMandate.validUntil.format(DATE_FORMAT) : null,
|
||||||
lastUsed: sepaMandate.lastUsed != null && sepaMandate.lastUsed.isValid() ? sepaMandate.lastUsed.format(DATE_FORMAT) : null,
|
lastUsed: sepaMandate.lastUsed != null && sepaMandate.lastUsed.isValid() ? sepaMandate.lastUsed.format(DATE_FORMAT) : null,
|
||||||
cancelled: sepaMandate.cancelled != null && sepaMandate.cancelled.isValid() ? sepaMandate.cancelled.format(DATE_FORMAT) : null
|
cancellationDate:
|
||||||
|
sepaMandate.cancellationDate != null && sepaMandate.cancellationDate.isValid()
|
||||||
|
? sepaMandate.cancellationDate.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.created = res.body.created != null ? moment(res.body.created) : null;
|
res.body.documentDate = res.body.documentDate != null ? moment(res.body.documentDate) : null;
|
||||||
res.body.validFrom = res.body.validFrom != null ? moment(res.body.validFrom) : null;
|
res.body.validFrom = res.body.validFrom != null ? moment(res.body.validFrom) : null;
|
||||||
res.body.validTo = res.body.validTo != null ? moment(res.body.validTo) : null;
|
res.body.validUntil = res.body.validUntil != null ? moment(res.body.validUntil) : null;
|
||||||
res.body.lastUsed = res.body.lastUsed != null ? moment(res.body.lastUsed) : null;
|
res.body.lastUsed = res.body.lastUsed != null ? moment(res.body.lastUsed) : null;
|
||||||
res.body.cancelled = res.body.cancelled != null ? moment(res.body.cancelled) : null;
|
res.body.cancellationDate = res.body.cancellationDate != null ? moment(res.body.cancellationDate) : null;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -74,11 +81,11 @@ 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.created = sepaMandate.created != null ? moment(sepaMandate.created) : null;
|
sepaMandate.documentDate = sepaMandate.documentDate != null ? moment(sepaMandate.documentDate) : null;
|
||||||
sepaMandate.validFrom = sepaMandate.validFrom != null ? moment(sepaMandate.validFrom) : null;
|
sepaMandate.validFrom = sepaMandate.validFrom != null ? moment(sepaMandate.validFrom) : null;
|
||||||
sepaMandate.validTo = sepaMandate.validTo != null ? moment(sepaMandate.validTo) : null;
|
sepaMandate.validUntil = sepaMandate.validUntil != null ? moment(sepaMandate.validUntil) : null;
|
||||||
sepaMandate.lastUsed = sepaMandate.lastUsed != null ? moment(sepaMandate.lastUsed) : null;
|
sepaMandate.lastUsed = sepaMandate.lastUsed != null ? moment(sepaMandate.lastUsed) : null;
|
||||||
sepaMandate.cancelled = sepaMandate.cancelled != null ? moment(sepaMandate.cancelled) : null;
|
sepaMandate.cancellationDate = sepaMandate.cancellationDate != null ? moment(sepaMandate.cancellationDate) : null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
@ -5,9 +5,13 @@
|
|||||||
<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.share.date">Date</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.share.documentDate">Document Date</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{share.date}}</span>
|
<span>{{share.documentDate}}</span>
|
||||||
|
</dd>
|
||||||
|
<dt><span jhiTranslate="hsadminNgApp.share.valueDate">Value Date</span></dt>
|
||||||
|
<dd>
|
||||||
|
<span>{{share.valueDate}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.share.action">Action</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.share.action">Action</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@ -17,14 +21,14 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<span>{{share.quantity}}</span>
|
<span>{{share.quantity}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span jhiTranslate="hsadminNgApp.share.comment">Comment</span></dt>
|
<dt><span jhiTranslate="hsadminNgApp.share.remark">Remark</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<span>{{share.comment}}</span>
|
<span>{{share.remark}}</span>
|
||||||
</dd>
|
</dd>
|
||||||
<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.membershipFrom}}</a>
|
<a [routerLink]="['/membership', share.membershipId, 'view']">{{share.membershipDocumentDate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -10,17 +10,33 @@
|
|||||||
[(ngModel)]="share.id" readonly />
|
[(ngModel)]="share.id" readonly />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.share.date" for="field_date">Date</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.share.documentDate" for="field_documentDate">Document Date</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="field_date" type="text" class="form-control" name="date" ngbDatepicker #dateDp="ngbDatepicker" [(ngModel)]="share.date"
|
<input id="field_documentDate" type="text" class="form-control" name="documentDate" ngbDatepicker #documentDateDp="ngbDatepicker" [(ngModel)]="share.documentDate"
|
||||||
required/>
|
required/>
|
||||||
<span class="input-group-append">
|
<span class="input-group-append">
|
||||||
<button type="button" class="btn btn-secondary" (click)="dateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
<button type="button" class="btn btn-secondary" (click)="documentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div [hidden]="!(editForm.controls.date?.dirty && editForm.controls.date?.invalid)">
|
<div [hidden]="!(editForm.controls.documentDate?.dirty && editForm.controls.documentDate?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.date?.errors?.required" jhiTranslate="entity.validation.required">
|
[hidden]="!editForm.controls.documentDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
|
This field is required.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.share.valueDate" for="field_valueDate">Value Date</label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="field_valueDate" type="text" class="form-control" name="valueDate" ngbDatepicker #valueDateDp="ngbDatepicker" [(ngModel)]="share.valueDate"
|
||||||
|
required/>
|
||||||
|
<span class="input-group-append">
|
||||||
|
<button type="button" class="btn btn-secondary" (click)="valueDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div [hidden]="!(editForm.controls.valueDate?.dirty && editForm.controls.valueDate?.invalid)">
|
||||||
|
<small class="form-text text-danger"
|
||||||
|
[hidden]="!editForm.controls.valueDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||||
This field is required.
|
This field is required.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
@ -54,12 +70,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.share.comment" for="field_comment">Comment</label>
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.share.remark" for="field_remark">Remark</label>
|
||||||
<input type="text" class="form-control" name="comment" id="field_comment"
|
<input type="text" class="form-control" name="remark" id="field_remark"
|
||||||
[(ngModel)]="share.comment" maxlength="160"/>
|
[(ngModel)]="share.remark" maxlength="160"/>
|
||||||
<div [hidden]="!(editForm.controls.comment?.dirty && editForm.controls.comment?.invalid)">
|
<div [hidden]="!(editForm.controls.remark?.dirty && editForm.controls.remark?.invalid)">
|
||||||
<small class="form-text text-danger"
|
<small class="form-text text-danger"
|
||||||
[hidden]="!editForm.controls.comment?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
|
[hidden]="!editForm.controls.remark?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
|
||||||
This field cannot be longer than 160 characters.
|
This field cannot be longer than 160 characters.
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
@ -69,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.from}}</option>
|
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.documentDate}}</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)">
|
||||||
|
@ -19,7 +19,8 @@ export class ShareUpdateComponent implements OnInit {
|
|||||||
isSaving: boolean;
|
isSaving: boolean;
|
||||||
|
|
||||||
memberships: IMembership[];
|
memberships: IMembership[];
|
||||||
dateDp: any;
|
documentDateDp: any;
|
||||||
|
valueDateDp: any;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected jhiAlertService: JhiAlertService,
|
protected jhiAlertService: JhiAlertService,
|
||||||
|
@ -15,24 +15,26 @@
|
|||||||
<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="date"><span jhiTranslate="hsadminNgApp.share.date">Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
<th jhiSortBy="documentDate"><span jhiTranslate="hsadminNgApp.share.documentDate">Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||||
|
<th jhiSortBy="valueDate"><span jhiTranslate="hsadminNgApp.share.valueDate">Value Date</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="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="comment"><span jhiTranslate="hsadminNgApp.share.comment">Comment</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="membershipFrom"><span jhiTranslate="hsadminNgApp.share.membership">Membership</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></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<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 share of shares ;trackBy: trackId">
|
<tr *ngFor="let share of shares ;trackBy: trackId">
|
||||||
<td><a [routerLink]="['/share', share.id, 'view' ]">{{share.id}}</a></td>
|
<td><a [routerLink]="['/share', share.id, 'view' ]">{{share.id}}</a></td>
|
||||||
<td>{{share.date | date:'mediumDate'}}</td>
|
<td>{{share.documentDate | date:'mediumDate'}}</td>
|
||||||
|
<td>{{share.valueDate | date:'mediumDate'}}</td>
|
||||||
<td jhiTranslate="{{'hsadminNgApp.ShareAction.' + share.action}}">{{share.action}}</td>
|
<td jhiTranslate="{{'hsadminNgApp.ShareAction.' + share.action}}">{{share.action}}</td>
|
||||||
<td>{{share.quantity}}</td>
|
<td>{{share.quantity}}</td>
|
||||||
<td>{{share.comment}}</td>
|
<td>{{share.remark}}</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="share.membershipId">
|
<div *ngIf="share.membershipId">
|
||||||
<a [routerLink]="['../membership', share.membershipId , 'view' ]" >{{share.membershipFrom}}</a>
|
<a [routerLink]="['../membership', share.membershipId , 'view' ]" >{{share.membershipDocumentDate}}</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
|
@ -51,14 +51,16 @@ export class ShareService {
|
|||||||
|
|
||||||
protected convertDateFromClient(share: IShare): IShare {
|
protected convertDateFromClient(share: IShare): IShare {
|
||||||
const copy: IShare = Object.assign({}, share, {
|
const copy: IShare = Object.assign({}, share, {
|
||||||
date: share.date != null && share.date.isValid() ? share.date.format(DATE_FORMAT) : null
|
documentDate: share.documentDate != null && share.documentDate.isValid() ? share.documentDate.format(DATE_FORMAT) : null,
|
||||||
|
valueDate: share.valueDate != null && share.valueDate.isValid() ? share.valueDate.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.date = res.body.date != null ? moment(res.body.date) : null;
|
res.body.documentDate = res.body.documentDate != null ? moment(res.body.documentDate) : null;
|
||||||
|
res.body.valueDate = res.body.valueDate != null ? moment(res.body.valueDate) : null;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -66,7 +68,8 @@ export class ShareService {
|
|||||||
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
|
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
|
||||||
if (res.body) {
|
if (res.body) {
|
||||||
res.body.forEach((share: IShare) => {
|
res.body.forEach((share: IShare) => {
|
||||||
share.date = share.date != null ? moment(share.date) : null;
|
share.documentDate = share.documentDate != null ? moment(share.documentDate) : null;
|
||||||
|
share.valueDate = share.valueDate != null ? moment(share.valueDate) : null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
@ -11,22 +11,24 @@ export const enum AssetAction {
|
|||||||
|
|
||||||
export interface IAsset {
|
export interface IAsset {
|
||||||
id?: number;
|
id?: number;
|
||||||
date?: Moment;
|
documentDate?: Moment;
|
||||||
|
valueDate?: Moment;
|
||||||
action?: AssetAction;
|
action?: AssetAction;
|
||||||
amount?: number;
|
amount?: number;
|
||||||
comment?: string;
|
remark?: string;
|
||||||
membershipFrom?: string;
|
membershipDocumentDate?: string;
|
||||||
membershipId?: number;
|
membershipId?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Asset implements IAsset {
|
export class Asset implements IAsset {
|
||||||
constructor(
|
constructor(
|
||||||
public id?: number,
|
public id?: number,
|
||||||
public date?: Moment,
|
public documentDate?: Moment,
|
||||||
|
public valueDate?: Moment,
|
||||||
public action?: AssetAction,
|
public action?: AssetAction,
|
||||||
public amount?: number,
|
public amount?: number,
|
||||||
public comment?: string,
|
public remark?: string,
|
||||||
public membershipFrom?: string,
|
public membershipDocumentDate?: string,
|
||||||
public membershipId?: number
|
public membershipId?: number
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,14 @@ import { ISepaMandate } from 'app/shared/model/sepa-mandate.model';
|
|||||||
|
|
||||||
export interface ICustomer {
|
export interface ICustomer {
|
||||||
id?: number;
|
id?: number;
|
||||||
number?: number;
|
reference?: number;
|
||||||
prefix?: string;
|
prefix?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
contractualSalutation?: string;
|
contractualSalutation?: string;
|
||||||
contractualAddress?: string;
|
contractualAddress?: string;
|
||||||
billingSalutation?: string;
|
billingSalutation?: string;
|
||||||
billingAddress?: string;
|
billingAddress?: string;
|
||||||
|
remark?: string;
|
||||||
memberships?: IMembership[];
|
memberships?: IMembership[];
|
||||||
sepamandates?: ISepaMandate[];
|
sepamandates?: ISepaMandate[];
|
||||||
}
|
}
|
||||||
@ -17,13 +18,14 @@ export interface ICustomer {
|
|||||||
export class Customer implements ICustomer {
|
export class Customer implements ICustomer {
|
||||||
constructor(
|
constructor(
|
||||||
public id?: number,
|
public id?: number,
|
||||||
public number?: number,
|
public reference?: number,
|
||||||
public prefix?: string,
|
public prefix?: string,
|
||||||
public name?: string,
|
public name?: string,
|
||||||
public contractualSalutation?: string,
|
public contractualSalutation?: string,
|
||||||
public contractualAddress?: string,
|
public contractualAddress?: string,
|
||||||
public billingSalutation?: string,
|
public billingSalutation?: string,
|
||||||
public billingAddress?: string,
|
public billingAddress?: string,
|
||||||
|
public remark?: string,
|
||||||
public memberships?: IMembership[],
|
public memberships?: IMembership[],
|
||||||
public sepamandates?: ISepaMandate[]
|
public sepamandates?: ISepaMandate[]
|
||||||
) {}
|
) {}
|
||||||
|
@ -4,9 +4,10 @@ import { IAsset } from 'app/shared/model/asset.model';
|
|||||||
|
|
||||||
export interface IMembership {
|
export interface IMembership {
|
||||||
id?: number;
|
id?: number;
|
||||||
from?: Moment;
|
documentDate?: Moment;
|
||||||
to?: Moment;
|
memberFrom?: Moment;
|
||||||
comment?: string;
|
memberUntil?: Moment;
|
||||||
|
remark?: string;
|
||||||
shares?: IShare[];
|
shares?: IShare[];
|
||||||
assets?: IAsset[];
|
assets?: IAsset[];
|
||||||
customerPrefix?: string;
|
customerPrefix?: string;
|
||||||
@ -16,9 +17,10 @@ export interface IMembership {
|
|||||||
export class Membership implements IMembership {
|
export class Membership implements IMembership {
|
||||||
constructor(
|
constructor(
|
||||||
public id?: number,
|
public id?: number,
|
||||||
public from?: Moment,
|
public documentDate?: Moment,
|
||||||
public to?: Moment,
|
public memberFrom?: Moment,
|
||||||
public comment?: string,
|
public memberUntil?: Moment,
|
||||||
|
public remark?: string,
|
||||||
public shares?: IShare[],
|
public shares?: IShare[],
|
||||||
public assets?: IAsset[],
|
public assets?: IAsset[],
|
||||||
public customerPrefix?: string,
|
public customerPrefix?: string,
|
||||||
|
@ -5,12 +5,12 @@ export interface ISepaMandate {
|
|||||||
reference?: string;
|
reference?: string;
|
||||||
iban?: string;
|
iban?: string;
|
||||||
bic?: string;
|
bic?: string;
|
||||||
created?: Moment;
|
documentDate?: Moment;
|
||||||
validFrom?: Moment;
|
validFrom?: Moment;
|
||||||
validTo?: Moment;
|
validUntil?: Moment;
|
||||||
lastUsed?: Moment;
|
lastUsed?: Moment;
|
||||||
cancelled?: Moment;
|
cancellationDate?: Moment;
|
||||||
comment?: string;
|
remark?: string;
|
||||||
customerPrefix?: string;
|
customerPrefix?: string;
|
||||||
customerId?: number;
|
customerId?: number;
|
||||||
}
|
}
|
||||||
@ -21,12 +21,12 @@ export class SepaMandate implements ISepaMandate {
|
|||||||
public reference?: string,
|
public reference?: string,
|
||||||
public iban?: string,
|
public iban?: string,
|
||||||
public bic?: string,
|
public bic?: string,
|
||||||
public created?: Moment,
|
public documentDate?: Moment,
|
||||||
public validFrom?: Moment,
|
public validFrom?: Moment,
|
||||||
public validTo?: Moment,
|
public validUntil?: Moment,
|
||||||
public lastUsed?: Moment,
|
public lastUsed?: Moment,
|
||||||
public cancelled?: Moment,
|
public cancellationDate?: Moment,
|
||||||
public comment?: string,
|
public remark?: string,
|
||||||
public customerPrefix?: string,
|
public customerPrefix?: string,
|
||||||
public customerId?: number
|
public customerId?: number
|
||||||
) {}
|
) {}
|
||||||
|
@ -7,22 +7,24 @@ export const enum ShareAction {
|
|||||||
|
|
||||||
export interface IShare {
|
export interface IShare {
|
||||||
id?: number;
|
id?: number;
|
||||||
date?: Moment;
|
documentDate?: Moment;
|
||||||
|
valueDate?: Moment;
|
||||||
action?: ShareAction;
|
action?: ShareAction;
|
||||||
quantity?: number;
|
quantity?: number;
|
||||||
comment?: string;
|
remark?: string;
|
||||||
membershipFrom?: string;
|
membershipDocumentDate?: string;
|
||||||
membershipId?: number;
|
membershipId?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Share implements IShare {
|
export class Share implements IShare {
|
||||||
constructor(
|
constructor(
|
||||||
public id?: number,
|
public id?: number,
|
||||||
public date?: Moment,
|
public documentDate?: Moment,
|
||||||
|
public valueDate?: Moment,
|
||||||
public action?: ShareAction,
|
public action?: ShareAction,
|
||||||
public quantity?: number,
|
public quantity?: number,
|
||||||
public comment?: string,
|
public remark?: string,
|
||||||
public membershipFrom?: string,
|
public membershipDocumentDate?: string,
|
||||||
public membershipId?: number
|
public membershipId?: number
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,11 @@
|
|||||||
"detail": {
|
"detail": {
|
||||||
"title": "Asset"
|
"title": "Asset"
|
||||||
},
|
},
|
||||||
"date": "Date",
|
"documentDate": "Document Date",
|
||||||
|
"valueDate": "Value Date",
|
||||||
"action": "Action",
|
"action": "Action",
|
||||||
"amount": "Amount",
|
"amount": "Amount",
|
||||||
"comment": "Comment",
|
"remark": "Remark",
|
||||||
"membership": "Membership"
|
"membership": "Membership"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,13 +15,14 @@
|
|||||||
"detail": {
|
"detail": {
|
||||||
"title": "Customer"
|
"title": "Customer"
|
||||||
},
|
},
|
||||||
"number": "Number",
|
"reference": "Reference",
|
||||||
"prefix": "Prefix",
|
"prefix": "Prefix",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"contractualSalutation": "Contractual Salutation",
|
"contractualSalutation": "Contractual Salutation",
|
||||||
"contractualAddress": "Contractual Address",
|
"contractualAddress": "Contractual Address",
|
||||||
"billingSalutation": "Billing Salutation",
|
"billingSalutation": "Billing Salutation",
|
||||||
"billingAddress": "Billing Address",
|
"billingAddress": "Billing Address",
|
||||||
|
"remark": "Remark",
|
||||||
"membership": "Membership",
|
"membership": "Membership",
|
||||||
"sepamandate": "Sepamandate"
|
"sepamandate": "Sepamandate"
|
||||||
}
|
}
|
||||||
|
@ -15,9 +15,10 @@
|
|||||||
"detail": {
|
"detail": {
|
||||||
"title": "Membership"
|
"title": "Membership"
|
||||||
},
|
},
|
||||||
"from": "From",
|
"documentDate": "Document Date",
|
||||||
"to": "To",
|
"memberFrom": "Member From",
|
||||||
"comment": "Comment",
|
"memberUntil": "Member Until",
|
||||||
|
"remark": "Remark",
|
||||||
"share": "Share",
|
"share": "Share",
|
||||||
"asset": "Asset",
|
"asset": "Asset",
|
||||||
"customer": "Customer"
|
"customer": "Customer"
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
"reference": "Reference",
|
"reference": "Reference",
|
||||||
"iban": "Iban",
|
"iban": "Iban",
|
||||||
"bic": "Bic",
|
"bic": "Bic",
|
||||||
"created": "Created",
|
"documentDate": "Document Date",
|
||||||
"validFrom": "Valid From",
|
"validFrom": "Valid From",
|
||||||
"validTo": "Valid To",
|
"validUntil": "Valid Until",
|
||||||
"lastUsed": "Last Used",
|
"lastUsed": "Last Used",
|
||||||
"cancelled": "Cancelled",
|
"cancellationDate": "Cancellation Date",
|
||||||
"comment": "Comment",
|
"remark": "Remark",
|
||||||
"customer": "Customer"
|
"customer": "Customer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,11 @@
|
|||||||
"detail": {
|
"detail": {
|
||||||
"title": "Share"
|
"title": "Share"
|
||||||
},
|
},
|
||||||
"date": "Date",
|
"documentDate": "Document Date",
|
||||||
|
"valueDate": "Value Date",
|
||||||
"action": "Action",
|
"action": "Action",
|
||||||
"quantity": "Quantity",
|
"quantity": "Quantity",
|
||||||
"comment": "Comment",
|
"remark": "Remark",
|
||||||
"membership": "Membership"
|
"membership": "Membership"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,11 @@
|
|||||||
"detail": {
|
"detail": {
|
||||||
"title": "Asset"
|
"title": "Asset"
|
||||||
},
|
},
|
||||||
"date": "Date",
|
"documentDate": "Document Date",
|
||||||
|
"valueDate": "Value Date",
|
||||||
"action": "Action",
|
"action": "Action",
|
||||||
"amount": "Amount",
|
"amount": "Amount",
|
||||||
"comment": "Comment",
|
"remark": "Remark",
|
||||||
"membership": "Membership"
|
"membership": "Membership"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,13 +15,14 @@
|
|||||||
"detail": {
|
"detail": {
|
||||||
"title": "Customer"
|
"title": "Customer"
|
||||||
},
|
},
|
||||||
"number": "Number",
|
"reference": "Reference",
|
||||||
"prefix": "Prefix",
|
"prefix": "Prefix",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"contractualSalutation": "Contractual Salutation",
|
"contractualSalutation": "Contractual Salutation",
|
||||||
"contractualAddress": "Contractual Address",
|
"contractualAddress": "Contractual Address",
|
||||||
"billingSalutation": "Billing Salutation",
|
"billingSalutation": "Billing Salutation",
|
||||||
"billingAddress": "Billing Address",
|
"billingAddress": "Billing Address",
|
||||||
|
"remark": "Remark",
|
||||||
"membership": "Membership",
|
"membership": "Membership",
|
||||||
"sepamandate": "Sepamandate"
|
"sepamandate": "Sepamandate"
|
||||||
}
|
}
|
||||||
|
@ -15,9 +15,10 @@
|
|||||||
"detail": {
|
"detail": {
|
||||||
"title": "Membership"
|
"title": "Membership"
|
||||||
},
|
},
|
||||||
"from": "From",
|
"documentDate": "Document Date",
|
||||||
"to": "To",
|
"memberFrom": "Member From",
|
||||||
"comment": "Comment",
|
"memberUntil": "Member Until",
|
||||||
|
"remark": "Remark",
|
||||||
"share": "Share",
|
"share": "Share",
|
||||||
"asset": "Asset",
|
"asset": "Asset",
|
||||||
"customer": "Customer"
|
"customer": "Customer"
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
"reference": "Reference",
|
"reference": "Reference",
|
||||||
"iban": "Iban",
|
"iban": "Iban",
|
||||||
"bic": "Bic",
|
"bic": "Bic",
|
||||||
"created": "Created",
|
"documentDate": "Document Date",
|
||||||
"validFrom": "Valid From",
|
"validFrom": "Valid From",
|
||||||
"validTo": "Valid To",
|
"validUntil": "Valid Until",
|
||||||
"lastUsed": "Last Used",
|
"lastUsed": "Last Used",
|
||||||
"cancelled": "Cancelled",
|
"cancellationDate": "Cancellation Date",
|
||||||
"comment": "Comment",
|
"remark": "Remark",
|
||||||
"customer": "Customer"
|
"customer": "Customer"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,11 @@
|
|||||||
"detail": {
|
"detail": {
|
||||||
"title": "Share"
|
"title": "Share"
|
||||||
},
|
},
|
||||||
"date": "Date",
|
"documentDate": "Document Date",
|
||||||
|
"valueDate": "Value Date",
|
||||||
"action": "Action",
|
"action": "Action",
|
||||||
"quantity": "Quantity",
|
"quantity": "Quantity",
|
||||||
"comment": "Comment",
|
"remark": "Remark",
|
||||||
"membership": "Membership"
|
"membership": "Membership"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,8 +50,11 @@ import org.hostsharing.hsadminng.domain.enumeration.AssetAction;
|
|||||||
@SpringBootTest(classes = HsadminNgApp.class)
|
@SpringBootTest(classes = HsadminNgApp.class)
|
||||||
public class AssetResourceIntTest {
|
public class AssetResourceIntTest {
|
||||||
|
|
||||||
private static final LocalDate DEFAULT_DATE = LocalDate.ofEpochDay(0L);
|
private static final LocalDate DEFAULT_DOCUMENT_DATE = LocalDate.ofEpochDay(0L);
|
||||||
private static final LocalDate UPDATED_DATE = LocalDate.now(ZoneId.systemDefault());
|
private static final LocalDate UPDATED_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
private static final LocalDate DEFAULT_VALUE_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_VALUE_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
private static final AssetAction DEFAULT_ACTION = AssetAction.PAYMENT;
|
private static final AssetAction DEFAULT_ACTION = AssetAction.PAYMENT;
|
||||||
private static final AssetAction UPDATED_ACTION = AssetAction.HANDOVER;
|
private static final AssetAction UPDATED_ACTION = AssetAction.HANDOVER;
|
||||||
@ -59,8 +62,8 @@ public class AssetResourceIntTest {
|
|||||||
private static final BigDecimal DEFAULT_AMOUNT = new BigDecimal(1);
|
private static final BigDecimal DEFAULT_AMOUNT = new BigDecimal(1);
|
||||||
private static final BigDecimal UPDATED_AMOUNT = new BigDecimal(2);
|
private static final BigDecimal UPDATED_AMOUNT = new BigDecimal(2);
|
||||||
|
|
||||||
private static final String DEFAULT_COMMENT = "AAAAAAAAAA";
|
private static final String DEFAULT_REMARK = "AAAAAAAAAA";
|
||||||
private static final String UPDATED_COMMENT = "BBBBBBBBBB";
|
private static final String UPDATED_REMARK = "BBBBBBBBBB";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AssetRepository assetRepository;
|
private AssetRepository assetRepository;
|
||||||
@ -113,10 +116,11 @@ public class AssetResourceIntTest {
|
|||||||
*/
|
*/
|
||||||
public static Asset createEntity(EntityManager em) {
|
public static Asset createEntity(EntityManager em) {
|
||||||
Asset asset = new Asset()
|
Asset asset = new Asset()
|
||||||
.date(DEFAULT_DATE)
|
.documentDate(DEFAULT_DOCUMENT_DATE)
|
||||||
|
.valueDate(DEFAULT_VALUE_DATE)
|
||||||
.action(DEFAULT_ACTION)
|
.action(DEFAULT_ACTION)
|
||||||
.amount(DEFAULT_AMOUNT)
|
.amount(DEFAULT_AMOUNT)
|
||||||
.comment(DEFAULT_COMMENT);
|
.remark(DEFAULT_REMARK);
|
||||||
// Add required entity
|
// Add required entity
|
||||||
Membership membership = MembershipResourceIntTest.createEntity(em);
|
Membership membership = MembershipResourceIntTest.createEntity(em);
|
||||||
em.persist(membership);
|
em.persist(membership);
|
||||||
@ -146,10 +150,11 @@ public class AssetResourceIntTest {
|
|||||||
List<Asset> assetList = assetRepository.findAll();
|
List<Asset> assetList = assetRepository.findAll();
|
||||||
assertThat(assetList).hasSize(databaseSizeBeforeCreate + 1);
|
assertThat(assetList).hasSize(databaseSizeBeforeCreate + 1);
|
||||||
Asset testAsset = assetList.get(assetList.size() - 1);
|
Asset testAsset = assetList.get(assetList.size() - 1);
|
||||||
assertThat(testAsset.getDate()).isEqualTo(DEFAULT_DATE);
|
assertThat(testAsset.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE);
|
||||||
|
assertThat(testAsset.getValueDate()).isEqualTo(DEFAULT_VALUE_DATE);
|
||||||
assertThat(testAsset.getAction()).isEqualTo(DEFAULT_ACTION);
|
assertThat(testAsset.getAction()).isEqualTo(DEFAULT_ACTION);
|
||||||
assertThat(testAsset.getAmount()).isEqualTo(DEFAULT_AMOUNT);
|
assertThat(testAsset.getAmount()).isEqualTo(DEFAULT_AMOUNT);
|
||||||
assertThat(testAsset.getComment()).isEqualTo(DEFAULT_COMMENT);
|
assertThat(testAsset.getRemark()).isEqualTo(DEFAULT_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -174,10 +179,29 @@ public class AssetResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void checkDateIsRequired() throws Exception {
|
public void checkDocumentDateIsRequired() throws Exception {
|
||||||
int databaseSizeBeforeTest = assetRepository.findAll().size();
|
int databaseSizeBeforeTest = assetRepository.findAll().size();
|
||||||
// set the field null
|
// set the field null
|
||||||
asset.setDate(null);
|
asset.setDocumentDate(null);
|
||||||
|
|
||||||
|
// Create the Asset, which fails.
|
||||||
|
AssetDTO assetDTO = assetMapper.toDto(asset);
|
||||||
|
|
||||||
|
restAssetMockMvc.perform(post("/api/assets")
|
||||||
|
.contentType(TestUtil.APPLICATION_JSON_UTF8)
|
||||||
|
.content(TestUtil.convertObjectToJsonBytes(assetDTO)))
|
||||||
|
.andExpect(status().isBadRequest());
|
||||||
|
|
||||||
|
List<Asset> assetList = assetRepository.findAll();
|
||||||
|
assertThat(assetList).hasSize(databaseSizeBeforeTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void checkValueDateIsRequired() throws Exception {
|
||||||
|
int databaseSizeBeforeTest = assetRepository.findAll().size();
|
||||||
|
// set the field null
|
||||||
|
asset.setValueDate(null);
|
||||||
|
|
||||||
// Create the Asset, which fails.
|
// Create the Asset, which fails.
|
||||||
AssetDTO assetDTO = assetMapper.toDto(asset);
|
AssetDTO assetDTO = assetMapper.toDto(asset);
|
||||||
@ -240,10 +264,11 @@ public class AssetResourceIntTest {
|
|||||||
.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(asset.getId().intValue())))
|
.andExpect(jsonPath("$.[*].id").value(hasItem(asset.getId().intValue())))
|
||||||
.andExpect(jsonPath("$.[*].date").value(hasItem(DEFAULT_DATE.toString())))
|
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].valueDate").value(hasItem(DEFAULT_VALUE_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString())))
|
.andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString())))
|
||||||
.andExpect(jsonPath("$.[*].amount").value(hasItem(DEFAULT_AMOUNT.intValue())))
|
.andExpect(jsonPath("$.[*].amount").value(hasItem(DEFAULT_AMOUNT.intValue())))
|
||||||
.andExpect(jsonPath("$.[*].comment").value(hasItem(DEFAULT_COMMENT.toString())));
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK.toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -257,75 +282,142 @@ public class AssetResourceIntTest {
|
|||||||
.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(asset.getId().intValue()))
|
.andExpect(jsonPath("$.id").value(asset.getId().intValue()))
|
||||||
.andExpect(jsonPath("$.date").value(DEFAULT_DATE.toString()))
|
.andExpect(jsonPath("$.documentDate").value(DEFAULT_DOCUMENT_DATE.toString()))
|
||||||
|
.andExpect(jsonPath("$.valueDate").value(DEFAULT_VALUE_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.action").value(DEFAULT_ACTION.toString()))
|
.andExpect(jsonPath("$.action").value(DEFAULT_ACTION.toString()))
|
||||||
.andExpect(jsonPath("$.amount").value(DEFAULT_AMOUNT.intValue()))
|
.andExpect(jsonPath("$.amount").value(DEFAULT_AMOUNT.intValue()))
|
||||||
.andExpect(jsonPath("$.comment").value(DEFAULT_COMMENT.toString()));
|
.andExpect(jsonPath("$.remark").value(DEFAULT_REMARK.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllAssetsByDateIsEqualToSomething() throws Exception {
|
public void getAllAssetsByDocumentDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
assetRepository.saveAndFlush(asset);
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
// Get all the assetList where date equals to DEFAULT_DATE
|
// Get all the assetList where documentDate equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultAssetShouldBeFound("date.equals=" + DEFAULT_DATE);
|
defaultAssetShouldBeFound("documentDate.equals=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the assetList where date equals to UPDATED_DATE
|
// Get all the assetList where documentDate equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultAssetShouldNotBeFound("date.equals=" + UPDATED_DATE);
|
defaultAssetShouldNotBeFound("documentDate.equals=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllAssetsByDateIsInShouldWork() throws Exception {
|
public void getAllAssetsByDocumentDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
assetRepository.saveAndFlush(asset);
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
// Get all the assetList where date in DEFAULT_DATE or UPDATED_DATE
|
// Get all the assetList where documentDate in DEFAULT_DOCUMENT_DATE or UPDATED_DOCUMENT_DATE
|
||||||
defaultAssetShouldBeFound("date.in=" + DEFAULT_DATE + "," + UPDATED_DATE);
|
defaultAssetShouldBeFound("documentDate.in=" + DEFAULT_DOCUMENT_DATE + "," + UPDATED_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the assetList where date equals to UPDATED_DATE
|
// Get all the assetList where documentDate equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultAssetShouldNotBeFound("date.in=" + UPDATED_DATE);
|
defaultAssetShouldNotBeFound("documentDate.in=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllAssetsByDateIsNullOrNotNull() throws Exception {
|
public void getAllAssetsByDocumentDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
assetRepository.saveAndFlush(asset);
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
// Get all the assetList where date is not null
|
// Get all the assetList where documentDate is not null
|
||||||
defaultAssetShouldBeFound("date.specified=true");
|
defaultAssetShouldBeFound("documentDate.specified=true");
|
||||||
|
|
||||||
// Get all the assetList where date is null
|
// Get all the assetList where documentDate is null
|
||||||
defaultAssetShouldNotBeFound("date.specified=false");
|
defaultAssetShouldNotBeFound("documentDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllAssetsByDateIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllAssetsByDocumentDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
assetRepository.saveAndFlush(asset);
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
// Get all the assetList where date greater than or equals to DEFAULT_DATE
|
// Get all the assetList where documentDate greater than or equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultAssetShouldBeFound("date.greaterOrEqualThan=" + DEFAULT_DATE);
|
defaultAssetShouldBeFound("documentDate.greaterOrEqualThan=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the assetList where date greater than or equals to UPDATED_DATE
|
// Get all the assetList where documentDate greater than or equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultAssetShouldNotBeFound("date.greaterOrEqualThan=" + UPDATED_DATE);
|
defaultAssetShouldNotBeFound("documentDate.greaterOrEqualThan=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllAssetsByDateIsLessThanSomething() throws Exception {
|
public void getAllAssetsByDocumentDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
assetRepository.saveAndFlush(asset);
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
// Get all the assetList where date less than or equals to DEFAULT_DATE
|
// Get all the assetList where documentDate less than or equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultAssetShouldNotBeFound("date.lessThan=" + DEFAULT_DATE);
|
defaultAssetShouldNotBeFound("documentDate.lessThan=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the assetList where date less than or equals to UPDATED_DATE
|
// Get all the assetList where documentDate less than or equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultAssetShouldBeFound("date.lessThan=" + UPDATED_DATE);
|
defaultAssetShouldBeFound("documentDate.lessThan=" + UPDATED_DOCUMENT_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllAssetsByValueDateIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
|
// Get all the assetList where valueDate equals to DEFAULT_VALUE_DATE
|
||||||
|
defaultAssetShouldBeFound("valueDate.equals=" + DEFAULT_VALUE_DATE);
|
||||||
|
|
||||||
|
// Get all the assetList where valueDate equals to UPDATED_VALUE_DATE
|
||||||
|
defaultAssetShouldNotBeFound("valueDate.equals=" + UPDATED_VALUE_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllAssetsByValueDateIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
|
// Get all the assetList where valueDate in DEFAULT_VALUE_DATE or UPDATED_VALUE_DATE
|
||||||
|
defaultAssetShouldBeFound("valueDate.in=" + DEFAULT_VALUE_DATE + "," + UPDATED_VALUE_DATE);
|
||||||
|
|
||||||
|
// Get all the assetList where valueDate equals to UPDATED_VALUE_DATE
|
||||||
|
defaultAssetShouldNotBeFound("valueDate.in=" + UPDATED_VALUE_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllAssetsByValueDateIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
|
// Get all the assetList where valueDate is not null
|
||||||
|
defaultAssetShouldBeFound("valueDate.specified=true");
|
||||||
|
|
||||||
|
// Get all the assetList where valueDate is null
|
||||||
|
defaultAssetShouldNotBeFound("valueDate.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllAssetsByValueDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
|
// Get all the assetList where valueDate greater than or equals to DEFAULT_VALUE_DATE
|
||||||
|
defaultAssetShouldBeFound("valueDate.greaterOrEqualThan=" + DEFAULT_VALUE_DATE);
|
||||||
|
|
||||||
|
// Get all the assetList where valueDate greater than or equals to UPDATED_VALUE_DATE
|
||||||
|
defaultAssetShouldNotBeFound("valueDate.greaterOrEqualThan=" + UPDATED_VALUE_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllAssetsByValueDateIsLessThanSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
|
// Get all the assetList where valueDate less than or equals to DEFAULT_VALUE_DATE
|
||||||
|
defaultAssetShouldNotBeFound("valueDate.lessThan=" + DEFAULT_VALUE_DATE);
|
||||||
|
|
||||||
|
// Get all the assetList where valueDate less than or equals to UPDATED_VALUE_DATE
|
||||||
|
defaultAssetShouldBeFound("valueDate.lessThan=" + UPDATED_VALUE_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -409,41 +501,41 @@ public class AssetResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllAssetsByCommentIsEqualToSomething() throws Exception {
|
public void getAllAssetsByRemarkIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
assetRepository.saveAndFlush(asset);
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
// Get all the assetList where comment equals to DEFAULT_COMMENT
|
// Get all the assetList where remark equals to DEFAULT_REMARK
|
||||||
defaultAssetShouldBeFound("comment.equals=" + DEFAULT_COMMENT);
|
defaultAssetShouldBeFound("remark.equals=" + DEFAULT_REMARK);
|
||||||
|
|
||||||
// Get all the assetList where comment equals to UPDATED_COMMENT
|
// Get all the assetList where remark equals to UPDATED_REMARK
|
||||||
defaultAssetShouldNotBeFound("comment.equals=" + UPDATED_COMMENT);
|
defaultAssetShouldNotBeFound("remark.equals=" + UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllAssetsByCommentIsInShouldWork() throws Exception {
|
public void getAllAssetsByRemarkIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
assetRepository.saveAndFlush(asset);
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
// Get all the assetList where comment in DEFAULT_COMMENT or UPDATED_COMMENT
|
// Get all the assetList where remark in DEFAULT_REMARK or UPDATED_REMARK
|
||||||
defaultAssetShouldBeFound("comment.in=" + DEFAULT_COMMENT + "," + UPDATED_COMMENT);
|
defaultAssetShouldBeFound("remark.in=" + DEFAULT_REMARK + "," + UPDATED_REMARK);
|
||||||
|
|
||||||
// Get all the assetList where comment equals to UPDATED_COMMENT
|
// Get all the assetList where remark equals to UPDATED_REMARK
|
||||||
defaultAssetShouldNotBeFound("comment.in=" + UPDATED_COMMENT);
|
defaultAssetShouldNotBeFound("remark.in=" + UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllAssetsByCommentIsNullOrNotNull() throws Exception {
|
public void getAllAssetsByRemarkIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
assetRepository.saveAndFlush(asset);
|
assetRepository.saveAndFlush(asset);
|
||||||
|
|
||||||
// Get all the assetList where comment is not null
|
// Get all the assetList where remark is not null
|
||||||
defaultAssetShouldBeFound("comment.specified=true");
|
defaultAssetShouldBeFound("remark.specified=true");
|
||||||
|
|
||||||
// Get all the assetList where comment is null
|
// Get all the assetList where remark is null
|
||||||
defaultAssetShouldNotBeFound("comment.specified=false");
|
defaultAssetShouldNotBeFound("remark.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -472,10 +564,11 @@ public class AssetResourceIntTest {
|
|||||||
.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(asset.getId().intValue())))
|
.andExpect(jsonPath("$.[*].id").value(hasItem(asset.getId().intValue())))
|
||||||
.andExpect(jsonPath("$.[*].date").value(hasItem(DEFAULT_DATE.toString())))
|
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].valueDate").value(hasItem(DEFAULT_VALUE_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString())))
|
.andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString())))
|
||||||
.andExpect(jsonPath("$.[*].amount").value(hasItem(DEFAULT_AMOUNT.intValue())))
|
.andExpect(jsonPath("$.[*].amount").value(hasItem(DEFAULT_AMOUNT.intValue())))
|
||||||
.andExpect(jsonPath("$.[*].comment").value(hasItem(DEFAULT_COMMENT)));
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK)));
|
||||||
|
|
||||||
// Check, that the count call also returns 1
|
// Check, that the count call also returns 1
|
||||||
restAssetMockMvc.perform(get("/api/assets/count?sort=id,desc&" + filter))
|
restAssetMockMvc.perform(get("/api/assets/count?sort=id,desc&" + filter))
|
||||||
@ -523,10 +616,11 @@ public class AssetResourceIntTest {
|
|||||||
// Disconnect from session so that the updates on updatedAsset are not directly saved in db
|
// Disconnect from session so that the updates on updatedAsset are not directly saved in db
|
||||||
em.detach(updatedAsset);
|
em.detach(updatedAsset);
|
||||||
updatedAsset
|
updatedAsset
|
||||||
.date(UPDATED_DATE)
|
.documentDate(UPDATED_DOCUMENT_DATE)
|
||||||
|
.valueDate(UPDATED_VALUE_DATE)
|
||||||
.action(UPDATED_ACTION)
|
.action(UPDATED_ACTION)
|
||||||
.amount(UPDATED_AMOUNT)
|
.amount(UPDATED_AMOUNT)
|
||||||
.comment(UPDATED_COMMENT);
|
.remark(UPDATED_REMARK);
|
||||||
AssetDTO assetDTO = assetMapper.toDto(updatedAsset);
|
AssetDTO assetDTO = assetMapper.toDto(updatedAsset);
|
||||||
|
|
||||||
restAssetMockMvc.perform(put("/api/assets")
|
restAssetMockMvc.perform(put("/api/assets")
|
||||||
@ -538,10 +632,11 @@ public class AssetResourceIntTest {
|
|||||||
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.getDate()).isEqualTo(UPDATED_DATE);
|
assertThat(testAsset.getDocumentDate()).isEqualTo(UPDATED_DOCUMENT_DATE);
|
||||||
|
assertThat(testAsset.getValueDate()).isEqualTo(UPDATED_VALUE_DATE);
|
||||||
assertThat(testAsset.getAction()).isEqualTo(UPDATED_ACTION);
|
assertThat(testAsset.getAction()).isEqualTo(UPDATED_ACTION);
|
||||||
assertThat(testAsset.getAmount()).isEqualTo(UPDATED_AMOUNT);
|
assertThat(testAsset.getAmount()).isEqualTo(UPDATED_AMOUNT);
|
||||||
assertThat(testAsset.getComment()).isEqualTo(UPDATED_COMMENT);
|
assertThat(testAsset.getRemark()).isEqualTo(UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -47,8 +47,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||||||
@SpringBootTest(classes = HsadminNgApp.class)
|
@SpringBootTest(classes = HsadminNgApp.class)
|
||||||
public class CustomerResourceIntTest {
|
public class CustomerResourceIntTest {
|
||||||
|
|
||||||
private static final Integer DEFAULT_NUMBER = 10000;
|
private static final Integer DEFAULT_REFERENCE = 10000;
|
||||||
private static final Integer UPDATED_NUMBER = 10001;
|
private static final Integer UPDATED_REFERENCE = 10001;
|
||||||
|
|
||||||
private static final String DEFAULT_PREFIX = "nf";
|
private static final String DEFAULT_PREFIX = "nf";
|
||||||
private static final String UPDATED_PREFIX = "m2";
|
private static final String UPDATED_PREFIX = "m2";
|
||||||
@ -62,13 +62,21 @@ public class CustomerResourceIntTest {
|
|||||||
private static final String DEFAULT_CONTRACTUAL_ADDRESS = "AAAAAAAAAA";
|
private static final String DEFAULT_CONTRACTUAL_ADDRESS = "AAAAAAAAAA";
|
||||||
private static final String UPDATED_CONTRACTUAL_ADDRESS = "BBBBBBBBBB";
|
private static final String UPDATED_CONTRACTUAL_ADDRESS = "BBBBBBBBBB";
|
||||||
|
|
||||||
|
private static final String DEFAULT_BILLING_SALUTATION = "AAAAAAAAAA";
|
||||||
|
private static final String UPDATED_BILLING_SALUTATION = "BBBBBBBBBB";
|
||||||
|
private static final String DEFAULT_CONTRACTUAL_SALUTATION = "AAAAAAAAAA";
|
||||||
|
private static final String UPDATED_CONTRACTUAL_SALUTATION = "BBBBBBBBBB";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
private static final String DEFAULT_BILLING_SALUTATION = "AAAAAAAAAA";
|
private static final String DEFAULT_BILLING_SALUTATION = "AAAAAAAAAA";
|
||||||
private static final String UPDATED_BILLING_SALUTATION = "BBBBBBBBBB";
|
private static final String UPDATED_BILLING_SALUTATION = "BBBBBBBBBB";
|
||||||
|
|
||||||
private static final String DEFAULT_BILLING_ADDRESS = "AAAAAAAAAA";
|
private static final String DEFAULT_BILLING_ADDRESS = "AAAAAAAAAA";
|
||||||
private static final String UPDATED_BILLING_ADDRESS = "BBBBBBBBBB";
|
private static final String UPDATED_BILLING_ADDRESS = "BBBBBBBBBB";
|
||||||
|
|
||||||
@Autowired
|
private static final String DEFAULT_REMARK = "AAAAAAAAAA";
|
||||||
|
private static final String UPDATED_REMARK = "BBBBBBBBBB";
|
||||||
|
|
||||||
private CustomerRepository customerRepository;
|
private CustomerRepository customerRepository;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -119,13 +127,14 @@ public class CustomerResourceIntTest {
|
|||||||
*/
|
*/
|
||||||
public static Customer createEntity(EntityManager em) {
|
public static Customer createEntity(EntityManager em) {
|
||||||
Customer customer = new Customer()
|
Customer customer = new Customer()
|
||||||
.number(DEFAULT_NUMBER)
|
.reference(DEFAULT_REFERENCE)
|
||||||
.prefix(DEFAULT_PREFIX)
|
.prefix(DEFAULT_PREFIX)
|
||||||
.name(DEFAULT_NAME)
|
.name(DEFAULT_NAME)
|
||||||
.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)
|
||||||
|
.remark(DEFAULT_REMARK);
|
||||||
return customer;
|
return customer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,13 +159,14 @@ public class CustomerResourceIntTest {
|
|||||||
List<Customer> customerList = customerRepository.findAll();
|
List<Customer> customerList = customerRepository.findAll();
|
||||||
assertThat(customerList).hasSize(databaseSizeBeforeCreate + 1);
|
assertThat(customerList).hasSize(databaseSizeBeforeCreate + 1);
|
||||||
Customer testCustomer = customerList.get(customerList.size() - 1);
|
Customer testCustomer = customerList.get(customerList.size() - 1);
|
||||||
assertThat(testCustomer.getNumber()).isEqualTo(DEFAULT_NUMBER);
|
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.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);
|
||||||
assertThat(testCustomer.getBillingAddress()).isEqualTo(DEFAULT_BILLING_ADDRESS);
|
assertThat(testCustomer.getBillingAddress()).isEqualTo(DEFAULT_BILLING_ADDRESS);
|
||||||
|
assertThat(testCustomer.getRemark()).isEqualTo(DEFAULT_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -181,10 +191,10 @@ public class CustomerResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void checkNumberIsRequired() throws Exception {
|
public void checkReferenceIsRequired() throws Exception {
|
||||||
int databaseSizeBeforeTest = customerRepository.findAll().size();
|
int databaseSizeBeforeTest = customerRepository.findAll().size();
|
||||||
// set the field null
|
// set the field null
|
||||||
customer.setNumber(null);
|
customer.setReference(null);
|
||||||
|
|
||||||
// Create the Customer, which fails.
|
// Create the Customer, which fails.
|
||||||
CustomerDTO customerDTO = customerMapper.toDto(customer);
|
CustomerDTO customerDTO = customerMapper.toDto(customer);
|
||||||
@ -266,13 +276,14 @@ public class CustomerResourceIntTest {
|
|||||||
.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(customer.getId().intValue())))
|
.andExpect(jsonPath("$.[*].id").value(hasItem(customer.getId().intValue())))
|
||||||
.andExpect(jsonPath("$.[*].number").value(hasItem(DEFAULT_NUMBER)))
|
.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("$.[*].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())))
|
||||||
.andExpect(jsonPath("$.[*].billingAddress").value(hasItem(DEFAULT_BILLING_ADDRESS.toString())));
|
.andExpect(jsonPath("$.[*].billingAddress").value(hasItem(DEFAULT_BILLING_ADDRESS.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK.toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -286,78 +297,79 @@ public class CustomerResourceIntTest {
|
|||||||
.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(customer.getId().intValue()))
|
.andExpect(jsonPath("$.id").value(customer.getId().intValue()))
|
||||||
.andExpect(jsonPath("$.number").value(DEFAULT_NUMBER))
|
.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("$.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()))
|
||||||
.andExpect(jsonPath("$.billingAddress").value(DEFAULT_BILLING_ADDRESS.toString()));
|
.andExpect(jsonPath("$.billingAddress").value(DEFAULT_BILLING_ADDRESS.toString()))
|
||||||
|
.andExpect(jsonPath("$.remark").value(DEFAULT_REMARK.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllCustomersByNumberIsEqualToSomething() throws Exception {
|
public void getAllCustomersByReferenceIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
customerRepository.saveAndFlush(customer);
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
// Get all the customerList where number equals to DEFAULT_NUMBER
|
// Get all the customerList where reference equals to DEFAULT_REFERENCE
|
||||||
defaultCustomerShouldBeFound("number.equals=" + DEFAULT_NUMBER);
|
defaultCustomerShouldBeFound("reference.equals=" + DEFAULT_REFERENCE);
|
||||||
|
|
||||||
// Get all the customerList where number equals to UPDATED_NUMBER
|
// Get all the customerList where reference equals to UPDATED_REFERENCE
|
||||||
defaultCustomerShouldNotBeFound("number.equals=" + UPDATED_NUMBER);
|
defaultCustomerShouldNotBeFound("reference.equals=" + UPDATED_REFERENCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllCustomersByNumberIsInShouldWork() throws Exception {
|
public void getAllCustomersByReferenceIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
customerRepository.saveAndFlush(customer);
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
// Get all the customerList where number in DEFAULT_NUMBER or UPDATED_NUMBER
|
// Get all the customerList where reference in DEFAULT_REFERENCE or UPDATED_REFERENCE
|
||||||
defaultCustomerShouldBeFound("number.in=" + DEFAULT_NUMBER + "," + UPDATED_NUMBER);
|
defaultCustomerShouldBeFound("reference.in=" + DEFAULT_REFERENCE + "," + UPDATED_REFERENCE);
|
||||||
|
|
||||||
// Get all the customerList where number equals to UPDATED_NUMBER
|
// Get all the customerList where reference equals to UPDATED_REFERENCE
|
||||||
defaultCustomerShouldNotBeFound("number.in=" + UPDATED_NUMBER);
|
defaultCustomerShouldNotBeFound("reference.in=" + UPDATED_REFERENCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllCustomersByNumberIsNullOrNotNull() throws Exception {
|
public void getAllCustomersByReferenceIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
customerRepository.saveAndFlush(customer);
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
// Get all the customerList where number is not null
|
// Get all the customerList where reference is not null
|
||||||
defaultCustomerShouldBeFound("number.specified=true");
|
defaultCustomerShouldBeFound("reference.specified=true");
|
||||||
|
|
||||||
// Get all the customerList where number is null
|
// Get all the customerList where reference is null
|
||||||
defaultCustomerShouldNotBeFound("number.specified=false");
|
defaultCustomerShouldNotBeFound("reference.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllCustomersByNumberIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllCustomersByReferenceIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
customerRepository.saveAndFlush(customer);
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
// Get all the customerList where number greater than or equals to DEFAULT_NUMBER
|
// Get all the customerList where reference greater than or equals to DEFAULT_REFERENCE
|
||||||
defaultCustomerShouldBeFound("number.greaterOrEqualThan=" + DEFAULT_NUMBER);
|
defaultCustomerShouldBeFound("reference.greaterOrEqualThan=" + DEFAULT_REFERENCE);
|
||||||
|
|
||||||
// Get all the customerList where number greater than or equals to (DEFAULT_NUMBER + 1)
|
// Get all the customerList where reference greater than or equals to (DEFAULT_REFERENCE + 1)
|
||||||
defaultCustomerShouldNotBeFound("number.greaterOrEqualThan=" + (DEFAULT_NUMBER + 1));
|
defaultCustomerShouldNotBeFound("reference.greaterOrEqualThan=" + (DEFAULT_REFERENCE + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllCustomersByNumberIsLessThanSomething() throws Exception {
|
public void getAllCustomersByReferenceIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
customerRepository.saveAndFlush(customer);
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
// Get all the customerList where number less than or equals to DEFAULT_NUMBER
|
// Get all the customerList where reference less than or equals to DEFAULT_REFERENCE
|
||||||
defaultCustomerShouldNotBeFound("number.lessThan=" + DEFAULT_NUMBER);
|
defaultCustomerShouldNotBeFound("reference.lessThan=" + DEFAULT_REFERENCE);
|
||||||
|
|
||||||
// Get all the customerList where number less than or equals to (DEFAULT_NUMBER + 1)
|
// Get all the customerList where reference less than or equals to (DEFAULT_REFERENCE + 1)
|
||||||
defaultCustomerShouldBeFound("number.lessThan=" + (DEFAULT_NUMBER + 1));
|
defaultCustomerShouldBeFound("reference.lessThan=" + (DEFAULT_REFERENCE + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -558,41 +570,80 @@ public class CustomerResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllCustomersByBillingAddressIsEqualToSomething() throws Exception {
|
public void getAllCustomersByContractualAddressIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
customerRepository.saveAndFlush(customer);
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
// Get all the customerList where billingAddress equals to DEFAULT_BILLING_ADDRESS
|
// Get all the customerList where contractualAddress equals to DEFAULT_CONTRACTUAL_ADDRESS
|
||||||
defaultCustomerShouldBeFound("billingAddress.equals=" + DEFAULT_BILLING_ADDRESS);
|
defaultCustomerShouldBeFound("contractualAddress.equals=" + DEFAULT_CONTRACTUAL_ADDRESS);
|
||||||
|
|
||||||
// Get all the customerList where billingAddress equals to UPDATED_BILLING_ADDRESS
|
// Get all the customerList where contractualAddress equals to UPDATED_CONTRACTUAL_ADDRESS
|
||||||
defaultCustomerShouldNotBeFound("billingAddress.equals=" + UPDATED_BILLING_ADDRESS);
|
defaultCustomerShouldNotBeFound("contractualAddress.equals=" + UPDATED_CONTRACTUAL_ADDRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllCustomersByBillingAddressIsInShouldWork() throws Exception {
|
public void getAllCustomersByContractualAddressIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
customerRepository.saveAndFlush(customer);
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
// Get all the customerList where billingAddress in DEFAULT_BILLING_ADDRESS or UPDATED_BILLING_ADDRESS
|
// Get all the customerList where contractualAddress in DEFAULT_CONTRACTUAL_ADDRESS or UPDATED_CONTRACTUAL_ADDRESS
|
||||||
defaultCustomerShouldBeFound("billingAddress.in=" + DEFAULT_BILLING_ADDRESS + "," + UPDATED_BILLING_ADDRESS);
|
defaultCustomerShouldBeFound("contractualAddress.in=" + DEFAULT_CONTRACTUAL_ADDRESS + "," + UPDATED_CONTRACTUAL_ADDRESS);
|
||||||
|
|
||||||
// Get all the customerList where billingAddress equals to UPDATED_BILLING_ADDRESS
|
// Get all the customerList where contractualAddress equals to UPDATED_CONTRACTUAL_ADDRESS
|
||||||
defaultCustomerShouldNotBeFound("billingAddress.in=" + UPDATED_BILLING_ADDRESS);
|
defaultCustomerShouldNotBeFound("contractualAddress.in=" + UPDATED_CONTRACTUAL_ADDRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllCustomersByBillingAddressIsNullOrNotNull() throws Exception {
|
public void getAllCustomersByContractualAddressIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
customerRepository.saveAndFlush(customer);
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
// Get all the customerList where billingAddress is not null
|
// Get all the customerList where contractualAddress is not null
|
||||||
defaultCustomerShouldBeFound("billingAddress.specified=true");
|
defaultCustomerShouldBeFound("contractualAddress.specified=true");
|
||||||
|
|
||||||
// Get all the customerList where billingAddress is null
|
// Get all the customerList where contractualAddress is null
|
||||||
defaultCustomerShouldNotBeFound("billingAddress.specified=false");
|
defaultCustomerShouldNotBeFound("contractualAddress.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByRemarkIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where remark equals to DEFAULT_REMARK
|
||||||
|
defaultCustomerShouldBeFound("remark.equals=" + DEFAULT_REMARK);
|
||||||
|
|
||||||
|
// Get all the customerList where remark equals to UPDATED_REMARK
|
||||||
|
defaultCustomerShouldNotBeFound("remark.equals=" + UPDATED_REMARK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByRemarkIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where remark in DEFAULT_REMARK or UPDATED_REMARK
|
||||||
|
defaultCustomerShouldBeFound("remark.in=" + DEFAULT_REMARK + "," + UPDATED_REMARK);
|
||||||
|
|
||||||
|
// Get all the customerList where remark equals to UPDATED_REMARK
|
||||||
|
defaultCustomerShouldNotBeFound("remark.in=" + UPDATED_REMARK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllCustomersByRemarkIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
customerRepository.saveAndFlush(customer);
|
||||||
|
|
||||||
|
// Get all the customerList where remark is not null
|
||||||
|
defaultCustomerShouldBeFound("remark.specified=true");
|
||||||
|
|
||||||
|
// Get all the customerList where remark is null
|
||||||
|
defaultCustomerShouldNotBeFound("remark.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -640,13 +691,14 @@ public class CustomerResourceIntTest {
|
|||||||
.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(customer.getId().intValue())))
|
.andExpect(jsonPath("$.[*].id").value(hasItem(customer.getId().intValue())))
|
||||||
.andExpect(jsonPath("$.[*].number").value(hasItem(DEFAULT_NUMBER)))
|
.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("$.[*].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)))
|
||||||
.andExpect(jsonPath("$.[*].billingAddress").value(hasItem(DEFAULT_BILLING_ADDRESS)));
|
.andExpect(jsonPath("$.[*].billingAddress").value(hasItem(DEFAULT_BILLING_ADDRESS)))
|
||||||
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK)));
|
||||||
|
|
||||||
// Check, that the count call also returns 1
|
// Check, that the count call also returns 1
|
||||||
restCustomerMockMvc.perform(get("/api/customers/count?sort=id,desc&" + filter))
|
restCustomerMockMvc.perform(get("/api/customers/count?sort=id,desc&" + filter))
|
||||||
@ -694,13 +746,14 @@ public class CustomerResourceIntTest {
|
|||||||
// Disconnect from session so that the updates on updatedCustomer are not directly saved in db
|
// Disconnect from session so that the updates on updatedCustomer are not directly saved in db
|
||||||
em.detach(updatedCustomer);
|
em.detach(updatedCustomer);
|
||||||
updatedCustomer
|
updatedCustomer
|
||||||
.number(UPDATED_NUMBER)
|
.reference(UPDATED_REFERENCE)
|
||||||
.prefix(UPDATED_PREFIX)
|
.prefix(UPDATED_PREFIX)
|
||||||
.name(UPDATED_NAME)
|
.name(UPDATED_NAME)
|
||||||
.contractualSalutation(UPDATED_CONTRACTUAL_SALUTATION)
|
.contractualSalutation(UPDATED_CONTRACTUAL_SALUTATION)
|
||||||
.contractualAddress(UPDATED_CONTRACTUAL_ADDRESS)
|
.contractualAddress(UPDATED_CONTRACTUAL_ADDRESS)
|
||||||
.billingSalutation(UPDATED_BILLING_SALUTATION)
|
.billingSalutation(UPDATED_BILLING_SALUTATION)
|
||||||
.billingAddress(UPDATED_BILLING_ADDRESS);
|
.billingAddress(UPDATED_BILLING_ADDRESS)
|
||||||
|
.remark(UPDATED_REMARK);
|
||||||
CustomerDTO customerDTO = customerMapper.toDto(updatedCustomer);
|
CustomerDTO customerDTO = customerMapper.toDto(updatedCustomer);
|
||||||
|
|
||||||
restCustomerMockMvc.perform(put("/api/customers")
|
restCustomerMockMvc.perform(put("/api/customers")
|
||||||
@ -712,13 +765,14 @@ public class CustomerResourceIntTest {
|
|||||||
List<Customer> customerList = customerRepository.findAll();
|
List<Customer> customerList = customerRepository.findAll();
|
||||||
assertThat(customerList).hasSize(databaseSizeBeforeUpdate);
|
assertThat(customerList).hasSize(databaseSizeBeforeUpdate);
|
||||||
Customer testCustomer = customerList.get(customerList.size() - 1);
|
Customer testCustomer = customerList.get(customerList.size() - 1);
|
||||||
assertThat(testCustomer.getNumber()).isEqualTo(UPDATED_NUMBER);
|
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.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);
|
||||||
assertThat(testCustomer.getBillingAddress()).isEqualTo(UPDATED_BILLING_ADDRESS);
|
assertThat(testCustomer.getBillingAddress()).isEqualTo(UPDATED_BILLING_ADDRESS);
|
||||||
|
assertThat(testCustomer.getRemark()).isEqualTo(UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -50,14 +50,17 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||||||
@SpringBootTest(classes = HsadminNgApp.class)
|
@SpringBootTest(classes = HsadminNgApp.class)
|
||||||
public class MembershipResourceIntTest {
|
public class MembershipResourceIntTest {
|
||||||
|
|
||||||
private static final LocalDate DEFAULT_FROM = LocalDate.ofEpochDay(0L);
|
private static final LocalDate DEFAULT_DOCUMENT_DATE = LocalDate.ofEpochDay(0L);
|
||||||
private static final LocalDate UPDATED_FROM = LocalDate.now(ZoneId.systemDefault());
|
private static final LocalDate UPDATED_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
private static final LocalDate DEFAULT_TO = LocalDate.ofEpochDay(0L);
|
private static final LocalDate DEFAULT_MEMBER_FROM = LocalDate.ofEpochDay(0L);
|
||||||
private static final LocalDate UPDATED_TO = LocalDate.now(ZoneId.systemDefault());
|
private static final LocalDate UPDATED_MEMBER_FROM = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
private static final String DEFAULT_COMMENT = "AAAAAAAAAA";
|
private static final LocalDate DEFAULT_MEMBER_UNTIL = LocalDate.ofEpochDay(0L);
|
||||||
private static final String UPDATED_COMMENT = "BBBBBBBBBB";
|
private static final LocalDate UPDATED_MEMBER_UNTIL = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
private static final String DEFAULT_REMARK = "AAAAAAAAAA";
|
||||||
|
private static final String UPDATED_REMARK = "BBBBBBBBBB";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MembershipRepository membershipRepository;
|
private MembershipRepository membershipRepository;
|
||||||
@ -110,9 +113,10 @@ public class MembershipResourceIntTest {
|
|||||||
*/
|
*/
|
||||||
public static Membership createEntity(EntityManager em) {
|
public static Membership createEntity(EntityManager em) {
|
||||||
Membership membership = new Membership()
|
Membership membership = new Membership()
|
||||||
.from(DEFAULT_FROM)
|
.documentDate(DEFAULT_DOCUMENT_DATE)
|
||||||
.to(DEFAULT_TO)
|
.memberFrom(DEFAULT_MEMBER_FROM)
|
||||||
.comment(DEFAULT_COMMENT);
|
.memberUntil(DEFAULT_MEMBER_UNTIL)
|
||||||
|
.remark(DEFAULT_REMARK);
|
||||||
// Add required entity
|
// Add required entity
|
||||||
Customer customer = CustomerResourceIntTest.createEntity(em);
|
Customer customer = CustomerResourceIntTest.createEntity(em);
|
||||||
em.persist(customer);
|
em.persist(customer);
|
||||||
@ -142,9 +146,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.getFrom()).isEqualTo(DEFAULT_FROM);
|
assertThat(testMembership.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE);
|
||||||
assertThat(testMembership.getTo()).isEqualTo(DEFAULT_TO);
|
assertThat(testMembership.getMemberFrom()).isEqualTo(DEFAULT_MEMBER_FROM);
|
||||||
assertThat(testMembership.getComment()).isEqualTo(DEFAULT_COMMENT);
|
assertThat(testMembership.getMemberUntil()).isEqualTo(DEFAULT_MEMBER_UNTIL);
|
||||||
|
assertThat(testMembership.getRemark()).isEqualTo(DEFAULT_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -169,10 +174,29 @@ public class MembershipResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void checkFromIsRequired() throws Exception {
|
public void checkDocumentDateIsRequired() throws Exception {
|
||||||
int databaseSizeBeforeTest = membershipRepository.findAll().size();
|
int databaseSizeBeforeTest = membershipRepository.findAll().size();
|
||||||
// set the field null
|
// set the field null
|
||||||
membership.setFrom(null);
|
membership.setDocumentDate(null);
|
||||||
|
|
||||||
|
// Create the Membership, which fails.
|
||||||
|
MembershipDTO membershipDTO = membershipMapper.toDto(membership);
|
||||||
|
|
||||||
|
restMembershipMockMvc.perform(post("/api/memberships")
|
||||||
|
.contentType(TestUtil.APPLICATION_JSON_UTF8)
|
||||||
|
.content(TestUtil.convertObjectToJsonBytes(membershipDTO)))
|
||||||
|
.andExpect(status().isBadRequest());
|
||||||
|
|
||||||
|
List<Membership> membershipList = membershipRepository.findAll();
|
||||||
|
assertThat(membershipList).hasSize(databaseSizeBeforeTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void checkMemberFromIsRequired() throws Exception {
|
||||||
|
int databaseSizeBeforeTest = membershipRepository.findAll().size();
|
||||||
|
// set the field null
|
||||||
|
membership.setMemberFrom(null);
|
||||||
|
|
||||||
// Create the Membership, which fails.
|
// Create the Membership, which fails.
|
||||||
MembershipDTO membershipDTO = membershipMapper.toDto(membership);
|
MembershipDTO membershipDTO = membershipMapper.toDto(membership);
|
||||||
@ -197,9 +221,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("$.[*].from").value(hasItem(DEFAULT_FROM.toString())))
|
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].to").value(hasItem(DEFAULT_TO.toString())))
|
.andExpect(jsonPath("$.[*].memberFrom").value(hasItem(DEFAULT_MEMBER_FROM.toString())))
|
||||||
.andExpect(jsonPath("$.[*].comment").value(hasItem(DEFAULT_COMMENT.toString())));
|
.andExpect(jsonPath("$.[*].memberUntil").value(hasItem(DEFAULT_MEMBER_UNTIL.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK.toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -213,180 +238,247 @@ 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("$.from").value(DEFAULT_FROM.toString()))
|
.andExpect(jsonPath("$.documentDate").value(DEFAULT_DOCUMENT_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.to").value(DEFAULT_TO.toString()))
|
.andExpect(jsonPath("$.memberFrom").value(DEFAULT_MEMBER_FROM.toString()))
|
||||||
.andExpect(jsonPath("$.comment").value(DEFAULT_COMMENT.toString()));
|
.andExpect(jsonPath("$.memberUntil").value(DEFAULT_MEMBER_UNTIL.toString()))
|
||||||
|
.andExpect(jsonPath("$.remark").value(DEFAULT_REMARK.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByFromIsEqualToSomething() throws Exception {
|
public void getAllMembershipsByDocumentDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where from equals to DEFAULT_FROM
|
// Get all the membershipList where documentDate equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("from.equals=" + DEFAULT_FROM);
|
defaultMembershipShouldBeFound("documentDate.equals=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where from equals to UPDATED_FROM
|
// Get all the membershipList where documentDate equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("from.equals=" + UPDATED_FROM);
|
defaultMembershipShouldNotBeFound("documentDate.equals=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByFromIsInShouldWork() throws Exception {
|
public void getAllMembershipsByDocumentDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where from in DEFAULT_FROM or UPDATED_FROM
|
// Get all the membershipList where documentDate in DEFAULT_DOCUMENT_DATE or UPDATED_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("from.in=" + DEFAULT_FROM + "," + UPDATED_FROM);
|
defaultMembershipShouldBeFound("documentDate.in=" + DEFAULT_DOCUMENT_DATE + "," + UPDATED_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where from equals to UPDATED_FROM
|
// Get all the membershipList where documentDate equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("from.in=" + UPDATED_FROM);
|
defaultMembershipShouldNotBeFound("documentDate.in=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByFromIsNullOrNotNull() throws Exception {
|
public void getAllMembershipsByDocumentDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where from is not null
|
// Get all the membershipList where documentDate is not null
|
||||||
defaultMembershipShouldBeFound("from.specified=true");
|
defaultMembershipShouldBeFound("documentDate.specified=true");
|
||||||
|
|
||||||
// Get all the membershipList where from is null
|
// Get all the membershipList where documentDate is null
|
||||||
defaultMembershipShouldNotBeFound("from.specified=false");
|
defaultMembershipShouldNotBeFound("documentDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByFromIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllMembershipsByDocumentDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where from greater than or equals to DEFAULT_FROM
|
// Get all the membershipList where documentDate greater than or equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("from.greaterOrEqualThan=" + DEFAULT_FROM);
|
defaultMembershipShouldBeFound("documentDate.greaterOrEqualThan=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where from greater than or equals to UPDATED_FROM
|
// Get all the membershipList where documentDate greater than or equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("from.greaterOrEqualThan=" + UPDATED_FROM);
|
defaultMembershipShouldNotBeFound("documentDate.greaterOrEqualThan=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByFromIsLessThanSomething() throws Exception {
|
public void getAllMembershipsByDocumentDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where from less than or equals to DEFAULT_FROM
|
// Get all the membershipList where documentDate less than or equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultMembershipShouldNotBeFound("from.lessThan=" + DEFAULT_FROM);
|
defaultMembershipShouldNotBeFound("documentDate.lessThan=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the membershipList where from less than or equals to UPDATED_FROM
|
// Get all the membershipList where documentDate less than or equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultMembershipShouldBeFound("from.lessThan=" + UPDATED_FROM);
|
defaultMembershipShouldBeFound("documentDate.lessThan=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByToIsEqualToSomething() throws Exception {
|
public void getAllMembershipsByMemberFromIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where to equals to DEFAULT_TO
|
// Get all the membershipList where memberFrom equals to DEFAULT_MEMBER_FROM
|
||||||
defaultMembershipShouldBeFound("to.equals=" + DEFAULT_TO);
|
defaultMembershipShouldBeFound("memberFrom.equals=" + DEFAULT_MEMBER_FROM);
|
||||||
|
|
||||||
// Get all the membershipList where to equals to UPDATED_TO
|
// Get all the membershipList where memberFrom equals to UPDATED_MEMBER_FROM
|
||||||
defaultMembershipShouldNotBeFound("to.equals=" + UPDATED_TO);
|
defaultMembershipShouldNotBeFound("memberFrom.equals=" + UPDATED_MEMBER_FROM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByToIsInShouldWork() throws Exception {
|
public void getAllMembershipsByMemberFromIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where to in DEFAULT_TO or UPDATED_TO
|
// Get all the membershipList where memberFrom in DEFAULT_MEMBER_FROM or UPDATED_MEMBER_FROM
|
||||||
defaultMembershipShouldBeFound("to.in=" + DEFAULT_TO + "," + UPDATED_TO);
|
defaultMembershipShouldBeFound("memberFrom.in=" + DEFAULT_MEMBER_FROM + "," + UPDATED_MEMBER_FROM);
|
||||||
|
|
||||||
// Get all the membershipList where to equals to UPDATED_TO
|
// Get all the membershipList where memberFrom equals to UPDATED_MEMBER_FROM
|
||||||
defaultMembershipShouldNotBeFound("to.in=" + UPDATED_TO);
|
defaultMembershipShouldNotBeFound("memberFrom.in=" + UPDATED_MEMBER_FROM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByToIsNullOrNotNull() throws Exception {
|
public void getAllMembershipsByMemberFromIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where to is not null
|
// Get all the membershipList where memberFrom is not null
|
||||||
defaultMembershipShouldBeFound("to.specified=true");
|
defaultMembershipShouldBeFound("memberFrom.specified=true");
|
||||||
|
|
||||||
// Get all the membershipList where to is null
|
// Get all the membershipList where memberFrom is null
|
||||||
defaultMembershipShouldNotBeFound("to.specified=false");
|
defaultMembershipShouldNotBeFound("memberFrom.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByToIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllMembershipsByMemberFromIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where to greater than or equals to DEFAULT_TO
|
// Get all the membershipList where memberFrom greater than or equals to DEFAULT_MEMBER_FROM
|
||||||
defaultMembershipShouldBeFound("to.greaterOrEqualThan=" + DEFAULT_TO);
|
defaultMembershipShouldBeFound("memberFrom.greaterOrEqualThan=" + DEFAULT_MEMBER_FROM);
|
||||||
|
|
||||||
// Get all the membershipList where to greater than or equals to UPDATED_TO
|
// Get all the membershipList where memberFrom greater than or equals to UPDATED_MEMBER_FROM
|
||||||
defaultMembershipShouldNotBeFound("to.greaterOrEqualThan=" + UPDATED_TO);
|
defaultMembershipShouldNotBeFound("memberFrom.greaterOrEqualThan=" + UPDATED_MEMBER_FROM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByToIsLessThanSomething() throws Exception {
|
public void getAllMembershipsByMemberFromIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where to less than or equals to DEFAULT_TO
|
// Get all the membershipList where memberFrom less than or equals to DEFAULT_MEMBER_FROM
|
||||||
defaultMembershipShouldNotBeFound("to.lessThan=" + DEFAULT_TO);
|
defaultMembershipShouldNotBeFound("memberFrom.lessThan=" + DEFAULT_MEMBER_FROM);
|
||||||
|
|
||||||
// Get all the membershipList where to less than or equals to UPDATED_TO
|
// Get all the membershipList where memberFrom less than or equals to UPDATED_MEMBER_FROM
|
||||||
defaultMembershipShouldBeFound("to.lessThan=" + UPDATED_TO);
|
defaultMembershipShouldBeFound("memberFrom.lessThan=" + UPDATED_MEMBER_FROM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByCommentIsEqualToSomething() throws Exception {
|
public void getAllMembershipsByMemberUntilIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where comment equals to DEFAULT_COMMENT
|
// Get all the membershipList where memberUntil equals to DEFAULT_MEMBER_UNTIL
|
||||||
defaultMembershipShouldBeFound("comment.equals=" + DEFAULT_COMMENT);
|
defaultMembershipShouldBeFound("memberUntil.equals=" + DEFAULT_MEMBER_UNTIL);
|
||||||
|
|
||||||
// Get all the membershipList where comment equals to UPDATED_COMMENT
|
// Get all the membershipList where memberUntil equals to UPDATED_MEMBER_UNTIL
|
||||||
defaultMembershipShouldNotBeFound("comment.equals=" + UPDATED_COMMENT);
|
defaultMembershipShouldNotBeFound("memberUntil.equals=" + UPDATED_MEMBER_UNTIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByCommentIsInShouldWork() throws Exception {
|
public void getAllMembershipsByMemberUntilIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where comment in DEFAULT_COMMENT or UPDATED_COMMENT
|
// Get all the membershipList where memberUntil in DEFAULT_MEMBER_UNTIL or UPDATED_MEMBER_UNTIL
|
||||||
defaultMembershipShouldBeFound("comment.in=" + DEFAULT_COMMENT + "," + UPDATED_COMMENT);
|
defaultMembershipShouldBeFound("memberUntil.in=" + DEFAULT_MEMBER_UNTIL + "," + UPDATED_MEMBER_UNTIL);
|
||||||
|
|
||||||
// Get all the membershipList where comment equals to UPDATED_COMMENT
|
// Get all the membershipList where memberUntil equals to UPDATED_MEMBER_UNTIL
|
||||||
defaultMembershipShouldNotBeFound("comment.in=" + UPDATED_COMMENT);
|
defaultMembershipShouldNotBeFound("memberUntil.in=" + UPDATED_MEMBER_UNTIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllMembershipsByCommentIsNullOrNotNull() throws Exception {
|
public void getAllMembershipsByMemberUntilIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
membershipRepository.saveAndFlush(membership);
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
// Get all the membershipList where comment is not null
|
// Get all the membershipList where memberUntil is not null
|
||||||
defaultMembershipShouldBeFound("comment.specified=true");
|
defaultMembershipShouldBeFound("memberUntil.specified=true");
|
||||||
|
|
||||||
// Get all the membershipList where comment is null
|
// Get all the membershipList where memberUntil is null
|
||||||
defaultMembershipShouldNotBeFound("comment.specified=false");
|
defaultMembershipShouldNotBeFound("memberUntil.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllMembershipsByMemberUntilIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntil greater than or equals to DEFAULT_MEMBER_UNTIL
|
||||||
|
defaultMembershipShouldBeFound("memberUntil.greaterOrEqualThan=" + DEFAULT_MEMBER_UNTIL);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntil greater than or equals to UPDATED_MEMBER_UNTIL
|
||||||
|
defaultMembershipShouldNotBeFound("memberUntil.greaterOrEqualThan=" + UPDATED_MEMBER_UNTIL);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllMembershipsByMemberUntilIsLessThanSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntil less than or equals to DEFAULT_MEMBER_UNTIL
|
||||||
|
defaultMembershipShouldNotBeFound("memberUntil.lessThan=" + DEFAULT_MEMBER_UNTIL);
|
||||||
|
|
||||||
|
// Get all the membershipList where memberUntil less than or equals to UPDATED_MEMBER_UNTIL
|
||||||
|
defaultMembershipShouldBeFound("memberUntil.lessThan=" + UPDATED_MEMBER_UNTIL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllMembershipsByRemarkIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
|
// Get all the membershipList where remark equals to DEFAULT_REMARK
|
||||||
|
defaultMembershipShouldBeFound("remark.equals=" + DEFAULT_REMARK);
|
||||||
|
|
||||||
|
// Get all the membershipList where remark equals to UPDATED_REMARK
|
||||||
|
defaultMembershipShouldNotBeFound("remark.equals=" + UPDATED_REMARK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllMembershipsByRemarkIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
|
// Get all the membershipList where remark in DEFAULT_REMARK or UPDATED_REMARK
|
||||||
|
defaultMembershipShouldBeFound("remark.in=" + DEFAULT_REMARK + "," + UPDATED_REMARK);
|
||||||
|
|
||||||
|
// Get all the membershipList where remark equals to UPDATED_REMARK
|
||||||
|
defaultMembershipShouldNotBeFound("remark.in=" + UPDATED_REMARK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllMembershipsByRemarkIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
membershipRepository.saveAndFlush(membership);
|
||||||
|
|
||||||
|
// Get all the membershipList where remark is not null
|
||||||
|
defaultMembershipShouldBeFound("remark.specified=true");
|
||||||
|
|
||||||
|
// Get all the membershipList where remark is null
|
||||||
|
defaultMembershipShouldNotBeFound("remark.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -453,9 +545,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("$.[*].from").value(hasItem(DEFAULT_FROM.toString())))
|
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].to").value(hasItem(DEFAULT_TO.toString())))
|
.andExpect(jsonPath("$.[*].memberFrom").value(hasItem(DEFAULT_MEMBER_FROM.toString())))
|
||||||
.andExpect(jsonPath("$.[*].comment").value(hasItem(DEFAULT_COMMENT)));
|
.andExpect(jsonPath("$.[*].memberUntil").value(hasItem(DEFAULT_MEMBER_UNTIL.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK)));
|
||||||
|
|
||||||
// Check, that the count call also returns 1
|
// Check, that the count call also returns 1
|
||||||
restMembershipMockMvc.perform(get("/api/memberships/count?sort=id,desc&" + filter))
|
restMembershipMockMvc.perform(get("/api/memberships/count?sort=id,desc&" + filter))
|
||||||
@ -503,9 +596,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
|
||||||
.from(UPDATED_FROM)
|
.documentDate(UPDATED_DOCUMENT_DATE)
|
||||||
.to(UPDATED_TO)
|
.memberFrom(UPDATED_MEMBER_FROM)
|
||||||
.comment(UPDATED_COMMENT);
|
.memberUntil(UPDATED_MEMBER_UNTIL)
|
||||||
|
.remark(UPDATED_REMARK);
|
||||||
MembershipDTO membershipDTO = membershipMapper.toDto(updatedMembership);
|
MembershipDTO membershipDTO = membershipMapper.toDto(updatedMembership);
|
||||||
|
|
||||||
restMembershipMockMvc.perform(put("/api/memberships")
|
restMembershipMockMvc.perform(put("/api/memberships")
|
||||||
@ -517,9 +611,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.getFrom()).isEqualTo(UPDATED_FROM);
|
assertThat(testMembership.getDocumentDate()).isEqualTo(UPDATED_DOCUMENT_DATE);
|
||||||
assertThat(testMembership.getTo()).isEqualTo(UPDATED_TO);
|
assertThat(testMembership.getMemberFrom()).isEqualTo(UPDATED_MEMBER_FROM);
|
||||||
assertThat(testMembership.getComment()).isEqualTo(UPDATED_COMMENT);
|
assertThat(testMembership.getMemberUntil()).isEqualTo(UPDATED_MEMBER_UNTIL);
|
||||||
|
assertThat(testMembership.getRemark()).isEqualTo(UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -57,23 +57,23 @@ public class SepaMandateResourceIntTest {
|
|||||||
private static final String DEFAULT_BIC = "AAAAAAAAAA";
|
private static final String DEFAULT_BIC = "AAAAAAAAAA";
|
||||||
private static final String UPDATED_BIC = "BBBBBBBBBB";
|
private static final String UPDATED_BIC = "BBBBBBBBBB";
|
||||||
|
|
||||||
private static final LocalDate DEFAULT_CREATED = LocalDate.ofEpochDay(0L);
|
private static final LocalDate DEFAULT_DOCUMENT_DATE = LocalDate.ofEpochDay(0L);
|
||||||
private static final LocalDate UPDATED_CREATED = LocalDate.now(ZoneId.systemDefault());
|
private static final LocalDate UPDATED_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
private static final LocalDate DEFAULT_VALID_FROM = LocalDate.ofEpochDay(0L);
|
private static final LocalDate DEFAULT_VALID_FROM = LocalDate.ofEpochDay(0L);
|
||||||
private static final LocalDate UPDATED_VALID_FROM = LocalDate.now(ZoneId.systemDefault());
|
private static final LocalDate UPDATED_VALID_FROM = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
private static final LocalDate DEFAULT_VALID_TO = LocalDate.ofEpochDay(0L);
|
private static final LocalDate DEFAULT_VALID_UNTIL = LocalDate.ofEpochDay(0L);
|
||||||
private static final LocalDate UPDATED_VALID_TO = LocalDate.now(ZoneId.systemDefault());
|
private static final LocalDate UPDATED_VALID_UNTIL = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
private static final LocalDate DEFAULT_LAST_USED = LocalDate.ofEpochDay(0L);
|
private static final LocalDate DEFAULT_LAST_USED = LocalDate.ofEpochDay(0L);
|
||||||
private static final LocalDate UPDATED_LAST_USED = LocalDate.now(ZoneId.systemDefault());
|
private static final LocalDate UPDATED_LAST_USED = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
private static final LocalDate DEFAULT_CANCELLED = LocalDate.ofEpochDay(0L);
|
private static final LocalDate DEFAULT_CANCELLATION_DATE = LocalDate.ofEpochDay(0L);
|
||||||
private static final LocalDate UPDATED_CANCELLED = LocalDate.now(ZoneId.systemDefault());
|
private static final LocalDate UPDATED_CANCELLATION_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
private static final String DEFAULT_COMMENT = "AAAAAAAAAA";
|
private static final String DEFAULT_REMARK = "AAAAAAAAAA";
|
||||||
private static final String UPDATED_COMMENT = "BBBBBBBBBB";
|
private static final String UPDATED_REMARK = "BBBBBBBBBB";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SepaMandateRepository sepaMandateRepository;
|
private SepaMandateRepository sepaMandateRepository;
|
||||||
@ -129,12 +129,12 @@ public class SepaMandateResourceIntTest {
|
|||||||
.reference(DEFAULT_REFERENCE)
|
.reference(DEFAULT_REFERENCE)
|
||||||
.iban(DEFAULT_IBAN)
|
.iban(DEFAULT_IBAN)
|
||||||
.bic(DEFAULT_BIC)
|
.bic(DEFAULT_BIC)
|
||||||
.created(DEFAULT_CREATED)
|
.documentDate(DEFAULT_DOCUMENT_DATE)
|
||||||
.validFrom(DEFAULT_VALID_FROM)
|
.validFrom(DEFAULT_VALID_FROM)
|
||||||
.validTo(DEFAULT_VALID_TO)
|
.validUntil(DEFAULT_VALID_UNTIL)
|
||||||
.lastUsed(DEFAULT_LAST_USED)
|
.lastUsed(DEFAULT_LAST_USED)
|
||||||
.cancelled(DEFAULT_CANCELLED)
|
.cancellationDate(DEFAULT_CANCELLATION_DATE)
|
||||||
.comment(DEFAULT_COMMENT);
|
.remark(DEFAULT_REMARK);
|
||||||
// Add required entity
|
// Add required entity
|
||||||
Customer customer = CustomerResourceIntTest.createEntity(em);
|
Customer customer = CustomerResourceIntTest.createEntity(em);
|
||||||
em.persist(customer);
|
em.persist(customer);
|
||||||
@ -167,12 +167,12 @@ 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.getCreated()).isEqualTo(DEFAULT_CREATED);
|
assertThat(testSepaMandate.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE);
|
||||||
assertThat(testSepaMandate.getValidFrom()).isEqualTo(DEFAULT_VALID_FROM);
|
assertThat(testSepaMandate.getValidFrom()).isEqualTo(DEFAULT_VALID_FROM);
|
||||||
assertThat(testSepaMandate.getValidTo()).isEqualTo(DEFAULT_VALID_TO);
|
assertThat(testSepaMandate.getValidUntil()).isEqualTo(DEFAULT_VALID_UNTIL);
|
||||||
assertThat(testSepaMandate.getLastUsed()).isEqualTo(DEFAULT_LAST_USED);
|
assertThat(testSepaMandate.getLastUsed()).isEqualTo(DEFAULT_LAST_USED);
|
||||||
assertThat(testSepaMandate.getCancelled()).isEqualTo(DEFAULT_CANCELLED);
|
assertThat(testSepaMandate.getCancellationDate()).isEqualTo(DEFAULT_CANCELLATION_DATE);
|
||||||
assertThat(testSepaMandate.getComment()).isEqualTo(DEFAULT_COMMENT);
|
assertThat(testSepaMandate.getRemark()).isEqualTo(DEFAULT_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -216,10 +216,10 @@ public class SepaMandateResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void checkCreatedIsRequired() throws Exception {
|
public void checkDocumentDateIsRequired() throws Exception {
|
||||||
int databaseSizeBeforeTest = sepaMandateRepository.findAll().size();
|
int databaseSizeBeforeTest = sepaMandateRepository.findAll().size();
|
||||||
// set the field null
|
// set the field null
|
||||||
sepaMandate.setCreated(null);
|
sepaMandate.setDocumentDate(null);
|
||||||
|
|
||||||
// Create the SepaMandate, which fails.
|
// Create the SepaMandate, which fails.
|
||||||
SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate);
|
SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(sepaMandate);
|
||||||
@ -266,12 +266,12 @@ 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("$.[*].created").value(hasItem(DEFAULT_CREATED.toString())))
|
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].validFrom").value(hasItem(DEFAULT_VALID_FROM.toString())))
|
.andExpect(jsonPath("$.[*].validFrom").value(hasItem(DEFAULT_VALID_FROM.toString())))
|
||||||
.andExpect(jsonPath("$.[*].validTo").value(hasItem(DEFAULT_VALID_TO.toString())))
|
.andExpect(jsonPath("$.[*].validUntil").value(hasItem(DEFAULT_VALID_UNTIL.toString())))
|
||||||
.andExpect(jsonPath("$.[*].lastUsed").value(hasItem(DEFAULT_LAST_USED.toString())))
|
.andExpect(jsonPath("$.[*].lastUsed").value(hasItem(DEFAULT_LAST_USED.toString())))
|
||||||
.andExpect(jsonPath("$.[*].cancelled").value(hasItem(DEFAULT_CANCELLED.toString())))
|
.andExpect(jsonPath("$.[*].cancellationDate").value(hasItem(DEFAULT_CANCELLATION_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].comment").value(hasItem(DEFAULT_COMMENT.toString())));
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK.toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -288,12 +288,12 @@ 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("$.created").value(DEFAULT_CREATED.toString()))
|
.andExpect(jsonPath("$.documentDate").value(DEFAULT_DOCUMENT_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.validFrom").value(DEFAULT_VALID_FROM.toString()))
|
.andExpect(jsonPath("$.validFrom").value(DEFAULT_VALID_FROM.toString()))
|
||||||
.andExpect(jsonPath("$.validTo").value(DEFAULT_VALID_TO.toString()))
|
.andExpect(jsonPath("$.validUntil").value(DEFAULT_VALID_UNTIL.toString()))
|
||||||
.andExpect(jsonPath("$.lastUsed").value(DEFAULT_LAST_USED.toString()))
|
.andExpect(jsonPath("$.lastUsed").value(DEFAULT_LAST_USED.toString()))
|
||||||
.andExpect(jsonPath("$.cancelled").value(DEFAULT_CANCELLED.toString()))
|
.andExpect(jsonPath("$.cancellationDate").value(DEFAULT_CANCELLATION_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.comment").value(DEFAULT_COMMENT.toString()));
|
.andExpect(jsonPath("$.remark").value(DEFAULT_REMARK.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -415,67 +415,67 @@ public class SepaMandateResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCreatedIsEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByDocumentDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where created equals to DEFAULT_CREATED
|
// Get all the sepaMandateList where documentDate equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("created.equals=" + DEFAULT_CREATED);
|
defaultSepaMandateShouldBeFound("documentDate.equals=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where created equals to UPDATED_CREATED
|
// Get all the sepaMandateList where documentDate equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("created.equals=" + UPDATED_CREATED);
|
defaultSepaMandateShouldNotBeFound("documentDate.equals=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCreatedIsInShouldWork() throws Exception {
|
public void getAllSepaMandatesByDocumentDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where created in DEFAULT_CREATED or UPDATED_CREATED
|
// Get all the sepaMandateList where documentDate in DEFAULT_DOCUMENT_DATE or UPDATED_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("created.in=" + DEFAULT_CREATED + "," + UPDATED_CREATED);
|
defaultSepaMandateShouldBeFound("documentDate.in=" + DEFAULT_DOCUMENT_DATE + "," + UPDATED_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where created equals to UPDATED_CREATED
|
// Get all the sepaMandateList where documentDate equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("created.in=" + UPDATED_CREATED);
|
defaultSepaMandateShouldNotBeFound("documentDate.in=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCreatedIsNullOrNotNull() throws Exception {
|
public void getAllSepaMandatesByDocumentDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where created is not null
|
// Get all the sepaMandateList where documentDate is not null
|
||||||
defaultSepaMandateShouldBeFound("created.specified=true");
|
defaultSepaMandateShouldBeFound("documentDate.specified=true");
|
||||||
|
|
||||||
// Get all the sepaMandateList where created is null
|
// Get all the sepaMandateList where documentDate is null
|
||||||
defaultSepaMandateShouldNotBeFound("created.specified=false");
|
defaultSepaMandateShouldNotBeFound("documentDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCreatedIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByDocumentDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where created greater than or equals to DEFAULT_CREATED
|
// Get all the sepaMandateList where documentDate greater than or equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("created.greaterOrEqualThan=" + DEFAULT_CREATED);
|
defaultSepaMandateShouldBeFound("documentDate.greaterOrEqualThan=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where created greater than or equals to UPDATED_CREATED
|
// Get all the sepaMandateList where documentDate greater than or equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("created.greaterOrEqualThan=" + UPDATED_CREATED);
|
defaultSepaMandateShouldNotBeFound("documentDate.greaterOrEqualThan=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCreatedIsLessThanSomething() throws Exception {
|
public void getAllSepaMandatesByDocumentDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where created less than or equals to DEFAULT_CREATED
|
// Get all the sepaMandateList where documentDate less than or equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("created.lessThan=" + DEFAULT_CREATED);
|
defaultSepaMandateShouldNotBeFound("documentDate.lessThan=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where created less than or equals to UPDATED_CREATED
|
// Get all the sepaMandateList where documentDate less than or equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultSepaMandateShouldBeFound("created.lessThan=" + UPDATED_CREATED);
|
defaultSepaMandateShouldBeFound("documentDate.lessThan=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -547,67 +547,67 @@ public class SepaMandateResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidToIsEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByValidUntilIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validTo equals to DEFAULT_VALID_TO
|
// Get all the sepaMandateList where validUntil equals to DEFAULT_VALID_UNTIL
|
||||||
defaultSepaMandateShouldBeFound("validTo.equals=" + DEFAULT_VALID_TO);
|
defaultSepaMandateShouldBeFound("validUntil.equals=" + DEFAULT_VALID_UNTIL);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validTo equals to UPDATED_VALID_TO
|
// Get all the sepaMandateList where validUntil equals to UPDATED_VALID_UNTIL
|
||||||
defaultSepaMandateShouldNotBeFound("validTo.equals=" + UPDATED_VALID_TO);
|
defaultSepaMandateShouldNotBeFound("validUntil.equals=" + UPDATED_VALID_UNTIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidToIsInShouldWork() throws Exception {
|
public void getAllSepaMandatesByValidUntilIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validTo in DEFAULT_VALID_TO or UPDATED_VALID_TO
|
// Get all the sepaMandateList where validUntil in DEFAULT_VALID_UNTIL or UPDATED_VALID_UNTIL
|
||||||
defaultSepaMandateShouldBeFound("validTo.in=" + DEFAULT_VALID_TO + "," + UPDATED_VALID_TO);
|
defaultSepaMandateShouldBeFound("validUntil.in=" + DEFAULT_VALID_UNTIL + "," + UPDATED_VALID_UNTIL);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validTo equals to UPDATED_VALID_TO
|
// Get all the sepaMandateList where validUntil equals to UPDATED_VALID_UNTIL
|
||||||
defaultSepaMandateShouldNotBeFound("validTo.in=" + UPDATED_VALID_TO);
|
defaultSepaMandateShouldNotBeFound("validUntil.in=" + UPDATED_VALID_UNTIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidToIsNullOrNotNull() throws Exception {
|
public void getAllSepaMandatesByValidUntilIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validTo is not null
|
// Get all the sepaMandateList where validUntil is not null
|
||||||
defaultSepaMandateShouldBeFound("validTo.specified=true");
|
defaultSepaMandateShouldBeFound("validUntil.specified=true");
|
||||||
|
|
||||||
// Get all the sepaMandateList where validTo is null
|
// Get all the sepaMandateList where validUntil is null
|
||||||
defaultSepaMandateShouldNotBeFound("validTo.specified=false");
|
defaultSepaMandateShouldNotBeFound("validUntil.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidToIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByValidUntilIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validTo greater than or equals to DEFAULT_VALID_TO
|
// Get all the sepaMandateList where validUntil greater than or equals to DEFAULT_VALID_UNTIL
|
||||||
defaultSepaMandateShouldBeFound("validTo.greaterOrEqualThan=" + DEFAULT_VALID_TO);
|
defaultSepaMandateShouldBeFound("validUntil.greaterOrEqualThan=" + DEFAULT_VALID_UNTIL);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validTo greater than or equals to UPDATED_VALID_TO
|
// Get all the sepaMandateList where validUntil greater than or equals to UPDATED_VALID_UNTIL
|
||||||
defaultSepaMandateShouldNotBeFound("validTo.greaterOrEqualThan=" + UPDATED_VALID_TO);
|
defaultSepaMandateShouldNotBeFound("validUntil.greaterOrEqualThan=" + UPDATED_VALID_UNTIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByValidToIsLessThanSomething() throws Exception {
|
public void getAllSepaMandatesByValidUntilIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validTo less than or equals to DEFAULT_VALID_TO
|
// Get all the sepaMandateList where validUntil less than or equals to DEFAULT_VALID_UNTIL
|
||||||
defaultSepaMandateShouldNotBeFound("validTo.lessThan=" + DEFAULT_VALID_TO);
|
defaultSepaMandateShouldNotBeFound("validUntil.lessThan=" + DEFAULT_VALID_UNTIL);
|
||||||
|
|
||||||
// Get all the sepaMandateList where validTo less than or equals to UPDATED_VALID_TO
|
// Get all the sepaMandateList where validUntil less than or equals to UPDATED_VALID_UNTIL
|
||||||
defaultSepaMandateShouldBeFound("validTo.lessThan=" + UPDATED_VALID_TO);
|
defaultSepaMandateShouldBeFound("validUntil.lessThan=" + UPDATED_VALID_UNTIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -679,107 +679,107 @@ public class SepaMandateResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCancelledIsEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByCancellationDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancelled equals to DEFAULT_CANCELLED
|
// Get all the sepaMandateList where cancellationDate equals to DEFAULT_CANCELLATION_DATE
|
||||||
defaultSepaMandateShouldBeFound("cancelled.equals=" + DEFAULT_CANCELLED);
|
defaultSepaMandateShouldBeFound("cancellationDate.equals=" + DEFAULT_CANCELLATION_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancelled equals to UPDATED_CANCELLED
|
// Get all the sepaMandateList where cancellationDate equals to UPDATED_CANCELLATION_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("cancelled.equals=" + UPDATED_CANCELLED);
|
defaultSepaMandateShouldNotBeFound("cancellationDate.equals=" + UPDATED_CANCELLATION_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCancelledIsInShouldWork() throws Exception {
|
public void getAllSepaMandatesByCancellationDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancelled in DEFAULT_CANCELLED or UPDATED_CANCELLED
|
// Get all the sepaMandateList where cancellationDate in DEFAULT_CANCELLATION_DATE or UPDATED_CANCELLATION_DATE
|
||||||
defaultSepaMandateShouldBeFound("cancelled.in=" + DEFAULT_CANCELLED + "," + UPDATED_CANCELLED);
|
defaultSepaMandateShouldBeFound("cancellationDate.in=" + DEFAULT_CANCELLATION_DATE + "," + UPDATED_CANCELLATION_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancelled equals to UPDATED_CANCELLED
|
// Get all the sepaMandateList where cancellationDate equals to UPDATED_CANCELLATION_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("cancelled.in=" + UPDATED_CANCELLED);
|
defaultSepaMandateShouldNotBeFound("cancellationDate.in=" + UPDATED_CANCELLATION_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCancelledIsNullOrNotNull() throws Exception {
|
public void getAllSepaMandatesByCancellationDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancelled is not null
|
// Get all the sepaMandateList where cancellationDate is not null
|
||||||
defaultSepaMandateShouldBeFound("cancelled.specified=true");
|
defaultSepaMandateShouldBeFound("cancellationDate.specified=true");
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancelled is null
|
// Get all the sepaMandateList where cancellationDate is null
|
||||||
defaultSepaMandateShouldNotBeFound("cancelled.specified=false");
|
defaultSepaMandateShouldNotBeFound("cancellationDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCancelledIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByCancellationDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancelled greater than or equals to DEFAULT_CANCELLED
|
// Get all the sepaMandateList where cancellationDate greater than or equals to DEFAULT_CANCELLATION_DATE
|
||||||
defaultSepaMandateShouldBeFound("cancelled.greaterOrEqualThan=" + DEFAULT_CANCELLED);
|
defaultSepaMandateShouldBeFound("cancellationDate.greaterOrEqualThan=" + DEFAULT_CANCELLATION_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancelled greater than or equals to UPDATED_CANCELLED
|
// Get all the sepaMandateList where cancellationDate greater than or equals to UPDATED_CANCELLATION_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("cancelled.greaterOrEqualThan=" + UPDATED_CANCELLED);
|
defaultSepaMandateShouldNotBeFound("cancellationDate.greaterOrEqualThan=" + UPDATED_CANCELLATION_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCancelledIsLessThanSomething() throws Exception {
|
public void getAllSepaMandatesByCancellationDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancelled less than or equals to DEFAULT_CANCELLED
|
// Get all the sepaMandateList where cancellationDate less than or equals to DEFAULT_CANCELLATION_DATE
|
||||||
defaultSepaMandateShouldNotBeFound("cancelled.lessThan=" + DEFAULT_CANCELLED);
|
defaultSepaMandateShouldNotBeFound("cancellationDate.lessThan=" + DEFAULT_CANCELLATION_DATE);
|
||||||
|
|
||||||
// Get all the sepaMandateList where cancelled less than or equals to UPDATED_CANCELLED
|
// Get all the sepaMandateList where cancellationDate less than or equals to UPDATED_CANCELLATION_DATE
|
||||||
defaultSepaMandateShouldBeFound("cancelled.lessThan=" + UPDATED_CANCELLED);
|
defaultSepaMandateShouldBeFound("cancellationDate.lessThan=" + UPDATED_CANCELLATION_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCommentIsEqualToSomething() throws Exception {
|
public void getAllSepaMandatesByRemarkIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where comment equals to DEFAULT_COMMENT
|
// Get all the sepaMandateList where remark equals to DEFAULT_REMARK
|
||||||
defaultSepaMandateShouldBeFound("comment.equals=" + DEFAULT_COMMENT);
|
defaultSepaMandateShouldBeFound("remark.equals=" + DEFAULT_REMARK);
|
||||||
|
|
||||||
// Get all the sepaMandateList where comment equals to UPDATED_COMMENT
|
// Get all the sepaMandateList where remark equals to UPDATED_REMARK
|
||||||
defaultSepaMandateShouldNotBeFound("comment.equals=" + UPDATED_COMMENT);
|
defaultSepaMandateShouldNotBeFound("remark.equals=" + UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCommentIsInShouldWork() throws Exception {
|
public void getAllSepaMandatesByRemarkIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where comment in DEFAULT_COMMENT or UPDATED_COMMENT
|
// Get all the sepaMandateList where remark in DEFAULT_REMARK or UPDATED_REMARK
|
||||||
defaultSepaMandateShouldBeFound("comment.in=" + DEFAULT_COMMENT + "," + UPDATED_COMMENT);
|
defaultSepaMandateShouldBeFound("remark.in=" + DEFAULT_REMARK + "," + UPDATED_REMARK);
|
||||||
|
|
||||||
// Get all the sepaMandateList where comment equals to UPDATED_COMMENT
|
// Get all the sepaMandateList where remark equals to UPDATED_REMARK
|
||||||
defaultSepaMandateShouldNotBeFound("comment.in=" + UPDATED_COMMENT);
|
defaultSepaMandateShouldNotBeFound("remark.in=" + UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSepaMandatesByCommentIsNullOrNotNull() throws Exception {
|
public void getAllSepaMandatesByRemarkIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
sepaMandateRepository.saveAndFlush(sepaMandate);
|
sepaMandateRepository.saveAndFlush(sepaMandate);
|
||||||
|
|
||||||
// Get all the sepaMandateList where comment is not null
|
// Get all the sepaMandateList where remark is not null
|
||||||
defaultSepaMandateShouldBeFound("comment.specified=true");
|
defaultSepaMandateShouldBeFound("remark.specified=true");
|
||||||
|
|
||||||
// Get all the sepaMandateList where comment is null
|
// Get all the sepaMandateList where remark is null
|
||||||
defaultSepaMandateShouldNotBeFound("comment.specified=false");
|
defaultSepaMandateShouldNotBeFound("remark.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -811,12 +811,12 @@ 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("$.[*].created").value(hasItem(DEFAULT_CREATED.toString())))
|
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].validFrom").value(hasItem(DEFAULT_VALID_FROM.toString())))
|
.andExpect(jsonPath("$.[*].validFrom").value(hasItem(DEFAULT_VALID_FROM.toString())))
|
||||||
.andExpect(jsonPath("$.[*].validTo").value(hasItem(DEFAULT_VALID_TO.toString())))
|
.andExpect(jsonPath("$.[*].validUntil").value(hasItem(DEFAULT_VALID_UNTIL.toString())))
|
||||||
.andExpect(jsonPath("$.[*].lastUsed").value(hasItem(DEFAULT_LAST_USED.toString())))
|
.andExpect(jsonPath("$.[*].lastUsed").value(hasItem(DEFAULT_LAST_USED.toString())))
|
||||||
.andExpect(jsonPath("$.[*].cancelled").value(hasItem(DEFAULT_CANCELLED.toString())))
|
.andExpect(jsonPath("$.[*].cancellationDate").value(hasItem(DEFAULT_CANCELLATION_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].comment").value(hasItem(DEFAULT_COMMENT)));
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK)));
|
||||||
|
|
||||||
// Check, that the count call also returns 1
|
// Check, that the count call also returns 1
|
||||||
restSepaMandateMockMvc.perform(get("/api/sepa-mandates/count?sort=id,desc&" + filter))
|
restSepaMandateMockMvc.perform(get("/api/sepa-mandates/count?sort=id,desc&" + filter))
|
||||||
@ -867,12 +867,12 @@ public class SepaMandateResourceIntTest {
|
|||||||
.reference(UPDATED_REFERENCE)
|
.reference(UPDATED_REFERENCE)
|
||||||
.iban(UPDATED_IBAN)
|
.iban(UPDATED_IBAN)
|
||||||
.bic(UPDATED_BIC)
|
.bic(UPDATED_BIC)
|
||||||
.created(UPDATED_CREATED)
|
.documentDate(UPDATED_DOCUMENT_DATE)
|
||||||
.validFrom(UPDATED_VALID_FROM)
|
.validFrom(UPDATED_VALID_FROM)
|
||||||
.validTo(UPDATED_VALID_TO)
|
.validUntil(UPDATED_VALID_UNTIL)
|
||||||
.lastUsed(UPDATED_LAST_USED)
|
.lastUsed(UPDATED_LAST_USED)
|
||||||
.cancelled(UPDATED_CANCELLED)
|
.cancellationDate(UPDATED_CANCELLATION_DATE)
|
||||||
.comment(UPDATED_COMMENT);
|
.remark(UPDATED_REMARK);
|
||||||
SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(updatedSepaMandate);
|
SepaMandateDTO sepaMandateDTO = sepaMandateMapper.toDto(updatedSepaMandate);
|
||||||
|
|
||||||
restSepaMandateMockMvc.perform(put("/api/sepa-mandates")
|
restSepaMandateMockMvc.perform(put("/api/sepa-mandates")
|
||||||
@ -887,12 +887,12 @@ 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.getCreated()).isEqualTo(UPDATED_CREATED);
|
assertThat(testSepaMandate.getDocumentDate()).isEqualTo(UPDATED_DOCUMENT_DATE);
|
||||||
assertThat(testSepaMandate.getValidFrom()).isEqualTo(UPDATED_VALID_FROM);
|
assertThat(testSepaMandate.getValidFrom()).isEqualTo(UPDATED_VALID_FROM);
|
||||||
assertThat(testSepaMandate.getValidTo()).isEqualTo(UPDATED_VALID_TO);
|
assertThat(testSepaMandate.getValidUntil()).isEqualTo(UPDATED_VALID_UNTIL);
|
||||||
assertThat(testSepaMandate.getLastUsed()).isEqualTo(UPDATED_LAST_USED);
|
assertThat(testSepaMandate.getLastUsed()).isEqualTo(UPDATED_LAST_USED);
|
||||||
assertThat(testSepaMandate.getCancelled()).isEqualTo(UPDATED_CANCELLED);
|
assertThat(testSepaMandate.getCancellationDate()).isEqualTo(UPDATED_CANCELLATION_DATE);
|
||||||
assertThat(testSepaMandate.getComment()).isEqualTo(UPDATED_COMMENT);
|
assertThat(testSepaMandate.getRemark()).isEqualTo(UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -49,8 +49,11 @@ import org.hostsharing.hsadminng.domain.enumeration.ShareAction;
|
|||||||
@SpringBootTest(classes = HsadminNgApp.class)
|
@SpringBootTest(classes = HsadminNgApp.class)
|
||||||
public class ShareResourceIntTest {
|
public class ShareResourceIntTest {
|
||||||
|
|
||||||
private static final LocalDate DEFAULT_DATE = LocalDate.ofEpochDay(0L);
|
private static final LocalDate DEFAULT_DOCUMENT_DATE = LocalDate.ofEpochDay(0L);
|
||||||
private static final LocalDate UPDATED_DATE = LocalDate.now(ZoneId.systemDefault());
|
private static final LocalDate UPDATED_DOCUMENT_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
|
private static final LocalDate DEFAULT_VALUE_DATE = LocalDate.ofEpochDay(0L);
|
||||||
|
private static final LocalDate UPDATED_VALUE_DATE = LocalDate.now(ZoneId.systemDefault());
|
||||||
|
|
||||||
private static final ShareAction DEFAULT_ACTION = ShareAction.SUBSCRIPTION;
|
private static final ShareAction DEFAULT_ACTION = ShareAction.SUBSCRIPTION;
|
||||||
private static final ShareAction UPDATED_ACTION = ShareAction.CANCELLATION;
|
private static final ShareAction UPDATED_ACTION = ShareAction.CANCELLATION;
|
||||||
@ -58,8 +61,8 @@ public class ShareResourceIntTest {
|
|||||||
private static final Integer DEFAULT_QUANTITY = 1;
|
private static final Integer DEFAULT_QUANTITY = 1;
|
||||||
private static final Integer UPDATED_QUANTITY = 2;
|
private static final Integer UPDATED_QUANTITY = 2;
|
||||||
|
|
||||||
private static final String DEFAULT_COMMENT = "AAAAAAAAAA";
|
private static final String DEFAULT_REMARK = "AAAAAAAAAA";
|
||||||
private static final String UPDATED_COMMENT = "BBBBBBBBBB";
|
private static final String UPDATED_REMARK = "BBBBBBBBBB";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ShareRepository shareRepository;
|
private ShareRepository shareRepository;
|
||||||
@ -112,10 +115,11 @@ public class ShareResourceIntTest {
|
|||||||
*/
|
*/
|
||||||
public static Share createEntity(EntityManager em) {
|
public static Share createEntity(EntityManager em) {
|
||||||
Share share = new Share()
|
Share share = new Share()
|
||||||
.date(DEFAULT_DATE)
|
.documentDate(DEFAULT_DOCUMENT_DATE)
|
||||||
|
.valueDate(DEFAULT_VALUE_DATE)
|
||||||
.action(DEFAULT_ACTION)
|
.action(DEFAULT_ACTION)
|
||||||
.quantity(DEFAULT_QUANTITY)
|
.quantity(DEFAULT_QUANTITY)
|
||||||
.comment(DEFAULT_COMMENT);
|
.remark(DEFAULT_REMARK);
|
||||||
// Add required entity
|
// Add required entity
|
||||||
Membership membership = MembershipResourceIntTest.createEntity(em);
|
Membership membership = MembershipResourceIntTest.createEntity(em);
|
||||||
em.persist(membership);
|
em.persist(membership);
|
||||||
@ -145,10 +149,11 @@ public class ShareResourceIntTest {
|
|||||||
List<Share> shareList = shareRepository.findAll();
|
List<Share> shareList = shareRepository.findAll();
|
||||||
assertThat(shareList).hasSize(databaseSizeBeforeCreate + 1);
|
assertThat(shareList).hasSize(databaseSizeBeforeCreate + 1);
|
||||||
Share testShare = shareList.get(shareList.size() - 1);
|
Share testShare = shareList.get(shareList.size() - 1);
|
||||||
assertThat(testShare.getDate()).isEqualTo(DEFAULT_DATE);
|
assertThat(testShare.getDocumentDate()).isEqualTo(DEFAULT_DOCUMENT_DATE);
|
||||||
|
assertThat(testShare.getValueDate()).isEqualTo(DEFAULT_VALUE_DATE);
|
||||||
assertThat(testShare.getAction()).isEqualTo(DEFAULT_ACTION);
|
assertThat(testShare.getAction()).isEqualTo(DEFAULT_ACTION);
|
||||||
assertThat(testShare.getQuantity()).isEqualTo(DEFAULT_QUANTITY);
|
assertThat(testShare.getQuantity()).isEqualTo(DEFAULT_QUANTITY);
|
||||||
assertThat(testShare.getComment()).isEqualTo(DEFAULT_COMMENT);
|
assertThat(testShare.getRemark()).isEqualTo(DEFAULT_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -173,10 +178,29 @@ public class ShareResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void checkDateIsRequired() throws Exception {
|
public void checkDocumentDateIsRequired() throws Exception {
|
||||||
int databaseSizeBeforeTest = shareRepository.findAll().size();
|
int databaseSizeBeforeTest = shareRepository.findAll().size();
|
||||||
// set the field null
|
// set the field null
|
||||||
share.setDate(null);
|
share.setDocumentDate(null);
|
||||||
|
|
||||||
|
// Create the Share, which fails.
|
||||||
|
ShareDTO shareDTO = shareMapper.toDto(share);
|
||||||
|
|
||||||
|
restShareMockMvc.perform(post("/api/shares")
|
||||||
|
.contentType(TestUtil.APPLICATION_JSON_UTF8)
|
||||||
|
.content(TestUtil.convertObjectToJsonBytes(shareDTO)))
|
||||||
|
.andExpect(status().isBadRequest());
|
||||||
|
|
||||||
|
List<Share> shareList = shareRepository.findAll();
|
||||||
|
assertThat(shareList).hasSize(databaseSizeBeforeTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void checkValueDateIsRequired() throws Exception {
|
||||||
|
int databaseSizeBeforeTest = shareRepository.findAll().size();
|
||||||
|
// set the field null
|
||||||
|
share.setValueDate(null);
|
||||||
|
|
||||||
// Create the Share, which fails.
|
// Create the Share, which fails.
|
||||||
ShareDTO shareDTO = shareMapper.toDto(share);
|
ShareDTO shareDTO = shareMapper.toDto(share);
|
||||||
@ -239,10 +263,11 @@ public class ShareResourceIntTest {
|
|||||||
.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(share.getId().intValue())))
|
.andExpect(jsonPath("$.[*].id").value(hasItem(share.getId().intValue())))
|
||||||
.andExpect(jsonPath("$.[*].date").value(hasItem(DEFAULT_DATE.toString())))
|
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].valueDate").value(hasItem(DEFAULT_VALUE_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString())))
|
.andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString())))
|
||||||
.andExpect(jsonPath("$.[*].quantity").value(hasItem(DEFAULT_QUANTITY)))
|
.andExpect(jsonPath("$.[*].quantity").value(hasItem(DEFAULT_QUANTITY)))
|
||||||
.andExpect(jsonPath("$.[*].comment").value(hasItem(DEFAULT_COMMENT.toString())));
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK.toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -256,75 +281,142 @@ public class ShareResourceIntTest {
|
|||||||
.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(share.getId().intValue()))
|
.andExpect(jsonPath("$.id").value(share.getId().intValue()))
|
||||||
.andExpect(jsonPath("$.date").value(DEFAULT_DATE.toString()))
|
.andExpect(jsonPath("$.documentDate").value(DEFAULT_DOCUMENT_DATE.toString()))
|
||||||
|
.andExpect(jsonPath("$.valueDate").value(DEFAULT_VALUE_DATE.toString()))
|
||||||
.andExpect(jsonPath("$.action").value(DEFAULT_ACTION.toString()))
|
.andExpect(jsonPath("$.action").value(DEFAULT_ACTION.toString()))
|
||||||
.andExpect(jsonPath("$.quantity").value(DEFAULT_QUANTITY))
|
.andExpect(jsonPath("$.quantity").value(DEFAULT_QUANTITY))
|
||||||
.andExpect(jsonPath("$.comment").value(DEFAULT_COMMENT.toString()));
|
.andExpect(jsonPath("$.remark").value(DEFAULT_REMARK.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSharesByDateIsEqualToSomething() throws Exception {
|
public void getAllSharesByDocumentDateIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
shareRepository.saveAndFlush(share);
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
// Get all the shareList where date equals to DEFAULT_DATE
|
// Get all the shareList where documentDate equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultShareShouldBeFound("date.equals=" + DEFAULT_DATE);
|
defaultShareShouldBeFound("documentDate.equals=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the shareList where date equals to UPDATED_DATE
|
// Get all the shareList where documentDate equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultShareShouldNotBeFound("date.equals=" + UPDATED_DATE);
|
defaultShareShouldNotBeFound("documentDate.equals=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSharesByDateIsInShouldWork() throws Exception {
|
public void getAllSharesByDocumentDateIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
shareRepository.saveAndFlush(share);
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
// Get all the shareList where date in DEFAULT_DATE or UPDATED_DATE
|
// Get all the shareList where documentDate in DEFAULT_DOCUMENT_DATE or UPDATED_DOCUMENT_DATE
|
||||||
defaultShareShouldBeFound("date.in=" + DEFAULT_DATE + "," + UPDATED_DATE);
|
defaultShareShouldBeFound("documentDate.in=" + DEFAULT_DOCUMENT_DATE + "," + UPDATED_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the shareList where date equals to UPDATED_DATE
|
// Get all the shareList where documentDate equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultShareShouldNotBeFound("date.in=" + UPDATED_DATE);
|
defaultShareShouldNotBeFound("documentDate.in=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSharesByDateIsNullOrNotNull() throws Exception {
|
public void getAllSharesByDocumentDateIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
shareRepository.saveAndFlush(share);
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
// Get all the shareList where date is not null
|
// Get all the shareList where documentDate is not null
|
||||||
defaultShareShouldBeFound("date.specified=true");
|
defaultShareShouldBeFound("documentDate.specified=true");
|
||||||
|
|
||||||
// Get all the shareList where date is null
|
// Get all the shareList where documentDate is null
|
||||||
defaultShareShouldNotBeFound("date.specified=false");
|
defaultShareShouldNotBeFound("documentDate.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSharesByDateIsGreaterThanOrEqualToSomething() throws Exception {
|
public void getAllSharesByDocumentDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
shareRepository.saveAndFlush(share);
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
// Get all the shareList where date greater than or equals to DEFAULT_DATE
|
// Get all the shareList where documentDate greater than or equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultShareShouldBeFound("date.greaterOrEqualThan=" + DEFAULT_DATE);
|
defaultShareShouldBeFound("documentDate.greaterOrEqualThan=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the shareList where date greater than or equals to UPDATED_DATE
|
// Get all the shareList where documentDate greater than or equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultShareShouldNotBeFound("date.greaterOrEqualThan=" + UPDATED_DATE);
|
defaultShareShouldNotBeFound("documentDate.greaterOrEqualThan=" + UPDATED_DOCUMENT_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSharesByDateIsLessThanSomething() throws Exception {
|
public void getAllSharesByDocumentDateIsLessThanSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
shareRepository.saveAndFlush(share);
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
// Get all the shareList where date less than or equals to DEFAULT_DATE
|
// Get all the shareList where documentDate less than or equals to DEFAULT_DOCUMENT_DATE
|
||||||
defaultShareShouldNotBeFound("date.lessThan=" + DEFAULT_DATE);
|
defaultShareShouldNotBeFound("documentDate.lessThan=" + DEFAULT_DOCUMENT_DATE);
|
||||||
|
|
||||||
// Get all the shareList where date less than or equals to UPDATED_DATE
|
// Get all the shareList where documentDate less than or equals to UPDATED_DOCUMENT_DATE
|
||||||
defaultShareShouldBeFound("date.lessThan=" + UPDATED_DATE);
|
defaultShareShouldBeFound("documentDate.lessThan=" + UPDATED_DOCUMENT_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllSharesByValueDateIsEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
|
// Get all the shareList where valueDate equals to DEFAULT_VALUE_DATE
|
||||||
|
defaultShareShouldBeFound("valueDate.equals=" + DEFAULT_VALUE_DATE);
|
||||||
|
|
||||||
|
// Get all the shareList where valueDate equals to UPDATED_VALUE_DATE
|
||||||
|
defaultShareShouldNotBeFound("valueDate.equals=" + UPDATED_VALUE_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllSharesByValueDateIsInShouldWork() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
|
// Get all the shareList where valueDate in DEFAULT_VALUE_DATE or UPDATED_VALUE_DATE
|
||||||
|
defaultShareShouldBeFound("valueDate.in=" + DEFAULT_VALUE_DATE + "," + UPDATED_VALUE_DATE);
|
||||||
|
|
||||||
|
// Get all the shareList where valueDate equals to UPDATED_VALUE_DATE
|
||||||
|
defaultShareShouldNotBeFound("valueDate.in=" + UPDATED_VALUE_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllSharesByValueDateIsNullOrNotNull() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
|
// Get all the shareList where valueDate is not null
|
||||||
|
defaultShareShouldBeFound("valueDate.specified=true");
|
||||||
|
|
||||||
|
// Get all the shareList where valueDate is null
|
||||||
|
defaultShareShouldNotBeFound("valueDate.specified=false");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllSharesByValueDateIsGreaterThanOrEqualToSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
|
// Get all the shareList where valueDate greater than or equals to DEFAULT_VALUE_DATE
|
||||||
|
defaultShareShouldBeFound("valueDate.greaterOrEqualThan=" + DEFAULT_VALUE_DATE);
|
||||||
|
|
||||||
|
// Get all the shareList where valueDate greater than or equals to UPDATED_VALUE_DATE
|
||||||
|
defaultShareShouldNotBeFound("valueDate.greaterOrEqualThan=" + UPDATED_VALUE_DATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Transactional
|
||||||
|
public void getAllSharesByValueDateIsLessThanSomething() throws Exception {
|
||||||
|
// Initialize the database
|
||||||
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
|
// Get all the shareList where valueDate less than or equals to DEFAULT_VALUE_DATE
|
||||||
|
defaultShareShouldNotBeFound("valueDate.lessThan=" + DEFAULT_VALUE_DATE);
|
||||||
|
|
||||||
|
// Get all the shareList where valueDate less than or equals to UPDATED_VALUE_DATE
|
||||||
|
defaultShareShouldBeFound("valueDate.lessThan=" + UPDATED_VALUE_DATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -435,41 +527,41 @@ public class ShareResourceIntTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSharesByCommentIsEqualToSomething() throws Exception {
|
public void getAllSharesByRemarkIsEqualToSomething() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
shareRepository.saveAndFlush(share);
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
// Get all the shareList where comment equals to DEFAULT_COMMENT
|
// Get all the shareList where remark equals to DEFAULT_REMARK
|
||||||
defaultShareShouldBeFound("comment.equals=" + DEFAULT_COMMENT);
|
defaultShareShouldBeFound("remark.equals=" + DEFAULT_REMARK);
|
||||||
|
|
||||||
// Get all the shareList where comment equals to UPDATED_COMMENT
|
// Get all the shareList where remark equals to UPDATED_REMARK
|
||||||
defaultShareShouldNotBeFound("comment.equals=" + UPDATED_COMMENT);
|
defaultShareShouldNotBeFound("remark.equals=" + UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSharesByCommentIsInShouldWork() throws Exception {
|
public void getAllSharesByRemarkIsInShouldWork() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
shareRepository.saveAndFlush(share);
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
// Get all the shareList where comment in DEFAULT_COMMENT or UPDATED_COMMENT
|
// Get all the shareList where remark in DEFAULT_REMARK or UPDATED_REMARK
|
||||||
defaultShareShouldBeFound("comment.in=" + DEFAULT_COMMENT + "," + UPDATED_COMMENT);
|
defaultShareShouldBeFound("remark.in=" + DEFAULT_REMARK + "," + UPDATED_REMARK);
|
||||||
|
|
||||||
// Get all the shareList where comment equals to UPDATED_COMMENT
|
// Get all the shareList where remark equals to UPDATED_REMARK
|
||||||
defaultShareShouldNotBeFound("comment.in=" + UPDATED_COMMENT);
|
defaultShareShouldNotBeFound("remark.in=" + UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Transactional
|
@Transactional
|
||||||
public void getAllSharesByCommentIsNullOrNotNull() throws Exception {
|
public void getAllSharesByRemarkIsNullOrNotNull() throws Exception {
|
||||||
// Initialize the database
|
// Initialize the database
|
||||||
shareRepository.saveAndFlush(share);
|
shareRepository.saveAndFlush(share);
|
||||||
|
|
||||||
// Get all the shareList where comment is not null
|
// Get all the shareList where remark is not null
|
||||||
defaultShareShouldBeFound("comment.specified=true");
|
defaultShareShouldBeFound("remark.specified=true");
|
||||||
|
|
||||||
// Get all the shareList where comment is null
|
// Get all the shareList where remark is null
|
||||||
defaultShareShouldNotBeFound("comment.specified=false");
|
defaultShareShouldNotBeFound("remark.specified=false");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -498,10 +590,11 @@ public class ShareResourceIntTest {
|
|||||||
.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(share.getId().intValue())))
|
.andExpect(jsonPath("$.[*].id").value(hasItem(share.getId().intValue())))
|
||||||
.andExpect(jsonPath("$.[*].date").value(hasItem(DEFAULT_DATE.toString())))
|
.andExpect(jsonPath("$.[*].documentDate").value(hasItem(DEFAULT_DOCUMENT_DATE.toString())))
|
||||||
|
.andExpect(jsonPath("$.[*].valueDate").value(hasItem(DEFAULT_VALUE_DATE.toString())))
|
||||||
.andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString())))
|
.andExpect(jsonPath("$.[*].action").value(hasItem(DEFAULT_ACTION.toString())))
|
||||||
.andExpect(jsonPath("$.[*].quantity").value(hasItem(DEFAULT_QUANTITY)))
|
.andExpect(jsonPath("$.[*].quantity").value(hasItem(DEFAULT_QUANTITY)))
|
||||||
.andExpect(jsonPath("$.[*].comment").value(hasItem(DEFAULT_COMMENT)));
|
.andExpect(jsonPath("$.[*].remark").value(hasItem(DEFAULT_REMARK)));
|
||||||
|
|
||||||
// Check, that the count call also returns 1
|
// Check, that the count call also returns 1
|
||||||
restShareMockMvc.perform(get("/api/shares/count?sort=id,desc&" + filter))
|
restShareMockMvc.perform(get("/api/shares/count?sort=id,desc&" + filter))
|
||||||
@ -549,10 +642,11 @@ public class ShareResourceIntTest {
|
|||||||
// Disconnect from session so that the updates on updatedShare are not directly saved in db
|
// Disconnect from session so that the updates on updatedShare are not directly saved in db
|
||||||
em.detach(updatedShare);
|
em.detach(updatedShare);
|
||||||
updatedShare
|
updatedShare
|
||||||
.date(UPDATED_DATE)
|
.documentDate(UPDATED_DOCUMENT_DATE)
|
||||||
|
.valueDate(UPDATED_VALUE_DATE)
|
||||||
.action(UPDATED_ACTION)
|
.action(UPDATED_ACTION)
|
||||||
.quantity(UPDATED_QUANTITY)
|
.quantity(UPDATED_QUANTITY)
|
||||||
.comment(UPDATED_COMMENT);
|
.remark(UPDATED_REMARK);
|
||||||
ShareDTO shareDTO = shareMapper.toDto(updatedShare);
|
ShareDTO shareDTO = shareMapper.toDto(updatedShare);
|
||||||
|
|
||||||
restShareMockMvc.perform(put("/api/shares")
|
restShareMockMvc.perform(put("/api/shares")
|
||||||
@ -564,10 +658,11 @@ public class ShareResourceIntTest {
|
|||||||
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.getDate()).isEqualTo(UPDATED_DATE);
|
assertThat(testShare.getDocumentDate()).isEqualTo(UPDATED_DOCUMENT_DATE);
|
||||||
|
assertThat(testShare.getValueDate()).isEqualTo(UPDATED_VALUE_DATE);
|
||||||
assertThat(testShare.getAction()).isEqualTo(UPDATED_ACTION);
|
assertThat(testShare.getAction()).isEqualTo(UPDATED_ACTION);
|
||||||
assertThat(testShare.getQuantity()).isEqualTo(UPDATED_QUANTITY);
|
assertThat(testShare.getQuantity()).isEqualTo(UPDATED_QUANTITY);
|
||||||
assertThat(testShare.getComment()).isEqualTo(UPDATED_COMMENT);
|
assertThat(testShare.getRemark()).isEqualTo(UPDATED_REMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -25,14 +25,15 @@ describe('Service Tests', () => {
|
|||||||
httpMock = injector.get(HttpTestingController);
|
httpMock = injector.get(HttpTestingController);
|
||||||
currentDate = moment();
|
currentDate = moment();
|
||||||
|
|
||||||
elemDefault = new Asset(0, currentDate, AssetAction.PAYMENT, 0, 'AAAAAAA');
|
elemDefault = new Asset(0, currentDate, currentDate, AssetAction.PAYMENT, 0, '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(
|
||||||
{
|
{
|
||||||
date: currentDate.format(DATE_FORMAT)
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
|
valueDate: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
@ -49,13 +50,15 @@ describe('Service Tests', () => {
|
|||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
date: currentDate.format(DATE_FORMAT)
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
|
valueDate: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
date: currentDate
|
documentDate: currentDate,
|
||||||
|
valueDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -70,17 +73,19 @@ describe('Service Tests', () => {
|
|||||||
it('should update a Asset', async () => {
|
it('should update a Asset', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
date: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
|
valueDate: currentDate.format(DATE_FORMAT),
|
||||||
action: 'BBBBBB',
|
action: 'BBBBBB',
|
||||||
amount: 1,
|
amount: 1,
|
||||||
comment: 'BBBBBB'
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
|
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
date: currentDate
|
documentDate: currentDate,
|
||||||
|
valueDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -95,16 +100,18 @@ describe('Service Tests', () => {
|
|||||||
it('should return a list of Asset', async () => {
|
it('should return a list of Asset', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
date: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
|
valueDate: currentDate.format(DATE_FORMAT),
|
||||||
action: 'BBBBBB',
|
action: 'BBBBBB',
|
||||||
amount: 1,
|
amount: 1,
|
||||||
comment: 'BBBBBB'
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
date: currentDate
|
documentDate: currentDate,
|
||||||
|
valueDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
|
@ -21,7 +21,7 @@ describe('Service Tests', () => {
|
|||||||
service = injector.get(CustomerService);
|
service = injector.get(CustomerService);
|
||||||
httpMock = injector.get(HttpTestingController);
|
httpMock = injector.get(HttpTestingController);
|
||||||
|
|
||||||
elemDefault = new Customer(0, 0, 'AAAAAAA', 'AAAAAAA', 'AAAAAAA', 'AAAAAAA', 'AAAAAAA', 'AAAAAAA');
|
elemDefault = new Customer(0, 0, 'AAAAAAA', 'AAAAAAA', 'AAAAAAA', 'AAAAAAA', 'AAAAAAA', 'AAAAAAA', 'AAAAAAA');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Service methods', async () => {
|
describe('Service methods', async () => {
|
||||||
@ -55,13 +55,14 @@ describe('Service Tests', () => {
|
|||||||
it('should update a Customer', async () => {
|
it('should update a Customer', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
number: 1,
|
reference: 1,
|
||||||
prefix: 'BBBBBB',
|
prefix: 'BBBBBB',
|
||||||
name: 'BBBBBB',
|
name: 'BBBBBB',
|
||||||
contractualSalutation: 'BBBBBB',
|
contractualSalutation: 'BBBBBB',
|
||||||
contractualAddress: 'BBBBBB',
|
contractualAddress: 'BBBBBB',
|
||||||
billingSalutation: 'BBBBBB',
|
billingSalutation: 'BBBBBB',
|
||||||
billingAddress: 'BBBBBB'
|
billingAddress: 'BBBBBB',
|
||||||
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
@ -78,13 +79,14 @@ describe('Service Tests', () => {
|
|||||||
it('should return a list of Customer', async () => {
|
it('should return a list of Customer', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
number: 1,
|
reference: 1,
|
||||||
prefix: 'BBBBBB',
|
prefix: 'BBBBBB',
|
||||||
name: 'BBBBBB',
|
name: 'BBBBBB',
|
||||||
contractualSalutation: 'BBBBBB',
|
contractualSalutation: 'BBBBBB',
|
||||||
contractualAddress: 'BBBBBB',
|
contractualAddress: 'BBBBBB',
|
||||||
billingSalutation: 'BBBBBB',
|
billingSalutation: 'BBBBBB',
|
||||||
billingAddress: 'BBBBBB'
|
billingAddress: 'BBBBBB',
|
||||||
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
|
@ -25,15 +25,16 @@ describe('Service Tests', () => {
|
|||||||
httpMock = injector.get(HttpTestingController);
|
httpMock = injector.get(HttpTestingController);
|
||||||
currentDate = moment();
|
currentDate = moment();
|
||||||
|
|
||||||
elemDefault = new Membership(0, currentDate, currentDate, 'AAAAAAA');
|
elemDefault = new Membership(0, 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(
|
||||||
{
|
{
|
||||||
from: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
to: currentDate.format(DATE_FORMAT)
|
memberFrom: currentDate.format(DATE_FORMAT),
|
||||||
|
memberUntil: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
@ -50,15 +51,17 @@ describe('Service Tests', () => {
|
|||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
from: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
to: currentDate.format(DATE_FORMAT)
|
memberFrom: currentDate.format(DATE_FORMAT),
|
||||||
|
memberUntil: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
from: currentDate,
|
documentDate: currentDate,
|
||||||
to: currentDate
|
memberFrom: currentDate,
|
||||||
|
memberUntil: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -73,17 +76,19 @@ describe('Service Tests', () => {
|
|||||||
it('should update a Membership', async () => {
|
it('should update a Membership', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
from: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
to: currentDate.format(DATE_FORMAT),
|
memberFrom: currentDate.format(DATE_FORMAT),
|
||||||
comment: 'BBBBBB'
|
memberUntil: currentDate.format(DATE_FORMAT),
|
||||||
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
|
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
from: currentDate,
|
documentDate: currentDate,
|
||||||
to: currentDate
|
memberFrom: currentDate,
|
||||||
|
memberUntil: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -98,16 +103,18 @@ 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(
|
||||||
{
|
{
|
||||||
from: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
to: currentDate.format(DATE_FORMAT),
|
memberFrom: currentDate.format(DATE_FORMAT),
|
||||||
comment: 'BBBBBB'
|
memberUntil: currentDate.format(DATE_FORMAT),
|
||||||
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
from: currentDate,
|
documentDate: currentDate,
|
||||||
to: currentDate
|
memberFrom: currentDate,
|
||||||
|
memberUntil: 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(
|
||||||
{
|
{
|
||||||
created: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
validFrom: currentDate.format(DATE_FORMAT),
|
validFrom: currentDate.format(DATE_FORMAT),
|
||||||
validTo: currentDate.format(DATE_FORMAT),
|
validUntil: currentDate.format(DATE_FORMAT),
|
||||||
lastUsed: currentDate.format(DATE_FORMAT),
|
lastUsed: currentDate.format(DATE_FORMAT),
|
||||||
cancelled: currentDate.format(DATE_FORMAT)
|
cancellationDate: 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,
|
||||||
created: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
validFrom: currentDate.format(DATE_FORMAT),
|
validFrom: currentDate.format(DATE_FORMAT),
|
||||||
validTo: currentDate.format(DATE_FORMAT),
|
validUntil: currentDate.format(DATE_FORMAT),
|
||||||
lastUsed: currentDate.format(DATE_FORMAT),
|
lastUsed: currentDate.format(DATE_FORMAT),
|
||||||
cancelled: currentDate.format(DATE_FORMAT)
|
cancellationDate: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
created: currentDate,
|
documentDate: currentDate,
|
||||||
validFrom: currentDate,
|
validFrom: currentDate,
|
||||||
validTo: currentDate,
|
validUntil: currentDate,
|
||||||
lastUsed: currentDate,
|
lastUsed: currentDate,
|
||||||
cancelled: currentDate
|
cancellationDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -96,23 +96,23 @@ describe('Service Tests', () => {
|
|||||||
reference: 'BBBBBB',
|
reference: 'BBBBBB',
|
||||||
iban: 'BBBBBB',
|
iban: 'BBBBBB',
|
||||||
bic: 'BBBBBB',
|
bic: 'BBBBBB',
|
||||||
created: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
validFrom: currentDate.format(DATE_FORMAT),
|
validFrom: currentDate.format(DATE_FORMAT),
|
||||||
validTo: currentDate.format(DATE_FORMAT),
|
validUntil: currentDate.format(DATE_FORMAT),
|
||||||
lastUsed: currentDate.format(DATE_FORMAT),
|
lastUsed: currentDate.format(DATE_FORMAT),
|
||||||
cancelled: currentDate.format(DATE_FORMAT),
|
cancellationDate: currentDate.format(DATE_FORMAT),
|
||||||
comment: 'BBBBBB'
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
|
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
created: currentDate,
|
documentDate: currentDate,
|
||||||
validFrom: currentDate,
|
validFrom: currentDate,
|
||||||
validTo: currentDate,
|
validUntil: currentDate,
|
||||||
lastUsed: currentDate,
|
lastUsed: currentDate,
|
||||||
cancelled: currentDate
|
cancellationDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -130,22 +130,22 @@ describe('Service Tests', () => {
|
|||||||
reference: 'BBBBBB',
|
reference: 'BBBBBB',
|
||||||
iban: 'BBBBBB',
|
iban: 'BBBBBB',
|
||||||
bic: 'BBBBBB',
|
bic: 'BBBBBB',
|
||||||
created: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
validFrom: currentDate.format(DATE_FORMAT),
|
validFrom: currentDate.format(DATE_FORMAT),
|
||||||
validTo: currentDate.format(DATE_FORMAT),
|
validUntil: currentDate.format(DATE_FORMAT),
|
||||||
lastUsed: currentDate.format(DATE_FORMAT),
|
lastUsed: currentDate.format(DATE_FORMAT),
|
||||||
cancelled: currentDate.format(DATE_FORMAT),
|
cancellationDate: currentDate.format(DATE_FORMAT),
|
||||||
comment: 'BBBBBB'
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
created: currentDate,
|
documentDate: currentDate,
|
||||||
validFrom: currentDate,
|
validFrom: currentDate,
|
||||||
validTo: currentDate,
|
validUntil: currentDate,
|
||||||
lastUsed: currentDate,
|
lastUsed: currentDate,
|
||||||
cancelled: currentDate
|
cancellationDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
|
@ -25,14 +25,15 @@ describe('Service Tests', () => {
|
|||||||
httpMock = injector.get(HttpTestingController);
|
httpMock = injector.get(HttpTestingController);
|
||||||
currentDate = moment();
|
currentDate = moment();
|
||||||
|
|
||||||
elemDefault = new Share(0, currentDate, ShareAction.SUBSCRIPTION, 0, 'AAAAAAA');
|
elemDefault = new Share(0, currentDate, currentDate, ShareAction.SUBSCRIPTION, 0, '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(
|
||||||
{
|
{
|
||||||
date: currentDate.format(DATE_FORMAT)
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
|
valueDate: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
@ -49,13 +50,15 @@ describe('Service Tests', () => {
|
|||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
date: currentDate.format(DATE_FORMAT)
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
|
valueDate: currentDate.format(DATE_FORMAT)
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
date: currentDate
|
documentDate: currentDate,
|
||||||
|
valueDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -70,17 +73,19 @@ describe('Service Tests', () => {
|
|||||||
it('should update a Share', async () => {
|
it('should update a Share', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
date: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
|
valueDate: currentDate.format(DATE_FORMAT),
|
||||||
action: 'BBBBBB',
|
action: 'BBBBBB',
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
comment: 'BBBBBB'
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
|
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
date: currentDate
|
documentDate: currentDate,
|
||||||
|
valueDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
@ -95,16 +100,18 @@ describe('Service Tests', () => {
|
|||||||
it('should return a list of Share', async () => {
|
it('should return a list of Share', async () => {
|
||||||
const returnedFromService = Object.assign(
|
const returnedFromService = Object.assign(
|
||||||
{
|
{
|
||||||
date: currentDate.format(DATE_FORMAT),
|
documentDate: currentDate.format(DATE_FORMAT),
|
||||||
|
valueDate: currentDate.format(DATE_FORMAT),
|
||||||
action: 'BBBBBB',
|
action: 'BBBBBB',
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
comment: 'BBBBBB'
|
remark: 'BBBBBB'
|
||||||
},
|
},
|
||||||
elemDefault
|
elemDefault
|
||||||
);
|
);
|
||||||
const expected = Object.assign(
|
const expected = Object.assign(
|
||||||
{
|
{
|
||||||
date: currentDate
|
documentDate: currentDate,
|
||||||
|
valueDate: currentDate
|
||||||
},
|
},
|
||||||
returnedFromService
|
returnedFromService
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user