Skip to content

Commit

Permalink
Merge pull request #275 from nimble-platform/staging
Browse files Browse the repository at this point in the history
Pull Request for Release MVP 17.1.20 / FMP 11.1.20
  • Loading branch information
dogukan10 authored Jul 22, 2022
2 parents e7c8cd4 + b5a9ddc commit db8b97c
Show file tree
Hide file tree
Showing 121 changed files with 353 additions and 380 deletions.
5 changes: 4 additions & 1 deletion src/app/analytics/analytics.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ export class AnalyticsService {
return this.http
.get(url, { headers: headers, withCredentials: true })
.toPromise()
.then(res => res.json())
.then(res => {
// the server returns empty text if there is no global trust policy
return res.text() ? res.json(): res
})
.catch(this.handleError);
}

Expand Down
4 changes: 0 additions & 4 deletions src/app/analytics/company-analytics.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
*/

import { Component, OnInit } from '@angular/core';
import { AnalyticsService } from "./analytics.service";
import { TranslateService } from '@ngx-translate/core';

@Component({
selector: 'company-analytics',
Expand All @@ -26,8 +24,6 @@ export class CompanyAnalyticsComponent implements OnInit {


constructor(
private analyticsService: AnalyticsService,
private translate: TranslateService,
) {
}

Expand Down
3 changes: 1 addition & 2 deletions src/app/analytics/company-management.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import { Component, OnInit, Input } from "@angular/core";
import { CompanyManagementTab } from "./model/company-management-tab";
import { TranslateService } from '@ngx-translate/core';

@Component({
selector: "company-management",
Expand All @@ -29,7 +28,7 @@ export class CompanyManagementComponent implements OnInit {

selectedTab: CompanyManagementTab;

constructor(private translate: TranslateService) {
constructor() {
}

ngOnInit(): void {
Expand Down
2 changes: 1 addition & 1 deletion src/app/analytics/members.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h4><span *ngIf="!mgmt_view" [innerHTML]="'Platform Members' | translate"></span
<div class="card-body">
<div class="row">
<div class="align-center col-12 pb-1">
<img src="{{imgEndpoint}}{{result[product_vendor_img]}}" class="thumb" onerror="this.src='assets/empty_img.png';" />
<img src="{{imgEndpoint}}{{result[product_vendor_img]}}" class="thumb" (error)="onImageError($event)"/>
</div>
<div class="col-12 pt-1" [ngClass]="{'pb-1':!mgmt_view,'pb-2 border-bottom':mgmt_view}">
<div class="text-center" style="max-height:1.5rem;overflow:hidden;">
Expand Down
7 changes: 4 additions & 3 deletions src/app/analytics/members.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { CallStatus } from '../common/call-status';
import * as myGlobals from '../globals';
import { sanitizeLink, copy } from '../common/utils';
import { AppComponent } from "../app.component";
import { TranslateService } from '@ngx-translate/core';
import { SimpleSearchService } from "../simple-search/simple-search.service";
import { Search } from "./model/search";
import { debounceTime, distinctUntilChanged, switchMap } from "rxjs/operators";
Expand Down Expand Up @@ -61,8 +60,7 @@ export class MembersComponent implements OnInit {
constructor(
private analyticsService: AnalyticsService,
public appComponent: AppComponent,
private simpleSearchService: SimpleSearchService,
private translate: TranslateService
private simpleSearchService: SimpleSearchService
) {
}

Expand All @@ -76,6 +74,9 @@ export class MembersComponent implements OnInit {
this.getCompanies();
}

onImageError(event){
event.target.src = this.config.emptyImage;
}
getCompanies() {
let rows = this.rows;
if (this.view == "List") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,12 @@ <h6 class="card-subtitle mb-2 text-muted"><span [innerHTML]="'Average collaborat
</div>
</div>
</div>
<div class="col-8">
<div *ngIf="showAverageCollaborationTimeChart" class="col-8">
<div class="row justify-content-center">
<div class="col-9">
<span class="tooltip-icon-with-right-space" (click)="showToolTip(tooltip,'yourAverageCollaborationTimeMonthlyToolTip')"><i
class="fa fa-question-circle"></i></span>
<ngx-charts-line-chart *ngIf="showAverageCollaborationTimeChart" [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimeChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
<ngx-charts-line-chart [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimeChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
[showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="xAxisLabel" [yAxisLabel]="yAxisLabelForAverageCollaborationTimeChart" [showGridLines]="showGridLines"
[autoScale]="autoScale" (select)="onSelect($event)">
</ngx-charts-line-chart>
Expand All @@ -277,12 +277,12 @@ <h6 class="card-subtitle mb-2 text-muted"><span [innerHTML]="'Average collaborat
</div>
</div>
</div>
<div class="col-8">
<div *ngIf="showAverageCollaborationTimePurchaseChart" class="col-8">
<div class="row justify-content-center">
<div class="col-9">
<span class="tooltip-icon-with-right-space" (click)="showToolTip(tooltip,'yourAverageCollaborationTimeMonthlyInPurchaseToolTip')"><i
class="fa fa-question-circle"></i></span>
<ngx-charts-line-chart *ngIf="showAverageCollaborationTimePurchaseChart" [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimePurchaseChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
<ngx-charts-line-chart [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimePurchaseChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
[showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="xAxisLabel" [yAxisLabel]="yAxisLabelForAverageCollaborationTimePurchaseChart" [showGridLines]="showGridLines"
[autoScale]="autoScale" (select)="onSelect($event)">
</ngx-charts-line-chart>
Expand All @@ -305,12 +305,12 @@ <h6 class="card-subtitle mb-2 text-muted"><span [innerHTML]="'Average collaborat
</div>
</div>
</div>
<div class="col-8">
<div *ngIf="showAverageCollaborationTimeSalesChart" class="col-8">
<div class="row justify-content-center">
<div class="col-9">
<span class="tooltip-icon-with-right-space" (click)="showToolTip(tooltip,'yourAverageCollaborationTimeMonthlyInSalesToolTip')"><i
class="fa fa-question-circle"></i></span>
<ngx-charts-line-chart *ngIf="showAverageCollaborationTimeSalesChart" [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimeSalesChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
<ngx-charts-line-chart [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimeSalesChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
[showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="xAxisLabel" [yAxisLabel]="yAxisLabelForAverageCollaborationTimeSalesChart" [showGridLines]="showGridLines"
[autoScale]="autoScale" (select)="onSelect($event)">
</ngx-charts-line-chart>
Expand All @@ -335,12 +335,12 @@ <h6 class="card-subtitle mb-2 text-muted"><span [innerHTML]="'Average response t
</div>
</div>
</div>
<div class="col-8">
<div *ngIf="showAverageResponseChart" class="col-8">
<div class="row justify-content-center">
<div class="col-9">
<span class="tooltip-icon-with-right-space" (click)="showToolTip(tooltip,'yourAverageResponseTimeMonthlyToolTip')"><i
class="fa fa-question-circle"></i></span>
<ngx-charts-line-chart *ngIf="showAverageResponseChart" [view]="view" [scheme]="colorScheme" [results]="multi" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
<ngx-charts-line-chart [view]="view" [scheme]="colorScheme" [results]="multi" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
[showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="xAxisLabel" [yAxisLabel]="yAxisLabelForAverageResponseChart" [showGridLines]="showGridLines"
[autoScale]="autoScale" (select)="onSelect($event)">
</ngx-charts-line-chart>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ export class PerformanceAnalyticsComponent implements OnInit {
this.analyticsService
.getCollabAnalytics(this.comp_id)
.then(res => {
this.callStatusCollab.callback("Successfully loaded collab analytics", true);
// average trade seller
this.trade_green_sell = Math.round(res.tradingVolumesales.approved);
this.trade_yellow_sell = Math.round(res.tradingVolumesales.waiting);
Expand Down Expand Up @@ -435,7 +434,7 @@ export class PerformanceAnalyticsComponent implements OnInit {

}


this.callStatusCollab.callback("Successfully loaded collab analytics", true);
})
.catch(error => {
this.callStatusCollab.error("Error while loading platform analytics", error);
Expand Down
16 changes: 8 additions & 8 deletions src/app/analytics/platform-analytics.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ <h6 class="card-subtitle mb-2 text-muted"><span [innerHTML]="'Average collaborat
</div>
</div>
</div>
<div class="col-8">
<div *ngIf="showAverageCollaborationTimeChart" class="col-8">
<div class="row justify-content-center">
<div class="col-9">
<span class="tooltip-icon-with-right-space" (click)="showToolTip(tooltip,'averageCollaborationTimeMonthlyToolTip')"><i
class="fa fa-question-circle"></i></span>
<ngx-charts-line-chart *ngIf="showAverageCollaborationTimeChart" [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimeChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
<ngx-charts-line-chart [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimeChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
[showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="xAxisLabel" [yAxisLabel]="yAxisLabelForAverageCollaborationTimeChart" [showGridLines]="showGridLines"
[autoScale]="autoScale" (select)="onSelect($event)">
</ngx-charts-line-chart>
Expand All @@ -198,12 +198,12 @@ <h6 class="card-subtitle mb-2 text-muted"><span [innerHTML]="'Average collaborat
</div>
</div>
</div>
<div class="col-8">
<div *ngIf="showAverageCollaborationTimePurchaseChart" class="col-8">
<div class="row justify-content-center">
<div class="col-9">
<span class="tooltip-icon-with-right-space" (click)="showToolTip(tooltip,'averageCollaborationTimeMonthlyInPurchaseToolTip')"><i
class="fa fa-question-circle"></i></span>
<ngx-charts-line-chart *ngIf="showAverageCollaborationTimePurchaseChart" [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimePurchaseChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
<ngx-charts-line-chart [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimePurchaseChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
[showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="xAxisLabel" [yAxisLabel]="yAxisLabelForAverageCollaborationTimePurchaseChart" [showGridLines]="showGridLines"
[autoScale]="autoScale" (select)="onSelect($event)">
</ngx-charts-line-chart>
Expand All @@ -226,12 +226,12 @@ <h6 class="card-subtitle mb-2 text-muted"><span [innerHTML]="'Average collaborat
</div>
</div>
</div>
<div class="col-8">
<div *ngIf="showAverageCollaborationTimeSalesChart" class="col-8">
<div class="row justify-content-center">
<div class="col-9">
<span class="tooltip-icon-with-right-space" (click)="showToolTip(tooltip,'averageCollaborationTimeMonthlyInSalesToolTip')"><i
class="fa fa-question-circle"></i></span>
<ngx-charts-line-chart *ngIf="showAverageCollaborationTimeSalesChart" [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimeSalesChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
<ngx-charts-line-chart [view]="view" [scheme]="colorScheme" [results]="averageCollaborationTimeSalesChartData" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend"
[showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="xAxisLabel" [yAxisLabel]="yAxisLabelForAverageCollaborationTimeSalesChart" [showGridLines]="showGridLines"
[autoScale]="autoScale" (select)="onSelect($event)">
</ngx-charts-line-chart>
Expand All @@ -256,12 +256,12 @@ <h6 class="card-subtitle mb-2 text-muted"><span [innerHTML]="'Average response t
</div>
</div>
</div>
<div class="col-8">
<div *ngIf="showAverageResponseChart" class="col-8">
<div class="row justify-content-center">
<div class="col-9">
<span class="tooltip-icon-with-right-space" (click)="showToolTip(tooltip,'averageResponseTimeMonthlyToolTip')"><i
class="fa fa-question-circle"></i></span>
<ngx-charts-line-chart *ngIf="showAverageResponseChart" [view]="view" [scheme]="colorScheme" [results]="multi" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend" [showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="xAxisLabel" [yAxisLabel]="yAxisLabel" [showGridLines]="showGridLines" [autoScale]="autoScale" (select)="onSelect($event)">
<ngx-charts-line-chart [view]="view" [scheme]="colorScheme" [results]="multi" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [legend]="showLegend" [showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="xAxisLabel" [yAxisLabel]="yAxisLabel" [showGridLines]="showGridLines" [autoScale]="autoScale" (select)="onSelect($event)">
</ngx-charts-line-chart>
</div>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/app/analytics/platform-info.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import {Component, OnInit} from '@angular/core';
import * as myGlobals from '../globals';
import { TranslateService } from '@ngx-translate/core';
import {DEFAULT_LANGUAGE} from '../catalogue/model/constants';

@Component({
Expand All @@ -31,8 +30,7 @@ export class PlatformInfoComponent implements OnInit{

imprint = null;

constructor(private translate: TranslateService,
) {
constructor() {
}

ngOnInit() {
Expand Down
2 changes: 0 additions & 2 deletions src/app/analytics/platform-members.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/

import { Component, OnInit } from "@angular/core";
import { TranslateService } from '@ngx-translate/core';
import { ActivatedRoute } from "@angular/router";

@Component({
Expand All @@ -26,7 +25,6 @@ export class PlatformMembersComponent implements OnInit {
size = 12;

constructor(
private translate: TranslateService,
private route: ActivatedRoute
) {
}
Expand Down
4 changes: 1 addition & 3 deletions src/app/analytics/trust-policy.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import { Component, OnInit } from "@angular/core";
import { AnalyticsService } from "./analytics.service";
import { CallStatus } from "../common/call-status";
import { TranslateService } from '@ngx-translate/core';

@Component({
selector: "trust-policy",
Expand All @@ -30,8 +29,7 @@ export class TrustPolicyComponent implements OnInit {
callStatus: CallStatus = new CallStatus();
saveCallStatus: CallStatus = new CallStatus();

constructor(private analyticsService: AnalyticsService,
private translate: TranslateService) {
constructor(private analyticsService: AnalyticsService) {
}

ngOnInit(): void {
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ <h4 class="modal-title" [innerHTML]="'Help' | translate">Help</h4>
</div>

<div *ngIf="!minimalView" id="footer">
<img src="../assets/images/eu_flag.png" alt=""> <span [innerHTML]="'funding-disclaimer' | translate"></span>
<img src="../assets/images/eu_flag.png" alt=""> <span [innerHTML]="fundingDisclaimer"></span>
<div *ngIf="versions.length > 0">
<small>
<span *ngFor="let version of versions; let i = index" [attr.data-index]="i">
Expand Down
Loading

0 comments on commit db8b97c

Please sign in to comment.