diff --git a/app/components/agenda/agenda-detail/sidebar-item.hbs b/app/components/agenda/agenda-detail/sidebar-item.hbs index 69cb4d9144..0effbfe3f6 100644 --- a/app/components/agenda/agenda-detail/sidebar-item.hbs +++ b/app/components/agenda/agenda-detail/sidebar-item.hbs @@ -31,23 +31,13 @@ {{#if (not @agendaitem.aboutToDelete)}} - {{#unless @isActive}} - {{#if (not @agendaitem.isApproval)}} - {{#if @agendaitem.shortTitle}} {{!-- Avoid rendering the same thing twice if no "shortTitle" exists --}} -
-                {{@agendaitem.title}}
-              
- {{/if}} - {{/if}} - {{/unless}}
-
{{#if @isNew}} - +

{{t "added-agendaitem-text"}}

@@ -59,7 +49,7 @@ {{#if (not this.newsletterIsVisible)}} - +

{{t "not-visible-in-newsletter"}}

diff --git a/app/components/agenda/agenda-header.hbs b/app/components/agenda/agenda-header.hbs index 01ab8f7ad4..128dc49620 100644 --- a/app/components/agenda/agenda-header.hbs +++ b/app/components/agenda/agenda-header.hbs @@ -147,7 +147,7 @@ hideOn="clickout click" showOn="click" animation="shift" - placement="bottom" + placement="bottom-end" as |attacher| }}
    diff --git a/app/components/agenda/agenda-overview.hbs b/app/components/agenda/agenda-overview.hbs index 67a4c8a8e7..c386252633 100644 --- a/app/components/agenda/agenda-overview.hbs +++ b/app/components/agenda/agenda-overview.hbs @@ -111,6 +111,7 @@ @previousAgenda={{@previousAgenda}} @showFormallyOkStatus={{this.isDesignAgenda}} @isEditingFormallyOkStatus={{this.isEditingOverview}} + @showDragHandle={{this.isDraggingEnabled}} /> {{/each}} diff --git a/app/components/agenda/agenda-overview/agenda-overview-item.hbs b/app/components/agenda/agenda-overview/agenda-overview-item.hbs index b77595da6b..f46412c04d 100644 --- a/app/components/agenda/agenda-overview/agenda-overview-item.hbs +++ b/app/components/agenda/agenda-overview/agenda-overview-item.hbs @@ -115,7 +115,7 @@ {{#if (not this.newsletterIsVisible)}}
    - +

    {{t "not-visible-in-newsletter"}}

    @@ -143,7 +143,7 @@ {{#if @isNew}}
    - +

    {{t "added-agendaitem-text"}}

    diff --git a/app/components/subcases/subcase-item.hbs b/app/components/subcases/subcase-item.hbs index c25d09ab74..153f216fdf 100644 --- a/app/components/subcases/subcase-item.hbs +++ b/app/components/subcases/subcase-item.hbs @@ -3,13 +3,13 @@ {{#if (is-pending @subcase.approved)}}
    {{else if (await @subcase.approved)}} -
    +
    {{else}} -
    +
    diff --git a/app/models/subcase.js b/app/models/subcase.js index 0653b29af5..48d70e1e4f 100644 --- a/app/models/subcase.js +++ b/app/models/subcase.js @@ -6,7 +6,7 @@ import { alias } from '@ember/object/computed'; import ModelWithModifier from 'frontend-kaleidos/models/model-with-modifier'; const { - attr, hasMany, belongsTo, PromiseArray, PromiseObject, + attr, hasMany, belongsTo, PromiseArray, } = DS; export default ModelWithModifier.extend({ @@ -144,25 +144,24 @@ export default ModelWithModifier.extend({ return null; }), - approved: computed('treatments', 'treatments.@each.decisionResultCode', function() { - return PromiseObject.create({ - promise: this.get('treatments').then((treatments) => { - if (treatments && treatments.get('length') > 0) { - const treatmentIds = treatments.map((treatment) => treatment.get('id')).join(','); - const drcIds = ['56312c4b-9d2a-4735-b0b1-2ff14bb524fd', '9f342a88-9485-4a83-87d9-245ed4b504bf'].join(','); - return this.store.query('agenda-item-treatment', { - filter: { - id: treatmentIds, - 'decision-result-code': { - id: drcIds, - }, - }, - include: 'decision-result-code', - }).then((treatments) => treatments.get('firstObject')); - } - return null; - }), - }); + approved: computed('treatments', 'treatments.@each.decisionResultCode', async function() { + const meeting = await this.get('requestedForMeeting'); + if (meeting.isFinal) { + const treatments = await this.get('treatments'); + if (treatments && treatments.get('length') > 0) { + const treatmentIds = treatments.map((treatment) => treatment.get('id')).join(','); + const approvedTreatment = await this.store.queryOne('agenda-item-treatment', { + 'filter[id]': treatmentIds, + 'filter[decision-result-code][:uri:]': CONFIG.DECISION_RESULT_CODE_URIS.GOEDGEKEURD, + }); + const acknowledgedTreatment = await this.store.queryOne('agenda-item-treatment', { + 'filter[id]': treatmentIds, + 'filter[decision-result-code][:uri:]': CONFIG.DECISION_RESULT_CODE_URIS.KENNISNAME, + }); + return !!approvedTreatment || !!acknowledgedTreatment; + } + } + return false; }), subcasesFromCase: computed('case.subcases.@each', function() { diff --git a/app/pods/agenda/agendaitems/index/controller.js b/app/pods/agenda/agendaitems/index/controller.js index c148d528f0..cfe85c9ac1 100644 --- a/app/pods/agenda/agendaitems/index/controller.js +++ b/app/pods/agenda/agendaitems/index/controller.js @@ -39,7 +39,7 @@ export default class AgendaitemsAgendaController extends Controller { // reorderedAgendaitems includes all items on the whole page. We only want to re-order within one category (nota/announcement/...) const reorderedAgendaitemsOfCategory = reorderedAgendaitems.filter((item) => item.showAsRemark === draggedAgendaItem.showAsRemark); yield setAgendaitemsPriority(reorderedAgendaitemsOfCategory, true, true); // permissions guarded in template (and backend) - this.refresh(); + this.send('reloadModel'); } @task diff --git a/app/styles/app.scss b/app/styles/app.scss index 78bc2dcedb..09a6e77648 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -1,8 +1,5 @@ @import 'ember-power-select'; @import 'ember-vo-webuniversum-data-table'; -// TODO: Deze fix is om ervoor te zetten dat de variabelen voor de ember-rdfa-editor op voorhand gezet worden zodat ze niett overschreven worden door de !default -@import 'fixes/fix-ember-rdfa-editor'; -@import 'ember-rdfa-editor'; /* ========================================================================== CSS file for Digikan ========================================================================== */ diff --git a/app/styles/custom-components/_vlc-rdfa-editor.scss b/app/styles/custom-components/_vlc-rdfa-editor.scss index ebfd3d4b67..e5d94bf4ad 100644 --- a/app/styles/custom-components/_vlc-rdfa-editor.scss +++ b/app/styles/custom-components/_vlc-rdfa-editor.scss @@ -1,3 +1,7 @@ +// Import custom config before 'ember-rdfa-editor' to overwrite !default's +@import '../fixes/fix-ember-rdfa-editor'; +@import 'ember-rdfa-editor'; + .rdfa-editor { height: 30rem; border: .1rem solid #BFC8D1; diff --git a/app/styles/fixes/_fix-ember-rdfa-editor.scss b/app/styles/fixes/_fix-ember-rdfa-editor.scss index 2caac23abd..4dfc52474d 100644 --- a/app/styles/fixes/_fix-ember-rdfa-editor.scss +++ b/app/styles/fixes/_fix-ember-rdfa-editor.scss @@ -3,3 +3,4 @@ $say-paper-sidebar: false; $say-editor-background: white; $say-toolbar-background: white; $say-editor-padding: 1rem; +$say-font: $base-font; diff --git a/cypress/integration/all-flaky-tests/subcase.spec.js b/cypress/integration/all-flaky-tests/subcase.spec.js index 8193c3b152..e08d8d7b96 100644 --- a/cypress/integration/all-flaky-tests/subcase.spec.js +++ b/cypress/integration/all-flaky-tests/subcase.spec.js @@ -74,10 +74,7 @@ context('Subcase tests', () => { cy.proposeSubcaseForAgenda(agendaDate); const monthDutch = getTranslatedMonth(agendaDate.month()); - const realmonth = agendaDate.month() + 1; // Js month start at 0. - const paddedMonth = realmonth < 10 ? `0${realmonth}` : realmonth; const dateFormat = `${agendaDate.date()} ${monthDutch} ${agendaDate.year()}`; - const dateFormatDotted = `${agendaDate.date()}.${paddedMonth}.${agendaDate.year()}`; const dateRegex = new RegExp(`.?${Cypress.moment(agendaDate).date()}.\\w+.${Cypress.moment(agendaDate).year()}`); cy.get('.vlc-status-timeline > li').eq(0) @@ -87,7 +84,9 @@ context('Subcase tests', () => { cy.get(cases.subcaseMeetingPlannedStart).contains(/Ingediend voor de agenda van/); cy.get(cases.subcaseMeetingPlannedStart).contains(dateRegex); cy.get(agenda.subcase.agendaLink).contains(dateFormat); - cy.get(cases.subcaseDecidedOn).contains(dateFormatDotted); + // The "decided on" field was already filled in right after proposing for agenda for a long time + // this field has been changed to take in account if the relevant meeting is final to show this info + cy.get(cases.subcaseDecidedOn).contains('Nog niet beslist'); // Deze test volgt het al dan niet default "beslist" zijn van een beslissing. // Default = beslist, assert dotted date; default = niet beslist: assert "nog niet beslist". cy.get(cases.subcaseRequestedBy).contains(/Hilde Crevits/); @@ -139,17 +138,16 @@ context('Subcase tests', () => { cy.proposeSubcaseForAgenda(agendaDate); const monthDutch = getTranslatedMonth(agendaDate.month()); - const realmonth = agendaDate.month() + 1; // Js month start at 0. - const paddedMonth = realmonth < 10 ? `0${realmonth}` : realmonth; const dateFormat = `${agendaDate.date()} ${monthDutch} ${agendaDate.year()}`; - const dateFormatDotted = `${agendaDate.date()}.${paddedMonth}.${agendaDate.year()}`; const dateRegex = new RegExp(`.?${Cypress.moment(agendaDate).date()}.\\w+.${Cypress.moment(agendaDate).year()}`); cy.get(cases.subcaseMeetingNumber); cy.get(cases.subcaseMeetingPlannedStart).contains(/Ingediend voor de agenda van/); cy.get(cases.subcaseMeetingPlannedStart).contains(dateRegex); cy.get(agenda.subcase.agendaLink).contains(dateFormat); - cy.get(cases.subcaseDecidedOn).contains(dateFormatDotted); + // The "decided on" field was already filled in right after proposing for agenda for a long time + // this field has been changed to take in account if the relevant meeting is final to show this info + cy.get(cases.subcaseDecidedOn).contains('Nog niet beslist'); // Deze test volgt het al dan niet default "beslist" zijn van een beslissing. // Default = beslist, assert dotted date; default = niet beslist: assert "nog niet beslist". cy.get(cases.subcaseRequestedBy).contains(/Hilde Crevits/); @@ -354,4 +352,19 @@ context('Subcase tests', () => { cy.get(agenda.item.themes).contains('Wonen') .should('not.exist'); }); + + it('After finalizing agenda, subcase info should change to the approved status', () => { + const realmonth = agendaDate.month() + 1; // Js month start at 0. + const paddedMonth = realmonth < 10 ? `0${realmonth}` : realmonth; + const dateFormatDotted = `${agendaDate.date()}.${paddedMonth}.${agendaDate.year()}`; + + cy.openAgendaForDate(agendaDate); + cy.setAllItemsFormallyOk(5); + cy.approveAndCloseDesignAgenda(true); + + cy.visit('/dossiers/5F02E3F87DE3FC0008000002/deeldossiers'); + cy.get(cases.overviewSubcaseInfo.approved).should('have.length', 3); + cy.openSubcase(2); + cy.get(cases.subcaseDecidedOn).contains(dateFormatDotted); + }); }); diff --git a/cypress/selectors/case.selectors.js b/cypress/selectors/case.selectors.js index 826d82a358..76db21cb38 100644 --- a/cypress/selectors/case.selectors.js +++ b/cypress/selectors/case.selectors.js @@ -11,5 +11,10 @@ const selectors = { subcaseRequestedBy: '[data-test-subcase-requested-by]', subcaseMeetingNumber: '[data-test-meeting-number]', subcaseMeetingPlannedStart: '[data-test-meeting-plannedStart]', + + overviewSubcaseInfo: { + approved: '[data-test-case-overview-subcase-approved]', + notApproved: '[data-test-case-overview-subcase-not-approved]', + }, }; export default selectors; diff --git a/ember-cli-build.js b/ember-cli-build.js index 76910720dd..d0050d73aa 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -11,6 +11,9 @@ module.exports = function (defaults) { sassOptions: { extension: 'scss', sourceMapEmbed: process.env.DEPLOY_ENV !== 'production', + includePaths: [ + 'node_modules/@lblod/ember-rdfa-editor/app/styles/', // as a workaround for https://github.com/ember-cli/ember-cli/issues/8026#issuecomment-420245390 + ], }, flatpickr: { locales: ['nl'], diff --git a/package.json b/package.json index e8fdba4e5d..9552e56bc7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "frontend-kaleidos", - "version": "5.7.0", + "version": "5.9.0", "private": true, "description": "Small description for frontend-kaleidos goes here", "repository": "",