Skip to content

Commit

Permalink
Merge pull request #636 from lblod/appuniversum-v3-update
Browse files Browse the repository at this point in the history
[OP-3343] Appuniversum v3 update
  • Loading branch information
Windvis authored Aug 22, 2024
2 parents 0c279ed + 544a818 commit b83f658
Show file tree
Hide file tree
Showing 28 changed files with 596 additions and 525 deletions.
2 changes: 1 addition & 1 deletion app/components/app-header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@alignment="right"
role="menu"
>
<AuLink @skin="tertiary" role="menuitem" @route="select-role">
<AuLink role="menuitem" @route="select-role">
<AuIcon @icon="user" @alignment="left" />Wissel van rol
</AuLink>

Expand Down
2 changes: 1 addition & 1 deletion app/components/datepicker.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@error={{@error}}
{{on 'focusout' this.focusOut}}
@width={{this.width}}
@id={{@id}}
id={{@id}}
{{au-date-input value=@value onChange=this.onChange}}
...attributes
/>
6 changes: 4 additions & 2 deletions app/components/related-organizations-view-table.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
{{! TODO: place next to each other }}
<div class="au-o-box">
<AuToggleSwitch
@label="Verberg niet actieve organisaties"
@checked={{@organizationStatus}}
/>
@onChange={{fn @onOrganizationStatusChange (not @organizationStatus)}}
>
Verberg niet actieve organisaties
</AuToggleSwitch>

<MembershipRoleSelect
@options={{@model.roles}}
Expand Down
4 changes: 2 additions & 2 deletions app/components/trim-input.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
@error={{@error}}
autocomplete={{@autocomplete}}
@width={{@width}}
@id={{@id}}
@value={{@value}}
id={{@id}}
value={{@value}}
{{on "focusout" (perform this.trimInput)}}
...attributes
/>
5 changes: 3 additions & 2 deletions app/controllers/organizations/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ export default class OrganizationsNewController extends Controller {
}

@action
setKbo(value) {
this.model.structuredIdentifierKBO.localId = value;
setKbo(event) {
this.model.structuredIdentifierKBO.localId =
event.target.inputmask.unmaskedvalue();
}

@action
Expand Down
5 changes: 3 additions & 2 deletions app/controllers/organizations/organization/core-data/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ export default class OrganizationsOrganizationCoreDataEditController extends Con
}

@action
setKbo(value) {
this.model.structuredIdentifierKBO.localId = value;
setKbo(event) {
this.model.structuredIdentifierKBO.localId =
event.target.inputmask.unmaskedvalue();
}

@dropTask
Expand Down
3 changes: 3 additions & 0 deletions app/helpers/boolean.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function boolean(value) {
return Boolean(value);
}
5 changes: 5 additions & 0 deletions app/helpers/event-value.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function eventValue(handler) {
return function (event) {
return handler(event.target.value);
};
}
115 changes: 15 additions & 100 deletions app/styles/app.scss
Original file line number Diff line number Diff line change
@@ -1,115 +1,30 @@
/* ==================================
#APPUNIVERSUM
================================== */
// SETTINGS: Project settings and variables
@import '@appuniversum/ember-appuniversum/styles/a-settings';

/**
* A design universe for Flanders GOV applications
*/
// TOOLS: Mixins
@import '@appuniversum/ember-appuniversum/styles/a-tools';

/**
* CONTENTS
* ---
* SETTINGS: Project settings and variables
* TOOLS: Mixins
* GENERIC: Reset, global box-sizing and font-styles
* ELEMENTS: Plain html tag styling
* OBJECTS: OOCSS unstyled objects (namespace: '.au-o-...')
* COMPONENTS: Components (namespace: '.au-c-...')
* UTILITIES: Single function helper classes (namespace: '.au-u-...')
*/
// GENERIC: Reset, global box-sizing and font-styles
@import '@appuniversum/ember-appuniversum/styles/a-generic';

// VARIABLES
// ELEMENTS: Plain html tag styling
@import '@appuniversum/ember-appuniversum/styles/a-elements';

@import 'ember-appuniversum/s-colors';
@import 'ember-appuniversum/s-global';
@import 'ember-appuniversum/s-utilities';
@import 'ember-appuniversum/s-root';
// OBJECTS: OOCSS unstyled objects (namespace: '.au-o-...')
@import '@appuniversum/ember-appuniversum/styles/a-objects';

// MIXINS
@import 'ember-appuniversum/t-font-size';
@import 'ember-appuniversum/t-sass-mq';

// GENERIC
@import 'ember-appuniversum/g-reset';
@import 'ember-appuniversum/g-box-sizing';
@import 'ember-appuniversum/g-font';

// ELEMENTS
@import 'ember-appuniversum/e-page';

// OBJECTS
@import 'ember-appuniversum/o-box';
@import 'ember-appuniversum/o-flow';
@import 'ember-appuniversum/o-grid';
@import 'ember-appuniversum/o-layout';
@import 'ember-appuniversum/o-region';

// COMPONENTS
@import 'ember-appuniversum/c-accordion';
@import 'ember-appuniversum/c-alert';
@import 'ember-appuniversum/c-app';
@import 'ember-appuniversum/c-badge';
@import 'ember-appuniversum/c-body-container';
@import 'ember-appuniversum/c-brand';
@import 'ember-appuniversum/c-button';
@import 'ember-appuniversum/c-button-group';
@import 'ember-appuniversum/c-card';
@import 'ember-appuniversum/c-content';
@import 'ember-appuniversum/c-content-header';
@import 'ember-appuniversum/c-control';
@import 'ember-appuniversum/c-data-table';
@import 'ember-appuniversum/c-dropdown';
@import 'ember-appuniversum/c-file-upload';
@import 'ember-appuniversum/c-form';
@import 'ember-appuniversum/c-heading';
@import 'ember-appuniversum/c-help-text';
@import 'ember-appuniversum/c-hr';
@import 'ember-appuniversum/c-icon';
@import 'ember-appuniversum/c-input';
@import 'ember-appuniversum/c-label';
@import 'ember-appuniversum/c-link';
@import 'ember-appuniversum/c-list-horizontal';
@import 'ember-appuniversum/c-list-navigation';
@import 'ember-appuniversum/c-loader';
@import 'ember-appuniversum/c-pagination';
@import 'ember-appuniversum/c-pill';
@import 'ember-appuniversum/c-main-container';
@import 'ember-appuniversum/c-main-header';
@import 'ember-appuniversum/c-main-footer';
@import 'ember-appuniversum/c-modal';
@import 'ember-appuniversum/c-sidebar';
@import 'ember-appuniversum/c-sidebar-action';
@import 'ember-appuniversum/c-table';
@import 'ember-appuniversum/c-tabs';
@import 'ember-appuniversum/c-textarea';
@import 'ember-appuniversum/c-timepicker';
@import 'ember-appuniversum/c-toolbar';
@import 'ember-appuniversum/c-toggle-switch';
// COMPONENTS: Components (namespace: '.au-c-...')
@import '@appuniversum/ember-appuniversum/styles/a-components';
@import 'components/cards';
@import 'components/sidebar-container';
@import 'components/table-message';
@import 'components/c-rich-text-editor';

// PLUGINS
@import 'ember-appuniversum/p-ember-power-select';
@import 'ember-appuniversum/p-duet-datepicker';
@import '@appuniversum/ember-appuniversum/styles/a-plugins';

// UTILITIES
@import 'ember-appuniversum/u-align-text';
@import 'ember-appuniversum/u-background';
@import 'ember-appuniversum/u-break-word';
@import 'ember-appuniversum/u-flex';
@import 'ember-appuniversum/u-headings';
@import 'ember-appuniversum/u-hide';
@import 'ember-appuniversum/u-font-family';
@import 'ember-appuniversum/u-font-weights';
@import 'ember-appuniversum/u-max-widths';
@import 'ember-appuniversum/u-paragraphs';
@import 'ember-appuniversum/u-print';
@import 'ember-appuniversum/u-responsive-spacings';
@import 'ember-appuniversum/u-spacings';
@import 'ember-appuniversum/u-visible';
@import 'ember-appuniversum/u-widths';
// UTILITIES: Single function helper classes (namespace: '.au-u-...')
@import '@appuniversum/ember-appuniversum/styles/a-utilities';

// ember-rdfa-editor styles
// TODO: `@import "ember-rdfa-editor";` imports annotation styles which are _huge_ when compiled
Expand Down
4 changes: 3 additions & 1 deletion app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
)
}}

<AuModalContainer />

<AuApp class='{{if this.showEnvironment 'au-c-app--environment'}}'>
{{#if this.showEnvironment}}
<EnvironmentBanner
Expand Down Expand Up @@ -32,4 +34,4 @@
{{outlet}}
</div>
</main>
</AuApp>
</AuApp>
2 changes: 1 addition & 1 deletion app/templates/mock-login.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class="au-o-box au-o-box--small au-c-card au-u-margin-bottom-small"
>
<AuButton
@skin="tertiary"
@skin="link"
{{on
"click"
(fn login.login account.id account.user.group.id)
Expand Down
2 changes: 1 addition & 1 deletion app/templates/organizations/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
/>
</div>
<div class="au-o-grid__item">
<AuButton @skin="tertiary" type="reset">
<AuButton @skin="link" type="reset">
<AuIcon @icon="cross" @alignment="left" />
Herstel alle filters
</AuButton>
Expand Down
56 changes: 21 additions & 35 deletions app/templates/organizations/new.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -143,36 +143,20 @@
<Item @alignTop={{true}}>
<:label>Grensoverschrijvend</:label>
<:content>
<ul class="au-c-list-inline">
<li class="au-c-list-inline__item">
<AuControlRadio
@label="Ja"
@name="is-cross-border"
@value={{this.currentOrganizationModel.crossBorder}}
@identifier="cross-border-true"
@onChange={{fn
(mut this.currentOrganizationModel.crossBorder)
true
}}
checked={{this.currentOrganizationModel.crossBorder}}
/>
</li>
<li class="au-c-list-inline__item">
<AuControlRadio
@label="Nee"
@name="is-cross-border"
@value={{this.currentOrganizationModel.crossBorder}}
@identifier="cross-border-false"
@onChange={{fn
(mut this.currentOrganizationModel.crossBorder)
false
}}
checked={{not
this.currentOrganizationModel.crossBorder
}}
/>
</li>
</ul>
<AuRadioGroup
@alignment="inline"
@name="is-cross-border"
@selected={{boolean
this.currentOrganizationModel.crossBorder
}}
@onChange={{fn
(mut this.currentOrganizationModel.crossBorder)
}}
as |Group|
>
<Group.Radio @value={{true}}>Ja</Group.Radio>
<Group.Radio @value={{false}}>Nee</Group.Radio>
</AuRadioGroup>
</:content>
</Item>
{{/if}}
Expand Down Expand Up @@ -241,15 +225,17 @@
<:label>{{@model.identifierKBO.idName}}</:label>
<:content as |hasError|>
<AuInput
@maskPlaceholder="_"
autocomplete="off"
@mask="####.###.###"
@onChange={{this.setKbo}}
@width="block"
@value={{@model.structuredIdentifierKBO.localId}}
@error={{hasError}}
autocomplete="off"
value={{@model.structuredIdentifierKBO.localId}}
id="kbo-identifier"
class="au-c-input--mask"
placeholder="____.___.___"
{{au-inputmask
options=(hash mask="####.###.###" placeholder="_")
}}
{{on "input" this.setKbo}}
/>
</:content>
<:error as |error|>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@
<:label>Beschrijving</:label>
<:content>
<AuTextarea
@value={{@model.changeEvent.description}}
@width="block"
value={{@model.changeEvent.description}}
id="change-event-description"
{{on
"input"
(event-value (fn (mut @model.changeEvent.description)))
}}
/>
</:content>
</Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@
<:label>Beschrijving</:label>
<:content>
<AuTextarea
@value={{@model.changeEvent.description}}
@width="block"
value={{@model.changeEvent.description}}
id="change-event-description"
{{on
"input"
(event-value (fn (mut @model.changeEvent.description)))
}}
/>
</:content>
</Item>
Expand Down
Loading

0 comments on commit b83f658

Please sign in to comment.