Skip to content

Commit 213d09a

Browse files
Mattia VianelliMattia Vianelli
authored andcommitted
DSC-2715 Converted component to standalone
1 parent e0c75d7 commit 213d09a

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

src/app/submission/form/submission-form.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
switchMap,
2323
} from 'rxjs/operators';
2424

25+
import { environment } from '../../../environments/environment';
2526
import { AuthService } from '../../core/auth/auth.service';
2627
import { SubmissionDefinitionsModel } from '../../core/config/models/config-submission-definitions.model';
2728
import { Collection } from '../../core/shared/collection.model';
@@ -46,6 +47,7 @@ import { SectionDataObject } from '../sections/models/section-data.model';
4647
import { SectionsService } from '../sections/sections.service';
4748
import { SectionsType } from '../sections/sections-type';
4849
import { SubmissionService } from '../submission.service';
50+
import { SubmissionLegendComponent } from '../submission-legend/submission-legend.component';
4951
import { SubmissionVisibility } from '../utils/visibility.util';
5052
import {
5153
SubmissionSectionModel,
@@ -55,7 +57,6 @@ import { SubmissionFormCollectionComponent } from './collection/submission-form-
5557
import { SubmissionFormFooterComponent } from './footer/submission-form-footer.component';
5658
import { SubmissionFormSectionAddComponent } from './section-add/submission-form-section-add.component';
5759
import { ThemedSubmissionUploadFilesComponent } from './submission-upload-files/themed-submission-upload-files.component';
58-
import { environment } from '../../../environments/environment';
5960

6061
/**
6162
* This component represents the submission form.
@@ -72,6 +73,7 @@ import { environment } from '../../../environments/environment';
7273
ThemedSubmissionUploadFilesComponent,
7374
SubmissionFormCollectionComponent,
7475
SubmissionFormSectionAddComponent,
76+
SubmissionLegendComponent,
7577
TranslateModule,
7678
],
7779
standalone: true,

src/app/submission/submission-legend/submission-legend.component.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { ComponentFixture, TestBed } from '@angular/core/testing';
1+
import {
2+
ComponentFixture,
3+
TestBed,
4+
} from '@angular/core/testing';
25
import { TranslateModule } from '@ngx-translate/core';
36

47
import { SubmissionLegendComponent } from './submission-legend.component';
@@ -9,12 +12,9 @@ describe('SubmissionLegendComponent', () => {
912

1013
beforeEach(async () => {
1114
await TestBed.configureTestingModule({
12-
imports: [
13-
TranslateModule.forRoot()
14-
],
15-
declarations: [ SubmissionLegendComponent ]
15+
imports: [ SubmissionLegendComponent, TranslateModule.forRoot() ],
1616
})
17-
.compileComponents();
17+
.compileComponents();
1818

1919
fixture = TestBed.createComponent(SubmissionLegendComponent);
2020
component = fixture.componentInstance;

src/app/submission/submission-legend/submission-legend.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { Component } from '@angular/core';
2+
import { TranslateModule } from '@ngx-translate/core';
23

34
@Component({
45
selector: 'ds-submission-legend',
56
templateUrl: './submission-legend.component.html',
6-
styleUrls: ['./submission-legend.component.scss']
7+
styleUrls: ['./submission-legend.component.scss'],
8+
standalone: true,
9+
imports: [TranslateModule],
710
})
811
export class SubmissionLegendComponent {
912
legendText = 'submission.sections.general.legend';

src/config/default-app-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ export class DefaultAppConfig implements AppConfig {
323323
},
324324
// Minimum number of characters required before performing a lookup.
325325
minChars: 3,
326-
hideLegend: false
326+
hideLegend: false,
327327
};
328328

329329
// Default Language in which the UI will be rendered if the user's browser language is not an active language

0 commit comments

Comments
 (0)