Skip to content

Commit 2d8bdaf

Browse files
[TECH] Appliquer le nouveau nommage des composants sur Pix Admin (PIX-14606)
#10684
2 parents 7a83571 + eeeed86 commit 2d8bdaf

File tree

21 files changed

+79
-71
lines changed

21 files changed

+79
-71
lines changed

admin/app/components/administration/certification/sco-whitelist-configuration.gjs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PixButton from '@1024pix/pix-ui/components/pix-button';
22
import PixButtonUpload from '@1024pix/pix-ui/components/pix-button-upload';
3-
import PixMessage from '@1024pix/pix-ui/components/pix-message';
3+
import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
44
import { action } from '@ember/object';
55
import { service } from '@ember/service';
66
import Component from '@glimmer/component';
@@ -74,7 +74,9 @@ export default class ScoWhitelistConfiguration extends Component {
7474
@title={{t "pages.administration.certification.sco-whitelist.title"}}
7575
class="sco-whitelist-configuration"
7676
>
77-
<PixMessage @type="info">{{t "pages.administration.certification.sco-whitelist.instructions"}}</PixMessage>
77+
<PixNotificationAlert @type="info">{{t
78+
"pages.administration.certification.sco-whitelist.instructions"
79+
}}</PixNotificationAlert>
7880

7981
<div class="sco-whitelist-configuration__actions">
8082
<PixButton @triggerAction={{this.exportWhitelist}} @isLoading={{this.isExportLoading}}>

admin/app/components/administration/certification/scoring-simulator.gjs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import PixBlock from '@1024pix/pix-ui/components/pix-block';
22
import PixButton from '@1024pix/pix-ui/components/pix-button';
33
import PixInput from '@1024pix/pix-ui/components/pix-input';
4-
import PixMessage from '@1024pix/pix-ui/components/pix-message';
4+
import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
55
import { on } from '@ember/modifier';
66
import { action } from '@ember/object';
77
import { service } from '@ember/service';
@@ -95,7 +95,10 @@ export default class ScoringSimulator extends Component {
9595
</form>
9696

9797
{{#each this.errors as |error|}}
98-
<PixMessage class="scoring-simulator-form__error-message" @type="error">{{error}}</PixMessage>
98+
<PixNotificationAlert
99+
class="scoring-simulator-form__error-message"
100+
@type="error"
101+
>{{error}}</PixNotificationAlert>
99102
{{/each}}
100103

101104
<dl class="scoring-simulator__data">

admin/app/components/administration/common/learning-content.gjs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import PixButton from '@1024pix/pix-ui/components/pix-button';
2-
import PixMessage from '@1024pix/pix-ui/components/pix-message';
2+
import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
33
import { action } from '@ember/object';
44
import { service } from '@ember/service';
55
import Component from '@glimmer/component';
@@ -41,20 +41,20 @@ export default class LearningContent extends Component {
4141
<p>Une version du référentiel de données pédagogique est créée quotidiennement (vers 4h00) et le référentiel
4242
utilisé par l'application est mis à jour (vers 6h00).</p>
4343
<p>Si le cache a été vidé, il peut s’avérer utile ou nécessaire de recharger le référentiel.</p>
44-
<PixMessage @type="alert" @withIcon={{true}}>
44+
<PixNotificationAlert @type="alert" @withIcon={{true}}>
4545
<strong>Attention !</strong>
4646
Le rechargement du référentiel est une opération risquée. Il est recommandé de ne l’effectuer qu’en cas de
4747
force majeure, accompagné d’un développeur ou d'une développeuse.
48-
</PixMessage>
49-
<PixMessage @type="info">Durée de l’opération : <strong>≈10s</strong>.</PixMessage>
48+
</PixNotificationAlert>
49+
<PixNotificationAlert @type="info">Durée de l’opération : <strong>≈10s</strong>.</PixNotificationAlert>
5050

5151
<PixButton class="btn-refresh-cache" @triggerAction={{this.refreshLearningContent}} @iconBefore="reload">
5252
Recharger le cache
5353
</PixButton>
5454
<br /><br />
5555
<p>Si quelque chose a été changé dans le référentiel et qu'il faut appliquer ces changements dans l'application,
5656
il faut créer une nouvelle version et mettre à jour le cache.</p>
57-
<PixMessage @type="info">Durée de l’opération : <strong>≈1mn</strong>.</PixMessage>
57+
<PixNotificationAlert @type="info">Durée de l’opération : <strong>≈1mn</strong>.</PixNotificationAlert>
5858
<PixButton
5959
@triggerAction={{this.createLearningContentReleaseAndRefreshCache}}
6060
@variant="primary-bis"

admin/app/components/campaigns/update.gjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import PixBanner from '@1024pix/pix-ui/components/pix-banner';
1+
import PixBannerAlert from '@1024pix/pix-ui/components/pix-banner-alert';
22
import PixButton from '@1024pix/pix-ui/components/pix-button';
33
import PixCheckbox from '@1024pix/pix-ui/components/pix-checkbox';
44
import PixInput from '@1024pix/pix-ui/components/pix-input';
@@ -263,7 +263,7 @@ export default class Update extends Component {
263263
</PixFieldset>
264264

265265
{{#if this.displayIsForAbsoluteNoviceWarning}}
266-
<PixBanner @type="warning">
266+
<PixBannerAlert @type="warning">
267267
<div class="is-for-absolute-novice-warning">
268268
<p>Les campagnes
269269
<strong><i>isForAbsoluteNovice</i></strong>
@@ -275,7 +275,7 @@ export default class Update extends Component {
275275
<li>Envoi de résultats</li>
276276
</ul>
277277
</div>
278-
</PixBanner>
278+
</PixBannerAlert>
279279
{{/if}}
280280
{{/if}}
281281
</div>

admin/app/components/common/tubes-details/area.gjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import PixCollapsible from '@1024pix/pix-ui/components/pix-collapsible';
1+
import PixAccordions from '@1024pix/pix-ui/components/pix-accordions';
22

33
import Competence from '../tubes-details/competence';
44

55
<template>
66
<div class="area-border-container">
77
<div class="area-border {{@color}}"></div>
8-
<PixCollapsible class="{{@color}} list-competences">
8+
<PixAccordions class="{{@color}} list-competences">
99
<:title>{{@title}}</:title>
1010
<:content>
1111
{{#each @competences as |competence|}}
@@ -17,6 +17,6 @@ import Competence from '../tubes-details/competence';
1717
/>
1818
{{/each}}
1919
</:content>
20-
</PixCollapsible>
20+
</PixAccordions>
2121
</div>
2222
</template>

admin/app/components/common/tubes-details/competence.gjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import PixCollapsible from '@1024pix/pix-ui/components/pix-collapsible';
1+
import PixAccordions from '@1024pix/pix-ui/components/pix-accordions';
22
import { eq } from 'ember-truth-helpers';
33

44
import Header from '../../table/header';
@@ -7,7 +7,7 @@ import Tube from '../tubes-details/tube';
77

88
<template>
99
<div class="competence-container">
10-
<PixCollapsible>
10+
<PixAccordions>
1111
<:title>{{@title}}</:title>
1212
<:content>
1313
<div class="panel">
@@ -56,6 +56,6 @@ import Tube from '../tubes-details/tube';
5656
</table>
5757
</div>
5858
</:content>
59-
</PixCollapsible>
59+
</PixAccordions>
6060
</div>
6161
</template>

admin/app/components/common/tubes-selection/areas.gjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import PixCollapsible from '@1024pix/pix-ui/components/pix-collapsible';
1+
import PixAccordions from '@1024pix/pix-ui/components/pix-accordions';
22

33
import Competence from './competence';
44

55
<template>
66
{{#each @areas as |area|}}
77
<div class="area-border-container">
88
<div class="area-border {{area.color}}"></div>
9-
<PixCollapsible class="{{area.color}} list-competences">
9+
<PixAccordions class="{{area.color}} list-competences">
1010
<:title>{{area.code}} · {{area.title}}</:title>
1111
<:content>
1212
{{#each area.sortedCompetences as |competence|}}
@@ -22,7 +22,7 @@ import Competence from './competence';
2222
/>
2323
{{/each}}
2424
</:content>
25-
</PixCollapsible>
25+
</PixAccordions>
2626
</div>
2727
{{/each}}
2828
</template>

admin/app/components/common/tubes-selection/competence.gjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import PixAccordions from '@1024pix/pix-ui/components/pix-accordions';
12
import PixCheckbox from '@1024pix/pix-ui/components/pix-checkbox';
2-
import PixCollapsible from '@1024pix/pix-ui/components/pix-collapsible';
33
import { on } from '@ember/modifier';
44
import { action } from '@ember/object';
55
import Component from '@glimmer/component';
@@ -47,7 +47,7 @@ export default class Competence extends Component {
4747

4848
<template>
4949
<div class="competence-container">
50-
<PixCollapsible>
50+
<PixAccordions>
5151
<:title>{{@competence.index}} {{@competence.name}}</:title>
5252
<:content>
5353
<div class="panel">
@@ -110,7 +110,7 @@ export default class Competence extends Component {
110110
</table>
111111
</div>
112112
</:content>
113-
</PixCollapsible>
113+
</PixAccordions>
114114
</div>
115115
</template>
116116
}

admin/app/components/complementary-certifications/attach-badges/badges/list.gjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import PixMessage from '@1024pix/pix-ui/components/pix-message';
1+
import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
22
import { action } from '@ember/object';
33
import Component from '@glimmer/component';
44
import { t } from 'ember-intl';
@@ -19,14 +19,14 @@ export default class List extends Component {
1919
<template>
2020
<div class="complementary-certification-attach-badges">
2121
{{#if @error}}
22-
<PixMessage
22+
<PixNotificationAlert
2323
role="alert"
2424
@type="error"
2525
@withIcon={{true}}
2626
class="complementary-certification-attach-badges__error"
2727
>
2828
{{@error}}
29-
</PixMessage>
29+
</PixNotificationAlert>
3030
{{/if}}
3131

3232
<section class="complementary-certification-attach-badges__section">

admin/app/components/complementary-certifications/target-profiles/information.gjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import PixButtonLink from '@1024pix/pix-ui/components/pix-button-link';
2-
import PixToggle from '@1024pix/pix-ui/components/pix-toggle';
2+
import PixToggleButton from '@1024pix/pix-ui/components/pix-toggle-button';
33
import { service } from '@ember/service';
44
import Component from '@glimmer/component';
55

@@ -26,11 +26,11 @@ export default class Information extends Component {
2626
<LinkToCurrentTargetProfile @model={{@currentTargetProfile}} />
2727
{{/if}}
2828
{{#if this.isMultipleCurrentTargetProfiles}}
29-
<PixToggle @toggled={{@switchToggle}} @onChange={{@switchTargetProfile}} @screenReaderOnly={{true}}>
29+
<PixToggleButton @toggled={{@switchToggle}} @onChange={{@switchTargetProfile}} @screenReaderOnly={{true}}>
3030
<:label>Accéder aux détails des profils cibles courants</:label>
3131
<:on>Profil 1</:on>
3232
<:off>Profil 2</:off>
33-
</PixToggle>
33+
</PixToggleButton>
3434
{{/if}}
3535
{{#if this.hasAccessToAttachNewTargetProfile}}
3636
<div class="complementary-certification-details-target-profile__attach-button">

admin/app/components/login-form.gjs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PixButton from '@1024pix/pix-ui/components/pix-button';
22
import PixInput from '@1024pix/pix-ui/components/pix-input';
3-
import PixMessage from '@1024pix/pix-ui/components/pix-message';
3+
import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
44
import { on } from '@ember/modifier';
55
import { action } from '@ember/object';
66
import { LinkTo } from '@ember/routing';
@@ -94,22 +94,22 @@ export default class LoginForm extends Component {
9494
</LinkTo>
9595

9696
{{#if @userShouldCreateAnAccount}}
97-
<PixMessage @type="alert">
97+
<PixNotificationAlert @type="alert">
9898
Vous n'avez pas de compte Pix.
99-
</PixMessage>
99+
</PixNotificationAlert>
100100
{{/if}}
101101

102102
{{#if @unknownErrorHasOccured}}
103-
<PixMessage @type="alert">
103+
<PixNotificationAlert @type="alert">
104104
Une erreur est survenue. Veuillez recommencer ou contacter les administrateurs de la plateforme.
105-
</PixMessage>
105+
</PixNotificationAlert>
106106
{{/if}}
107107

108108
{{#if @userShouldRequestAccess}}
109-
<PixMessage @type="alert">
109+
<PixNotificationAlert @type="alert">
110110
Vous n'avez pas les droits pour vous connecter. Veuillez demander un accès aux administrateurs de la
111111
plateforme.
112-
</PixMessage>
112+
</PixNotificationAlert>
113113
{{/if}}
114114
{{else}}
115115
<PixInput

admin/app/components/organizations/information-section-view.gjs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PixButton from '@1024pix/pix-ui/components/pix-button';
22
import PixButtonLink from '@1024pix/pix-ui/components/pix-button-link';
3-
import PixMessage from '@1024pix/pix-ui/components/pix-message';
3+
import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
44
import PixTag from '@1024pix/pix-ui/components/pix-tag';
55
import { LinkTo } from '@ember/routing';
66
import { service } from '@ember/service';
@@ -72,9 +72,9 @@ export default class OrganizationInformationSection extends Component {
7272
{{/each}}
7373
</ul>
7474
{{else}}
75-
<PixMessage class="organization-information-section__missing-tags-message" @type="information">Cette
75+
<PixNotificationAlert class="organization-information-section__missing-tags-message" @type="information">Cette
7676
organisation n'a pas de tags.
77-
</PixMessage>
77+
</PixNotificationAlert>
7878
{{/if}}
7979
<div class="organization__network-label">
8080
{{#if this.hasOrganizationChildren}}
@@ -100,12 +100,12 @@ export default class OrganizationInformationSection extends Component {
100100
{{/if}}
101101
</div>
102102
{{#if @organization.isArchived}}
103-
<PixMessage class="organization-information-section__archived-message" @type="warning">
103+
<PixNotificationAlert class="organization-information-section__archived-message" @type="warning">
104104
Archivée le
105105
{{@organization.archivedFormattedDate}}
106106
par
107107
{{@organization.archivistFullName}}.
108-
</PixMessage>
108+
</PixNotificationAlert>
109109
{{/if}}
110110

111111
<div class="organization-information-section__content">

admin/app/components/target-profiles/badge-form/criteria.gjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import PixButton from '@1024pix/pix-ui/components/pix-button';
22
import PixCheckbox from '@1024pix/pix-ui/components/pix-checkbox';
3-
import PixMessage from '@1024pix/pix-ui/components/pix-message';
3+
import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
44
import { fn } from '@ember/helper';
55
import { concat } from '@ember/helper';
66
import { on } from '@ember/modifier';
@@ -68,13 +68,13 @@ export default class Criteria extends Component {
6868

6969
<template>
7070
<Card @title="Critères d'obtention du résultat thématique">
71-
<PixMessage @type="info" @withIcon={{true}}>
71+
<PixNotificationAlert @type="info" @withIcon={{true}}>
7272
Vous pouvez définir des critères de réussite du résultat thématique
7373
<strong>sur une liste de sujets ET/OU sur l’ensemble du profil cible</strong>.
7474
<br />
7575
<strong>Toutes les conditions devront être remplies</strong>
7676
pour obtenir le résultat thématique.
77-
</PixMessage>
77+
</PixNotificationAlert>
7878
<div class="badge-form-criteria-choice">
7979
<p>Définir un critère d'obtention&nbsp;:</p>
8080
<PixCheckbox

admin/app/components/target-profiles/edit-target-profile-form.gjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import PixButton from '@1024pix/pix-ui/components/pix-button';
22
import PixCheckbox from '@1024pix/pix-ui/components/pix-checkbox';
33
import PixInput from '@1024pix/pix-ui/components/pix-input';
4-
import PixMessage from '@1024pix/pix-ui/components/pix-message';
4+
import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
55
import PixSelect from '@1024pix/pix-ui/components/pix-select';
66
import PixTextarea from '@1024pix/pix-ui/components/pix-textarea';
77
import { fn } from '@ember/helper';
@@ -115,9 +115,9 @@ export default class CreateTargetProfileForm extends Component {
115115
</Card>
116116

117117
{{#if @targetProfile.hasLinkedCampaign}}
118-
<PixMessage @withIcon={{true}}>
118+
<PixNotificationAlert @withIcon={{true}}>
119119
Le référentiel n'est pas modifiable car le profil cible est déjà relié à une campagne.
120-
</PixMessage>
120+
</PixNotificationAlert>
121121
{{else}}
122122
<TubesSelection
123123
@frameworks={{@frameworks}}

admin/app/components/target-profiles/insights.gjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import PixBanner from '@1024pix/pix-ui/components/pix-banner';
1+
import PixBannerAlert from '@1024pix/pix-ui/components/pix-banner-alert';
22
import PixButtonLink from '@1024pix/pix-ui/components/pix-button-link';
33

44
import Badges from './badges';
@@ -25,7 +25,7 @@ import Stages from './stages';
2525
<h2 class="insights-section__title">Paliers</h2>
2626

2727
{{#if @targetProfile.hasLinkedCampaign}}
28-
<PixBanner
28+
<PixBannerAlert
2929
@type={{this.type}}
3030
@actionLabel={{this.actionLabel}}
3131
@actionUrl={{this.actionUrl}}
@@ -37,7 +37,7 @@ import Stages from './stages';
3737
<li>supprimer un palier existant</li>
3838
<li>modifier les seuils ou niveaux des paliers existants</li>
3939
</ul>
40-
</PixBanner>
40+
</PixBannerAlert>
4141
{{/if}}
4242

4343
<Stages

admin/app/components/users/user-overview.gjs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import PixButton from '@1024pix/pix-ui/components/pix-button';
22
import PixButtonLink from '@1024pix/pix-ui/components/pix-button-link';
33
import PixInput from '@1024pix/pix-ui/components/pix-input';
4-
import PixMessage from '@1024pix/pix-ui/components/pix-message';
4+
import PixNotificationAlert from '@1024pix/pix-ui/components/pix-notification-alert';
55
import PixSelect from '@1024pix/pix-ui/components/pix-select';
66
import PixTooltip from '@1024pix/pix-ui/components/pix-tooltip';
77
import { fn } from '@ember/helper';
@@ -275,9 +275,12 @@ export default class UserOverview extends Component {
275275
{{else}}
276276
<div>
277277
{{#if @user.hasBeenAnonymised}}
278-
<PixMessage @type="warning" class="user-detail-personal-information-section__anonymisation-message">
278+
<PixNotificationAlert
279+
@type="warning"
280+
class="user-detail-personal-information-section__anonymisation-message"
281+
>
279282
{{this.anonymisationMessage}}
280-
</PixMessage>
283+
</PixNotificationAlert>
281284
{{/if}}
282285
</div>
283286
<div class="user-detail-personal-information-section__content">

0 commit comments

Comments
 (0)