Moved contact components under Contacts and remove from Pim.

master
Tom Hacohen 4 years ago
parent 460c712411
commit 36e5f2ccff

@ -12,7 +12,7 @@ import CommunicationChatBubble from "@material-ui/icons/ChatBubble";
import CommunicationEmail from "@material-ui/icons/Email"; import CommunicationEmail from "@material-ui/icons/Email";
import CopyIcon from "../icons/Copy"; import CopyIcon from "../icons/Copy";
import PimItemHeader from "./PimItemHeader"; import PimItemHeader from "../components/PimItemHeader";
import { ContactType } from "../pim-types"; import { ContactType } from "../pim-types";
import { IconButton, Avatar } from "@material-ui/core"; import { IconButton, Avatar } from "@material-ui/core";

@ -14,10 +14,10 @@ import { ContactType, PimType } from "../pim-types";
import { useCredentials } from "../credentials"; import { useCredentials } from "../credentials";
import { useItems, useCollections, getCollectionManager } from "../etebase-helpers"; import { useItems, useCollections, getCollectionManager } from "../etebase-helpers";
import { routeResolver } from "../App"; import { routeResolver } from "../App";
import SearchableAddressBook from "../components/SearchableAddressBook"; import SearchableAddressBook from "./SearchableAddressBook";
import Contact from "../components/Contact"; import Contact from "./Contact";
import LoadingIndicator from "../widgets/LoadingIndicator"; import LoadingIndicator from "../widgets/LoadingIndicator";
import ContactEdit from "../components/ContactEdit"; import ContactEdit from "./ContactEdit";
import PageNotFound from "../PageNotFound"; import PageNotFound from "../PageNotFound";
import { CachedCollection, getItemNavigationUid, getDecryptCollectionsFunction, getDecryptItemsFunction } from "../Pim/helpers"; import { CachedCollection, getItemNavigationUid, getDecryptCollectionsFunction, getDecryptItemsFunction } from "../Pim/helpers";

@ -11,7 +11,7 @@ import IconClear from "@material-ui/icons/Clear";
import { ContactType } from "../pim-types"; import { ContactType } from "../pim-types";
import AddressBook from "../components/AddressBook"; import AddressBook from "./AddressBook";
interface PropsType { interface PropsType {
entries: ContactType[]; entries: ContactType[];

@ -24,8 +24,6 @@ import { PimType, ContactType, EventType, TaskType } from "../pim-types";
import Container from "../widgets/Container"; import Container from "../widgets/Container";
import JournalEntries from "../components/JournalEntries"; import JournalEntries from "../components/JournalEntries";
import ContactEdit from "../components/ContactEdit";
import Contact from "../components/Contact";
import EventEdit from "../components/EventEdit"; import EventEdit from "../components/EventEdit";
import Event from "../components/Event"; import Event from "../components/Event";
import TaskEdit from "../components/Tasks/TaskEdit"; import TaskEdit from "../components/Tasks/TaskEdit";
@ -389,26 +387,10 @@ class Pim extends React.PureComponent {
} }
public render() { public render() {
const { collectionsAddressBook, collectionsCalendar, collectionsTaskList, addressBookItems, calendarItems, taskListItems } = itemsSelector(this.props); const { collectionsCalendar, collectionsTaskList, calendarItems, taskListItems } = itemsSelector(this.props);
return ( return (
<Switch> <Switch>
<Route
path={routeResolver.getRoute("pim.contacts")}
render={() => (
<CollectionRoutes
syncInfo={this.props.syncInfo}
routePrefix="pim.contacts"
collections={collectionsAddressBook}
items={addressBookItems}
componentEdit={ContactEdit}
componentView={Contact}
onItemSave={this.onItemSave}
onItemDelete={this.onItemDelete}
onItemCancel={this.onCancel}
/>
)}
/>
<Route <Route
path={routeResolver.getRoute("pim.events")} path={routeResolver.getRoute("pim.events")}
render={() => ( render={() => (

Loading…
Cancel
Save