Skip to content

Commit

Permalink
feat(orga): use pix table on organization participant (generic)
Browse files Browse the repository at this point in the history
  • Loading branch information
xav-car committed Feb 28, 2025
1 parent 0c6126b commit 4be01a8
Show file tree
Hide file tree
Showing 9 changed files with 406 additions and 746 deletions.
17 changes: 0 additions & 17 deletions orga/app/components/organization-participant/action-bar.gjs

This file was deleted.

513 changes: 385 additions & 128 deletions orga/app/components/organization-participant/list.gjs

Large diffs are not rendered by default.

111 changes: 0 additions & 111 deletions orga/app/components/organization-participant/table-headers.gjs

This file was deleted.

139 changes: 0 additions & 139 deletions orga/app/components/organization-participant/table-row.gjs

This file was deleted.

2 changes: 1 addition & 1 deletion orga/app/components/ui/is-certifiable.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { eq } from 'ember-truth-helpers';
{{t "pages.sco-organization-participants.table.column.is-certifiable.eligible"}}
</PixTag>
{{else}}
<PixTag @color="yellow-light organization-participant-list-page__tag">
<PixTag @color="yellow-light organization-participant__tag">
{{t "pages.sco-organization-participants.table.column.is-certifiable.non-eligible"}}
</PixTag>
{{/if}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,30 @@ export default class ListController extends Controller {
}

@action
sortByParticipationCount(value) {
this.participationCountOrder = value || null;
sortByParticipationCount() {
if (!this.participationCountOrder) this.participationCountOrder = 'asc';
else this.participationCountOrder = this.participationCountOrder === 'asc' ? 'desc' : 'asc';

this.pageNumber = null;
this.latestParticipationOrder = null;
this.lastnameSort = null;
}

@action
sortByLatestParticipation(value) {
this.latestParticipationOrder = value || null;
sortByLatestParticipation() {
if (!this.latestParticipationOrder) this.latestParticipationOrder = 'asc';
else this.latestParticipationOrder = this.latestParticipationOrder === 'asc' ? 'desc' : 'asc';

this.pageNumber = null;
this.participationCountOrder = null;
this.lastnameSort = null;
}

@action
sortByLastname(value) {
this.lastnameSort = value || null;
sortByLastname() {
if (!this.lastnameSort) this.lastnameSort = 'asc';
else this.lastnameSort = this.lastnameSort === 'asc' ? 'desc' : 'asc';

this.pageNumber = null;
this.participationCountOrder = null;
this.latestParticipationOrder = null;
Expand All @@ -79,10 +85,9 @@ export default class ListController extends Controller {
}

@action
goToLearnerPage(learnerId, event) {
goToLearnerPage(learner) {
if (this.hasOrganizationParticipantPage) {
event.preventDefault();
this.router.transitionTo('authenticated.organization-participants.organization-participant', learnerId);
this.router.transitionTo('authenticated.organization-participants.organization-participant', learner.id);
}
}

Expand Down
1 change: 0 additions & 1 deletion orga/app/styles/components/certificability/tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.certificability-tooltip {
margin-top: auto;
margin-bottom: auto;
padding-left: 6px;
fill: var(--pix-neutral-500);

[role='tooltip'] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,21 @@

$margin-right: 32px;

.organization-participant-list-page {
display: flex;
flex-direction: column;
flex-grow: 1;
width: 100%;

.organization-participant {
&__last-participation {
display: flex;
gap: var(--pix-spacing-2x);
justify-content: center;
}

&__certificability-header {
&__align-element {
display: flex;
gap:var(--pix-spacing-2x);
justify-content: center;
}

&__header-with-tooltip {
display: flex;

.pix-tooltip {
margin-left: 5px;

&__trigger-element {
display: flex;
}
}
}

&__actions-header {
width: 10%;

@include breakpoints.device-is('tablet') {
padding-right: 12px;
padding-left: 0;
text-align: right;
&--column {
flex-direction:column;
align-items: center;
}
}

Expand Down
Loading

0 comments on commit 4be01a8

Please sign in to comment.