diff --git a/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.html b/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.html index 9792b0a36b3ae0718c0dc6c5266f3f18d3ed84a9..55e764012a078ac43eacc51a56ce2e3d2c2f7e52 100644 --- a/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.html +++ b/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.html @@ -86,9 +86,13 @@ <div class="flex-column"> <div class="step-container"> <div class="timeline-container"> - <div class="timeline-entry"> - <span>1</span> - </div> + @if (publishToMarketPlaceForm.value.name) { + <span class="completed-step"></span> + } @else { + <div class="timeline-entry"> + <span>1</span> + </div> + } <mat-divider vertical class="divider-color full-height" @@ -118,9 +122,14 @@ <!--Model description starts--> <div class="step-container"> <div class="timeline-container"> - <div class="timeline-entry"> - <span>2</span> - </div> + @if (publishToMarketPlaceForm.value.description) { + <span class="completed-step"></span> + } @else { + <div class="timeline-entry"> + <span>2</span> + </div> + } + <mat-divider vertical class="divider-color full-height" @@ -147,8 +156,7 @@ </span> <span class="text-medium" >If you want to improve your model description rating then - please add more details, else click on 'OK' button to go with - the current rating</span + please add more details</span > </div> <mat-divider @@ -161,9 +169,17 @@ <!--Model category starts--> <div class="step-container"> <div class="timeline-container"> - <div class="timeline-entry"> - <span>3</span> - </div> + @if ( + publishToMarketPlaceForm.value.category && + publishToMarketPlaceForm.value.toolkitType + ) { + <span class="completed-step"></span> + } @else { + <div class="timeline-entry"> + <span>3</span> + </div> + } + <mat-divider vertical class="divider-color full-height" @@ -209,9 +225,14 @@ <!--license profile start--> <div class="step-container"> <div class="timeline-container"> - <div class="timeline-entry"> - <span>4</span> - </div> + @if (data.licenseProfile) { + <span class="completed-step"></span> + } @else { + <div class="timeline-entry"> + <span>4</span> + </div> + } + <mat-divider vertical class="divider-color full-height" @@ -236,43 +257,51 @@ disabled /> </div> + @if (addEditLicenseProfile) { + <div class="flex-row full-width spacebetween buttons-layout"> + <button + mat-stroked-button + color="primary" + (click)="onClickUploadLicenseProfile()" + > + Upload + </button> + <button + *ngIf="data.licenseProfile" + mat-stroked-button + color="primary" + (click)="onClickUpdateLicenseProfile()" + > + Update + </button> + <button + *ngIf="!data.licenseProfile" + mat-stroked-button + color="primary" + (click)="onClickCreateLicenseProfile()" + > + Create + </button> + </div> + } + <mat-divider + class="divider-color horizontal-divider" + ></mat-divider> </div> - @if (addEditLicenseProfile) { - <div class="flex-row full-width spacebetween buttons-layout"> - <button - mat-stroked-button - color="primary" - (click)="onClickUploadLicenseProfile()" - > - Upload - </button> - <button - *ngIf="data.licenseProfile" - mat-stroked-button - color="primary" - (click)="onClickUpdateLicenseProfile()" - > - Update - </button> - <button - *ngIf="!data.licenseProfile" - mat-stroked-button - (click)="onClickCreateLicenseProfile()" - > - Create - </button> - </div> - } - <mat-divider class="divider-color horizontal-divider"></mat-divider> </div> <!--license profile end--> <!--upload documents start--> <div class="step-container"> <div class="timeline-container"> - <div class="timeline-entry"> - <span>5</span> - </div> + @if (documents().length > 0) { + <span class="completed-step"></span> + } @else { + <div class="timeline-entry"> + <span>5</span> + </div> + } + <mat-divider vertical class="divider-color full-height" @@ -330,9 +359,13 @@ <!--tags starts--> <div class="step-container"> <div class="timeline-container"> - <div class="timeline-entry"> - <span>6</span> - </div> + @if (publishToMarketPlaceForm.value.tags.length > 0) { + <span class="completed-step"></span> + } @else { + <div class="timeline-entry"> + <span>7</span> + </div> + } <mat-divider vertical class="divider-color full-height" @@ -384,9 +417,13 @@ <!--upload image start--> <div class="step-container"> <div class="timeline-container"> - <div class="timeline-entry"> - <span>7</span> - </div> + @if (imageToShow) { + <span class="completed-step"></span> + } @else { + <div class="timeline-entry"> + <span>8</span> + </div> + } </div> <div class="flex-column"> <div class="flex-row"> diff --git a/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.scss b/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.scss index 387aef2fe7da1fb0721486d3198283112fee88d7..bb9bcbd01642b96518b843a53de44365b441662d 100644 --- a/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.scss +++ b/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.scss @@ -335,3 +335,11 @@ flex-direction: column; gap: 20px; } + +.completed-step { + background: url("../../../../assets/images/validate_icon.png") no-repeat; + background-repeat: no-repeat; + background-position: center; + width: 19px; + height: 22px; +} diff --git a/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.ts b/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.ts index 7bf22595dd24230d0d74d4c61c9f4caae7a7fffa..4653169547bb2c8800107a9e4cec04995637892b 100644 --- a/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.ts +++ b/src/app/shared/components/publish-to-marketplace-page/publish-to-marketplace-page.component.ts @@ -278,7 +278,6 @@ export class PublishToMarketplacePageComponent implements OnInit { .getAuthors(this.solutionId, this.revisionId) .subscribe({ next: (res) => { - console.log({ res }); if (res.length === 0) { const alert: Alert = { message: @@ -411,7 +410,6 @@ export class PublishToMarketplacePageComponent implements OnInit { this.publishToMarketPlaceForm.patchValue({ description: res.response_body.description, }); - console.log('description', res.response_body.description); }, error: (error) => { console.error('Failed to fetch description', error); @@ -440,7 +438,6 @@ export class PublishToMarketplacePageComponent implements OnInit { console.error('Failed to fetch documents', error); }, }); - this.privateCatalogsService .searchPublishRequestWithCatalogIds( this.revisionId, @@ -483,7 +480,6 @@ export class PublishToMarketplacePageComponent implements OnInit { ) .subscribe({ next: (res) => { - console.log({ res }); this.loadPublishRequest(); }, error: () => {}, @@ -895,8 +891,6 @@ export class PublishToMarketplacePageComponent implements OnInit { } uploadExistingLicenseFile(file: File): Observable<any> { - console.log('revisionId', this.revisionId); - console.log('selectedDefaultRevision', this.selectedDefaultRevision); return this.privateCatalogsService.uploadExistingModelLicenseProfile( this.userId, this.solutionId, @@ -1000,7 +994,7 @@ export class PublishToMarketplacePageComponent implements OnInit { .subscribe({ next: (res) => { this.publishRequest = res; - if (res.requestStatusCode == 'PE') { + if (res.requestStatusCode === 'PE') { this.statusStepperProgress.documentation = true; this.statusStepperProgress.requestApproval = true; } @@ -1047,7 +1041,7 @@ export class PublishToMarketplacePageComponent implements OnInit { .subscribe({ next: (res) => { res = this.publishRequest; - if (res.requestStatusCode == 'PE') { + if (res.requestStatusCode === 'PE') { this.statusStepperProgress.documentation = true; this.statusStepperProgress.requestApproval = true; }