From cdbc4bfff41478f307b73aee03879c74a4ba6011 Mon Sep 17 00:00:00 2001 From: Francisco de la Vega Date: Thu, 30 Apr 2026 18:09:03 +0200 Subject: [PATCH] Add extra support to DSP configuration params --- .../create-product-spec.component.html | 54 ++--- .../create-product-spec.component.spec.ts | 102 +++++++++ .../create-product-spec.component.ts | 201 +++++++++++++----- .../update-product-spec.component.html | 52 ++--- .../update-product-spec.component.spec.ts | 102 +++++++++ .../update-product-spec.component.ts | 198 ++++++++++++----- 6 files changed, 563 insertions(+), 146 deletions(-) diff --git a/src/app/pages/seller-offerings/offerings/seller-product-spec/create-product-spec/create-product-spec.component.html b/src/app/pages/seller-offerings/offerings/seller-product-spec/create-product-spec/create-product-spec.component.html index 278f7d12..e274d01d 100644 --- a/src/app/pages/seller-offerings/offerings/seller-product-spec/create-product-spec/create-product-spec.component.html +++ b/src/app/pages/seller-offerings/offerings/seller-product-spec/create-product-spec/create-product-spec.component.html @@ -204,7 +204,7 @@

{{ 'CR --> } - @if ((currentStep === 1 && !BUNDLE_ENABLED) || (currentStep === 2 && BUNDLE_ENABLED)) { + @if (isCurrentStep('compliance')) {

{{ 'CREATE_PROD_SPEC._self_attestation' | translate }}

@@ -459,8 +459,8 @@

} } - @if ((currentStep === 2 && !BUNDLE_ENABLED) || (currentStep === 3 && BUNDLE_ENABLED)) { - @if (prodChars.length === 0){ + @if (isCurrentStep('characteristics') || isCurrentStep('dataspace')) { + @if (getFilteredCharacteristicsForCurrentStep().length === 0){
- @if(charTypeSelected !== 'boolean' && charTypeSelected !== 'credentialsConfiguration' && charTypeSelected !== 'authorizationPolicy'){ + @if(!isDataspaceConfigurationStep() && charTypeSelected !== 'boolean' && !isJsonCharacteristicType(charTypeSelected)){
} - @if(charTypeSelected === 'string'){ + @if(isTextCharacteristicType(charTypeSelected)){
@@ -721,7 +725,7 @@

- } @else if (charTypeSelected == "credentialsConfiguration" || charTypeSelected == "authorizationPolicy"){ + } @else if (isJsonCharacteristicType(charTypeSelected)){ @if(creatingChars.length === 0){
@@ -758,7 +762,7 @@

--> } - @if ((currentStep === 3 && !BUNDLE_ENABLED) || (currentStep === 4 && BUNDLE_ENABLED)) { + @if (isCurrentStep('resource')) { @if(loadingResourceSpec){

--> } - @if ((currentStep === 4 && !BUNDLE_ENABLED) || (currentStep === 5 && BUNDLE_ENABLED)) { + @if (isCurrentStep('service')) { @if(loadingServiceSpec){

--> } - @if ((currentStep === 5 && !BUNDLE_ENABLED) || (currentStep === 6 && BUNDLE_ENABLED)) { + @if (isCurrentStep('attachments')) {

{{ 'CREATE_PROD_SPEC._add_prod_img' | translate }}

@@ -1163,7 +1167,7 @@

{{ 'CREATE_PROD_SPEC._add_att

--> } - @if ((currentStep === 6 && !BUNDLE_ENABLED) || (currentStep === 7 && BUNDLE_ENABLED)) { + @if (isCurrentStep('relationships')) {
@if (prodRelationships.length === 0){
@@ -1358,7 +1362,7 @@

{{ 'CREATE_PROD_SPEC._add_att

--> } - @if ((currentStep === 7 && !BUNDLE_ENABLED) || (currentStep === 8 && BUNDLE_ENABLED)) { + @if (isCurrentStep('summary')) {
@if(loading){
@@ -1506,7 +1510,7 @@

{{ 'CREATE_PROD_SPEC._add_att @for (char of prod.productSpecCharacteristicValue; track char; let last = $last) { @if(char.value || char.value == 0){ - @if(prod.valueType === 'credentialsConfiguration' || prod.valueType === 'authorizationPolicy'){ + @if(isJsonCharacteristicType(prod.valueType)){ @if(!last){ {{getValuePreview(char.value)}}, } @else { @@ -1725,7 +1729,7 @@

{{ 'CREATE_PROD_SPEC._add_att 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/> - @if ((currentStep === 7 && !BUNDLE_ENABLED) || (currentStep === 8 && BUNDLE_ENABLED)) { + @if (isCurrentStep('summary')) {

--> } - @if ((currentStep === 1 && !BUNDLE_ENABLED) || (currentStep === 2 && BUNDLE_ENABLED)) { + @if (isCurrentStep('compliance')) {
- } } @@ -647,8 +645,8 @@

} @if(showCreateChar==false){
-
@@ -680,7 +684,7 @@

- @if(charTypeSelected !== 'boolean' && charTypeSelected !== 'credentialsConfiguration' && charTypeSelected !== 'authorizationPolicy'){ + @if(!isDataspaceConfigurationStep() && charTypeSelected !== 'boolean' && !isJsonCharacteristicType(charTypeSelected)){
} - @if(charTypeSelected === 'string'){ + @if(isTextCharacteristicType(charTypeSelected)){
@@ -814,7 +818,7 @@

- } @else if (charTypeSelected == "credentialsConfiguration" || charTypeSelected == "authorizationPolicy"){ + } @else if (isJsonCharacteristicType(charTypeSelected)){ @if(creatingChars.length === 0){
@@ -851,7 +855,7 @@

--> } - @if ((currentStep === 3 && !BUNDLE_ENABLED) || (currentStep === 4 && BUNDLE_ENABLED)) { + @if (isCurrentStep('resource')) { @if(loadingResourceSpec){

--> } - @if ((currentStep === 4 && !BUNDLE_ENABLED) || (currentStep === 5 && BUNDLE_ENABLED)) { + @if (isCurrentStep('service')) { @if(loadingServiceSpec){

--> } - @if ((currentStep === 5 && !BUNDLE_ENABLED) || (currentStep === 6 && BUNDLE_ENABLED)) { + @if (isCurrentStep('attachments')) {

{{ 'UPDATE_PROD_SPEC._add_prod_img' | translate }}

@@ -1255,7 +1259,7 @@

{{ 'UPDATE_PROD_SPEC._add_att

--> } - @if ((currentStep === 6 && !BUNDLE_ENABLED) || (currentStep === 7 && BUNDLE_ENABLED)) { + @if (isCurrentStep('relationships')) {
@if (prodRelationships.length === 0){
@@ -1430,7 +1434,7 @@

{{ 'UPDATE_PROD_SPEC._add_att

--> } - @if ((currentStep === 7 && !BUNDLE_ENABLED) || (currentStep === 8 && BUNDLE_ENABLED)) { + @if (isCurrentStep('summary')) {
@if(loading){
@@ -1578,7 +1582,7 @@

{{ 'UPDATE_PROD_SPEC._add_att @for (char of prod.productSpecCharacteristicValue; track char; let last = $last) { @if(char.value || char.value == 0){ - @if(prod.valueType === 'credentialsConfiguration' || prod.valueType === 'authorizationPolicy'){ + @if(isJsonCharacteristicType(prod.valueType)){ @if(!last){ {{getValuePreview(char.value)}}, } @else { diff --git a/src/app/pages/seller-offerings/offerings/seller-product-spec/update-product-spec/update-product-spec.component.spec.ts b/src/app/pages/seller-offerings/offerings/seller-product-spec/update-product-spec/update-product-spec.component.spec.ts index 1825bb06..c593ad65 100644 --- a/src/app/pages/seller-offerings/offerings/seller-product-spec/update-product-spec/update-product-spec.component.spec.ts +++ b/src/app/pages/seller-offerings/offerings/seller-product-spec/update-product-spec/update-product-spec.component.spec.ts @@ -159,18 +159,40 @@ describe('UpdateProductSpecComponent', () => { it('ngOnInit should configure steps with bundle enabled', () => { component.BUNDLE_ENABLED = true; + component.DATA_SPACE_ENABLED = false; const initSpy = spyOn(component, 'initPartyInfo'); component.ngOnInit(); expect(component.steps.length).toBe(9); expect(component.steps).toContain('Bundle'); + expect(component.steps).not.toContain('Dataspace Configuration'); expect(initSpy).toHaveBeenCalled(); }); it('ngOnInit should configure steps without bundle', () => { component.BUNDLE_ENABLED = false; + component.DATA_SPACE_ENABLED = false; component.ngOnInit(); expect(component.steps.length).toBe(8); expect(component.steps).not.toContain('Bundle'); + expect(component.steps).not.toContain('Dataspace Configuration'); + }); + + it('ngOnInit should configure steps with dataspace enabled and bundle enabled', () => { + component.BUNDLE_ENABLED = true; + component.DATA_SPACE_ENABLED = true; + component.ngOnInit(); + expect(component.steps.length).toBe(10); + expect(component.steps).toContain('Bundle'); + expect(component.steps).toContain('Dataspace Configuration'); + }); + + it('ngOnInit should configure steps with dataspace enabled and no bundle', () => { + component.BUNDLE_ENABLED = false; + component.DATA_SPACE_ENABLED = true; + component.ngOnInit(); + expect(component.steps.length).toBe(9); + expect(component.steps).not.toContain('Bundle'); + expect(component.steps).toContain('Dataspace Configuration'); }); it('initPartyInfo should set partyId when logged directly', () => { @@ -833,6 +855,36 @@ describe('UpdateProductSpecComponent', () => { expect(component.creatingChars).toEqual([]); }); + it('refreshChars should use dataspace default type in dataspace step', () => { + component.BUNDLE_ENABLED = false; + component.DATA_SPACE_ENABLED = true; + component.ngOnInit(); + component.currentStep = 3; + component.charTypeSelected = 'number'; + + component.refreshChars(); + + expect(component.charTypeSelected).toBe('endpointUrl'); + }); + + it('getFilteredCharacteristicsForCurrentStep should split default and dataspace characteristics', () => { + component.BUNDLE_ENABLED = false; + component.DATA_SPACE_ENABLED = true; + component.ngOnInit(); + component.prodChars = [ + { id: '1', name: 'Latency', valueType: 'string' }, + { id: '2', name: 'Compliance: ISO 27001', valueType: 'string' }, + { id: '3', name: 'DCP endpoint', valueType: 'endpointUrl' }, + { id: '4', name: 'Policy', valueType: 'authorizationPolicy' } + ] as any; + + component.currentStep = 2; + expect(component.getFilteredCharacteristicsForCurrentStep().map(char => char.name)).toEqual(['Latency']); + + component.currentStep = 3; + expect(component.getFilteredCharacteristicsForCurrentStep().map(char => char.name)).toEqual(['DCP endpoint', 'Policy']); + }); + it('removeClass and addClass should update className', () => { const elem = { className: 'a b c' } as HTMLElement; component.removeClass(elem, 'b'); @@ -927,6 +979,17 @@ describe('UpdateProductSpecComponent', () => { expect(component.creatingChars[1].isDefault).toBeFalse(); }); + it('addCharValue should treat endpointUrl as text type', () => { + component.charTypeSelected = 'endpointUrl'; + component.stringValue = 'https://example.org/api/dsp/2025-1'; + + component.addCharValue(); + + expect(component.creatingChars.length).toBe(1); + expect(component.creatingChars[0].value as any).toBe('https://example.org/api/dsp/2025-1'); + expect(component.stringValue).toBe(''); + }); + it('addCharValue should add number values with units', () => { component.charTypeSelected = 'number'; component.numberValue = '100'; @@ -1012,6 +1075,20 @@ describe('UpdateProductSpecComponent', () => { expect(component.creatingChars).toEqual([]); }); + it('addCharValue should parse and add JSON values for targetSpecification', () => { + component.charTypeSelected = 'targetSpecification'; + component.jsonValue = '{"@type":"AssetCollection","refinement":[]}'; + + component.addCharValue(); + + expect(component.creatingChars.length).toBe(1); + expect(component.creatingChars[0].isDefault).toBeTrue(); + expect(component.creatingChars[0].value as any).toEqual({ + '@type': 'AssetCollection', + refinement: [] + }); + }); + it('removeCharValue and selectDefaultChar should manage created char values', () => { component.creatingChars = [ { isDefault: true, value: 'A' } as any, @@ -1101,6 +1178,31 @@ describe('UpdateProductSpecComponent', () => { expect((component.prodChars[0] as any)['@schemaLocation']).toContain('policyCharacteristic.json'); }); + it('saveChar should persist serviceConfiguration valueType without schema location', () => { + component.charTypeSelected = 'serviceConfiguration'; + component.charsForm.patchValue({ name: 'Service Configuration', description: 'desc' }); + component.creatingChars = [{ isDefault: true, value: { defaultOidcScope: 'openid' } } as any]; + component.isOptional = true; + + component.saveChar(); + + expect(component.prodChars.length).toBe(1); + expect((component.prodChars[0] as any).valueType).toBe('serviceConfiguration'); + expect((component.prodChars[0] as any)['@schemaLocation']).toBeUndefined(); + expect(component.prodChars.find(char => char.name === 'Service Configuration - enabled')).toBeUndefined(); + }); + + it('saveChar should persist endpointUrl valueType', () => { + component.charTypeSelected = 'endpointUrl'; + component.charsForm.patchValue({ name: 'DCP Endpoint', description: 'desc' }); + component.creatingChars = [{ isDefault: true, value: 'https://example.org/api' } as any]; + + component.saveChar(); + + expect(component.prodChars.length).toBe(1); + expect((component.prodChars[0] as any).valueType).toBe('endpointUrl'); + }); + it('deleteChar should remove characteristic and its related enabled one', () => { const detectSpy = spyOn((component as any).cdr, 'detectChanges'); component.prodChars = [ diff --git a/src/app/pages/seller-offerings/offerings/seller-product-spec/update-product-spec/update-product-spec.component.ts b/src/app/pages/seller-offerings/offerings/seller-product-spec/update-product-spec/update-product-spec.component.ts index 5a579a6b..5eb1875e 100644 --- a/src/app/pages/seller-offerings/offerings/seller-product-spec/update-product-spec/update-product-spec.component.ts +++ b/src/app/pages/seller-offerings/offerings/seller-product-spec/update-product-spec/update-product-spec.component.ts @@ -32,6 +32,7 @@ type ServiceSpecificationRef = components["schemas"]["ServiceSpecificationRef"]; type ResourceSpecificationRef = components["schemas"]["ResourceSpecificationRef"]; type ProductSpecificationRelationship = components["schemas"]["ProductSpecificationRelationship"]; type AttachmentRefOrValue = components["schemas"]["AttachmentRefOrValue"]; +type ProductSpecFormStep = 'general' | 'bundle' | 'compliance' | 'characteristics' | 'dataspace' | 'resource' | 'service' | 'attachments' | 'relationships' | 'summary'; @Component({ selector: 'update-product-spec', @@ -182,6 +183,21 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { toValue: string = ''; rangeUnit: string = ''; jsonValue: string = ''; + readonly dataSpaceCharacteristicTypes: string[] = [ + 'endpointUrl', + 'upstreamAddress', + 'endpointDescription', + 'targetSpecification', + 'serviceConfiguration', + 'credentialsConfiguration', + 'authorizationPolicy' + ]; + readonly dataSpaceJsonCharacteristicTypes: string[] = [ + 'targetSpecification', + 'serviceConfiguration', + 'credentialsConfiguration', + 'authorizationPolicy' + ]; filenameRegex = /^[A-Za-z0-9_.-]+$/; private destroy$ = new Subject(); @@ -231,30 +247,7 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { public files: NgxFileDropEntry[] = []; ngOnInit() { - if(this.BUNDLE_ENABLED){ - this.steps = [ - 'General Info', - 'Bundle', - 'Compliance profile', - 'Characteristics', - 'Resource specifications', - 'Service specifications', - 'Attachments', - 'Relationships', - 'Summary' - ] - } else { - this.steps = [ - 'General Info', - 'Compliance profile', - 'Characteristics', - 'Resource specifications', - 'Service specifications', - 'Attachments', - 'Relationships', - 'Summary' - ] - } + this.steps = this.getFormSteps(); this.initPartyInfo(); console.log(this.prod) this.populateProductInfo(); @@ -739,7 +732,7 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { }, 3000); return; } - if(((this.currentStep === 1 && !this.BUNDLE_ENABLED) || (this.currentStep === 2 && this.BUNDLE_ENABLED)) && !this.showUploadAtt){ + if(this.isCurrentStep('compliance') && !this.showUploadAtt){ const index = this.selectedISOS.findIndex(item => item.name === sel.name); this.attachmentService.uploadFile(fileBody).subscribe({ next: data => { @@ -772,7 +765,7 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { } }); } - if(((this.currentStep === 1 && !this.BUNDLE_ENABLED) || (this.currentStep === 2 && this.BUNDLE_ENABLED)) && this.showUploadAtt){ + if(this.isCurrentStep('compliance') && this.showUploadAtt){ const index = this.finishChars.findIndex(item => item.name === this.selfAtt.name); this.attachmentService.uploadFile(fileBody).subscribe({ next: data => { @@ -816,7 +809,7 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { } }); } - if((this.currentStep === 5 && !this.BUNDLE_ENABLED) || (this.currentStep === 6 && this.BUNDLE_ENABLED)){ + if(this.isCurrentStep('attachments')){ console.log(file) this.attachmentService.uploadFile(fileBody).subscribe({ next: data => { @@ -921,6 +914,20 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { initFlowbite(); } + toggleCreateCharacteristicForm(){ + this.showCreateChar = !this.showCreateChar; + if (this.showCreateChar) { + this.charTypeSelected = this.getInitialCharacteristicTypeForCurrentStep(); + this.creatingChars = []; + this.isOptional = false; + this.optionalDftTrue = false; + this.booleanDefaultTrue = true; + if (this.charTypeSelected === 'boolean') { + this.setBooleanDefaultValues(); + } + } + } + toggleResource(){ this.loadingResourceSpec=true; this.resourceSpecs=[]; @@ -1251,7 +1258,7 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { this.toValue = ''; this.rangeUnit = ''; this.jsonValue = ''; - this.charTypeSelected='string'; + this.charTypeSelected=this.getInitialCharacteristicTypeForCurrentStep(); this.booleanDefaultTrue=true; this.isOptional=false; this.optionalDftTrue=false; @@ -1353,8 +1360,105 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { } } - private isJsonCharacteristicType(type: string): boolean { - return type === 'credentialsConfiguration' || type === 'authorizationPolicy'; + isJsonCharacteristicType(type: string | undefined): boolean { + if (!type) { + return false; + } + return this.dataSpaceJsonCharacteristicTypes.includes(type); + } + + isDataSpaceCharacteristicType(type: string | undefined): boolean { + if (!type) { + return false; + } + return this.dataSpaceCharacteristicTypes.includes(type); + } + + isDataspaceConfigurationStep(): boolean { + return this.isCurrentStep('dataspace'); + } + + isDefaultCharacteristicsStep(): boolean { + return this.isCurrentStep('characteristics'); + } + + isTextCharacteristicType(type: string | undefined): boolean { + return type === 'string' || type === 'endpointUrl' || type === 'upstreamAddress' || type === 'endpointDescription'; + } + + getFilteredCharacteristicsForCurrentStep(): ProductSpecificationCharacteristic[] { + const nonCompliance = this.prodChars.filter((char: any) => !char.name?.startsWith('Compliance:')); + if (this.isDataspaceConfigurationStep()) { + return nonCompliance.filter((char: any) => this.isDataSpaceCharacteristicType(char.valueType)); + } + return nonCompliance.filter((char: any) => !this.isDataSpaceCharacteristicType(char.valueType)); + } + + getInitialCharacteristicTypeForCurrentStep(): string { + if (this.isDataspaceConfigurationStep()) { + return this.dataSpaceCharacteristicTypes[0]; + } + return 'string'; + } + + private getFormSteps(): string[] { + const steps: string[] = ['General Info']; + if (this.BUNDLE_ENABLED) { + steps.push('Bundle'); + } + steps.push('Compliance profile'); + steps.push('Characteristics'); + if (this.DATA_SPACE_ENABLED) { + steps.push('Dataspace Configuration'); + } + steps.push('Resource specifications'); + steps.push('Service specifications'); + steps.push('Attachments'); + steps.push('Relationships'); + steps.push('Summary'); + return steps; + } + + private getStepIndex(step: ProductSpecFormStep): number { + const bundleOffset = this.BUNDLE_ENABLED ? 1 : 0; + const complianceIndex = 1 + bundleOffset; + const characteristicsIndex = complianceIndex + 1; + const dataspaceIndex = this.DATA_SPACE_ENABLED ? characteristicsIndex + 1 : -1; + const resourceIndex = characteristicsIndex + (this.DATA_SPACE_ENABLED ? 2 : 1); + const serviceIndex = resourceIndex + 1; + const attachmentsIndex = serviceIndex + 1; + const relationshipsIndex = attachmentsIndex + 1; + const summaryIndex = relationshipsIndex + 1; + + switch (step) { + case 'general': + return 0; + case 'bundle': + return this.BUNDLE_ENABLED ? 1 : -1; + case 'compliance': + return complianceIndex; + case 'characteristics': + return characteristicsIndex; + case 'dataspace': + return dataspaceIndex; + case 'resource': + return resourceIndex; + case 'service': + return serviceIndex; + case 'attachments': + return attachmentsIndex; + case 'relationships': + return relationshipsIndex; + case 'summary': + return summaryIndex; + default: + return -1; + } + } + + isCurrentStep(step: ProductSpecFormStep): boolean { + const index = this.getStepIndex(step); + return index >= 0 && this.currentStep === index; } private getSchemaLocationForType(type: string): string | null { @@ -1369,7 +1473,7 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { addCharValue(){ - if(this.charTypeSelected == 'string'){ + if(this.isTextCharacteristicType(this.charTypeSelected)){ console.log('string') if(this.creatingChars.length==0){ this.creatingChars.push({ @@ -1485,8 +1589,10 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { }; const schemaLocation = this.getSchemaLocationForType(this.charTypeSelected); - if (schemaLocation) { + if (this.isDataSpaceCharacteristicType(this.charTypeSelected)) { characteristic.valueType = this.charTypeSelected; + } + if (schemaLocation) { characteristic['@schemaLocation'] = schemaLocation; } @@ -1746,19 +1852,13 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { switch (this.currentStep) { case 0: // General Info return !this.generalForm?.valid || false; - case 1: - if(this.BUNDLE_ENABLED){ - return this.prodSpecsBundle.length<2 && this.bundleChecked - } else { - return this.checkValidISOS() + default: + if (this.BUNDLE_ENABLED && this.currentStep === this.getStepIndex('bundle')) { + return this.prodSpecsBundle.length<2 && this.bundleChecked; } - case 2: - if(this.BUNDLE_ENABLED){ - return this.checkValidISOS() - } else { - return false + if (this.currentStep === this.getStepIndex('compliance')) { + return this.checkValidISOS(); } - default: return false; } } @@ -1870,31 +1970,31 @@ export class UpdateProductSpecComponent implements OnInit, OnDestroy { this.highestStep=this.currentStep } this.refreshChars(); - if((this.currentStep === 1 && !this.BUNDLE_ENABLED) || (this.currentStep === 2 && this.BUNDLE_ENABLED)){ + if(this.isCurrentStep('compliance')){ setTimeout(() => { initFlowbite(); }, 100); } //Resource - if((this.currentStep==4 && this.BUNDLE_ENABLED) || (this.currentStep==3 && !this.BUNDLE_ENABLED)){ + if(this.isCurrentStep('resource')){ this.getResSpecs(false); } //Service - if((this.currentStep==5 && this.BUNDLE_ENABLED) || (this.currentStep==4 && !this.BUNDLE_ENABLED)){ + if(this.isCurrentStep('service')){ this.getServSpecs(false); } //Attachment - if((this.currentStep==6 && this.BUNDLE_ENABLED) || (this.currentStep==5 && !this.BUNDLE_ENABLED)){ + if(this.isCurrentStep('attachments')){ setTimeout(() => { initFlowbite(); }, 100); } //rels - if((this.currentStep==7 && this.BUNDLE_ENABLED) || (this.currentStep==6 && !this.BUNDLE_ENABLED)){ + if(this.isCurrentStep('relationships')){ this.getProdSpecsRel(false); } //finish - if((this.currentStep==8 && this.BUNDLE_ENABLED) || (this.currentStep==7 && !this.BUNDLE_ENABLED)){ + if(this.isCurrentStep('summary')){ this.showFinish(); } }