Always wait for correct draft status, fix spelling

This commit is contained in:
Yury Bondarenko
2024-02-07 11:13:53 +01:00
parent 9f39358efb
commit adb2e31026
13 changed files with 43 additions and 46 deletions

View File

@@ -1,7 +1,7 @@
import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators';
import { RemoteData } from '../../../core/data/remote-data';
import { Version } from '../../../core/shared/version.model';
import { map, startWith, switchMap, tap } from 'rxjs/operators';
import { map, switchMap, tap } from 'rxjs/operators';
import { Item } from '../../../core/shared/item.model';
import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
@@ -13,9 +13,7 @@ import { ItemDataService } from '../../../core/data/item-data.service';
import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';
import { ItemVersionsSharedService } from '../../../item-page/versions/item-versions-shared.service';
import {
ItemVersionsSummaryModalComponent
} from '../../../item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component';
import { ItemVersionsSummaryModalComponent } from '../../../item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component';
/**
* Service to take care of all the functionality related to the version creation modal
@@ -86,7 +84,6 @@ export class DsoVersioningModalService {
// button is disabled if hasDraftVersion = true, and enabled if hasDraftVersion = false or null
// (hasDraftVersion is null when a version history does not exist)
map((res) => Boolean(res)),
startWith(true),
);
}

View File

@@ -3121,7 +3121,7 @@
// "item.page.version.create": "Create new version",
"item.page.version.create": "নতুন সংস্করণ তৈরি করুন",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "একটি নতুন সংস্করণ তৈরি করা যাচ্ছে না কারণ ভার্সন হিস্ট্রিতে একটি জমা ইনপ্রগ্রেসস অবস্থাই রয়েছে",
// "item.preview.dc.identifier.uri": "Identifier:",
@@ -3250,7 +3250,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "মুছে ফেলুন সংস্করণ",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "একটি নতুন সংস্করণ তৈরি করা যাচ্ছে না কারণ ভার্সন হিস্ট্রিতে একটি জমা ইনপ্রগ্রেসস অবস্থাই রয়েছে",
@@ -3291,7 +3291,7 @@
// "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "নতুন সংস্করণ তৈরি করা হয়নি",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "একটি নতুন সংস্করণ তৈরি করা যাবে না কারণ ভার্সন হিস্ট্রিতে একটি জমা ইনপ্রগ্রেসস অবস্থাই রয়েছে",

View File

@@ -3376,7 +3376,7 @@
// "item.page.version.create": "Create new version",
"item.page.version.create": "Crear una nova versió",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "No es pot crear una nova versió perquè a l'historial de versions hi ha un enviament en curs",
// "item.page.claim.button": "Claim",
@@ -3535,7 +3535,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Esborrar versió",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "No és possible crear una nova versió ja que existeix a l'historial de versions un enviament pendent",
@@ -3582,7 +3582,7 @@
// "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "No s'ha creat una nova versió",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "No és possible crear una nova versió ja que existeix a l'historial de versions un enviament pendent",

View File

@@ -2440,7 +2440,7 @@
"item.page.version.create": "Create new version",
"item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
"item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.claim.button": "Claim",
@@ -2546,7 +2546,7 @@
"item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
"item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -2576,7 +2576,7 @@
"item.version.create.notification.failure": "New version has not been created",
"item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history",
"item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.delete.modal.header": "Delete version",

View File

@@ -3660,7 +3660,7 @@
// "item.page.version.create": "Create new version",
"item.page.version.create": "Crear una nueva version",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "No se puede crear una nueva versión porque en el historial de versiones hay un envío en curso",
// "item.page.claim.button": "Claim",
@@ -3819,7 +3819,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Borrar versión",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "No es posible crear una nueva versión puesto que existe en el historial de versiones un envío pendiente",
@@ -3866,7 +3866,7 @@
// "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "No se ha creado una nueva versión",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "No es posible crear una nueva versión puesto que existe en el historial de versiones un envío pendiente",

View File

@@ -3108,7 +3108,7 @@
// "item.page.version.create": "Create new version",
"item.page.version.create": "Créer une nouvelle version",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Une nouvelle version ne peut être créée car il y a une soumission en cours dans l'historique des versions",
// "item.preview.dc.identifier.uri": "Identifier:",
@@ -3234,7 +3234,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Supprimer la version",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Une nouvelle version ne peut pas être créée parce qu'il y a une soumission en cours dans l'historique des versions.",
// "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -3273,7 +3273,7 @@
// "item.version.create.notification.failure": "New version has not been created",
"item.version.create.notification.failure": "La nouvelle version n'a pas été créée",
// "item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "Une nouvelle version ne peut pas être créée parce qu'il y a une soumission en cours dans l'historique des versions.",
// "item.version.delete.modal.header": "Delete version",

View File

@@ -3106,7 +3106,7 @@
// "item.page.version.create": "Create new version",
"item.page.version.create": "Cruthaich dreach ùr",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Cha ghabh dreach ùr a chruthachadh oir tha cur-a-steach a' tachairt ann an eachdraidh nan dreachan",
// "item.preview.dc.identifier.uri": "Identifier:",
@@ -3235,7 +3235,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Dubh às dreach",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Cha ghabh dreach ùr a chruthachadh oir tha cur-a-steach a' tachairt ann an eachdraidh nan dreachan",
@@ -3276,7 +3276,7 @@
// "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "Cha deach dreach ùr a chruthachadh",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "Cha ghabh dreach ùr a chruthachadh oir tha cur-a-steach a' tachairt ann an eachdraidh nan dreachan",

View File

@@ -3975,9 +3975,9 @@
// TODO New key - Add a translation
"item.page.version.create": "Create new version",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// TODO New key - Add a translation
"item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
"item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// "item.page.claim.button": "Claim",
// TODO New key - Add a translation
@@ -4162,9 +4162,9 @@
// TODO New key - Add a translation
"item.version.history.table.action.deleteVersion": "Delete version",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// TODO New key - Add a translation
"item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
"item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -4223,9 +4223,9 @@
// TODO New key - Add a translation
"item.version.create.notification.failure": "New version has not been created",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
// TODO New key - Add a translation
"item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history",
"item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
// "item.version.delete.modal.header": "Delete version",

View File

@@ -3861,7 +3861,7 @@
// "item.page.version.create": "Create new version",
"item.page.version.create": "Crea una nuova versione",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Impossibile creare una nuova versione perché è presente un'submission in corso nella cronologia delle versioni",
// "item.page.claim.button": "Claim",
@@ -4028,7 +4028,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Elimina versione",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Non è possibile creare una nuova versione perchè c'è già una submission in progress nella cronologia delle versioni",
@@ -4077,7 +4077,7 @@
// TODO Source message changed - Revise the translation
"item.version.create.notification.failure": "Non è stata creata una nuova versione",
// "item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
// TODO Source message changed - Revise the translation
"item.version.create.notification.inProgress": "Non è possibile creare una nuova versione perchè c'è già una submission in progress nella cronologia delle versioni",

View File

@@ -3321,7 +3321,7 @@
// "item.page.version.create": "Create new version",
"item.page.version.create": "Жаңа нұсқасын жасау",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Жаңа нұсқаны жасау мүмкін емес, өйткені нұсқа тарихында аяқталмаған жіберу бар",
// "item.page.claim.button": "Claim",
@@ -3481,7 +3481,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Нұсқаны өшіру",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Жаңа нұсқаны жасау мүмкін емес, өйткені нұсқа тарихында аяқталмаған бағынымдар бар",
@@ -3528,7 +3528,7 @@
// "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "Жаңа нұсқа жасалмады",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "Жаңа нұсқаны жасау мүмкін емес, өйткені нұсқа тарихында аяқталмаған жіберу бар",

View File

@@ -3204,7 +3204,7 @@
// "item.page.version.create": "Create new version",
"item.page.version.create": "Criar nova versão",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Não é possível criar uma nova versão porque há uma submissão em andamento no histórico de versões",
// "item.page.claim.button": "Claim",
@@ -3360,7 +3360,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Apagar versão",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Não é possível criar uma nova versão porque há uma submissão em andamento no histórico de versões",
// "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -3405,7 +3405,7 @@
// "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "A nova versão não foi criada",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "Não é possível criar uma nova versão porque há uma submissão em andamento no histórico de versões",
// "item.version.delete.modal.header": "Delete version",

View File

@@ -3619,7 +3619,7 @@
// "item.page.version.create": "Create new version",
"item.page.version.create": "Criar nova versão",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Um nova versão não pode ser criada porque já se encontra uma submisão em curso no histórico de versões.",
// "item.page.claim.button": "Claim",
@@ -3776,7 +3776,7 @@
// "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Remover versão",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.history.table.action.hasDraft": "Uma nova versão não pode ser criada porque se encontra um depósito em curso no histórico de versões",
// "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -3821,7 +3821,7 @@
// "item.version.create.notification.failure": "New version has not been created",
"item.version.create.notification.failure": "Nova versão não foi criada",
// "item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
"item.version.create.notification.inProgress": "Uma nova versão não pode ser criada porque se encontra um depósito em curso no histórico de versões",
// "item.version.delete.modal.header": "Delete version",

View File

@@ -3151,7 +3151,7 @@
// "item.page.version.create": "Create new version",
"item.page.version.create": "Skapa ny version",
// "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.page.version.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
"item.page.version.hasDraft": "Ny version kan inte skapas pga pågående uppladdning i versionshistoriken",
// "item.preview.dc.identifier.uri": "Identifier:",
@@ -3281,9 +3281,9 @@
// "item.version.history.table.action.deleteVersion": "Delete version",
"item.version.history.table.action.deleteVersion": "Radera version",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// TODO New key - Add a translation
"item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history",
"item.version.history.table.action.hasDraft": "A new version cannot be created because there is an in-progress submission in the version history",
// "item.version.notice": "This is not the latest version of this item. The latest version can be found <a href='{{destination}}'>here</a>.",
@@ -3323,9 +3323,9 @@
// "item.version.create.notification.failure" : "New version has not been created",
"item.version.create.notification.failure": "Ny version har inte skapats",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history",
// "item.version.create.notification.inProgress" : "A new version cannot be created because there is an in-progress submission in the version history",
// TODO New key - Add a translation
"item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history",
"item.version.create.notification.inProgress": "A new version cannot be created because there is an in-progress submission in the version history",
// "item.version.delete.modal.header": "Delete version",