@axelor/aos-mobile-crm 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -0
- package/lib/api/catalog-api.d.ts +5 -0
- package/lib/api/catalog-api.js +36 -0
- package/lib/api/catalog-api.js.map +1 -0
- package/lib/api/client-api.d.ts +18 -0
- package/lib/api/client-api.js +81 -0
- package/lib/api/client-api.js.map +1 -0
- package/lib/api/contact-api.d.ts +23 -0
- package/lib/api/contact-api.js +110 -0
- package/lib/api/contact-api.js.map +1 -0
- package/lib/api/event-api.d.ts +10 -0
- package/lib/api/event-api.js +128 -0
- package/lib/api/event-api.js.map +1 -0
- package/lib/api/function-api.d.ts +1 -0
- package/lib/api/function-api.js +24 -0
- package/lib/api/function-api.js.map +1 -0
- package/lib/api/index.d.ts +1 -0
- package/lib/api/index.js +19 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/leads-api.d.ts +33 -0
- package/lib/api/leads-api.js +109 -0
- package/lib/api/leads-api.js.map +1 -0
- package/lib/api/opportunities-api.d.ts +29 -0
- package/lib/api/opportunities-api.js +102 -0
- package/lib/api/opportunities-api.js.map +1 -0
- package/lib/api/partner-api.d.ts +7 -0
- package/lib/api/partner-api.js +74 -0
- package/lib/api/partner-api.js.map +1 -0
- package/lib/api/prospect-api.d.ts +24 -0
- package/lib/api/prospect-api.js +94 -0
- package/lib/api/prospect-api.js.map +1 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +20 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/molecules/CatalogCard/CatalogCard.d.ts +13 -0
- package/lib/components/molecules/CatalogCard/CatalogCard.js +94 -0
- package/lib/components/molecules/CatalogCard/CatalogCard.js.map +1 -0
- package/lib/components/molecules/ContactInfoCard/ContactInfoCard.d.ts +14 -0
- package/lib/components/molecules/ContactInfoCard/ContactInfoCard.js +69 -0
- package/lib/components/molecules/ContactInfoCard/ContactInfoCard.js.map +1 -0
- package/lib/components/molecules/EventCard/EventCard.d.ts +11 -0
- package/lib/components/molecules/EventCard/EventCard.js +114 -0
- package/lib/components/molecules/EventCard/EventCard.js.map +1 -0
- package/lib/components/molecules/LeadsCard/LeadsCard.d.ts +19 -0
- package/lib/components/molecules/LeadsCard/LeadsCard.js +88 -0
- package/lib/components/molecules/LeadsCard/LeadsCard.js.map +1 -0
- package/lib/components/molecules/LiteContactCard/LiteContactCard.d.ts +10 -0
- package/lib/components/molecules/LiteContactCard/LiteContactCard.js +47 -0
- package/lib/components/molecules/LiteContactCard/LiteContactCard.js.map +1 -0
- package/lib/components/molecules/OpportunityCard/OpportunityCard.d.ts +14 -0
- package/lib/components/molecules/OpportunityCard/OpportunityCard.js +72 -0
- package/lib/components/molecules/OpportunityCard/OpportunityCard.js.map +1 -0
- package/lib/components/molecules/PartnerCard/PartnerCard.d.ts +15 -0
- package/lib/components/molecules/PartnerCard/PartnerCard.js +89 -0
- package/lib/components/molecules/PartnerCard/PartnerCard.js.map +1 -0
- package/lib/components/molecules/PartnerInfoCard/PartnerInfoCard.d.ts +9 -0
- package/lib/components/molecules/PartnerInfoCard/PartnerInfoCard.js +67 -0
- package/lib/components/molecules/PartnerInfoCard/PartnerInfoCard.js.map +1 -0
- package/lib/components/molecules/PlanningEventCard/PlanningEventCard.d.ts +10 -0
- package/lib/components/molecules/PlanningEventCard/PlanningEventCard.js +41 -0
- package/lib/components/molecules/PlanningEventCard/PlanningEventCard.js.map +1 -0
- package/lib/components/molecules/index.d.ts +9 -0
- package/lib/components/molecules/index.js +27 -0
- package/lib/components/molecules/index.js.map +1 -0
- package/lib/components/organisms/Client/ClientBottom/ClientBottom.d.ts +5 -0
- package/lib/components/organisms/Client/ClientBottom/ClientBottom.js +26 -0
- package/lib/components/organisms/Client/ClientBottom/ClientBottom.js.map +1 -0
- package/lib/components/organisms/Client/ClientDropdownCards/ClientDropdownCards.d.ts +4 -0
- package/lib/components/organisms/Client/ClientDropdownCards/ClientDropdownCards.js +72 -0
- package/lib/components/organisms/Client/ClientDropdownCards/ClientDropdownCards.js.map +1 -0
- package/lib/components/organisms/Client/ClientHeader/ClientHeader.d.ts +2 -0
- package/lib/components/organisms/Client/ClientHeader/ClientHeader.js +49 -0
- package/lib/components/organisms/Client/ClientHeader/ClientHeader.js.map +1 -0
- package/lib/components/organisms/Client/index.d.ts +3 -0
- package/lib/components/organisms/Client/index.js +21 -0
- package/lib/components/organisms/Client/index.js.map +1 -0
- package/lib/components/organisms/Contact/ContactBottom/ContactBottom.d.ts +5 -0
- package/lib/components/organisms/Contact/ContactBottom/ContactBottom.js +26 -0
- package/lib/components/organisms/Contact/ContactBottom/ContactBottom.js.map +1 -0
- package/lib/components/organisms/Contact/ContactDropdownCards/ContactDropdownCards.d.ts +4 -0
- package/lib/components/organisms/Contact/ContactDropdownCards/ContactDropdownCards.js +61 -0
- package/lib/components/organisms/Contact/ContactDropdownCards/ContactDropdownCards.js.map +1 -0
- package/lib/components/organisms/Contact/ContactHeader/ContactHeader.d.ts +2 -0
- package/lib/components/organisms/Contact/ContactHeader/ContactHeader.js +50 -0
- package/lib/components/organisms/Contact/ContactHeader/ContactHeader.js.map +1 -0
- package/lib/components/organisms/Contact/ContactPartnerCard/ContactPartnerCard.d.ts +4 -0
- package/lib/components/organisms/Contact/ContactPartnerCard/ContactPartnerCard.js +55 -0
- package/lib/components/organisms/Contact/ContactPartnerCard/ContactPartnerCard.js.map +1 -0
- package/lib/components/organisms/Contact/index.d.ts +4 -0
- package/lib/components/organisms/Contact/index.js +22 -0
- package/lib/components/organisms/Contact/index.js.map +1 -0
- package/lib/components/organisms/DropdownContactView/DropdownContactView.d.ts +9 -0
- package/lib/components/organisms/DropdownContactView/DropdownContactView.js +48 -0
- package/lib/components/organisms/DropdownContactView/DropdownContactView.js.map +1 -0
- package/lib/components/organisms/DropdownEmployeeView/DropdownEmployeeView.d.ts +12 -0
- package/lib/components/organisms/DropdownEmployeeView/DropdownEmployeeView.js +43 -0
- package/lib/components/organisms/DropdownEmployeeView/DropdownEmployeeView.js.map +1 -0
- package/lib/components/organisms/DropdownEventView/DropdownEventView.d.ts +14 -0
- package/lib/components/organisms/DropdownEventView/DropdownEventView.js +59 -0
- package/lib/components/organisms/DropdownEventView/DropdownEventView.js.map +1 -0
- package/lib/components/organisms/DropdownGeneralView/DropdownGeneralView.d.ts +9 -0
- package/lib/components/organisms/DropdownGeneralView/DropdownGeneralView.js +42 -0
- package/lib/components/organisms/DropdownGeneralView/DropdownGeneralView.js.map +1 -0
- package/lib/components/organisms/EditButton/EditButton.d.ts +4 -0
- package/lib/components/organisms/EditButton/EditButton.js +32 -0
- package/lib/components/organisms/EditButton/EditButton.js.map +1 -0
- package/lib/components/organisms/Event/EventContactCard/EventContactCard.d.ts +4 -0
- package/lib/components/organisms/Event/EventContactCard/EventContactCard.js +49 -0
- package/lib/components/organisms/Event/EventContactCard/EventContactCard.js.map +1 -0
- package/lib/components/organisms/Event/EventDatesCard/EventDatesCard.d.ts +2 -0
- package/lib/components/organisms/Event/EventDatesCard/EventDatesCard.js +38 -0
- package/lib/components/organisms/Event/EventDatesCard/EventDatesCard.js.map +1 -0
- package/lib/components/organisms/Event/EventHeader/EventHeader.d.ts +2 -0
- package/lib/components/organisms/Event/EventHeader/EventHeader.js +55 -0
- package/lib/components/organisms/Event/EventHeader/EventHeader.js.map +1 -0
- package/lib/components/organisms/Event/EventLabelsCard/EventLabelsCard.d.ts +2 -0
- package/lib/components/organisms/Event/EventLabelsCard/EventLabelsCard.js +41 -0
- package/lib/components/organisms/Event/EventLabelsCard/EventLabelsCard.js.map +1 -0
- package/lib/components/organisms/Event/EventLeadCard/EventLeadCard.d.ts +4 -0
- package/lib/components/organisms/Event/EventLeadCard/EventLeadCard.js +52 -0
- package/lib/components/organisms/Event/EventLeadCard/EventLeadCard.js.map +1 -0
- package/lib/components/organisms/Event/EventPartnerCard/EventPartnerCard.d.ts +4 -0
- package/lib/components/organisms/Event/EventPartnerCard/EventPartnerCard.js +54 -0
- package/lib/components/organisms/Event/EventPartnerCard/EventPartnerCard.js.map +1 -0
- package/lib/components/organisms/Event/index.d.ts +6 -0
- package/lib/components/organisms/Event/index.js +24 -0
- package/lib/components/organisms/Event/index.js.map +1 -0
- package/lib/components/organisms/Lead/LeadBottom/LeadBottom.d.ts +5 -0
- package/lib/components/organisms/Lead/LeadBottom/LeadBottom.js +26 -0
- package/lib/components/organisms/Lead/LeadBottom/LeadBottom.js.map +1 -0
- package/lib/components/organisms/Lead/LeadDropdownCards/LeadDropdownCards.d.ts +4 -0
- package/lib/components/organisms/Lead/LeadDropdownCards/LeadDropdownCards.js +62 -0
- package/lib/components/organisms/Lead/LeadDropdownCards/LeadDropdownCards.js.map +1 -0
- package/lib/components/organisms/Lead/LeadHeader/LeadHeader.d.ts +6 -0
- package/lib/components/organisms/Lead/LeadHeader/LeadHeader.js +71 -0
- package/lib/components/organisms/Lead/LeadHeader/LeadHeader.js.map +1 -0
- package/lib/components/organisms/Lead/index.d.ts +3 -0
- package/lib/components/organisms/Lead/index.js +21 -0
- package/lib/components/organisms/Lead/index.js.map +1 -0
- package/lib/components/organisms/Opportunity/OpportunityBottom/OpportunityBottom.d.ts +5 -0
- package/lib/components/organisms/Opportunity/OpportunityBottom/OpportunityBottom.js +26 -0
- package/lib/components/organisms/Opportunity/OpportunityBottom/OpportunityBottom.js.map +1 -0
- package/lib/components/organisms/Opportunity/OpportunityDropdownInfo/OpportunityDropdownInfo.d.ts +2 -0
- package/lib/components/organisms/Opportunity/OpportunityDropdownInfo/OpportunityDropdownInfo.js +55 -0
- package/lib/components/organisms/Opportunity/OpportunityDropdownInfo/OpportunityDropdownInfo.js.map +1 -0
- package/lib/components/organisms/Opportunity/OpportunityHeader/OpportunityHeader.d.ts +2 -0
- package/lib/components/organisms/Opportunity/OpportunityHeader/OpportunityHeader.js +63 -0
- package/lib/components/organisms/Opportunity/OpportunityHeader/OpportunityHeader.js.map +1 -0
- package/lib/components/organisms/Opportunity/OpportunityPartnerCard/OpportunityPartnerCard.d.ts +5 -0
- package/lib/components/organisms/Opportunity/OpportunityPartnerCard/OpportunityPartnerCard.js +46 -0
- package/lib/components/organisms/Opportunity/OpportunityPartnerCard/OpportunityPartnerCard.js.map +1 -0
- package/lib/components/organisms/Opportunity/OpportunityUpdateStatusPicker/OpportunityUpdateStatusPicker.d.ts +7 -0
- package/lib/components/organisms/Opportunity/OpportunityUpdateStatusPicker/OpportunityUpdateStatusPicker.js +41 -0
- package/lib/components/organisms/Opportunity/OpportunityUpdateStatusPicker/OpportunityUpdateStatusPicker.js.map +1 -0
- package/lib/components/organisms/Opportunity/index.d.ts +5 -0
- package/lib/components/organisms/Opportunity/index.js +23 -0
- package/lib/components/organisms/Opportunity/index.js.map +1 -0
- package/lib/components/organisms/Prospect/ProspectBottom/ProspectBottom.d.ts +5 -0
- package/lib/components/organisms/Prospect/ProspectBottom/ProspectBottom.js +26 -0
- package/lib/components/organisms/Prospect/ProspectBottom/ProspectBottom.js.map +1 -0
- package/lib/components/organisms/Prospect/ProspectDropdownCards/ProspectDropdownCards.d.ts +4 -0
- package/lib/components/organisms/Prospect/ProspectDropdownCards/ProspectDropdownCards.js +76 -0
- package/lib/components/organisms/Prospect/ProspectDropdownCards/ProspectDropdownCards.js.map +1 -0
- package/lib/components/organisms/Prospect/ProspectHeader/ProspectHeader.d.ts +2 -0
- package/lib/components/organisms/Prospect/ProspectHeader/ProspectHeader.js +75 -0
- package/lib/components/organisms/Prospect/ProspectHeader/ProspectHeader.js.map +1 -0
- package/lib/components/organisms/Prospect/index.d.ts +3 -0
- package/lib/components/organisms/Prospect/index.js +21 -0
- package/lib/components/organisms/Prospect/index.js.map +1 -0
- package/lib/components/organisms/index.d.ts +11 -0
- package/lib/components/organisms/index.js +29 -0
- package/lib/components/organisms/index.js.map +1 -0
- package/lib/features/asyncFunctions-index.d.ts +1 -0
- package/lib/features/asyncFunctions-index.js +19 -0
- package/lib/features/asyncFunctions-index.js.map +1 -0
- package/lib/features/catalogSlice.d.ts +28 -0
- package/lib/features/catalogSlice.js +86 -0
- package/lib/features/catalogSlice.js.map +1 -0
- package/lib/features/clientSlice.d.ts +37 -0
- package/lib/features/clientSlice.js +110 -0
- package/lib/features/clientSlice.js.map +1 -0
- package/lib/features/contactSlice.d.ts +49 -0
- package/lib/features/contactSlice.js +130 -0
- package/lib/features/contactSlice.js.map +1 -0
- package/lib/features/eventSlice.d.ts +61 -0
- package/lib/features/eventSlice.js +137 -0
- package/lib/features/eventSlice.js.map +1 -0
- package/lib/features/functionSlice.d.ts +14 -0
- package/lib/features/functionSlice.js +48 -0
- package/lib/features/functionSlice.js.map +1 -0
- package/lib/features/index.d.ts +10 -0
- package/lib/features/index.js +27 -0
- package/lib/features/index.js.map +1 -0
- package/lib/features/leadSlice.d.ts +59 -0
- package/lib/features/leadSlice.js +153 -0
- package/lib/features/leadSlice.js.map +1 -0
- package/lib/features/opportunitySlice.d.ts +70 -0
- package/lib/features/opportunitySlice.js +187 -0
- package/lib/features/opportunitySlice.js.map +1 -0
- package/lib/features/partnerSlice.d.ts +28 -0
- package/lib/features/partnerSlice.js +89 -0
- package/lib/features/partnerSlice.js.map +1 -0
- package/lib/features/prospectSlice.d.ts +47 -0
- package/lib/features/prospectSlice.js +139 -0
- package/lib/features/prospectSlice.js.map +1 -0
- package/lib/hooks/use-civility-list.d.ts +6 -0
- package/lib/hooks/use-civility-list.js +31 -0
- package/lib/hooks/use-civility-list.js.map +1 -0
- package/lib/i18n/en.json +76 -0
- package/lib/i18n/fr.json +76 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +99 -0
- package/lib/index.js.map +1 -0
- package/lib/models/index.d.ts +3 -0
- package/lib/models/index.js +21 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/objectFields.d.ts +2 -0
- package/lib/models/objectFields.js +165 -0
- package/lib/models/objectFields.js.map +1 -0
- package/lib/models/searchFields.d.ts +2 -0
- package/lib/models/searchFields.js +62 -0
- package/lib/models/searchFields.js.map +1 -0
- package/lib/models/sortFields.d.ts +2 -0
- package/lib/models/sortFields.js +28 -0
- package/lib/models/sortFields.js.map +1 -0
- package/lib/screens/catalog/CatalogListScreen.d.ts +4 -0
- package/lib/screens/catalog/CatalogListScreen.js +94 -0
- package/lib/screens/catalog/CatalogListScreen.js.map +1 -0
- package/lib/screens/catalog/index.d.ts +11 -0
- package/lib/screens/catalog/index.js +28 -0
- package/lib/screens/catalog/index.js.map +1 -0
- package/lib/screens/client/ClientDetailsScreen.d.ts +5 -0
- package/lib/screens/client/ClientDetailsScreen.js +48 -0
- package/lib/screens/client/ClientDetailsScreen.js.map +1 -0
- package/lib/screens/client/ClientFormScreen.d.ts +5 -0
- package/lib/screens/client/ClientFormScreen.js +99 -0
- package/lib/screens/client/ClientFormScreen.js.map +1 -0
- package/lib/screens/client/ClientsListScreen.d.ts +4 -0
- package/lib/screens/client/ClientsListScreen.js +87 -0
- package/lib/screens/client/ClientsListScreen.js.map +1 -0
- package/lib/screens/client/index.d.ts +28 -0
- package/lib/screens/client/index.js +41 -0
- package/lib/screens/client/index.js.map +1 -0
- package/lib/screens/contact/ContactDetailsScreen.d.ts +5 -0
- package/lib/screens/contact/ContactDetailsScreen.js +49 -0
- package/lib/screens/contact/ContactDetailsScreen.js.map +1 -0
- package/lib/screens/contact/ContactFormScreen.d.ts +5 -0
- package/lib/screens/contact/ContactFormScreen.js +129 -0
- package/lib/screens/contact/ContactFormScreen.js.map +1 -0
- package/lib/screens/contact/ContactListScreen.d.ts +4 -0
- package/lib/screens/contact/ContactListScreen.js +87 -0
- package/lib/screens/contact/ContactListScreen.js.map +1 -0
- package/lib/screens/contact/index.d.ts +28 -0
- package/lib/screens/contact/index.js +41 -0
- package/lib/screens/contact/index.js.map +1 -0
- package/lib/screens/event/EventDetailsScreen.d.ts +5 -0
- package/lib/screens/event/EventDetailsScreen.js +48 -0
- package/lib/screens/event/EventDetailsScreen.js.map +1 -0
- package/lib/screens/event/EventPlanningScreen.d.ts +4 -0
- package/lib/screens/event/EventPlanningScreen.js +152 -0
- package/lib/screens/event/EventPlanningScreen.js.map +1 -0
- package/lib/screens/event/index.d.ts +22 -0
- package/lib/screens/event/index.js +36 -0
- package/lib/screens/event/index.js.map +1 -0
- package/lib/screens/lead/LeadDetailsScreen.d.ts +5 -0
- package/lib/screens/lead/LeadDetailsScreen.js +50 -0
- package/lib/screens/lead/LeadDetailsScreen.js.map +1 -0
- package/lib/screens/lead/LeadFormScreen.d.ts +5 -0
- package/lib/screens/lead/LeadFormScreen.js +171 -0
- package/lib/screens/lead/LeadFormScreen.js.map +1 -0
- package/lib/screens/lead/LeadListScreen.d.ts +4 -0
- package/lib/screens/lead/LeadListScreen.js +104 -0
- package/lib/screens/lead/LeadListScreen.js.map +1 -0
- package/lib/screens/lead/index.d.ts +28 -0
- package/lib/screens/lead/index.js +41 -0
- package/lib/screens/lead/index.js.map +1 -0
- package/lib/screens/opportunity/OpportunityDetailsScreen.d.ts +5 -0
- package/lib/screens/opportunity/OpportunityDetailsScreen.js +51 -0
- package/lib/screens/opportunity/OpportunityDetailsScreen.js.map +1 -0
- package/lib/screens/opportunity/OpportunityFormScreen.d.ts +5 -0
- package/lib/screens/opportunity/OpportunityFormScreen.js +126 -0
- package/lib/screens/opportunity/OpportunityFormScreen.js.map +1 -0
- package/lib/screens/opportunity/OpportunityListScreen.d.ts +4 -0
- package/lib/screens/opportunity/OpportunityListScreen.js +107 -0
- package/lib/screens/opportunity/OpportunityListScreen.js.map +1 -0
- package/lib/screens/opportunity/index.d.ts +28 -0
- package/lib/screens/opportunity/index.js +41 -0
- package/lib/screens/opportunity/index.js.map +1 -0
- package/lib/screens/prospect/ProspectDetailsScreen.d.ts +5 -0
- package/lib/screens/prospect/ProspectDetailsScreen.js +48 -0
- package/lib/screens/prospect/ProspectDetailsScreen.js.map +1 -0
- package/lib/screens/prospect/ProspectFormScreen.d.ts +5 -0
- package/lib/screens/prospect/ProspectFormScreen.js +112 -0
- package/lib/screens/prospect/ProspectFormScreen.js.map +1 -0
- package/lib/screens/prospect/ProspectsListScreen.d.ts +4 -0
- package/lib/screens/prospect/ProspectsListScreen.js +87 -0
- package/lib/screens/prospect/ProspectsListScreen.js.map +1 -0
- package/lib/screens/prospect/index.d.ts +28 -0
- package/lib/screens/prospect/index.js +41 -0
- package/lib/screens/prospect/index.js.map +1 -0
- package/lib/types/catalog.d.ts +5 -0
- package/lib/types/catalog.js +47 -0
- package/lib/types/catalog.js.map +1 -0
- package/lib/types/event-type.d.ts +26 -0
- package/lib/types/event-type.js +121 -0
- package/lib/types/event-type.js.map +1 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/index.js +22 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/lead.d.ts +5 -0
- package/lib/types/lead.js +47 -0
- package/lib/types/lead.js.map +1 -0
- package/lib/types/opportunity.d.ts +6 -0
- package/lib/types/opportunity.js +47 -0
- package/lib/types/opportunity.js.map +1 -0
- package/lib/utils/dateEvent.d.ts +2 -0
- package/lib/utils/dateEvent.js +34 -0
- package/lib/utils/dateEvent.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
19
|
+
import { KeyboardAvoidingView, Platform, ScrollView, StyleSheet, View, } from 'react-native';
|
|
20
|
+
import { Button, FormHtmlInput, FormIncrementInput, Picker, Screen, StarScore, unformatNumber, } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { AutoCompleteSearchInput, DateInput, useDispatch, useSelector, useTranslator, } from '@axelor/aos-mobile-core';
|
|
22
|
+
import { getOpportunity, updateOpportunity, } from '../../features/opportunitySlice';
|
|
23
|
+
import { fetchClientAndProspect } from '../../features/partnerSlice';
|
|
24
|
+
const OpportunityFormScreen = ({ navigation, route }) => {
|
|
25
|
+
const idOpportunity = route.params.opportunityId;
|
|
26
|
+
const { clientAndProspectList } = useSelector(state => state.partner);
|
|
27
|
+
const { opportunity, opportunityStatusList } = useSelector(state => state.opportunity);
|
|
28
|
+
const dispatch = useDispatch();
|
|
29
|
+
const I18n = useTranslator();
|
|
30
|
+
const [score, setScore] = useState(opportunity.opportunityRating);
|
|
31
|
+
const [partner, setPartner] = useState(opportunity.partner);
|
|
32
|
+
const [date, setDate] = useState(new Date(opportunity.expectedCloseDate));
|
|
33
|
+
const [amount, setAmount] = useState(opportunity.amount);
|
|
34
|
+
const [recurrent, setRecurrent] = useState(opportunity.recurrentAmount);
|
|
35
|
+
const [description, setDescription] = useState(opportunity.description);
|
|
36
|
+
const [status, setStatus] = useState(opportunity.opportunityStatus?.id);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
dispatch(getOpportunity({
|
|
39
|
+
opportunityId: idOpportunity,
|
|
40
|
+
}));
|
|
41
|
+
}, [dispatch, idOpportunity]);
|
|
42
|
+
const updateOpportunityAPI = useCallback(() => {
|
|
43
|
+
dispatch(updateOpportunity({
|
|
44
|
+
opportunityId: opportunity.id,
|
|
45
|
+
opportunityVersion: opportunity.version,
|
|
46
|
+
opportunityStatusId: status,
|
|
47
|
+
opportunityRecurrentAmount: unformatNumber(recurrent, I18n.t('Base_DecimalSpacer'), I18n.t('Base_ThousandSpacer')),
|
|
48
|
+
opportunityAmount: unformatNumber(amount, I18n.t('Base_DecimalSpacer'), I18n.t('Base_ThousandSpacer')),
|
|
49
|
+
opportunityDescription: description,
|
|
50
|
+
idPartner: partner?.id,
|
|
51
|
+
opportunityRating: score,
|
|
52
|
+
opportunityCloseDate: date?.toISOString().split('T')[0],
|
|
53
|
+
}));
|
|
54
|
+
navigation.navigate('OpportunityDetailsScreen', {
|
|
55
|
+
opportunityId: opportunity.id,
|
|
56
|
+
});
|
|
57
|
+
}, [
|
|
58
|
+
dispatch,
|
|
59
|
+
opportunity.id,
|
|
60
|
+
opportunity.version,
|
|
61
|
+
status,
|
|
62
|
+
amount,
|
|
63
|
+
recurrent,
|
|
64
|
+
description,
|
|
65
|
+
partner?.id,
|
|
66
|
+
score,
|
|
67
|
+
date,
|
|
68
|
+
navigation,
|
|
69
|
+
I18n,
|
|
70
|
+
]);
|
|
71
|
+
return (<Screen>
|
|
72
|
+
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'} style={styles.containerKeyboard} keyboardVerticalOffset={180}>
|
|
73
|
+
<ScrollView>
|
|
74
|
+
<View style={styles.headerContainer}>
|
|
75
|
+
<StarScore style={styles.score} score={score} showMissingStar={true} onPress={setScore} editMode={true}/>
|
|
76
|
+
</View>
|
|
77
|
+
<View style={styles.container}>
|
|
78
|
+
<AutoCompleteSearchInput style={[styles.picker, styles.marginPicker]} styleTxt={styles.marginTitle} title={I18n.t('Crm_ClientProspect')} objectList={clientAndProspectList} value={partner} searchField="fullName" onChangeValue={setPartner} searchAPI={fetchClientAndProspect}/>
|
|
79
|
+
<DateInput title={I18n.t('Crm_Opportunity_ExpectedCloseDate')} defaultDate={date} onDateChange={setDate} style={styles.input}/>
|
|
80
|
+
<FormIncrementInput title={I18n.t('Crm_Opportunity_Amount')} defaultValue={amount} onChange={setAmount} decimalSpacer={I18n.t('Base_DecimalSpacer')} thousandSpacer={I18n.t('Base_ThousandSpacer')}/>
|
|
81
|
+
<FormIncrementInput title={I18n.t('Crm_Opportunity_RecurrentAmount')} defaultValue={recurrent} onChange={setRecurrent} decimalSpacer={I18n.t('Base_DecimalSpacer')} thousandSpacer={I18n.t('Base_ThousandSpacer')}/>
|
|
82
|
+
<FormHtmlInput title={I18n.t('Base_Description')} onChange={setDescription} defaultValue={description}/>
|
|
83
|
+
<Picker style={[styles.picker, styles.marginPicker]} styleTxt={styles.marginPicker} title={I18n.t('Crm_Opportunity_Status')} defaultValue={status} listItems={opportunityStatusList} labelField="name" valueField="id" emptyValue={false} onValueChange={setStatus} isScrollViewContainer={true}/>
|
|
84
|
+
</View>
|
|
85
|
+
</ScrollView>
|
|
86
|
+
</KeyboardAvoidingView>
|
|
87
|
+
<View style={styles.button_container}>
|
|
88
|
+
<Button title={I18n.t('Base_Save')} onPress={updateOpportunityAPI}/>
|
|
89
|
+
</View>
|
|
90
|
+
</Screen>);
|
|
91
|
+
};
|
|
92
|
+
const styles = StyleSheet.create({
|
|
93
|
+
containerKeyboard: {
|
|
94
|
+
flex: 1,
|
|
95
|
+
},
|
|
96
|
+
score: {
|
|
97
|
+
marginRight: '10%',
|
|
98
|
+
},
|
|
99
|
+
container: {
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
},
|
|
102
|
+
headerContainer: {
|
|
103
|
+
flexDirection: 'row-reverse',
|
|
104
|
+
},
|
|
105
|
+
marginPicker: {
|
|
106
|
+
marginLeft: 5,
|
|
107
|
+
},
|
|
108
|
+
picker: {
|
|
109
|
+
width: '100%',
|
|
110
|
+
},
|
|
111
|
+
marginTitle: {
|
|
112
|
+
marginLeft: 28,
|
|
113
|
+
},
|
|
114
|
+
button_container: {
|
|
115
|
+
marginVertical: '1%',
|
|
116
|
+
flexDirection: 'column',
|
|
117
|
+
justifyContent: 'center',
|
|
118
|
+
alignItems: 'center',
|
|
119
|
+
alignContent: 'center',
|
|
120
|
+
},
|
|
121
|
+
input: {
|
|
122
|
+
width: '90%',
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
export default OpportunityFormScreen;
|
|
126
|
+
//# sourceMappingURL=OpportunityFormScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpportunityFormScreen.js","sourceRoot":"","sources":["../../../src/screens/opportunity/OpportunityFormScreen.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,UAAU,EACV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,MAAM,EACN,MAAM,EACN,SAAS,EACT,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAC,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AAEnE,MAAM,qBAAqB,GAAG,CAAC,EAAC,UAAU,EAAE,KAAK,EAAC,EAAE,EAAE;IACpD,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC;IACjD,MAAM,EAAC,qBAAqB,EAAC,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACpE,MAAM,EAAC,WAAW,EAAE,qBAAqB,EAAC,GAAG,WAAW,CACtD,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAC3B,CAAC;IACF,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,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;KACd;IACD,MAAM,EAAE;QACN,KAAK,EAAE,MAAM;KACd;IACD,WAAW,EAAE;QACX,UAAU,EAAE,EAAE;KACf;IACD,gBAAgB,EAAE;QAChB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,QAAQ;KACvB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,KAAK;KACb;CACF,CAAC,CAAC;AAEH,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useMemo, useState, useCallback, useEffect } from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { HeaderContainer, Screen, ScrollList, useThemeColor, getCommonStyles, ToggleSwitch, AutoCompleteSearch, ChipSelect, } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { useDispatch, useSelector, useTranslator } from '@axelor/aos-mobile-core';
|
|
22
|
+
import { OpportunityCard } from '../../components';
|
|
23
|
+
import { fetchOpportunities, fetchOpportunityStatus, } from '../../features/opportunitySlice';
|
|
24
|
+
import { Opportunity } from '../../types';
|
|
25
|
+
const OpportunityListScreen = ({ navigation }) => {
|
|
26
|
+
const I18n = useTranslator();
|
|
27
|
+
const Colors = useThemeColor();
|
|
28
|
+
const dispatch = useDispatch();
|
|
29
|
+
const { userId } = useSelector(state => state.auth);
|
|
30
|
+
const { loading, moreLoading, isListEnd, opportunityList, opportunityStatusList, } = useSelector(state => state.opportunity);
|
|
31
|
+
const [filteredList, setFilteredList] = useState(opportunityList);
|
|
32
|
+
const [assigned, setAssigned] = useState(false);
|
|
33
|
+
const [filter, setFilter] = useState(null);
|
|
34
|
+
const [opportunity, setOpportunity] = useState(null);
|
|
35
|
+
const [selectedStatus, setSelectedStatus] = useState([]);
|
|
36
|
+
const commonStyles = useMemo(() => getCommonStyles(Colors), [Colors]);
|
|
37
|
+
const fetchOpportunityAPI = useCallback(page => {
|
|
38
|
+
dispatch(fetchOpportunities({ searchValue: filter, page: page }));
|
|
39
|
+
}, [dispatch, filter]);
|
|
40
|
+
const fetchOpportunityFilter = useCallback(searchValue => {
|
|
41
|
+
setFilter(searchValue);
|
|
42
|
+
dispatch(fetchOpportunities({ searchValue: searchValue, page: 0 }));
|
|
43
|
+
}, [dispatch]);
|
|
44
|
+
const filterOnUserAssigned = useCallback(list => {
|
|
45
|
+
if (list == null || list === []) {
|
|
46
|
+
return list;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
if (assigned) {
|
|
50
|
+
return list?.filter(item => item?.user?.id === userId);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return list;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}, [assigned, userId]);
|
|
57
|
+
const filterOnStatus = useCallback(list => {
|
|
58
|
+
if (list == null || list === []) {
|
|
59
|
+
return list;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
if (selectedStatus.length > 0) {
|
|
63
|
+
return list?.filter(item => selectedStatus.find(status => item?.opportunityStatus?.id === status.key));
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
return list;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}, [selectedStatus]);
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
setFilteredList(filterOnUserAssigned(filterOnStatus(opportunityList)));
|
|
72
|
+
}, [filterOnUserAssigned, filterOnStatus, opportunityList]);
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
dispatch(fetchOpportunityStatus());
|
|
75
|
+
}, [dispatch]);
|
|
76
|
+
return (<Screen removeSpaceOnTop={true}>
|
|
77
|
+
<HeaderContainer expandableFilter={false} fixedItems={<View style={styles.headerContainer}>
|
|
78
|
+
<ToggleSwitch styleContainer={[commonStyles.filter, commonStyles.filterSize]} styleToogle={styles.toggle} leftTitle={I18n.t('Crm_All')} rightTitle={I18n.t('Crm_AssignedToMe')} onSwitch={() => setAssigned(!assigned)}/>
|
|
79
|
+
<AutoCompleteSearch objectList={opportunityList} value={opportunity} onChangeValue={setOpportunity} fetchData={fetchOpportunityFilter} placeholder={I18n.t('Crm_Opportunity')} oneFilter={true} selectLastItem={false}/>
|
|
80
|
+
</View>} chipComponent={<ChipSelect mode="multi" onChangeValue={chiplist => setSelectedStatus(chiplist)} marginHorizontal={5} selectionItems={opportunityStatusList.map((status, index) => {
|
|
81
|
+
return {
|
|
82
|
+
title: status.name,
|
|
83
|
+
color: Opportunity.getStatusColor(index, Colors),
|
|
84
|
+
key: status.id,
|
|
85
|
+
};
|
|
86
|
+
})}/>}/>
|
|
87
|
+
<ScrollList loadingList={loading} data={filteredList} renderItem={({ item }) => (<OpportunityCard amount={item.amount} expectedCloseDate={item.expectedCloseDate} name={item.name} opportunityScoring={item.opportunityRating} reference={item.opportunitySeq} allOpportunityStatus={opportunityStatusList} currencySymbol={item.currencySymbol} opportunityStatus={item.opportunityStatus} onPress={() => navigation.navigate('OpportunityDetailsScreen', {
|
|
88
|
+
opportunityId: item.id,
|
|
89
|
+
})} style={styles.item}/>)} fetchData={fetchOpportunityAPI} moreLoading={moreLoading} isListEnd={isListEnd} translator={I18n.t}/>
|
|
90
|
+
</Screen>);
|
|
91
|
+
};
|
|
92
|
+
const styles = StyleSheet.create({
|
|
93
|
+
item: {
|
|
94
|
+
marginHorizontal: 12,
|
|
95
|
+
marginVertical: 4,
|
|
96
|
+
},
|
|
97
|
+
headerContainer: {
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
},
|
|
100
|
+
toggle: {
|
|
101
|
+
width: '54%',
|
|
102
|
+
height: 38,
|
|
103
|
+
borderRadius: 13,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
export default OpportunityListScreen;
|
|
107
|
+
//# sourceMappingURL=OpportunityListScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpportunityListScreen.js","sourceRoot":"","sources":["../../../src/screens/opportunity/OpportunityListScreen.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,eAAe,EACf,MAAM,EACN,UAAU,EACV,aAAa,EACb,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,UAAU,GACX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAC,eAAe,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAExC,MAAM,qBAAqB,GAAG,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE;IAC7C,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,MAAM,GAAG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C/B,IAAI,EAAE;QACJ,gBAAgB,EAAE,EAAE;QACpB,cAAc,EAAE,CAAC;KAClB;IACD,eAAe,EAAE;QACf,UAAU,EAAE,QAAQ;KACrB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;KACjB;CACF,CAAC,CAAC;AAEH,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
namespace OpportunityListScreen {
|
|
3
|
+
export const title: string;
|
|
4
|
+
export { OpportunityListScreen as component };
|
|
5
|
+
export namespace options {
|
|
6
|
+
const shadedHeader: boolean;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
namespace OpportunityDetailsScreen {
|
|
10
|
+
const title_1: string;
|
|
11
|
+
export { title_1 as title };
|
|
12
|
+
export { OpportunityDetailsScreen as component };
|
|
13
|
+
export namespace options_1 {
|
|
14
|
+
const shadedHeader_1: boolean;
|
|
15
|
+
export { shadedHeader_1 as shadedHeader };
|
|
16
|
+
}
|
|
17
|
+
export { options_1 as options };
|
|
18
|
+
}
|
|
19
|
+
namespace OpportunityFormScreen {
|
|
20
|
+
const title_2: string;
|
|
21
|
+
export { title_2 as title };
|
|
22
|
+
export { OpportunityFormScreen as component };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export default _default;
|
|
26
|
+
import OpportunityListScreen_1 from "./OpportunityListScreen";
|
|
27
|
+
import OpportunityDetailsScreen_1 from "./OpportunityDetailsScreen";
|
|
28
|
+
import OpportunityFormScreen_1 from "./OpportunityFormScreen";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import OpportunityDetailsScreen from './OpportunityDetailsScreen';
|
|
19
|
+
import OpportunityListScreen from './OpportunityListScreen';
|
|
20
|
+
import OpportunityFormScreen from './OpportunityFormScreen';
|
|
21
|
+
export default {
|
|
22
|
+
OpportunityListScreen: {
|
|
23
|
+
title: 'Crm_Opportunities',
|
|
24
|
+
component: OpportunityListScreen,
|
|
25
|
+
options: {
|
|
26
|
+
shadedHeader: false,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
OpportunityDetailsScreen: {
|
|
30
|
+
title: 'Crm_Opportunity',
|
|
31
|
+
component: OpportunityDetailsScreen,
|
|
32
|
+
options: {
|
|
33
|
+
shadedHeader: false,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
OpportunityFormScreen: {
|
|
37
|
+
title: 'Crm_Opportunity',
|
|
38
|
+
component: OpportunityFormScreen,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/screens/opportunity/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAE5D,eAAe;IACb,qBAAqB,EAAE;QACrB,KAAK,EAAE,mBAAmB;QAC1B,SAAS,EAAE,qBAAqB;QAChC,OAAO,EAAE;YACP,YAAY,EAAE,KAAK;SACpB;KACF;IACD,wBAAwB,EAAE;QACxB,KAAK,EAAE,iBAAiB;QACxB,SAAS,EAAE,wBAAwB;QACnC,OAAO,EAAE;YACP,YAAY,EAAE,KAAK;SACpB;KACF;IACD,qBAAqB,EAAE;QACrB,KAAK,EAAE,iBAAiB;QACxB,SAAS,EAAE,qBAAqB;KACjC;CACF,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useEffect } from 'react';
|
|
19
|
+
import { ScrollView } from 'react-native';
|
|
20
|
+
import { Screen, HeaderContainer, NotesCard } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { useSelector, HeaderOptionsMenu, useDispatch, useTranslator, } from '@axelor/aos-mobile-core';
|
|
22
|
+
import { ProspectBottom, ProspectDropdownCards, ProspectHeader, } from '../../components';
|
|
23
|
+
import { fetchProspectById } from '../../features/prospectSlice';
|
|
24
|
+
const ProspectDetailsScreen = ({ navigation, route }) => {
|
|
25
|
+
const idProspect = route.params.idProspect;
|
|
26
|
+
const I18n = useTranslator();
|
|
27
|
+
const dispatch = useDispatch();
|
|
28
|
+
const { mobileSettings } = useSelector(state => state.config);
|
|
29
|
+
const { prospect } = useSelector(state => state.prospect);
|
|
30
|
+
React.useLayoutEffect(() => {
|
|
31
|
+
navigation.setOptions({
|
|
32
|
+
headerRight: () => (<HeaderOptionsMenu model="com.axelor.apps.base.db.Partner" modelId={idProspect} navigation={navigation} disableMailMessages={!mobileSettings?.isTrackerMessageOnCrmApp} attachedFileScreenTitle={prospect?.simpleFullName}/>),
|
|
33
|
+
});
|
|
34
|
+
}, [mobileSettings, navigation, idProspect, prospect]);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
dispatch(fetchProspectById({ partnerId: idProspect }));
|
|
37
|
+
}, [dispatch, idProspect]);
|
|
38
|
+
return (<Screen removeSpaceOnTop={true}>
|
|
39
|
+
<HeaderContainer expandableFilter={false} fixedItems={<ProspectHeader />}/>
|
|
40
|
+
<ScrollView>
|
|
41
|
+
<NotesCard title={I18n.t('Crm_Notes')} data={prospect.description}/>
|
|
42
|
+
<ProspectDropdownCards navigation={navigation}/>
|
|
43
|
+
</ScrollView>
|
|
44
|
+
<ProspectBottom idProspect={idProspect} navigation={navigation}/>
|
|
45
|
+
</Screen>);
|
|
46
|
+
};
|
|
47
|
+
export default ProspectDetailsScreen;
|
|
48
|
+
//# sourceMappingURL=ProspectDetailsScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProspectDetailsScreen.js","sourceRoot":"","sources":["../../../src/screens/prospect/ProspectDetailsScreen.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACvC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,MAAM,EAAE,eAAe,EAAE,SAAS,EAAC,MAAM,uBAAuB,CAAC;AACzE,OAAO,EACL,W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,CAAC,CAAC,CAAC;IAE3B,OAAO,CACL,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAC7B;MAAA,CAAC,eAAe,CACd,gBAAgB,CAAC,CAAC,KAAK,CAAC,CACxB,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,AAAD,EAAG,CAAC,EAEjC;MAAA,CAAC,UAAU,CACT;QAAA,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAClE;QAAA,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,EAChD;MAAA,EAAE,UAAU,CACZ;MAAA,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,EACjE;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useEffect, useState, useCallback } from 'react';
|
|
19
|
+
import { ScrollView, StyleSheet, View, KeyboardAvoidingView, Platform, } from 'react-native';
|
|
20
|
+
import { Button, FormHtmlInput, FormInput, Screen, StarScore, } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { useSelector, useDispatch, useTranslator } from '@axelor/aos-mobile-core';
|
|
22
|
+
import { fetchProspectById, updateProspect } from '../../features/prospectSlice';
|
|
23
|
+
const ProspectFormScreen = ({ navigation, route }) => {
|
|
24
|
+
const idProspect = route.params.idProspect;
|
|
25
|
+
const { prospect } = useSelector(state => state.prospect);
|
|
26
|
+
const dispatch = useDispatch();
|
|
27
|
+
const I18n = useTranslator();
|
|
28
|
+
const [score, setScore] = useState(prospect.leadScoringSelect);
|
|
29
|
+
const [name, setName] = useState(prospect.name);
|
|
30
|
+
const [fixedPhone, setFixedPhone] = useState(prospect.fixedPhone);
|
|
31
|
+
const [email, setEmail] = useState(prospect.emailAddress?.address);
|
|
32
|
+
const [webSite, setWebSite] = useState(prospect.webSite);
|
|
33
|
+
const [description, setDescription] = useState(prospect.description);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
dispatch(fetchProspectById({ partnerId: idProspect }));
|
|
36
|
+
}, [dispatch, idProspect]);
|
|
37
|
+
const updateProspectAPI = useCallback(() => {
|
|
38
|
+
dispatch(updateProspect({
|
|
39
|
+
prospectId: idProspect,
|
|
40
|
+
prospectVersion: prospect.version,
|
|
41
|
+
prospectScore: score,
|
|
42
|
+
prospectName: name,
|
|
43
|
+
prospectFixedPhone: fixedPhone,
|
|
44
|
+
prospectWebsite: webSite,
|
|
45
|
+
prospectDescription: description,
|
|
46
|
+
emailId: prospect.emailAddress.id,
|
|
47
|
+
emailVersion: prospect.emailAddress.$version,
|
|
48
|
+
prospectEmail: email,
|
|
49
|
+
}));
|
|
50
|
+
navigation.navigate('ProspectDetailsScreen', {
|
|
51
|
+
idProspect: idProspect,
|
|
52
|
+
});
|
|
53
|
+
}, [
|
|
54
|
+
dispatch,
|
|
55
|
+
idProspect,
|
|
56
|
+
prospect.version,
|
|
57
|
+
prospect.emailAddress?.id,
|
|
58
|
+
prospect.emailAddress?.$version,
|
|
59
|
+
score,
|
|
60
|
+
name,
|
|
61
|
+
fixedPhone,
|
|
62
|
+
webSite,
|
|
63
|
+
description,
|
|
64
|
+
email,
|
|
65
|
+
navigation,
|
|
66
|
+
]);
|
|
67
|
+
return (<Screen>
|
|
68
|
+
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'} style={styles.containerKeyboard} keyboardVerticalOffset={180}>
|
|
69
|
+
<ScrollView>
|
|
70
|
+
<View style={styles.headerContainer}>
|
|
71
|
+
<StarScore style={styles.score} score={score} showMissingStar={true} onPress={setScore} editMode={true}/>
|
|
72
|
+
</View>
|
|
73
|
+
<View style={styles.container}>
|
|
74
|
+
<FormInput style={styles.input} title={I18n.t('Crm_Name')} onChange={setName} defaultValue={name}/>
|
|
75
|
+
<FormInput style={styles.input} title={I18n.t('Crm_Phone')} onChange={setFixedPhone} defaultValue={fixedPhone}/>
|
|
76
|
+
<FormInput style={styles.input} title={I18n.t('Crm_Email')} onChange={setEmail} defaultValue={email}/>
|
|
77
|
+
<FormInput style={styles.input} title={I18n.t('Crm_WebSite')} onChange={setWebSite} defaultValue={webSite}/>
|
|
78
|
+
<FormHtmlInput title={I18n.t('Crm_Notes')} onChange={setDescription} defaultValue={description}/>
|
|
79
|
+
</View>
|
|
80
|
+
</ScrollView>
|
|
81
|
+
</KeyboardAvoidingView>
|
|
82
|
+
<View style={styles.button_container}>
|
|
83
|
+
<Button title={I18n.t('Base_Save')} onPress={updateProspectAPI}/>
|
|
84
|
+
</View>
|
|
85
|
+
</Screen>);
|
|
86
|
+
};
|
|
87
|
+
const styles = StyleSheet.create({
|
|
88
|
+
containerKeyboard: {
|
|
89
|
+
flex: 1,
|
|
90
|
+
},
|
|
91
|
+
container: {
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
},
|
|
94
|
+
score: {
|
|
95
|
+
marginRight: '10%',
|
|
96
|
+
},
|
|
97
|
+
headerContainer: {
|
|
98
|
+
flexDirection: 'row-reverse',
|
|
99
|
+
},
|
|
100
|
+
button_container: {
|
|
101
|
+
marginVertical: '1%',
|
|
102
|
+
flexDirection: 'column',
|
|
103
|
+
justifyContent: 'center',
|
|
104
|
+
alignItems: 'center',
|
|
105
|
+
alignContent: 'center',
|
|
106
|
+
},
|
|
107
|
+
input: {
|
|
108
|
+
width: '90%',
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
export default ProspectFormScreen;
|
|
112
|
+
//# sourceMappingURL=ProspectFormScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProspectFormScreen.js","sourceRoot":"","sources":["../../../src/screens/prospect/ProspectFormScreen.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAC,MAAM,OAAO,CAAC;AAC9D,OAAO,EACL,UAAU,EACV,UAAU,EACV,IAAI,EACJ,oBAAoB,EACpB,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,MAAM,EACN,aAAa,EACb,SAAS,EACT,MAAM,EACN,SAAS,GACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAE/E,MAAM,kBAAkB,GAAG,CAAC,EAAC,UAAU,EAAE,KAAK,EAAC,EAAE,EAAE;IACjD,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;IAC3C,MAAM,EAAC,QAAQ,EAAC,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IA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AAE,QAAQ;KACrB;IACD,KAAK,EAAE;QACL,WAAW,EAAE,KAAK;KACnB;IACD,eAAe,EAAE;QACf,aAAa,EAAE,aAAa;KAC7B;IACD,gBAAgB,EAAE;QAChB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,QAAQ;QACvB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,QAAQ;KACvB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,KAAK;KACb;CACF,CAAC,CAAC;AAEH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { useMemo, useState, useCallback, useEffect } from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { HeaderContainer, Screen, ScrollList, useThemeColor, getCommonStyles, ToggleSwitch, AutoCompleteSearch, } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { useDispatch, useSelector, useTranslator } from '@axelor/aos-mobile-core';
|
|
22
|
+
import { PartnerCard } from '../../components';
|
|
23
|
+
import { fetchProspects } from '../../features/prospectSlice';
|
|
24
|
+
const ProspectsListScreen = ({ navigation }) => {
|
|
25
|
+
const I18n = useTranslator();
|
|
26
|
+
const Colors = useThemeColor();
|
|
27
|
+
const dispatch = useDispatch();
|
|
28
|
+
const { userId } = useSelector(state => state.auth);
|
|
29
|
+
const { loading, moreLoading, isListEnd, prospectList } = useSelector(state => state.prospect);
|
|
30
|
+
const [filteredList, setFilteredList] = useState(prospectList);
|
|
31
|
+
const [assigned, setAssigned] = useState(false);
|
|
32
|
+
const [prospect, setProspect] = useState(null);
|
|
33
|
+
const [filter, setFilter] = useState(null);
|
|
34
|
+
const commonStyles = useMemo(() => getCommonStyles(Colors), [Colors]);
|
|
35
|
+
const fetchProspectAPI = useCallback(page => {
|
|
36
|
+
dispatch(fetchProspects({ searchValue: filter, page: page }));
|
|
37
|
+
}, [dispatch, filter]);
|
|
38
|
+
const fetchProspectFilter = useCallback(searchValue => {
|
|
39
|
+
setFilter(searchValue);
|
|
40
|
+
dispatch(fetchProspects({ searchValue: searchValue, page: 0 }));
|
|
41
|
+
}, [dispatch]);
|
|
42
|
+
const filterOnUserAssigned = useCallback(list => {
|
|
43
|
+
if (list == null || list === []) {
|
|
44
|
+
return list;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
if (assigned) {
|
|
48
|
+
return list?.filter(item => item?.user?.id === userId);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return list;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}, [assigned, userId]);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
setFilteredList(filterOnUserAssigned(prospectList));
|
|
57
|
+
}, [filterOnUserAssigned, prospectList]);
|
|
58
|
+
return (<Screen removeSpaceOnTop={true}>
|
|
59
|
+
<HeaderContainer expandableFilter={false} fixedItems={<View style={styles.headerContainer}>
|
|
60
|
+
<ToggleSwitch styleContainer={[commonStyles.filter, commonStyles.filterSize]} styleToogle={styles.toggle} leftTitle={I18n.t('Crm_All')} rightTitle={I18n.t('Crm_AssignedToMe')} onSwitch={() => setAssigned(!assigned)}/>
|
|
61
|
+
<AutoCompleteSearch objectList={prospectList} value={prospect} onChangeValue={setProspect} fetchData={fetchProspectFilter} placeholder={I18n.t('Crm_Prospects')} oneFilter={true} selectLastItem={false}/>
|
|
62
|
+
</View>}/>
|
|
63
|
+
<ScrollList loadingList={loading} data={filteredList} renderItem={({ item }) => (<PartnerCard style={styles.item} partnerFullName={item.simpleFullName} partnerReference={item.partnerSeq} partnerScoring={item.leadScoringSelect || 0} partnerAdress={item.mainAddress?.fullName} partnerFixedPhone={item.fixedPhone} partnerEmail={item.emailAddress?.address} partnerPicture={item.picture} onPress={() => navigation.navigate('ProspectDetailsScreen', {
|
|
64
|
+
idProspect: item.id,
|
|
65
|
+
})}/>)} fetchData={fetchProspectAPI} moreLoading={moreLoading} isListEnd={isListEnd} translator={I18n.t}/>
|
|
66
|
+
</Screen>);
|
|
67
|
+
};
|
|
68
|
+
const styles = StyleSheet.create({
|
|
69
|
+
item: {
|
|
70
|
+
marginHorizontal: 12,
|
|
71
|
+
marginVertical: 4,
|
|
72
|
+
},
|
|
73
|
+
headerContainer: {
|
|
74
|
+
alignItems: 'center',
|
|
75
|
+
},
|
|
76
|
+
toggleSwitchContainer: {
|
|
77
|
+
width: '90%',
|
|
78
|
+
height: 40,
|
|
79
|
+
},
|
|
80
|
+
toggle: {
|
|
81
|
+
width: '54%',
|
|
82
|
+
height: 38,
|
|
83
|
+
borderRadius: 13,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
export default ProspectsListScreen;
|
|
87
|
+
//# sourceMappingURL=ProspectsListScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProspectsListScreen.js","sourceRoot":"","sources":["../../../src/screens/prospect/ProspectsListScreen.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC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