Skip to content
Snippets Groups Projects
Commit ce6c0def authored by Kawtar Laariche's avatar Kawtar Laariche
Browse files

#24: add tracking steps features

parent 9c451bed
No related branches found
No related tags found
No related merge requests found
......@@ -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">
......
......@@ -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;
}
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment