Merge branch 'master' into VM/RED-9788-2
This commit is contained in:
commit
f0535eb47f
@ -24,10 +24,16 @@
|
|||||||
|
|
||||||
<div class="iqser-input-group required">
|
<div class="iqser-input-group required">
|
||||||
<label translate="add-edit-component-mapping.form.file"></label>
|
<label translate="add-edit-component-mapping.form.file"></label>
|
||||||
<iqser-upload-file (fileChanged)="fileChanged($event)" [file]="activeFile" [accept]="'.csv'" />
|
<iqser-upload-file (fileChanged)="changeFile($event)" [file]="activeFile" [accept]="'.csv'" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div
|
||||||
|
class="row"
|
||||||
|
[class.disabled-file-options]="disabledFileOptions"
|
||||||
|
[matTooltip]="'add-edit-component-mapping.disabled-file-options' | translate"
|
||||||
|
[matTooltipDisabled]="!disabledFileOptions"
|
||||||
|
[matTooltipPosition]="'above'"
|
||||||
|
>
|
||||||
<div class="iqser-input-group required w-150">
|
<div class="iqser-input-group required w-150">
|
||||||
<label translate="add-edit-component-mapping.form.delimiter"></label>
|
<label translate="add-edit-component-mapping.form.delimiter"></label>
|
||||||
<input
|
<input
|
||||||
|
|||||||
@ -18,4 +18,14 @@
|
|||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.disabled-file-options {
|
||||||
|
opacity: 0.5;
|
||||||
|
pointer-events: auto;
|
||||||
|
max-width: 300px;
|
||||||
|
|
||||||
|
.iqser-input-group {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import { MatSelect, MatSelectTrigger } from '@angular/material/select';
|
|||||||
import { fileAttributeEncodingTypesTranslations } from '@translations/file-attribute-encoding-types-translations';
|
import { fileAttributeEncodingTypesTranslations } from '@translations/file-attribute-encoding-types-translations';
|
||||||
import { firstValueFrom } from 'rxjs';
|
import { firstValueFrom } from 'rxjs';
|
||||||
import { ComponentMappingsService } from '@services/entity-services/component-mappings.service';
|
import { ComponentMappingsService } from '@services/entity-services/component-mappings.service';
|
||||||
|
import { MatTooltip } from '@angular/material/tooltip';
|
||||||
|
|
||||||
interface DialogData {
|
interface DialogData {
|
||||||
dossierTemplateId: string;
|
dossierTemplateId: string;
|
||||||
@ -42,6 +43,7 @@ interface DialogResult {
|
|||||||
MatSelect,
|
MatSelect,
|
||||||
IconButtonComponent,
|
IconButtonComponent,
|
||||||
UploadFileComponent,
|
UploadFileComponent,
|
||||||
|
MatTooltip,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class AddEditComponentMappingDialogComponent
|
export class AddEditComponentMappingDialogComponent
|
||||||
@ -50,6 +52,7 @@ export class AddEditComponentMappingDialogComponent
|
|||||||
{
|
{
|
||||||
protected readonly encodingTypeOptions = Object.keys(FileAttributeEncodingTypes);
|
protected readonly encodingTypeOptions = Object.keys(FileAttributeEncodingTypes);
|
||||||
protected readonly translations = fileAttributeEncodingTypesTranslations;
|
protected readonly translations = fileAttributeEncodingTypesTranslations;
|
||||||
|
#fileChanged = false;
|
||||||
activeFile: File;
|
activeFile: File;
|
||||||
form!: UntypedFormGroup;
|
form!: UntypedFormGroup;
|
||||||
|
|
||||||
@ -73,7 +76,8 @@ export class AddEditComponentMappingDialogComponent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fileChanged(file: File) {
|
changeFile(file: File) {
|
||||||
|
this.#fileChanged = true;
|
||||||
this.form.get('file').setValue(file);
|
this.form.get('file').setValue(file);
|
||||||
this.form.get('fileName').setValue(file?.name);
|
this.form.get('fileName').setValue(file?.name);
|
||||||
}
|
}
|
||||||
@ -91,4 +95,8 @@ export class AddEditComponentMappingDialogComponent
|
|||||||
delimiter: [this.data?.mapping?.delimiter ?? ',', Validators.required],
|
delimiter: [this.data?.mapping?.delimiter ?? ',', Validators.required],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get disabledFileOptions() {
|
||||||
|
return this.initialFormValue?.file && !this.#fileChanged;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,6 +100,7 @@
|
|||||||
"dialog": {
|
"dialog": {
|
||||||
"title": "{type, select, add{Add New} edit{Edit} other{}} Component Mapping"
|
"title": "{type, select, add{Add New} edit{Edit} other{}} Component Mapping"
|
||||||
},
|
},
|
||||||
|
"disabled-file-options": "",
|
||||||
"form": {
|
"form": {
|
||||||
"delimiter": "",
|
"delimiter": "",
|
||||||
"delimiter-placeholder": "",
|
"delimiter-placeholder": "",
|
||||||
|
|||||||
@ -1550,13 +1550,13 @@
|
|||||||
"jump-to-next": "Springe zu Nächster",
|
"jump-to-next": "Springe zu Nächster",
|
||||||
"jump-to-previous": "Springe zu Vorheriger",
|
"jump-to-previous": "Springe zu Vorheriger",
|
||||||
"label": "Arbeitsvorrat",
|
"label": "Arbeitsvorrat",
|
||||||
"no-annotations": "There are no annotations for the selected component.",
|
"no-annotations": "There are no annotations on the selected page or for the selected component.",
|
||||||
"page-is": "Diese Seite ist",
|
"page-is": "Diese Seite ist",
|
||||||
"reset": "reset",
|
"reset": "reset",
|
||||||
"select": "Auswählen",
|
"select": "Auswählen",
|
||||||
"select-all": "Alle",
|
"select-all": "Alle",
|
||||||
"select-none": "Keine",
|
"select-none": "Keine",
|
||||||
"show-skipped": "",
|
"show-skipped": "Show skipped in document",
|
||||||
"the-filters": "the filters",
|
"the-filters": "the filters",
|
||||||
"wrong-filters": "The selected filter combination is not possible. Please adjust or"
|
"wrong-filters": "The selected filter combination is not possible. Please adjust or"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -100,6 +100,7 @@
|
|||||||
"dialog": {
|
"dialog": {
|
||||||
"title": "{type, select, add{Add new} edit{Edit} other{}} component mapping"
|
"title": "{type, select, add{Add new} edit{Edit} other{}} component mapping"
|
||||||
},
|
},
|
||||||
|
"disabled-file-options": "Re-upload mapping file to change",
|
||||||
"form": {
|
"form": {
|
||||||
"delimiter": "CSV delimiter",
|
"delimiter": "CSV delimiter",
|
||||||
"delimiter-placeholder": "CSV delimiter",
|
"delimiter-placeholder": "CSV delimiter",
|
||||||
@ -1550,13 +1551,13 @@
|
|||||||
"jump-to-next": "Jump to next",
|
"jump-to-next": "Jump to next",
|
||||||
"jump-to-previous": "Jump to previous",
|
"jump-to-previous": "Jump to previous",
|
||||||
"label": "Workload",
|
"label": "Workload",
|
||||||
"no-annotations": "There are no annotations for the selected component.",
|
"no-annotations": "There are no annotations on the selected page or for the selected component.",
|
||||||
"page-is": "This page is",
|
"page-is": "This page is",
|
||||||
"reset": "reset",
|
"reset": "reset",
|
||||||
"select": "Select",
|
"select": "Select",
|
||||||
"select-all": "All",
|
"select-all": "All",
|
||||||
"select-none": "None",
|
"select-none": "None",
|
||||||
"show-skipped": "",
|
"show-skipped": "Show skipped in document",
|
||||||
"the-filters": "the filters",
|
"the-filters": "the filters",
|
||||||
"wrong-filters": "The selected filter combination is not possible. Please adjust or"
|
"wrong-filters": "The selected filter combination is not possible. Please adjust or"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user