2025-09-23 18:30:15 +02:00
|
|
|
|
<div class="translate-texts is-{{disabled? 'disabled' : 'enabled'}}">
|
2025-08-07 16:06:25 +02:00
|
|
|
|
|
2025-09-24 11:06:25 +02:00
|
|
|
|
<div [ngClass]="{
|
2025-09-25 16:22:43 +02:00
|
|
|
|
'is-focused' : fromTextFocused,
|
|
|
|
|
'has-shadow' : !researchLaunched,
|
2025-09-24 11:06:25 +02:00
|
|
|
|
}" id="fromText">
|
2025-09-15 13:03:21 +02:00
|
|
|
|
|
2025-09-24 11:40:51 +02:00
|
|
|
|
@if (!fileIsUploaded || !appState.fromText.length || !fromTextFocused) {
|
2025-09-23 18:30:15 +02:00
|
|
|
|
<!-- @if (appState.fromText.length == 0) {-->
|
2025-09-15 13:03:21 +02:00
|
|
|
|
<button (click)="clickFileUpload(fileUpload)" class=" click-file-upload is-outlined">
|
|
|
|
|
<span class="label">
|
2025-08-22 11:57:56 +02:00
|
|
|
|
Upload .csv file
|
|
|
|
|
</span>
|
2025-09-15 13:03:21 +02:00
|
|
|
|
<i class="ri-upload-cloud-2-line"></i>
|
|
|
|
|
</button>
|
2025-09-23 18:30:15 +02:00
|
|
|
|
<!-- }-->
|
|
|
|
|
<!-- hidden text input-->
|
2025-09-15 13:03:21 +02:00
|
|
|
|
<input #fileUpload
|
|
|
|
|
accept=".csv"
|
|
|
|
|
(change)="onFileSelected($event)" class="is-outlined" id="fileUploadTranslator"
|
|
|
|
|
type="file">
|
|
|
|
|
}
|
|
|
|
|
@if (fileIsUploaded) {
|
2025-08-07 16:06:25 +02:00
|
|
|
|
|
2025-09-15 13:03:21 +02:00
|
|
|
|
<div class="file-selected">
|
|
|
|
|
<div class="labeling">
|
2025-09-09 15:42:23 +02:00
|
|
|
|
|
2025-09-15 13:03:21 +02:00
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
<i class="ri ri-file-2-line"></i>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="label">
|
|
|
|
|
{{ filePath }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="weight">
|
|
|
|
|
{{ fileWeight }}
|
|
|
|
|
</div>
|
2025-09-09 15:42:23 +02:00
|
|
|
|
</div>
|
2025-09-24 11:40:51 +02:00
|
|
|
|
<button (click)="onRemoveFileSelected()" class="remove-file-upload">x</button>
|
2025-09-15 13:03:21 +02:00
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
<!-- delete button from_text-->
|
|
|
|
|
|
|
|
|
|
<button (click)="emptyText('fromText')" [ngClass]="{
|
2025-09-23 18:54:13 +02:00
|
|
|
|
'is-visible' : appState.fromText.length
|
2025-09-15 13:03:21 +02:00
|
|
|
|
}" class="delete-button button">x
|
|
|
|
|
</button>
|
2025-09-22 09:59:08 +02:00
|
|
|
|
@if (!fileIsUploaded) {
|
|
|
|
|
<textarea
|
|
|
|
|
(focus)="focusFromText()"
|
2025-09-24 11:06:25 +02:00
|
|
|
|
(blur)="blurFromText()"
|
2025-09-22 09:59:08 +02:00
|
|
|
|
(keyup)="onFromTextChanged()"
|
|
|
|
|
(ngModelChange)="onFromTextChanged()"
|
2025-09-24 11:06:25 +02:00
|
|
|
|
[ngModel]="appState.fromText"
|
2025-09-22 09:59:08 +02:00
|
|
|
|
cols="30"
|
|
|
|
|
id="from_text"
|
|
|
|
|
name="from_text"
|
|
|
|
|
placeholder="Copy/paste client’s question \n or Drag and drop extracted .csv file from CRM portal..."
|
|
|
|
|
rows="5"></textarea>
|
|
|
|
|
}
|
2025-08-07 16:06:25 +02:00
|
|
|
|
</div>
|
2025-09-15 13:03:21 +02:00
|
|
|
|
|
2025-09-24 11:06:25 +02:00
|
|
|
|
<div [ngClass]="{
|
|
|
|
|
'is-focused' : toTextFocused
|
|
|
|
|
}" id="toText">
|
2025-09-15 13:03:21 +02:00
|
|
|
|
|
|
|
|
|
@if (loadingResume) {
|
2025-09-22 09:59:08 +02:00
|
|
|
|
<div class="loading-container">
|
|
|
|
|
<div class="loading">
|
|
|
|
|
<div class="spinning">
|
|
|
|
|
<i class="ri-restart-line"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-09-15 13:03:21 +02:00
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
@if (toText.length > 0) {
|
|
|
|
|
<button (click)="emptyText('toText')" class="delete-button button">x</button>
|
|
|
|
|
}
|
2025-09-22 09:59:08 +02:00
|
|
|
|
@if (!loadingResume) {
|
2025-09-24 11:06:25 +02:00
|
|
|
|
<textarea
|
|
|
|
|
[ngModel]="appState.toText"
|
|
|
|
|
(ngModelChange)="onToTextChanged()"
|
|
|
|
|
(keyup)="onToTextChanged()"
|
|
|
|
|
(focus)="focusToText()"
|
|
|
|
|
(blur)="blurToText()"
|
|
|
|
|
cols="30" id="to_text" name="to_text" rows="10"></textarea>
|
2025-09-22 09:59:08 +02:00
|
|
|
|
}
|
2025-09-15 13:03:21 +02:00
|
|
|
|
</div>
|
2025-08-07 16:06:25 +02:00
|
|
|
|
</div>
|