-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Afficher l'évolution des participants sur la page des résul…
- Loading branch information
Showing
19 changed files
with
376 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { CampaignParticipationStatuses } from '../../../../src/prescription/shared/domain/constants.js'; | ||
import { Assessment } from '../../../../src/shared/domain/models/Assessment.js'; | ||
import { PRO_ORGANIZATION_ID } from '../common/constants.js'; | ||
import { CAMPAIGN_PROASSMUL_ID } from './constants.js'; | ||
import { CAMPAIGN_PROASSMUL_ID, CAMPAIGN_PROCOLMUL_ID } from './constants.js'; | ||
|
||
async function _buildMultipleParticipationsForPROASSMULCampaign(databaseBuilder) { | ||
const firstUser = await databaseBuilder.factory.buildUser.withRawPassword({ | ||
|
@@ -201,6 +201,120 @@ async function _buildMultipleParticipationsForPROASSMULCampaign(databaseBuilder) | |
}); | ||
} | ||
|
||
async function _buildMultipleParticipationsForPROCOLMULCampaign(databaseBuilder) { | ||
const firstUser = await databaseBuilder.factory.buildUser.withRawPassword({ | ||
firstName: 'Martin', | ||
lastName: 'Sapin', | ||
email: '[email protected]', | ||
cgu: true, | ||
lang: 'fr', | ||
}); | ||
|
||
const firstOrganizationLearner = await databaseBuilder.factory.buildOrganizationLearner({ | ||
firstName: 'Martin', | ||
lastName: 'Sapin', | ||
userId: firstUser.id, | ||
organizationId: PRO_ORGANIZATION_ID, | ||
}); | ||
|
||
await databaseBuilder.factory.buildCampaignParticipation({ | ||
campaignId: CAMPAIGN_PROCOLMUL_ID, | ||
organizationLearnerId: firstOrganizationLearner.id, | ||
userId: firstUser.id, | ||
pixScore: 20, | ||
isImproved: true, | ||
status: CampaignParticipationStatuses.SHARED, | ||
createdAt: '2023-12-27T15:07:57.376Z', | ||
sharedAt: '2024-01-04T15:07:57.376Z', | ||
}); | ||
|
||
await databaseBuilder.factory.buildCampaignParticipation({ | ||
organizationLearnerId: firstOrganizationLearner.id, | ||
userId: firstUser.id, | ||
campaignId: CAMPAIGN_PROCOLMUL_ID, | ||
pixScore: 50, | ||
isImproved: false, | ||
status: CampaignParticipationStatuses.SHARED, | ||
createdAt: '2024-03-12T15:07:57.376Z', | ||
sharedAt: '2024-03-24T15:07:57.376Z', | ||
}); | ||
|
||
const secondUser = await databaseBuilder.factory.buildUser.withRawPassword({ | ||
firstName: 'José', | ||
lastName: 'Lopez', | ||
email: '[email protected]', | ||
cgu: true, | ||
lang: 'fr', | ||
}); | ||
|
||
const secondOrganizationLearner = await databaseBuilder.factory.buildOrganizationLearner({ | ||
firstName: 'José', | ||
lastName: 'Lopez', | ||
userId: secondUser.id, | ||
organizationId: PRO_ORGANIZATION_ID, | ||
}); | ||
|
||
await databaseBuilder.factory.buildCampaignParticipation({ | ||
campaignId: CAMPAIGN_PROCOLMUL_ID, | ||
organizationLearnerId: secondOrganizationLearner.id, | ||
userId: secondUser.id, | ||
pixScore: 50, | ||
isImproved: true, | ||
status: CampaignParticipationStatuses.SHARED, | ||
createdAt: '2023-12-27T15:07:57.376Z', | ||
sharedAt: '2024-01-04T15:07:57.376Z', | ||
}); | ||
|
||
await databaseBuilder.factory.buildCampaignParticipation({ | ||
organizationLearnerId: secondOrganizationLearner.id, | ||
userId: secondUser.id, | ||
campaignId: CAMPAIGN_PROCOLMUL_ID, | ||
pixScore: 45, | ||
isImproved: false, | ||
status: CampaignParticipationStatuses.SHARED, | ||
createdAt: '2024-03-12T15:07:57.376Z', | ||
sharedAt: '2024-03-24T15:07:57.376Z', | ||
}); | ||
|
||
const thirdUser = await databaseBuilder.factory.buildUser.withRawPassword({ | ||
firstName: 'Pierre', | ||
lastName: 'Quiroule', | ||
email: '[email protected]', | ||
cgu: true, | ||
lang: 'fr', | ||
}); | ||
|
||
const thirdOrganizationLearner = await databaseBuilder.factory.buildOrganizationLearner({ | ||
firstName: 'Pierre', | ||
lastName: 'Quiroule', | ||
userId: thirdUser.id, | ||
organizationId: PRO_ORGANIZATION_ID, | ||
}); | ||
|
||
await databaseBuilder.factory.buildCampaignParticipation({ | ||
campaignId: CAMPAIGN_PROCOLMUL_ID, | ||
organizationLearnerId: thirdOrganizationLearner.id, | ||
userId: thirdUser.id, | ||
pixScore: 20, | ||
isImproved: true, | ||
status: CampaignParticipationStatuses.SHARED, | ||
createdAt: '2023-12-27T15:07:57.376Z', | ||
sharedAt: '2024-01-04T15:07:57.376Z', | ||
}); | ||
|
||
await databaseBuilder.factory.buildCampaignParticipation({ | ||
organizationLearnerId: thirdOrganizationLearner.id, | ||
userId: thirdUser.id, | ||
campaignId: CAMPAIGN_PROCOLMUL_ID, | ||
pixScore: 20, | ||
isImproved: false, | ||
status: CampaignParticipationStatuses.SHARED, | ||
createdAt: '2024-03-12T15:07:57.376Z', | ||
sharedAt: '2024-03-24T15:07:57.376Z', | ||
}); | ||
} | ||
|
||
export async function buildOrganizationLearnersWithMultipleParticipations(databaseBuilder) { | ||
await _buildMultipleParticipationsForPROASSMULCampaign(databaseBuilder); | ||
await _buildMultipleParticipationsForPROCOLMULCampaign(databaseBuilder); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { t } from 'ember-intl'; | ||
|
||
import TooltipWithIcon from '../../ui/tooltip-with-icon'; | ||
|
||
<template> | ||
<span class="evolution-header"> | ||
|
||
{{t "pages.campaign-results.table.column.evolution"}} | ||
|
||
<TooltipWithIcon | ||
@iconName="help" | ||
@content={{@tooltipContent}} | ||
@ariaHiddenIcon={{true}} | ||
class="tooltip-with-icon-small" | ||
/> | ||
</span> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
orga/app/styles/components/campaign/results/assessment-list.scss
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
orga/app/styles/components/campaign/results/evolution-header.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.evolution-header { | ||
display: inline-flex; | ||
gap: var(--pix-spacing-1x); | ||
align-items: center; | ||
} | ||
|
13 changes: 13 additions & 0 deletions
13
orga/app/styles/components/campaign/results/participation-evolution-icon.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.participation-evolution-icon { | ||
&--increase{ | ||
color: var(--pix-success-500); | ||
} | ||
|
||
&--decrease { | ||
color: var(--pix-error-500); | ||
} | ||
|
||
&--stable { | ||
color: var(--pix-warning-500); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,6 @@ | ||
.tooltip-with-icon { | ||
width: fit-content; | ||
.tooltip-with-icon-small { | ||
width: 1rem; | ||
height: 1rem; | ||
|
||
// @TODO: Remove !important when PixTooltip wil be fixed | ||
&__increase{ | ||
width: 1.5rem !important; | ||
height: 1.5rem !important; | ||
fill: var(--pix-success-500) !important; | ||
} | ||
|
||
&__decrease { | ||
width: 1.5rem !important; | ||
height: 1.5rem !important; | ||
fill: var(--pix-error-500) !important; | ||
} | ||
|
||
&__stable { | ||
width: 1.5rem !important; | ||
height: 1.5rem !important; | ||
fill: var(--pix-warning-500) !important; | ||
} | ||
} | ||
|
Oops, something went wrong.