Skip to content

Commit

Permalink
Merge branch 'DES/enhancement/#732-vlc-refactor' into DES/enhancement…
Browse files Browse the repository at this point in the history
…/732-vlc-refactor/key-value

# Conflicts:
#	app/styles/app.scss
  • Loading branch information
brenner-company committed Apr 15, 2021
2 parents 1a765b8 + d5597a6 commit c3bafc8
Show file tree
Hide file tree
Showing 49 changed files with 191 additions and 516 deletions.
2 changes: 1 addition & 1 deletion app/components/agenda/agenda-decisions.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="vlc-container-center">
<div class="auk-container auk-container--center">
<div class="auk-u-mt-8 no-print">
<h3 class="auk-h2" data-test-print-overview-decisions-title>
{{await title}}
Expand Down
45 changes: 0 additions & 45 deletions app/components/agenda/agenda-overview/agenda-overview-item.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -45,51 +45,6 @@
{{/if}}

</div>

{{!-- TODO: Commented out section triggers many requests that slow down agenda overview
<div class="vlc-u-flex-float-right">
{{#if currentSessionService.isOvrb}}
PUBLICATION FLOW CALL TO ACTION
<div class="vlc-u-flex-float-right">
PUBLICATION FLOW CALL TO ACTION
{{#if (not @isEditingFormallyOkStatus)}}
<div class="auk-button-toolbar">
{{#if (await @agendaitem.publicationFlow)}}
<LinkTo
class=""
@route="publications.publication"
@model={{ await @agendaitem.publicationFlowId }}
>
{{t "publications-to" }}
</LinkTo>
{{else}}
{{#if (await @agendaitem.case)}}
<WebComponents::AuButton
@skin="tertiary"
@layout="icon-only"
@disabled={{this.startPublication.isRunning}}
data-test-start-publication
{{on "click" (perform this.startPublication)}}>
{{t "start-publication"}}
</WebComponents::AuButton>
{{/if}}
{{/if}}
</div>
{{/if}}
END PUBLICATION FLOW CALL TO ACTION
</div>
{{/if}}
END PUBLICATION FLOW CALL TO ACTION
</div>
--}}
</div>

<div class="auk-u-flex auk-u-flex--justify-between">
Expand Down
11 changes: 0 additions & 11 deletions app/components/agenda/agenda-overview/agenda-overview-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default class AgendaOverviewItem extends AgendaSidebarItem {
@service toaster;
@service sessionService;
@service agendaService;
@service publicationService;
@service router;
@service('current-session') currentSessionService;

Expand Down Expand Up @@ -60,16 +59,6 @@ export default class AgendaOverviewItem extends AgendaSidebarItem {
return this.agendaitemDocuments.length > this.documentListSize;
}

@action
async startPublication() {
this.showLoader = true;
const _case = await this.subcase.get('case');
const newPublicationNumber = await this.publicationService.getNewPublicationNextNumber();
const newPublication = await this.publicationService.createNewPublication(newPublicationNumber, '', _case.id);
this.showLoader = false;
this.router.transitionTo('publications.publication.case', newPublication.id);
}

@task
*setFormallyOkStatus(status) {
yield this.args.setFormallyOkAction(status.uri);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="vlc-box">
<div class="auk-box">
<div class="auk-u-mb-4">
{{#if @subcase}}
<div class="vlc-input-field-block">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,29 @@
</WebComponents::AuToolbar::Item>
</WebComponents::AuToolbar::Group>
<WebComponents::AuToolbar::Group @position="right">
{{#if @subcase.case.id}}
{{!-- TODO: for now the link-button is hidden while loading.
A disabled state would be better to avoid flashing a new button in view once loaded. --}}
{{#if (and @subcase this.loadCase.isIdle)}}
<WebComponents::AuToolbar::Item>
<WebComponents::AuButton
data-test-agendaitem-titles-to-subcase
{{on "click" this.redirectToSubcase}}
@skin="tertiary"
@layout="icon-right"
@icon="chevron-right"
<LinkTo
class="auk-button auk-button--tertiary"
data-test-agendaitem-titles-to-subcase={{true}}
@route="cases.case.subcases.subcase.overview"
@models={{array this.case.id @subcase.id}}
>
{{t "to-subcase"}}
</WebComponents::AuButton>
<span class="auk-button__content">
<span class="auk-button__label">{{t "to-subcase"}}</span>
<div class="auk-icon auk-icon--default auk-icon--chevron-right">
<i class="ki ki-chevron-right"></i>
</div>
</span>
</LinkTo>
</WebComponents::AuToolbar::Item>
{{/if}}
<WebComponents::AuToolbar::Item>
<WebComponents::AuButton
data-test-agendaitem-titles-edit
{{on "click" this.toggleIsEditingAction}}
{{on "click" this.startEditing}}
@skin="tertiary"
@icon="edit"
@layout="icon-only"
Expand Down Expand Up @@ -82,7 +88,7 @@
{{/if}}
{{#if
(and @agendaitem.isDesignAgenda
(and currentSession.isEditor @agendaitem.formallyOkToShow))
(and this.currentSession.isEditor @agendaitem.formallyOkToShow))
}}
<WebComponents::AuPill
@skin={{@agendaitem.formallyOkToShow.svg.color}}
Expand All @@ -108,4 +114,4 @@
</WebComponents::AuModal::Footer>
{{/if}}
</WebComponents::AuPanel>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,33 @@ import Component from '@glimmer/component';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import { alias } from '@ember/object/computed';
import {
task,
lastValue
} from 'ember-concurrency-decorators';

export default class AgendaitemTitles extends Component {
@alias('args.agendaitem.agendaActivity.subcase') subcase;

@tracked showLoader = false;

@service currentSession;

@service publicationService;

@service router;

@action
toggleIsEditingAction() {
this.args.toggleIsEditing();
@lastValue('loadCase') case;

@tracked showLoader = false;

constructor() {
super(...arguments);
this.loadCase.perform();
}

@action
async redirectToSubcase() {
const subcase = this.args.subcase;
const _case = await subcase.get('case');
const subcaseId = subcase.id;
this.router.transitionTo('cases.case.subcases.subcase.overview', _case.id, subcaseId);
@task
*loadCase() {
const _case = yield this.args.subcase.case;
return _case;
}

@action
async startPublication() {
this.showLoader = true;
const _case = await this.subcase.get('case');
const newPublicationNumber = await this.publicationService.getNewPublicationNextNumber();
const newPublication = await this.publicationService.createNewPublication(newPublicationNumber, '', _case.id);
this.showLoader = false;
this.router.transitionTo('publications.publication.case', newPublication.id);
startEditing() {
this.args.toggleIsEditing();
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="vlc-box">
<div class="auk-box">
{{!-- Editor with annotated decision text will come somwhere around here in the future --}}
<div class="vlc-input-field vlc-input-field-block auk-u-mb-4"
data-test-decision-edit-power-select-container
Expand Down
2 changes: 1 addition & 1 deletion app/components/agenda/press-agenda.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="vlc-container-center">
<div class="auk-container auk-container--center">
<Utils::LogoHeader />
<div class="auk-u-mb-8">
<h1 class="auk-h1">
Expand Down
2 changes: 1 addition & 1 deletion app/components/agenda/printable-agenda.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div data-test-agenda-printContainer class="vlc-container-center auk-content vlc-printable-agenda-list">
<div data-test-agenda-printContainer class="auk-container auk-container--center auk-content vlc-printable-agenda-list">
{{utils/logo-header}}

<h4 class="vlc-printable-agenda-list__session-title" data-test-agenda-print-header-title>
Expand Down
2 changes: 1 addition & 1 deletion app/components/agendaitem-press-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import CONFIG from 'frontend-kaleidos/utils/config';
import { updateModifiedProperty } from 'frontend-kaleidos/utils/modification-utils';

export default Component.extend({
classNames: ['vlc-box'],
classNames: ['auk-box'],
isTableRow: false,
store: inject(),
actions: {
Expand Down
23 changes: 0 additions & 23 deletions app/components/button.hbs

This file was deleted.

35 changes: 0 additions & 35 deletions app/components/button.js

This file was deleted.

26 changes: 0 additions & 26 deletions app/components/button/inner-layout.hbs

This file was deleted.

5 changes: 0 additions & 5 deletions app/components/button/inner-layout.js

This file was deleted.

2 changes: 1 addition & 1 deletion app/components/documents/batch-document-edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{#if this.loadData.isRunning}}
<WebComponents::VlLoader @text={{t "documents-loading-text"}} />
{{else}}
<div class="vlc-box">
<div class="auk-box">
<div class="auk-u-mb-4">
<table class="auk-table">
<thead>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="vlc-box">
<div class="auk-box">
<div class="vlc-input-field-block">
<div class="auk-u-mb-8">
<table class="auk-table">
Expand Down
2 changes: 1 addition & 1 deletion app/components/news-item/edit-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { inject } from '@ember/service';

export default Component.extend({
intl: inject(),
classNames: ['vlc-box'],
classNames: ['auk-box'],

isTryingToSave: false,
isExpanded: false,
Expand Down
2 changes: 1 addition & 1 deletion app/components/newsletter-table/table-row.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{{#if this.isEditing}}
<tr class="lt-row lt-expanded-row">
<td colspan="5">
<div class="vlc-container-center">
<div class="auk-container auk-container--center">
<NewsItem::EditItem
@newsletterInfo={{this.newsletterInfo}}
@agendaitem={{@agendaitem}}
Expand Down
12 changes: 11 additions & 1 deletion app/components/publications/new-publication-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { tracked } from '@glimmer/tracking';

export default class NewPublicationModal extends Component {
@service publicationService;
@service store;

@tracked number = null;
@tracked suffix = null;
Expand Down Expand Up @@ -38,7 +39,16 @@ export default class NewPublicationModal extends Component {

@task
*initPublicationNumber() {
this.number = yield this.publicationService.getNewPublicationNextNumber();
// Deze query possibly breaks if publication-flows without number exist
const latestPublication = yield this.store.queryOne('publication-flow', {
sort: '-publication-number',
});
if (latestPublication) {
this.number = latestPublication.publicationNumber + 1;
} else {
// This should only be a "no-data" issue, in that case we have to default to number 1
this.number = 1;
}
}

@task
Expand Down
8 changes: 8 additions & 0 deletions app/components/publications/urgency-level-checkbox.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="auk-form-group">
{{#unless this.loadData.isRunning}}
<WebComponents::VlCheckbox
@value={{@urgencyLevel.isUrgent}}
@toggle={{this.toggleUrgency}}
@label={{t "priority-procedure"}}/>
{{/unless}}
</div>
Loading

0 comments on commit c3bafc8

Please sign in to comment.