mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-07 23:04:14 +00:00
file export
This commit is contained in:
@@ -40,6 +40,13 @@ export default class ConsoleAdminOrganizationsController extends Controller {
|
||||
*/
|
||||
@service filters;
|
||||
|
||||
/**
|
||||
* Inject the `crud` service
|
||||
*
|
||||
* @var {Service}
|
||||
*/
|
||||
@service crud;
|
||||
|
||||
/**
|
||||
* The search query param value.
|
||||
*
|
||||
@@ -166,4 +173,14 @@ export default class ConsoleAdminOrganizationsController extends Controller {
|
||||
@action goToCompany(company) {
|
||||
this.router.transitionTo('console.admin.organizations.index.users', company.public_id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles dialog to export `drivers`
|
||||
*
|
||||
* @void
|
||||
*/
|
||||
@action exportOrganization() {
|
||||
const selections = this.table.selectedRows.map((_) => _.id);
|
||||
this.crud.export('companies', { params: { selections } });
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
{{page-title (t "console.admin.organizations.index.title")}}
|
||||
{{!-- template-lint-disable no-unbound --}}
|
||||
<Layout::Section::Header @title={{t "console.admin.organizations.index.title"}} @searchQuery={{unbound this.query}} @onSearch={{this.search}} />
|
||||
{{! template-lint-disable no-unbound }}
|
||||
<Layout::Section::Header @title={{t "console.admin.organizations.index.title"}} @searchQuery={{unbound this.query}} @onSearch={{this.search}}>
|
||||
<Button @icon="long-arrow-up" @iconClass="rotate-icon-45" @text={{t "fleet-ops.common.export"}} @wrapperClass="hidden md:flex" @onClick={{this.exportOrganization}} />
|
||||
</Layout::Section::Header>
|
||||
|
||||
<Layout::Section::Body>
|
||||
<Table
|
||||
@rows={{@model}}
|
||||
@columns={{this.columns}}
|
||||
@selectable={{false}}
|
||||
@canSelectAll={{false}}
|
||||
@selectable={{true}}
|
||||
@canSelectAll={{true}}
|
||||
@onSetup={{fn (mut this.table)}}
|
||||
@pagination={{true}}
|
||||
@paginationMeta={{@model.meta}}
|
||||
|
||||
Reference in New Issue
Block a user