Skip to content

Commit

Permalink
Merge pull request #1911 from CSCfi/CSCTTV-3512
Browse files Browse the repository at this point in the history
show jufo code 0 in single publication info
  • Loading branch information
konolak authored Jan 8, 2025
2 parents d4c5cab + ef2d21c commit 88da393
Showing 1 changed file with 46 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,51 +31,51 @@ import { Search } from 'src/app/portal/models/search.model';
import { MatSnackBar } from '@angular/material/snack-bar';
import MetaTags from 'src/assets/static-data/meta-tags.json';
import { AppSettingsService } from '@shared/services/app-settings.service';
import { ModelUtilsService } from '@shared/services/model-util.service';
import { CleanCitationPipe } from '../../../pipes/clean-citation';
import { MatProgressSpinner } from '@angular/material/progress-spinner';
import { CdkCopyToClipboard } from '@angular/cdk/clipboard';
import { DialogComponent } from '../../../../shared/components/dialog/dialog.component';
import { ShareComponent } from '../share/share.component';
import { SecondaryButtonComponent } from '../../../../shared/components/buttons/secondary-button/secondary-button.component';
import { RelatedLinksComponent } from '../related-links/related-links.component';
import { MatCard, MatCardTitle } from '@angular/material/card';
import { PublicationLinksComponent } from './publication-links/publication-links.component';
import { OrcidComponent } from '../../../../shared/components/orcid/orcid.component';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { TooltipModule } from 'ngx-bootstrap/tooltip';
import { BreadcrumbComponent } from '../../breadcrumb/breadcrumb.component';
import { ModelUtilsService } from '@shared/services/model-util.service';
import { CleanCitationPipe } from '../../../pipes/clean-citation';
import { MatProgressSpinner } from '@angular/material/progress-spinner';
import { CdkCopyToClipboard } from '@angular/cdk/clipboard';
import { DialogComponent } from '../../../../shared/components/dialog/dialog.component';
import { ShareComponent } from '../share/share.component';
import { SecondaryButtonComponent } from '../../../../shared/components/buttons/secondary-button/secondary-button.component';
import { RelatedLinksComponent } from '../related-links/related-links.component';
import { MatCard, MatCardTitle } from '@angular/material/card';
import { PublicationLinksComponent } from './publication-links/publication-links.component';
import { OrcidComponent } from '../../../../shared/components/orcid/orcid.component';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { TooltipModule } from 'ngx-bootstrap/tooltip';
import { BreadcrumbComponent } from '../../breadcrumb/breadcrumb.component';
import { SearchBarComponent } from '../../search-bar/search-bar.component';

@Component({
selector: 'app-single-publication',
templateUrl: './single-publication.component.html',
styleUrls: ['./single-publication.component.scss'],
standalone: true,
imports: [
SearchBarComponent,
NgIf,
RouterLink,
BreadcrumbComponent,
NgFor,
TooltipModule,
FontAwesomeModule,
NgClass,
OrcidComponent,
NgSwitch,
NgSwitchCase,
NgSwitchDefault,
PublicationLinksComponent,
MatCard,
MatCardTitle,
RelatedLinksComponent,
SecondaryButtonComponent,
ShareComponent,
DialogComponent,
CdkCopyToClipboard,
MatProgressSpinner,
CleanCitationPipe,
],
@Component({
selector: 'app-single-publication',
templateUrl: './single-publication.component.html',
styleUrls: ['./single-publication.component.scss'],
standalone: true,
imports: [
SearchBarComponent,
NgIf,
RouterLink,
BreadcrumbComponent,
NgFor,
TooltipModule,
FontAwesomeModule,
NgClass,
OrcidComponent,
NgSwitch,
NgSwitchCase,
NgSwitchDefault,
PublicationLinksComponent,
MatCard,
MatCardTitle,
RelatedLinksComponent,
SecondaryButtonComponent,
ShareComponent,
DialogComponent,
CdkCopyToClipboard,
MatProgressSpinner,
CleanCitationPipe
]
})
export class SinglePublicationComponent
implements OnInit, AfterViewInit, OnDestroy
Expand Down Expand Up @@ -644,7 +644,9 @@ export class SinglePublicationComponent
checkEmpty(item)
);
this.typeFields = this.typeFields.filter((item) => checkEmpty(item));
this.mediumFields = this.mediumFields.filter((item) => checkEmpty(item));

// Jufo code 0 must be shown, so exception added
this.mediumFields = this.mediumFields.filter((item) => item.field !== 'jufoClassCode' ? checkEmpty(item) : true);
this.linksFields = this.linksFields.filter((item) => checkEmpty(item));
this.otherFields = this.otherFields.filter((item) => checkEmpty(item));
this.open_accessFields = this.open_accessFields.filter((item) =>
Expand Down

0 comments on commit 88da393

Please sign in to comment.