Skip to content

Commit

Permalink
Merge branch 'development' into DES/enhancement/#732-vlc-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
brenner-company committed May 5, 2021
2 parents 1e7df90 + 6c78d29 commit 810cfce
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 43 deletions.
34 changes: 0 additions & 34 deletions app/models/agendaitem.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,40 +162,6 @@ export default ModelWithModifier.extend({
return documentContainers && documentContainers.some((documentContainers) => documentContainers.checkAdded);
}),

case: computed('treatments.firstObject.subcase.case', async function() {
const agendaItemTreatments = await this.get('treatments');
const agendaItemTreatment = agendaItemTreatments.firstObject; // TODO: Agendaitem can have many treatments (decisions)
const subcase = await agendaItemTreatment.get('subcase');
if (!subcase) {
return false;
}
const _case = await subcase.get('case');
if (!_case) {
return false;
}
return _case;
}),

publicationFlow: computed('treatments.firstObject.subcase.case.publicationFlow', async function() {
const _case = await this.get('case');
if (!_case) {
return false;
}
const publicationFlow = await _case.get('publicationFlow');
// Preload case.
await publicationFlow.get('case');
await publicationFlow.reload();
if (!publicationFlow) {
return false;
}
return publicationFlow;
}),

publicationFlowId: computed('treatments.firstObject.subcase.case.publicationFlow', async function() {
const publicationFlow = await this.get('publicationFlow');
return publicationFlow.id;
}),

sortedApprovals: computed('approvals.@each', async function() {
return PromiseArray.create({
promise: this.store.query('approval', {
Expand Down
9 changes: 9 additions & 0 deletions app/pods/styleguide/avatar/route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
import Route from '@ember/routing/route';

export default class AvatarRoute extends Route.extend(AuthenticatedRouteMixin) {
model() {
// Normally we would query store here, but for now, we get the mocks
return null;
}
}
51 changes: 51 additions & 0 deletions app/pods/styleguide/avatar/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{{!-- template-lint-disable --}}
<ComponentPageIntro @title="Avatar" />

<StyleguideSample
@title="Small"
@snippet="avatar-small.hbs"
>
{{!-- BEGIN-SNIPPET avatar-small --}}
<div class="auk-avatar auk-avatar--default auk-avatar--small">
<WebComponents::AuIcon @name="user" @size="small" />
</div>
{{!-- END-SNIPPET --}}
</StyleguideSample>

<StyleguideSample
@title="Regular"
@snippet="avatar-regular.hbs"
>
{{!-- BEGIN-SNIPPET avatar-regular --}}
<div class="auk-avatar auk-avatar--default auk-avatar--regular">
<WebComponents::AuIcon @name="user" />
</div>
{{!-- END-SNIPPET --}}
</StyleguideSample>

<StyleguideSample
@title="Image"
@snippet="avatar-image.hbs"
>
{{!-- BEGIN-SNIPPET avatar-image --}}
<div class="auk-avatar auk-avatar--img auk-avatar--regular">
<img src="/assets/icons/avatar-hilde-crevits.jpg" alt="avatar" />
</div>
{{!-- END-SNIPPET --}}
</StyleguideSample>

<StyleguideSample
@title="Avatar & text"
@snippet="avatar-avatar-and-text.hbs"
>
{{!-- BEGIN-SNIPPET avatar-avatar-and-text --}}
<div class="auk-avatar-and-text">
<div class="auk-avatar auk-avatar--default auk-avatar--small">
<WebComponents::AuIcon @name="user" @size="small" />
</div>
<div class="auk-avatar-and-text__text">
<p>Jan Jambon</p>
</div>
</div>
{{!-- END-SNIPPET --}}
</StyleguideSample>
3 changes: 3 additions & 0 deletions app/pods/styleguide/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@

<h4 class="br-styleguide-bordered-list-header">{{t "style-guide-static-html-components"}}</h4>
<ul class="br-styleguide-bordered-list br-styleguide-bordered-list--on-gray-100">
<li>
<LinkTo @route="styleguide.avatar">Avatar</LinkTo>
</li>
<li>
<LinkTo @route="styleguide.pagination">Pagination</LinkTo>
</li>
Expand Down
1 change: 1 addition & 0 deletions app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Router.map(function() {
this.route('alert-skins');
this.route('alert-types');
this.route('alert-stack');
this.route('avatar');
this.route('brand');
this.route('badge');
this.route('button-loading');
Expand Down
12 changes: 6 additions & 6 deletions app/services/current-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ export default Service.extend({
userRoleId,
} = this;
const {
priviligedId,
overheidId,
} = CONFIG;
const roles = [priviligedId];
const roles = [overheidId];
return roles.includes(userRoleId);
},

Expand All @@ -92,9 +92,9 @@ export default Service.extend({
userRoleId,
} = this;
const {
adminId, kanselarijId, priviligedId, ministerId, usersId, kabinetId,
adminId, kanselarijId, overheidId, ministerId, usersId, kabinetId,
} = CONFIG;
const roles = [adminId, kanselarijId, priviligedId, ministerId, usersId, kabinetId];
const roles = [adminId, kanselarijId, overheidId, ministerId, usersId, kabinetId];
return roles.includes(userRoleId);
},

Expand All @@ -103,9 +103,9 @@ export default Service.extend({
userRoleId,
} = this;
const {
adminId, kanselarijId, priviligedId, ministerId, kabinetId,
adminId, kanselarijId, overheidId, ministerId, kabinetId,
} = CONFIG;
const roles = [adminId, kanselarijId, priviligedId, ministerId, kabinetId];
const roles = [adminId, kanselarijId, overheidId, ministerId, kabinetId];
return roles.includes(userRoleId);
},

Expand Down
2 changes: 1 addition & 1 deletion app/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default EmberObject.create({
numbersBylatinAdverbialNumberals,
adminId: '71c068e6-d2f0-43de-93ab-cd1e7156ac4b',
kanselarijId: '50f4c79c-902d-4ad2-bca1-0f37a69f0c13',
priviligedId: '3e824494-bbe7-45cf-aed8-5828970a10dc', // TODO: Rename to overheidId?
overheidId: '3e824494-bbe7-45cf-aed8-5828970a10dc',
ministerId: '1cc0710c-1b28-4e23-b3ff-399c8089bc71',
kabinetId: '7e8c0c9c-05ec-49fd-9e96-fc54ebf3f9eb',
usersId: '450915b2-4c64-4b03-9caa-71180400f831',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend-kaleidos",
"version": "5.9.0",
"version": "5.10.0",
"private": true,
"description": "Small description for frontend-kaleidos goes here",
"repository": "",
Expand Down Expand Up @@ -39,7 +39,7 @@
"@ember/render-modifiers": "^1.0.2",
"@glimmer/component": "^1.0.0",
"@glimmer/tracking": "^1.0.0",
"@kanselarij-vlaanderen/au-kaleidos-css": "^1.20.0",
"@kanselarij-vlaanderen/au-kaleidos-css": "^1.20.1",
"@kanselarij-vlaanderen/au-kaleidos-icons": "^1.3.2",
"@lblod/ember-acmidm-login": "^1.1.1",
"@lblod/ember-mock-login": "^0.4.8",
Expand Down

0 comments on commit 810cfce

Please sign in to comment.