Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<p-accordion class="accordion-border px-4 py-4 flex-1 no-padding">
<p-accordion-panel value="0">
<p-accordion-header class="flex flex-row column-gap-3 align-items-center">
<p class="font-bold">{{ 'registry.overview.statuses.' + registry()?.status + '.text' | translate }}</p>
<p class="font-bold">{{ statusTranslations().text | translate }}</p>
</p-accordion-header>

<p-accordion-content>
<div class="flex flex-column pt-4 gap-2">
<h3 class="font-normal">{{ 'registry.overview.statuses.' + registry()?.status + '.short' | translate }}</h3>
<h3 class="font-normal">{{ statusTranslations().short | translate }}</h3>
<p>
<span>
{{
'registry.overview.statuses.' + registry()?.status + '.long'
| translate: { embargoEndDate: embargoEndDate(), email: supportEmail }
}}
{{ statusTranslations().long | translate: { embargoEndDate: embargoEndDate(), email: supportEmail } }}
</span>

@if (isAccepted()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,23 @@ export class RegistryStatusesComponent {
return date ? new Date(date).toDateString() : null;
});

statusTranslations = computed(() => {
const status = this.registry()?.status;
if (!status) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked RegistryStatusEnum and the None value is "None" which is a truthy string. If that's the case then this wouldn't fix it. Could you double check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @adlius, @Nazar690, I have updated

FYI: also not confident whether it is the best workflow, because not confident why 'None' may exists in database for registration that is needed to be embargoed

https://openscience.atlassian.net/browse/ENG-10829?focusedCommentId=119253
.

Maybe it is better to have another one workflow it is None , set another messages and do another UI workflow

https://openscience.atlassian.net/browse/ENG-10829?focusedCommentId=119253

image

, thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adlius Is it End embargo early right text for None status?

return {
text: 'registry.overview.endEmbargo',
short: 'registry.overview.endEmbargo',
long: 'registry.overview.endEmbargo',
};
}
const basePath = `registry.overview.statuses.${status}`;
return {
text: `${basePath}.text`,
short: `${basePath}.short`,
long: `${basePath}.long`,
};
});
Comment thread
mkovalua marked this conversation as resolved.

openWithdrawDialog(): void {
const registry = this.registry();

Expand Down
Loading