Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MARP-1014: Product detail tabs #145

Merged
merged 25 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5c9bca6
Hide empty product detail tabs
vhhoang-axonivy Aug 28, 2024
1778a7a
Merge branch 'develop' into feature/MARP-989-Empty-product-detail-tab…
vhhoang-axonivy Aug 28, 2024
6aeb924
Clean up
vhhoang-axonivy Aug 28, 2024
344ea1d
Refined check null and empty method, added additional tests
vhhoang-axonivy Aug 29, 2024
834be1a
Merge branch 'develop' into feature/MARP-989-Empty-product-detail-tab…
vhhoang-axonivy Aug 29, 2024
bb059fd
Refined display content condition and provided more tests
vhhoang-axonivy Aug 30, 2024
cc738be
Merge branch 'develop' into feature/MARP-989-Empty-product-detail-tab…
vhhoang-axonivy Aug 30, 2024
3c5ce94
Refined display confition
vhhoang-axonivy Aug 30, 2024
d328fd1
Refined display condition
vhhoang-axonivy Aug 30, 2024
f58df31
Merge branch 'develop' into feature/MARP-989-Empty-product-detail-tab…
vhhoang-axonivy Sep 6, 2024
8dc8ccf
Merge branch 'develop' into feature/MARP-989-Empty-product-detail-tab…
vhhoang-axonivy Sep 6, 2024
6907f7d
Modified hasValueTab pipe, fixed pipe failed test
vhhoang-axonivy Sep 9, 2024
97f0451
Refined hidden content tab logic
vhhoang-axonivy Sep 10, 2024
602e647
Merge branch 'develop' into feature/MARP-989-Empty-product-detail-tab…
vhhoang-axonivy Sep 10, 2024
411c110
Refined how tabs are displayed on PC and mobile
vhhoang-axonivy Sep 11, 2024
d88bc03
Clean up
vhhoang-axonivy Sep 11, 2024
0f4c99f
Clean up
vhhoang-axonivy Sep 11, 2024
4cc767c
Clean up
vhhoang-axonivy Sep 11, 2024
ddcc402
Remove hasValueTabPipe
vhhoang-axonivy Sep 11, 2024
90f517b
Merge branch 'develop' into feature/MARP-989-Empty-product-detail-tab…
vhhoang-axonivy Sep 11, 2024
647f54f
Remove commented test
vhhoang-axonivy Sep 11, 2024
ce0e3d8
Clean up
vhhoang-axonivy Sep 11, 2024
d73d945
Fix product detail tabs
vhhoang-axonivy Sep 12, 2024
bf194d9
Edit corresponding test
vhhoang-axonivy Sep 12, 2024
15ebbf6
Merge branch 'develop' into bugfix/MARP-1014-Product-detail-tabs
vhhoang-axonivy Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
<p [lang]="languageService.selectedLanguage()" [innerHTML]="'common.product.detail.maven.description' | translate"></p>
<code>
&lt;!-- {{ productModuleContent.name }} --&gt;
<br />
&lt;dependency&gt;
<br />
&nbsp;&nbsp;&lt;groupId&gt;{{ productModuleContent.groupId }}&lt;/groupId&gt;
<br />
&nbsp;&nbsp;&lt;artifactId&gt;{{
productModuleContent.artifactId
}}&lt;/artifactId&gt;
<br />
&nbsp;&nbsp;&lt;version&gt;{{
selectedVersion.replaceAll('Version ', '')
}}&lt;/version&gt;
<br />
&nbsp;&nbsp;&lt;type&gt;{{ productModuleContent.type }}&lt;/type&gt;
<br />
&lt;/dependency&gt;
</code>
<pre>
<code>
&lt;!-- {{ getProductName() }} --&gt;
&lt;dependency&gt;
&nbsp;&nbsp;&lt;groupId&gt;{{ productDetail.productModuleContent.groupId }}&lt;/groupId&gt;
&nbsp;&nbsp;&lt;artifactId&gt;{{productDetail.productModuleContent.artifactId}}&lt;/artifactId&gt;
&nbsp;&nbsp;&lt;version&gt;{{ selectedVersion.replaceAll('Version ', '') }}&lt;/version&gt;
&nbsp;&nbsp;&lt;type&gt;{{ productDetail.productModuleContent.type }}&lt;/type&gt;
&lt;/dependency&gt;
</code>
</pre>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pre {
border: 1px solid #c7d426;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('ProductDetailMavenContentComponent', () => {

fixture = TestBed.createComponent(ProductDetailMavenContentComponent);
component = fixture.componentInstance;
component.productModuleContent = MOCK_PRODUCT_DETAIL.productModuleContent;
component.productDetail = MOCK_PRODUCT_DETAIL;
component.selectedVersion = '1.0.0';
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Component, inject, Input } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';
import { ProductModuleContent } from '../../../../shared/models/product-module-content.model';
import { LanguageService } from '../../../../core/services/language/language.service';
import { Language } from '../../../../shared/enums/language.enum';
import { ProductDetail } from '../../../../shared/models/product-detail.model';

@Component({
selector: 'app-product-detail-maven-content',
Expand All @@ -12,9 +13,13 @@ import { LanguageService } from '../../../../core/services/language/language.ser
})
export class ProductDetailMavenContentComponent {
@Input()
productModuleContent!: ProductModuleContent;
productDetail!: ProductDetail;
@Input()
selectedVersion!: string;

languageService = inject(LanguageService);

getProductName() {
return this.productDetail.names[Language.EN];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ <h4 class="analysis-title text-primary text-capitalize mb-0">
[attr.aria-labelledby]="displayedTab.value + '-tab'">
@if (displayedTab.value === 'dependency') {
<app-product-detail-maven-content
[productModuleContent]="productModuleContent()"
[productDetail]="productDetail()"
[selectedVersion]="selectedVersion">
</app-product-detail-maven-content>
} @else {
Expand Down
Loading