Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ntorbev committed Sep 24, 2024
1 parent 5e04618 commit 6d7bff6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 23 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"version": "1.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start": "ng serve --configuration local --host 0.0.0.0",
"devspace-start": "ng serve --host 0.0.0.0 --port 4200 --public-host kohesio.local.ec.europa.eu",
"build": "ng build",
"build-dev": "ng build --configuration development --output-hashing=all --no-progress",
"build-prod": "ng build --configuration production --output-hashing=all --no-progress",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"extract-i18n": "ng extract-i18n --output-path src/locale --format json",
"dev:ssr": "ng run kohesio-frontend:serve-ssr:local",
"dev:ssr": "ng run kohesio-frontend:serve-ssr --configuration local --host 0.0.0.0",
"serve:ssr": "pm2-runtime dist/kohesio-frontend/server/proxy-server.js --name ssr.kohesio",
"serve:bff": "pm2-runtime dist/server/main.js --name ssr.kohesio",
"build:ssr": "ng build --configuration local && ng run kohesio-frontend:server:local && cp proxy-server.js dist/kohesio-frontend/server",
Expand All @@ -36,7 +36,7 @@
"@angular/platform-server": "^17.3.11",
"@angular/router": "^17.3.11",
"@angular/ssr": "^17.3.8",
"@ecl/preset-ec": "^4.3.0",
"@ecl/preset-ec": "^4.6.5",
"class-transformer": "^0.5.1",
"cookie-parser": "^1.4.6",
"express": "^4.21.0",
Expand Down
47 changes: 28 additions & 19 deletions src/app/pages/edits/dashboard/edits-dashboard.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<nav class="ecl-breadcrumb ecl-page-header__breadcrumb" aria-label="You&#x20;are&#x20;here&#x3A;"
data-ecl-breadcrumb="true" data-ecl-auto-init="BreadcrumbHarmonised">
data-ecl-breadcrumb="true" data-ecl-auto-init="Breadcrumb">
<ol class="ecl-breadcrumb__container">
<li class="ecl-breadcrumb__segment" data-ecl-breadcrumb-item="expandable">
<a [routerLink]="['/']"
Expand All @@ -19,20 +19,29 @@ <h1 i18n="@@page.edits.dashboard.title">Edits</h1>
</div>
<div class="users-table" *ngIf="editsList">
<div class="ecl-table-responsive">
<table class="ecl-table ecl-table--zebra">
<table class="ecl-table ecl-table--zebra" id="table-id" data-ecl-auto-init="Table" data-ecl-table-sort-label="Sort table">
<thead class="ecl-table__head">
<tr class="ecl-table__row">
<th class="ecl-table__header" i18n="@@page.edit.dashboard.label.project">Project</th>
<th class="ecl-table__header" i18n="@@page.edit.dashboard.label.cci">CCI</th>
<th class="ecl-table__header" i18n="@@page.edit.dashboard.label.latestStatus">Latest Status</th>
<th data-ecl-table-sort-toggle aria-sort="ascending" class="ecl-table__header">
<th id="table-id-header-status" class="ecl-table__header" scope="col" data-ecl-table-sort-toggle>
Latest Status
<!-- <ng-container i18n="@@page.edit.dashboard.label.latestStatus">Latest Status</ng-container>-->
<!-- <button class="ecl-table__arrow">-->
<!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" focusable="false" aria-hidden="true" class="ecl-table__icon ecl-icon ecl-icon&#45;&#45;l ecl-table__icon-up">-->
<!-- <path d="m32 30.5-8-13-8 13h16Z" fill-rule="evenodd"></path></svg>-->
<!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" focusable="false" aria-hidden="true" class="ecl-table__icon ecl-icon ecl-icon&#45;&#45;l ecl-table__icon-down">-->
<!-- <path d="m32 30.5-8-13-8 13h16Z" fill-rule="evenodd"></path></svg>-->
<!-- </button>-->
</th>
<th id="table-id-header-created" data-ecl-table-sort-toggle class="ecl-table__header">
<ng-container i18n="@@page.edit.dashboard.label.created">Created</ng-container>
<button class="ecl-table__arrow">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" focusable="false" aria-hidden="true" class="ecl-table__icon ecl-icon ecl-icon--l ecl-table__icon-up">
<path d="m32 30.5-8-13-8 13h16Z" fill-rule="evenodd"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" focusable="false" aria-hidden="true" class="ecl-table__icon ecl-icon ecl-icon--l ecl-table__icon-down">
<path d="m32 30.5-8-13-8 13h16Z" fill-rule="evenodd"></path></svg>
</button>
<!-- <button class="ecl-table__arrow">-->
<!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" focusable="false" aria-hidden="true" class="ecl-table__icon ecl-icon ecl-icon&#45;&#45;l ecl-table__icon-up">-->
<!-- <path d="m32 30.5-8-13-8 13h16Z" fill-rule="evenodd"></path></svg>-->
<!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" focusable="false" aria-hidden="true" class="ecl-table__icon ecl-icon ecl-icon&#45;&#45;l ecl-table__icon-down">-->
<!-- <path d="m32 30.5-8-13-8 13h16Z" fill-rule="evenodd"></path></svg>-->
<!-- </button>-->
</th>
<th class="ecl-table__header" i18n="@@page.edit.dashboard.label.history">History</th>
</tr>
Expand All @@ -58,10 +67,10 @@ <h1 i18n="@@page.edits.dashboard.title">Edits</h1>
<td class="ecl-table__cell" data-ecl-table-header="CCI" style="max-width: 200px;">
<button type="button" class="ecl-tag ecl-tag--removable" style="white-space: normal;text-align: center;font-size: 12px;">{{edit.cci_label}}</button>
</td>
<td class="ecl-table__cell" data-ecl-table-header="Latest Status">
<td class="ecl-table__cell" data-ecl-table-header="Latest Status" headers="table-id-header-status" >
<div class="ecl-tag" style="text-decoration: none;">{{translateService.editManagement.status?.[edit.latest_status.toLowerCase()]}}</div>
</td>
<td class="ecl-table__cell" data-ecl-table-header="Created" style="font-size: 14px;">
<td class="ecl-table__cell" data-ecl-table-header="Created" headers="table-id-header-created" style="font-size: 14px;">
{{edit.creation_time?.toLocaleString()}}
</td>
<td class="ecl-table__cell action" data-ecl-table-header="History">
Expand All @@ -74,14 +83,14 @@ <h1 i18n="@@page.edits.dashboard.title">Edits</h1>
<table class="ecl-table ecl-table--zebra">
<thead class="ecl-table__head">
<tr class="ecl-table__row">
<th class="ecl-table__header" data-ecl-table-sort-toggle aria-sort="ascending">
<th class="ecl-table__header" data-ecl-table-sort-toggle >
<ng-container i18n="@@page.edit.dashboard.label.historyCreated">Created</ng-container>
<button class="ecl-table__arrow">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" focusable="false" aria-hidden="true" class="ecl-table__icon ecl-icon ecl-icon--l ecl-table__icon-up">
<path d="m32 30.5-8-13-8 13h16Z" fill-rule="evenodd"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" focusable="false" aria-hidden="true" class="ecl-table__icon ecl-icon ecl-icon--l ecl-table__icon-down">
<path d="m32 30.5-8-13-8 13h16Z" fill-rule="evenodd"></path></svg>
</button>
<!-- <button class="ecl-table__arrow">-->
<!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" focusable="false" aria-hidden="true" class="ecl-table__icon ecl-icon ecl-icon&#45;&#45;l ecl-table__icon-up">-->
<!-- <path d="m32 30.5-8-13-8 13h16Z" fill-rule="evenodd"></path></svg>-->
<!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" focusable="false" aria-hidden="true" class="ecl-table__icon ecl-icon ecl-icon&#45;&#45;l ecl-table__icon-down">-->
<!-- <path d="m32 30.5-8-13-8 13h16Z" fill-rule="evenodd"></path></svg>-->
<!-- </button>-->
</th>
<th class="ecl-table__header" i18n="@@page.edit.dashboard.label.historyStatus">Status</th>
<th class="ecl-table__header" i18n="@@page.edit.dashboard.label.historyComment">Comment</th>
Expand Down
9 changes: 8 additions & 1 deletion src/app/pages/edits/dashboard/edits-dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {FilterService} from "../../../services/filter.service";
import {ProjectService} from "../../../services/project.service";
import {MatPaginator} from "@angular/material/paginator";
import {TranslateService} from "../../../services/translate.service";

declare const ECL: any;
@Component({
templateUrl: './edits-dashboard.component.html',
styleUrls: ['./edits-dashboard.component.scss']
Expand Down Expand Up @@ -49,6 +49,12 @@ export class EditsDashboardComponent implements AfterViewInit {
ngAfterViewInit(): void {
}

initializeECLTable() {
if (ECL?.autoInit) {
ECL.autoInit();
}
}

getEditsList(){
this.isLoading = true;
this.editsList = [];
Expand All @@ -68,6 +74,7 @@ export class EditsDashboardComponent implements AfterViewInit {
this.editsList = editData.data;
this.editCount = editData.count;
this.isLoading = false;
setTimeout(() => this.initializeECLTable(), 0);
})
}else{
this.isLoading = false;
Expand Down

0 comments on commit 6d7bff6

Please sign in to comment.