diff --git a/src/open_inwoner/accounts/tests/test_profile_views.py b/src/open_inwoner/accounts/tests/test_profile_views.py index e612c688c6..bb916771d1 100644 --- a/src/open_inwoner/accounts/tests/test_profile_views.py +++ b/src/open_inwoner/accounts/tests/test_profile_views.py @@ -1173,7 +1173,9 @@ def setUp(self): name="Hoofdkantoor", timeZone="Europe/Amsterdam", addressCity="Amsterdam", + addressLine1="Hoofdkantoor", addressLine2="Dam 1", + addressZip="1234 ZZ", ), ) self.appointment_idcard = AppointmentFactory.build( @@ -1184,7 +1186,9 @@ def setUp(self): name="Hoofdkantoor", timeZone="America/New_York", addressCity="New York", + addressLine1="Hoofdkantoor", addressLine2="Wall Street 1", + addressZip="1111 AA", ), ) @@ -1252,13 +1256,11 @@ def test_render_list_if_appointments_are_found(self, m): passport_appointment = PQ(cards[0]).find("ul").children() self.assertEqual(passport_appointment[0].text, "Aanvraag paspoort") - self.assertEqual( - PQ(passport_appointment[1]).text(), "woensdag 1 januari 2020 13:00" - ) - self.assertEqual(PQ(passport_appointment[2]).text(), "foo") + self.assertEqual(PQ(passport_appointment[1]).text(), "Datum\n1 januari 2020") + self.assertEqual(PQ(passport_appointment[2]).text(), "Tijd\n13:00 uur") self.assertEqual(PQ(passport_appointment[3]).text(), "Locatie\nHoofdkantoor") - self.assertEqual(PQ(passport_appointment[4]).text(), "Amsterdam") - self.assertEqual(PQ(passport_appointment[5]).text(), "Dam 1") + self.assertEqual(PQ(passport_appointment[4]).text(), "Dam 1") + self.assertEqual(PQ(passport_appointment[5]).text(), "1234 ZZ Amsterdam") self.assertEqual( PQ(cards[0]).find("a").attr("href"), f"{self.config.booking_base_url}{self.appointment_passport.publicId}", @@ -1267,13 +1269,11 @@ def test_render_list_if_appointments_are_found(self, m): id_card_appointment = PQ(cards[1]).find("ul").children() self.assertEqual(id_card_appointment[0].text, "Aanvraag ID kaart") - self.assertEqual( - PQ(id_card_appointment[1]).text(), "vrijdag 6 maart 2020 11:30" - ) - self.assertEqual(PQ(id_card_appointment[2]).text(), "bar") + self.assertEqual(PQ(id_card_appointment[1]).text(), "Datum\n6 maart 2020") + self.assertEqual(PQ(id_card_appointment[2]).text(), "Tijd\n11:30 uur") self.assertEqual(PQ(id_card_appointment[3]).text(), "Locatie\nHoofdkantoor") - self.assertEqual(PQ(id_card_appointment[4]).text(), "New York") - self.assertEqual(PQ(id_card_appointment[5]).text(), "Wall Street 1") + self.assertEqual(PQ(id_card_appointment[4]).text(), "Wall Street 1") + self.assertEqual(PQ(id_card_appointment[5]).text(), "1111 AA New York") self.assertEqual( PQ(cards[1]).find("a").attr("href"), f"{self.config.booking_base_url}{self.appointment_idcard.publicId}", diff --git a/src/open_inwoner/components/templates/components/List/ListItem.html b/src/open_inwoner/components/templates/components/List/ListItem.html index 39e56aff8c..419a8dac67 100644 --- a/src/open_inwoner/components/templates/components/List/ListItem.html +++ b/src/open_inwoner/components/templates/components/List/ListItem.html @@ -1,5 +1,5 @@ {% load link_tags %} -
  • +
  • {% if href %}{% endif %} {% if caption %}

    {{ caption }}

    {% endif %} {% if strong %} diff --git a/src/open_inwoner/scss/components/Card/CardGrid.scss b/src/open_inwoner/scss/components/Card/CardGrid.scss new file mode 100644 index 0000000000..6c26e5e1a9 --- /dev/null +++ b/src/open_inwoner/scss/components/Card/CardGrid.scss @@ -0,0 +1,22 @@ +.card__grid { + & .grid { + grid-row-gap: var(--spacing-medium); + grid-column-gap: var(--spacing-extra-large); + + // Tablets + @media (min-width: 500px) and (max-width: 767px) { + flex-direction: row; + flex-wrap: wrap; + + .column { + flex-basis: calc(50% - var(--spacing-large)); + } + } + + .column--start-4 { + @media (min-width: 768px) and (max-width: 900px) { + grid-column-start: 1; + } + } + } +} diff --git a/src/open_inwoner/scss/components/Cases/Cases.scss b/src/open_inwoner/scss/components/Cases/Cases.scss index 119fd3a4f3..29d3efbe6f 100644 --- a/src/open_inwoner/scss/components/Cases/Cases.scss +++ b/src/open_inwoner/scss/components/Cases/Cases.scss @@ -1,27 +1,6 @@ .cases { margin-top: var(--spacing-giant); - &__grid .grid { - grid-row-gap: var(--spacing-medium); - grid-column-gap: var(--spacing-extra-large); - - // Tablets - @media (min-width: 500px) and (max-width: 767px) { - flex-direction: row; - flex-wrap: wrap; - - .column { - flex-basis: calc(50% - var(--spacing-large)); - } - } - - .column--start-4 { - @media (min-width: 768px) and (max-width: 900px) { - grid-column-start: 1; - } - } - } - /// cards on cases list .card { .cases__link { diff --git a/src/open_inwoner/scss/components/List/_ListItem.scss b/src/open_inwoner/scss/components/List/_ListItem.scss index ab7959d343..edcf644c36 100644 --- a/src/open_inwoner/scss/components/List/_ListItem.scss +++ b/src/open_inwoner/scss/components/List/_ListItem.scss @@ -16,6 +16,16 @@ padding: 0.5em 0; } + &--extra-compact { + border-top: none; + border-bottom: none; + padding: 0; + } + + & .list-item__caption { + line-height: var(--font-line-height-body-small); + } + &--compact:first-child { padding-top: 0; } diff --git a/src/open_inwoner/scss/components/_index.scss b/src/open_inwoner/scss/components/_index.scss index 4339827b56..12ac209d91 100644 --- a/src/open_inwoner/scss/components/_index.scss +++ b/src/open_inwoner/scss/components/_index.scss @@ -4,6 +4,7 @@ @import './Button/Button.scss'; @import './Button/ButtonRow.scss'; @import './Card/Card.scss'; +@import './Card/CardGrid.scss'; @import './Card/LocationCardList.scss'; @import './CardContainer/CardContainer.scss'; @import './Cases/Cases.scss'; diff --git a/src/open_inwoner/templates/pages/cases/list_inner.html b/src/open_inwoner/templates/pages/cases/list_inner.html index a66a46dee2..cbc9554e9a 100644 --- a/src/open_inwoner/templates/pages/cases/list_inner.html +++ b/src/open_inwoner/templates/pages/cases/list_inner.html @@ -3,7 +3,7 @@

    {{ page_title }} ({{ paginator.count }})

    {{ title_text }}

    -
    +
    {% render_grid %} {% if not cases %} {% trans "U heeft op dit moment nog geen lopende aanvragen." %} diff --git a/src/open_inwoner/templates/pages/profile/appointments.html b/src/open_inwoner/templates/pages/profile/appointments.html index 4660ef9142..430db42f31 100644 --- a/src/open_inwoner/templates/pages/profile/appointments.html +++ b/src/open_inwoner/templates/pages/profile/appointments.html @@ -1,27 +1,30 @@ {% extends 'master.html' %} -{% load i18n tz form_tags anchor_menu_tags list_tags icon_tags grid_tags utils %} +{% load i18n tz list_tags icon_tags grid_tags utils %} {% block content %} -

    {% trans "Mijn afspraken" %}

    +

    {% trans "Mijn balie-afspraken" %}

    {% if appointments %}

    {% trans "Een overzicht van uw afspraken" %}

    +