1
0

Model customers.

This commit is contained in:
Michael Hierweck
2019-04-17 16:45:43 +02:00
parent bd5bb859d9
commit 2459dd3b64
109 changed files with 5513 additions and 1091 deletions

View File

@ -5,9 +5,13 @@
<hr>
<jhi-alert-error></jhi-alert-error>
<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>
<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>
<dt><span jhiTranslate="hsadminNgApp.asset.action">Action</span></dt>
<dd>
@ -17,14 +21,14 @@
<dd>
<span>{{asset.amount}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.asset.comment">Comment</span></dt>
<dt><span jhiTranslate="hsadminNgApp.asset.remark">Remark</span></dt>
<dd>
<span>{{asset.comment}}</span>
<span>{{asset.remark}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.asset.member">Member</span></dt>
<dt><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span></dt>
<dd>
<div *ngIf="asset.memberId">
<a [routerLink]="['/membership', asset.memberId, 'view']">{{asset.memberId}}</a>
<div *ngIf="asset.membershipId">
<a [routerLink]="['/membership', asset.membershipId, 'view']">{{asset.membershipDocumentDate}}</a>
</div>
</dd>
</dl>

View File

@ -10,17 +10,33 @@
[(ngModel)]="asset.id" readonly />
</div>
<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">
<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/>
<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>
</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"
[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.
</small>
</div>
@ -58,28 +74,27 @@
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.asset.comment" for="field_comment">Comment</label>
<input type="text" class="form-control" name="comment" id="field_comment"
[(ngModel)]="asset.comment" maxlength="160"/>
<div [hidden]="!(editForm.controls.comment?.dirty && editForm.controls.comment?.invalid)">
<label class="form-control-label" jhiTranslate="hsadminNgApp.asset.remark" for="field_remark">Remark</label>
<input type="text" class="form-control" name="remark" id="field_remark"
[(ngModel)]="asset.remark" maxlength="160"/>
<div [hidden]="!(editForm.controls.remark?.dirty && editForm.controls.remark?.invalid)">
<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.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.asset.member" for="field_member">Member</label>
<select class="form-control" id="field_member" name="member" [(ngModel)]="asset.memberId" required>
<option *ngIf="!editForm.value.member" [ngValue]="null" selected></option>
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.id}}</option>
<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.documentDate}}</option>
</select>
</div>
<div [hidden]="!(editForm.controls.member?.dirty && editForm.controls.member?.invalid)">
<div [hidden]="!(editForm.controls.membership?.dirty && editForm.controls.membership?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.member?.errors?.required"
jhiTranslate="entity.validation.required">
[hidden]="!editForm.controls.membership?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
</div>

View File

@ -19,7 +19,8 @@ export class AssetUpdateComponent implements OnInit {
isSaving: boolean;
memberships: IMembership[];
dateDp: any;
documentDateDp: any;
valueDateDp: any;
constructor(
protected jhiAlertService: JhiAlertService,

View File

@ -15,24 +15,26 @@
<thead>
<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="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="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="memberId"><span jhiTranslate="hsadminNgApp.asset.member">Member</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.asset.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th jhiSortBy="membershipDocumentDate"><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th></th>
</tr>
</thead>
<tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
<tr *ngFor="let asset of assets ;trackBy: trackId">
<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>{{asset.amount}}</td>
<td>{{asset.comment}}</td>
<td>{{asset.remark}}</td>
<td>
<div *ngIf="asset.memberId">
<a [routerLink]="['../membership', asset.memberId , 'view' ]" >{{asset.memberId}}</a>
<div *ngIf="asset.membershipId">
<a [routerLink]="['../membership', asset.membershipId , 'view' ]" >{{asset.membershipDocumentDate}}</a>
</div>
</td>
<td class="text-right">

View File

@ -51,14 +51,16 @@ export class AssetService {
protected convertDateFromClient(asset: IAsset): IAsset {
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;
}
protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
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;
}
@ -66,7 +68,8 @@ export class AssetService {
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
if (res.body) {
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;

View File

@ -5,9 +5,9 @@
<hr>
<jhi-alert-error></jhi-alert-error>
<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>
<span>{{customer.number}}</span>
<span>{{customer.reference}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.customer.prefix">Prefix</span></dt>
<dd>
@ -17,21 +17,25 @@
<dd>
<span>{{customer.name}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual Salutation</span></dt>
<dd>
<span>{{customer.contractualSalutation}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.customer.contractualAddress">Contractual Address</span></dt>
<dd>
<span>{{customer.contractualAddress}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual Salutation</span></dt>
<dt><span jhiTranslate="hsadminNgApp.customer.billingSalutation">Billing Salutation</span></dt>
<dd>
<span>{{customer.contractualSalutation}}</span>
<span>{{customer.billingSalutation}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.customer.billingAddress">Billing Address</span></dt>
<dd>
<span>{{customer.billingAddress}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.customer.billingSalutation">Billing Salutation</span></dt>
<dt><span jhiTranslate="hsadminNgApp.customer.remark">Remark</span></dt>
<dd>
<span>{{customer.billingSalutation}}</span>
<span>{{customer.remark}}</span>
</dd>
</dl>

View File

@ -10,24 +10,24 @@
[(ngModel)]="customer.id" readonly />
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.number" for="field_number">Number</label>
<input type="number" class="form-control" name="number" id="field_number"
[(ngModel)]="customer.number" required min="10000" jhiMin="10000" max="99999" jhiMax="99999"/>
<div [hidden]="!(editForm.controls.number?.dirty && editForm.controls.number?.invalid)">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.reference" for="field_reference">Reference</label>
<input type="number" class="form-control" name="reference" id="field_reference"
[(ngModel)]="customer.reference" required min="10000" jhiMin="10000" max="99999" jhiMax="99999"/>
<div [hidden]="!(editForm.controls.reference?.dirty && editForm.controls.reference?.invalid)">
<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.
</small>
<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.
</small>
<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.
</small>
<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.
</small>
</div>
@ -35,12 +35,16 @@
<div class="form-group">
<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"
[(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)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.prefix?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</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"
[hidden]="!editForm.controls.prefix?.errors?.pattern" jhiTranslate="entity.validation.pattern" [translateValues]="{ pattern: 'Prefix' }">
This field should follow pattern for "Prefix".
@ -48,82 +52,76 @@
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.name"
for="field_name">Name</label>
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.name" for="field_name">Name</label>
<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)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.name?.errors?.required"
jhiTranslate="entity.validation.required">
This field is required.
[hidden]="!editForm.controls.name?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.name?.errors?.maxlength"
jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
[hidden]="!editForm.controls.name?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.contractualAddress"
for="field_contractualAddress">Contractual Address</label>
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.contractualSalutation" for="field_contractualSalutation">Contractual Salutation</label>
<input type="text" class="form-control" name="contractualSalutation" id="field_contractualSalutation"
[(ngModel)]="customer.contractualSalutation" maxlength="80"/>
<div [hidden]="!(editForm.controls.contractualSalutation?.dirty && editForm.controls.contractualSalutation?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.contractualSalutation?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.contractualAddress" for="field_contractualAddress">Contractual Address</label>
<input type="text" class="form-control" name="contractualAddress" id="field_contractualAddress"
[(ngModel)]="customer.contractualAddress" required maxlength="400"/>
<div
[hidden]="!(editForm.controls.contractualAddress?.dirty && editForm.controls.contractualAddress?.invalid)">
[(ngModel)]="customer.contractualAddress" required maxlength="400"/>
<div [hidden]="!(editForm.controls.contractualAddress?.dirty && editForm.controls.contractualAddress?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.contractualAddress?.errors?.required"
jhiTranslate="entity.validation.required">
This field is required.
[hidden]="!editForm.controls.contractualAddress?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.contractualAddress?.errors?.maxlength"
jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
This field cannot be longer than 400 characters.
[hidden]="!editForm.controls.contractualAddress?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
This field cannot be longer than 400 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.contractualSalutation"
for="field_contractualSalutation">Contractual Salutation</label>
<input type="text" class="form-control" name="contractualSalutation"
id="field_contractualSalutation"
[(ngModel)]="customer.contractualSalutation" maxlength="80"/>
<div
[hidden]="!(editForm.controls.contractualSalutation?.dirty && editForm.controls.contractualSalutation?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.contractualSalutation?.errors?.maxlength"
jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.billingAddress"
for="field_billingAddress">Billing Address</label>
<input type="text" class="form-control" name="billingAddress" id="field_billingAddress"
[(ngModel)]="customer.billingAddress" maxlength="400"/>
<div
[hidden]="!(editForm.controls.billingAddress?.dirty && editForm.controls.billingAddress?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.billingAddress?.errors?.maxlength"
jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
This field cannot be longer than 400 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.billingSalutation"
for="field_billingSalutation">Billing Salutation</label>
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.billingSalutation" for="field_billingSalutation">Billing Salutation</label>
<input type="text" class="form-control" name="billingSalutation" id="field_billingSalutation"
[(ngModel)]="customer.billingSalutation" maxlength="80"/>
<div
[hidden]="!(editForm.controls.billingSalutation?.dirty && editForm.controls.billingSalutation?.invalid)">
[(ngModel)]="customer.billingSalutation" maxlength="80"/>
<div [hidden]="!(editForm.controls.billingSalutation?.dirty && editForm.controls.billingSalutation?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.billingSalutation?.errors?.maxlength"
jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
[hidden]="!editForm.controls.billingSalutation?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.billingAddress" for="field_billingAddress">Billing Address</label>
<input type="text" class="form-control" name="billingAddress" id="field_billingAddress"
[(ngModel)]="customer.billingAddress" maxlength="400"/>
<div [hidden]="!(editForm.controls.billingAddress?.dirty && editForm.controls.billingAddress?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.billingAddress?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
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>
</div>
</div>

View File

@ -15,37 +15,28 @@
<thead>
<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="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="name"><span jhiTranslate="hsadminNgApp.customer.name">Name</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="contractualSalutation"><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual 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="billingSalutation"><span jhiTranslate="hsadminNgApp.customer.billingSalutation">Billing Salutation</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="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></th>
</tr>
</thead>
<tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
<tr *ngFor="let customer of customers ;trackBy: trackId">
<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.name}}</td>
<td>{{customer.contractualAddress}}</td>
<td>{{customer.contractualSalutation}}</td>
<td>{{customer.billingAddress}}</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"

View File

@ -43,6 +43,26 @@ import { RouterModule } from '@angular/router';
{
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: 'sepa-mandate',
loadChildren: './sepa-mandate/sepa-mandate.module#HsadminNgSepaMandateModule'
}
/* jhipster-needle-add-entity-route - JHipster will add entity modules routes here */
])

View File

@ -5,13 +5,21 @@
<hr>
<jhi-alert-error></jhi-alert-error>
<dl class="row-md jh-entity-details">
<dt><span jhiTranslate="hsadminNgApp.membership.sinceDate">Since Date</span></dt>
<dt><span jhiTranslate="hsadminNgApp.membership.documentDate">Document Date</span></dt>
<dd>
<span>{{membership.sinceDate}}</span>
<span>{{membership.documentDate}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.membership.untilDate">Until Date</span></dt>
<dt><span jhiTranslate="hsadminNgApp.membership.memberFrom">Member From</span></dt>
<dd>
<span>{{membership.untilDate}}</span>
<span>{{membership.memberFrom}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.membership.memberUntil">Member Until</span></dt>
<dd>
<span>{{membership.memberUntil}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.membership.remark">Remark</span></dt>
<dd>
<span>{{membership.remark}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.membership.customer">Customer</span></dt>
<dd>

View File

@ -10,44 +10,69 @@
[(ngModel)]="membership.id" readonly />
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.sinceDate" for="field_sinceDate">Since Date</label>
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.documentDate" for="field_documentDate">Document Date</label>
<div class="input-group">
<input id="field_sinceDate" type="text" class="form-control" name="sinceDate" ngbDatepicker #sinceDateDp="ngbDatepicker" [(ngModel)]="membership.sinceDate"
<input id="field_documentDate" type="text" class="form-control" name="documentDate" ngbDatepicker #documentDateDp="ngbDatepicker" [(ngModel)]="membership.documentDate"
required/>
<span class="input-group-append">
<button type="button" class="btn btn-secondary" (click)="sinceDateDp.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>
</div>
<div [hidden]="!(editForm.controls.sinceDate?.dirty && editForm.controls.sinceDate?.invalid)">
<div [hidden]="!(editForm.controls.documentDate?.dirty && editForm.controls.documentDate?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.sinceDate?.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.membership.untilDate" for="field_untilDate">Until Date</label>
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.memberFrom" for="field_memberFrom">Member From</label>
<div class="input-group">
<input id="field_untilDate" type="text" class="form-control" name="untilDate" ngbDatepicker #untilDateDp="ngbDatepicker" [(ngModel)]="membership.untilDate"
<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">
<button type="button" class="btn btn-secondary" (click)="untilDateDp.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>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.remark" for="field_remark">Remark</label>
<input type="text" class="form-control" name="remark" id="field_remark"
[(ngModel)]="membership.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>
</div>
</div>
<div class="form-group">
<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>
<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>
</select>
</div>
<div [hidden]="!(editForm.controls.customer?.dirty && editForm.controls.customer?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.customer?.errors?.required"
jhiTranslate="entity.validation.required">
[hidden]="!editForm.controls.customer?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
</div>

View File

@ -19,8 +19,9 @@ export class MembershipUpdateComponent implements OnInit {
isSaving: boolean;
customers: ICustomer[];
sinceDateDp: any;
untilDateDp: any;
documentDateDp: any;
memberFromDp: any;
memberUntilDp: any;
constructor(
protected jhiAlertService: JhiAlertService,

View File

@ -15,8 +15,10 @@
<thead>
<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="sinceDate"><span jhiTranslate="hsadminNgApp.membership.sinceDate">Since Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th jhiSortBy="untilDate"><span jhiTranslate="hsadminNgApp.membership.untilDate">Until Date</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="memberFrom"><span jhiTranslate="hsadminNgApp.membership.memberFrom">Member From</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></th>
</tr>
@ -24,8 +26,10 @@
<tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
<tr *ngFor="let membership of memberships ;trackBy: trackId">
<td><a [routerLink]="['/membership', membership.id, 'view' ]">{{membership.id}}</a></td>
<td>{{membership.sinceDate | date:'mediumDate'}}</td>
<td>{{membership.untilDate | date:'mediumDate'}}</td>
<td>{{membership.documentDate | date:'mediumDate'}}</td>
<td>{{membership.memberFrom | date:'mediumDate'}}</td>
<td>{{membership.memberUntil | date:'mediumDate'}}</td>
<td>{{membership.remark}}</td>
<td>
<div *ngIf="membership.customerId">
<a [routerLink]="['../customer', membership.customerId , 'view' ]" >{{membership.customerPrefix}}</a>

View File

@ -51,16 +51,20 @@ export class MembershipService {
protected convertDateFromClient(membership: IMembership): IMembership {
const copy: IMembership = Object.assign({}, membership, {
sinceDate: membership.sinceDate != null && membership.sinceDate.isValid() ? membership.sinceDate.format(DATE_FORMAT) : null,
untilDate: membership.untilDate != null && membership.untilDate.isValid() ? membership.untilDate.format(DATE_FORMAT) : null
documentDate:
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;
}
protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
if (res.body) {
res.body.sinceDate = res.body.sinceDate != null ? moment(res.body.sinceDate) : null;
res.body.untilDate = res.body.untilDate != null ? moment(res.body.untilDate) : null;
res.body.documentDate = res.body.documentDate != null ? moment(res.body.documentDate) : 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;
}
@ -68,8 +72,9 @@ export class MembershipService {
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
if (res.body) {
res.body.forEach((membership: IMembership) => {
membership.sinceDate = membership.sinceDate != null ? moment(membership.sinceDate) : null;
membership.untilDate = membership.untilDate != null ? moment(membership.untilDate) : null;
membership.documentDate = membership.documentDate != null ? moment(membership.documentDate) : null;
membership.memberFrom = membership.memberFrom != null ? moment(membership.memberFrom) : null;
membership.memberUntil = membership.memberUntil != null ? moment(membership.memberUntil) : null;
});
}
return res;

View File

@ -0,0 +1,6 @@
export * from './sepa-mandate.service';
export * from './sepa-mandate-update.component';
export * from './sepa-mandate-delete-dialog.component';
export * from './sepa-mandate-detail.component';
export * from './sepa-mandate.component';
export * from './sepa-mandate.route';

View File

@ -0,0 +1,19 @@
<form name="deleteForm" (ngSubmit)="confirmDelete(sepaMandate.id)">
<div class="modal-header">
<h4 class="modal-title" jhiTranslate="entity.delete.title">Confirm delete operation</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"
(click)="clear()">&times;</button>
</div>
<div class="modal-body">
<jhi-alert-error></jhi-alert-error>
<p id="jhi-delete-sepaMandate-heading" jhiTranslate="hsadminNgApp.sepaMandate.delete.question" [translateValues]="{id: sepaMandate.id}">Are you sure you want to delete this Sepa Mandate?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" (click)="clear()">
<fa-icon [icon]="'ban'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.cancel">Cancel</span>
</button>
<button id="jhi-confirm-delete-sepaMandate" type="submit" class="btn btn-danger">
<fa-icon [icon]="'times'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.delete">Delete</span>
</button>
</div>
</form>

View File

@ -0,0 +1,72 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
import { JhiEventManager } from 'ng-jhipster';
import { ISepaMandate } from 'app/shared/model/sepa-mandate.model';
import { SepaMandateService } from './sepa-mandate.service';
@Component({
selector: 'jhi-sepa-mandate-delete-dialog',
templateUrl: './sepa-mandate-delete-dialog.component.html'
})
export class SepaMandateDeleteDialogComponent {
sepaMandate: ISepaMandate;
constructor(
protected sepaMandateService: SepaMandateService,
public activeModal: NgbActiveModal,
protected eventManager: JhiEventManager
) {}
clear() {
this.activeModal.dismiss('cancel');
}
confirmDelete(id: number) {
this.sepaMandateService.delete(id).subscribe(response => {
this.eventManager.broadcast({
name: 'sepaMandateListModification',
content: 'Deleted an sepaMandate'
});
this.activeModal.dismiss(true);
});
}
}
@Component({
selector: 'jhi-sepa-mandate-delete-popup',
template: ''
})
export class SepaMandateDeletePopupComponent implements OnInit, OnDestroy {
protected ngbModalRef: NgbModalRef;
constructor(protected activatedRoute: ActivatedRoute, protected router: Router, protected modalService: NgbModal) {}
ngOnInit() {
this.activatedRoute.data.subscribe(({ sepaMandate }) => {
setTimeout(() => {
this.ngbModalRef = this.modalService.open(SepaMandateDeleteDialogComponent as Component, {
size: 'lg',
backdrop: 'static'
});
this.ngbModalRef.componentInstance.sepaMandate = sepaMandate;
this.ngbModalRef.result.then(
result => {
this.router.navigate(['/sepa-mandate', { outlets: { popup: null } }]);
this.ngbModalRef = null;
},
reason => {
this.router.navigate(['/sepa-mandate', { outlets: { popup: null } }]);
this.ngbModalRef = null;
}
);
}, 0);
});
}
ngOnDestroy() {
this.ngbModalRef = null;
}
}

View File

@ -0,0 +1,65 @@
<div class="row justify-content-center">
<div class="col-8">
<div *ngIf="sepaMandate">
<h2><span jhiTranslate="hsadminNgApp.sepaMandate.detail.title">Sepa Mandate</span> {{sepaMandate.id}}</h2>
<hr>
<jhi-alert-error></jhi-alert-error>
<dl class="row-md jh-entity-details">
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.reference">Reference</span></dt>
<dd>
<span>{{sepaMandate.reference}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.iban">Iban</span></dt>
<dd>
<span>{{sepaMandate.iban}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.bic">Bic</span></dt>
<dd>
<span>{{sepaMandate.bic}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.documentDate">Document Date</span></dt>
<dd>
<span>{{sepaMandate.documentDate}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validFrom">Valid From</span></dt>
<dd>
<span>{{sepaMandate.validFrom}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validUntil">Valid Until</span></dt>
<dd>
<span>{{sepaMandate.validUntil}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsed">Last Used</span></dt>
<dd>
<span>{{sepaMandate.lastUsed}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.cancellationDate">Cancellation Date</span></dt>
<dd>
<span>{{sepaMandate.cancellationDate}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.remark">Remark</span></dt>
<dd>
<span>{{sepaMandate.remark}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.customer">Customer</span></dt>
<dd>
<div *ngIf="sepaMandate.customerId">
<a [routerLink]="['/customer', sepaMandate.customerId, 'view']">{{sepaMandate.customerPrefix}}</a>
</div>
</dd>
</dl>
<button type="submit"
(click)="previousState()"
class="btn btn-info">
<fa-icon [icon]="'arrow-left'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.back"> Back</span>
</button>
<button type="button"
[routerLink]="['/sepa-mandate', sepaMandate.id, 'edit']"
class="btn btn-primary">
<fa-icon [icon]="'pencil-alt'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.edit"> Edit</span>
</button>
</div>
</div>
</div>

View File

@ -0,0 +1,24 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ISepaMandate } from 'app/shared/model/sepa-mandate.model';
@Component({
selector: 'jhi-sepa-mandate-detail',
templateUrl: './sepa-mandate-detail.component.html'
})
export class SepaMandateDetailComponent implements OnInit {
sepaMandate: ISepaMandate;
constructor(protected activatedRoute: ActivatedRoute) {}
ngOnInit() {
this.activatedRoute.data.subscribe(({ sepaMandate }) => {
this.sepaMandate = sepaMandate;
});
}
previousState() {
window.history.back();
}
}

View File

@ -0,0 +1,147 @@
<div class="row justify-content-center">
<div class="col-8">
<form name="editForm" role="form" novalidate (ngSubmit)="save()" #editForm="ngForm">
<h2 id="jhi-sepa-mandate-heading" jhiTranslate="hsadminNgApp.sepaMandate.home.createOrEditLabel">Create or edit a Sepa Mandate</h2>
<div>
<jhi-alert-error></jhi-alert-error>
<div class="form-group" [hidden]="!sepaMandate.id">
<label for="id" jhiTranslate="global.field.id">ID</label>
<input type="text" class="form-control" id="id" name="id"
[(ngModel)]="sepaMandate.id" readonly />
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.reference" for="field_reference">Reference</label>
<input type="text" class="form-control" name="reference" id="field_reference"
[(ngModel)]="sepaMandate.reference" required maxlength="40"/>
<div [hidden]="!(editForm.controls.reference?.dirty && editForm.controls.reference?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.reference?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.reference?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 40 }">
This field cannot be longer than 40 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.iban" for="field_iban">Iban</label>
<input type="text" class="form-control" name="iban" id="field_iban"
[(ngModel)]="sepaMandate.iban" maxlength="34"/>
<div [hidden]="!(editForm.controls.iban?.dirty && editForm.controls.iban?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.iban?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 34 }">
This field cannot be longer than 34 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.bic" for="field_bic">Bic</label>
<input type="text" class="form-control" name="bic" id="field_bic"
[(ngModel)]="sepaMandate.bic" maxlength="11"/>
<div [hidden]="!(editForm.controls.bic?.dirty && editForm.controls.bic?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.bic?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 11 }">
This field cannot be longer than 11 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.documentDate" for="field_documentDate">Document Date</label>
<div class="input-group">
<input id="field_documentDate" type="text" class="form-control" name="documentDate" ngbDatepicker #documentDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.documentDate"
required/>
<span class="input-group-append">
<button type="button" class="btn btn-secondary" (click)="documentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
</span>
</div>
<div [hidden]="!(editForm.controls.documentDate?.dirty && editForm.controls.documentDate?.invalid)">
<small class="form-text text-danger"
[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.sepaMandate.validFrom" for="field_validFrom">Valid From</label>
<div class="input-group">
<input id="field_validFrom" type="text" class="form-control" name="validFrom" ngbDatepicker #validFromDp="ngbDatepicker" [(ngModel)]="sepaMandate.validFrom"
required/>
<span class="input-group-append">
<button type="button" class="btn btn-secondary" (click)="validFromDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
</span>
</div>
<div [hidden]="!(editForm.controls.validFrom?.dirty && editForm.controls.validFrom?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.validFrom?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.validUntil" for="field_validUntil">Valid Until</label>
<div class="input-group">
<input id="field_validUntil" type="text" class="form-control" name="validUntil" ngbDatepicker #validUntilDp="ngbDatepicker" [(ngModel)]="sepaMandate.validUntil"
/>
<span class="input-group-append">
<button type="button" class="btn btn-secondary" (click)="validUntilDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
</span>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.lastUsed" for="field_lastUsed">Last Used</label>
<div class="input-group">
<input id="field_lastUsed" type="text" class="form-control" name="lastUsed" ngbDatepicker #lastUsedDp="ngbDatepicker" [(ngModel)]="sepaMandate.lastUsed"
/>
<span class="input-group-append">
<button type="button" class="btn btn-secondary" (click)="lastUsedDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
</span>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.cancellationDate" for="field_cancellationDate">Cancellation Date</label>
<div class="input-group">
<input id="field_cancellationDate" type="text" class="form-control" name="cancellationDate" ngbDatepicker #cancellationDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.cancellationDate"
/>
<span class="input-group-append">
<button type="button" class="btn btn-secondary" (click)="cancellationDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
</span>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.remark" for="field_remark">Remark</label>
<input type="text" class="form-control" name="remark" id="field_remark"
[(ngModel)]="sepaMandate.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>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.customer" for="field_customer">Customer</label>
<select class="form-control" id="field_customer" name="customer" [(ngModel)]="sepaMandate.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>
</select>
</div>
<div [hidden]="!(editForm.controls.customer?.dirty && editForm.controls.customer?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.customer?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
</div>
</div>
<div>
<button type="button" id="cancel-save" class="btn btn-secondary" (click)="previousState()">
<fa-icon [icon]="'ban'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.cancel">Cancel</span>
</button>
<button type="submit" id="save-entity" [disabled]="editForm.form.invalid || isSaving" class="btn btn-primary">
<fa-icon [icon]="'save'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.save">Save</span>
</button>
</div>
</form>
</div>
</div>

View File

@ -0,0 +1,82 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { HttpResponse, HttpErrorResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import * as moment from 'moment';
import { JhiAlertService } from 'ng-jhipster';
import { ISepaMandate } from 'app/shared/model/sepa-mandate.model';
import { SepaMandateService } from './sepa-mandate.service';
import { ICustomer } from 'app/shared/model/customer.model';
import { CustomerService } from 'app/entities/customer';
@Component({
selector: 'jhi-sepa-mandate-update',
templateUrl: './sepa-mandate-update.component.html'
})
export class SepaMandateUpdateComponent implements OnInit {
sepaMandate: ISepaMandate;
isSaving: boolean;
customers: ICustomer[];
documentDateDp: any;
validFromDp: any;
validUntilDp: any;
lastUsedDp: any;
cancellationDateDp: any;
constructor(
protected jhiAlertService: JhiAlertService,
protected sepaMandateService: SepaMandateService,
protected customerService: CustomerService,
protected activatedRoute: ActivatedRoute
) {}
ngOnInit() {
this.isSaving = false;
this.activatedRoute.data.subscribe(({ sepaMandate }) => {
this.sepaMandate = sepaMandate;
});
this.customerService
.query()
.pipe(
filter((mayBeOk: HttpResponse<ICustomer[]>) => mayBeOk.ok),
map((response: HttpResponse<ICustomer[]>) => response.body)
)
.subscribe((res: ICustomer[]) => (this.customers = res), (res: HttpErrorResponse) => this.onError(res.message));
}
previousState() {
window.history.back();
}
save() {
this.isSaving = true;
if (this.sepaMandate.id !== undefined) {
this.subscribeToSaveResponse(this.sepaMandateService.update(this.sepaMandate));
} else {
this.subscribeToSaveResponse(this.sepaMandateService.create(this.sepaMandate));
}
}
protected subscribeToSaveResponse(result: Observable<HttpResponse<ISepaMandate>>) {
result.subscribe((res: HttpResponse<ISepaMandate>) => this.onSaveSuccess(), (res: HttpErrorResponse) => this.onSaveError());
}
protected onSaveSuccess() {
this.isSaving = false;
this.previousState();
}
protected onSaveError() {
this.isSaving = false;
}
protected onError(errorMessage: string) {
this.jhiAlertService.error(errorMessage, null, null);
}
trackCustomerById(index: number, item: ICustomer) {
return item.id;
}
}

View File

@ -0,0 +1,76 @@
<div>
<h2 id="page-heading">
<span jhiTranslate="hsadminNgApp.sepaMandate.home.title">Sepa Mandates</span>
<button id="jh-create-entity" class="btn btn-primary float-right jh-create-entity create-sepa-mandate" [routerLink]="['/sepa-mandate/new']">
<fa-icon [icon]="'plus'"></fa-icon>
<span jhiTranslate="hsadminNgApp.sepaMandate.home.createLabel">
Create new Sepa Mandate
</span>
</button>
</h2>
<jhi-alert></jhi-alert>
<br/>
<div class="table-responsive" *ngIf="sepaMandates">
<table class="table table-striped">
<thead>
<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="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="bic"><span jhiTranslate="hsadminNgApp.sepaMandate.bic">Bic</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th jhiSortBy="documentDate"><span jhiTranslate="hsadminNgApp.sepaMandate.documentDate">Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th jhiSortBy="validFrom"><span jhiTranslate="hsadminNgApp.sepaMandate.validFrom">Valid From</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="cancellationDate"><span jhiTranslate="hsadminNgApp.sepaMandate.cancellationDate">Cancellation Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.sepaMandate.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th jhiSortBy="customerPrefix"><span jhiTranslate="hsadminNgApp.sepaMandate.customer">Customer</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th></th>
</tr>
</thead>
<tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
<tr *ngFor="let sepaMandate of sepaMandates ;trackBy: trackId">
<td><a [routerLink]="['/sepa-mandate', sepaMandate.id, 'view' ]">{{sepaMandate.id}}</a></td>
<td>{{sepaMandate.reference}}</td>
<td>{{sepaMandate.iban}}</td>
<td>{{sepaMandate.bic}}</td>
<td>{{sepaMandate.documentDate | date:'mediumDate'}}</td>
<td>{{sepaMandate.validFrom | date:'mediumDate'}}</td>
<td>{{sepaMandate.validUntil | date:'mediumDate'}}</td>
<td>{{sepaMandate.lastUsed | date:'mediumDate'}}</td>
<td>{{sepaMandate.cancellationDate | date:'mediumDate'}}</td>
<td>{{sepaMandate.remark}}</td>
<td>
<div *ngIf="sepaMandate.customerId">
<a [routerLink]="['../customer', sepaMandate.customerId , 'view' ]" >{{sepaMandate.customerPrefix}}</a>
</div>
</td>
<td class="text-right">
<div class="btn-group flex-btn-group-container">
<button type="submit"
[routerLink]="['/sepa-mandate', sepaMandate.id, 'view' ]"
class="btn btn-info btn-sm">
<fa-icon [icon]="'eye'"></fa-icon>
<span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
</button>
<button type="submit"
[routerLink]="['/sepa-mandate', sepaMandate.id, 'edit']"
class="btn btn-primary btn-sm">
<fa-icon [icon]="'pencil-alt'"></fa-icon>
<span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
</button>
<button type="submit"
[routerLink]="['/', 'sepa-mandate', { outlets: { popup: sepaMandate.id + '/delete'} }]"
replaceUrl="true"
queryParamsHandling="merge"
class="btn btn-danger btn-sm">
<fa-icon [icon]="'times'"></fa-icon>
<span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@ -0,0 +1,108 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http';
import { Subscription } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster';
import { ISepaMandate } from 'app/shared/model/sepa-mandate.model';
import { AccountService } from 'app/core';
import { ITEMS_PER_PAGE } from 'app/shared';
import { SepaMandateService } from './sepa-mandate.service';
@Component({
selector: 'jhi-sepa-mandate',
templateUrl: './sepa-mandate.component.html'
})
export class SepaMandateComponent implements OnInit, OnDestroy {
sepaMandates: ISepaMandate[];
currentAccount: any;
eventSubscriber: Subscription;
itemsPerPage: number;
links: any;
page: any;
predicate: any;
reverse: any;
totalItems: number;
constructor(
protected sepaMandateService: SepaMandateService,
protected jhiAlertService: JhiAlertService,
protected eventManager: JhiEventManager,
protected parseLinks: JhiParseLinks,
protected accountService: AccountService
) {
this.sepaMandates = [];
this.itemsPerPage = ITEMS_PER_PAGE;
this.page = 0;
this.links = {
last: 0
};
this.predicate = 'id';
this.reverse = true;
}
loadAll() {
this.sepaMandateService
.query({
page: this.page,
size: this.itemsPerPage,
sort: this.sort()
})
.subscribe(
(res: HttpResponse<ISepaMandate[]>) => this.paginateSepaMandates(res.body, res.headers),
(res: HttpErrorResponse) => this.onError(res.message)
);
}
reset() {
this.page = 0;
this.sepaMandates = [];
this.loadAll();
}
loadPage(page) {
this.page = page;
this.loadAll();
}
ngOnInit() {
this.loadAll();
this.accountService.identity().then(account => {
this.currentAccount = account;
});
this.registerChangeInSepaMandates();
}
ngOnDestroy() {
this.eventManager.destroy(this.eventSubscriber);
}
trackId(index: number, item: ISepaMandate) {
return item.id;
}
registerChangeInSepaMandates() {
this.eventSubscriber = this.eventManager.subscribe('sepaMandateListModification', response => this.reset());
}
sort() {
const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')];
if (this.predicate !== 'id') {
result.push('id');
}
return result;
}
protected paginateSepaMandates(data: ISepaMandate[], headers: HttpHeaders) {
this.links = this.parseLinks.parse(headers.get('link'));
this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
for (let i = 0; i < data.length; i++) {
this.sepaMandates.push(data[i]);
}
}
protected onError(errorMessage: string) {
this.jhiAlertService.error(errorMessage, null, null);
}
}

View File

@ -0,0 +1,40 @@
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterModule } from '@angular/router';
import { JhiLanguageService } from 'ng-jhipster';
import { JhiLanguageHelper } from 'app/core';
import { HsadminNgSharedModule } from 'app/shared';
import {
SepaMandateComponent,
SepaMandateDetailComponent,
SepaMandateUpdateComponent,
SepaMandateDeletePopupComponent,
SepaMandateDeleteDialogComponent,
sepaMandateRoute,
sepaMandatePopupRoute
} from './';
const ENTITY_STATES = [...sepaMandateRoute, ...sepaMandatePopupRoute];
@NgModule({
imports: [HsadminNgSharedModule, RouterModule.forChild(ENTITY_STATES)],
declarations: [
SepaMandateComponent,
SepaMandateDetailComponent,
SepaMandateUpdateComponent,
SepaMandateDeleteDialogComponent,
SepaMandateDeletePopupComponent
],
entryComponents: [SepaMandateComponent, SepaMandateUpdateComponent, SepaMandateDeleteDialogComponent, SepaMandateDeletePopupComponent],
providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class HsadminNgSepaMandateModule {
constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) {
this.languageHelper.language.subscribe((languageKey: string) => {
if (languageKey !== undefined) {
this.languageService.changeLanguage(languageKey);
}
});
}
}

View File

@ -0,0 +1,93 @@
import { Injectable } from '@angular/core';
import { HttpResponse } from '@angular/common/http';
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router';
import { UserRouteAccessService } from 'app/core';
import { Observable, of } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import { SepaMandate } from 'app/shared/model/sepa-mandate.model';
import { SepaMandateService } from './sepa-mandate.service';
import { SepaMandateComponent } from './sepa-mandate.component';
import { SepaMandateDetailComponent } from './sepa-mandate-detail.component';
import { SepaMandateUpdateComponent } from './sepa-mandate-update.component';
import { SepaMandateDeletePopupComponent } from './sepa-mandate-delete-dialog.component';
import { ISepaMandate } from 'app/shared/model/sepa-mandate.model';
@Injectable({ providedIn: 'root' })
export class SepaMandateResolve implements Resolve<ISepaMandate> {
constructor(private service: SepaMandateService) {}
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<ISepaMandate> {
const id = route.params['id'] ? route.params['id'] : null;
if (id) {
return this.service.find(id).pipe(
filter((response: HttpResponse<SepaMandate>) => response.ok),
map((sepaMandate: HttpResponse<SepaMandate>) => sepaMandate.body)
);
}
return of(new SepaMandate());
}
}
export const sepaMandateRoute: Routes = [
{
path: '',
component: SepaMandateComponent,
data: {
authorities: ['ROLE_USER'],
pageTitle: 'hsadminNgApp.sepaMandate.home.title'
},
canActivate: [UserRouteAccessService]
},
{
path: ':id/view',
component: SepaMandateDetailComponent,
resolve: {
sepaMandate: SepaMandateResolve
},
data: {
authorities: ['ROLE_USER'],
pageTitle: 'hsadminNgApp.sepaMandate.home.title'
},
canActivate: [UserRouteAccessService]
},
{
path: 'new',
component: SepaMandateUpdateComponent,
resolve: {
sepaMandate: SepaMandateResolve
},
data: {
authorities: ['ROLE_USER'],
pageTitle: 'hsadminNgApp.sepaMandate.home.title'
},
canActivate: [UserRouteAccessService]
},
{
path: ':id/edit',
component: SepaMandateUpdateComponent,
resolve: {
sepaMandate: SepaMandateResolve
},
data: {
authorities: ['ROLE_USER'],
pageTitle: 'hsadminNgApp.sepaMandate.home.title'
},
canActivate: [UserRouteAccessService]
}
];
export const sepaMandatePopupRoute: Routes = [
{
path: ':id/delete',
component: SepaMandateDeletePopupComponent,
resolve: {
sepaMandate: SepaMandateResolve
},
data: {
authorities: ['ROLE_USER'],
pageTitle: 'hsadminNgApp.sepaMandate.home.title'
},
canActivate: [UserRouteAccessService],
outlet: 'popup'
}
];

View File

@ -0,0 +1,93 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import * as moment from 'moment';
import { DATE_FORMAT } from 'app/shared/constants/input.constants';
import { map } from 'rxjs/operators';
import { SERVER_API_URL } from 'app/app.constants';
import { createRequestOption } from 'app/shared';
import { ISepaMandate } from 'app/shared/model/sepa-mandate.model';
type EntityResponseType = HttpResponse<ISepaMandate>;
type EntityArrayResponseType = HttpResponse<ISepaMandate[]>;
@Injectable({ providedIn: 'root' })
export class SepaMandateService {
public resourceUrl = SERVER_API_URL + 'api/sepa-mandates';
constructor(protected http: HttpClient) {}
create(sepaMandate: ISepaMandate): Observable<EntityResponseType> {
const copy = this.convertDateFromClient(sepaMandate);
return this.http
.post<ISepaMandate>(this.resourceUrl, copy, { observe: 'response' })
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
}
update(sepaMandate: ISepaMandate): Observable<EntityResponseType> {
const copy = this.convertDateFromClient(sepaMandate);
return this.http
.put<ISepaMandate>(this.resourceUrl, copy, { observe: 'response' })
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
}
find(id: number): Observable<EntityResponseType> {
return this.http
.get<ISepaMandate>(`${this.resourceUrl}/${id}`, { observe: 'response' })
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
}
query(req?: any): Observable<EntityArrayResponseType> {
const options = createRequestOption(req);
return this.http
.get<ISepaMandate[]>(this.resourceUrl, { params: options, observe: 'response' })
.pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res)));
}
delete(id: number): Observable<HttpResponse<any>> {
return this.http.delete<any>(`${this.resourceUrl}/${id}`, { observe: 'response' });
}
protected convertDateFromClient(sepaMandate: ISepaMandate): ISepaMandate {
const copy: ISepaMandate = Object.assign({}, sepaMandate, {
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,
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,
cancellationDate:
sepaMandate.cancellationDate != null && sepaMandate.cancellationDate.isValid()
? sepaMandate.cancellationDate.format(DATE_FORMAT)
: null
});
return copy;
}
protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
if (res.body) {
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.validUntil = res.body.validUntil != null ? moment(res.body.validUntil) : null;
res.body.lastUsed = res.body.lastUsed != null ? moment(res.body.lastUsed) : null;
res.body.cancellationDate = res.body.cancellationDate != null ? moment(res.body.cancellationDate) : null;
}
return res;
}
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
if (res.body) {
res.body.forEach((sepaMandate: ISepaMandate) => {
sepaMandate.documentDate = sepaMandate.documentDate != null ? moment(sepaMandate.documentDate) : null;
sepaMandate.validFrom = sepaMandate.validFrom != null ? moment(sepaMandate.validFrom) : null;
sepaMandate.validUntil = sepaMandate.validUntil != null ? moment(sepaMandate.validUntil) : null;
sepaMandate.lastUsed = sepaMandate.lastUsed != null ? moment(sepaMandate.lastUsed) : null;
sepaMandate.cancellationDate = sepaMandate.cancellationDate != null ? moment(sepaMandate.cancellationDate) : null;
});
}
return res;
}
}

View File

@ -5,9 +5,13 @@
<hr>
<jhi-alert-error></jhi-alert-error>
<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>
<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>
<dt><span jhiTranslate="hsadminNgApp.share.action">Action</span></dt>
<dd>
@ -17,14 +21,14 @@
<dd>
<span>{{share.quantity}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.share.comment">Comment</span></dt>
<dt><span jhiTranslate="hsadminNgApp.share.remark">Remark</span></dt>
<dd>
<span>{{share.comment}}</span>
<span>{{share.remark}}</span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.share.member">Member</span></dt>
<dt><span jhiTranslate="hsadminNgApp.share.membership">Membership</span></dt>
<dd>
<div *ngIf="share.memberId">
<a [routerLink]="['/membership', share.memberId, 'view']">{{share.memberId}}</a>
<div *ngIf="share.membershipId">
<a [routerLink]="['/membership', share.membershipId, 'view']">{{share.membershipDocumentDate}}</a>
</div>
</dd>
</dl>

View File

@ -10,17 +10,33 @@
[(ngModel)]="share.id" readonly />
</div>
<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">
<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/>
<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>
</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"
[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.
</small>
</div>
@ -54,28 +70,27 @@
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.share.comment" for="field_comment">Comment</label>
<input type="text" class="form-control" name="comment" id="field_comment"
[(ngModel)]="share.comment" maxlength="160"/>
<div [hidden]="!(editForm.controls.comment?.dirty && editForm.controls.comment?.invalid)">
<label class="form-control-label" jhiTranslate="hsadminNgApp.share.remark" for="field_remark">Remark</label>
<input type="text" class="form-control" name="remark" id="field_remark"
[(ngModel)]="share.remark" maxlength="160"/>
<div [hidden]="!(editForm.controls.remark?.dirty && editForm.controls.remark?.invalid)">
<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.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.share.member" for="field_member">Member</label>
<select class="form-control" id="field_member" name="member" [(ngModel)]="share.memberId" required>
<option *ngIf="!editForm.value.member" [ngValue]="null" selected></option>
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.id}}</option>
<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.documentDate}}</option>
</select>
</div>
<div [hidden]="!(editForm.controls.member?.dirty && editForm.controls.member?.invalid)">
<div [hidden]="!(editForm.controls.membership?.dirty && editForm.controls.membership?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.member?.errors?.required"
jhiTranslate="entity.validation.required">
[hidden]="!editForm.controls.membership?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
</div>

View File

@ -19,7 +19,8 @@ export class ShareUpdateComponent implements OnInit {
isSaving: boolean;
memberships: IMembership[];
dateDp: any;
documentDateDp: any;
valueDateDp: any;
constructor(
protected jhiAlertService: JhiAlertService,

View File

@ -15,24 +15,26 @@
<thead>
<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="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="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="memberId"><span jhiTranslate="hsadminNgApp.share.member">Member</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.share.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th jhiSortBy="membershipDocumentDate"><span jhiTranslate="hsadminNgApp.share.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
<th></th>
</tr>
</thead>
<tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
<tr *ngFor="let share of shares ;trackBy: trackId">
<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>{{share.quantity}}</td>
<td>{{share.comment}}</td>
<td>{{share.remark}}</td>
<td>
<div *ngIf="share.memberId">
<a [routerLink]="['../membership', share.memberId , 'view' ]" >{{share.memberId}}</a>
<div *ngIf="share.membershipId">
<a [routerLink]="['../membership', share.membershipId , 'view' ]" >{{share.membershipDocumentDate}}</a>
</div>
</td>
<td class="text-right">

View File

@ -51,14 +51,16 @@ export class ShareService {
protected convertDateFromClient(share: IShare): IShare {
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;
}
protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
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;
}
@ -66,7 +68,8 @@ export class ShareService {
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
if (res.body) {
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;

View File

@ -63,6 +63,12 @@
<span jhiTranslate="global.menu.entities.asset">Asset</span>
</a>
</li>
<li>
<a class="dropdown-item" routerLink="sepa-mandate" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" (click)="collapseNavbar()">
<fa-icon icon="asterisk" fixedWidth="true"></fa-icon>
<span jhiTranslate="global.menu.entities.sepaMandate">Sepa Mandate</span>
</a>
</li>
<!-- jhipster-needle-add-entity-to-menu - JHipster will add entities to the menu here -->
</ul>
</li>

View File

@ -11,20 +11,24 @@ export const enum AssetAction {
export interface IAsset {
id?: number;
date?: Moment;
documentDate?: Moment;
valueDate?: Moment;
action?: AssetAction;
amount?: number;
comment?: string;
memberId?: number;
remark?: string;
membershipDocumentDate?: string;
membershipId?: number;
}
export class Asset implements IAsset {
constructor(
public id?: number,
public date?: Moment,
public documentDate?: Moment,
public valueDate?: Moment,
public action?: AssetAction,
public amount?: number,
public comment?: string,
public memberId?: number
public remark?: string,
public membershipDocumentDate?: string,
public membershipId?: number
) {}
}

View File

@ -1,30 +1,32 @@
import { ICustomerContact } from 'app/shared/model/customer-contact.model';
import { IMembership } from 'app/shared/model/membership.model';
import { ISepaMandate } from 'app/shared/model/sepa-mandate.model';
export interface ICustomer {
id?: number;
number?: number;
reference?: number;
prefix?: string;
name?: string;
contractualAddress?: string;
contractualSalutation?: string;
billingAddress?: string;
contractualAddress?: string;
billingSalutation?: string;
roles?: ICustomerContact[];
billingAddress?: string;
remark?: string;
memberships?: IMembership[];
sepamandates?: ISepaMandate[];
}
export class Customer implements ICustomer {
constructor(
public id?: number,
public number?: number,
public reference?: number,
public prefix?: string,
public name?: string,
public contractualAddress?: string,
public contractualSalutation?: string,
public billingAddress?: string,
public contractualAddress?: string,
public billingSalutation?: string,
public roles?: ICustomerContact[],
public memberships?: IMembership[]
public billingAddress?: string,
public remark?: string,
public memberships?: IMembership[],
public sepamandates?: ISepaMandate[]
) {}
}

View File

@ -4,8 +4,10 @@ import { IAsset } from 'app/shared/model/asset.model';
export interface IMembership {
id?: number;
sinceDate?: Moment;
untilDate?: Moment;
documentDate?: Moment;
memberFrom?: Moment;
memberUntil?: Moment;
remark?: string;
shares?: IShare[];
assets?: IAsset[];
customerPrefix?: string;
@ -15,8 +17,10 @@ export interface IMembership {
export class Membership implements IMembership {
constructor(
public id?: number,
public sinceDate?: Moment,
public untilDate?: Moment,
public documentDate?: Moment,
public memberFrom?: Moment,
public memberUntil?: Moment,
public remark?: string,
public shares?: IShare[],
public assets?: IAsset[],
public customerPrefix?: string,

View File

@ -0,0 +1,33 @@
import { Moment } from 'moment';
export interface ISepaMandate {
id?: number;
reference?: string;
iban?: string;
bic?: string;
documentDate?: Moment;
validFrom?: Moment;
validUntil?: Moment;
lastUsed?: Moment;
cancellationDate?: Moment;
remark?: string;
customerPrefix?: string;
customerId?: number;
}
export class SepaMandate implements ISepaMandate {
constructor(
public id?: number,
public reference?: string,
public iban?: string,
public bic?: string,
public documentDate?: Moment,
public validFrom?: Moment,
public validUntil?: Moment,
public lastUsed?: Moment,
public cancellationDate?: Moment,
public remark?: string,
public customerPrefix?: string,
public customerId?: number
) {}
}

View File

@ -7,20 +7,24 @@ export const enum ShareAction {
export interface IShare {
id?: number;
date?: Moment;
documentDate?: Moment;
valueDate?: Moment;
action?: ShareAction;
quantity?: number;
comment?: string;
memberId?: number;
remark?: string;
membershipDocumentDate?: string;
membershipId?: number;
}
export class Share implements IShare {
constructor(
public id?: number,
public date?: Moment,
public documentDate?: Moment,
public valueDate?: Moment,
public action?: ShareAction,
public quantity?: number,
public comment?: string,
public memberId?: number
public remark?: string,
public membershipDocumentDate?: string,
public membershipId?: number
) {}
}

View File

@ -15,11 +15,12 @@
"detail": {
"title": "Asset"
},
"date": "Date",
"documentDate": "Document Date",
"valueDate": "Value Date",
"action": "Action",
"amount": "Amount",
"comment": "Comment",
"member": "Member"
"remark": "Remark",
"membership": "Membership"
}
}
}

View File

@ -15,15 +15,16 @@
"detail": {
"title": "Customer"
},
"number": "Number",
"reference": "Reference",
"prefix": "Prefix",
"name": "Name",
"contractualAddress": "Contractual Address",
"contractualSalutation": "Contractual Salutation",
"billingAddress": "Billing Address",
"contractualAddress": "Contractual Address",
"billingSalutation": "Billing Salutation",
"role": "Role",
"membership": "Membership"
"billingAddress": "Billing Address",
"remark": "Remark",
"membership": "Membership",
"sepamandate": "Sepamandate"
}
}
}

View File

@ -13,6 +13,7 @@
"membership": "Membership",
"share": "Share",
"asset": "Asset",
"sepaMandate": "Sepa Mandate",
"jhipster-needle-menu-add-entry": "JHipster will add additional entities here (do not translate!)"
},
"account": {

View File

@ -15,8 +15,10 @@
"detail": {
"title": "Membership"
},
"sinceDate": "Since Date",
"untilDate": "Until Date",
"documentDate": "Document Date",
"memberFrom": "Member From",
"memberUntil": "Member Until",
"remark": "Remark",
"share": "Share",
"asset": "Asset",
"customer": "Customer"

View File

@ -0,0 +1,30 @@
{
"hsadminNgApp": {
"sepaMandate": {
"home": {
"title": "Sepa Mandates",
"createLabel": "Sepa Mandate erstellen",
"createOrEditLabel": "Sepa Mandate erstellen oder bearbeiten"
},
"created": "Sepa Mandate erstellt mit ID {{ param }}",
"updated": "Sepa Mandate aktualisiert mit ID {{ param }}",
"deleted": "Sepa Mandate gelöscht mit ID {{ param }}",
"delete": {
"question": "Soll Sepa Mandate {{ id }} wirklich dauerhaft gelöscht werden?"
},
"detail": {
"title": "Sepa Mandate"
},
"reference": "Reference",
"iban": "Iban",
"bic": "Bic",
"documentDate": "Document Date",
"validFrom": "Valid From",
"validUntil": "Valid Until",
"lastUsed": "Last Used",
"cancellationDate": "Cancellation Date",
"remark": "Remark",
"customer": "Customer"
}
}
}

View File

@ -15,11 +15,12 @@
"detail": {
"title": "Share"
},
"date": "Date",
"documentDate": "Document Date",
"valueDate": "Value Date",
"action": "Action",
"quantity": "Quantity",
"comment": "Comment",
"member": "Member"
"remark": "Remark",
"membership": "Membership"
}
}
}

View File

@ -15,11 +15,12 @@
"detail": {
"title": "Asset"
},
"date": "Date",
"documentDate": "Document Date",
"valueDate": "Value Date",
"action": "Action",
"amount": "Amount",
"comment": "Comment",
"member": "Member"
"remark": "Remark",
"membership": "Membership"
}
}
}

View File

@ -15,15 +15,16 @@
"detail": {
"title": "Customer"
},
"number": "Number",
"reference": "Reference",
"prefix": "Prefix",
"name": "Name",
"contractualAddress": "Contractual Address",
"contractualSalutation": "Contractual Salutation",
"billingAddress": "Billing Address",
"contractualAddress": "Contractual Address",
"billingSalutation": "Billing Salutation",
"role": "Role",
"membership": "Membership"
"billingAddress": "Billing Address",
"remark": "Remark",
"membership": "Membership",
"sepamandate": "Sepamandate"
}
}
}

View File

@ -13,6 +13,7 @@
"membership": "Membership",
"share": "Share",
"asset": "Asset",
"sepaMandate": "Sepa Mandate",
"jhipster-needle-menu-add-entry": "JHipster will add additional entities here (do not translate!)"
},
"account": {

View File

@ -15,8 +15,10 @@
"detail": {
"title": "Membership"
},
"sinceDate": "Since Date",
"untilDate": "Until Date",
"documentDate": "Document Date",
"memberFrom": "Member From",
"memberUntil": "Member Until",
"remark": "Remark",
"share": "Share",
"asset": "Asset",
"customer": "Customer"

View File

@ -0,0 +1,30 @@
{
"hsadminNgApp": {
"sepaMandate": {
"home": {
"title": "Sepa Mandates",
"createLabel": "Create a new Sepa Mandate",
"createOrEditLabel": "Create or edit a Sepa Mandate"
},
"created": "A new Sepa Mandate is created with identifier {{ param }}",
"updated": "A Sepa Mandate is updated with identifier {{ param }}",
"deleted": "A Sepa Mandate is deleted with identifier {{ param }}",
"delete": {
"question": "Are you sure you want to delete Sepa Mandate {{ id }}?"
},
"detail": {
"title": "Sepa Mandate"
},
"reference": "Reference",
"iban": "Iban",
"bic": "Bic",
"documentDate": "Document Date",
"validFrom": "Valid From",
"validUntil": "Valid Until",
"lastUsed": "Last Used",
"cancellationDate": "Cancellation Date",
"remark": "Remark",
"customer": "Customer"
}
}
}

View File

@ -15,11 +15,12 @@
"detail": {
"title": "Share"
},
"date": "Date",
"documentDate": "Document Date",
"valueDate": "Value Date",
"action": "Action",
"quantity": "Quantity",
"comment": "Comment",
"member": "Member"
"remark": "Remark",
"membership": "Membership"
}
}
}