diff --git a/src/RealtimeServer/scriptureforge/models/question.ts b/src/RealtimeServer/scriptureforge/models/question.ts index 53e815a8c0..52f0e69638 100644 --- a/src/RealtimeServer/scriptureforge/models/question.ts +++ b/src/RealtimeServer/scriptureforge/models/question.ts @@ -30,4 +30,5 @@ export interface Question extends ProjectData { dateModified: string; dateCreated: string; transceleratorQuestionId?: string; + paratextNoteId?: string; } diff --git a/src/RealtimeServer/scriptureforge/services/question-service.ts b/src/RealtimeServer/scriptureforge/services/question-service.ts index 2e4ab0b396..0c30d6aba0 100644 --- a/src/RealtimeServer/scriptureforge/services/question-service.ts +++ b/src/RealtimeServer/scriptureforge/services/question-service.ts @@ -189,6 +189,9 @@ export class QuestionService extends SFProjectDataService { }, transceleratorQuestionId: { bsonType: 'string' + }, + paratextNoteId: { + bsonType: 'string' } }, additionalProperties: false diff --git a/src/SIL.XForge.Scripture/ClientApp/src/app/checking/import-questions-dialog/import-questions-dialog.component.html b/src/SIL.XForge.Scripture/ClientApp/src/app/checking/import-questions-dialog/import-questions-dialog.component.html index 527482691b..8775c9bf5c 100644 --- a/src/SIL.XForge.Scripture/ClientApp/src/app/checking/import-questions-dialog/import-questions-dialog.component.html +++ b/src/SIL.XForge.Scripture/ClientApp/src/app/checking/import-questions-dialog/import-questions-dialog.component.html @@ -97,6 +97,23 @@

{{ t("learn_more") }} + + {{ t("import_from_paratext") }} + +

{{ t("import_from_paratext_description") }}

+
    + @for (line of paratextInstructions; track line) { +
  1. + } +
+
+ + + {{ t("learn_more") }} + +
@for (i of helpInstructions | async; track i) { @@ -112,6 +129,24 @@

} + @case ("paratext_tag_selection") { +
+ @if (paratextTagOptions.length === 0) { +
{{ t("import_from_paratext_no_tags_available") }}
+ } @else { +

{{ t("import_from_paratext_select_tag_instructions") }}

+ + {{ t("import_from_paratext_select_tag") }} + + @for (tag of paratextTagOptions; track tag.id) { + {{ tag.name }} + } + + + } +
+ } + @case ("loading") {
} @@ -136,62 +171,12 @@

} - @case ("filter") { -
-
- - {{ t("reference_from") }} - - - @if (fromControl.invalid) { - {{ t("must_be_valid_reference") }} - } - - - {{ t("reference_to") }} - - - @if (toControl.invalid) { - {{ t("must_be_valid_reference") }} - } - -
-
-
- - - - -
-
- - - - - - - - - - - -
- {{ - t("select_all") - }} - - {{ referenceForDisplay(element.question) }} - {{ t("question") }}{{ element.question.text }}
-
+ @case ("filter_questions") { + + } + + @case ("filter_notes") { + } @case ("no_questions") { @@ -210,6 +195,10 @@

} + @case ("paratext_tag_load_error") { +
{{ t("import_from_paratext_tag_load_error") }}
+ } + @case ("progress") {
@@ -218,7 +207,7 @@

}

- @if (status === "filter") { + @if (status === "filter_questions" || status === "filter_notes") { } + @if (showDuplicateImportNote && questionSource === "paratext") { +
+ {{ t("import_from_paratext_duplicate") }} +
+ } } @else if (status === "progress") { } + +
+
+ + {{ t("reference_from") }} + + + @if (fromControl.invalid) { + {{ t("must_be_valid_reference") }} + } + + + {{ t("reference_to") }} + + + @if (toControl.invalid) { + {{ t("must_be_valid_reference") }} + } + +
+
+
+ + + + +
+
+ + + + + + + + + + + +
+ {{ + t("select_all") + }} + + {{ referenceForDisplay(element.question) }} + {{ t("question") }}{{ element.question.text }}
+
+
@if (questionSource != null && importCanceled === false) { - @if (status === "filter" || status === "file_import_errors") { - + + } + @if (status === "filter_questions" || status === "file_import_errors") { + + } + @if (status === "filter_notes") { + } @if (status === "no_questions" || status === "update_transcelerator" || status === "missing_header_row") { @@ -262,7 +331,7 @@

{{ t("continue_import") }} } - @if (status === "filter") { + @if (status === "filter_questions" || status === "filter_notes") {