@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.
Files changed (247) hide show
  1. package/README.md +44 -0
  2. package/lib/api/index.d.ts +4 -0
  3. package/lib/api/index.js +22 -0
  4. package/lib/api/index.js.map +1 -0
  5. package/lib/api/project-api.d.ts +20 -0
  6. package/lib/api/project-api.js +136 -0
  7. package/lib/api/project-api.js.map +1 -0
  8. package/lib/api/project-task-api.d.ts +51 -0
  9. package/lib/api/project-task-api.js +294 -0
  10. package/lib/api/project-task-api.js.map +1 -0
  11. package/lib/api/reporting-api.d.ts +3 -0
  12. package/lib/api/reporting-api.js +26 -0
  13. package/lib/api/reporting-api.js.map +1 -0
  14. package/lib/api/timesheet-lines-api.d.ts +3 -0
  15. package/lib/api/timesheet-lines-api.js +41 -0
  16. package/lib/api/timesheet-lines-api.js.map +1 -0
  17. package/lib/components/atoms/DatesDisplay/DatesDisplay.d.ts +6 -0
  18. package/lib/components/atoms/DatesDisplay/DatesDisplay.js +59 -0
  19. package/lib/components/atoms/DatesDisplay/DatesDisplay.js.map +1 -0
  20. package/lib/components/atoms/PartnerCard/PartnerCard.d.ts +12 -0
  21. package/lib/components/atoms/PartnerCard/PartnerCard.js +74 -0
  22. package/lib/components/atoms/PartnerCard/PartnerCard.js.map +1 -0
  23. package/lib/components/atoms/ProjectCard/ProjectCard.d.ts +15 -0
  24. package/lib/components/atoms/ProjectCard/ProjectCard.js +101 -0
  25. package/lib/components/atoms/ProjectCard/ProjectCard.js.map +1 -0
  26. package/lib/components/atoms/ProjectSimpleCard/ProjectSimpleCard.d.ts +10 -0
  27. package/lib/components/atoms/ProjectSimpleCard/ProjectSimpleCard.js +48 -0
  28. package/lib/components/atoms/ProjectSimpleCard/ProjectSimpleCard.js.map +1 -0
  29. package/lib/components/atoms/TaskCard/TaskCard.d.ts +16 -0
  30. package/lib/components/atoms/TaskCard/TaskCard.js +93 -0
  31. package/lib/components/atoms/TaskCard/TaskCard.js.map +1 -0
  32. package/lib/components/atoms/index.d.ts +5 -0
  33. package/lib/components/atoms/index.js +23 -0
  34. package/lib/components/atoms/index.js.map +1 -0
  35. package/lib/components/index.d.ts +5 -0
  36. package/lib/components/index.js +23 -0
  37. package/lib/components/index.js.map +1 -0
  38. package/lib/components/molecules/ActivityCard/ActivityCard.d.ts +11 -0
  39. package/lib/components/molecules/ActivityCard/ActivityCard.js +80 -0
  40. package/lib/components/molecules/ActivityCard/ActivityCard.js.map +1 -0
  41. package/lib/components/molecules/CustomFieldPopup/CustomFieldPopup.d.ts +11 -0
  42. package/lib/components/molecules/CustomFieldPopup/CustomFieldPopup.js +53 -0
  43. package/lib/components/molecules/CustomFieldPopup/CustomFieldPopup.js.map +1 -0
  44. package/lib/components/molecules/DropdownInvoicing/DropdownInvoicing.d.ts +11 -0
  45. package/lib/components/molecules/DropdownInvoicing/DropdownInvoicing.js +41 -0
  46. package/lib/components/molecules/DropdownInvoicing/DropdownInvoicing.js.map +1 -0
  47. package/lib/components/molecules/DropdownMembers/DropdownMembers.d.ts +8 -0
  48. package/lib/components/molecules/DropdownMembers/DropdownMembers.js +33 -0
  49. package/lib/components/molecules/DropdownMembers/DropdownMembers.js.map +1 -0
  50. package/lib/components/molecules/DropdownTaskCharacteristics/DropdownTaskCharacteristics.d.ts +13 -0
  51. package/lib/components/molecules/DropdownTaskCharacteristics/DropdownTaskCharacteristics.js +51 -0
  52. package/lib/components/molecules/DropdownTaskCharacteristics/DropdownTaskCharacteristics.js.map +1 -0
  53. package/lib/components/molecules/DropdownTaskDescription/DropdownTaskDescription.d.ts +8 -0
  54. package/lib/components/molecules/DropdownTaskDescription/DropdownTaskDescription.js +39 -0
  55. package/lib/components/molecules/DropdownTaskDescription/DropdownTaskDescription.js.map +1 -0
  56. package/lib/components/molecules/PartnerActionCard/PartnerActionCard.d.ts +19 -0
  57. package/lib/components/molecules/PartnerActionCard/PartnerActionCard.js +53 -0
  58. package/lib/components/molecules/PartnerActionCard/PartnerActionCard.js.map +1 -0
  59. package/lib/components/molecules/ProjectHeader/ProjectHeader.d.ts +3 -0
  60. package/lib/components/molecules/ProjectHeader/ProjectHeader.js +67 -0
  61. package/lib/components/molecules/ProjectHeader/ProjectHeader.js.map +1 -0
  62. package/lib/components/molecules/ProjectSiteTags/ProjectSiteTags.d.ts +3 -0
  63. package/lib/components/molecules/ProjectSiteTags/ProjectSiteTags.js +34 -0
  64. package/lib/components/molecules/ProjectSiteTags/ProjectSiteTags.js.map +1 -0
  65. package/lib/components/molecules/SectionHeader/SectionHeader.d.ts +9 -0
  66. package/lib/components/molecules/SectionHeader/SectionHeader.js +56 -0
  67. package/lib/components/molecules/SectionHeader/SectionHeader.js.map +1 -0
  68. package/lib/components/molecules/TaskActionCard/TaskActionCard.d.ts +20 -0
  69. package/lib/components/molecules/TaskActionCard/TaskActionCard.js +39 -0
  70. package/lib/components/molecules/TaskActionCard/TaskActionCard.js.map +1 -0
  71. package/lib/components/molecules/TaskDetailsHeader/TaskDetailsHeader.d.ts +3 -0
  72. package/lib/components/molecules/TaskDetailsHeader/TaskDetailsHeader.js +67 -0
  73. package/lib/components/molecules/TaskDetailsHeader/TaskDetailsHeader.js.map +1 -0
  74. package/lib/components/molecules/index.d.ts +12 -0
  75. package/lib/components/molecules/index.js +30 -0
  76. package/lib/components/molecules/index.js.map +1 -0
  77. package/lib/components/organisms/CustomSection/CustomSection.d.ts +10 -0
  78. package/lib/components/organisms/CustomSection/CustomSection.js +49 -0
  79. package/lib/components/organisms/CustomSection/CustomSection.js.map +1 -0
  80. package/lib/components/organisms/LogTimeButton/LogTimeButton.d.ts +6 -0
  81. package/lib/components/organisms/LogTimeButton/LogTimeButton.js +41 -0
  82. package/lib/components/organisms/LogTimeButton/LogTimeButton.js.map +1 -0
  83. package/lib/components/organisms/ProjectDropdownCards/ProjectDropdownCards.d.ts +3 -0
  84. package/lib/components/organisms/ProjectDropdownCards/ProjectDropdownCards.js +51 -0
  85. package/lib/components/organisms/ProjectDropdownCards/ProjectDropdownCards.js.map +1 -0
  86. package/lib/components/organisms/ProjectTaskDropdownCards/ProjectTaskDropdownCards.d.ts +3 -0
  87. package/lib/components/organisms/ProjectTaskDropdownCards/ProjectTaskDropdownCards.js +52 -0
  88. package/lib/components/organisms/ProjectTaskDropdownCards/ProjectTaskDropdownCards.js.map +1 -0
  89. package/lib/components/organisms/TimeSpentGridView/TimeSpentGridView.d.ts +3 -0
  90. package/lib/components/organisms/TimeSpentGridView/TimeSpentGridView.js +53 -0
  91. package/lib/components/organisms/TimeSpentGridView/TimeSpentGridView.js.map +1 -0
  92. package/lib/components/organisms/index.d.ts +5 -0
  93. package/lib/components/organisms/index.js +23 -0
  94. package/lib/components/organisms/index.js.map +1 -0
  95. package/lib/components/pages/GeneralInformationView/GeneralInformationView.d.ts +3 -0
  96. package/lib/components/pages/GeneralInformationView/GeneralInformationView.js +55 -0
  97. package/lib/components/pages/GeneralInformationView/GeneralInformationView.js.map +1 -0
  98. package/lib/components/pages/ReportingView/ReportingView.d.ts +3 -0
  99. package/lib/components/pages/ReportingView/ReportingView.js +60 -0
  100. package/lib/components/pages/ReportingView/ReportingView.js.map +1 -0
  101. package/lib/components/pages/SubProjectView/SubProjectView.d.ts +3 -0
  102. package/lib/components/pages/SubProjectView/SubProjectView.js +80 -0
  103. package/lib/components/pages/SubProjectView/SubProjectView.js.map +1 -0
  104. package/lib/components/pages/TaskCustomFieldsView/TaskCustomFieldsView.d.ts +3 -0
  105. package/lib/components/pages/TaskCustomFieldsView/TaskCustomFieldsView.js +49 -0
  106. package/lib/components/pages/TaskCustomFieldsView/TaskCustomFieldsView.js.map +1 -0
  107. package/lib/components/pages/TaskGeneralInformationView/TaskGeneralInformationView.d.ts +5 -0
  108. package/lib/components/pages/TaskGeneralInformationView/TaskGeneralInformationView.js +55 -0
  109. package/lib/components/pages/TaskGeneralInformationView/TaskGeneralInformationView.js.map +1 -0
  110. package/lib/components/pages/TaskLinkView/TaskLinkView.d.ts +3 -0
  111. package/lib/components/pages/TaskLinkView/TaskLinkView.js +58 -0
  112. package/lib/components/pages/TaskLinkView/TaskLinkView.js.map +1 -0
  113. package/lib/components/pages/TaskView/TaskView.d.ts +3 -0
  114. package/lib/components/pages/TaskView/TaskView.js +63 -0
  115. package/lib/components/pages/TaskView/TaskView.js.map +1 -0
  116. package/lib/components/pages/TimeView/TimeView.d.ts +7 -0
  117. package/lib/components/pages/TimeView/TimeView.js +59 -0
  118. package/lib/components/pages/TimeView/TimeView.js.map +1 -0
  119. package/lib/components/pages/index.d.ts +8 -0
  120. package/lib/components/pages/index.js +26 -0
  121. package/lib/components/pages/index.js.map +1 -0
  122. package/lib/components/templates/ActivityListView/ActivityListView.d.ts +3 -0
  123. package/lib/components/templates/ActivityListView/ActivityListView.js +117 -0
  124. package/lib/components/templates/ActivityListView/ActivityListView.js.map +1 -0
  125. package/lib/components/templates/CategorySearchBar/CategorySearchBar.d.ts +12 -0
  126. package/lib/components/templates/CategorySearchBar/CategorySearchBar.js +41 -0
  127. package/lib/components/templates/CategorySearchBar/CategorySearchBar.js.map +1 -0
  128. package/lib/components/templates/ParentTaskSearchBar/ParentTaskSearchBar.d.ts +12 -0
  129. package/lib/components/templates/ParentTaskSearchBar/ParentTaskSearchBar.js +41 -0
  130. package/lib/components/templates/ParentTaskSearchBar/ParentTaskSearchBar.js.map +1 -0
  131. package/lib/components/templates/PrioritySearchBar/PrioritySearchBar.d.ts +12 -0
  132. package/lib/components/templates/PrioritySearchBar/PrioritySearchBar.js +41 -0
  133. package/lib/components/templates/PrioritySearchBar/PrioritySearchBar.js.map +1 -0
  134. package/lib/components/templates/ProjectListView/ProjectListView.d.ts +6 -0
  135. package/lib/components/templates/ProjectListView/ProjectListView.js +71 -0
  136. package/lib/components/templates/ProjectListView/ProjectListView.js.map +1 -0
  137. package/lib/components/templates/ProjectSearchBar/ProjectSearchBar.d.ts +13 -0
  138. package/lib/components/templates/ProjectSearchBar/ProjectSearchBar.js +39 -0
  139. package/lib/components/templates/ProjectSearchBar/ProjectSearchBar.js.map +1 -0
  140. package/lib/components/templates/ReportingDetailsView/IndicatorCategory.d.ts +7 -0
  141. package/lib/components/templates/ReportingDetailsView/IndicatorCategory.js +70 -0
  142. package/lib/components/templates/ReportingDetailsView/IndicatorCategory.js.map +1 -0
  143. package/lib/components/templates/ReportingDetailsView/ReportingDetailsView.d.ts +3 -0
  144. package/lib/components/templates/ReportingDetailsView/ReportingDetailsView.js +50 -0
  145. package/lib/components/templates/ReportingDetailsView/ReportingDetailsView.js.map +1 -0
  146. package/lib/components/templates/SectionSearchBar/SectionSearchBar.d.ts +12 -0
  147. package/lib/components/templates/SectionSearchBar/SectionSearchBar.js +38 -0
  148. package/lib/components/templates/SectionSearchBar/SectionSearchBar.js.map +1 -0
  149. package/lib/components/templates/TargetVersionSearchBar/TargetVersionSearchBar.d.ts +12 -0
  150. package/lib/components/templates/TargetVersionSearchBar/TargetVersionSearchBar.js +40 -0
  151. package/lib/components/templates/TargetVersionSearchBar/TargetVersionSearchBar.js.map +1 -0
  152. package/lib/components/templates/TaskFilters/TaskFilters.d.ts +14 -0
  153. package/lib/components/templates/TaskFilters/TaskFilters.js +135 -0
  154. package/lib/components/templates/TaskFilters/TaskFilters.js.map +1 -0
  155. package/lib/components/templates/TaskStatusSearchBar/TaskStatusSearchBar.d.ts +12 -0
  156. package/lib/components/templates/TaskStatusSearchBar/TaskStatusSearchBar.js +56 -0
  157. package/lib/components/templates/TaskStatusSearchBar/TaskStatusSearchBar.js.map +1 -0
  158. package/lib/components/templates/TaskTagMultiValuePicker/TaskTagMultiValuePicker.d.ts +11 -0
  159. package/lib/components/templates/TaskTagMultiValuePicker/TaskTagMultiValuePicker.js +50 -0
  160. package/lib/components/templates/TaskTagMultiValuePicker/TaskTagMultiValuePicker.js.map +1 -0
  161. package/lib/components/templates/index.d.ts +12 -0
  162. package/lib/components/templates/index.js +30 -0
  163. package/lib/components/templates/index.js.map +1 -0
  164. package/lib/features/asyncFunctions-index.d.ts +4 -0
  165. package/lib/features/asyncFunctions-index.js +22 -0
  166. package/lib/features/asyncFunctions-index.js.map +1 -0
  167. package/lib/features/index.d.ts +4 -0
  168. package/lib/features/index.js +22 -0
  169. package/lib/features/index.js.map +1 -0
  170. package/lib/features/projectSlice.d.ts +65 -0
  171. package/lib/features/projectSlice.js +118 -0
  172. package/lib/features/projectSlice.js.map +1 -0
  173. package/lib/features/projectTaskSlice.d.ts +193 -0
  174. package/lib/features/projectTaskSlice.js +310 -0
  175. package/lib/features/projectTaskSlice.js.map +1 -0
  176. package/lib/features/reportingSlice.d.ts +13 -0
  177. package/lib/features/reportingSlice.js +43 -0
  178. package/lib/features/reportingSlice.js.map +1 -0
  179. package/lib/features/timesheetLinesSlice.d.ts +39 -0
  180. package/lib/features/timesheetLinesSlice.js +57 -0
  181. package/lib/features/timesheetLinesSlice.js.map +1 -0
  182. package/lib/hooks/index.d.ts +2 -0
  183. package/lib/hooks/index.js +20 -0
  184. package/lib/hooks/index.js.map +1 -0
  185. package/lib/hooks/use-project-header-actions.d.ts +1 -0
  186. package/lib/hooks/use-project-header-actions.js +75 -0
  187. package/lib/hooks/use-project-header-actions.js.map +1 -0
  188. package/lib/hooks/use-reporting-configuration.d.ts +5 -0
  189. package/lib/hooks/use-reporting-configuration.js +33 -0
  190. package/lib/hooks/use-reporting-configuration.js.map +1 -0
  191. package/lib/hooks/use-task-filter.d.ts +32 -0
  192. package/lib/hooks/use-task-filter.js +96 -0
  193. package/lib/hooks/use-task-filter.js.map +1 -0
  194. package/lib/i18n/en.json +87 -0
  195. package/lib/i18n/fr.json +87 -0
  196. package/lib/index.d.ts +8 -0
  197. package/lib/index.js +81 -0
  198. package/lib/index.js.map +1 -0
  199. package/lib/models/forms.d.ts +2 -0
  200. package/lib/models/forms.js +245 -0
  201. package/lib/models/forms.js.map +1 -0
  202. package/lib/models/index.d.ts +5 -0
  203. package/lib/models/index.js +23 -0
  204. package/lib/models/index.js.map +1 -0
  205. package/lib/models/objectFields.d.ts +2 -0
  206. package/lib/models/objectFields.js +187 -0
  207. package/lib/models/objectFields.js.map +1 -0
  208. package/lib/models/searchFields.d.ts +2 -0
  209. package/lib/models/searchFields.js +31 -0
  210. package/lib/models/searchFields.js.map +1 -0
  211. package/lib/models/sortFields.d.ts +2 -0
  212. package/lib/models/sortFields.js +22 -0
  213. package/lib/models/sortFields.js.map +1 -0
  214. package/lib/models/typeObjects.d.ts +2 -0
  215. package/lib/models/typeObjects.js +63 -0
  216. package/lib/models/typeObjects.js.map +1 -0
  217. package/lib/screens/ActiveProjectScreen.d.ts +3 -0
  218. package/lib/screens/ActiveProjectScreen.js +50 -0
  219. package/lib/screens/ActiveProjectScreen.js.map +1 -0
  220. package/lib/screens/BuisnessProjectScreen.d.ts +3 -0
  221. package/lib/screens/BuisnessProjectScreen.js +27 -0
  222. package/lib/screens/BuisnessProjectScreen.js.map +1 -0
  223. package/lib/screens/ProjectDetailsScreen.d.ts +7 -0
  224. package/lib/screens/ProjectDetailsScreen.js +87 -0
  225. package/lib/screens/ProjectDetailsScreen.js.map +1 -0
  226. package/lib/screens/ProjectScreen.d.ts +3 -0
  227. package/lib/screens/ProjectScreen.js +27 -0
  228. package/lib/screens/ProjectScreen.js.map +1 -0
  229. package/lib/screens/TaskDetailsScreen.d.ts +6 -0
  230. package/lib/screens/TaskDetailsScreen.js +92 -0
  231. package/lib/screens/TaskDetailsScreen.js.map +1 -0
  232. package/lib/screens/TaskFormScreen.d.ts +6 -0
  233. package/lib/screens/TaskFormScreen.js +83 -0
  234. package/lib/screens/TaskFormScreen.js.map +1 -0
  235. package/lib/screens/TaskListScreen.d.ts +5 -0
  236. package/lib/screens/TaskListScreen.js +56 -0
  237. package/lib/screens/TaskListScreen.js.map +1 -0
  238. package/lib/screens/index.d.ts +74 -0
  239. package/lib/screens/index.js +82 -0
  240. package/lib/screens/index.js.map +1 -0
  241. package/lib/types/index.d.ts +1 -0
  242. package/lib/types/index.js +19 -0
  243. package/lib/types/index.js.map +1 -0
  244. package/lib/types/reporting-type.d.ts +5 -0
  245. package/lib/types/reporting-type.js +23 -0
  246. package/lib/types/reporting-type.js.map +1 -0
  247. package/package.json +48 -0
@@ -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 { createStandardSearch } from '@axelor/aos-mobile-core';
19
+ const createTimesheetLineCriteria = ({ projectTaskId }) => {
20
+ return [
21
+ {
22
+ fieldName: 'projectTask.id',
23
+ operator: '=',
24
+ value: projectTaskId,
25
+ },
26
+ ];
27
+ };
28
+ export async function fetchTimesheetLinesByTask({ projectTaskId }) {
29
+ return createStandardSearch({
30
+ model: 'com.axelor.apps.hr.db.TimesheetLine',
31
+ fieldKey: 'project_timesheetLine',
32
+ sortKey: 'project_timesheetLine',
33
+ criteria: createTimesheetLineCriteria({
34
+ projectTaskId,
35
+ }),
36
+ numberElementsByPage: null,
37
+ page: 0,
38
+ provider: 'model',
39
+ });
40
+ }
41
+ //# sourceMappingURL=timesheet-lines-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timesheet-lines-api.js","sourceRoot":"","sources":["../../src/api/timesheet-lines-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAE7D,MAAM,2BAA2B,GAAG,CAAC,EAAC,aAAa,EAAC,EAAE,EAAE;IACtD,OAAO;QACL;YACE,SAAS,EAAE,gBAAgB;YAC3B,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,aAAa;SACrB;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,EAAC,aAAa,EAAC;IAC7D,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,qCAAqC;QAC5C,QAAQ,EAAE,uBAAuB;QACjC,OAAO,EAAE,uBAAuB;QAChC,QAAQ,EAAE,2BAA2B,CAAC;YACpC,aAAa;SACd,CAAC;QACF,oBAAoB,EAAE,IAAI;QAC1B,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const DatesDisplay: ({ fromDate, toDate, }: {
3
+ fromDate?: string;
4
+ toDate?: string;
5
+ }) => React.JSX.Element;
6
+ export default DatesDisplay;
@@ -0,0 +1,59 @@
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 { StyleSheet, View } from 'react-native';
20
+ import { DateDisplay, useTranslator } from '@axelor/aos-mobile-core';
21
+ import { Icon, Text } from '@axelor/aos-mobile-ui';
22
+ const DatesDisplay = ({ fromDate, toDate, }) => {
23
+ const I18n = useTranslator();
24
+ const renderDateItem = useCallback(({ title, value }) => {
25
+ if (!value) {
26
+ return null;
27
+ }
28
+ return (<View style={styles.dateWrapper}>
29
+ <Text style={styles.centerText}>{I18n.t(title)}</Text>
30
+ <DateDisplay date={value}/>
31
+ </View>);
32
+ }, [I18n]);
33
+ return (<View style={styles.dateContainer}>
34
+ {renderDateItem({ title: 'Project_StartedOn', value: fromDate })}
35
+ <Icon name="arrow-right" size={30} style={styles.icon} visible={fromDate != null && toDate != null}/>
36
+ {renderDateItem({ title: 'Project_EndedOn', value: toDate })}
37
+ </View>);
38
+ };
39
+ const styles = StyleSheet.create({
40
+ dateContainer: {
41
+ flexDirection: 'row',
42
+ justifyContent: 'space-between',
43
+ alignItems: 'center',
44
+ marginBottom: 5,
45
+ },
46
+ icon: {
47
+ marginHorizontal: 2,
48
+ },
49
+ dateWrapper: {
50
+ flexDirection: 'column',
51
+ justifyContent: 'center',
52
+ alignItems: 'center',
53
+ },
54
+ centerText: {
55
+ textAlign: 'center',
56
+ },
57
+ });
58
+ export default DatesDisplay;
59
+ //# sourceMappingURL=DatesDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatesDisplay.js","sourceRoot":"","sources":["../../../../src/components/atoms/DatesDisplay/DatesDisplay.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,uBAAuB,CAAC;AAOjD,MAAM,YAAY,GAAG,CAAC,EACpB,QAAQ,EACR,MAAM,GAIP,EAAE,EAAE;IACH,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,EAAC,KAAK,EAAE,KAAK,EAAgB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AAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IACD,UAAU,EAAE;QACV,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface PartnerCardProps {
3
+ style?: any;
4
+ picture: any;
5
+ name: string;
6
+ code: string;
7
+ jobName?: string;
8
+ id: number;
9
+ isContact: boolean;
10
+ }
11
+ declare const PartnerCard: ({ style, picture, name, code, jobName, id, isContact, }: PartnerCardProps) => React.JSX.Element;
12
+ export default PartnerCard;
@@ -0,0 +1,74 @@
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 { StyleSheet } from 'react-native';
20
+ import { ObjectCard } from '@axelor/aos-mobile-ui';
21
+ import { useMetafileUri, useNavigation } from '@axelor/aos-mobile-core';
22
+ const PartnerCard = ({ style, picture, name, code, jobName, id, isContact, }) => {
23
+ const formatMetaFile = useMetafileUri();
24
+ const navigation = useNavigation();
25
+ const handleCardPress = useCallback(() => {
26
+ if (isContact) {
27
+ return navigation.navigate('ContactDetailsScreen', {
28
+ idContact: id,
29
+ });
30
+ }
31
+ else {
32
+ navigation.navigate('ClientDetailsScreen', {
33
+ idClient: id,
34
+ });
35
+ }
36
+ }, [isContact, navigation, id]);
37
+ return (<ObjectCard onPress={handleCardPress} style={[styles.card, style]} image={{
38
+ generalStyle: styles.imageSize,
39
+ imageSize: styles.imageSize,
40
+ resizeMode: 'contain',
41
+ defaultIconSize: 50,
42
+ source: formatMetaFile(picture?.id),
43
+ }} upperTexts={{
44
+ items: [
45
+ {
46
+ displayText: name,
47
+ isTitle: true,
48
+ },
49
+ {
50
+ displayText: code,
51
+ hideIfNull: true,
52
+ },
53
+ {
54
+ indicatorText: jobName,
55
+ iconName: 'suitcase-lg-fill',
56
+ hideIfNull: true,
57
+ },
58
+ ],
59
+ }}/>);
60
+ };
61
+ const styles = StyleSheet.create({
62
+ imageSize: {
63
+ height: 50,
64
+ width: 50,
65
+ },
66
+ card: {
67
+ marginVertical: 2,
68
+ padding: 0,
69
+ marginHorizontal: 2,
70
+ marginRight: 5,
71
+ },
72
+ });
73
+ export default PartnerCard;
74
+ //# sourceMappingURL=PartnerCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PartnerCard.js","sourceRoot":"","sources":["../../../../src/components/atoms/PartnerCard/PartnerCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAC,cAAc,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAYtE,MAAM,WAAW,GAAG,CAAC,EACnB,KAAK,EACL,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,EAAE,EACF,SAAS,GACQ,EAAE,EAAE;IACrB,MAAM,cAAc,GAAG,cAAc,EAAE,CAAC;IACxC,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IAEnC,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,EAAE;QACvC,IAAI,SAAS,EAAE;YACb,OAAO,UAAU,CAAC,QAAQ,CAAC,sBA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
+ onPress: () => void;
5
+ customer: any;
6
+ name: string;
7
+ code: string;
8
+ company: string;
9
+ assignedTo: string;
10
+ projectStatus: any;
11
+ parentProject: string;
12
+ isCopyCard?: boolean;
13
+ }
14
+ declare const ProjectCard: ({ style, onPress, customer, name, code, company, assignedTo, projectStatus, parentProject, isCopyCard, }: ProjectCardProps) => React.JSX.Element;
15
+ export default ProjectCard;
@@ -0,0 +1,101 @@
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 { useMetafileUri, useSelector, useTypeHelpers, } from '@axelor/aos-mobile-core';
21
+ import { Icon, ObjectCard, useThemeColor } from '@axelor/aos-mobile-ui';
22
+ const ProjectCard = ({ style, onPress, customer, name, code, company, assignedTo, projectStatus, parentProject, isCopyCard = false, }) => {
23
+ const Colors = useThemeColor();
24
+ const formatMetaFile = useMetafileUri();
25
+ const { getItemColorFromIndex } = useTypeHelpers();
26
+ const { base: baseConfig } = useSelector(state => state.appConfig);
27
+ const { user } = useSelector(state => state.user);
28
+ const { projectStatusList } = useSelector(state => state.project_project);
29
+ const borderStyle = useMemo(() => {
30
+ return (projectStatus != null &&
31
+ getStyles(getItemColorFromIndex(projectStatusList, projectStatus)?.background)?.border);
32
+ }, [getItemColorFromIndex, projectStatus, projectStatusList]);
33
+ const isCustomerLinked = useMemo(() => customer?.id != null, [customer]);
34
+ return (<ObjectCard onPress={onPress} style={[borderStyle, style]} showArrow={!isCopyCard} leftContainerFlex={9} image={isCustomerLinked
35
+ ? {
36
+ generalStyle: styles.imageSize,
37
+ imageSize: styles.imageSize,
38
+ resizeMode: 'contain',
39
+ defaultIconSize: 50,
40
+ source: formatMetaFile(customer?.picture?.id),
41
+ }
42
+ : null} upperTexts={{
43
+ items: [
44
+ { displayText: name, isTitle: true },
45
+ {
46
+ displayText: code,
47
+ hideIfNull: true,
48
+ },
49
+ {
50
+ indicatorText: customer?.name,
51
+ hideIfNull: true,
52
+ iconName: 'person-fill',
53
+ },
54
+ ],
55
+ }} lowerTexts={{
56
+ items: [
57
+ {
58
+ indicatorText: company,
59
+ hideIfNull: true,
60
+ hideIf: !baseConfig?.enableMultiCompany || user?.companySet?.length <= 1,
61
+ iconName: 'building-fill',
62
+ },
63
+ {
64
+ indicatorText: assignedTo,
65
+ hideIfNull: true,
66
+ iconName: 'pin-angle-fill',
67
+ },
68
+ {
69
+ indicatorText: parentProject,
70
+ hideIfNull: true,
71
+ iconName: 'diagram-3-fill',
72
+ numberOfLines: 2,
73
+ },
74
+ ],
75
+ }} sideBadges={{
76
+ style: styles.badges,
77
+ items: [
78
+ isCopyCard && {
79
+ customComponent: (<Icon name="copy" color={Colors.secondaryColor.background}/>),
80
+ },
81
+ ],
82
+ }}/>);
83
+ };
84
+ const getStyles = (color) => StyleSheet.create({
85
+ border: {
86
+ borderLeftWidth: 7,
87
+ borderLeftColor: color,
88
+ },
89
+ });
90
+ const styles = StyleSheet.create({
91
+ imageSize: {
92
+ height: 50,
93
+ width: 50,
94
+ },
95
+ badges: {
96
+ flexDirection: 'column-reverse',
97
+ alignItems: 'flex-end',
98
+ },
99
+ });
100
+ export default ProjectCard;
101
+ //# sourceMappingURL=ProjectCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectCard.js","sourceRoot":"","sources":["../../../../src/components/atoms/ProjectCard/ProjectCard.tsx"],"names":[],"mapp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,EAAE,gBAAgB;oBAC1B,aAAa,EAAE,CAAC;iBACjB;aACF;SACF,CAAC,CACF,UAAU,CAAC,CAAC;YACV,KAAK,EAAE,MAAM,CAAC,MAAM;YACpB,KAAK,EAAE;gBACL,UAAU,IAAI;oBACZ,eAAe,EAAE,CACf,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,EAAG,CAC9D;iBACF;aACF;SACF,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,EAAE,CAClC,UAAU,CAAC,MAAM,CAAC;IAChB,MAAM,EAAE;QACN,eAAe,EAAE,CAAC;QAClB,eAAe,EAAE,KAAK;KACvB;CACF,CAAC,CAAC;AAEL,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;KACV;IACD,MAAM,EAAE;QACN,aAAa,EAAE,gBAAgB;QAC/B,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface ProjectSimpleCardProps {
3
+ style?: any;
4
+ onPress: () => void;
5
+ name: string;
6
+ code: string;
7
+ projectStatus: any;
8
+ }
9
+ declare const ProjectSimpleCard: ({ style, onPress, name, code, projectStatus, }: ProjectSimpleCardProps) => React.JSX.Element;
10
+ export default ProjectSimpleCard;
@@ -0,0 +1,48 @@
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, useTypeHelpers } from '@axelor/aos-mobile-core';
21
+ import { ObjectCard } from '@axelor/aos-mobile-ui';
22
+ const ProjectSimpleCard = ({ style, onPress, name, code, projectStatus, }) => {
23
+ const { getItemColorFromIndex } = useTypeHelpers();
24
+ const { projectStatusList } = useSelector(state => state.project_project);
25
+ const containerStyle = useMemo(() => {
26
+ return (projectStatus != null &&
27
+ getStyles(getItemColorFromIndex(projectStatusList, projectStatus)?.background)?.container);
28
+ }, [getItemColorFromIndex, projectStatus, projectStatusList]);
29
+ return (<ObjectCard onPress={onPress} style={[containerStyle, style]} upperTexts={{
30
+ items: [
31
+ { displayText: name, isTitle: true },
32
+ {
33
+ displayText: code,
34
+ hideIfNull: true,
35
+ },
36
+ ],
37
+ }}/>);
38
+ };
39
+ const getStyles = (color) => StyleSheet.create({
40
+ container: {
41
+ borderLeftWidth: 7,
42
+ borderLeftColor: color,
43
+ width: '90%',
44
+ alignSelf: 'center',
45
+ },
46
+ });
47
+ export default ProjectSimpleCard;
48
+ //# sourceMappingURL=ProjectSimpleCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectSimpleCard.js","sourceRoot":"","sources":["../../../../src/components/atoms/ProjectSimpleCard/ProjectSimpleCard.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,cAAc,EAAC,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAC,UAAU,EAAC,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 taskDeadline?: string;
7
+ parentTask?: string;
8
+ progress?: number;
9
+ priority?: any;
10
+ status?: any;
11
+ isCopyCard?: boolean;
12
+ showArrow?: boolean;
13
+ onPress?: () => void;
14
+ }
15
+ declare const TaskCard: ({ style, name, assignedTo, taskDeadline, parentTask, progress, priority, status, isCopyCard, showArrow, onPress, }: TaskCardProps) => React.JSX.Element;
16
+ export default TaskCard;
@@ -0,0 +1,93 @@
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 { Icon, ObjectCard, ProgressBar, useThemeColor, } from '@axelor/aos-mobile-ui';
21
+ import { DateDisplay, useTypeHelpers, useSelector, } from '@axelor/aos-mobile-core';
22
+ const TaskCard = ({ style, name, assignedTo, taskDeadline, parentTask, progress, priority, status, isCopyCard = false, showArrow = true, onPress, }) => {
23
+ const { getItemColorFromIndex } = useTypeHelpers();
24
+ const Colors = useThemeColor();
25
+ const { projectTaskStatusList, projectPriorityList } = useSelector((state) => state.project_projectTask);
26
+ const borderStyle = useMemo(() => {
27
+ return (status != null &&
28
+ getStyles(getItemColorFromIndex(projectTaskStatusList, status)?.background)?.border);
29
+ }, [status, getItemColorFromIndex, projectTaskStatusList]);
30
+ return (<ObjectCard onPress={onPress} style={[borderStyle, styles.card, style]} iconLeftMargin={30} leftContainerFlex={2} showArrow={showArrow} upperTexts={{
31
+ items: [
32
+ { displayText: name, isTitle: true },
33
+ {
34
+ indicatorText: assignedTo,
35
+ hideIfNull: true,
36
+ iconName: 'pin-angle-fill',
37
+ },
38
+ {
39
+ indicatorText: parentTask,
40
+ hideIfNull: true,
41
+ iconName: 'diagram-3-fill',
42
+ numberOfLines: 2,
43
+ },
44
+ ],
45
+ }} sideBadges={{
46
+ style: isCopyCard && styles.badge,
47
+ items: [
48
+ {
49
+ customComponent: <DateDisplay date={taskDeadline} size={16}/>,
50
+ },
51
+ {
52
+ customComponent: (<ProgressBar style={styles.progressBar} value={progress} showPercent={false} height={15} styleTxt={styles.textProgressBar}/>),
53
+ },
54
+ {
55
+ displayText: priority?.name,
56
+ color: getItemColorFromIndex(projectPriorityList, priority),
57
+ showIf: priority != null,
58
+ },
59
+ isCopyCard && {
60
+ customComponent: (<Icon name="copy" color={Colors.secondaryColor.background}/>),
61
+ },
62
+ ],
63
+ }}/>);
64
+ };
65
+ const getStyles = color => StyleSheet.create({
66
+ border: {
67
+ borderLeftWidth: 7,
68
+ borderLeftColor: color,
69
+ },
70
+ });
71
+ const styles = StyleSheet.create({
72
+ card: {
73
+ marginHorizontal: 2,
74
+ marginVertical: 2,
75
+ padding: 0,
76
+ marginRight: 5,
77
+ paddingRight: 5,
78
+ flex: 1,
79
+ },
80
+ progressBar: {
81
+ borderRadius: 20,
82
+ marginVertical: 5,
83
+ },
84
+ textProgressBar: {
85
+ display: 'none',
86
+ },
87
+ badge: {
88
+ justifyContent: 'flex-end',
89
+ alignItems: 'flex-end',
90
+ },
91
+ });
92
+ export default TaskCard;
93
+ //# sourceMappingURL=TaskCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskCard.js","sourceRoot":"","sources":["../../../../src/components/atoms/TaskCard/TaskCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UA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M,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,gBAAgB,EAAE,CAAC;QACnB,cAAc,EAAE,CAAC;QACjB,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,CAAC;QACf,IAAI,EAAE,CAAC;KACR;IACD,WAAW,EAAE;QACX,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,CAAC;KAClB;IACD,eAAe,EAAE;QACf,OAAO,EAAE,MAAM;KAChB;IACD,KAAK,EAAE;QACL,cAAc,EAAE,UAAU;QAC1B,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { default as DatesDisplay } from './DatesDisplay/DatesDisplay';
2
+ export { default as PartnerCard } from './PartnerCard/PartnerCard';
3
+ export { default as ProjectCard } from './ProjectCard/ProjectCard';
4
+ export { default as ProjectSimpleCard } from './ProjectSimpleCard/ProjectSimpleCard';
5
+ export { default as TaskCard } from './TaskCard/TaskCard';
@@ -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 DatesDisplay } from './DatesDisplay/DatesDisplay';
19
+ export { default as PartnerCard } from './PartnerCard/PartnerCard';
20
+ export { default as ProjectCard } from './ProjectCard/ProjectCard';
21
+ export { default as ProjectSimpleCard } from './ProjectSimpleCard/ProjectSimpleCard';
22
+ export { default as TaskCard } from './TaskCard/TaskCard';
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/atoms/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './atoms';
2
+ export * from './molecules';
3
+ export * from './organisms';
4
+ export * from './templates';
5
+ export * from './pages';
@@ -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 * from './atoms';
19
+ export * from './molecules';
20
+ export * from './organisms';
21
+ export * from './templates';
22
+ export * from './pages';
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ declare const ActivityCard: ({ userId, userName, time, title, tracks, modelName, utilityClass, }: {
3
+ userId: number;
4
+ userName: string;
5
+ time: string;
6
+ title: string;
7
+ tracks: any[];
8
+ modelName: string;
9
+ utilityClass: string;
10
+ }) => React.JSX.Element;
11
+ export default ActivityCard;