Skip to content

Commit 3ab79bf

Browse files
committed
remove org id from org rotues
1 parent d667d8b commit 3ab79bf

File tree

8 files changed

+11
-17
lines changed

8 files changed

+11
-17
lines changed

src/app/app.routes.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,8 @@ export const appRoutes: Route[] = [
8181
{ path: 'about', title: 'About', component: AboutComponent },
8282
{ path: 'contact', title: 'Contact', component: ContactComponent },
8383
{ path: 'documentation', title: 'Documentation', component: DocumentationComponent },
84-
{ path: 'organizations', component: OrganizationsListComponent },
8584
{
86-
path: 'organizations/:organizationId',
87-
component: OrganizationsNavComponent,
85+
path: 'organizations',
8886
loadChildren: () => import('app/modules/organizations/organizations.routes'),
8987
},
9088
// 404, redirect to dashboard

src/app/core/navigation/navigation.service.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ export class NavigationService {
3535
children: [
3636
{ id: 'organizations/settings', link: 'organizations/settings', title: 'Settings', icon: 'fa-solid:gears', type: 'basic' },
3737
{ id: 'organizations/access-level-tree', link: '/organizations/access-level-tree', title: 'Access Level Tree', icon: 'fa-solid:sitemap', type: 'basic' },
38-
{ id: 'organizations/column-mappings', link: '/organizations/column-mappings/properties', title: 'Column mappings', icon: 'fa-solid:sitemap', type: 'basic' },
39-
{ id: 'organizations/column-settings', link: '/organizations/column-settings/properties', title: 'Column Settings', icon: 'fa-solid:sliders', type: 'basic' },
38+
{ id: 'organizations/column-mappings', link: '/organizations/column-mappings/properties', title: 'Column mappings', icon: 'fa-solid:sitemap', type: 'basic', regexMatch: /^\/organizations\/column-mappings\/(properties|taxlots)/ },
39+
{ id: 'organizations/column-settings', link: '/organizations/column-settings/properties', title: 'Column Settings', icon: 'fa-solid:sliders', type: 'basic', regexMatch: /^\/organizations\/column-settings\/(properties|taxlots)/ },
4040
{ id: 'organizations/cycles', link: '/organizations/cycles', title: 'Cycles', icon: 'fa-solid:calendar-days', type: 'basic' },
41-
{ id: 'organizations/data-quality', link: '/organizations/data-quality/properties', title: 'Data Quality', icon: 'fa-solid:flag', type: 'basic' },
42-
{ id: 'organizations/derived-columns', link: '/organizations/derived-columns/properties', title: 'Derived Columns', icon: 'fa-solid:calculator', type: 'basic' },
41+
{ id: 'organizations/data-quality', link: '/organizations/data-quality/properties', title: 'Data Quality', icon: 'fa-solid:flag', type: 'basic', regexMatch: /^\/organizations\/data-quality\/(properties|taxlots)/ },
42+
{ id: 'organizations/derived-columns', link: '/organizations/derived-columns/properties', title: 'Derived Columns', icon: 'fa-solid:calculator', type: 'basic', regexMatch: /^\/organizations\/derived-columns\/(properties|taxlots)/ },
4343
{ id: 'organizations/email-templates', link: '/organizations/email-templates', title: 'Email Templates', icon: 'fa-solid:envelope', type: 'basic' },
4444
{ id: 'organizations/labels', link: '/organizations/labels', title: 'Labels', icon: 'fa-solid:tags', type: 'basic' },
4545
{ id: 'organizations/members', link: '/organizations/members', title: 'Members', icon: 'fa-solid:user', type: 'basic' },

src/app/layout/layouts/main/main.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class MainLayoutComponent implements OnInit, OnDestroy {
5151
this.isScreenSmall = !matchingAliases.includes('md')
5252

5353
// Change the navigation appearance
54-
this.navigationAppearance = this.isScreenSmall ? 'default' : 'dense'
54+
this.navigationAppearance = this.isScreenSmall ? 'dense' : 'default'
5555
})
5656

5757
this._versionService.version$.pipe(takeUntil(this._unsubscribeAll$)).subscribe(({ version, sha }) => {

src/app/modules/organizations/organizations-column-mappings/organizations-column-mappings.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ export class OrganizationsColumnMappingsComponent implements OnInit {
2626

2727
async toggleInventoryType(type: OrganizationTab) {
2828
if (type !== this.type) {
29-
const orgId = this._route.snapshot.parent.params.organizationId as string
30-
const newRoute = `/organizations/${orgId}/column-mappings/${type}`
29+
const newRoute = `/organizations/column-mappings/${type}`
3130
await this._router.navigateByUrl(newRoute, { skipLocationChange: false })
3231
this.type = type
3332
}

src/app/modules/organizations/organizations-column-settings/organizations-column-settings.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ export class OrganizationsColumnSettingsComponent implements OnInit {
2424

2525
async toggleInventoryType(type: InventoryType) {
2626
if (type !== this.type) {
27-
const orgId = this._route.snapshot.parent.params.organizationId as string
28-
const newRoute = `/organizations/${orgId}/column-settings/${type}`
27+
const newRoute = `/organizations/column-settings/${type}`
2928
await this._router.navigateByUrl(newRoute, { skipLocationChange: false })
3029
this.type = type
3130
}

src/app/modules/organizations/organizations-data-quality/organizations-data-quality.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ export class OrganizationsDataQualityComponent implements OnInit {
2626

2727
async toggleInventoryType(type: OrganizationTab) {
2828
if (type !== this.type) {
29-
const orgId = this._route.snapshot.parent.params.organizationId as string
30-
const newRoute = `/organizations/${orgId}/data-quality/${type}`
29+
const newRoute = `/organizations/data-quality/${type}`
3130
await this._router.navigateByUrl(newRoute, { skipLocationChange: false })
3231
this.type = type
3332
}

src/app/modules/organizations/organizations-derived-columns/organizations-derived-columns.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ export class OrganizationsDerivedColumnsComponent implements OnInit {
2424

2525
async toggleInventoryType(type: InventoryType) {
2626
if (type !== this.type) {
27-
const orgId = this._route.snapshot.parent.params.organizationId as string
28-
const newRoute = `/organizations/${orgId}/column-mappings/${type}`
27+
const newRoute = `/organizations/derived-columns/${type}`
2928
await this._router.navigateByUrl(newRoute, { skipLocationChange: false })
3029
this.type = type
3130
}

src/app/modules/organizations/organizations.routes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const organizationsDerivedColumnsTypeMatcher = (segments: UrlSegment[]) => {
4040
}
4141

4242
export default [
43-
{ path: '', component: OrganizationsSettingsComponent },
43+
{ path: 'settings', component: OrganizationsSettingsComponent },
4444
{ path: 'access-level-tree', component: OrganizationsAccessLevelTreeComponent },
4545
{ matcher: OrganizationsColumnMappingTypeMatcher, component: OrganizationsColumnMappingsComponent },
4646
{ matcher: organizationsColumnSettingsTypeMatcher, component: OrganizationsColumnSettingsComponent },

0 commit comments

Comments
 (0)