feedback updates
This commit is contained in:
parent
54a4505085
commit
5fd0cd0eaa
@ -15,7 +15,7 @@
|
||||
Name is required
|
||||
</mat-error>
|
||||
<mat-error *ngIf="f['name'].errors?.['maxlength']">
|
||||
Maximum 100 characters allowed
|
||||
Maximum 50 characters allowed
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -67,7 +67,7 @@ export class ApplicationComponent {
|
||||
|
||||
createForm(): FormGroup {
|
||||
return this.fb.group({
|
||||
name: ['', [Validators.required, Validators.maxLength(100)]],
|
||||
name: ['', [Validators.required, Validators.maxLength(50)]],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -122,8 +122,8 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator [length]="dataSource.data.length" [pageSizeOptions]="[userPreferences.pageSize!]"
|
||||
[hidePageSize]="true" showFirstLastButtons></mat-paginator>
|
||||
<mat-paginator *ngIf="dataSource.data.length > userPreferences.pageSize!" [length]="dataSource.data.length"
|
||||
[pageSizeOptions]="[userPreferences.pageSize!]" [hidePageSize]="true" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
|
||||
<!-- Item Form -->
|
||||
@ -219,10 +219,10 @@
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button mat-button type="button" (click)="cancelEdit()">Cancel</button>
|
||||
<button mat-raised-button color="primary" type="submit" [disabled]="itemForm.invalid">
|
||||
Save
|
||||
</button>
|
||||
<button mat-button type="button" (click)="cancelEdit()">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -17,10 +17,10 @@ import { FormsModule } from '@angular/forms';
|
||||
</mat-radio-group>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
<button mat-button (click)="onCancel()">Cancel</button>
|
||||
<button mat-raised-button color="primary" (click)="onSelect()" [disabled]="!selectedContact">
|
||||
Select
|
||||
</button>
|
||||
<button mat-button (click)="onCancel()">Cancel</button>
|
||||
</mat-dialog-actions>
|
||||
`,
|
||||
styles: [`
|
||||
@ -39,8 +39,10 @@ export class ContactDialogComponent {
|
||||
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<ContactDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: { contacts: any[] }
|
||||
) { }
|
||||
@Inject(MAT_DIALOG_DATA) public data: { contacts: any[], currentContact: any }
|
||||
) {
|
||||
this.selectedContact = data.currentContact;
|
||||
}
|
||||
|
||||
get contacts() {
|
||||
return this.data.contacts;
|
||||
|
||||
@ -583,10 +583,11 @@ export class ShippingComponent {
|
||||
let shipTo = this.shippingForm.get('shipTo')?.value;
|
||||
|
||||
const contacts = shipTo === 'PREPARER' ? this.preparerContacts : this.holderContacts;
|
||||
const currentContact = shipTo === 'PREPARER' ? this.preparerContact : this.holderContact;
|
||||
|
||||
const dialogRef = this.dialog.open(ContactDialogComponent, {
|
||||
width: '500px',
|
||||
data: { contacts }
|
||||
data: { contacts: contacts, currentContact: currentContact }
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe(selectedItem => {
|
||||
|
||||
@ -148,6 +148,12 @@ export class TravelPlanComponent {
|
||||
}
|
||||
|
||||
takeAction(country: Country): void {
|
||||
|
||||
if (this.IsCountryExists('transit', country)) {
|
||||
this.addVisitCountryToCollection();
|
||||
return;
|
||||
}
|
||||
|
||||
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
|
||||
width: '560px',
|
||||
data: {
|
||||
@ -160,7 +166,9 @@ export class TravelPlanComponent {
|
||||
|
||||
dialogRef.afterClosed().subscribe(result => {
|
||||
if (result) {
|
||||
this.selectedAvailableTransitCountry = this.selectedAvailableVisitCountry;
|
||||
this.addVisitCountryToCollection();
|
||||
this.addTransitCountryToCollection();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -186,6 +194,17 @@ export class TravelPlanComponent {
|
||||
}
|
||||
}
|
||||
|
||||
IsCountryExists(countryType: string, country: Country): boolean {
|
||||
|
||||
const existingIndex = countryType === 'transit' ? this.selectedTransitCountries.findIndex(
|
||||
c => c.value === country!.value
|
||||
) : this.selectedVisitCountries.findIndex(
|
||||
c => c.value === country!.value
|
||||
);
|
||||
|
||||
return existingIndex > -1;
|
||||
}
|
||||
|
||||
// Remove country from visits
|
||||
removeVisitCountry(): void {
|
||||
if (!this.selectedVisitCountry) return;
|
||||
|
||||
@ -100,8 +100,9 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator [length]="dataSource.data.length" [pageSizeOptions]="[userPreferences.pageSize || 1]"
|
||||
[hidePageSize]="true" showFirstLastButtons></mat-paginator>
|
||||
<mat-paginator *ngIf="dataSource.data.length > userPreferences.pageSize!" [length]="dataSource.data.length"
|
||||
[pageSizeOptions]="[userPreferences.pageSize || 1]" [hidePageSize]="true"
|
||||
showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
|
||||
<!-- Contact Form -->
|
||||
@ -255,10 +256,10 @@
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button mat-button type="button" (click)="cancelEdit()">Cancel</button>
|
||||
<button mat-raised-button color="primary" type="submit" [disabled]="contactForm.invalid">
|
||||
{{ isEditing ? 'Update' : 'Save' }}
|
||||
</button>
|
||||
<button mat-button type="button" (click)="cancelEdit()">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -77,6 +77,11 @@
|
||||
<td mat-cell *matCellDef="let holder" class="actions-cell">
|
||||
|
||||
<div class="actions-icons">
|
||||
<mat-radio-button matTooltip="Select Holder" class="selectHolder" [value]="holder.holderid"
|
||||
[checked]="selectedHolderId === holder.holderid" (change)="onHolderSelection(holder)"
|
||||
aria-label="Select row" [hidden]="holder.isInactive">
|
||||
</mat-radio-button>
|
||||
|
||||
<button mat-icon-button color="primary" (click)="onEdit(holder.holderid)" matTooltip="Edit">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
@ -89,11 +94,6 @@
|
||||
(click)="reactivateHolder(holder.holderid)">
|
||||
<mat-icon>loupe</mat-icon>
|
||||
</button>
|
||||
|
||||
<mat-radio-button matTooltip="Select Holder" class="selectHolder" [value]="holder.holderid"
|
||||
[checked]="selectedHolderId === holder.holderid" (change)="onHolderSelection(holder)"
|
||||
aria-label="Select row" [hidden]="holder.isInactive">
|
||||
</mat-radio-button>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@ -110,8 +110,9 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator [length]="dataSource.data.length" [pageSizeOptions]="[userPreferences.pageSize || 2]"
|
||||
[hidePageSize]="true" showFirstLastButtons></mat-paginator>
|
||||
<mat-paginator *ngIf="dataSource.data.length > userPreferences.pageSize!" [length]="dataSource.data.length"
|
||||
[pageSizeOptions]="[userPreferences.pageSize || 2]" [hidePageSize]="true"
|
||||
showFirstLastButtons></mat-paginator>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
<div class="question-row">
|
||||
<mat-radio-group (change)="duplicateCarnet($event)">
|
||||
<mat-label class="question">Did you lose your carnet? Are you looking for
|
||||
<mat-label class="question">Did you loose your carnet? Are you looking for
|
||||
duplicates?</mat-label>
|
||||
<mat-radio-button [value]="true">Yes</mat-radio-button>
|
||||
<mat-radio-button [value]="false">No</mat-radio-button>
|
||||
@ -138,7 +138,8 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator [length]="dataSource.data.length" [pageSizeOptions]="[userPreferences.pageSize!]"
|
||||
<mat-paginator *ngIf="dataSource.data.length > userPreferences.pageSize!"
|
||||
[length]="dataSource.data.length" [pageSizeOptions]="[userPreferences.pageSize!]"
|
||||
[hidePageSize]="true" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
}
|
||||
|
||||
.questions-section {
|
||||
flex: 0 0 70%;
|
||||
flex: 0 0 65%;
|
||||
padding: 12px 16px;
|
||||
margin-bottom: 46px;
|
||||
margin-left: 1rem;
|
||||
|
||||
@ -9,10 +9,10 @@ import { AngularMaterialModule } from '../../module/angular-material.module';
|
||||
<h2 mat-dialog-title>{{ data.title }}</h2>
|
||||
<mat-dialog-content>{{ data.message }}</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button [mat-dialog-close]="false">{{ data.cancelText || 'Cancel' }}</button>
|
||||
<button mat-raised-button color="warn" [mat-dialog-close]="true">
|
||||
{{ data.confirmText || 'Confirm' }}
|
||||
</button>
|
||||
<button mat-button [mat-dialog-close]="false">{{ data.cancelText || 'Cancel' }}</button>
|
||||
</mat-dialog-actions>
|
||||
`,
|
||||
styles: [`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user