Browse Source
* Split up import/export into separate modules * Fix routing and apply PR feedback * Renamed OrganizationExport exports to OrganizationVaultExport * Renamed filenames according to export rename --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>pull/6557/head
23 changed files with 103 additions and 44 deletions
@ -0,0 +1,25 @@ |
|||||||
|
import { NgModule } from "@angular/core"; |
||||||
|
import { RouterModule, Routes } from "@angular/router"; |
||||||
|
|
||||||
|
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; |
||||||
|
|
||||||
|
import { OrganizationPermissionsGuard } from "../../guards/org-permissions.guard"; |
||||||
|
|
||||||
|
import { OrganizationVaultExportComponent } from "./org-vault-export.component"; |
||||||
|
|
||||||
|
const routes: Routes = [ |
||||||
|
{ |
||||||
|
path: "", |
||||||
|
component: OrganizationVaultExportComponent, |
||||||
|
canActivate: [OrganizationPermissionsGuard], |
||||||
|
data: { |
||||||
|
titleId: "exportVault", |
||||||
|
organizationPermissions: (org: Organization) => org.canAccessImportExport, |
||||||
|
}, |
||||||
|
}, |
||||||
|
]; |
||||||
|
|
||||||
|
@NgModule({ |
||||||
|
imports: [RouterModule.forChild(routes)], |
||||||
|
}) |
||||||
|
export class OrganizationVaultExportRoutingModule {} |
||||||
@ -0,0 +1,12 @@ |
|||||||
|
import { NgModule } from "@angular/core"; |
||||||
|
|
||||||
|
import { LooseComponentsModule, SharedModule } from "../../../../shared"; |
||||||
|
|
||||||
|
import { OrganizationVaultExportRoutingModule } from "./org-vault-export-routing.module"; |
||||||
|
import { OrganizationVaultExportComponent } from "./org-vault-export.component"; |
||||||
|
|
||||||
|
@NgModule({ |
||||||
|
imports: [SharedModule, LooseComponentsModule, OrganizationVaultExportRoutingModule], |
||||||
|
declarations: [OrganizationVaultExportComponent], |
||||||
|
}) |
||||||
|
export class OrganizationVaultExportModule {} |
||||||
@ -0,0 +1,17 @@ |
|||||||
|
import { NgModule } from "@angular/core"; |
||||||
|
import { RouterModule, Routes } from "@angular/router"; |
||||||
|
|
||||||
|
import { ImportComponent } from "./import.component"; |
||||||
|
|
||||||
|
const routes: Routes = [ |
||||||
|
{ |
||||||
|
path: "", |
||||||
|
component: ImportComponent, |
||||||
|
data: { titleId: "importData" }, |
||||||
|
}, |
||||||
|
]; |
||||||
|
|
||||||
|
@NgModule({ |
||||||
|
imports: [RouterModule.forChild(routes)], |
||||||
|
}) |
||||||
|
export class ImportRoutingModule {} |
||||||
@ -0,0 +1,12 @@ |
|||||||
|
import { NgModule } from "@angular/core"; |
||||||
|
|
||||||
|
import { LooseComponentsModule, SharedModule } from "../../shared"; |
||||||
|
|
||||||
|
import { ExportRoutingModule } from "./export-routing.module"; |
||||||
|
import { ExportComponent } from "./export.component"; |
||||||
|
|
||||||
|
@NgModule({ |
||||||
|
imports: [SharedModule, LooseComponentsModule, ExportRoutingModule], |
||||||
|
declarations: [ExportComponent], |
||||||
|
}) |
||||||
|
export class ExportModule {} |
||||||
Loading…
Reference in new issue