Skip to content

Commit

Permalink
fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Asergey91 committed Apr 9, 2021
2 parents ff32d60 + 010f48c commit ae0cd0d
Show file tree
Hide file tree
Showing 34 changed files with 596 additions and 443 deletions.
12 changes: 9 additions & 3 deletions app/components/agenda-manager/agenda-table/row.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
(t "manageAgendaZittingModal.geplandOpenbaarFalseLabel")}}
</td>
<td class="au-u-table-right">
<AuButton @skin="tertiary" @icon="pencil" @iconAlignment="left" {{on "click" @edit}}>
{{t "manageAgendaZittingModal.editItemButton"}}
</AuButton>
{{#if this.published}}
<AuPill @skin="success">
{{t "manageAgendaZittingModal.apPublishedMsg"}}
</AuPill>
{{else}}
<AuButton @skin="tertiary" @icon="pencil" @iconAlignment="left" {{on "click" @edit}}>
{{t "manageAgendaZittingModal.editItemButton"}}
</AuButton>
{{/if}}
</td>
</DraggableObject>
31 changes: 31 additions & 0 deletions app/components/agenda-manager/agenda-table/row.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Component from '@glimmer/component';
import { PUBLISHED_STATUS_ID } from 'frontend-gelinkt-notuleren/utils/constants';
import { tracked } from "@glimmer/tracking";
import { task } from "ember-concurrency-decorators";
import { get } from "@ember/object";
import { inject as service } from '@ember/service';

export default class AgendaManagerAgendaTableRowComponent extends Component {
constructor(...args){
super(...args);
this.getAgendaPointStatus.perform();
}

@service store;

@tracked published=false;

@task
*getAgendaPointStatus(){
const behandeling=(yield this.store.query("behandeling-van-agendapunt", {
"filter[onderwerp][:id:]": this.args.item.id,
include: 'document-container.status'
})).firstObject;

const statusId=get(behandeling, "documentContainer.status.id");

if(statusId==PUBLISHED_STATUS_ID){
this.published=true;
}
}
}
5 changes: 5 additions & 0 deletions app/components/agenda-punt-link.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{#if (eq this.editorStatus "published")}}
<LinkTo @route="agendapoints.show" @model={{@documentContainer.id}} class="au-c-link">{{@documentContainer.currentVersion.title}}</LinkTo>
{{else}}
<LinkTo @route="agendapoints.edit" @model={{@documentContainer.id}} class="au-c-link">{{@documentContainer.currentVersion.title}}</LinkTo>
{{/if}}
19 changes: 19 additions & 0 deletions app/components/agenda-punt-link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Component from '@glimmer/component';
import { DRAFT_STATUS_ID, PUBLISHED_STATUS_ID, PLANNED_STATUS_ID } from 'frontend-gelinkt-notuleren/utils/constants';
export default class AgendaPuntLinkComponent extends Component {
get editorStatus() {
const statusId = this.args.documentContainer.status.get('id');
if (statusId == DRAFT_STATUS_ID) {
return "draft";
}
else if (statusId == PLANNED_STATUS_ID) {
return "planned";
}
else if (statusId == PUBLISHED_STATUS_ID) {
return "published";
}
else {
return "unknown";
}
}
}
6 changes: 6 additions & 0 deletions app/components/app-chrome.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
Exporteer als HTML
</AuButton>
{{/if}}
{{#if @copyAgendapunt}}
<AuButton {{on "click" @copyAgendapunt}} @skin="tertiary" role="menuitem">
<AuIcon @icon="export" @alignment="left" />
Copy Agendapunt
</AuButton>
{{/if}}
{{#if @sendToTrash}}
<AuButton {{on "click" @sendToTrash}} @skin="tertiary" @alert="true" role="menuitem" @disabled={{this.isNotAllowedToTrash}}>
<AuIcon @icon="bin" @alignment="left" />
Expand Down
54 changes: 54 additions & 0 deletions app/components/behandeling-van-agendapunt.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,55 @@
{{#if this.published}}
<div class="au-c-meeting-chrome-editable">
<AuToolbar>
<AuHeading id="behandeling-{{@behandeling.id}}" @level="3" @skin="4">
{{@behandeling.onderwerp.titel}}

</AuHeading>
<AuPill @skin="success">
{{t "manageAgendaZittingModal.apPublishedMsg"}}
</AuPill>
</AuToolbar>
<div class="au-o-box au-o-box--small au-c-meeting-chrome-card au-u-margin-bottom-none">
<AuHeading @level="4" @skin="6" class="au-c-meeting-chrome-card__title au-c-meeting-chrome-card__title--inset au-u-margin-bottom-small">{{t "behandelingVanAgendapunten.visibility"}}</AuHeading>
<AuPill @skin="border">
{{#if this.openbaar}}
{{t "behandelingVanAgendapunten.openbaarMsg"}}
{{else}}
{{t "behandelingVanAgendapunten.geenOpenbaarMsg"}}
{{/if}}
</AuPill>
</div>

{{#if this.fetchParticipants.isRunning}}
<AuLoader @size="small" />
<AuHelpText>{{t "participationList.loadingTitle"}}</AuHelpText>
{{else}}
<ParticipationList
@chairman={{this.voorzitter}}
@secretary={{this.secretaris}}
@defaultSecretary={{@defaultSecretary}}
@defaultChairman={{@defaultChairman}}
@bestuursorgaan={{@bestuursorgaan}}
@possibleParticipants={{@possibleParticipants}}
@aanwezigenBijStart={{this.aanwezigen}}
@afwezigenBijStart={{this.afwezigen}}
@onSave={{this.saveParticipants}}
@modalTitle={{t "behandelingVanAgendapunten.participationListButton"}}
@meeting={{@meeting}}
@readOnly={{this.published}}
/>
{{/if}}
<div class="au-c-meeting-chrome-card au-u-margin-bottom-small au-u-margin-top-small">
<AuHeading @level="4" @skin="6" class="au-c-meeting-chrome-card__title">{{t "behandelingVanAgendapunten.contentTitle"}}</AuHeading>
<div class="au-o-box au-o-box--small">
<LinkTo @route="agendapoints.show" @model={{this.documentContainer.id}} class="au-c-link" target="_blank">
<AuIcon @icon="document" @alignment="left"/>
{{@behandeling.onderwerp.titel}} - {{t "behandelingVanAgendapunten.documentLink"}}
</LinkTo>
</div>
</div>
</div>
{{else}}
<div class="au-c-meeting-chrome-editable">
<AuHeading id="behandeling-{{@behandeling.id}}" @level="3" @skin="4">
{{@behandeling.onderwerp.titel}}
Expand All @@ -23,6 +75,7 @@
@onSave={{this.saveParticipants}}
@modalTitle={{t "behandelingVanAgendapunten.participationListButton"}}
@meeting={{@meeting}}
@readOnly={{this.published}}
/>
{{/if}}
{{#if this.hasParticipants}}
Expand All @@ -47,3 +100,4 @@
</AuButton>
</AuButtonGroup>
</div>
{{/if}}
16 changes: 15 additions & 1 deletion app/components/behandeling-van-agendapunt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Component from "@glimmer/component";
import { PUBLISHED_STATUS_ID } from 'frontend-gelinkt-notuleren/utils/constants';
import { tracked } from "@glimmer/tracking";
import { task } from "ember-concurrency-decorators";
import { action } from "@ember/object";
Expand All @@ -16,6 +17,7 @@ export default class BehandelingVanAgendapuntComponent extends Component {
@tracked afwezigen = [];
@tracked voorzitter;
@tracked secretaris;
@tracked published=false;

constructor() {
super(...arguments);
Expand All @@ -24,8 +26,20 @@ export default class BehandelingVanAgendapuntComponent extends Component {
this.documentContainer = this.args.behandeling.documentContainer;
this.tryToFetchDocument.perform();
this.fetchParticipants.perform();
this.getStatus.perform();
}
@task
*getStatus(){
const container=yield this.documentContainer;
if(container.isLoaded){
const status=yield container.status;
if(status.isLoaded){
if(status.id==PUBLISHED_STATUS_ID){
this.published=true;
}
}
}
}

get hasParticipants() {
return this.aanwezigen.length;
}
Expand Down
26 changes: 15 additions & 11 deletions app/components/besluit-document-container.hbs
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{{#if @saving}}
<div class="editor-container container-flex--scroll">
<div class="editor">
<div class="grid grid--align-center">
<div class="col--7-12">
<div class="au-c-rdfa-scanner say-content rdfa-annotations scanner">
<div class="scanner__text">
<div class="badge badge--l badge--initials">
<span class="loader"><span class="u-visually-hidden">Aan het verwerken</span></span>
<div class="container-flex--contain">
<div class="au-c-rdfa-editor">
<div class="say-container say-container--sidebar-left">
<div class="say-container__main">
<div class="au-c-scanner">
<div class="au-c-scanner__text">
<AuLoader @size="small" />
<AuHelpText @size="large">Bezig met opslaan</AuHelpText>
</div>
<span class="au-c-scanner__bar"></span>
</div>
<div class="say-editor rdfa-annotations rdfa-annotations-highlight rdfa-annotations-hover">
<div class="say-editor__paper">
<div class="say-editor__inner say-content">
{{html-safe @editor.htmlContent}}
</div>
<h3 class="h3">Bezig met opslaan</h3>
</div>
<span class="scanner__bar"></span>
{{html-safe @editor.htmlContent}}
</div>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions app/components/participation-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
</ul>
</div>
{{/if}}
{{#if (not @readOnly)}}
<AuButton
@width="block"
@skin="secondary"
Expand All @@ -49,6 +50,7 @@
>
{{@modalTitle}}
</AuButton>
{{/if}}

<ParticipationList::Modal
@voorzitter={{this.chairman}}
Expand Down
3 changes: 2 additions & 1 deletion app/components/signatures/notulen/behandelingen-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<p class="au-c-help-text au-c-help-text--normal">De titel en de openbaarheid van de behandeling worden wel gepubliceerd. Voor besluiten worden ook de titel van het besluit en de korte omschrijving gepubliceerd.</p>
{{/if}}
{{else}}
<WuSwitch @label=" Maak inhoud agendapunt publiek" @checked={{contains preview.behandeling @publicBehandelingUris}} @onClick={{action @toggle preview}} @class="checkbox--switch__wrapper" />
<AuToggleSwitch @label="Maak inhoud agendapunt publiek" @checked={{contains preview.behandeling @publicBehandelingUris}} @onChange={{action @toggle preview}} />
<AuHr />
{{#if (contains preview.behandeling @publicBehandelingUris)}}
<p><strong>Inhoud wordt gepubliceerd</strong></p>
<p class="au-c-help-text au-c-help-text--normal">Alle informatie uit de behandeling van het agendapunt wordt gepubliceerd.</p>
Expand Down
8 changes: 8 additions & 0 deletions app/controllers/agendapoints/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ export default class AgendapointsEditController extends Controller {
generateExportFromEditorDocument(this.editorDocument);
}

@task
*copyAgendapunt() {
const response = yield fetch(`/agendapoint-service/${this.documentContainer.id}/copy`, {method: 'POST'});
const json = yield response.json();
const agendapuntId = json.uuid;
yield this.transitionToRoute('agendapoints.edit', agendapuntId);
}

@action
toggleDeleteModal(){
this.displayDeleteModal = ! this.displayDeleteModal;
Expand Down
15 changes: 14 additions & 1 deletion app/routes/inbox/meetings.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,22 @@ export default Route.extend(DataTableRouteMixin, {
queryParams: {
page: { refreshModel: true },
size: { refreshModel: true },
sort: { refreshModel: true },
sort: { refreshModel: true },
filter: { refreshModel: true },
// filter params
title: { refreshModel: true }
},
mergeQueryOptions(params) {
var sort;
if(!params.sort){
sort=params.sort;
}
else if(!params.sort.includes('geplande-start')){
sort=params.sort+',-geplande-start';
}
else{
sort=params.sort;
}
return { sort: sort };
}
});
Loading

0 comments on commit ae0cd0d

Please sign in to comment.