add placeholder="YYYY|--|++" to date filter inputs
This commit is contained in:
parent
b7aac92807
commit
cd94cb118d
@ -26,8 +26,8 @@
|
||||
<!-- filter start: -->
|
||||
<tr>
|
||||
<th style="width: 10%"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" [(ngModel)]="filter.criteria.documentDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" [(ngModel)]="filter.criteria.valueDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.documentDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.valueDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%">
|
||||
<select class="form-control" [(ngModel)]="filter.criteria.action" (change)="filter.trigger($event)">
|
||||
<option value=""></option>
|
||||
|
@ -26,10 +26,10 @@
|
||||
<!-- filter start: -->
|
||||
<tr>
|
||||
<th style="width: 10%"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" [(ngModel)]="filter.criteria.admissionDocumentDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" [(ngModel)]="filter.criteria.cancellationDocumentDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" [(ngModel)]="filter.criteria.memberFromDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" [(ngModel)]="filter.criteria.memberUntilDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.admissionDocumentDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.cancellationDocumentDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.memberFromDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.memberUntilDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 30%">
|
||||
<select id="field_customer" class="form-control" name="customer" [(ngModel)]="filter.criteria.customerId" (change)="filter.trigger($event)">
|
||||
<option [ngValue]="null" selected></option>
|
||||
|
@ -26,6 +26,28 @@
|
||||
<th jhiSortBy="customerDisplayLabel"><span jhiTranslate="hsadminNgApp.sepaMandate.customer">Customer</span> <fa-icon [icon]="'sort'"></fa-icon></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<!-- filter start: -->
|
||||
<tr>
|
||||
<th style="width: 7%"></th>
|
||||
<th style="width: 7%"><input type="text" class="form-control" style="max-width: 20em" [(ngModel)]="filter.criteria.reference" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 7%"><input type="text" class="form-control" style="max-width: 20em" [(ngModel)]="filter.criteria.iban" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 7%"><input type="text" class="form-control" style="max-width: 20em" [(ngModel)]="filter.criteria.bic" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 7%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.grantingDocumentDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 7%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.revokationDocumentDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 7%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.validFromDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 7%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.validUntilDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 7%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.lastUsedDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 17%">
|
||||
<select id="field_customer" class="form-control" name="customer" [(ngModel)]="filter.criteria.customerId" (change)="filter.trigger($event)">
|
||||
<option [ngValue]="null" selected></option>
|
||||
<option [ngValue]="customerOption.id" *ngFor="let customerOption of customers; trackBy: trackId">{{customerOption.displayLabel}}</option>
|
||||
</select>
|
||||
</th>
|
||||
<th style="width: 20%"><button class="btn btn-primary float-left" (click)="filter.reset()">Reset Filter</button></th>
|
||||
</tr>
|
||||
<!-- filter end. -->
|
||||
|
||||
</thead>
|
||||
<tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
|
||||
<tr *ngFor="let sepaMandate of sepaMandates ;trackBy: trackId">
|
||||
|
@ -9,6 +9,10 @@ import { AccountService } from 'app/core';
|
||||
|
||||
import { ITEMS_PER_PAGE } from 'app/shared';
|
||||
import { SepaMandateService } from './sepa-mandate.service';
|
||||
import { ICustomer } from 'app/shared/model/customer.model';
|
||||
import { CustomerService } from 'app/entities/customer';
|
||||
import { TableFilter, queryYearAsDateRange, queryEquals, queryContains } from 'app/shared/util/tablefilter';
|
||||
import { IMembership } from 'app/shared/model/membership.model';
|
||||
|
||||
@Component({
|
||||
selector: 'jhi-sepa-mandate',
|
||||
@ -24,9 +28,22 @@ export class SepaMandateComponent implements OnInit, OnDestroy {
|
||||
predicate: any;
|
||||
reverse: any;
|
||||
totalItems: number;
|
||||
customers: ICustomer[];
|
||||
filter: TableFilter<{
|
||||
reference?: string;
|
||||
iban?: string;
|
||||
bic?: string;
|
||||
grantingDocumentDate?: string;
|
||||
revokationDocumentDate?: string;
|
||||
validFromDate?: string;
|
||||
validUntilDate?: string;
|
||||
lastUsedDate?: string;
|
||||
customerId?: string;
|
||||
}>;
|
||||
|
||||
constructor(
|
||||
protected sepaMandateService: SepaMandateService,
|
||||
protected customerService: CustomerService,
|
||||
protected jhiAlertService: JhiAlertService,
|
||||
protected eventManager: JhiEventManager,
|
||||
protected parseLinks: JhiParseLinks,
|
||||
@ -40,11 +57,29 @@ export class SepaMandateComponent implements OnInit, OnDestroy {
|
||||
};
|
||||
this.predicate = 'id';
|
||||
this.reverse = true;
|
||||
this.filter = new TableFilter(
|
||||
{
|
||||
reference: queryContains,
|
||||
iban: queryContains,
|
||||
bic: queryContains,
|
||||
grantingDocumentDate: queryYearAsDateRange,
|
||||
revokationDocumentDate: queryYearAsDateRange,
|
||||
validFromDate: queryYearAsDateRange,
|
||||
validUntilDate: queryYearAsDateRange,
|
||||
lastUsedDate: queryYearAsDateRange,
|
||||
customerId: queryEquals
|
||||
},
|
||||
500,
|
||||
() => {
|
||||
this.loadAll();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
loadAll() {
|
||||
this.sepaMandateService
|
||||
.query({
|
||||
...this.filter.buildQueryCriteria(),
|
||||
page: this.page,
|
||||
size: this.itemsPerPage,
|
||||
sort: this.sort()
|
||||
@ -72,13 +107,20 @@ export class SepaMandateComponent implements OnInit, OnDestroy {
|
||||
this.currentAccount = account;
|
||||
});
|
||||
this.registerChangeInSepaMandates();
|
||||
this.customerService
|
||||
.query()
|
||||
.pipe(
|
||||
filter((mayBeOk: HttpResponse<IMembership[]>) => mayBeOk.ok),
|
||||
map((response: HttpResponse<IMembership[]>) => response.body)
|
||||
)
|
||||
.subscribe((res: IMembership[]) => (this.customers = res), (res: HttpErrorResponse) => this.onError(res.message));
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.eventManager.destroy(this.eventSubscriber);
|
||||
}
|
||||
|
||||
trackId(index: number, item: ISepaMandate) {
|
||||
trackId(index: number, item: { id: number }) {
|
||||
return item.id;
|
||||
}
|
||||
|
||||
@ -97,6 +139,8 @@ export class SepaMandateComponent implements OnInit, OnDestroy {
|
||||
protected paginateSepaMandates(data: ISepaMandate[], headers: HttpHeaders) {
|
||||
this.links = this.parseLinks.parse(headers.get('link'));
|
||||
this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
|
||||
this.page = 0;
|
||||
this.sepaMandates = [];
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
this.sepaMandates.push(data[i]);
|
||||
}
|
||||
|
@ -26,8 +26,8 @@
|
||||
<!-- filter start: -->
|
||||
<tr>
|
||||
<th style="width: 10%"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" [(ngModel)]="filter.criteria.documentDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" [(ngModel)]="filter.criteria.valueDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.documentDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%"><input type="text" class="form-control" style="max-width: 20em" minlength="4" maxlength="4" placeholder="YYYY|--|++" [(ngModel)]="filter.criteria.valueDate" (keyup)="filter.trigger($event)"></th>
|
||||
<th style="width: 10%">
|
||||
<select class="form-control" [(ngModel)]="filter.criteria.action" (change)="filter.trigger($event)">
|
||||
<option value=""></option>
|
||||
|
Loading…
Reference in New Issue
Block a user