Model customers.
This commit is contained in:
@ -10,44 +10,53 @@
|
||||
[(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.from" for="field_from">From</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_from" type="text" class="form-control" name="from" ngbDatepicker #fromDp="ngbDatepicker" [(ngModel)]="membership.from"
|
||||
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)="fromDp.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.from?.dirty && editForm.controls.from?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.sinceDate?.errors?.required" jhiTranslate="entity.validation.required">
|
||||
[hidden]="!editForm.controls.from?.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.to" for="field_to">To</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_to" type="text" class="form-control" name="to" ngbDatepicker #toDp="ngbDatepicker" [(ngModel)]="membership.to"
|
||||
/>
|
||||
<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)="toDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.comment" for="field_comment">Comment</label>
|
||||
<input type="text" class="form-control" name="comment" id="field_comment"
|
||||
[(ngModel)]="membership.comment" maxlength="160"/>
|
||||
<div [hidden]="!(editForm.controls.comment?.dirty && editForm.controls.comment?.invalid)">
|
||||
<small class="form-text text-danger"
|
||||
[hidden]="!editForm.controls.comment?.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>
|
||||
|
Reference in New Issue
Block a user