['blue', 'yellow', 'green'].includes(value),
+ },
leftLabel: {
type: String,
default: null,
@@ -75,6 +79,13 @@ export default {
progressValueStyle() {
return `width: ${this.percent}%`;
},
+
+ skinClass() {
+ if (this.progression >= 1) {
+ return 'progress-bar--green';
+ }
+ return `progress-bar--${this.skin}`;
+ },
},
};
@@ -83,6 +94,11 @@ export default {
@use '@oslokommune/punkt-css/dist/scss/abstracts/mixins/typography' as *;
.progress-bar {
+ // Default skin colors: `blue`
+ --progress-bar-bg: var(--color-grayscale-10);
+ --progress-bar-value: var(--color-blue);
+ --progress-bar-value-indicator: var(--color-blue-dark);
+
width: 100%;
h4 + &__bar {
@@ -92,7 +108,7 @@ export default {
&__bar {
position: relative;
margin-bottom: 1rem;
- background-color: var(--color-grayscale-10);
+ background-color: var(--progress-bar-bg);
> span {
position: absolute;
@@ -104,14 +120,10 @@ export default {
&__value {
height: 1rem;
- background-color: var(--color-blue);
+ background-color: var(--progress-bar-value);
&--indicator {
- border-right: 1px solid var(--color-blue-dark);
- }
-
- &--complete {
- background-color: var(--color-green);
+ border-right: 1px solid var(--progress-bar-value-indicator);
}
}
@@ -133,5 +145,15 @@ export default {
height: 0.5rem;
}
}
+
+ &--green {
+ --progress-bar-value: var(--color-green);
+ --progress-bar-value-indicator: var(--color-green-dark);
+ }
+
+ &--yellow {
+ --progress-bar-value: var(--color-yellow);
+ --progress-bar-value-indicator: var(--color-yellow-70);
+ }
}
diff --git a/src/components/panes/KeyResultPane.vue b/src/components/panes/KeyResultPane.vue
index d2baed15e..4f3668786 100644
--- a/src/components/panes/KeyResultPane.vue
+++ b/src/components/panes/KeyResultPane.vue
@@ -13,57 +13,75 @@
:breadcrumbs="breadcrumbs"
/>
-
- {{ $t('general.keyResult') }}
-
+
+
-
{{ activeKeyResult.name }}
-
-
-
+
+
-
+
+
+
+
+
+ {{ $t('general.loading') }}
+
+
+
-
-
-
-
-
+
+
@@ -114,6 +132,8 @@ import WidgetKeyResultDetails from '@/components/widgets/WidgetKeyResultDetails.
import HTMLOutput from '@/components/HTMLOutput.vue';
import ProgressModal from '@/components/modals/ProgressModal.vue';
import ProgressBar from '@/components/ProgressBar.vue';
+import LoadingSmall from '@/components/LoadingSmall.vue';
+import EmptyState from '@/components/EmptyState.vue';
export default {
name: 'KeyResultPane',
@@ -131,6 +151,8 @@ export default {
HTMLOutput,
ProgressModal,
ProgressBar,
+ LoadingSmall,
+ EmptyState,
},
data: () => ({
@@ -304,13 +326,28 @@ export default {
@use '@oslokommune/punkt-css/dist/scss/abstracts/mixins/typography' as *;
.key-result-pane {
- &__title {
+ background-color: #faf6f1;
+
+ &__details {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+ padding: 1.5rem;
+ background-color: var(--color-white);
+ border-left: 0.25rem solid var(--color-yellow-50);
+
+ @include bp('laptop-up') {
+ margin-top: 2rem;
+ }
+ }
+
+ &__header {
display: flex;
justify-content: space-between;
text-wrap: balance;
.pkt-btn {
- margin: -0.75rem 0 0 1rem;
+ margin: -0.5rem -0.5rem 0 0;
}
}
@@ -318,27 +355,37 @@ export default {
margin-top: 1rem;
}
- &__values,
- &__graph {
- padding: 0;
- border: 0;
- }
&__values {
- margin-top: 1rem;
+ margin-top: 3rem;
+
+ &-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 1rem;
+ }
+
+ ::v-deep .widget__header {
+ // Temporarily hide the history widget header. The table is
+ // to be replaced
+ display: none;
+ }
}
- ::v-deep .widget {
- padding: 1.5rem 0;
+ &__graph {
+ margin-top: 3rem;
- h3 {
- @include get-text('pkt-txt-16-medium');
+ ::v-deep .widget__header {
+ h3 {
+ @include get-text('pkt-txt-16-medium');
+ }
}
}
&__widgets {
- ::v-deep .widget {
- border: 0;
+ margin-top: 3rem;
+ ::v-deep .widget__header {
h3 {
@include get-text('pkt-txt-16');
}
@@ -346,6 +393,15 @@ export default {
}
}
+.empty {
+ background-color: transparent;
+}
+
+::v-deep .widget {
+ padding: 0;
+ border: 0;
+}
+
::v-deep .pkt-breadcrumbs--mobile {
width: 100%;
diff --git a/src/components/panes/ObjectivePane.vue b/src/components/panes/ObjectivePane.vue
index e5e70d64b..bd3c4c58d 100644
--- a/src/components/panes/ObjectivePane.vue
+++ b/src/components/panes/ObjectivePane.vue
@@ -11,65 +11,68 @@
:breadcrumbs="breadcrumbs"
/>
-
- {{ $t('general.objective') }}
-
+
+
-
+
{{ activeObjective.name }}
-
-
-
{{ $t('objective.owner') }}
-
- {{ activeObjective.parent.name }}
-
-
+
-
-
{{ $t('objective.contributors') }}
-
+
+
+
{{ $t('objective.owner') }}
+
+ {{ activeObjective.parent.name }}
+
+
+
+
+
{{ $t('objective.contributors') }}
+
+
-
-
+
-
-
{{ $t('objective.period') }}
-
{{ periodDates(period) }}
+
+
{{ $t('objective.period') }}
+
{{ periodDates(period) }}
+
@@ -273,15 +276,28 @@ export default {
@use '@oslokommune/punkt-css/dist/scss/abstracts/mixins/typography' as *;
.objective-pane {
- background-color: var(--color-gray-light);
+ background-color: #f5f5f8;
- &__title {
+ &__details {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+ padding: 1.5rem;
+ background-color: var(--color-white);
+ border-left: 0.25rem solid var(--color-blue-light);
+
+ @include bp('laptop-up') {
+ margin-top: 2rem;
+ }
+ }
+
+ &__header {
display: flex;
justify-content: space-between;
text-wrap: balance;
.pkt-btn {
- margin: -0.75rem 0 0 1rem;
+ margin: -0.5rem -0.5rem 0 0;
}
}
@@ -322,10 +338,6 @@ export default {
&__key-results {
margin-top: 3rem;
- @include bp('tablet-up') {
- padding-right: 1.5rem;
- }
-
&-header {
display: flex;
align-items: center;
@@ -337,7 +349,7 @@ export default {
position: relative;
@include bp('tablet-up') {
- margin-left: 3rem;
+ margin: 0 3rem;
}
& .key-result-link-card {
@@ -385,6 +397,10 @@ export default {
}
}
+.empty {
+ background-color: transparent;
+}
+
::v-deep .pkt-breadcrumbs--mobile {
width: 100%;
diff --git a/src/styles/main.scss b/src/styles/main.scss
index ca9bd54d7..451db6587 100644
--- a/src/styles/main.scss
+++ b/src/styles/main.scss
@@ -113,7 +113,7 @@ body.using-mouse :not([class^='pkt-'], [class*=' pkt-']):focus {
--color-green-dark-15: #b8d9d4;
--color-red-100: #4d0800;
--color-red-20: #fad0cb;
- --color-yellow-80: #774c01;
+ --color-yellow-70: #966a1c;
// Colors in RGB value - add more if needed. SCSS rgba() function
// can read hex numbers with CSS Variables.