Skip to content

Commit

Permalink
Merge pull request #12 from fleetbase/dev-v0.0.11
Browse files Browse the repository at this point in the history
dev-v0.0.11
  • Loading branch information
roncodes authored May 17, 2024
2 parents 44dc31d + 467c7b4 commit 6b11bf9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 19 deletions.
7 changes: 4 additions & 3 deletions addon/controllers/users/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default class UsersIndexController extends Controller {
{
label: this.intl.t('iam.common.name'),
valuePath: 'name',
width: '170px',
width: '160px',
cellComponent: 'table/cell/user-name',
mediaPath: 'avatar_url',
action: this.editUser,
Expand Down Expand Up @@ -156,7 +156,7 @@ export default class UsersIndexController extends Controller {
label: this.intl.t('iam.users.index.created-at'),
valuePath: 'createdAt',
sortParam: 'created_at',
width: '130px',
width: '140px',
resizable: true,
sortable: false,
filterable: false,
Expand Down Expand Up @@ -266,7 +266,8 @@ export default class UsersIndexController extends Controller {
* @void
*/
@action exportUsers() {
this.crud.export('user');
const selections = this.table.selectedRows.map((_) => _.id);
this.crud.export('users', { params: { selections } });
}

/**
Expand Down
16 changes: 14 additions & 2 deletions addon/templates/users/index.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Layout::Section::Header @title={{t "iam.common.user"}} @searchQuery={{this.query}} @onSearch={{perform this.search}}>
{{#if (safe-has this.table "selectedRows")}}
{{#if (safe-has this.table "selectedRows")}}
<DropdownButton @icon="layer-group" @text={{t "iam.common.bulk-action"}} @type="magic" @size="sm" @buttonWrapperClass="mr-2" @contentClass="dropdown-menu" as |dd|>
<div class="next-dd-menu mt-2 mx-0">
<div class="px-1">
Expand All @@ -15,7 +15,19 @@
</Layout::Section::Header>

<Layout::Section::Body>
<Table @rows={{@model}} @columns={{this.columns}} @selectable={{true}} @canSelectAll={{true}} @onSetup={{fn (mut this.table)}} @pagination={{true}} @paginationMeta={{@model.meta}} @page={{this.page}} @onPageChange={{fn (mut this.page)}} @tfootVerticalOffset="53" @tfootVerticalOffsetElements=".next-view-section-subheader" />
<Table
@rows={{@model}}
@columns={{this.columns}}
@selectable={{true}}
@canSelectAll={{true}}
@onSetup={{fn (mut this.table)}}
@pagination={{true}}
@paginationMeta={{@model.meta}}
@page={{this.page}}
@onPageChange={{fn (mut this.page)}}
@tfootVerticalOffset="53"
@tfootVerticalOffsetElements=".next-view-section-subheader"
/>
</Layout::Section::Body>

{{outlet}}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fleetbase/iam-engine",
"version": "0.0.10",
"version": "0.0.11",
"description": "Fleetbase IAM extension provides identity and access management module for managing users, permissions and policies.",
"fleetbase": {
"route": "iam",
Expand Down Expand Up @@ -42,8 +42,8 @@
"publish:github": "npm config set '@fleetbase:registry' https://npm.pkg.github.com/ && npm publish"
},
"dependencies": {
"@fleetbase/ember-core": "^0.2.8",
"@fleetbase/ember-ui": "^0.2.12",
"@fleetbase/ember-core": "^0.2.10",
"@fleetbase/ember-ui": "^0.2.15",
"@babel/core": "^7.23.2",
"ember-cli-babel": "^8.2.0",
"ember-cli-htmlbars": "^6.3.0",
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6b11bf9

Please sign in to comment.