Skip to content

Commit

Permalink
Consistency in permit and note card titles
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle1morel committed Apr 9, 2024
1 parent 17405a8 commit 51fc346
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 65 deletions.
33 changes: 14 additions & 19 deletions frontend/src/components/note/NoteCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,19 @@ onMounted(() => {
<template>
<Card :id="props.note.noteId">
<template #title>
<h3 class="mt-1 mb-1">
{{ props.note.title }}
<span
v-if="props.note.bringForwardState"
data-test="bf-title"
>
{{ `(${props.note.bringForwardState})` }}
</span>
</h3>
<div class="flex align-items-center">
<div class="flex-grow-1">
<h3 class="mb-0">
{{ props.note.title }}
<span
v-if="props.note.bringForwardState"
data-test="bf-title"
>
{{ `(${props.note.bringForwardState})` }}
</span>
</h3>
</div>
</div>
<Divider type="solid" />
</template>
<template #content>
Expand Down Expand Up @@ -88,10 +92,6 @@ onMounted(() => {
</template>

<style scoped lang="scss">
h2 {
margin: 0;
}
p {
margin-top: 0;
margin-bottom: 0;
Expand All @@ -105,13 +105,8 @@ p {
border-style: solid;
border-width: 1px;
.p-card-body {
padding-top: 0;
:deep(.p-card-content) {
padding-bottom: 0;
.p-card-content {
padding-bottom: 0;
}
}
}
.note-content {
Expand Down
46 changes: 16 additions & 30 deletions frontend/src/components/permit/PermitCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,24 @@ onMounted(() => {

<template>
<Card>
<template #header>
<div class="flex flex-row px-3 pt-2">
<template #title>
<div class="flex align-items-center">
<div class="flex-grow-1">
<h3>{{ permitType?.name }}</h3>
<h3 class="mb-0">{{ permitType?.name }}</h3>
</div>
<div class="flex flex-none">
<Button
class="p-button-outlined"
aria-label="Edit"
@click="permitModalVisible = true"
>
<font-awesome-icon
class="pr-2"
icon="fa-solid fa-edit"
/>
Edit
</Button>
</div>
</div>
<div class="flex flex-row px-3">
<Divider type="solid" />
<Button
class="p-button-outlined"
aria-label="Edit"
@click="permitModalVisible = true"
>
<font-awesome-icon
class="pr-2"
icon="fa-solid fa-edit"
/>
Edit
</Button>
</div>
<Divider type="solid" />
</template>
<template #content>
<div class="grid nested-grid">
Expand Down Expand Up @@ -188,10 +184,6 @@ onMounted(() => {
</template>

<style scoped lang="scss">
h2 {
margin: 0;
}
p {
margin-top: 0;
margin-bottom: 0;
Expand All @@ -205,14 +197,8 @@ p {
border-style: solid;
border-width: 1px;
:deep(.p-card-body) {
padding-top: 0;
:deep(.p-card-content) {
padding-bottom: 0;
:deep(.p-card-content) {
padding-top: 0;
padding-bottom: 0;
}
}
}
</style>
30 changes: 14 additions & 16 deletions frontend/src/views/SubmissionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,20 @@ onMounted(async () => {
</TabPanel>
<TabPanel header="Permits">
<span v-if="permitTypes.length">
<div class="flex flex-row pb-2">
<div class="flex flex-grow-1 align-items-end">
<div class="flex align-items-center pb-2">
<div class="flex-grow-1">
<p class="font-bold">Applicable permits ({{ permits.length }})</p>
</div>
<div class="flex flex-none">
<Button
aria-label="Add permit"
@click="permitModalVisible = true"
>
<font-awesome-icon
class="pr-2"
icon="fa-solid fa-plus"
/>
Add permit
</Button>
</div>
<Button
aria-label="Add permit"
@click="permitModalVisible = true"
>
<font-awesome-icon
class="pr-2"
icon="fa-solid fa-plus"
/>
Add permit
</Button>
</div>
<div
v-for="(permit, index) in permits"
Expand All @@ -208,8 +206,8 @@ onMounted(async () => {
</span>
</TabPanel>
<TabPanel header="Notes">
<div class="flex flex-row align-items-center pb-2">
<div class="flex flex-grow-1">
<div class="flex align-items-center pb-2">
<div class="flex-grow-1">
<p class="font-bold">Notes ({{ notes.length }})</p>
</div>
<Button
Expand Down

0 comments on commit 51fc346

Please sign in to comment.