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.
master
Tom Hacohen 7 years ago
parent 35b3ce7f95
commit 40af8a49d7

@ -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',
},

@ -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() {

@ -168,8 +168,8 @@ class Pim extends React.PureComponent {
render={({match}) => (
<Container style={{maxWidth: 400}}>
<ContactEdit
initialCollection={(addressBookItems[match.params.contactUid] as any).journalUid}
contact={addressBookItems[match.params.contactUid]}
initialCollection={(addressBookItems[match.params.itemUid] as any).journalUid}
contact={addressBookItems[match.params.itemUid]}
collections={collectionsAddressBook}
onSave={this.onContactSave}
/>
@ -184,7 +184,7 @@ class Pim extends React.PureComponent {
<ItemChangeLog
syncInfo={this.props.syncInfo}
items={addressBookItems}
uid={match.params.contactUid}
uid={match.params.itemUid}
/>
</Container>
)}
@ -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}))
}
/>
</div>
<Contact item={addressBookItems[match.params.contactUid]} />
<Contact item={addressBookItems[match.params.itemUid]} />
</Container>
)}
/>
@ -237,8 +237,8 @@ class Pim extends React.PureComponent {
render={({match}) => (
<Container style={{maxWidth: 400}}>
<EventEdit
initialCollection={(calendarItems[match.params.eventUid] as any).journalUid}
event={calendarItems[match.params.eventUid]}
initialCollection={(calendarItems[match.params.itemUid] as any).journalUid}
event={calendarItems[match.params.itemUid]}
collections={collectionsCalendar}
onSave={this.onEventSave}
/>
@ -253,7 +253,7 @@ class Pim extends React.PureComponent {
<ItemChangeLog
syncInfo={this.props.syncInfo}
items={calendarItems}
uid={match.params.eventUid}
uid={match.params.itemUid}
/>
</Container>
)}
@ -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}))
}
/>
</div>
<Event item={calendarItems[match.params.eventUid]} />
<Event item={calendarItems[match.params.itemUid]} />
</Container>
)}
/>

Loading…
Cancel
Save