From 40af8a49d7f3677acec9d83c1374b3a0a76445a6 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 18 Dec 2017 14:31:52 +0000 Subject: [PATCH] Make the event and contact itemUid the consistent. It was different between them and compared to viewing a journal's item. This was inconsistent and is now fixed. --- src/App.tsx | 4 ++-- src/Pim/PimMain.tsx | 4 ++-- src/Pim/index.tsx | 24 ++++++++++++------------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 3568e94..9d06602 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -51,7 +51,7 @@ export const routeResolver = new RouteResolver({ pim: { contacts: { _id: { - _base: ':contactUid', + _base: ':itemUid', edit: 'edit', log: 'log', }, @@ -59,7 +59,7 @@ export const routeResolver = new RouteResolver({ }, events: { _id: { - _base: ':eventUid', + _base: ':itemUid', edit: 'edit', log: 'log', }, diff --git a/src/Pim/PimMain.tsx b/src/Pim/PimMain.tsx index bd7ceca..b890c6a 100644 --- a/src/Pim/PimMain.tsx +++ b/src/Pim/PimMain.tsx @@ -47,14 +47,14 @@ class PimMain extends React.PureComponent { const uid = event.uid; this.props.history!.push( - routeResolver.getRoute('pim.events._id', { eventUid: uid })); + routeResolver.getRoute('pim.events._id', { itemUid: uid })); } contactClicked(contact: ContactType) { const uid = contact.uid; this.props.history!.push( - routeResolver.getRoute('pim.contacts._id', { contactUid: uid })); + routeResolver.getRoute('pim.contacts._id', { itemUid: uid })); } floatingButtonClicked() { diff --git a/src/Pim/index.tsx b/src/Pim/index.tsx index 5764004..f68fc7e 100644 --- a/src/Pim/index.tsx +++ b/src/Pim/index.tsx @@ -168,8 +168,8 @@ class Pim extends React.PureComponent { render={({match}) => ( @@ -184,7 +184,7 @@ class Pim extends React.PureComponent { )} @@ -202,7 +202,7 @@ class Pim extends React.PureComponent { onClick={() => history.push(routeResolver.getRoute( 'pim.contacts._id.log', - {contactUid: match.params.contactUid})) + {itemUid: match.params.itemUid})) } /> @@ -214,11 +214,11 @@ class Pim extends React.PureComponent { onClick={() => history.push(routeResolver.getRoute( 'pim.contacts._id.edit', - {contactUid: match.params.contactUid})) + {itemUid: match.params.itemUid})) } /> - + )} /> @@ -237,8 +237,8 @@ class Pim extends React.PureComponent { render={({match}) => ( @@ -253,7 +253,7 @@ class Pim extends React.PureComponent { )} @@ -271,7 +271,7 @@ class Pim extends React.PureComponent { onClick={() => history.push(routeResolver.getRoute( 'pim.events._id.log', - {eventUid: match.params.eventUid})) + {itemUid: match.params.itemUid})) } /> @@ -283,11 +283,11 @@ class Pim extends React.PureComponent { onClick={() => history.push(routeResolver.getRoute( 'pim.events._id.edit', - {eventUid: match.params.eventUid})) + {itemUid: match.params.itemUid})) } /> - + )} />