@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,43 @@
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 { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
19
+ import { handlerApiCall } from '@axelor/aos-mobile-core';
20
+ import { fetchIndicator as _fetchIndicator } from '../api/reporting-api';
21
+ export const getProjectReportingIndicator = createAsyncThunk('project_reporting/getProjectReportingIndicator', async function (data, { getState }) {
22
+ return handlerApiCall({
23
+ fetchFunction: _fetchIndicator,
24
+ data,
25
+ action: 'Project_SliceAction_GetProjectReportingIndicator',
26
+ getState,
27
+ responseOptions: { isArrayResponse: false },
28
+ });
29
+ });
30
+ const initialState = {
31
+ reportingIndicator: [],
32
+ };
33
+ const reportingSlice = createSlice({
34
+ name: 'project_reporting',
35
+ initialState,
36
+ extraReducers: builder => {
37
+ builder.addCase(getProjectReportingIndicator.fulfilled, (state, action) => {
38
+ state.reportingIndicator = action.payload?.categoryList;
39
+ });
40
+ },
41
+ });
42
+ export const reportingReducer = reportingSlice.reducer;
43
+ //# sourceMappingURL=reportingSlice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reportingSlice.js","sourceRoot":"","sources":["../../src/features/reportingSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAC,cAAc,IAAI,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAEvE,MAAM,CAAC,MAAM,4BAA4B,GAAG,gBAAgB,CAC1D,gDAAgD,EAChD,KAAK,WAAW,IAAI,EAAE,EAAC,QAAQ,EAAC;IAC9B,OAAO,cAAc,CAAC;QACpB,aAAa,EAAE,eAAe;QAC9B,IAAI;QACJ,MAAM,EAAE,kDAAkD;QAC1D,QAAQ;QACR,eAAe,EAAE,EAAC,eAAe,EAAE,KAAK,EAAC;KAC1C,CAAC,CAAC;AACL,CAAC,CACF,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,kBAAkB,EAAE,EAAE;CACvB,CAAC;AAEF,MAAM,cAAc,GAAG,WAAW,CAAC;IACjC,IAAI,EAAE,mBAAmB;IACzB,YAAY;IACZ,aAAa,EAAE,OAAO,CAAC,EAAE;QACvB,OAAO,CAAC,OAAO,CAAC,4BAA4B,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACxE,KAAK,CAAC,kBAAkB,GAAG,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC;QAC1D,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC"}
@@ -0,0 +1,39 @@
1
+ export const fetchTimesheetLinesByTask: import("@reduxjs/toolkit").AsyncThunk<any, void, {
2
+ state?: unknown;
3
+ dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
4
+ extra?: unknown;
5
+ rejectValue?: unknown;
6
+ serializedErrorType?: unknown;
7
+ pendingMeta?: unknown;
8
+ fulfilledMeta?: unknown;
9
+ rejectedMeta?: unknown;
10
+ }>;
11
+ export const createTimeLog: import("@reduxjs/toolkit").AsyncThunk<import("@reduxjs/toolkit").PayloadAction<void, string, {
12
+ arg: void;
13
+ requestId: string;
14
+ requestStatus: "fulfilled";
15
+ }, never> | import("@reduxjs/toolkit").PayloadAction<unknown, string, {
16
+ arg: void;
17
+ requestId: string;
18
+ requestStatus: "rejected";
19
+ aborted: boolean;
20
+ condition: boolean;
21
+ } & ({
22
+ rejectedWithValue: true;
23
+ } | ({
24
+ rejectedWithValue: false;
25
+ } & {})), import("@reduxjs/toolkit").SerializedError>, void, {
26
+ state?: unknown;
27
+ dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
28
+ extra?: unknown;
29
+ rejectValue?: unknown;
30
+ serializedErrorType?: unknown;
31
+ pendingMeta?: unknown;
32
+ fulfilledMeta?: unknown;
33
+ rejectedMeta?: unknown;
34
+ }>;
35
+ export const clearReset: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"project_timesheetLines/clearReset">;
36
+ export const timesheetLinesReducer: import("redux").Reducer<import("immer").WritableDraft<{
37
+ timesheetLineList: any[];
38
+ resetTimeForm: boolean;
39
+ }>>;
@@ -0,0 +1,57 @@
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 { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
19
+ import { handlerApiCall } from '@axelor/aos-mobile-core';
20
+ import { createTimesheetLine } from '@axelor/aos-mobile-hr';
21
+ import { fetchTimesheetLinesByTask as _fetchTimesheetLinesByTask } from '../api/timesheet-lines-api';
22
+ export const fetchTimesheetLinesByTask = createAsyncThunk('project_timesheetLines/fetchTimesheetLinesByTask', async function (data, { getState }) {
23
+ return handlerApiCall({
24
+ fetchFunction: _fetchTimesheetLinesByTask,
25
+ data,
26
+ action: 'Project_SliceAction_FetchTimesheetLinesByTask',
27
+ getState,
28
+ responseOptions: { isArrayResponse: true },
29
+ });
30
+ });
31
+ export const createTimeLog = createAsyncThunk('project_timesheetLines/createTimeLog', async function (data, { dispatch }) {
32
+ return dispatch(createTimesheetLine(data));
33
+ });
34
+ const initialState = {
35
+ timesheetLineList: [],
36
+ resetTimeForm: false,
37
+ };
38
+ const timesheetLinesSlice = createSlice({
39
+ name: 'project_timesheetLines',
40
+ initialState,
41
+ reducers: {
42
+ clearReset: state => {
43
+ state.resetTimeForm = false;
44
+ },
45
+ },
46
+ extraReducers: builder => {
47
+ builder.addCase(fetchTimesheetLinesByTask.fulfilled, (state, action) => {
48
+ state.timesheetLineList = action.payload;
49
+ });
50
+ builder.addCase(createTimeLog.fulfilled, state => {
51
+ state.resetTimeForm = true;
52
+ });
53
+ },
54
+ });
55
+ export const { clearReset } = timesheetLinesSlice.actions;
56
+ export const timesheetLinesReducer = timesheetLinesSlice.reducer;
57
+ //# sourceMappingURL=timesheetLinesSlice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timesheetLinesSlice.js","sourceRoot":"","sources":["../../src/features/timesheetLinesSlice.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC,yBAAyB,IAAI,0BAA0B,EAAC,MAAM,4BAA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O,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './use-reporting-configuration';
2
+ export * from './use-task-filter';
@@ -0,0 +1,20 @@
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 './use-reporting-configuration';
19
+ export * from './use-task-filter';
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const useProjectHeaders: () => void;
@@ -0,0 +1,75 @@
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 { useEffect } from 'react';
19
+ import { headerActionsProvider, useDispatch, useSelector, useTranslator, } from '@axelor/aos-mobile-core';
20
+ import { useThemeColor } from '@axelor/aos-mobile-ui';
21
+ import { fetchProjectById } from '../features/projectSlice';
22
+ export const useProjectHeaders = () => {
23
+ useProjectDetailsActions();
24
+ useProjectTaskDetailsActions();
25
+ };
26
+ const useProjectDetailsActions = () => {
27
+ const Colors = useThemeColor();
28
+ const dispatch = useDispatch();
29
+ const I18n = useTranslator();
30
+ const { project } = useSelector((state) => state.project_project);
31
+ const { mobileSettings } = useSelector((state) => state.appConfig);
32
+ useEffect(() => {
33
+ headerActionsProvider.registerModel('project_project_details', {
34
+ model: 'com.axelor.apps.project.db.Project',
35
+ modelId: project?.id,
36
+ headerTitle: project?.code,
37
+ disableMailMessages: !mobileSettings?.isTrackerMessageEnabled,
38
+ attachedFileScreenTitle: project?.code,
39
+ actions: [
40
+ {
41
+ key: 'refreshProject',
42
+ order: 0,
43
+ iconName: 'arrow-repeat',
44
+ title: I18n.t('Project_RefreshProject'),
45
+ iconColor: Colors.primaryColor.background,
46
+ onPress: () => {
47
+ dispatch(fetchProjectById({
48
+ projectId: project?.id,
49
+ }));
50
+ },
51
+ showInHeader: true,
52
+ },
53
+ ],
54
+ });
55
+ }, [
56
+ Colors,
57
+ I18n,
58
+ dispatch,
59
+ mobileSettings?.isTrackerMessageEnabled,
60
+ project?.code,
61
+ project?.id,
62
+ ]);
63
+ };
64
+ const useProjectTaskDetailsActions = () => {
65
+ const { projectTask } = useSelector((state) => state.project_projectTask);
66
+ const { mobileSettings } = useSelector((state) => state.appConfig);
67
+ useEffect(() => {
68
+ headerActionsProvider.registerModel('project_projectTask_details', {
69
+ model: 'com.axelor.apps.project.db.ProjectTask',
70
+ modelId: projectTask?.id,
71
+ disableMailMessages: !mobileSettings?.isTrackerMessageEnabled,
72
+ });
73
+ }, [mobileSettings?.isTrackerMessageEnabled, projectTask?.id]);
74
+ };
75
+ //# sourceMappingURL=use-project-header-actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-project-header-actions.js","sourceRoot":"","sources":["../../src/hooks/use-project-header-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAChC,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAE1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,wBAAwB,EAAE,CAAC;IAC3B,4BAA4B,EAAE,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,EAAC,OAAO,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACrE,MAAM,EAAC,cAAc,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAEtE,SAAS,CAAC,GAAG,EAAE;QACb,qBAAqB,CAAC,aAAa,CAAC,yBAAyB,EAAE;YAC7D,KAAK,EAAE,oCAAoC;YAC3C,OAAO,EAAE,OAAO,EAAE,EAAE;YACpB,WAAW,EAAE,OAAO,EAAE,IAAI;YAC1B,mBAAmB,EAAE,CAAC,cAAc,EAAE,uBAAuB;YAC7D,uBAAuB,EAAE,OAAO,EAAE,IAAI;YACtC,OAAO,EAAE;gBACP;oBACE,GAAG,EAAE,gBAAgB;oBACrB,KAAK,EAAE,CAAC;oBACR,QAAQ,EAAE,cAAc;oBACxB,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,wBAAwB,CAAC;oBACvC,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,UAAU;oBACzC,OAAO,EAAE,GAAG,EAAE;wBACZ,QAAQ,CACL,gBAAwB,CAAC;4BACxB,SAAS,EAAE,OAAO,EAAE,EAAE;yBACvB,CAAC,CACH,CAAC;oBACJ,CAAC;oBACD,YAAY,EAAE,IAAI;iBACnB;aACF;SACF,CAAC,CAAC;IACL,CAAC,EAAE;QACD,MAAM;QACN,IAAI;QACJ,QAAQ;QACR,cAAc,EAAE,uBAAuB;QACvC,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,EAAE;KACZ,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,4BAA4B,GAAG,GAAG,EAAE;IACxC,MAAM,EAAC,WAAW,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC7E,MAAM,EAAC,cAAc,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAEtE,SAAS,CAAC,GAAG,EAAE;QACb,qBAAqB,CAAC,aAAa,CAAC,6BAA6B,EAAE;YACjE,KAAK,EAAE,wCAAwC;YAC/C,OAAO,EAAE,WAAW,EAAE,EAAE;YACxB,mBAAmB,EAAE,CAAC,cAAc,EAAE,uBAAuB;SAC9D,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,cAAc,EAAE,uBAAuB,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;AACjE,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const useReportingConfiguration: (project: any) => {
2
+ showActivities: any;
3
+ showIndicators: any;
4
+ noReporting: boolean;
5
+ };
@@ -0,0 +1,33 @@
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 { useMemo } from 'react';
19
+ import { useSelector } from '@axelor/aos-mobile-core';
20
+ import { ReportingType } from '../types';
21
+ export const useReportingConfiguration = project => {
22
+ const { mobileSettings } = useSelector((state) => state.appConfig);
23
+ const allowedReportingTypes = useMemo(() => mobileSettings?.reportingTypesToDisplay || [], [mobileSettings?.reportingTypesToDisplay]);
24
+ const showActivities = useMemo(() => allowedReportingTypes.includes(ReportingType.activities), [allowedReportingTypes]);
25
+ const showIndicators = useMemo(() => allowedReportingTypes.includes(ReportingType.indicators) &&
26
+ project?.isBusinessProject, [allowedReportingTypes, project?.isBusinessProject]);
27
+ return useMemo(() => ({
28
+ showActivities,
29
+ showIndicators,
30
+ noReporting: !showActivities && !showIndicators,
31
+ }), [showActivities, showIndicators]);
32
+ };
33
+ //# sourceMappingURL=use-reporting-configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-reporting-configuration.js","sourceRoot":"","sources":["../../src/hooks/use-reporting-configuration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC,EAAE;IACjD,MAAM,EAAC,cAAc,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAEtE,MAAM,qBAAqB,GAAG,OAAO,CACnC,GAAG,EAAE,CAAC,cAAc,EAAE,uBAAuB,IAAI,EAAE,EACnD,CAAC,cAAc,EAAE,uBAAuB,CAAC,CAC1C,CAAC;IAEF,MAAM,cAAc,GAAG,OAAO,CAC5B,GAAG,EAAE,CAAC,qBAAqB,CAAC,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,EAC9D,CAAC,qBAAqB,CAAC,CACxB,CAAC;IAEF,MAAM,cAAc,GAAG,OAAO,CAC5B,GAAG,EAAE,CACH,qBAAqB,CAAC,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC;QACxD,OAAO,EAAE,iBAAiB,EAC5B,CAAC,qBAAqB,EAAE,OAAO,EAAE,iBAAiB,CAAC,CACpD,CAAC;IAEF,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC;QACL,cAAc;QACd,cAAc;QACd,WAAW,EAAE,CAAC,cAAc,IAAI,CAAC,cAAc;KAChD,CAAC,EACF,CAAC,cAAc,EAAE,cAAc,CAAC,CACjC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ /// <reference types="react" />
2
+ export declare const useTaskFilters: (project: any) => {
3
+ selectedStatus: any[];
4
+ setSelectedStatus: import("react").Dispatch<import("react").SetStateAction<any[]>>;
5
+ selectedPriority: any[];
6
+ setSelectedPriority: import("react").Dispatch<import("react").SetStateAction<any[]>>;
7
+ isAssignedToMe: boolean;
8
+ setIsAssignedToMe: import("react").Dispatch<import("react").SetStateAction<boolean>>;
9
+ sliceFunctionData: {
10
+ projectId: any;
11
+ isAssignedToMe: boolean;
12
+ selectedStatus: any[];
13
+ selectedPriority: any[];
14
+ statusToFilter: any;
15
+ priorityToFilter: any;
16
+ userId: any;
17
+ };
18
+ statusList: {
19
+ title: string;
20
+ color: import("@axelor/aos-mobile-ui/lib").Color;
21
+ value: string | number | boolean;
22
+ key: string | number | boolean;
23
+ isActive: boolean;
24
+ }[];
25
+ priorityList: {
26
+ title: string;
27
+ color: import("@axelor/aos-mobile-ui/lib").Color;
28
+ value: string | number | boolean;
29
+ key: string | number | boolean;
30
+ isActive: boolean;
31
+ }[];
32
+ };
@@ -0,0 +1,96 @@
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 { useEffect, useMemo, useState } from 'react';
19
+ import { useDispatch, useSelector, useTypeHelpers, } from '@axelor/aos-mobile-core';
20
+ import { fetchProjectTaskStatus, fetchProjectPriority, } from '../features/projectTaskSlice';
21
+ export const useTaskFilters = (project) => {
22
+ const dispatch = useDispatch();
23
+ const { getCustomSelectionItems } = useTypeHelpers();
24
+ const { projectTaskStatusList, projectPriorityList } = useSelector((state) => state.project_projectTask);
25
+ const { userId } = useSelector((state) => state.auth);
26
+ const [selectedStatus, setSelectedStatus] = useState([]);
27
+ const [selectedPriority, setSelectedPriority] = useState([]);
28
+ const [isAssignedToMe, setIsAssignedToMe] = useState(false);
29
+ useEffect(() => {
30
+ dispatch(fetchProjectTaskStatus());
31
+ dispatch(fetchProjectPriority());
32
+ }, [dispatch]);
33
+ const availableStatus = useMemo(() => {
34
+ return project?.isShowStatus
35
+ ? project?.projectTaskStatusSet?.map(status => status.id)
36
+ : [];
37
+ }, [project?.isShowStatus, project?.projectTaskStatusSet]);
38
+ const availablePriorities = useMemo(() => {
39
+ return project?.isShowPriority
40
+ ? project?.projectTaskPrioritySet?.map(status => status.id)
41
+ : [];
42
+ }, [project?.isShowPriority, project?.projectTaskPrioritySet]);
43
+ const sliceFunctionData = useMemo(() => {
44
+ return {
45
+ projectId: project?.id,
46
+ isAssignedToMe: isAssignedToMe,
47
+ selectedStatus: selectedStatus,
48
+ selectedPriority: selectedPriority,
49
+ statusToFilter: availableStatus,
50
+ priorityToFilter: availablePriorities,
51
+ userId: isAssignedToMe ? userId : null,
52
+ };
53
+ }, [
54
+ project,
55
+ isAssignedToMe,
56
+ selectedStatus,
57
+ selectedPriority,
58
+ availableStatus,
59
+ availablePriorities,
60
+ userId,
61
+ ]);
62
+ const statusList = useMemo(() => {
63
+ const _statusList = getCustomSelectionItems(projectTaskStatusList, 'name', selectedStatus);
64
+ return availableStatus.length === 0
65
+ ? _statusList
66
+ : _statusList.filter(status => availableStatus.includes(status.value));
67
+ }, [
68
+ getCustomSelectionItems,
69
+ projectTaskStatusList,
70
+ selectedStatus,
71
+ availableStatus,
72
+ ]);
73
+ const priorityList = useMemo(() => {
74
+ const _priorityList = getCustomSelectionItems(projectPriorityList, 'name', selectedPriority);
75
+ return availablePriorities.length === 0
76
+ ? _priorityList
77
+ : _priorityList.filter(status => availablePriorities.includes(status.value));
78
+ }, [
79
+ getCustomSelectionItems,
80
+ projectPriorityList,
81
+ selectedPriority,
82
+ availablePriorities,
83
+ ]);
84
+ return {
85
+ selectedStatus,
86
+ setSelectedStatus,
87
+ selectedPriority,
88
+ setSelectedPriority,
89
+ isAssignedToMe,
90
+ setIsAssignedToMe,
91
+ sliceFunctionData,
92
+ statusList,
93
+ priorityList,
94
+ };
95
+ };
96
+ //# sourceMappingURL=use-task-filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-task-filter.js","sourceRoot":"","sources":["../../src/hooks/use-task-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;G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Ae;KAChB,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QAChC,MAAM,aAAa,GAAG,uBAAuB,CAC3C,mBAAmB,EACnB,MAAM,EACN,gBAAgB,CACjB,CAAC;QACF,OAAO,mBAAmB,CAAC,MAAM,KAAK,CAAC;YACrC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAC5B,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAC3C,CAAC;IACR,CAAC,EAAE;QACD,uBAAuB;QACvB,mBAAmB;QACnB,gBAAgB;QAChB,mBAAmB;KACpB,CAAC,CAAC;IAEH,OAAO;QACL,cAAc;QACd,iBAAiB;QACjB,gBAAgB;QAChB,mBAAmB;QACnB,cAAc;QACd,iBAAiB;QACjB,iBAAiB;QACjB,UAAU;QACV,YAAY;KACb,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,87 @@
1
+ {
2
+ "Project_Project": "Project",
3
+ "Project_BuisnessProjects": "Business projects",
4
+ "Project_ActiveProject": "Active project",
5
+ "Project_Projects": "Projects",
6
+ "Project_Business": "Business",
7
+ "Project_Invoicing": "Invoicing",
8
+ "Project_Members": "Members",
9
+ "Project_Team": "Team",
10
+ "Project_Sites": "Sites",
11
+ "Project_Currency": "Currency",
12
+ "Project_PriceList": "Price list",
13
+ "Project_PackagedTask": "Packaged tasks",
14
+ "Project_Expenses": "Expenses",
15
+ "Project_Purchases": "Purchases",
16
+ "Project_RefreshProject": "Refresh project",
17
+ "Project_NoRelatedInvoicing": "No element related to invoicing",
18
+ "Project_LogTime": "Log time",
19
+ "Project_CreateNewTask": "Create new task",
20
+ "Project_Tasks": "Tasks",
21
+ "Project_ParentProject": "Parent project",
22
+ "Project_ChildProjects": "Child projects",
23
+ "Project_NoLinkedProjects": "No linked projects.",
24
+ "Project_Task": "Task",
25
+ "Project_Characteristics": "Characteristics",
26
+ "Project_Descriptions": "Descriptions",
27
+ "Project_Category": "Category",
28
+ "Project_Section": "Section",
29
+ "Project_TargetVersion": "Target version",
30
+ "Project_StartDate": "Start date",
31
+ "Project_DueDate": "Due date",
32
+ "Project_Deadline": "Deadline",
33
+ "Project_StartedOn": "Started on",
34
+ "Project_EndedOn": "Ended on",
35
+ "Project_Tags": "Tags",
36
+ "Project_InternalDescription": "Internal description",
37
+ "Project_TimeSpent": "Time spent",
38
+ "Project_Date": "Date",
39
+ "Project_Product": "Product",
40
+ "Project_Duration": "Duration",
41
+ "Project_ToInvoice": "To Invoice",
42
+ "Project_Reporting": "Reporting",
43
+ "Project_Activities": "Activities",
44
+ "Project_ActivityUpdateInformation": "Updated by {{userName}} at {{time}}",
45
+ "Project_Subject": "Subject",
46
+ "Project_TicketNumber": "Ticket number",
47
+ "Project_ParentTask": "Parent task",
48
+ "Project_AssignedTo": "Assigned to",
49
+ "Project_Progress": "Progress",
50
+ "Project_Priority": "Priority",
51
+ "Project_Status": "Status",
52
+ "Project_OpenMap": "Open map",
53
+ "Project_Call": "Call",
54
+ "Project_NoActivity": "No activity",
55
+ "Project_ProjectAppCustomField": "App",
56
+ "Project_ProjectCustomField": "Project",
57
+ "Project_CategoryCustomField": "Category",
58
+ "Project_NoActiveProject": "No active project",
59
+ "Project_DetailsView": "Details",
60
+ "Project_TimeLogView": "Log time",
61
+ "Project_TreeStructureView": "Tree structure",
62
+ "Project_TasksView": "Associated tasks",
63
+ "Project_LinkedTasksView": "Linked tasks",
64
+ "Project_CustomFieldsView": "Custom fields",
65
+ "Project_ReportingView": "Reporting",
66
+ "Project_SliceAction_SearchProject": "search projects",
67
+ "Project_SliceAction_FetchProjectById": "fetch project by id",
68
+ "Project_SliceAction_FetchProjectStatus": "fetch project status",
69
+ "Project_SliceAction_SearchProjectTask": "search project tasks",
70
+ "Project_SliceAction_FetchProjectTaskStatus": "fetch project task status",
71
+ "Project_SliceAction_FetchProjectPriority": "fetch project priorities",
72
+ "Project_SliceAction_FetchProjectTaskCategory": "fetch project task categories",
73
+ "Project_SliceAction_SearchSubProject": "search sub projects",
74
+ "Project_SliceAction_FetchProjectTaskById": "fetch project task by id",
75
+ "Project_SliceAction_FetchTimesheetLinesByTask": "fetch timesheet lines by task",
76
+ "Project_SliceAction_GetTag": "get project task tags",
77
+ "Project_SliceAction_SearchTargetVersion": "search target versions",
78
+ "Project_SliceAction_SearchCategory": "search categories",
79
+ "Project_SliceAction_SearchSection": "search sections",
80
+ "Project_SliceAction_SearchPriority": "search priorities",
81
+ "Project_SliceAction_SaveProjectTask": "save project task",
82
+ "Project_SliceAction_SearchStatus": "search status",
83
+ "Project_SliceAction_SearchParentTask": "search parent task",
84
+ "Project_SliceAction_GetProjectTimeData": "get project time data",
85
+ "Project_SliceAction_GetProjectFinancialData": "get project financial data",
86
+ "Project_SliceAction_SearchProjectTaskLink": "search project task links"
87
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "Project_Project": "Projet",
3
+ "Project_BuisnessProjects": "Affaires",
4
+ "Project_ActiveProject": "Projet actif",
5
+ "Project_Projects": "Projets",
6
+ "Project_Business": "Affaire",
7
+ "Project_Invoicing": "Facturation",
8
+ "Project_Members": "Membres",
9
+ "Project_Team": "Équipe",
10
+ "Project_Sites": "Sites",
11
+ "Project_Currency": "Devise",
12
+ "Project_PriceList": "Liste de prix",
13
+ "Project_PackagedTask": "Tâches (forfait)",
14
+ "Project_Expenses": "Notes de frais",
15
+ "Project_Purchases": "Achats",
16
+ "Project_RefreshProject": "Actualiser le projet",
17
+ "Project_NoRelatedInvoicing": "Pas d'élément lié à la facturation",
18
+ "Project_LogTime": "Saisir temps",
19
+ "Project_CreateNewTask": "Créer une nouvelle tâche",
20
+ "Project_Tasks": "Tâches",
21
+ "Project_ParentProject": "Projet parent",
22
+ "Project_ChildProjects": "Projets enfants",
23
+ "Project_NoLinkedProjects": "Aucun projet lié.",
24
+ "Project_Task": "Tâche",
25
+ "Project_Characteristics": "Caractéristiques",
26
+ "Project_Descriptions": "Descriptions",
27
+ "Project_Category": "Catégorie",
28
+ "Project_Section": "Section",
29
+ "Project_TargetVersion": "Version cible",
30
+ "Project_StartDate": "Date de début",
31
+ "Project_DueDate": "Date d'échéance",
32
+ "Project_Deadline": "Date limite",
33
+ "Project_StartedOn": "Commencé le",
34
+ "Project_EndedOn": "Terminé le",
35
+ "Project_Tags": "Étiquettes",
36
+ "Project_InternalDescription": "Description interne",
37
+ "Project_TimeSpent": "Temps passé",
38
+ "Project_Date": "Date",
39
+ "Project_Product": "Activité",
40
+ "Project_Duration": "Heures",
41
+ "Project_ToInvoice": "À facturer",
42
+ "Project_Reporting": "Rapports",
43
+ "Project_Activities": "Activités",
44
+ "Project_ActivityUpdateInformation": "Modifié(e) par {{userName}} à {{time}}",
45
+ "Project_Subject": "Sujet",
46
+ "Project_TicketNumber": "Numéro de ticket",
47
+ "Project_ParentTask": "Tâche parent",
48
+ "Project_AssignedTo": "Assignée à",
49
+ "Project_Progress": "Progression",
50
+ "Project_Priority": "Priorité",
51
+ "Project_Status": "Statut",
52
+ "Project_OpenMap": "Ouvrir la carte",
53
+ "Project_Call": "Appeler",
54
+ "Project_NoActivity": "Pas d'activité",
55
+ "Project_ProjectAppCustomField": "Application",
56
+ "Project_ProjectCustomField": "Projet",
57
+ "Project_CategoryCustomField": "Catégorie",
58
+ "Project_NoActiveProject": "Pas de projet actif",
59
+ "Project_DetailsView": "Détails",
60
+ "Project_TimeLogView": "Saisie de temps",
61
+ "Project_TreeStructureView": "Arborescence",
62
+ "Project_TasksView": "Tâches associées",
63
+ "Project_LinkedTasksView": "Tâches liées",
64
+ "Project_CustomFieldsView": "Champs personnalisés",
65
+ "Project_ReportingView": "Rapports",
66
+ "Project_SliceAction_SearchProject": "recherche sur les projets",
67
+ "Project_SliceAction_FetchProjectById": "récupération du projet par id",
68
+ "Project_SliceAction_FetchProjectStatus": "récupération des statuts de projet",
69
+ "Project_SliceAction_SearchProjectTask": "recherche sur les tâches du projet",
70
+ "Project_SliceAction_FetchProjectTaskStatus": "récupération des statuts des tâches du projet",
71
+ "Project_SliceAction_FetchProjectPriority": "récupération des priorités du projet",
72
+ "Project_SliceAction_FetchProjectTaskCategory": "récupération des catégories du projet",
73
+ "Project_SliceAction_SearchSubProject": "recherche sur les sous-projets",
74
+ "Project_SliceAction_FetchProjectTaskById": "récupération de la tâche du projet par id",
75
+ "Project_SliceAction_FetchTimesheetLinesByTask": "récupération des lignes de feuille de temps par tâche",
76
+ "Project_SliceAction_GetTag": "récupération des tags des tâches du projet",
77
+ "Project_SliceAction_SearchTargetVersion": "recherche sur les versions cibles",
78
+ "Project_SliceAction_SearchCategory": "recherche sur les catégories",
79
+ "Project_SliceAction_SearchSection": "recherche sur les sections",
80
+ "Project_SliceAction_SearchPriority": "recherche sur les priorités",
81
+ "Project_SliceAction_SaveProjectTask": "enregistrement de la tâche du projet",
82
+ "Project_SliceAction_SearchStatus": "recherche sur les statuts",
83
+ "Project_SliceAction_SearchParentTask": "recherche sur la tâche parente",
84
+ "Project_SliceAction_GetProjectTimeData": "récupération des données de temps du projet",
85
+ "Project_SliceAction_GetProjectFinancialData": "récupération des données financières du projet",
86
+ "Project_SliceAction_SearchProjectTaskLink": "recherche sur les liens de la tâche"
87
+ }
package/lib/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { Module } from '@axelor/aos-mobile-core';
2
+ export declare const ProjectModule: Module;
3
+ export * from './api';
4
+ export * from './components';
5
+ export * from './features/asyncFunctions-index';
6
+ export * from './hooks';
7
+ export * from './screens';
8
+ export * from './types';