Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MISIS-FRONTEND
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
Numérique et Écologie
MISIS
MISIS-FRONTEND
Commits
23a4d86d
Commit
23a4d86d
authored
3 months ago
by
CANÉVET Cindy
Browse files
Options
Downloads
Patches
Plain Diff
refactor:
Fixes DSFR on notifications
parent
5441b853
Branches
main
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/views/protected/notification/notification.component.ts
+27
-40
27 additions, 40 deletions
...pp/views/protected/notification/notification.component.ts
src/styles.scss
+6
-0
6 additions, 0 deletions
src/styles.scss
with
33 additions
and
40 deletions
src/app/views/protected/notification/notification.component.ts
+
27
−
40
View file @
23a4d86d
...
@@ -21,45 +21,36 @@ import {Notification} from "./notification";
...
@@ -21,45 +21,36 @@ import {Notification} from "./notification";
<h2 class="fr-mb-2w">
<h2 class="fr-mb-2w">
Mes événements
Mes événements
</h2>
</h2>
<div class="fr-grid-row fr-mb-1w">
<a class="fr-link fr-icon-arrow-left-line fr-link--icon-left" routerLink="/accueil">
<div class="fr-mb-1w fr-col-10 fr-col-offset-1">
Revenir à l'accueil
<button type="button" class="fr-btn float-right" (click)="markAllAsRead(notif)">
</a>
<div class="fr-container--fluid fr-mb-12v">
<div class="fr-grid-row fr-grid-row--right fr-mb-12v">
<button type="button" class="fr-btn" (click)="markAllAsRead(notif)">
Tout ignorer
Tout ignorer
</button>
</button>
</div>
</div>
@for (value of notif; track value.id) {
@for (value of notif; track value.id) {
<div class="fr-col-10 fr-col-offset-1">
<div class="fr-grid-row fr-grid-row--gutters fr-grid-row--right fr-mt-3v">
<div class="fr-card fr-card--no-arrow fr-enlarge-link fr-card--sm" (click)="markAsRead(value)">
<div class="fr-col-12 fr-col-md-2">
<div class="fr-card__body">
<p class="fr-badge"
<div class="fr-card__content">
[class.fr-badge--green-emeraude]="value.visible"
<div class="fr-card__desc">
[class.fr-badge--new]="value.visible"
<p>
[class.fr-badge--beige-gris-galet]="!value.visible"
{{ value.message }}
>
</p>
{{ value.createdAt | timeAgo }}
</div>
</p>
<div class="fr-card__end">
<button>
Marqué comme lu
</button>
</div>
</div>
</div>
<div class="fr-card__header fr-card--sm">
<ul class="fr-badges-group">
<li>
<p class="fr-badge"
[class.fr-badge--green-emeraude]="value.visible"
[class.fr-badge--new]="value.visible"
[class.fr-badge--beige-gris-galet]="!value.visible"
>
{{ value.createdAt | timeAgo }}
</p>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="fr-col-8 fr-col-md-7">
{{ value.message }}
</div>
<div class="fr-col-4 fr-col-md-3">
<button type="button" class="fr-btn fr-btn--tertiary misis-btn--end" (click)="markAsRead(value)">
Marquer comme lu
</button>
</div>
</div>
}
}
</div>
</div>
} @else {
} @else {
...
@@ -77,11 +68,7 @@ import {Notification} from "./notification";
...
@@ -77,11 +68,7 @@ import {Notification} from "./notification";
}
}
</div>
</div>
`
,
`
,
styles
:
`
styles
:
``
.float-right {
float: right;
}
`
})
})
export
default
class
NotificationComponent
{
export
default
class
NotificationComponent
{
...
@@ -89,8 +76,8 @@ export default class NotificationComponent {
...
@@ -89,8 +76,8 @@ export default class NotificationComponent {
notifications
=
this
.
notificationService
.
notifications$
;
notifications
=
this
.
notificationService
.
notifications$
;
markAsRead
=
(
notification
:
Notification
)
=>
this
.
notificationService
.
markAsRead
(
notification
).
subscribe
()
markAsRead
=
(
notification
:
Notification
)
=>
this
.
notificationService
.
markAsRead
(
notification
).
subscribe
()
;
markAllAsRead
=
(
notifications
:
Array
<
Notification
>
)
=>
this
.
notificationService
.
markAllAsRead
(
notifications
).
subscribe
()
markAllAsRead
=
(
notifications
:
Array
<
Notification
>
)
=>
this
.
notificationService
.
markAllAsRead
(
notifications
).
subscribe
()
;
}
}
This diff is collapsed.
Click to expand it.
src/styles.scss
+
6
−
0
View file @
23a4d86d
...
@@ -48,4 +48,10 @@ label:has(+ input[required="true"], + select[required="true"])::after {
...
@@ -48,4 +48,10 @@ label:has(+ input[required="true"], + select[required="true"])::after {
.misis-breadcrumb
{
.misis-breadcrumb
{
background-color
:
var
(
--
background-alt-blue-france
);
background-color
:
var
(
--
background-alt-blue-france
);
}
.misis-btn
{
&
--end
{
float
:
right
;
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment