Test master
diff --git a/src/app/pages/contacts/contacts-list/contacts-list.component.ts b/src/app/pages/contacts/contacts-list/contacts-list.component.ts
index a6abc9a..7f61afa 100644
--- a/src/app/pages/contacts/contacts-list/contacts-list.component.ts
+++ b/src/app/pages/contacts/contacts-list/contacts-list.component.ts
@@ -27,8 +27,8 @@
styleUrls: ['./contacts-list.component.scss'],
})
export class ContactsListComponent extends BaseList implements OnInit, OnDestroy {
- public readonly NEW_EXTERNAL_PERSON_PATH = `/${Globals.PATH.PERSONS}/${Globals.PATH.EXTERNAL}/${Globals.PATH.NEW}`;
- public readonly NEW_INTERNAL_PERSON_PATH = `/${Globals.PATH.PERSONS}/${Globals.PATH.INTERNAL}/${Globals.PATH.NEW}`;
+ public readonly NEW_EXTERNAL_PERSON_PATH = `/${Globals.PATH.PERSONS}${Globals.PATH.EXTERNAL}/${Globals.PATH.NEW}`;
+ public readonly NEW_INTERNAL_PERSON_PATH = `/${Globals.PATH.PERSONS}${Globals.PATH.INTERNAL}/${Globals.PATH.NEW}`;
public readonly NEW_COMPANY_PATH = `/${Globals.PATH.COMPANY}/${Globals.PATH.NEW}`;
public readonly INTERNAL_PERSON = Globals.CONTACT_TYPE_ID.INTERNAL_PERSON;
diff --git a/src/app/pages/persons/persons.routing.module.ts b/src/app/pages/persons/persons.routing.module.ts
index 78aebf3..8aa7a18 100644
--- a/src/app/pages/persons/persons.routing.module.ts
+++ b/src/app/pages/persons/persons.routing.module.ts
@@ -20,12 +20,16 @@
const PATH = Globals.PATH;
export function isInternal(url: UrlSegment[], group: UrlSegmentGroup) {
- return group.segments[0].path.endsWith(`${Globals.PATH.PERSONS}${Globals.PATH.INTERNAL}`) ? { consumed: url, posParams: { contactId: url[0] } } : null;
+ const sePath = group.segments[0].path;
+ return sePath.endsWith(`${Globals.PATH.PERSONS}${Globals.PATH.INTERNAL}`) || sePath.endsWith(`${Globals.PATH.NEW}`)
+ ? { consumed: url, posParams: { contactId: url[0] } }
+ : null;
}
export function isExternal(url: UrlSegment[], group: UrlSegmentGroup) {
- console.log(url[0].path);
- console.log(group);
- return group.segments[0].path.endsWith(`${Globals.PATH.PERSONS}${Globals.PATH.EXTERNAL}`) ? { consumed: url, posParams: { contactId: url[0] } } : null;
+ const sePath = group.segments[0].path;
+ return sePath.endsWith(`${Globals.PATH.PERSONS}${Globals.PATH.EXTERNAL}`) || sePath.endsWith(`${Globals.PATH.NEW}`)
+ ? { consumed: url, posParams: { contactId: url[0] } }
+ : null;
}
const editPersonRoutes: Routes = [
{