better display labels and less columns in tables (deliberately not yet in SepaMandate*)
This commit is contained in:
@ -4,6 +4,7 @@ import org.hostsharing.hsadminng.domain.Asset;
|
||||
import org.hostsharing.hsadminng.repository.AssetRepository;
|
||||
import org.hostsharing.hsadminng.service.dto.AssetDTO;
|
||||
import org.hostsharing.hsadminng.service.mapper.AssetMapper;
|
||||
import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.domain.Page;
|
||||
@ -23,11 +24,12 @@ public class AssetService implements IdToDtoResolver<AssetDTO> {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(AssetService.class);
|
||||
|
||||
private final EntityManager em;
|
||||
|
||||
private final AssetRepository assetRepository;
|
||||
|
||||
private final AssetMapper assetMapper;
|
||||
private final AssetValidator assetValidator;
|
||||
private final EntityManager em;
|
||||
|
||||
public AssetService(final EntityManager em, final AssetRepository assetRepository, final AssetMapper assetMapper, final AssetValidator assetValidator) {
|
||||
this.em = em;
|
||||
@ -86,6 +88,7 @@ public class AssetService implements IdToDtoResolver<AssetDTO> {
|
||||
*/
|
||||
public void delete(Long id) {
|
||||
log.debug("Request to delete Asset : {}", id);
|
||||
assetRepository.deleteById(id);
|
||||
|
||||
throw new BadRequestAlertException("Asset transactions are immutable", Asset.ENTITY_NAME, "assetTransactionImmutable");
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
@ -23,15 +24,19 @@ public class MembershipService implements IdToDtoResolver<MembershipDTO> {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(MembershipService.class);
|
||||
|
||||
private final EntityManager em;
|
||||
|
||||
private final MembershipValidator membershipValidator;
|
||||
|
||||
private final MembershipRepository membershipRepository;
|
||||
|
||||
private final MembershipMapper membershipMapper;
|
||||
|
||||
public MembershipService(final MembershipValidator membershipValidator,
|
||||
public MembershipService(final EntityManager em,
|
||||
final MembershipValidator membershipValidator,
|
||||
final MembershipRepository membershipRepository,
|
||||
final MembershipMapper membershipMapper) {
|
||||
this.em = em;
|
||||
this.membershipValidator = membershipValidator;
|
||||
this.membershipRepository = membershipRepository;
|
||||
this.membershipMapper = membershipMapper;
|
||||
@ -50,6 +55,8 @@ public class MembershipService implements IdToDtoResolver<MembershipDTO> {
|
||||
|
||||
Membership membership = membershipMapper.toEntity(membershipDTO);
|
||||
membership = membershipRepository.save(membership);
|
||||
em.flush();
|
||||
em.refresh(membership);
|
||||
return membershipMapper.toDto(membership);
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@ import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
@ -23,13 +24,16 @@ public class ShareService implements IdToDtoResolver<ShareDTO> {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(ShareService.class);
|
||||
|
||||
private final EntityManager em;
|
||||
|
||||
private final ShareRepository shareRepository;
|
||||
|
||||
private final ShareMapper shareMapper;
|
||||
|
||||
private final ShareValidator shareValidator;
|
||||
|
||||
public ShareService(ShareRepository shareRepository, ShareMapper shareMapper, ShareValidator shareValidator) {
|
||||
public ShareService(final EntityManager em, final ShareRepository shareRepository, final ShareMapper shareMapper, final ShareValidator shareValidator) {
|
||||
this.em = em;
|
||||
this.shareRepository = shareRepository;
|
||||
this.shareMapper = shareMapper;
|
||||
this.shareValidator = shareValidator;
|
||||
@ -48,6 +52,8 @@ public class ShareService implements IdToDtoResolver<ShareDTO> {
|
||||
|
||||
Share share = shareMapper.toEntity(shareDTO);
|
||||
share = shareRepository.save(share);
|
||||
em.flush();
|
||||
em.refresh(share);
|
||||
return shareMapper.toDto(share);
|
||||
}
|
||||
|
||||
|
@ -47,8 +47,8 @@ public class AssetDTO implements Serializable, AccessMappings {
|
||||
@AccessFor(init = Role.ADMIN, update = Role.ADMIN, read = {Role.CONTRACTUAL_CONTACT, Role.FINANCIAL_CONTACT})
|
||||
private Long membershipId;
|
||||
|
||||
@AccessFor(init = Role.ANYBODY, update = Role.ANYBODY, read = {Role.CONTRACTUAL_CONTACT, Role.FINANCIAL_CONTACT})
|
||||
private String membershipDisplayReference;
|
||||
@AccessFor(init=Role.ANYBODY, update = Role.ANYBODY, read = {Role.CONTRACTUAL_CONTACT, Role.FINANCIAL_CONTACT})
|
||||
private String membershipDisplayLabel;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
@ -106,12 +106,12 @@ public class AssetDTO implements Serializable, AccessMappings {
|
||||
this.membershipId = membershipId;
|
||||
}
|
||||
|
||||
public String getMembershipDisplayReference() {
|
||||
return membershipDisplayReference;
|
||||
public String getMembershipDisplayLabel() {
|
||||
return membershipDisplayLabel;
|
||||
}
|
||||
|
||||
public void setMembershipDisplayReference(String membershipDisplayReference) {
|
||||
this.membershipDisplayReference = membershipDisplayReference;
|
||||
public void setMembershipDisplayLabel(String membershipDisplayLabel) {
|
||||
this.membershipDisplayLabel = membershipDisplayLabel;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -145,7 +145,7 @@ public class AssetDTO implements Serializable, AccessMappings {
|
||||
", amount=" + getAmount() +
|
||||
", remark='" + getRemark() + "'" +
|
||||
", membership=" + getMembershipId() +
|
||||
", membership='" + getMembershipDisplayReference() + "'" +
|
||||
", membership='" + getMembershipDisplayLabel() + "'" +
|
||||
"}";
|
||||
}
|
||||
|
||||
|
@ -85,6 +85,9 @@ public class CustomerDTO extends FluentBuilder<CustomerDTO> implements AccessMap
|
||||
@AccessFor(init = Role.ADMIN, update = Role.SUPPORTER, read = Role.SUPPORTER)
|
||||
private String remark;
|
||||
|
||||
@AccessFor(init=Role.ANYBODY, update=Role.ANYBODY, read = Role.ANY_CUSTOMER_USER)
|
||||
private String displayLabel;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
@ -213,6 +216,14 @@ public class CustomerDTO extends FluentBuilder<CustomerDTO> implements AccessMap
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getDisplayLabel() {
|
||||
return displayLabel;
|
||||
}
|
||||
|
||||
public void setDisplayLabel(final String displayLabel) {
|
||||
this.displayLabel = displayLabel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
|
@ -46,8 +46,11 @@ public class MembershipDTO extends FluentBuilder<MembershipDTO> implements Seria
|
||||
@AccessFor(init = Role.ADMIN, read = {Role.CONTRACTUAL_CONTACT, Role.FINANCIAL_CONTACT})
|
||||
private String customerPrefix;
|
||||
|
||||
@AccessFor(read = {Role.CONTRACTUAL_CONTACT, Role.FINANCIAL_CONTACT})
|
||||
private String membershipDisplayReference;
|
||||
@AccessFor(init = Role.ANYBODY, update = Role.ANYBODY, read = Role.FINANCIAL_CONTACT)
|
||||
private String displayLabel;
|
||||
|
||||
@AccessFor(init = Role.ANYBODY, update = Role.ANYBODY, read = Role.FINANCIAL_CONTACT)
|
||||
private String customerDisplayLabel;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
@ -113,12 +116,20 @@ public class MembershipDTO extends FluentBuilder<MembershipDTO> implements Seria
|
||||
this.customerPrefix = customerPrefix;
|
||||
}
|
||||
|
||||
private String getMembershipDisplayReference() {
|
||||
return membershipDisplayReference;
|
||||
public String getDisplayLabel() {
|
||||
return displayLabel;
|
||||
}
|
||||
|
||||
public void setMembershipDisplayReference(final String membershipDisplayReference) {
|
||||
this.membershipDisplayReference = membershipDisplayReference;
|
||||
public void setDisplayLabel(final String displayLabel) {
|
||||
this.displayLabel = displayLabel;
|
||||
}
|
||||
|
||||
public String getCustomerDisplayLabel() {
|
||||
return customerDisplayLabel;
|
||||
}
|
||||
|
||||
public void setCustomerDisplayLabel(final String customerDisplayLabel) {
|
||||
this.customerDisplayLabel = customerDisplayLabel;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,7 +48,7 @@ public class ShareDTO implements Serializable {
|
||||
private Long membershipId;
|
||||
|
||||
@AccessFor(read = {Role.CONTRACTUAL_CONTACT, Role.FINANCIAL_CONTACT})
|
||||
private String membershipDisplayReference;
|
||||
private String membershipDisplayLabel;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
@ -106,12 +106,12 @@ public class ShareDTO implements Serializable {
|
||||
this.membershipId = membershipId;
|
||||
}
|
||||
|
||||
public String getMembershipDisplayReference() {
|
||||
return membershipDisplayReference;
|
||||
public String getMembershipDisplayLabel() {
|
||||
return membershipDisplayLabel;
|
||||
}
|
||||
|
||||
public void setMembershipDisplayReference(String membershipDisplayReference) {
|
||||
this.membershipDisplayReference = membershipDisplayReference;
|
||||
public void setMembershipDisplayLabel(String membershipDisplayLabel) {
|
||||
this.membershipDisplayLabel = membershipDisplayLabel;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -145,7 +145,7 @@ public class ShareDTO implements Serializable {
|
||||
", quantity=" + getQuantity() +
|
||||
", remark='" + getRemark() + "'" +
|
||||
", membership=" + getMembershipId() +
|
||||
", membership='" + getMembershipDisplayReference() + "'" +
|
||||
", membership='" + getMembershipDisplayLabel() + "'" +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,12 @@
|
||||
package org.hostsharing.hsadminng.service.mapper;
|
||||
|
||||
import org.hostsharing.hsadminng.domain.Asset;
|
||||
import org.hostsharing.hsadminng.domain.Customer;
|
||||
import org.hostsharing.hsadminng.domain.Membership;
|
||||
import org.hostsharing.hsadminng.service.dto.AssetDTO;
|
||||
import org.mapstruct.AfterMapping;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.MappingTarget;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Mapper for the entity Asset and its DTO AssetDTO.
|
||||
*/
|
||||
@ -18,19 +14,12 @@ import java.util.Objects;
|
||||
public interface AssetMapper extends EntityMapper<AssetDTO, Asset> {
|
||||
|
||||
@Mapping(source = "membership.id", target = "membershipId")
|
||||
@Mapping(target = "membershipDisplayReference", ignore = true)
|
||||
@Mapping(target = "membershipDisplayLabel", ignore = true)
|
||||
AssetDTO toDto(Asset asset);
|
||||
|
||||
@AfterMapping
|
||||
default void setMembershipDisplayReference(final @MappingTarget AssetDTO dto, final Asset entity) {
|
||||
// TODO: rather use method extracted from MembershipMaper.setMembershipDisplayReference() to avoid duplicate code
|
||||
final Membership membership = entity.getMembership();
|
||||
final Customer customer = membership.getCustomer();
|
||||
dto.setMembershipDisplayReference(customer.getReference()
|
||||
+ ":" + customer.getPrefix()
|
||||
+ " [" + customer.getName() + "] "
|
||||
+ membership.getAdmissionDocumentDate().toString() + " - "
|
||||
+ Objects.toString(membership.getCancellationDocumentDate(), ""));
|
||||
default void setMembershipDisplayLabel(final @MappingTarget AssetDTO dto, final Asset entity) {
|
||||
dto.setMembershipDisplayLabel(MembershipMapper.displayLabel(entity.getMembership()));
|
||||
}
|
||||
|
||||
@Mapping(source = "membershipId", target = "membership")
|
||||
|
@ -1,9 +1,11 @@
|
||||
package org.hostsharing.hsadminng.service.mapper;
|
||||
|
||||
import org.hostsharing.hsadminng.domain.*;
|
||||
import org.hostsharing.hsadminng.domain.Customer;
|
||||
import org.hostsharing.hsadminng.service.dto.CustomerDTO;
|
||||
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.AfterMapping;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.MappingTarget;
|
||||
|
||||
/**
|
||||
* Mapper for the entity Customer and its DTO CustomerDTO.
|
||||
@ -11,6 +13,18 @@ import org.mapstruct.*;
|
||||
@Mapper(componentModel = "spring", uses = {})
|
||||
public interface CustomerMapper extends EntityMapper<CustomerDTO, Customer> {
|
||||
|
||||
static String displayLabel(Customer customer) {
|
||||
return customer.getName()
|
||||
+ " [" + customer.getReference() + ":" + customer.getPrefix() +"]";
|
||||
}
|
||||
|
||||
@Mapping(target = "displayLabel", ignore = true)
|
||||
CustomerDTO toDto(Customer customer);
|
||||
|
||||
@AfterMapping
|
||||
default void setDisplayLabel(final @MappingTarget CustomerDTO dto, final Customer entity) {
|
||||
dto.setDisplayLabel(displayLabel(entity));
|
||||
}
|
||||
|
||||
@Mapping(target = "memberships", ignore = true)
|
||||
@Mapping(target = "sepamandates", ignore = true)
|
||||
|
@ -16,21 +16,25 @@ import java.util.Objects;
|
||||
@Mapper(componentModel = "spring", uses = {CustomerMapper.class})
|
||||
public interface MembershipMapper extends EntityMapper<MembershipDTO, Membership> {
|
||||
|
||||
static String displayLabel(final Membership entity) {
|
||||
final Customer customer = entity.getCustomer();
|
||||
return CustomerMapper.displayLabel(customer) + " "
|
||||
+ Objects.toString(entity.getAdmissionDocumentDate(), "") + " - "
|
||||
+ Objects.toString(entity.getCancellationDocumentDate(), "...");
|
||||
}
|
||||
|
||||
@Mapping(source = "customer.id", target = "customerId")
|
||||
@Mapping(source = "customer.prefix", target = "customerPrefix")
|
||||
@Mapping(target = "membershipDisplayReference", ignore = true)
|
||||
@Mapping(target = "displayLabel", ignore = true)
|
||||
@Mapping(target = "customerDisplayLabel", ignore = true)
|
||||
MembershipDTO toDto(Membership membership);
|
||||
|
||||
// TODO BLOG HOWTO: multi-field display reference for selection lists
|
||||
// also change the filed in the option list in *-update.html
|
||||
@AfterMapping
|
||||
default void setMembershipDisplayReference(final @MappingTarget MembershipDTO dto, final Membership entity) {
|
||||
final Customer customer = entity.getCustomer();
|
||||
dto.setMembershipDisplayReference(customer.getReference()
|
||||
+ ":" + customer.getPrefix()
|
||||
+ " [" + customer.getName() + "] "
|
||||
+ Objects.toString(entity.getAdmissionDocumentDate()) + " - "
|
||||
+ Objects.toString(entity.getCancellationDocumentDate(), ""));
|
||||
default void setMembershipDisplayLabel(final @MappingTarget MembershipDTO dto, final Membership entity) {
|
||||
dto.setDisplayLabel(displayLabel(entity));
|
||||
dto.setCustomerDisplayLabel(CustomerMapper.displayLabel(entity.getCustomer()));
|
||||
}
|
||||
|
||||
@Mapping(target = "shares", ignore = true)
|
||||
|
@ -2,8 +2,10 @@ package org.hostsharing.hsadminng.service.mapper;
|
||||
|
||||
import org.hostsharing.hsadminng.domain.Share;
|
||||
import org.hostsharing.hsadminng.service.dto.ShareDTO;
|
||||
import org.mapstruct.AfterMapping;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.MappingTarget;
|
||||
|
||||
/**
|
||||
* Mapper for the entity Share and its DTO ShareDTO.
|
||||
@ -12,9 +14,14 @@ import org.mapstruct.Mapping;
|
||||
public interface ShareMapper extends EntityMapper<ShareDTO, Share> {
|
||||
|
||||
@Mapping(source = "membership.id", target = "membershipId")
|
||||
@Mapping(source = "membership.admissionDocumentDate", target = "membershipDisplayReference")
|
||||
@Mapping(target = "membershipDisplayLabel", ignore = true)
|
||||
ShareDTO toDto(Share share);
|
||||
|
||||
@AfterMapping
|
||||
default void setMembershipDisplayLabel(final @MappingTarget ShareDTO dto, final Share entity) {
|
||||
dto.setMembershipDisplayLabel(MembershipMapper.displayLabel(entity.getMembership()));
|
||||
}
|
||||
|
||||
@Mapping(source = "membershipId", target = "membership")
|
||||
Share toEntity(ShareDTO shareDTO);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
<div *ngIf="asset">
|
||||
<h2><span jhiTranslate="hsadminNgApp.asset.detail.title">Asset</span> {{asset.id}}</h2>
|
||||
<h2><span jhiTranslate="hsadminNgApp.asset.detail.title">Asset</span>: #{{asset.id}} - {{asset.membershipDisplayLabel}}</h2>
|
||||
<hr>
|
||||
<jhi-alert-error></jhi-alert-error>
|
||||
<dl class="row-md jh-entity-details">
|
||||
@ -28,7 +28,7 @@
|
||||
<dt><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span></dt>
|
||||
<dd>
|
||||
<div *ngIf="asset.membershipId">
|
||||
<a [routerLink]="['/membership', asset.membershipId, 'view']">{{asset.membershipDisplayReference}}</a>
|
||||
<a [routerLink]="['/membership', asset.membershipId, 'view']">{{asset.membershipDisplayLabel}}</a>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -89,7 +89,7 @@
|
||||
<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>
|
||||
<option *ngIf="!editForm.value.membership" [ngValue]="null" selected></option>
|
||||
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.membershipDisplayReference}}</option>
|
||||
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.displayLabel}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div [hidden]="!(editForm.controls.membership?.dirty && editForm.controls.membership?.invalid)">
|
||||
|
@ -19,8 +19,7 @@
|
||||
<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="amount"><span jhiTranslate="hsadminNgApp.asset.amount">Amount</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.asset.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="membershipDisplayReference"><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="membershipDisplayLabel"><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -31,10 +30,9 @@
|
||||
<td>{{asset.valueDate | date:'mediumDate'}}</td>
|
||||
<td jhiTranslate="{{'hsadminNgApp.AssetAction.' + asset.action}}">{{asset.action}}</td>
|
||||
<td>{{asset.amount}}</td>
|
||||
<td>{{asset.remark}}</td>
|
||||
<td>
|
||||
<div *ngIf="asset.membershipId">
|
||||
<a [routerLink]="['../membership', asset.membershipId , 'view' ]" >{{asset.membershipDisplayReference}}</a>
|
||||
<a [routerLink]="['../membership', asset.membershipId , 'view' ]" >{{asset.membershipDisplayLabel}}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
<div *ngIf="customer">
|
||||
<h2><span jhiTranslate="hsadminNgApp.customer.detail.title">Customer</span> {{customer.id}}</h2>
|
||||
<h2><span jhiTranslate="hsadminNgApp.customer.detail.title">Customer</span>: {{customer.displayLabel}}</h2>
|
||||
<hr>
|
||||
<jhi-alert-error></jhi-alert-error>
|
||||
<dl class="row-md jh-entity-details">
|
||||
|
@ -18,18 +18,7 @@
|
||||
<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="name"><span jhiTranslate="hsadminNgApp.customer.name">Name</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="kind"><span jhiTranslate="hsadminNgApp.customer.kind">Kind</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="birthDate"><span jhiTranslate="hsadminNgApp.customer.birthDate">Birth Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="birthPlace"><span jhiTranslate="hsadminNgApp.customer.birthPlace">Birth Place</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="registrationCourt"><span jhiTranslate="hsadminNgApp.customer.registrationCourt">Registration Court</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="registrationNumber"><span jhiTranslate="hsadminNgApp.customer.registrationNumber">Registration Number</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="vatRegion"><span jhiTranslate="hsadminNgApp.customer.vatRegion">Vat Region</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="vatNumber"><span jhiTranslate="hsadminNgApp.customer.vatNumber">Vat Number</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="contractualSalutation"><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual Salutation</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="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="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 jhiSortBy="kind"><span jhiTranslate="hsadminNgApp.customer.kind">Kind</span> <fa-icon [icon]="'sort'"></fa-icon></thn></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -40,17 +29,6 @@
|
||||
<td>{{customer.prefix}}</td>
|
||||
<td>{{customer.name}}</td>
|
||||
<td jhiTranslate="{{'hsadminNgApp.CustomerKind.' + customer.kind}}">{{customer.kind}}</td>
|
||||
<td>{{customer.birthDate | date:'mediumDate'}}</td>
|
||||
<td>{{customer.birthPlace}}</td>
|
||||
<td>{{customer.registrationCourt}}</td>
|
||||
<td>{{customer.registrationNumber}}</td>
|
||||
<td jhiTranslate="{{'hsadminNgApp.VatRegion.' + customer.vatRegion}}">{{customer.vatRegion}}</td>
|
||||
<td>{{customer.vatNumber}}</td>
|
||||
<td>{{customer.contractualSalutation}}</td>
|
||||
<td>{{customer.contractualAddress}}</td>
|
||||
<td>{{customer.billingSalutation}}</td>
|
||||
<td>{{customer.billingAddress}}</td>
|
||||
<td>{{customer.remark}}</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group flex-btn-group-container">
|
||||
<button type="submit"
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
<div *ngIf="membership">
|
||||
<h2><span jhiTranslate="hsadminNgApp.membership.detail.title">Membership</span> {{membership.id}}</h2>
|
||||
<h2><span jhiTranslate="hsadminNgApp.membership.detail.title">Membership</span>: {{membership.displayLabel}}</h2>
|
||||
<hr>
|
||||
<jhi-alert-error></jhi-alert-error>
|
||||
<dl class="row-md jh-entity-details">
|
||||
@ -28,7 +28,7 @@
|
||||
<dt><span jhiTranslate="hsadminNgApp.membership.customer">Customer</span></dt>
|
||||
<dd>
|
||||
<div *ngIf="membership.customerId">
|
||||
<a [routerLink]="['/customer', membership.customerId, 'view']">{{membership.customerPrefix}}</a>
|
||||
<a [routerLink]="['/customer', membership.customerId, 'view']">{{membership.customerDisplayLabel}}</a>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -77,7 +77,7 @@
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.customer" for="field_customer">Customer</label>
|
||||
<select class="form-control" id="field_customer" name="customer" [(ngModel)]="membership.customerId" required>
|
||||
<option *ngIf="!editForm.value.customer" [ngValue]="null" selected></option>
|
||||
<option [ngValue]="customerOption.id" *ngFor="let customerOption of customers; trackBy: trackCustomerById">{{customerOption.prefix}}</option>
|
||||
<option [ngValue]="customerOption.id" *ngFor="let customerOption of customers; trackBy: trackCustomerById">{{customerOption.displayLabel}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div [hidden]="!(editForm.controls.customer?.dirty && editForm.controls.customer?.invalid)">
|
||||
|
@ -19,7 +19,6 @@
|
||||
<th jhiSortBy="cancellationDocumentDate"><span jhiTranslate="hsadminNgApp.membership.cancellationDocumentDate">Cancellation Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="memberFromDate"><span jhiTranslate="hsadminNgApp.membership.memberFromDate">Member From Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="memberUntilDate"><span jhiTranslate="hsadminNgApp.membership.memberUntilDate">Member Until Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.membership.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="customerPrefix"><span jhiTranslate="hsadminNgApp.membership.customer">Customer</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@ -28,13 +27,12 @@
|
||||
<tr *ngFor="let membership of memberships ;trackBy: trackId">
|
||||
<td><a [routerLink]="['/membership', membership.id, 'view' ]">{{membership.id}}</a></td>
|
||||
<td>{{membership.admissionDocumentDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.cancellationDocumentDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.cancellationDocumentDate | date:'mediumDsate'}}</td>
|
||||
<td>{{membership.memberFromDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.memberUntilDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.remark}}</td>
|
||||
<td>
|
||||
<div *ngIf="membership.customerId">
|
||||
<a [routerLink]="['../customer', membership.customerId , 'view' ]" >{{membership.customerPrefix}}</a>
|
||||
<a [routerLink]="['../customer', membership.customerId , 'view' ]" >{{membership.customerDisplayLabel}}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
<div *ngIf="share">
|
||||
<h2><span jhiTranslate="hsadminNgApp.share.detail.title">Share</span> {{share.id}}</h2>
|
||||
<h2><span jhiTranslate="hsadminNgApp.share.detail.title">Share</span>: #{{share.id}} - {{share.membershipDisplayLabel}}</h2>
|
||||
<hr>
|
||||
<jhi-alert-error></jhi-alert-error>
|
||||
<dl class="row-md jh-entity-details">
|
||||
@ -28,7 +28,7 @@
|
||||
<dt><span jhiTranslate="hsadminNgApp.share.membership">Membership</span></dt>
|
||||
<dd>
|
||||
<div *ngIf="share.membershipId">
|
||||
<a [routerLink]="['/membership', share.membershipId, 'view']">{{share.membershipDisplayReference}}</a>
|
||||
<a [routerLink]="['/membership', share.membershipId, 'view']">{{share.membershipDisplayLabel}}</a>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -85,7 +85,7 @@
|
||||
<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>
|
||||
<option *ngIf="!editForm.value.membership" [ngValue]="null" selected></option>
|
||||
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.admissionDocumentDate}}</option>
|
||||
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.displayLabel}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div [hidden]="!(editForm.controls.membership?.dirty && editForm.controls.membership?.invalid)">
|
||||
|
@ -19,8 +19,7 @@
|
||||
<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="quantity"><span jhiTranslate="hsadminNgApp.share.quantity">Quantity</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.share.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="membershipDisplayReference"><span jhiTranslate="hsadminNgApp.share.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="membershipDisplayLabel"><span jhiTranslate="hsadminNgApp.share.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -31,10 +30,9 @@
|
||||
<td>{{share.valueDate | date:'mediumDate'}}</td>
|
||||
<td jhiTranslate="{{'hsadminNgApp.ShareAction.' + share.action}}">{{share.action}}</td>
|
||||
<td>{{share.quantity}}</td>
|
||||
<td>{{share.remark}}</td>
|
||||
<td>
|
||||
<div *ngIf="share.membershipId">
|
||||
<a [routerLink]="['../membership', share.membershipId , 'view' ]" >{{share.membershipDisplayReference}}</a>
|
||||
<a [routerLink]="['../membership', share.membershipId , 'view' ]" >{{share.membershipDisplayLabel}}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
|
@ -16,8 +16,8 @@ export interface IAsset {
|
||||
action?: AssetAction;
|
||||
amount?: number;
|
||||
remark?: string;
|
||||
membershipDisplayReference?: string;
|
||||
membershipId?: number;
|
||||
membershipDisplayLabel?: string;
|
||||
}
|
||||
|
||||
export class Asset implements IAsset {
|
||||
@ -28,7 +28,7 @@ export class Asset implements IAsset {
|
||||
public action?: AssetAction,
|
||||
public amount?: number,
|
||||
public remark?: string,
|
||||
public membershipDisplayReference?: string,
|
||||
public membershipId?: number
|
||||
public membershipId?: number,
|
||||
public membershipDisplayLabel?: string
|
||||
) {}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ export interface ICustomer {
|
||||
remark?: string;
|
||||
memberships?: IMembership[];
|
||||
sepamandates?: ISepaMandate[];
|
||||
displayLabel?: string;
|
||||
}
|
||||
|
||||
export class Customer implements ICustomer {
|
||||
@ -53,6 +54,7 @@ export class Customer implements ICustomer {
|
||||
public billingAddress?: string,
|
||||
public remark?: string,
|
||||
public memberships?: IMembership[],
|
||||
public sepamandates?: ISepaMandate[]
|
||||
public sepamandates?: ISepaMandate[],
|
||||
public displayLabel?: string
|
||||
) {}
|
||||
}
|
||||
|
@ -13,7 +13,8 @@ export interface IMembership {
|
||||
assets?: IAsset[];
|
||||
customerPrefix?: string;
|
||||
customerId?: number;
|
||||
membershipDisplayReference?: string;
|
||||
membershipDisplayLabel?: string;
|
||||
displayLabel?: string;
|
||||
}
|
||||
|
||||
export class Membership implements IMembership {
|
||||
@ -28,6 +29,7 @@ export class Membership implements IMembership {
|
||||
public assets?: IAsset[],
|
||||
public customerPrefix?: string,
|
||||
public customerId?: number,
|
||||
public membershipDisplayReference?: string
|
||||
public displayLabel?: string,
|
||||
public membershipDisplayLabel?: string
|
||||
) {}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ export interface IShare {
|
||||
action?: ShareAction;
|
||||
quantity?: number;
|
||||
remark?: string;
|
||||
membershipDisplayReference?: string;
|
||||
membershipDisplayLabel?: string;
|
||||
membershipId?: number;
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ export class Share implements IShare {
|
||||
public action?: ShareAction,
|
||||
public quantity?: number,
|
||||
public remark?: string,
|
||||
public membershipDisplayReference?: string,
|
||||
public membershipDisplayLabel?: string,
|
||||
public membershipId?: number
|
||||
) {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user