@axelor/aos-mobile-project 8.2.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/index.d.ts +4 -0
- package/lib/api/index.js +22 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/project-api.d.ts +20 -0
- package/lib/api/project-api.js +136 -0
- package/lib/api/project-api.js.map +1 -0
- package/lib/api/project-task-api.d.ts +51 -0
- package/lib/api/project-task-api.js +294 -0
- package/lib/api/project-task-api.js.map +1 -0
- package/lib/api/reporting-api.d.ts +3 -0
- package/lib/api/reporting-api.js +26 -0
- package/lib/api/reporting-api.js.map +1 -0
- package/lib/api/timesheet-lines-api.d.ts +3 -0
- package/lib/api/timesheet-lines-api.js +41 -0
- package/lib/api/timesheet-lines-api.js.map +1 -0
- package/lib/components/atoms/DatesDisplay/DatesDisplay.d.ts +6 -0
- package/lib/components/atoms/DatesDisplay/DatesDisplay.js +59 -0
- package/lib/components/atoms/DatesDisplay/DatesDisplay.js.map +1 -0
- package/lib/components/atoms/PartnerCard/PartnerCard.d.ts +12 -0
- package/lib/components/atoms/PartnerCard/PartnerCard.js +74 -0
- package/lib/components/atoms/PartnerCard/PartnerCard.js.map +1 -0
- package/lib/components/atoms/ProjectCard/ProjectCard.d.ts +15 -0
- package/lib/components/atoms/ProjectCard/ProjectCard.js +101 -0
- package/lib/components/atoms/ProjectCard/ProjectCard.js.map +1 -0
- package/lib/components/atoms/ProjectSimpleCard/ProjectSimpleCard.d.ts +10 -0
- package/lib/components/atoms/ProjectSimpleCard/ProjectSimpleCard.js +48 -0
- package/lib/components/atoms/ProjectSimpleCard/ProjectSimpleCard.js.map +1 -0
- package/lib/components/atoms/TaskCard/TaskCard.d.ts +16 -0
- package/lib/components/atoms/TaskCard/TaskCard.js +93 -0
- package/lib/components/atoms/TaskCard/TaskCard.js.map +1 -0
- package/lib/components/atoms/index.d.ts +5 -0
- package/lib/components/atoms/index.js +23 -0
- package/lib/components/atoms/index.js.map +1 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/index.js +23 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/molecules/ActivityCard/ActivityCard.d.ts +11 -0
- package/lib/components/molecules/ActivityCard/ActivityCard.js +80 -0
- package/lib/components/molecules/ActivityCard/ActivityCard.js.map +1 -0
- package/lib/components/molecules/CustomFieldPopup/CustomFieldPopup.d.ts +11 -0
- package/lib/components/molecules/CustomFieldPopup/CustomFieldPopup.js +53 -0
- package/lib/components/molecules/CustomFieldPopup/CustomFieldPopup.js.map +1 -0
- package/lib/components/molecules/DropdownInvoicing/DropdownInvoicing.d.ts +11 -0
- package/lib/components/molecules/DropdownInvoicing/DropdownInvoicing.js +41 -0
- package/lib/components/molecules/DropdownInvoicing/DropdownInvoicing.js.map +1 -0
- package/lib/components/molecules/DropdownMembers/DropdownMembers.d.ts +8 -0
- package/lib/components/molecules/DropdownMembers/DropdownMembers.js +33 -0
- package/lib/components/molecules/DropdownMembers/DropdownMembers.js.map +1 -0
- package/lib/components/molecules/DropdownTaskCharacteristics/DropdownTaskCharacteristics.d.ts +13 -0
- package/lib/components/molecules/DropdownTaskCharacteristics/DropdownTaskCharacteristics.js +51 -0
- package/lib/components/molecules/DropdownTaskCharacteristics/DropdownTaskCharacteristics.js.map +1 -0
- package/lib/components/molecules/DropdownTaskDescription/DropdownTaskDescription.d.ts +8 -0
- package/lib/components/molecules/DropdownTaskDescription/DropdownTaskDescription.js +39 -0
- package/lib/components/molecules/DropdownTaskDescription/DropdownTaskDescription.js.map +1 -0
- package/lib/components/molecules/PartnerActionCard/PartnerActionCard.d.ts +19 -0
- package/lib/components/molecules/PartnerActionCard/PartnerActionCard.js +53 -0
- package/lib/components/molecules/PartnerActionCard/PartnerActionCard.js.map +1 -0
- package/lib/components/molecules/ProjectHeader/ProjectHeader.d.ts +3 -0
- package/lib/components/molecules/ProjectHeader/ProjectHeader.js +67 -0
- package/lib/components/molecules/ProjectHeader/ProjectHeader.js.map +1 -0
- package/lib/components/molecules/ProjectSiteTags/ProjectSiteTags.d.ts +3 -0
- package/lib/components/molecules/ProjectSiteTags/ProjectSiteTags.js +34 -0
- package/lib/components/molecules/ProjectSiteTags/ProjectSiteTags.js.map +1 -0
- package/lib/components/molecules/SectionHeader/SectionHeader.d.ts +9 -0
- package/lib/components/molecules/SectionHeader/SectionHeader.js +56 -0
- package/lib/components/molecules/SectionHeader/SectionHeader.js.map +1 -0
- package/lib/components/molecules/TaskActionCard/TaskActionCard.d.ts +20 -0
- package/lib/components/molecules/TaskActionCard/TaskActionCard.js +39 -0
- package/lib/components/molecules/TaskActionCard/TaskActionCard.js.map +1 -0
- package/lib/components/molecules/TaskDetailsHeader/TaskDetailsHeader.d.ts +3 -0
- package/lib/components/molecules/TaskDetailsHeader/TaskDetailsHeader.js +67 -0
- package/lib/components/molecules/TaskDetailsHeader/TaskDetailsHeader.js.map +1 -0
- package/lib/components/molecules/index.d.ts +12 -0
- package/lib/components/molecules/index.js +30 -0
- package/lib/components/molecules/index.js.map +1 -0
- package/lib/components/organisms/CustomSection/CustomSection.d.ts +10 -0
- package/lib/components/organisms/CustomSection/CustomSection.js +49 -0
- package/lib/components/organisms/CustomSection/CustomSection.js.map +1 -0
- package/lib/components/organisms/LogTimeButton/LogTimeButton.d.ts +6 -0
- package/lib/components/organisms/LogTimeButton/LogTimeButton.js +41 -0
- package/lib/components/organisms/LogTimeButton/LogTimeButton.js.map +1 -0
- package/lib/components/organisms/ProjectDropdownCards/ProjectDropdownCards.d.ts +3 -0
- package/lib/components/organisms/ProjectDropdownCards/ProjectDropdownCards.js +51 -0
- package/lib/components/organisms/ProjectDropdownCards/ProjectDropdownCards.js.map +1 -0
- package/lib/components/organisms/ProjectTaskDropdownCards/ProjectTaskDropdownCards.d.ts +3 -0
- package/lib/components/organisms/ProjectTaskDropdownCards/ProjectTaskDropdownCards.js +52 -0
- package/lib/components/organisms/ProjectTaskDropdownCards/ProjectTaskDropdownCards.js.map +1 -0
- package/lib/components/organisms/TimeSpentGridView/TimeSpentGridView.d.ts +3 -0
- package/lib/components/organisms/TimeSpentGridView/TimeSpentGridView.js +53 -0
- package/lib/components/organisms/TimeSpentGridView/TimeSpentGridView.js.map +1 -0
- package/lib/components/organisms/index.d.ts +5 -0
- package/lib/components/organisms/index.js +23 -0
- package/lib/components/organisms/index.js.map +1 -0
- package/lib/components/pages/GeneralInformationView/GeneralInformationView.d.ts +3 -0
- package/lib/components/pages/GeneralInformationView/GeneralInformationView.js +55 -0
- package/lib/components/pages/GeneralInformationView/GeneralInformationView.js.map +1 -0
- package/lib/components/pages/ReportingView/ReportingView.d.ts +3 -0
- package/lib/components/pages/ReportingView/ReportingView.js +60 -0
- package/lib/components/pages/ReportingView/ReportingView.js.map +1 -0
- package/lib/components/pages/SubProjectView/SubProjectView.d.ts +3 -0
- package/lib/components/pages/SubProjectView/SubProjectView.js +80 -0
- package/lib/components/pages/SubProjectView/SubProjectView.js.map +1 -0
- package/lib/components/pages/TaskCustomFieldsView/TaskCustomFieldsView.d.ts +3 -0
- package/lib/components/pages/TaskCustomFieldsView/TaskCustomFieldsView.js +49 -0
- package/lib/components/pages/TaskCustomFieldsView/TaskCustomFieldsView.js.map +1 -0
- package/lib/components/pages/TaskGeneralInformationView/TaskGeneralInformationView.d.ts +5 -0
- package/lib/components/pages/TaskGeneralInformationView/TaskGeneralInformationView.js +55 -0
- package/lib/components/pages/TaskGeneralInformationView/TaskGeneralInformationView.js.map +1 -0
- package/lib/components/pages/TaskLinkView/TaskLinkView.d.ts +3 -0
- package/lib/components/pages/TaskLinkView/TaskLinkView.js +58 -0
- package/lib/components/pages/TaskLinkView/TaskLinkView.js.map +1 -0
- package/lib/components/pages/TaskView/TaskView.d.ts +3 -0
- package/lib/components/pages/TaskView/TaskView.js +63 -0
- package/lib/components/pages/TaskView/TaskView.js.map +1 -0
- package/lib/components/pages/TimeView/TimeView.d.ts +7 -0
- package/lib/components/pages/TimeView/TimeView.js +59 -0
- package/lib/components/pages/TimeView/TimeView.js.map +1 -0
- package/lib/components/pages/index.d.ts +8 -0
- package/lib/components/pages/index.js +26 -0
- package/lib/components/pages/index.js.map +1 -0
- package/lib/components/templates/ActivityListView/ActivityListView.d.ts +3 -0
- package/lib/components/templates/ActivityListView/ActivityListView.js +117 -0
- package/lib/components/templates/ActivityListView/ActivityListView.js.map +1 -0
- package/lib/components/templates/CategorySearchBar/CategorySearchBar.d.ts +12 -0
- package/lib/components/templates/CategorySearchBar/CategorySearchBar.js +41 -0
- package/lib/components/templates/CategorySearchBar/CategorySearchBar.js.map +1 -0
- package/lib/components/templates/ParentTaskSearchBar/ParentTaskSearchBar.d.ts +12 -0
- package/lib/components/templates/ParentTaskSearchBar/ParentTaskSearchBar.js +41 -0
- package/lib/components/templates/ParentTaskSearchBar/ParentTaskSearchBar.js.map +1 -0
- package/lib/components/templates/PrioritySearchBar/PrioritySearchBar.d.ts +12 -0
- package/lib/components/templates/PrioritySearchBar/PrioritySearchBar.js +41 -0
- package/lib/components/templates/PrioritySearchBar/PrioritySearchBar.js.map +1 -0
- package/lib/components/templates/ProjectListView/ProjectListView.d.ts +6 -0
- package/lib/components/templates/ProjectListView/ProjectListView.js +71 -0
- package/lib/components/templates/ProjectListView/ProjectListView.js.map +1 -0
- package/lib/components/templates/ProjectSearchBar/ProjectSearchBar.d.ts +13 -0
- package/lib/components/templates/ProjectSearchBar/ProjectSearchBar.js +39 -0
- package/lib/components/templates/ProjectSearchBar/ProjectSearchBar.js.map +1 -0
- package/lib/components/templates/ReportingDetailsView/IndicatorCategory.d.ts +7 -0
- package/lib/components/templates/ReportingDetailsView/IndicatorCategory.js +70 -0
- package/lib/components/templates/ReportingDetailsView/IndicatorCategory.js.map +1 -0
- package/lib/components/templates/ReportingDetailsView/ReportingDetailsView.d.ts +3 -0
- package/lib/components/templates/ReportingDetailsView/ReportingDetailsView.js +50 -0
- package/lib/components/templates/ReportingDetailsView/ReportingDetailsView.js.map +1 -0
- package/lib/components/templates/SectionSearchBar/SectionSearchBar.d.ts +12 -0
- package/lib/components/templates/SectionSearchBar/SectionSearchBar.js +38 -0
- package/lib/components/templates/SectionSearchBar/SectionSearchBar.js.map +1 -0
- package/lib/components/templates/TargetVersionSearchBar/TargetVersionSearchBar.d.ts +12 -0
- package/lib/components/templates/TargetVersionSearchBar/TargetVersionSearchBar.js +40 -0
- package/lib/components/templates/TargetVersionSearchBar/TargetVersionSearchBar.js.map +1 -0
- package/lib/components/templates/TaskFilters/TaskFilters.d.ts +14 -0
- package/lib/components/templates/TaskFilters/TaskFilters.js +135 -0
- package/lib/components/templates/TaskFilters/TaskFilters.js.map +1 -0
- package/lib/components/templates/TaskStatusSearchBar/TaskStatusSearchBar.d.ts +12 -0
- package/lib/components/templates/TaskStatusSearchBar/TaskStatusSearchBar.js +56 -0
- package/lib/components/templates/TaskStatusSearchBar/TaskStatusSearchBar.js.map +1 -0
- package/lib/components/templates/TaskTagMultiValuePicker/TaskTagMultiValuePicker.d.ts +11 -0
- package/lib/components/templates/TaskTagMultiValuePicker/TaskTagMultiValuePicker.js +50 -0
- package/lib/components/templates/TaskTagMultiValuePicker/TaskTagMultiValuePicker.js.map +1 -0
- package/lib/components/templates/index.d.ts +12 -0
- package/lib/components/templates/index.js +30 -0
- package/lib/components/templates/index.js.map +1 -0
- package/lib/features/asyncFunctions-index.d.ts +4 -0
- package/lib/features/asyncFunctions-index.js +22 -0
- package/lib/features/asyncFunctions-index.js.map +1 -0
- package/lib/features/index.d.ts +4 -0
- package/lib/features/index.js +22 -0
- package/lib/features/index.js.map +1 -0
- package/lib/features/projectSlice.d.ts +65 -0
- package/lib/features/projectSlice.js +118 -0
- package/lib/features/projectSlice.js.map +1 -0
- package/lib/features/projectTaskSlice.d.ts +193 -0
- package/lib/features/projectTaskSlice.js +310 -0
- package/lib/features/projectTaskSlice.js.map +1 -0
- package/lib/features/reportingSlice.d.ts +13 -0
- package/lib/features/reportingSlice.js +43 -0
- package/lib/features/reportingSlice.js.map +1 -0
- package/lib/features/timesheetLinesSlice.d.ts +39 -0
- package/lib/features/timesheetLinesSlice.js +57 -0
- package/lib/features/timesheetLinesSlice.js.map +1 -0
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.js +20 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/use-project-header-actions.d.ts +1 -0
- package/lib/hooks/use-project-header-actions.js +75 -0
- package/lib/hooks/use-project-header-actions.js.map +1 -0
- package/lib/hooks/use-reporting-configuration.d.ts +5 -0
- package/lib/hooks/use-reporting-configuration.js +33 -0
- package/lib/hooks/use-reporting-configuration.js.map +1 -0
- package/lib/hooks/use-task-filter.d.ts +32 -0
- package/lib/hooks/use-task-filter.js +96 -0
- package/lib/hooks/use-task-filter.js.map +1 -0
- package/lib/i18n/en.json +87 -0
- package/lib/i18n/fr.json +87 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +81 -0
- package/lib/index.js.map +1 -0
- package/lib/models/forms.d.ts +2 -0
- package/lib/models/forms.js +245 -0
- package/lib/models/forms.js.map +1 -0
- package/lib/models/index.d.ts +5 -0
- package/lib/models/index.js +23 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/objectFields.d.ts +2 -0
- package/lib/models/objectFields.js +187 -0
- package/lib/models/objectFields.js.map +1 -0
- package/lib/models/searchFields.d.ts +2 -0
- package/lib/models/searchFields.js +31 -0
- package/lib/models/searchFields.js.map +1 -0
- package/lib/models/sortFields.d.ts +2 -0
- package/lib/models/sortFields.js +22 -0
- package/lib/models/sortFields.js.map +1 -0
- package/lib/models/typeObjects.d.ts +2 -0
- package/lib/models/typeObjects.js +63 -0
- package/lib/models/typeObjects.js.map +1 -0
- package/lib/screens/ActiveProjectScreen.d.ts +3 -0
- package/lib/screens/ActiveProjectScreen.js +50 -0
- package/lib/screens/ActiveProjectScreen.js.map +1 -0
- package/lib/screens/BuisnessProjectScreen.d.ts +3 -0
- package/lib/screens/BuisnessProjectScreen.js +27 -0
- package/lib/screens/BuisnessProjectScreen.js.map +1 -0
- package/lib/screens/ProjectDetailsScreen.d.ts +7 -0
- package/lib/screens/ProjectDetailsScreen.js +87 -0
- package/lib/screens/ProjectDetailsScreen.js.map +1 -0
- package/lib/screens/ProjectScreen.d.ts +3 -0
- package/lib/screens/ProjectScreen.js +27 -0
- package/lib/screens/ProjectScreen.js.map +1 -0
- package/lib/screens/TaskDetailsScreen.d.ts +6 -0
- package/lib/screens/TaskDetailsScreen.js +92 -0
- package/lib/screens/TaskDetailsScreen.js.map +1 -0
- package/lib/screens/TaskFormScreen.d.ts +6 -0
- package/lib/screens/TaskFormScreen.js +83 -0
- package/lib/screens/TaskFormScreen.js.map +1 -0
- package/lib/screens/TaskListScreen.d.ts +5 -0
- package/lib/screens/TaskListScreen.js +56 -0
- package/lib/screens/TaskListScreen.js.map +1 -0
- package/lib/screens/index.d.ts +74 -0
- package/lib/screens/index.js +82 -0
- package/lib/screens/index.js.map +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +19 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/reporting-type.d.ts +5 -0
- package/lib/types/reporting-type.js +23 -0
- package/lib/types/reporting-type.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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 from 'react';
|
|
19
|
+
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
20
|
+
import { useTranslator } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { Icon, Text } from '@axelor/aos-mobile-ui';
|
|
22
|
+
const SectionHeader = ({ titleKey, expanded, onPress, onEdit, showEdit = true, }) => {
|
|
23
|
+
const I18n = useTranslator();
|
|
24
|
+
return (<View style={styles.sectionContainer}>
|
|
25
|
+
<TouchableOpacity style={styles.titleContainer} onPress={onPress}>
|
|
26
|
+
<Text writingType="title" style={styles.title}>
|
|
27
|
+
{I18n.t(titleKey)}
|
|
28
|
+
</Text>
|
|
29
|
+
<Icon name={expanded ? 'chevron-up' : 'chevron-down'}/>
|
|
30
|
+
</TouchableOpacity>
|
|
31
|
+
<Icon name="pencil-fill" visible={showEdit} touchable={true} onPress={onEdit} style={styles.icon}/>
|
|
32
|
+
</View>);
|
|
33
|
+
};
|
|
34
|
+
const styles = StyleSheet.create({
|
|
35
|
+
sectionContainer: {
|
|
36
|
+
flexDirection: 'row',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
width: '90%',
|
|
39
|
+
alignSelf: 'center',
|
|
40
|
+
marginVertical: 7,
|
|
41
|
+
},
|
|
42
|
+
titleContainer: {
|
|
43
|
+
flex: 1,
|
|
44
|
+
flexDirection: 'row',
|
|
45
|
+
justifyContent: 'space-between',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
},
|
|
48
|
+
title: {
|
|
49
|
+
flex: 1,
|
|
50
|
+
},
|
|
51
|
+
icon: {
|
|
52
|
+
marginLeft: 10,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
export default SectionHeader;
|
|
56
|
+
//# sourceMappingURL=SectionHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionHeader.js","sourceRoot":"","sources":["../../../../src/components/molecules/SectionHeader/Sect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AAG,UAAU,CAAC,MAAM,CAAC;IAC/B,gBAAgB,EAAE;QAChB,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,QAAQ;QACnB,cAAc,EAAE,CAAC;KAClB;IACD,cAAc,EAAE;QACd,IAAI,EAAE,CAAC;QACP,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;QAC/B,UAAU,EAAE,QAAQ;KACrB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,CAAC;KACR;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,EAAE;KACf;CACF,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TaskProps {
|
|
3
|
+
id: number;
|
|
4
|
+
name?: string;
|
|
5
|
+
assignedTo?: any;
|
|
6
|
+
taskDeadline?: string;
|
|
7
|
+
parentTask?: any;
|
|
8
|
+
progress?: number;
|
|
9
|
+
priority?: any;
|
|
10
|
+
status?: any;
|
|
11
|
+
project?: any;
|
|
12
|
+
}
|
|
13
|
+
interface TaskActionCardProps {
|
|
14
|
+
style?: any;
|
|
15
|
+
task?: TaskProps;
|
|
16
|
+
displayParentProjet?: boolean;
|
|
17
|
+
onPress?: () => void;
|
|
18
|
+
}
|
|
19
|
+
declare const TaskActionCard: ({ style, task, displayParentProjet, onPress, }: TaskActionCardProps) => React.JSX.Element;
|
|
20
|
+
export default TaskActionCard;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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 from 'react';
|
|
19
|
+
import { ActionCard } from '@axelor/aos-mobile-ui';
|
|
20
|
+
import { useNavigation, useTranslator } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { TaskCard } from '../../atoms';
|
|
22
|
+
const TaskActionCard = ({ style, task, displayParentProjet = false, onPress, }) => {
|
|
23
|
+
const I18n = useTranslator();
|
|
24
|
+
const navigation = useNavigation();
|
|
25
|
+
return (<ActionCard style={style} actionList={[
|
|
26
|
+
{
|
|
27
|
+
iconName: 'clock-history',
|
|
28
|
+
helper: I18n.t('Project_LogTime'),
|
|
29
|
+
onPress: () => navigation.navigate('TaskDetailsScreen', {
|
|
30
|
+
projecTaskId: task.id,
|
|
31
|
+
isTimeViewActive: true,
|
|
32
|
+
}),
|
|
33
|
+
},
|
|
34
|
+
]} translator={I18n.t}>
|
|
35
|
+
<TaskCard onPress={onPress} name={task.name} assignedTo={task.assignedTo?.fullName} taskDeadline={task.taskDeadline} parentTask={displayParentProjet ? task?.project?.name : task.parentTask?.name} progress={task.progress} priority={task.priority} status={task.status}/>
|
|
36
|
+
</ActionCard>);
|
|
37
|
+
};
|
|
38
|
+
export default TaskActionCard;
|
|
39
|
+
//# sourceMappingURL=TaskActionCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskActionCard.js","sourceRoot":"","sources":["../../../../src/components/molecules/TaskActionCard/TaskActionCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,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C,MAAM,CAAC,EAExB;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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 from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
import { useSelector, useTypeHelpers } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { Badge, LabelText, ProgressBar, Text, checkNullString, } from '@axelor/aos-mobile-ui';
|
|
22
|
+
const TaskDetailsHeader = ({}) => {
|
|
23
|
+
const { getItemColorFromIndex } = useTypeHelpers();
|
|
24
|
+
const { projectTask, projectTaskStatusList, projectPriorityList } = useSelector((state) => state.project_projectTask);
|
|
25
|
+
return (<View style={styles.container}>
|
|
26
|
+
<View style={styles.rowContainer}>
|
|
27
|
+
<View style={styles.columnContainer}>
|
|
28
|
+
<Text writingType="title">{projectTask?.name}</Text>
|
|
29
|
+
<LabelText iconName="pin-angle-fill" size={16} title={projectTask?.assignedTo?.fullName} textStyle={styles.labelText}/>
|
|
30
|
+
{!checkNullString(projectTask?.parentTask?.fullName) && (<LabelText iconName="diagram-3-fill" size={16} title={projectTask?.parentTask?.fullName} textStyle={styles.labelText}/>)}
|
|
31
|
+
</View>
|
|
32
|
+
<View style={[styles.columnContainer, styles.alignEnd]}>
|
|
33
|
+
{projectTask?.status != null && (<Badge title={projectTask?.status?.name} color={getItemColorFromIndex(projectTaskStatusList, projectTask?.status)} style={styles.badge}/>)}
|
|
34
|
+
{projectTask?.priority != null && (<Badge title={projectTask?.priority?.name} color={getItemColorFromIndex(projectPriorityList, projectTask?.priority)} style={styles.badge}/>)}
|
|
35
|
+
</View>
|
|
36
|
+
</View>
|
|
37
|
+
<ProgressBar value={projectTask.progress}/>
|
|
38
|
+
</View>);
|
|
39
|
+
};
|
|
40
|
+
const styles = StyleSheet.create({
|
|
41
|
+
container: {
|
|
42
|
+
marginHorizontal: 24,
|
|
43
|
+
marginBottom: 5,
|
|
44
|
+
flexDirection: 'column',
|
|
45
|
+
},
|
|
46
|
+
rowContainer: {
|
|
47
|
+
flexDirection: 'row',
|
|
48
|
+
justifyContent: 'space-between',
|
|
49
|
+
},
|
|
50
|
+
columnContainer: {
|
|
51
|
+
flexDirection: 'column',
|
|
52
|
+
marginBottom: 3,
|
|
53
|
+
flex: 1,
|
|
54
|
+
},
|
|
55
|
+
alignEnd: {
|
|
56
|
+
alignItems: 'flex-end',
|
|
57
|
+
},
|
|
58
|
+
labelText: {
|
|
59
|
+
fontSize: 16,
|
|
60
|
+
marginBottom: 3,
|
|
61
|
+
},
|
|
62
|
+
badge: {
|
|
63
|
+
marginTop: 3,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
export default TaskDetailsHeader;
|
|
67
|
+
//# sourceMappingURL=TaskDetailsHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskDetailsHeader.js","sourceRoot":"","sources":["../../../../src/components/molecules/TaskDetailsHeader/TaskDetailsHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAA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E;QACR,UAAU,EAAE,UAAU;KACvB;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,CAAC;KAChB;IACD,KAAK,EAAE;QACL,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as ActivityCard } from './ActivityCard/ActivityCard';
|
|
2
|
+
export { default as CustomFieldPopup } from './CustomFieldPopup/CustomFieldPopup';
|
|
3
|
+
export { default as DropdownInvoicing } from './DropdownInvoicing/DropdownInvoicing';
|
|
4
|
+
export { default as DropdownMembers } from './DropdownMembers/DropdownMembers';
|
|
5
|
+
export { default as DropdownTaskCharacteristics } from './DropdownTaskCharacteristics/DropdownTaskCharacteristics';
|
|
6
|
+
export { default as DropdownTaskDescription } from './DropdownTaskDescription/DropdownTaskDescription';
|
|
7
|
+
export { default as PartnerActionCard } from './PartnerActionCard/PartnerActionCard';
|
|
8
|
+
export { default as ProjectHeader } from './ProjectHeader/ProjectHeader';
|
|
9
|
+
export { default as ProjectSiteTags } from './ProjectSiteTags/ProjectSiteTags';
|
|
10
|
+
export { default as SectionHeader } from './SectionHeader/SectionHeader';
|
|
11
|
+
export { default as TaskActionCard } from './TaskActionCard/TaskActionCard';
|
|
12
|
+
export { default as TaskDetailsHeader } from './TaskDetailsHeader/TaskDetailsHeader';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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
|
+
export { default as ActivityCard } from './ActivityCard/ActivityCard';
|
|
19
|
+
export { default as CustomFieldPopup } from './CustomFieldPopup/CustomFieldPopup';
|
|
20
|
+
export { default as DropdownInvoicing } from './DropdownInvoicing/DropdownInvoicing';
|
|
21
|
+
export { default as DropdownMembers } from './DropdownMembers/DropdownMembers';
|
|
22
|
+
export { default as DropdownTaskCharacteristics } from './DropdownTaskCharacteristics/DropdownTaskCharacteristics';
|
|
23
|
+
export { default as DropdownTaskDescription } from './DropdownTaskDescription/DropdownTaskDescription';
|
|
24
|
+
export { default as PartnerActionCard } from './PartnerActionCard/PartnerActionCard';
|
|
25
|
+
export { default as ProjectHeader } from './ProjectHeader/ProjectHeader';
|
|
26
|
+
export { default as ProjectSiteTags } from './ProjectSiteTags/ProjectSiteTags';
|
|
27
|
+
export { default as SectionHeader } from './SectionHeader/SectionHeader';
|
|
28
|
+
export { default as TaskActionCard } from './TaskActionCard/TaskActionCard';
|
|
29
|
+
export { default as TaskDetailsHeader } from './TaskDetailsHeader/TaskDetailsHeader';
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/molecules/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAC,OAAO,IAAI,2BAA2B,EAAC,MAAM,2DAA2D,CAAC;AACjH,OAAO,EAAC,OAAO,IAAI,uBAAuB,EAAC,MAAM,mDAAmD,CAAC;AACrG,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,uCAAuC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const CustomSection: ({ titleKey, fieldType, visible, modelId, refreshKey, onRefresh, }: {
|
|
3
|
+
titleKey: string;
|
|
4
|
+
fieldType: string;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
modelId: number;
|
|
7
|
+
refreshKey: number;
|
|
8
|
+
onRefresh: () => void;
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
export default CustomSection;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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, { useState } from 'react';
|
|
19
|
+
import { StyleSheet } from 'react-native';
|
|
20
|
+
import { HorizontalRule } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { CustomFieldForm } from '@axelor/aos-mobile-core';
|
|
22
|
+
import { CustomFieldPopup, SectionHeader } from '../../molecules';
|
|
23
|
+
const CustomSection = ({ titleKey, fieldType, visible = true, modelId, refreshKey, onRefresh, }) => {
|
|
24
|
+
const [expanded, setExpanded] = useState(true);
|
|
25
|
+
const [alertVisible, setAlertVisible] = useState(false);
|
|
26
|
+
if (!visible) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return (<>
|
|
30
|
+
<SectionHeader titleKey={titleKey} expanded={expanded} onPress={() => setExpanded(_current => !_current)} onEdit={() => setAlertVisible(true)}/>
|
|
31
|
+
{expanded && (<>
|
|
32
|
+
<CustomFieldForm model="com.axelor.apps.project.db.ProjectTask" fieldType={fieldType} modelId={modelId} style={styles.form} readonly key={refreshKey}/>
|
|
33
|
+
<HorizontalRule style={styles.horizontalRule}/>
|
|
34
|
+
</>)}
|
|
35
|
+
<CustomFieldPopup titleKey={titleKey} fieldType={fieldType} visible={alertVisible} onClose={() => setAlertVisible(false)} onSave={onRefresh} projectTaskId={modelId}/>
|
|
36
|
+
</>);
|
|
37
|
+
};
|
|
38
|
+
const styles = StyleSheet.create({
|
|
39
|
+
form: {
|
|
40
|
+
flex: 1,
|
|
41
|
+
},
|
|
42
|
+
horizontalRule: {
|
|
43
|
+
marginVertical: 12,
|
|
44
|
+
width: '90%',
|
|
45
|
+
alignSelf: 'center',
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
export default CustomSection;
|
|
49
|
+
//# sourceMappingURL=CustomSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomSection.js","sourceRoot":"","sources":["../../../../src/components/organisms/CustomSection/CustomSection.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAEhE,MAAM,aAAa,GAAG,CAAC,EACrB,QAAQ,EACR,SAAS,EACT,OAAO,GAAG,IAAI,EACd,OAAO,EACP,UAAU,EACV,SAAS,GAQV,EAAE,EAAE;IACH,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExD,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,EACE;MAAA,CAAC,aAAa,CACZ,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAClD,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,EAEtC;MAAA,CAAC,QAAQ,IAAI,CACX,EACE;UAAA,CAAC,eAAe,CACd,KAAK,CAAC,wCAAwC,CAC9C,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CACnB,QAAQ,CACR,GAAG,CAAC,CAAC,UAAU,CAAC,EAElB;UAAA,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,EAC/C;QAAA,GAAG,CACJ,CACD;MAAA,CAAC,gBAAgB,CACf,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,OAAO,CAAC,CAAC,YAAY,CAAC,CACtB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CACtC,MAAM,CAAC,CAAC,SAAS,CAAC,CAClB,aAAa,CAAC,CAAC,OAAO,CAAC,EAE3B;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;KACR;IACD,cAAc,EAAE;QACd,cAAc,EAAE,EAAE;QAClB,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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 } from 'react';
|
|
19
|
+
import { Button } from '@axelor/aos-mobile-ui';
|
|
20
|
+
import { useDispatch, useTranslator } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { createTimeLog } from '../../../features/timesheetLinesSlice';
|
|
22
|
+
const LogTimeButton = ({ style, objectState, }) => {
|
|
23
|
+
const I18n = useTranslator();
|
|
24
|
+
const dispatch = useDispatch();
|
|
25
|
+
const handleLogTime = useCallback((state) => {
|
|
26
|
+
dispatch(createTimeLog({
|
|
27
|
+
timesheetLine: {
|
|
28
|
+
projectId: state.project?.id,
|
|
29
|
+
projectTaskId: state.projectTask?.id,
|
|
30
|
+
productId: state.product?.id,
|
|
31
|
+
toInvoice: state.toInvoice,
|
|
32
|
+
date: state.date,
|
|
33
|
+
duration: state.hoursDuration,
|
|
34
|
+
comments: state.comments,
|
|
35
|
+
},
|
|
36
|
+
}));
|
|
37
|
+
}, [dispatch]);
|
|
38
|
+
return (<Button style={style} title={I18n.t('Base_Create')} onPress={() => handleLogTime(objectState)}/>);
|
|
39
|
+
};
|
|
40
|
+
export default LogTimeButton;
|
|
41
|
+
//# sourceMappingURL=LogTimeButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogTimeButton.js","sourceRoot":"","sources":["../../../../src/components/organisms/LogTimeButton/LogTimeButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAC,aAAa,EAAC,MAAM,uCAAuC,CAAC;AAEpE,MAAM,aAAa,GAAG,CAAC,EACrB,KAAK,EACL,WAAW,GAIZ,EAAE,EAAE;IACH,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,aAAa,GAAG,WAAW,CAC/B,CAAC,KAAU,EAAE,EAAE;QACb,QAAQ,CACL,aAAqB,CAAC;YACrB,aAAa,EAAE;gBACb,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE;gBAC5B,aAAa,EAAE,KAAK,CAAC,WAAW,EAAE,EAAE;gBACpC,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE;gBAC5B,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,QAAQ,EAAE,KAAK,CAAC,aAAa;gBAC7B,QAAQ,EAAE,KAAK,CAAC,QAAQ;aACzB;SACF,CAAC,CACH,CAAC;IACJ,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,CAAC,MAAM,CACL,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAC7B,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,EAC1C,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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 } from 'react';
|
|
19
|
+
import { StyleSheet } from 'react-native';
|
|
20
|
+
import { useSelector, useTranslator } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { DropdownCardSwitch } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { DropdownInvoicing, DropdownMembers } from '../../molecules';
|
|
23
|
+
const ProjectDropdownCards = () => {
|
|
24
|
+
const I18n = useTranslator();
|
|
25
|
+
const { project } = useSelector((state) => state.project_project);
|
|
26
|
+
const items = useMemo(() => {
|
|
27
|
+
const result = [];
|
|
28
|
+
if (project.isBusinessProject) {
|
|
29
|
+
result.push({
|
|
30
|
+
key: 1,
|
|
31
|
+
title: I18n.t('Project_Invoicing'),
|
|
32
|
+
childrenComp: (<DropdownInvoicing currency={project?.currency} priceList={project?.priceList} tasksInvoicing={project?.toInvoice} expensesInvoicing={project?.isInvoicingExpenses} purchasesInvoicing={project?.isInvoicingPurchases}/>),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
result.push({
|
|
36
|
+
key: 2,
|
|
37
|
+
title: I18n.t('Project_Members'),
|
|
38
|
+
childrenComp: (<DropdownMembers team={project?.team?.name} memberSet={project?.membersUserSet}/>),
|
|
39
|
+
});
|
|
40
|
+
return result;
|
|
41
|
+
}, [I18n, project]);
|
|
42
|
+
return <DropdownCardSwitch dropdownItems={items} style={styles.dropdown}/>;
|
|
43
|
+
};
|
|
44
|
+
const styles = StyleSheet.create({
|
|
45
|
+
dropdown: {
|
|
46
|
+
marginTop: 5,
|
|
47
|
+
marginBottom: 100,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
export default ProjectDropdownCards;
|
|
51
|
+
//# sourceMappingURL=ProjectDropdownCards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectDropdownCards.js","sourceRoot":"","sources":["../../../../src/components/organisms/ProjectDropdownCards/ProjectDropdownCards.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAC,iBAAiB,EAAE,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAEnE,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAChC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,EAAC,OAAO,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAErE,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE;QACzB,MAAM,MAAM,GAAG,EAAE,CAAC;QAElB,IAAI,OAAO,CAAC,iBAAiB,EAAE;YAC7B,MAAM,CAAC,IAAI,CAAC;gBACV,GAAG,EAAE,CAAC;gBACN,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC;gBAClC,YAAY,EAAE,CACZ,CAAC,iBAAiB,CAChB,QAAQ,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAC5B,SAAS,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CAC9B,cAAc,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,CACnC,iBAAiB,CAAC,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAChD,kBAAkB,CAAC,CAAC,OAAO,EAAE,oBAAoB,CAAC,EAClD,CACH;aACF,CAAC,CAAC;SACJ;QAED,MAAM,CAAC,IAAI,CAAC;YACV,GAAG,EAAE,CAAC;YACN,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC;YAChC,YAAY,EAAE,CACZ,CAAC,eAAe,CACd,IAAI,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAC1B,SAAS,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,EACnC,CACH;SACF,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAEpB,OAAO,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAG,CAAC;AAC9E,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,GAAG;KAClB;CACF,CAAC,CAAC;AAEH,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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 } from 'react';
|
|
19
|
+
import { StyleSheet } from 'react-native';
|
|
20
|
+
import { useSelector, useTranslator } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { DropdownCardSwitch, checkNullString } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { DropdownTaskCharacteristics, DropdownTaskDescription, } from '../../molecules';
|
|
23
|
+
const ProjectTaskDropdownCards = () => {
|
|
24
|
+
const I18n = useTranslator();
|
|
25
|
+
const { projectTask } = useSelector((state) => state.project_projectTask);
|
|
26
|
+
const items = useMemo(() => {
|
|
27
|
+
const result = [
|
|
28
|
+
{
|
|
29
|
+
key: 1,
|
|
30
|
+
title: I18n.t('Project_Characteristics'),
|
|
31
|
+
childrenComp: (<DropdownTaskCharacteristics projectTaskCategory={projectTask.projectTaskCategory} projectTaskSection={projectTask.projectTaskSection} targetVersion={projectTask.targetVersion} taskDate={projectTask.taskDate} taskEndDate={projectTask.taskEndDate} taskDeadline={projectTask.taskDeadline} tagSet={projectTask.tagSet}/>),
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
if (!checkNullString(projectTask?.description) ||
|
|
35
|
+
!checkNullString(projectTask?.internalDescription)) {
|
|
36
|
+
result.push({
|
|
37
|
+
key: 2,
|
|
38
|
+
title: I18n.t('Project_Descriptions'),
|
|
39
|
+
childrenComp: (<DropdownTaskDescription description={projectTask?.description} internalDescription={projectTask?.internalDescription}/>),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}, [I18n, projectTask]);
|
|
44
|
+
return <DropdownCardSwitch dropdownItems={items} style={styles.dropdown}/>;
|
|
45
|
+
};
|
|
46
|
+
const styles = StyleSheet.create({
|
|
47
|
+
dropdown: {
|
|
48
|
+
marginTop: 5,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
export default ProjectTaskDropdownCards;
|
|
52
|
+
//# sourceMappingURL=ProjectTaskDropdownCards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectTaskDropdownCards.js","sourceRoot":"","sources":["../../../../src/components/organisms/ProjectTaskDropdownCards/ProjectTaskDropdownCards.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAC,kBAAkB,EAAE,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,EAAC,WAAW,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAE7E,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE;QACzB,MAAM,MAAM,GAAG;YACb;gBACE,GAAG,EAAE,CAAC;gBACN,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,yBAAyB,CAAC;gBACxC,YAAY,EAAE,CACZ,CAAC,2BAA2B,CAC1B,mBAAmB,CAAC,CAAC,WAAW,CAAC,mBAAmB,CAAC,CACrD,kBAAkB,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CACnD,aAAa,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,CACzC,QAAQ,CAAC,CAAC,WAAW,CAAC,QAAQ,CAAC,CAC/B,WAAW,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CACrC,YAAY,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CACvC,MAAM,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,EAC3B,CACH;aACF;SACF,CAAC;QAEF,IACE,CAAC,eAAe,CAAC,WAAW,EAAE,WAAW,CAAC;YAC1C,CAAC,eAAe,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAClD;YACA,MAAM,CAAC,IAAI,CAAC;gBACV,GAAG,EAAE,CAAC;gBACN,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,sBAAsB,CAAC;gBACrC,YAAY,EAAE,CACZ,CAAC,uBAAuB,CACtB,WAAW,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC,CACtC,mBAAmB,CAAC,CAAC,WAAW,EAAE,mBAAmB,CAAC,EACtD,CACH;aACF,CAAC,CAAC;SACJ;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;IAExB,OAAO,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAG,CAAC;AAC9E,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE;QACR,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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, useMemo } from 'react';
|
|
19
|
+
import { formatDate, useDispatch, useSelector, useTranslator, } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { GridView } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { fetchTimesheetLinesByTask } from '../../../features/timesheetLinesSlice';
|
|
22
|
+
const TimeSpentGridView = () => {
|
|
23
|
+
const I18n = useTranslator();
|
|
24
|
+
const dispatch = useDispatch();
|
|
25
|
+
const { projectTask } = useSelector((state) => state.project_projectTask);
|
|
26
|
+
const { timesheetLineList } = useSelector((state) => state.project_timesheetLines);
|
|
27
|
+
const formattedData = useMemo(() => {
|
|
28
|
+
if (Array.isArray(timesheetLineList) && timesheetLineList.length > 0) {
|
|
29
|
+
return timesheetLineList.map(item => ({
|
|
30
|
+
date: formatDate(item.date, I18n.t('Base_DateFormat')),
|
|
31
|
+
duration: item.duration,
|
|
32
|
+
product: item.product?.fullName ?? '',
|
|
33
|
+
toInvoice: item.toInvoice ? 'X' : '',
|
|
34
|
+
comments: item.comments ?? '',
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
}, [timesheetLineList, I18n]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
dispatch(fetchTimesheetLinesByTask({ projectTaskId: projectTask?.id }));
|
|
43
|
+
}, [dispatch, projectTask]);
|
|
44
|
+
return (<GridView data={formattedData} columns={[
|
|
45
|
+
{ title: I18n.t('Project_Date'), key: 'date' },
|
|
46
|
+
{ title: I18n.t('Project_Product'), key: 'product' },
|
|
47
|
+
{ title: I18n.t('Project_Duration'), key: 'duration' },
|
|
48
|
+
{ title: I18n.t('Project_ToInvoice'), key: 'toInvoice' },
|
|
49
|
+
{ title: I18n.t('Base_Comments'), key: 'comments' },
|
|
50
|
+
]} translator={I18n.t} title={I18n.t('Project_TimeSpent')}/>);
|
|
51
|
+
};
|
|
52
|
+
export default TimeSpentGridView;
|
|
53
|
+
//# sourceMappingURL=TimeSpentGridView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeSpentGridView.js","sourceRoot":"","sources":["../../../../src/components/organisms/TimeSpentGridView/TimeSpentGridView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAChD,OAAO,EACL,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAC,yBAAyB,EAAC,MAAM,uCAAuC,CAAC;AAEhF,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC7B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,EAAC,WAAW,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC7E,MAAM,EAAC,iBAAiB,EAAC,GAAG,WAAW,CACrC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,sBAAsB,CAC7C,CAAC;IAEF,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE;QACjC,IAAI,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;YACpE,OAAO,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACpC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;gBACtD,QAAQ,EAAE,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,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as CustomSection } from './CustomSection/CustomSection';
|
|
2
|
+
export { default as LogTimeButton } from './LogTimeButton/LogTimeButton';
|
|
3
|
+
export { default as ProjectDropdownCards } from './ProjectDropdownCards/ProjectDropdownCards';
|
|
4
|
+
export { default as ProjectTaskDropdownCards } from './ProjectTaskDropdownCards/ProjectTaskDropdownCards';
|
|
5
|
+
export { default as TimeSpentGridView } from './TimeSpentGridView/TimeSpentGridView';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 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
|
+
export { default as CustomSection } from './CustomSection/CustomSection';
|
|
19
|
+
export { default as LogTimeButton } from './LogTimeButton/LogTimeButton';
|
|
20
|
+
export { default as ProjectDropdownCards } from './ProjectDropdownCards/ProjectDropdownCards';
|
|
21
|
+
export { default as ProjectTaskDropdownCards } from './ProjectTaskDropdownCards/ProjectTaskDropdownCards';
|
|
22
|
+
export { default as TimeSpentGridView } from './TimeSpentGridView/TimeSpentGridView';
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/organisms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,oBAAoB,EAAC,MAAM,6CAA6C,CAAC;AAC5F,OAAO,EAAC,OAAO,IAAI,wBAAwB,EAAC,MAAM,qDAAqD,CAAC;AACxG,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,uCAAuC,CAAC"}
|