Skip to content

Commit

Permalink
[#1951] Added userfeed frontend component
Browse files Browse the repository at this point in the history
  • Loading branch information
jiromaykin committed Dec 19, 2023
1 parent c14479b commit e540ab0
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{% load i18n icon_tags %}

{# if userfeed data is true then show component #}
<section class="userfeed">
<h2 class="h2 {# if userfeed true #}indicator{# endif #}">
{% trans "Aanvragen updates" %}
</h2>
<div class="userfeed__summery">
<ul class="userfeed__list">
<li class="userfeed__list-item">
<p class="userfeed__list-paragraph">
Bij <span>X</span> aanvraag{# if statuses > 1 #}aanvragen{# endif #} is uw actie nodig
</p>
</li>
<li class="userfeed__list-item">
<p class="userfeed__list-paragraph">
Bij <span>X</span> aanvraag{# if statuses > 1 #}aanvragen{# endif #} is de status gewijzigd
</p>
</li>
</ul>
</div>
<div class="card-container card-container--columns-2">
<a href="{{ userfeedbackend }}" class="card {# if action-needed true #}card--status card--status-danger{# endif #}">
<div class="card__body card__body--tabled">
<p class="p tabled__value">Bijzondere bijstand aanvragen</p>
<h2 class="userfeed__heading">
<span class="">Status gewijzigd naar &lsquo;<span class="status">Documenten nodig</span>&rsquo;</span>
</h2>
<span class="button button--icon-before button--transparent button--secondary">
{% icon icon="east" icon_position="after" primary=True outlined=True %}
</span>
</div>
</a>
<a href="{{ userfeedbackend }}" class="card {# if action-needed true #}card--status card--status-info{# endif #}">
<div class="card__body card__body--tabled">
<p class="p tabled__value">Bijzondere bijstand aanvragen</p>
<h2 class="userfeed__heading">
<span class="">Status gewijzigd naar &lsquo;<span class="status">Documenten nodig</span>&rsquo;</span>
</h2>
<span class="button button--icon-before button--transparent button--secondary">
{% icon icon="east" icon_position="after" primary=True outlined=True %}
</span>
</div>
</a>
<a href="{{ userfeedbackend }}" class="card">
<div class="card__body card__body--tabled">
<p class="p tabled__value">Bijzondere bijstand aanvragen</p>
<h2 class="userfeed__heading">
<span class="">Status gewijzigd naar &lsquo;<span class="status">in behandeling</span>&rsquo;</span>
</h2>
<span class="button button--icon-before button--transparent button--secondary">
{% icon icon="east" icon_position="after" primary=True outlined=True %}
</span>
</div>
</a>
</div>
</section>
{# endif - if userfeed data is false then hide component #}
4 changes: 2 additions & 2 deletions src/open_inwoner/scss/components/File/File.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.file {
&__container {
&--recent {
border-left: var(--border-width-thin) solid var(--color-red);
border-left: var(--border-width-thin) solid var(--color-red-notification);
}
}

Expand Down Expand Up @@ -84,7 +84,7 @@
}

&__file--recent {
color: var(--color-red);
color: var(--color-red-notification);
font-size: var(--font-size-body-extra-small);
vertical-align: middle;
}
Expand Down
3 changes: 0 additions & 3 deletions src/open_inwoner/scss/components/Status/_Status.scss

This file was deleted.

18 changes: 18 additions & 0 deletions src/open_inwoner/scss/components/Typography/H2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@
&.cms-plugin {
margin-top: var(--gutter-width);
}

&.indicator {
display: inline-block;
overflow: visible;
position: relative;

&::after {
content: '';
background-color: var(--color-red-notification);
border-radius: 100px;
display: inline-block;
height: 8px;
position: absolute;
right: -12px;
top: 6px;
width: 8px;
}
}
}

///
Expand Down
99 changes: 99 additions & 0 deletions src/open_inwoner/scss/components/UserFeed/UserFeed.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
.userfeed {
position: relative;

&__summery {
background-color: #fff;
color: var(--color-red-notification);
display: block;
position: relative;
overflow: hidden;
z-index: 1002;
}

&__list {
column-gap: var(--spacing-medium);
list-style: none;
display: block;
flex-direction: row;
margin: 0;
padding: 0 0 var(--spacing-large) 0;

@media (min-width: 768px) {
display: flex;
}

&-item {
position: relative;
padding: 0;

&:after {
content: ' ';
position: absolute;
border-right: 1px solid var(--color-red-notification);
right: -4px;
top: 0;
height: 16px;
}

&:first-child {
padding-left: 0;
}

&:last-child {
padding-right: 0;

&:after {
border-right: none;
}
}
}

&-paragraph {
font-size: var(--font-size-body-small);
margin: 0;
padding: 0;
}
}

&__heading {
color: var(--font-color-heading);
font-family: var(--font-family-heading);
font-size: var(--font-size-body);
line-height: var(--font-line-height-body);
padding: var(--spacing-large) 0 0 0;
margin: 0;
}

.card--status {
padding-top: 5px;

&-danger {
background-color: var(--color-danger-lightest);
}

&-info {
background-color: var(--color-info-lighter);
}
}

.card__body {
background-color: #fff;
padding-right: var(--row-height);

.tabled__value {
color: var(--color-gray-dark);
font-size: var(--font-size-body-small);
margin: 0;
padding: 0;
}

span.button:last-child {
bottom: 20px;
}
}
}

/// Contextual
.userfeed + h2 {
margin-top: var(--row-height);
}
6 changes: 3 additions & 3 deletions src/open_inwoner/scss/components/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
@import './Notification/Notification.scss';
@import './Notification/Notifications.scss';
@import './Pagination/Pagination.scss';
@import './Profile/personal-information';
@import './Profile/personal-overview';
@import './Plan/PlanContact.scss';
@import './Plan/PlanCreate.scss';
@import './Plan/PlanEdit.scss';
Expand All @@ -82,7 +84,6 @@
@import './Social/Social.scss';
@import './Spinner/Spinner.scss';
@import './Status/StatusList.scss';
@import './Status/Status.scss';
@import './Step/StepIndicator.scss';
@import './Sticky/Sticky.scss';
@import './Table/Table.scss';
Expand All @@ -98,10 +99,9 @@
@import './Typography/Link.scss';
@import './Typography/LinkList.scss';
@import './Typography/P.scss';
@import './UserFeed/UserFeed.scss';
@import './Video/Video.scss';
@import './modal/modal';
@import './Emoji/Emoji.scss';
@import './Profile/personal-information';
@import './Profile/personal-overview';
@import './Profile/edit.scss';
@import './WarningHeader/WarningHeader.scss';
2 changes: 1 addition & 1 deletion src/open_inwoner/templates/pages/cases/status_inner.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h2 class="h2" id="documents-upload">{% trans "Document toevoegen" %}</h2>

{# Documents. #}
{% if case.documents %}
<h2 class="h2" id="documents">{% trans 'Documenten' %}{% if case.new_docs %}{% icon icon="fiber_manual_record" outlined=False extra_classes="file__file--recent" %}{% endif %}</h2>
<h2 class="h2 {% if case.new_docs %}indicator{% endif %}">{% trans 'Documenten' %}</h2>
{% case_document_list case.documents %}
{% endif %}

Expand Down

0 comments on commit e540ab0

Please sign in to comment.