merging from master
This commit is contained in:
@ -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.membershipDocumentDate}}</a>
|
||||
<a [routerLink]="['/membership', asset.membershipId, 'view']">{{asset.membershipAdmissionDocumentDate}}</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.documentDate}}</option>
|
||||
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.admissionDocumentDate}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div [hidden]="!(editForm.controls.membership?.dirty && editForm.controls.membership?.invalid)">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<th jhiSortBy="action"><span jhiTranslate="hsadminNgApp.asset.action">Action</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="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="membershipDocumentDate"><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="membershipAdmissionDocumentDate"><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -34,7 +34,7 @@
|
||||
<td>{{asset.remark}}</td>
|
||||
<td>
|
||||
<div *ngIf="asset.membershipId">
|
||||
<a [routerLink]="['../membership', asset.membershipId , 'view' ]" >{{asset.membershipDocumentDate}}</a>
|
||||
<a [routerLink]="['../membership', asset.membershipId , 'view' ]" >{{asset.membershipAdmissionDocumentDate}}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
|
@ -17,6 +17,34 @@
|
||||
<dd>
|
||||
<span>{{customer.name}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.customer.kind">Kind</span></dt>
|
||||
<dd>
|
||||
<span jhiTranslate="{{'hsadminNgApp.CustomerKind.' + customer.kind}}">{{customer.kind}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.customer.birthDate">Birth Date</span></dt>
|
||||
<dd>
|
||||
<span>{{customer.birthDate}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.customer.birthPlace">Birth Place</span></dt>
|
||||
<dd>
|
||||
<span>{{customer.birthPlace}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.customer.registrationCourt">Registration Court</span></dt>
|
||||
<dd>
|
||||
<span>{{customer.registrationCourt}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.customer.registrationNumber">Registration Number</span></dt>
|
||||
<dd>
|
||||
<span>{{customer.registrationNumber}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.customer.vatRegion">Vat Region</span></dt>
|
||||
<dd>
|
||||
<span jhiTranslate="{{'hsadminNgApp.VatRegion.' + customer.vatRegion}}">{{customer.vatRegion}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.customer.vatNumber">Vat Number</span></dt>
|
||||
<dd>
|
||||
<span>{{customer.vatNumber}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual Salutation</span></dt>
|
||||
<dd>
|
||||
<span>{{customer.contractualSalutation}}</span>
|
||||
|
@ -66,6 +66,87 @@
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.kind" for="field_kind">Kind</label>
|
||||
<select class="form-control" name="kind" [(ngModel)]="customer.kind" id="field_kind" required>
|
||||
<option value="NATURAL">{{'hsadminNgApp.CustomerKind.NATURAL' | translate}}</option>
|
||||
<option value="LEGAL">{{'hsadminNgApp.CustomerKind.LEGAL' | translate}}</option>
|
||||
</select>
|
||||
<div [hidden]="!(editForm.controls.kind?.dirty && editForm.controls.kind?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.kind?.errors?.required" jhiTranslate="entity.validation.required">
|
||||
This field is required.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.birthDate" for="field_birthDate">Birth Date</label>
|
||||
<div class="input-group">
|
||||
<input id="field_birthDate" type="text" class="form-control" name="birthDate" ngbDatepicker #birthDateDp="ngbDatepicker" [(ngModel)]="customer.birthDate"
|
||||
/>
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary" (click)="birthDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.birthPlace" for="field_birthPlace">Birth Place</label>
|
||||
<input type="text" class="form-control" name="birthPlace" id="field_birthPlace"
|
||||
[(ngModel)]="customer.birthPlace" maxlength="80"/>
|
||||
<div [hidden]="!(editForm.controls.birthPlace?.dirty && editForm.controls.birthPlace?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.birthPlace?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
|
||||
This field cannot be longer than 80 characters.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.registrationCourt" for="field_registrationCourt">Registration Court</label>
|
||||
<input type="text" class="form-control" name="registrationCourt" id="field_registrationCourt"
|
||||
[(ngModel)]="customer.registrationCourt" maxlength="80"/>
|
||||
<div [hidden]="!(editForm.controls.registrationCourt?.dirty && editForm.controls.registrationCourt?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.registrationCourt?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
|
||||
This field cannot be longer than 80 characters.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.registrationNumber" for="field_registrationNumber">Registration Number</label>
|
||||
<input type="text" class="form-control" name="registrationNumber" id="field_registrationNumber"
|
||||
[(ngModel)]="customer.registrationNumber" maxlength="80"/>
|
||||
<div [hidden]="!(editForm.controls.registrationNumber?.dirty && editForm.controls.registrationNumber?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.registrationNumber?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
|
||||
This field cannot be longer than 80 characters.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.vatRegion" for="field_vatRegion">Vat Region</label>
|
||||
<select class="form-control" name="vatRegion" [(ngModel)]="customer.vatRegion" id="field_vatRegion" required>
|
||||
<option value="DOMESTIC">{{'hsadminNgApp.VatRegion.DOMESTIC' | translate}}</option>
|
||||
<option value="EU">{{'hsadminNgApp.VatRegion.EU' | translate}}</option>
|
||||
<option value="OTHER">{{'hsadminNgApp.VatRegion.OTHER' | translate}}</option>
|
||||
</select>
|
||||
<div [hidden]="!(editForm.controls.vatRegion?.dirty && editForm.controls.vatRegion?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.vatRegion?.errors?.required" jhiTranslate="entity.validation.required">
|
||||
This field is required.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.vatNumber" for="field_vatNumber">Vat Number</label>
|
||||
<input type="text" class="form-control" name="vatNumber" id="field_vatNumber"
|
||||
[(ngModel)]="customer.vatNumber" maxlength="40"/>
|
||||
<div [hidden]="!(editForm.controls.vatNumber?.dirty && editForm.controls.vatNumber?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.vatNumber?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 40 }">
|
||||
This field cannot be longer than 40 characters.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<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"
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
||||
import { HttpErrorResponse, HttpResponse } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { filter, map } from 'rxjs/operators';
|
||||
import { ICustomer } from 'app/shared/model/customer.model';
|
||||
import { CustomerService } from './customer.service';
|
||||
|
||||
@ -13,6 +12,7 @@ import { CustomerService } from './customer.service';
|
||||
export class CustomerUpdateComponent implements OnInit {
|
||||
customer: ICustomer;
|
||||
isSaving: boolean;
|
||||
birthDateDp: any;
|
||||
|
||||
constructor(protected customerService: CustomerService, protected activatedRoute: ActivatedRoute) {}
|
||||
|
||||
|
@ -18,6 +18,13 @@
|
||||
<th jhiSortBy="reference"><span jhiTranslate="hsadminNgApp.customer.reference">Reference</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="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>
|
||||
@ -32,6 +39,13 @@
|
||||
<td>{{customer.reference}}</td>
|
||||
<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>
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http';
|
||||
import { Subscription, Subject } from 'rxjs';
|
||||
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
||||
import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { JhiAlertService, JhiEventManager, JhiParseLinks } from 'ng-jhipster';
|
||||
|
||||
import { ICustomer } from 'app/shared/model/customer.model';
|
||||
import { AccountService } from 'app/core';
|
||||
@ -24,9 +23,6 @@ export class CustomerComponent implements OnInit, OnDestroy {
|
||||
predicate: any;
|
||||
reverse: any;
|
||||
totalItems: number;
|
||||
filterValue: any;
|
||||
filterValueChanged = new Subject<string>();
|
||||
subscription: Subscription;
|
||||
|
||||
constructor(
|
||||
protected customerService: CustomerService,
|
||||
@ -43,25 +39,11 @@ export class CustomerComponent implements OnInit, OnDestroy {
|
||||
};
|
||||
this.predicate = 'id';
|
||||
this.reverse = true;
|
||||
this.resetFilter();
|
||||
}
|
||||
|
||||
resetFilter() {
|
||||
this.filterValue = {
|
||||
number: null,
|
||||
prefix: null
|
||||
};
|
||||
this.loadAll();
|
||||
}
|
||||
|
||||
loadAll() {
|
||||
const criteria = {
|
||||
...(this.filterValue.number && { 'number.equals': this.filterValue.number }),
|
||||
...(this.filterValue.prefix && { 'prefix.contains': this.filterValue.prefix })
|
||||
};
|
||||
this.customerService
|
||||
.query({
|
||||
...criteria,
|
||||
page: this.page,
|
||||
size: this.itemsPerPage,
|
||||
sort: this.sort()
|
||||
@ -72,10 +54,6 @@ export class CustomerComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
}
|
||||
|
||||
filter($event) {
|
||||
this.filterValueChanged.next($event.target.value);
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.page = 0;
|
||||
this.customers = [];
|
||||
@ -93,15 +71,6 @@ export class CustomerComponent implements OnInit, OnDestroy {
|
||||
this.currentAccount = account;
|
||||
});
|
||||
this.registerChangeInCustomers();
|
||||
|
||||
this.subscription = this.filterValueChanged
|
||||
.pipe(
|
||||
debounceTime(500),
|
||||
distinctUntilChanged((previous: any, current: any) => previous === current)
|
||||
)
|
||||
.subscribe(() => {
|
||||
this.loadAll();
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
@ -127,8 +96,6 @@ export class CustomerComponent implements OnInit, OnDestroy {
|
||||
protected paginateCustomers(data: ICustomer[], headers: HttpHeaders) {
|
||||
this.links = this.parseLinks.parse(headers.get('link'));
|
||||
this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
|
||||
this.page = 0;
|
||||
this.customers = [];
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.customers.push(data[i]);
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
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';
|
||||
@ -16,23 +19,56 @@ export class CustomerService {
|
||||
constructor(protected http: HttpClient) {}
|
||||
|
||||
create(customer: ICustomer): Observable<EntityResponseType> {
|
||||
return this.http.post<ICustomer>(this.resourceUrl, customer, { observe: 'response' });
|
||||
const copy = this.convertDateFromClient(customer);
|
||||
return this.http
|
||||
.post<ICustomer>(this.resourceUrl, copy, { observe: 'response' })
|
||||
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
|
||||
}
|
||||
|
||||
update(customer: ICustomer): Observable<EntityResponseType> {
|
||||
return this.http.put<ICustomer>(this.resourceUrl, customer, { observe: 'response' });
|
||||
const copy = this.convertDateFromClient(customer);
|
||||
return this.http
|
||||
.put<ICustomer>(this.resourceUrl, copy, { observe: 'response' })
|
||||
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
|
||||
}
|
||||
|
||||
find(id: number): Observable<EntityResponseType> {
|
||||
return this.http.get<ICustomer>(`${this.resourceUrl}/${id}`, { observe: 'response' });
|
||||
return this.http
|
||||
.get<ICustomer>(`${this.resourceUrl}/${id}`, { observe: 'response' })
|
||||
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
|
||||
}
|
||||
|
||||
query(req?: any): Observable<EntityArrayResponseType> {
|
||||
const options = createRequestOption(req);
|
||||
return this.http.get<ICustomer[]>(this.resourceUrl, { params: options, observe: 'response' });
|
||||
return this.http
|
||||
.get<ICustomer[]>(this.resourceUrl, { params: options, observe: 'response' })
|
||||
.pipe(map((res: EntityArrayResponseType) => this.convertDateArrayFromServer(res)));
|
||||
}
|
||||
|
||||
delete(id: number): Observable<HttpResponse<any>> {
|
||||
return this.http.delete<any>(`${this.resourceUrl}/${id}`, { observe: 'response' });
|
||||
}
|
||||
|
||||
protected convertDateFromClient(customer: ICustomer): ICustomer {
|
||||
const copy: ICustomer = Object.assign({}, customer, {
|
||||
birthDate: customer.birthDate != null && customer.birthDate.isValid() ? customer.birthDate.format(DATE_FORMAT) : null
|
||||
});
|
||||
return copy;
|
||||
}
|
||||
|
||||
protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
|
||||
if (res.body) {
|
||||
res.body.birthDate = res.body.birthDate != null ? moment(res.body.birthDate) : null;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
|
||||
if (res.body) {
|
||||
res.body.forEach((customer: ICustomer) => {
|
||||
customer.birthDate = customer.birthDate != null ? moment(customer.birthDate) : null;
|
||||
});
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
@ -5,17 +5,21 @@
|
||||
<hr>
|
||||
<jhi-alert-error></jhi-alert-error>
|
||||
<dl class="row-md jh-entity-details">
|
||||
<dt><span jhiTranslate="hsadminNgApp.membership.documentDate">Document Date</span></dt>
|
||||
<dt><span jhiTranslate="hsadminNgApp.membership.admissionDocumentDate">Admission Document Date</span></dt>
|
||||
<dd>
|
||||
<span>{{membership.documentDate}}</span>
|
||||
<span>{{membership.admissionDocumentDate}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.membership.memberFrom">Member From</span></dt>
|
||||
<dt><span jhiTranslate="hsadminNgApp.membership.cancellationDocumentDate">Cancellation Document Date</span></dt>
|
||||
<dd>
|
||||
<span>{{membership.memberFrom}}</span>
|
||||
<span>{{membership.cancellationDocumentDate}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.membership.memberUntil">Member Until</span></dt>
|
||||
<dt><span jhiTranslate="hsadminNgApp.membership.memberFromDate">Member From Date</span></dt>
|
||||
<dd>
|
||||
<span>{{membership.memberUntil}}</span>
|
||||
<span>{{membership.memberFromDate}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.membership.memberUntilDate">Member Until Date</span></dt>
|
||||
<dd>
|
||||
<span>{{membership.memberUntilDate}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.membership.remark">Remark</span></dt>
|
||||
<dd>
|
||||
|
@ -10,44 +10,54 @@
|
||||
[(ngModel)]="membership.id" readonly />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.documentDate" for="field_documentDate">Document Date</label>
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.admissionDocumentDate" for="field_admissionDocumentDate">Admission Document Date</label>
|
||||
<div class="input-group">
|
||||
<input id="field_documentDate" type="text" class="form-control" name="documentDate" ngbDatepicker #documentDateDp="ngbDatepicker" [(ngModel)]="membership.documentDate"
|
||||
<input id="field_admissionDocumentDate" type="text" class="form-control" name="admissionDocumentDate" ngbDatepicker #admissionDocumentDateDp="ngbDatepicker" [(ngModel)]="membership.admissionDocumentDate"
|
||||
required/>
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary" (click)="documentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
<button type="button" class="btn btn-secondary" (click)="admissionDocumentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
<div [hidden]="!(editForm.controls.documentDate?.dirty && editForm.controls.documentDate?.invalid)">
|
||||
<div [hidden]="!(editForm.controls.admissionDocumentDate?.dirty && editForm.controls.admissionDocumentDate?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.documentDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||
[hidden]="!editForm.controls.admissionDocumentDate?.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.memberFrom" for="field_memberFrom">Member From</label>
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.cancellationDocumentDate" for="field_cancellationDocumentDate">Cancellation Document Date</label>
|
||||
<div class="input-group">
|
||||
<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"
|
||||
<input id="field_cancellationDocumentDate" type="text" class="form-control" name="cancellationDocumentDate" ngbDatepicker #cancellationDocumentDateDp="ngbDatepicker" [(ngModel)]="membership.cancellationDocumentDate"
|
||||
/>
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary" (click)="memberUntilDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
<button type="button" class="btn btn-secondary" (click)="cancellationDocumentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.memberFromDate" for="field_memberFromDate">Member From Date</label>
|
||||
<div class="input-group">
|
||||
<input id="field_memberFromDate" type="text" class="form-control" name="memberFromDate" ngbDatepicker #memberFromDateDp="ngbDatepicker" [(ngModel)]="membership.memberFromDate"
|
||||
required/>
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary" (click)="memberFromDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
<div [hidden]="!(editForm.controls.memberFromDate?.dirty && editForm.controls.memberFromDate?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.memberFromDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||
This field is required.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.memberUntilDate" for="field_memberUntilDate">Member Until Date</label>
|
||||
<div class="input-group">
|
||||
<input id="field_memberUntilDate" type="text" class="form-control" name="memberUntilDate" ngbDatepicker #memberUntilDateDp="ngbDatepicker" [(ngModel)]="membership.memberUntilDate"
|
||||
/>
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary" (click)="memberUntilDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,9 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
||||
import { HttpErrorResponse, HttpResponse } 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 { IMembership } from 'app/shared/model/membership.model';
|
||||
import { MembershipService } from './membership.service';
|
||||
@ -19,9 +18,10 @@ export class MembershipUpdateComponent implements OnInit {
|
||||
isSaving: boolean;
|
||||
|
||||
customers: ICustomer[];
|
||||
documentDateDp: any;
|
||||
memberFromDp: any;
|
||||
memberUntilDp: any;
|
||||
admissionDocumentDateDp: any;
|
||||
cancellationDocumentDateDp: any;
|
||||
memberFromDateDp: any;
|
||||
memberUntilDateDp: any;
|
||||
|
||||
constructor(
|
||||
protected jhiAlertService: JhiAlertService,
|
||||
|
@ -15,9 +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="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="admissionDocumentDate"><span jhiTranslate="hsadminNgApp.membership.admissionDocumentDate">Admission Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="cancellationDocumentDate"><span jhiTranslate="hsadminNgApp.membership.cancellationDocumentDate">Cancellation Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="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>
|
||||
@ -26,9 +27,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.documentDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.memberFrom | date:'mediumDate'}}</td>
|
||||
<td>{{membership.memberUntil | date:'mediumDate'}}</td>
|
||||
<td>{{membership.admissionDocumentDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.cancellationDocumentDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.memberFromDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.memberUntilDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.remark}}</td>
|
||||
<td>
|
||||
<div *ngIf="membership.customerId">
|
||||
|
@ -51,20 +51,33 @@ export class MembershipService {
|
||||
|
||||
protected convertDateFromClient(membership: IMembership): IMembership {
|
||||
const copy: IMembership = Object.assign({}, membership, {
|
||||
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
|
||||
admissionDocumentDate:
|
||||
membership.admissionDocumentDate != null && membership.admissionDocumentDate.isValid()
|
||||
? membership.admissionDocumentDate.format(DATE_FORMAT)
|
||||
: null,
|
||||
cancellationDocumentDate:
|
||||
membership.cancellationDocumentDate != null && membership.cancellationDocumentDate.isValid()
|
||||
? membership.cancellationDocumentDate.format(DATE_FORMAT)
|
||||
: null,
|
||||
memberFromDate:
|
||||
membership.memberFromDate != null && membership.memberFromDate.isValid()
|
||||
? membership.memberFromDate.format(DATE_FORMAT)
|
||||
: null,
|
||||
memberUntilDate:
|
||||
membership.memberUntilDate != null && membership.memberUntilDate.isValid()
|
||||
? membership.memberUntilDate.format(DATE_FORMAT)
|
||||
: null
|
||||
});
|
||||
return copy;
|
||||
}
|
||||
|
||||
protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
|
||||
if (res.body) {
|
||||
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;
|
||||
res.body.admissionDocumentDate = res.body.admissionDocumentDate != null ? moment(res.body.admissionDocumentDate) : null;
|
||||
res.body.cancellationDocumentDate =
|
||||
res.body.cancellationDocumentDate != null ? moment(res.body.cancellationDocumentDate) : null;
|
||||
res.body.memberFromDate = res.body.memberFromDate != null ? moment(res.body.memberFromDate) : null;
|
||||
res.body.memberUntilDate = res.body.memberUntilDate != null ? moment(res.body.memberUntilDate) : null;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@ -72,9 +85,12 @@ export class MembershipService {
|
||||
protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
|
||||
if (res.body) {
|
||||
res.body.forEach((membership: IMembership) => {
|
||||
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;
|
||||
membership.admissionDocumentDate =
|
||||
membership.admissionDocumentDate != null ? moment(membership.admissionDocumentDate) : null;
|
||||
membership.cancellationDocumentDate =
|
||||
membership.cancellationDocumentDate != null ? moment(membership.cancellationDocumentDate) : null;
|
||||
membership.memberFromDate = membership.memberFromDate != null ? moment(membership.memberFromDate) : null;
|
||||
membership.memberUntilDate = membership.memberUntilDate != null ? moment(membership.memberUntilDate) : null;
|
||||
});
|
||||
}
|
||||
return res;
|
||||
|
@ -17,25 +17,25 @@
|
||||
<dd>
|
||||
<span>{{sepaMandate.bic}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.documentDate">Document Date</span></dt>
|
||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.grantingDocumentDate">Granting Document Date</span></dt>
|
||||
<dd>
|
||||
<span>{{sepaMandate.documentDate}}</span>
|
||||
<span>{{sepaMandate.grantingDocumentDate}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validFrom">Valid From</span></dt>
|
||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.revokationDocumentDate">Revokation Document Date</span></dt>
|
||||
<dd>
|
||||
<span>{{sepaMandate.validFrom}}</span>
|
||||
<span>{{sepaMandate.revokationDocumentDate}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validUntil">Valid Until</span></dt>
|
||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validFromDate">Valid From Date</span></dt>
|
||||
<dd>
|
||||
<span>{{sepaMandate.validUntil}}</span>
|
||||
<span>{{sepaMandate.validFromDate}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsed">Last Used</span></dt>
|
||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.validUntilDate">Valid Until Date</span></dt>
|
||||
<dd>
|
||||
<span>{{sepaMandate.lastUsed}}</span>
|
||||
<span>{{sepaMandate.validUntilDate}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.cancellationDate">Cancellation Date</span></dt>
|
||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsedDate">Last Used Date</span></dt>
|
||||
<dd>
|
||||
<span>{{sepaMandate.cancellationDate}}</span>
|
||||
<span>{{sepaMandate.lastUsedDate}}</span>
|
||||
</dd>
|
||||
<dt><span jhiTranslate="hsadminNgApp.sepaMandate.remark">Remark</span></dt>
|
||||
<dd>
|
||||
|
@ -47,64 +47,64 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.documentDate" for="field_documentDate">Document Date</label>
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.grantingDocumentDate" for="field_grantingDocumentDate">Granting Document Date</label>
|
||||
<div class="input-group">
|
||||
<input id="field_documentDate" type="text" class="form-control" name="documentDate" ngbDatepicker #documentDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.documentDate"
|
||||
<input id="field_grantingDocumentDate" type="text" class="form-control" name="grantingDocumentDate" ngbDatepicker #grantingDocumentDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.grantingDocumentDate"
|
||||
required/>
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary" (click)="documentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
<button type="button" class="btn btn-secondary" (click)="grantingDocumentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
<div [hidden]="!(editForm.controls.documentDate?.dirty && editForm.controls.documentDate?.invalid)">
|
||||
<div [hidden]="!(editForm.controls.grantingDocumentDate?.dirty && editForm.controls.grantingDocumentDate?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.documentDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||
[hidden]="!editForm.controls.grantingDocumentDate?.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>
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.revokationDocumentDate" for="field_revokationDocumentDate">Revokation Document Date</label>
|
||||
<div class="input-group">
|
||||
<input id="field_validFrom" type="text" class="form-control" name="validFrom" ngbDatepicker #validFromDp="ngbDatepicker" [(ngModel)]="sepaMandate.validFrom"
|
||||
required/>
|
||||
<input id="field_revokationDocumentDate" type="text" class="form-control" name="revokationDocumentDate" ngbDatepicker #revokationDocumentDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.revokationDocumentDate"
|
||||
/>
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary" (click)="validFromDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
<button type="button" class="btn btn-secondary" (click)="revokationDocumentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
<div [hidden]="!(editForm.controls.validFrom?.dirty && editForm.controls.validFrom?.invalid)">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.validFromDate" for="field_validFromDate">Valid From Date</label>
|
||||
<div class="input-group">
|
||||
<input id="field_validFromDate" type="text" class="form-control" name="validFromDate" ngbDatepicker #validFromDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.validFromDate"
|
||||
required/>
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary" (click)="validFromDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
<div [hidden]="!(editForm.controls.validFromDate?.dirty && editForm.controls.validFromDate?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.validFrom?.errors?.required" jhiTranslate="entity.validation.required">
|
||||
[hidden]="!editForm.controls.validFromDate?.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>
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.validUntilDate" for="field_validUntilDate">Valid Until Date</label>
|
||||
<div class="input-group">
|
||||
<input id="field_validUntil" type="text" class="form-control" name="validUntil" ngbDatepicker #validUntilDp="ngbDatepicker" [(ngModel)]="sepaMandate.validUntil"
|
||||
<input id="field_validUntilDate" type="text" class="form-control" name="validUntilDate" ngbDatepicker #validUntilDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.validUntilDate"
|
||||
/>
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary" (click)="validUntilDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
<button type="button" class="btn btn-secondary" (click)="validUntilDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.lastUsed" for="field_lastUsed">Last Used</label>
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.sepaMandate.lastUsedDate" for="field_lastUsedDate">Last Used Date</label>
|
||||
<div class="input-group">
|
||||
<input id="field_lastUsed" type="text" class="form-control" name="lastUsed" ngbDatepicker #lastUsedDp="ngbDatepicker" [(ngModel)]="sepaMandate.lastUsed"
|
||||
<input id="field_lastUsedDate" type="text" class="form-control" name="lastUsedDate" ngbDatepicker #lastUsedDateDp="ngbDatepicker" [(ngModel)]="sepaMandate.lastUsedDate"
|
||||
/>
|
||||
<span class="input-group-append">
|
||||
<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>
|
||||
<button type="button" class="btn btn-secondary" (click)="lastUsedDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,9 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
||||
import { HttpErrorResponse, HttpResponse } 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';
|
||||
@ -19,11 +18,11 @@ export class SepaMandateUpdateComponent implements OnInit {
|
||||
isSaving: boolean;
|
||||
|
||||
customers: ICustomer[];
|
||||
documentDateDp: any;
|
||||
validFromDp: any;
|
||||
validUntilDp: any;
|
||||
lastUsedDp: any;
|
||||
cancellationDateDp: any;
|
||||
grantingDocumentDateDp: any;
|
||||
revokationDocumentDateDp: any;
|
||||
validFromDateDp: any;
|
||||
validUntilDateDp: any;
|
||||
lastUsedDateDp: any;
|
||||
|
||||
constructor(
|
||||
protected jhiAlertService: JhiAlertService,
|
||||
|
@ -18,11 +18,11 @@
|
||||
<th jhiSortBy="reference"><span jhiTranslate="hsadminNgApp.sepaMandate.reference">Reference</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="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="grantingDocumentDate"><span jhiTranslate="hsadminNgApp.sepaMandate.grantingDocumentDate">Granting Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="revokationDocumentDate"><span jhiTranslate="hsadminNgApp.sepaMandate.revokationDocumentDate">Revokation Document Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="validFromDate"><span jhiTranslate="hsadminNgApp.sepaMandate.validFromDate">Valid From Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="validUntilDate"><span jhiTranslate="hsadminNgApp.sepaMandate.validUntilDate">Valid Until Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="lastUsedDate"><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsedDate">Last Used Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="remark"><span jhiTranslate="hsadminNgApp.sepaMandate.remark">Remark</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="customerPrefix"><span jhiTranslate="hsadminNgApp.sepaMandate.customer">Customer</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th></th>
|
||||
@ -34,11 +34,11 @@
|
||||
<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.grantingDocumentDate | date:'mediumDate'}}</td>
|
||||
<td>{{sepaMandate.revokationDocumentDate | date:'mediumDate'}}</td>
|
||||
<td>{{sepaMandate.validFromDate | date:'mediumDate'}}</td>
|
||||
<td>{{sepaMandate.validUntilDate | date:'mediumDate'}}</td>
|
||||
<td>{{sepaMandate.lastUsedDate | date:'mediumDate'}}</td>
|
||||
<td>{{sepaMandate.remark}}</td>
|
||||
<td>
|
||||
<div *ngIf="sepaMandate.customerId">
|
||||
|
@ -51,29 +51,35 @@ export class SepaMandateService {
|
||||
|
||||
protected convertDateFromClient(sepaMandate: ISepaMandate): ISepaMandate {
|
||||
const copy: ISepaMandate = Object.assign({}, sepaMandate, {
|
||||
documentDate:
|
||||
sepaMandate.documentDate != null && sepaMandate.documentDate.isValid()
|
||||
? sepaMandate.documentDate.format(DATE_FORMAT)
|
||||
grantingDocumentDate:
|
||||
sepaMandate.grantingDocumentDate != null && sepaMandate.grantingDocumentDate.isValid()
|
||||
? sepaMandate.grantingDocumentDate.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
|
||||
revokationDocumentDate:
|
||||
sepaMandate.revokationDocumentDate != null && sepaMandate.revokationDocumentDate.isValid()
|
||||
? sepaMandate.revokationDocumentDate.format(DATE_FORMAT)
|
||||
: null,
|
||||
validFromDate:
|
||||
sepaMandate.validFromDate != null && sepaMandate.validFromDate.isValid()
|
||||
? sepaMandate.validFromDate.format(DATE_FORMAT)
|
||||
: null,
|
||||
validUntilDate:
|
||||
sepaMandate.validUntilDate != null && sepaMandate.validUntilDate.isValid()
|
||||
? sepaMandate.validUntilDate.format(DATE_FORMAT)
|
||||
: null,
|
||||
lastUsedDate:
|
||||
sepaMandate.lastUsedDate != null && sepaMandate.lastUsedDate.isValid() ? sepaMandate.lastUsedDate.format(DATE_FORMAT) : null
|
||||
});
|
||||
return copy;
|
||||
}
|
||||
|
||||
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;
|
||||
res.body.grantingDocumentDate = res.body.grantingDocumentDate != null ? moment(res.body.grantingDocumentDate) : null;
|
||||
res.body.revokationDocumentDate = res.body.revokationDocumentDate != null ? moment(res.body.revokationDocumentDate) : null;
|
||||
res.body.validFromDate = res.body.validFromDate != null ? moment(res.body.validFromDate) : null;
|
||||
res.body.validUntilDate = res.body.validUntilDate != null ? moment(res.body.validUntilDate) : null;
|
||||
res.body.lastUsedDate = res.body.lastUsedDate != null ? moment(res.body.lastUsedDate) : null;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@ -81,11 +87,13 @@ export class SepaMandateService {
|
||||
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;
|
||||
sepaMandate.grantingDocumentDate =
|
||||
sepaMandate.grantingDocumentDate != null ? moment(sepaMandate.grantingDocumentDate) : null;
|
||||
sepaMandate.revokationDocumentDate =
|
||||
sepaMandate.revokationDocumentDate != null ? moment(sepaMandate.revokationDocumentDate) : null;
|
||||
sepaMandate.validFromDate = sepaMandate.validFromDate != null ? moment(sepaMandate.validFromDate) : null;
|
||||
sepaMandate.validUntilDate = sepaMandate.validUntilDate != null ? moment(sepaMandate.validUntilDate) : null;
|
||||
sepaMandate.lastUsedDate = sepaMandate.lastUsedDate != null ? moment(sepaMandate.lastUsedDate) : null;
|
||||
});
|
||||
}
|
||||
return res;
|
||||
|
@ -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.membershipDocumentDate}}</a>
|
||||
<a [routerLink]="['/membership', share.membershipId, 'view']">{{share.membershipAdmissionDocumentDate}}</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.documentDate}}</option>
|
||||
<option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.admissionDocumentDate}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div [hidden]="!(editForm.controls.membership?.dirty && editForm.controls.membership?.invalid)">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<th jhiSortBy="action"><span jhiTranslate="hsadminNgApp.share.action">Action</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="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="membershipDocumentDate"><span jhiTranslate="hsadminNgApp.share.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th jhiSortBy="membershipAdmissionDocumentDate"><span jhiTranslate="hsadminNgApp.share.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -34,7 +34,7 @@
|
||||
<td>{{share.remark}}</td>
|
||||
<td>
|
||||
<div *ngIf="share.membershipId">
|
||||
<a [routerLink]="['../membership', share.membershipId , 'view' ]" >{{share.membershipDocumentDate}}</a>
|
||||
<a [routerLink]="['../membership', share.membershipId , 'view' ]" >{{share.membershipAdmissionDocumentDate}}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
|
Reference in New Issue
Block a user