Skip to content

Commit

Permalink
BC-5508: fix v-list
Browse files Browse the repository at this point in the history
  • Loading branch information
uidp committed Nov 7, 2023
1 parent c426090 commit b8f4881
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 81 deletions.
22 changes: 11 additions & 11 deletions src/components/molecules/vImportUsersMatchSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<v-col class="md-6">
<v-card-title>{{ ldapSource }}</v-card-title>
<v-list-item>
<v-list-item-content data-testid="edited-item">
<div data-testid="edited-item">
<v-list-item-title data-testid="edited-item-fullname"
>{{ `${editedItem.firstName} ${editedItem.lastName}` }}
</v-list-item-title>
Expand All @@ -57,13 +57,13 @@
}`
}}
</v-list-item-subtitle>
</v-list-item-content>
</div>
</v-list-item>
</v-col>
<v-col class="md-6">
<v-card-title>{{ $theme.name }}</v-card-title>
<v-list-item>
<v-list-item-content v-if="selectedItem">
<div v-if="selectedItem">
<v-list-item-title>
{{ `${selectedItem.firstName} ${selectedItem.lastName}` }}
</v-list-item-title>
Expand All @@ -77,8 +77,8 @@
}`
}}
</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-content v-else-if="editedItem.match">
</div>
<div v-else-if="editedItem.match">
<v-list-item-title>
{{
`${editedItem.match.firstName} ${editedItem.match.lastName}`
Expand All @@ -94,10 +94,10 @@
}`
}}
</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-content v-else>{{
$t("components.molecules.importUsersMatch.unMatched")
}}</v-list-item-content>
</div>
<div v-else>
{{ $t("components.molecules.importUsersMatch.unMatched") }}
</div>
</v-list-item>
<v-autocomplete
v-model="selectedItem"
Expand Down Expand Up @@ -135,7 +135,7 @@
</v-chip>
</template>
<template #item="{ item }">
<v-list-item-content max-width="450px">
<div style="max-width: 450px">
<v-list-item-title>
{{ item.firstName }} {{ item.lastName }}
</v-list-item-title>
Expand All @@ -149,7 +149,7 @@
)}: ${item.loginName}`
}}
</v-list-item-subtitle>
</v-list-item-content>
</div>
</template>
<template #append-item>
<div v-intersect="endIntersect" class="pa-2" />
Expand Down
42 changes: 19 additions & 23 deletions src/components/organisms/administration/SchoolPolicy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,26 @@
:class="{ 'item-no-action': !privacyPolicy }"
:ripple="privacyPolicy !== null"
>
<v-list-item-icon class="me-4">
<template v-slot:prepend>
<v-icon>$file_pdf_outline</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title class="text-body-1 text-black mb-2">
{{ t("pages.administration.school.index.schoolPolicy.fileName") }}
</v-list-item-title>
<v-list-item-subtitle class="text-body-2">
<template v-if="privacyPolicy">
{{
t("pages.administration.school.index.schoolPolicy.uploadedOn", {
date: formatDate(privacyPolicy.publishedAt),
})
}}
</template>
<template v-else>
{{
t(
"pages.administration.school.index.schoolPolicy.notUploadedYet"
)
}}
</template>
</v-list-item-subtitle>
</v-list-item-content>
</template>
<v-list-item-title class="text-body-1 text-black mb-2">
{{ t("pages.administration.school.index.schoolPolicy.fileName") }}
</v-list-item-title>
<v-list-item-subtitle class="text-body-2">
<template v-if="privacyPolicy">
{{
t("pages.administration.school.index.schoolPolicy.uploadedOn", {
date: formatDate(privacyPolicy.publishedAt),
})
}}
</template>
<template v-else>
{{
t("pages.administration.school.index.schoolPolicy.notUploadedYet")
}}
</template>
</v-list-item-subtitle>
<v-list-item-action
v-if="hasSchoolEditPermission"
data-testid="edit-button"
Expand Down
40 changes: 19 additions & 21 deletions src/components/organisms/administration/SchoolTerms.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,26 @@
:class="{ 'item-no-action': !termsOfUse }"
:ripple="termsOfUse !== null"
>
<v-list-item-icon class="me-4">
<template v-slot:prepend>
<v-icon>$file_pdf_outline</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title class="text-body-1 text-black mb-2">
{{ t("pages.administration.school.index.termsOfUse.fileName") }}
</v-list-item-title>
<v-list-item-subtitle class="text-body-2">
<template v-if="termsOfUse">
{{
t("pages.administration.school.index.termsOfUse.uploadedOn", {
date: formatDate(termsOfUse.publishedAt),
})
}}
</template>
<template v-else>
{{
t("pages.administration.school.index.termsOfUse.notUploadedYet")
}}
</template>
</v-list-item-subtitle>
</v-list-item-content>
</template>
<v-list-item-title class="text-body-1 text-black mb-2">
{{ t("pages.administration.school.index.termsOfUse.fileName") }}
</v-list-item-title>
<v-list-item-subtitle class="text-body-2">
<template v-if="termsOfUse">
{{
t("pages.administration.school.index.termsOfUse.uploadedOn", {
date: formatDate(termsOfUse.publishedAt),
})
}}
</template>
<template v-else>
{{
t("pages.administration.school.index.termsOfUse.notUploadedYet")
}}
</template>
</v-list-item-subtitle>
<v-list-item-action
v-if="hasSchoolEditPermission"
data-testid="edit-button"
Expand Down
50 changes: 24 additions & 26 deletions src/components/topbar/StatusAlerts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,35 @@
:data-test-id="`alert-item-${index}`"
class="alert-item"
>
<v-list-item-icon class="mt-3 mr-3">
<template v-slot:prepend="">
<v-icon
:color="`rgba(var(--v-theme-${getIconTag(item.status).color}))`"
>
{{ getIconTag(item.status).icon }}
</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title
:data-testid="`alert-title-${index}`"
class="subtitle-1 ma-0"
>
{{ item.title }}
</v-list-item-title>
<v-list-item-subtitle
:data-testid="`alert-text-${index}`"
class="subtitle-2 text--primary ma-0 mt-1"
>
{{ item.text }}
</v-list-item-subtitle>
<v-list-item-subtitle
class="text-left text-caption d-flex flex-row alert-date text--secondary mt-0 mt-2"
:data-testid="`alert-date-${index}`"
>
<template v-if="item.timestamp !== item.createdAt">
{{ $t("common.labels.updateAt") }}
{{ formatDate(item.timestamp) }} |
</template>
{{ $t("common.labels.createAt") }} {{ formatDate(item.createdAt) }}
</v-list-item-subtitle>
</v-list-item-content>
</template>
<v-list-item-title
:data-testid="`alert-title-${index}`"
class="text-subtitle-1 ma-0"
>
{{ item.title }}
</v-list-item-title>
<v-list-item-subtitle
:data-testid="`alert-text-${index}`"
class="text-subtitle-2 text--primary ma-0 mt-1"
>
{{ item.text }}
</v-list-item-subtitle>
<v-list-item-subtitle
class="text-left text-caption d-flex flex-row alert-date text--secondary mt-0 mt-2"
:data-testid="`alert-date-${index}`"
>
<template v-if="item.timestamp !== item.createdAt">
{{ $t("common.labels.updateAt") }}
{{ formatDate(item.timestamp) }} |
</template>
{{ $t("common.labels.createAt") }} {{ formatDate(item.createdAt) }}
</v-list-item-subtitle>
</v-list-item>
</v-list>
</template>
Expand Down

0 comments on commit b8f4881

Please sign in to comment.