diff --git a/ui/src/app/affiliation/affiliation-update.component.ts b/ui/src/app/affiliation/affiliation-update.component.ts
index 6378735ec..40f0e86fb 100644
--- a/ui/src/app/affiliation/affiliation-update.component.ts
+++ b/ui/src/app/affiliation/affiliation-update.component.ts
@@ -213,10 +213,10 @@ export class AffiliationUpdateComponent implements OnInit {
roleTitle: assertion.roleTitle,
url: assertion.url,
startYear: assertion.startYear,
- startMonth: parseInt(assertion.startMonth || '0'),
+ startMonth: parseInt(assertion.startMonth || '') || null,
startDay: assertion.startDay,
endYear: assertion.endYear,
- endMonth: parseInt(assertion.endMonth || '0'),
+ endMonth: parseInt(assertion.endMonth || '') || null,
endDay: assertion.endDay,
orgName: assertion.orgName,
orgCountry: assertion.orgCountry,
diff --git a/ui/src/app/affiliation/affiliations.component.html b/ui/src/app/affiliation/affiliations.component.html
index 99b28bfcd..58be543d5 100644
--- a/ui/src/app/affiliation/affiliations.component.html
+++ b/ui/src/app/affiliation/affiliations.component.html
@@ -174,23 +174,23 @@
{{ affiliation.departmentName }} ({{ affiliation.roleTitle }})
- {{ affiliation.startYear }} -{{ affiliation.startMonth }} -{{ affiliation.startDay }}
+ {{ formatDate(affiliation.startYear, affiliation.startMonth, affiliation.startDay) }}
+
to
- {{ affiliation.endYear }} -{{ affiliation.endMonth }} -{{ affiliation.endDay }}
+ {{ formatDate(affiliation.endYear, affiliation.endMonth, affiliation.endDay) }} View details
- {{ affiliation.created?.toString() | date: 'medium' }}
+ {{ affiliation.created?.toDate() | date: 'medium' : 'en-US' }}
{{ affiliation.prettyStatus | localize }}
\ No newline at end of file
+
diff --git a/ui/src/app/affiliation/affiliations.component.ts b/ui/src/app/affiliation/affiliations.component.ts
index dbfb35ab2..3a4f11860 100644
--- a/ui/src/app/affiliation/affiliations.component.ts
+++ b/ui/src/app/affiliation/affiliations.component.ts
@@ -21,6 +21,7 @@ import { AccountService } from '../account'
import { AlertService } from '../shared/service/alert.service'
import { ActivatedRoute, Router } from '@angular/router'
import { EventService } from '../shared/service/event.service'
+import { DateUtilService } from '../shared/service/date-util.service'
@Component({
selector: 'app-affiliations',
@@ -47,6 +48,8 @@ export class AffiliationsComponent implements OnInit, OnDestroy {
ascending: any
orcidBaseUrl: string | undefined = ORCID_BASE_URL
itemCount: string | undefined
+ startDate: string | undefined
+ endDate: string | undefined
faChartBar = faChartBar
faFileDownload = faFileDownload
faFileImport = faFileImport
@@ -71,7 +74,8 @@ export class AffiliationsComponent implements OnInit, OnDestroy {
protected activatedRoute: ActivatedRoute,
protected router: Router,
protected eventService: EventService,
- protected translate: LanguageService
+ protected translate: LanguageService,
+ protected dateUtilService: DateUtilService
) {
this.itemsPerPage = ITEMS_PER_PAGE
}
@@ -137,6 +141,14 @@ export class AffiliationsComponent implements OnInit, OnDestroy {
this.loadAll()
}
+ formatDate(year?: string, month?: string, day?: string) {
+ return this.dateUtilService.formatDate({
+ year,
+ month,
+ day,
+ })
+ }
+
clear() {
this.page = 0
this.router.navigate([
diff --git a/ui/src/app/shared/service/date-util.service.ts b/ui/src/app/shared/service/date-util.service.ts
index 10611303d..630027b39 100644
--- a/ui/src/app/shared/service/date-util.service.ts
+++ b/ui/src/app/shared/service/date-util.service.ts
@@ -72,4 +72,20 @@ export class DateUtilService {
}
return days
}
+
+ formatDate({ year, month, day }: { year?: string; month?: string; day?: string }): string {
+ let date = ''
+ if (year) {
+ date = year
+
+ if (month && parseInt(month) > 0) {
+ date += `-${month.padStart(2, '0')}`
+
+ if (day && parseInt(day) > 0) {
+ date += `-${day.padStart(2, '0')}`
+ }
+ }
+ }
+ return date
+ }
}
diff --git a/ui/src/i18n/messages.cs.xlf b/ui/src/i18n/messages.cs.xlf
index d56dcb583..70abfc2fc 100644
--- a/ui/src/i18n/messages.cs.xlf
+++ b/ui/src/i18n/messages.cs.xlf
@@ -1363,7 +1363,7 @@
podle
src/app/affiliation/affiliation-detail.component.html
- 76
+ 143
src/app/user/user-detail.component.html
@@ -1391,7 +1391,7 @@
Zpět
src/app/affiliation/affiliation-detail.component.html
- 105
+ 230
src/app/user/user-detail.component.html
@@ -1403,7 +1403,7 @@
Upravit
src/app/affiliation/affiliation-detail.component.html
- 111
+ 234
src/app/affiliation/affiliations.component.html
@@ -1449,6 +1449,10 @@
src/app/affiliation/affiliation-import-dialog.component.html
34
+
+ src/app/affiliation/affiliation-update.component.html
+ 465
+
src/app/user/user-delete.component.html
14
@@ -1465,6 +1469,10 @@
Save
Uložit
+
+ src/app/affiliation/affiliation-update.component.html
+ 468
+
src/app/user/user-update.component.html
131
@@ -1539,7 +1547,7 @@
Zobrazují se položky – z
src/app/affiliation/affiliations.component.ts
- 216
+ 228
src/app/user/users.component.ts
@@ -1728,8 +1736,16 @@
- No affiliations found
+ No affiliations to show
Nenalezena žádná přidružení
+
+ src/app/affiliation/affiliation-update.component.html
+ 65
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 192
+
src/app/affiliation/affiliations.component.html
125
@@ -1742,17 +1758,21 @@
src/app/affiliation/affiliation-detail.component.html
13
+
+ src/app/affiliation/affiliation-update.component.html
+ 15
+
src/app/affiliation/affiliations.component.html
134
- ORCID iD
+ ORCID iD
ORCID iD
src/app/affiliation/affiliation-detail.component.html
- 25
+ 40
src/app/affiliation/affiliations.component.html
@@ -1789,23 +1809,23 @@
-
+
-
+
src/app/affiliation/affiliation-detail.component.html
- 31
+ 52
src/app/affiliation/affiliations.component.html
167
-
+
to
- to
+ do
src/app/affiliation/affiliations.component.html
183
@@ -1956,27 +1976,31 @@
- Permission link
+ Permission link
Odkaz na povolení
src/app/affiliation/affiliation-detail.component.html
- 21
+ 25
- Copy to clipboard
+ Copy to clipboard
Zkopírovat do schránky
src/app/affiliation/affiliation-detail.component.html
- 23
+ 36
- Affiliation Section
+ Affiliation Section
Typ přidružení
src/app/affiliation/affiliation-detail.component.html
- 29
+ 48
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 42
@@ -1984,23 +2008,31 @@
Organizace
src/app/affiliation/affiliation-detail.component.html
- 33
+ 56
- Department Name
+ Department Name
Oddělení
src/app/affiliation/affiliation-detail.component.html
- 38
+ 68
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 236
- Role Title
+ Role Title
Role/Funkce
src/app/affiliation/affiliation-detail.component.html
- 42
+ 78
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 265
@@ -2008,31 +2040,39 @@
URL
src/app/affiliation/affiliation-detail.component.html
- 46
+ 84
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 285
- Start Date
+ Start Date
Datum začátku
src/app/affiliation/affiliation-detail.component.html
- 50
+ 92
- End Date
+ End Date
Datum ukončení
src/app/affiliation/affiliation-detail.component.html
- 54
+ 98
- External Id
+ External Id
Externí ID
src/app/affiliation/affiliation-detail.component.html
- 58
+ 108
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 426
@@ -2040,23 +2080,23 @@
Vytvořeno
src/app/affiliation/affiliation-detail.component.html
- 62
+ 116
- Added To ORCID
+ Added To ORCID
Přidáno do ORCID
src/app/affiliation/affiliation-detail.component.html
- 66
+ 124
- Updated In ORCID
+ Updated In ORCID
Aktualizováno v ORCID
src/app/affiliation/affiliation-detail.component.html
- 70
+ 134
@@ -2064,7 +2104,7 @@
Upraveno
src/app/affiliation/affiliation-detail.component.html
- 74
+ 140
@@ -2072,35 +2112,35 @@
Identifikace správce
src/app/affiliation/affiliation-detail.component.html
- 78
+ 145
- Notification First Sent
+ Notification First Sent
Oznámení odeslané jako první
src/app/affiliation/affiliation-detail.component.html
- 82
+ 156
src/app/affiliation/affiliation-detail.component.html
- 86
+ 175
- Notification Last Sent
+ Notification Last Sent
Oznámení naposledy odesláno
src/app/affiliation/affiliation-detail.component.html
- 90
+ 194
- Notification Last Sent
- Notification Last Sent
+ Notification Last Sent
+ Notification Last Sent
src/app/affiliation/affiliation-detail.component.html
- 94
+ 213
@@ -2108,7 +2148,7 @@
Zkopírováno do schránky
src/app/affiliation/affiliation-detail.component.ts
- 39
+ 52
@@ -2172,7 +2212,7 @@
Neexistuje žádný soubor k nahrání. Prosím vyberte jej.
src/app/affiliation/affiliation-import-dialog.component.ts
- 62
+ 60
@@ -4327,6 +4367,242 @@
597
+
+ Add or edit affiliation
+ Přidat nebo upravit přidružení
+
+ src/app/affiliation/affiliation-update.component.html
+ 8
+
+
+
+ This field should follow pattern for "Email".
+ Toto pole musí být ve tvaru pro {{ pattern }}.
+
+ src/app/affiliation/affiliation-update.component.html
+ 25
+
+
+
+ This field is required.
+ Toto pole je vyžadováno.
+
+ src/app/affiliation/affiliation-update.component.html
+ 32
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 62
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 85
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 108
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 131
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 158
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 188
+
+
+
+ Org Name
+ Jméno organizace
+
+ src/app/affiliation/affiliation-update.component.html
+ 73
+
+
+
+ Org City
+ Město
+
+ src/app/affiliation/affiliation-update.component.html
+ 96
+
+
+
+ Org Region
+ Stát/region
+
+ src/app/affiliation/affiliation-update.component.html
+ 118
+
+
+
+ Org Country
+ Země
+
+ src/app/affiliation/affiliation-update.component.html
+ 141
+
+
+
+ Disambiguation Source
+ Zdroj ID organizace
+
+ src/app/affiliation/affiliation-update.component.html
+ 170
+
+
+
+ Disambiguated Org Id
+ ID organizace
+
+ src/app/affiliation/affiliation-update.component.html
+ 201
+
+
+
+ This field is required. GRID Organization ID should start with "grid.", RINGGOLD Organization ID should be a number, ROR IDs must be 9 characters, beginning with 0
+ Toto pole je povinné. Identifikace organizace GRID musí začínat frází grid, například grid.12344 nebo to musí být platná URL, identifikace organizace RINGGOLD musí být číslo. Identifkace ROR musejí mít 9 znaků a začínat 0.
+
+ src/app/affiliation/affiliation-update.component.html
+ 223
+
+
+
+ This field cannot be longer than 4000 characters.
+ Toto pole nemůže být delší než {{ max }} znaků.
+
+ src/app/affiliation/affiliation-update.component.html
+ 255
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 278
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 293
+
+
+
+ Start Year
+ Počáteční rok
+
+ src/app/affiliation/affiliation-update.component.html
+ 305
+
+
+
+ Year
+ Rok
+
+ src/app/affiliation/affiliation-update.component.html
+ 314
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 364
+
+
+
+ Start Month
+ Počáteční měsíc
+
+ src/app/affiliation/affiliation-update.component.html
+ 323
+
+
+
+ Month
+ Měsíc
+
+ src/app/affiliation/affiliation-update.component.html
+ 332
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 382
+
+
+
+ Start Day
+ Počáteční den
+
+ src/app/affiliation/affiliation-update.component.html
+ 341
+
+
+
+ Day
+ Den
+
+ src/app/affiliation/affiliation-update.component.html
+ 344
+
+
+ src/app/affiliation/affiliation-update.component.html
+ 394
+
+
+
+ End Year
+ Rok ukončení
+
+ src/app/affiliation/affiliation-update.component.html
+ 355
+
+
+
+ End Month
+ Konec měsíce
+
+ src/app/affiliation/affiliation-update.component.html
+ 373
+
+
+
+ End Day
+ Den konce
+
+ src/app/affiliation/affiliation-update.component.html
+ 391
+
+
+
+ End date cannot be greater than the start date
+ Datum zahájení nemůže být pozdější než datum ukončení.
+
+ src/app/affiliation/affiliation-update.component.html
+ 400
+
+
+
+ External Id Type
+ Typ externího ID
+
+ src/app/affiliation/affiliation-update.component.html
+ 411
+
+
+
+ External Id Url
+ Adresa URL externího ID
+
+ src/app/affiliation/affiliation-update.component.html
+ 441
+
+
+
+ Please do not forget to download and send permission links to your researcher once the assertion has been saved.
+ Poznámka: Po uložení tvrzení si prosím nezapomeňte stáhnout a odeslat odkazy na povolení vašemu výzkumníkovi.
+
+ src/app/affiliation/affiliation-update.component.html
+ 457
+
+