@axelor/aos-mobile-team 0.0.0-stage → 9.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 (103) hide show
  1. package/README.md +41 -2
  2. package/lib/api/index.d.ts +2 -0
  3. package/lib/api/index.js +20 -0
  4. package/lib/api/index.js.map +1 -0
  5. package/lib/api/team-api.d.ts +4 -0
  6. package/lib/api/team-api.js +32 -0
  7. package/lib/api/team-api.js.map +1 -0
  8. package/lib/api/team-task-api.d.ts +21 -0
  9. package/lib/api/team-task-api.js +114 -0
  10. package/lib/api/team-task-api.js.map +1 -0
  11. package/lib/components/atoms/TeamTaskActionSheet/TeamTaskActionSheet.d.ts +9 -0
  12. package/lib/components/atoms/TeamTaskActionSheet/TeamTaskActionSheet.js +169 -0
  13. package/lib/components/atoms/TeamTaskActionSheet/TeamTaskActionSheet.js.map +1 -0
  14. package/lib/components/atoms/TeamTaskCard/TeamTaskCard.d.ts +17 -0
  15. package/lib/components/atoms/TeamTaskCard/TeamTaskCard.js +71 -0
  16. package/lib/components/atoms/TeamTaskCard/TeamTaskCard.js.map +1 -0
  17. package/lib/components/atoms/index.d.ts +2 -0
  18. package/lib/components/atoms/index.js +20 -0
  19. package/lib/components/atoms/index.js.map +1 -0
  20. package/lib/components/index.d.ts +4 -0
  21. package/lib/components/index.js +22 -0
  22. package/lib/components/index.js.map +1 -0
  23. package/lib/components/molecules/TeamTaskActionCard/TeamTaskActionCard.d.ts +6 -0
  24. package/lib/components/molecules/TeamTaskActionCard/TeamTaskActionCard.js +28 -0
  25. package/lib/components/molecules/TeamTaskActionCard/TeamTaskActionCard.js.map +1 -0
  26. package/lib/components/molecules/index.d.ts +1 -0
  27. package/lib/components/molecules/index.js +19 -0
  28. package/lib/components/molecules/index.js.map +1 -0
  29. package/lib/components/organisms/TaskPriorityPicker/TaskPriorityPicker.d.ts +13 -0
  30. package/lib/components/organisms/TaskPriorityPicker/TaskPriorityPicker.js +35 -0
  31. package/lib/components/organisms/TaskPriorityPicker/TaskPriorityPicker.js.map +1 -0
  32. package/lib/components/organisms/TaskStatusPicker/TaskStatusPicker.d.ts +13 -0
  33. package/lib/components/organisms/TaskStatusPicker/TaskStatusPicker.js +35 -0
  34. package/lib/components/organisms/TaskStatusPicker/TaskStatusPicker.js.map +1 -0
  35. package/lib/components/organisms/TeamSearchBar/TeamSearchBar.d.ts +11 -0
  36. package/lib/components/organisms/TeamSearchBar/TeamSearchBar.js +38 -0
  37. package/lib/components/organisms/TeamSearchBar/TeamSearchBar.js.map +1 -0
  38. package/lib/components/organisms/index.d.ts +3 -0
  39. package/lib/components/organisms/index.js +21 -0
  40. package/lib/components/organisms/index.js.map +1 -0
  41. package/lib/components/templates/TeamTaskFilters/TeamTaskFilters.d.ts +7 -0
  42. package/lib/components/templates/TeamTaskFilters/TeamTaskFilters.js +41 -0
  43. package/lib/components/templates/TeamTaskFilters/TeamTaskFilters.js.map +1 -0
  44. package/lib/components/templates/TeamTaskListView/TeamTaskListView.d.ts +7 -0
  45. package/lib/components/templates/TeamTaskListView/TeamTaskListView.js +58 -0
  46. package/lib/components/templates/TeamTaskListView/TeamTaskListView.js.map +1 -0
  47. package/lib/components/templates/index.d.ts +2 -0
  48. package/lib/components/templates/index.js +20 -0
  49. package/lib/components/templates/index.js.map +1 -0
  50. package/lib/features/asyncFunctions-index.d.ts +2 -0
  51. package/lib/features/asyncFunctions-index.js +20 -0
  52. package/lib/features/asyncFunctions-index.js.map +1 -0
  53. package/lib/features/index.d.ts +2 -0
  54. package/lib/features/index.js +20 -0
  55. package/lib/features/index.js.map +1 -0
  56. package/lib/features/teamSlice.d.ts +7 -0
  57. package/lib/features/teamSlice.js +50 -0
  58. package/lib/features/teamSlice.js.map +1 -0
  59. package/lib/features/teamTaskSlice.d.ts +13 -0
  60. package/lib/features/teamTaskSlice.js +92 -0
  61. package/lib/features/teamTaskSlice.js.map +1 -0
  62. package/lib/hooks/use-team-header.d.ts +1 -0
  63. package/lib/hooks/use-team-header.js +63 -0
  64. package/lib/hooks/use-team-header.js.map +1 -0
  65. package/lib/i18n/en.json +38 -0
  66. package/lib/i18n/fr.json +38 -0
  67. package/lib/index.d.ts +7 -0
  68. package/lib/index.js +55 -0
  69. package/lib/index.js.map +1 -0
  70. package/lib/models/forms.d.ts +2 -0
  71. package/lib/models/forms.js +69 -0
  72. package/lib/models/forms.js.map +1 -0
  73. package/lib/models/index.d.ts +5 -0
  74. package/lib/models/index.js +23 -0
  75. package/lib/models/index.js.map +1 -0
  76. package/lib/models/objectFields.d.ts +2 -0
  77. package/lib/models/objectFields.js +34 -0
  78. package/lib/models/objectFields.js.map +1 -0
  79. package/lib/models/searchFields.d.ts +2 -0
  80. package/lib/models/searchFields.js +22 -0
  81. package/lib/models/searchFields.js.map +1 -0
  82. package/lib/models/sortFields.d.ts +2 -0
  83. package/lib/models/sortFields.js +21 -0
  84. package/lib/models/sortFields.js.map +1 -0
  85. package/lib/models/typeObjects.d.ts +2 -0
  86. package/lib/models/typeObjects.js +81 -0
  87. package/lib/models/typeObjects.js.map +1 -0
  88. package/lib/screens/TeamTaskDetailsScreen.d.ts +3 -0
  89. package/lib/screens/TeamTaskDetailsScreen.js +67 -0
  90. package/lib/screens/TeamTaskDetailsScreen.js.map +1 -0
  91. package/lib/screens/TeamTaskListScreen.d.ts +3 -0
  92. package/lib/screens/TeamTaskListScreen.js +25 -0
  93. package/lib/screens/TeamTaskListScreen.js.map +1 -0
  94. package/lib/screens/index.d.ts +9 -0
  95. package/lib/screens/index.js +37 -0
  96. package/lib/screens/index.js.map +1 -0
  97. package/lib/types/index.d.ts +1 -0
  98. package/lib/types/index.js +19 -0
  99. package/lib/types/index.js.map +1 -0
  100. package/lib/types/team-task-scope.d.ts +27 -0
  101. package/lib/types/team-task-scope.js +85 -0
  102. package/lib/types/team-task-scope.js.map +1 -0
  103. package/package.json +51 -4
package/README.md CHANGED
@@ -1,3 +1,42 @@
1
- # Temporary Holding Version
1
+ ---
2
+ title: Team
3
+ tags: Readme
4
+ ---
2
5
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
6
+ <h1 align="center">@axelor/aos-mobile-team</h1>
7
+
8
+ <div align="center">
9
+ <img src="https://i.imgur.com/KJAAFlT.png" width="30%"/>
10
+ </div>
11
+
12
+ ## Presentation
13
+
14
+ This package was developed for the [Axelor Open Mobile](https://github.com/axelor/axelor-mobile) application.
15
+
16
+ The purpose of this package is to link with the team module of the [Axelor Open Suite (AOS)](https://github.com/axelor/axelor-open-suite) ERP. It provides a simplified version of a number of processes available on the webapp. This package is compatible with AOS from version 9.2.0.
17
+
18
+ ## Usage
19
+
20
+ Install the library :
21
+
22
+ ```bash
23
+ yarn add @axelor/aos-mobile-team
24
+ ```
25
+
26
+ To add this package in your application, you need to add it in the _modules_ props of the component `Application` from @axelor/aos-mobile-core package.
27
+
28
+ ```typescript
29
+ import React from 'react';
30
+ import {Application} from '@axelor/aos-mobile-core';
31
+ import {TeamModule} from '@axelor/aos-mobile-team';
32
+
33
+ const App = () => {
34
+ return <Application modules={[TeamModule]} mainMenu="auth_menu_user" />;
35
+ };
36
+
37
+ export default App;
38
+ ```
39
+
40
+ ## Developpment
41
+
42
+ This package is developed as part of the Axelor Open Mobile application. To contribute, please go to the [Github project](https://github.com/axelor/axelor-mobile) and follow the guidelines. You will also find an installation guide to help you configure your environment.
@@ -0,0 +1,2 @@
1
+ export { searchTeams as searchTeamsApi } from './team-api';
2
+ export { deleteTeamTask as deleteTeamTaskApi, fetchTeamTask as fetchTeamTaskApi, saveTeamTask as saveTeamTaskApi, searchTeamTasks as searchTeamTasksApi, updateTeamTaskStatus as updateTeamTaskStatusApi, } from './team-task-api';
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2026 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 { searchTeams as searchTeamsApi } from './team-api';
19
+ export { deleteTeamTask as deleteTeamTaskApi, fetchTeamTask as fetchTeamTaskApi, saveTeamTask as saveTeamTaskApi, searchTeamTasks as searchTeamTasksApi, updateTeamTaskStatus as updateTeamTaskStatusApi, } from './team-task-api';
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,WAAW,IAAI,cAAc,EAAC,MAAM,YAAY,CAAC;AACzD,OAAO,EACL,cAAc,IAAI,iBAAiB,EACnC,aAAa,IAAI,gBAAgB,EACjC,YAAY,IAAI,eAAe,EAC/B,eAAe,IAAI,kBAAkB,EACrC,oBAAoB,IAAI,uBAAuB,GAChD,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function searchTeams({ searchValue, page, }: {
2
+ searchValue?: string;
3
+ page?: number;
4
+ }): Promise<any>;
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2026 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, getSearchCriterias, } from '@axelor/aos-mobile-core';
19
+ const createTeamCriteria = ({ searchValue }) => {
20
+ return [getSearchCriterias('team_team', searchValue)];
21
+ };
22
+ export async function searchTeams({ searchValue, page = 0, }) {
23
+ return createStandardSearch({
24
+ model: 'com.axelor.team.db.Team',
25
+ criteria: createTeamCriteria({ searchValue }),
26
+ fieldKey: 'team_team',
27
+ sortKey: 'team_team',
28
+ page,
29
+ provider: 'model',
30
+ });
31
+ }
32
+ //# sourceMappingURL=team-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team-api.js","sourceRoot":"","sources":["../../src/api/team-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,kBAAkB,GAAG,CAAC,EAAC,WAAW,EAAyB,EAAE,EAAE;IACnE,OAAO,CAAC,kBAAkB,CAAC,WAAW,EAAE,WAAY,CAAC,CAAC,CAAC;AACzD,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,EAChC,WAAW,EACX,IAAI,GAAG,CAAC,GAIT;IACC,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,yBAAyB;QAChC,QAAQ,EAAE,kBAAkB,CAAC,EAAC,WAAW,EAAC,CAAC;QAC3C,QAAQ,EAAE,WAAW;QACrB,OAAO,EAAE,WAAW;QACpB,IAAI;QACJ,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { TeamTaskScopeFilter } from '../types';
2
+ export declare function searchTeamTasks({ searchValue, selectedStatus, selectedPriority, scopeFilter, page, filterDomain, }: {
3
+ searchValue?: string;
4
+ selectedStatus?: any[];
5
+ selectedPriority?: any[];
6
+ scopeFilter?: TeamTaskScopeFilter;
7
+ page?: number;
8
+ filterDomain?: any;
9
+ }): Promise<any>;
10
+ export declare function fetchTeamTask({ id }: {
11
+ id: number;
12
+ }): Promise<any>;
13
+ export declare function saveTeamTask(body: any): Promise<any>;
14
+ export declare function updateTeamTaskStatus({ id, version, status, }: {
15
+ id: number;
16
+ version: number;
17
+ status: string;
18
+ }): Promise<any>;
19
+ export declare function deleteTeamTask({ id }: {
20
+ id: number;
21
+ }): Promise<any>;
@@ -0,0 +1,114 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2026 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 { createStandardFetch, createStandardSearch, formatRequestBody, getActionApi, getSearchCriterias, } from '@axelor/aos-mobile-core';
19
+ const MODEL = 'com.axelor.team.db.TeamTask';
20
+ const createTeamTaskCriterias = ({ searchValue, selectedStatus, selectedPriority, scopeFilter, }) => {
21
+ const criteria = [
22
+ getSearchCriterias('team_teamTask', searchValue),
23
+ ];
24
+ if (Array.isArray(selectedStatus) && selectedStatus.length > 0) {
25
+ criteria.push({
26
+ operator: 'or',
27
+ criteria: selectedStatus.map(({ key }) => ({
28
+ fieldName: 'status',
29
+ operator: '=',
30
+ value: key,
31
+ })),
32
+ });
33
+ }
34
+ if (Array.isArray(selectedPriority) && selectedPriority.length > 0) {
35
+ criteria.push({
36
+ operator: 'or',
37
+ criteria: selectedPriority.map(({ key }) => ({
38
+ fieldName: 'priority',
39
+ operator: '=',
40
+ value: key,
41
+ })),
42
+ });
43
+ }
44
+ const scopeCriteria = scopeFilter?.criteria;
45
+ if (Array.isArray(scopeCriteria) && scopeCriteria.length > 0) {
46
+ criteria.push(...scopeCriteria);
47
+ }
48
+ return criteria;
49
+ };
50
+ export async function searchTeamTasks({ searchValue, selectedStatus, selectedPriority, scopeFilter, page = 0, filterDomain, }) {
51
+ const { domain, domainContext } = scopeFilter ?? {};
52
+ return createStandardSearch({
53
+ model: MODEL,
54
+ criteria: createTeamTaskCriterias({
55
+ searchValue,
56
+ selectedStatus,
57
+ selectedPriority,
58
+ scopeFilter,
59
+ }),
60
+ ...(domain != null ? { domain, domainContext } : {}),
61
+ fieldKey: 'team_teamTask',
62
+ sortKey: 'team_teamTask',
63
+ page,
64
+ filter: filterDomain,
65
+ provider: 'model',
66
+ });
67
+ }
68
+ export async function fetchTeamTask({ id }) {
69
+ if (id == null)
70
+ return null;
71
+ return createStandardFetch({
72
+ model: MODEL,
73
+ id,
74
+ fieldKey: 'team_teamTask',
75
+ provider: 'model',
76
+ });
77
+ }
78
+ export async function saveTeamTask(body) {
79
+ const { matchers, formattedData } = formatRequestBody(body, 'data');
80
+ return getActionApi().send({
81
+ url: `/ws/rest/${MODEL}`,
82
+ method: 'post',
83
+ body: { data: formattedData },
84
+ description: 'save team task',
85
+ matchers: {
86
+ modelName: MODEL,
87
+ id: body?.id ?? Date.now(),
88
+ fields: matchers,
89
+ },
90
+ });
91
+ }
92
+ export async function updateTeamTaskStatus({ id, version, status, }) {
93
+ return getActionApi().send({
94
+ url: `/ws/rest/${MODEL}`,
95
+ method: 'post',
96
+ body: { data: { id, version, status } },
97
+ description: 'update team task status',
98
+ matchers: {
99
+ modelName: MODEL,
100
+ id,
101
+ fields: { 'data.status': 'status' },
102
+ },
103
+ });
104
+ }
105
+ export async function deleteTeamTask({ id }) {
106
+ return getActionApi().send({
107
+ url: `/ws/rest/${MODEL}/${id}`,
108
+ method: 'delete',
109
+ body: {},
110
+ description: 'delete team task',
111
+ matchers: { modelName: MODEL, id, fields: {} },
112
+ });
113
+ }
114
+ //# sourceMappingURL=team-task-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team-task-api.js","sourceRoot":"","sources":["../../src/api/team-task-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EAEpB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,KAAK,GAAG,6BAA6B,CAAC;AAE5C,MAAM,uBAAuB,GAAG,CAAC,EAC/B,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,WAAW,GAMZ,EAAE,EAAE;IACH,MAAM,QAAQ,GAAe;QAC3B,kBAAkB,CAAC,eAAe,EAAE,WAAY,CAAC;KAClD,CAAC;IAEF,IAAI,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/D,QAAQ,CAAC,IAAI,CAAC;YACZ,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAE,CAAC,CAAC;gBACvC,SAAS,EAAE,QAAQ;gBACnB,QAAQ,EAAE,GAAG;gBACb,KAAK,EAAE,GAAG;aACX,CAAC,CAAC;SACJ,CAAC,CAAC;IACL,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnE,QAAQ,CAAC,IAAI,CAAC;YACZ,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAC,GAAG,EAAC,EAAE,EAAE,CAAC,CAAC;gBACzC,SAAS,EAAE,UAAU;gBACrB,QAAQ,EAAE,GAAG;gBACb,KAAK,EAAE,GAAG;aAC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ActionSheetProps {
3
+ task: any;
4
+ visible: boolean;
5
+ onClose: () => void;
6
+ onRefresh?: () => void;
7
+ }
8
+ declare const TeamTaskActionSheet: ({ task, visible, onClose, onRefresh, }: TeamTaskActionSheetProps) => React.JSX.Element;
9
+ export default TeamTaskActionSheet;
@@ -0,0 +1,169 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2026 Axelor (<http://axelor.com>).
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU Affero General Public License, version 3,
8
+ * as published by the Free Software Foundation.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import React, { useCallback, useEffect, useMemo, useState } from 'react';
19
+ import { Dimensions, StyleSheet, View } from 'react-native';
20
+ import { ActionSheet, Badge, checkNullString, HtmlViewer, Text, useThemeColor, } from '@axelor/aos-mobile-ui';
21
+ import { useDispatch, useNavigation, usePermitted, useTranslator, useTypeHelpers, useTypes, } from '@axelor/aos-mobile-core';
22
+ import { deleteTeamTask, updateTeamTaskStatus, } from '../../../features/teamTaskSlice';
23
+ const MAX_DESCRIPTION_HEIGHT = Dimensions.get('window').height * 0.3;
24
+ const TeamTaskActionSheet = ({ task, visible, onClose, onRefresh, }) => {
25
+ const Colors = useThemeColor();
26
+ const I18n = useTranslator();
27
+ const navigation = useNavigation();
28
+ const dispatch = useDispatch();
29
+ const { TeamTask } = useTypes();
30
+ const { getItemColor, getItemTitle } = useTypeHelpers();
31
+ const { readonly, canDelete } = usePermitted({
32
+ modelName: 'com.axelor.team.db.TeamTask',
33
+ });
34
+ const [isDeleteConfirmation, setIsDeleteConfirmation] = useState(false);
35
+ useEffect(() => {
36
+ if (!visible)
37
+ setIsDeleteConfirmation(false);
38
+ }, [visible]);
39
+ const handleStatusChange = useCallback((status) => {
40
+ dispatch(updateTeamTaskStatus({
41
+ id: task?.id,
42
+ version: task?.version,
43
+ status,
44
+ })).then(() => onRefresh?.());
45
+ }, [dispatch, onRefresh, task?.id, task?.version]);
46
+ const handleDelete = useCallback(() => {
47
+ dispatch(deleteTeamTask({ id: task?.id })).then(() => onRefresh?.());
48
+ }, [dispatch, onRefresh, task?.id]);
49
+ const actionList = useMemo(() => {
50
+ if (isDeleteConfirmation) {
51
+ return [
52
+ {
53
+ iconName: 'trash3-fill',
54
+ iconColor: Colors.errorColor.background,
55
+ helper: I18n.t('Team_ConfirmDeletion'),
56
+ onPress: handleDelete,
57
+ },
58
+ {
59
+ iconName: 'x-lg',
60
+ helper: I18n.t('Base_Cancel'),
61
+ onPress: () => setIsDeleteConfirmation(false),
62
+ closeAfter: false,
63
+ },
64
+ ];
65
+ }
66
+ const isClosed = task?.status === TeamTask?.status.Closed;
67
+ const isCanceled = task?.status === TeamTask?.status.Canceled;
68
+ return [
69
+ {
70
+ iconName: 'pencil-fill',
71
+ helper: I18n.t('Team_EditTask'),
72
+ onPress: () => navigation.navigate('TeamTaskDetailsScreen', { taskId: task?.id }),
73
+ hidden: readonly,
74
+ },
75
+ {
76
+ iconName: 'play-fill',
77
+ helper: I18n.t('Team_StartTask'),
78
+ onPress: () => handleStatusChange(TeamTask?.status.InProgress),
79
+ hidden: readonly || task?.status !== TeamTask?.status.New,
80
+ },
81
+ {
82
+ iconName: 'check-lg',
83
+ iconColor: Colors.successColor.background,
84
+ helper: I18n.t('Team_FinishTask'),
85
+ onPress: () => handleStatusChange(TeamTask?.status.Closed),
86
+ hidden: readonly || isClosed || isCanceled,
87
+ },
88
+ {
89
+ iconName: 'arrow-counterclockwise',
90
+ helper: I18n.t('Team_ReopenTask'),
91
+ onPress: () => handleStatusChange(TeamTask?.status.New),
92
+ hidden: readonly || (!isClosed && !isCanceled),
93
+ },
94
+ {
95
+ iconName: 'slash-circle',
96
+ iconColor: Colors.cautionColor.background,
97
+ helper: I18n.t('Team_CancelTask'),
98
+ onPress: () => handleStatusChange(TeamTask?.status.Canceled),
99
+ hidden: readonly || isClosed || isCanceled,
100
+ },
101
+ {
102
+ iconName: 'trash3-fill',
103
+ iconColor: Colors.errorColor.background,
104
+ helper: I18n.t('Team_DeleteTask'),
105
+ onPress: () => setIsDeleteConfirmation(true),
106
+ hidden: !canDelete,
107
+ closeAfter: false,
108
+ },
109
+ ];
110
+ }, [
111
+ Colors,
112
+ I18n,
113
+ TeamTask?.status,
114
+ canDelete,
115
+ handleDelete,
116
+ handleStatusChange,
117
+ isDeleteConfirmation,
118
+ navigation,
119
+ readonly,
120
+ task?.id,
121
+ task?.status,
122
+ ]);
123
+ const renderRecap = useCallback(() => (<View style={styles.recap}>
124
+ <View style={styles.rowWrapper}>
125
+ <Text writingType="title" numberOfLines={2} style={styles.flex}>
126
+ {task?.name}
127
+ </Text>
128
+ <View style={styles.badges}>
129
+ {!checkNullString(task?.status) && (<Badge title={getItemTitle(TeamTask?.status, task?.status)} color={getItemColor(TeamTask?.status, task?.status)}/>)}
130
+ {!checkNullString(task?.priority) && (<Badge title={getItemTitle(TeamTask?.priority, task?.priority)} color={getItemColor(TeamTask?.priority, task?.priority)}/>)}
131
+ </View>
132
+ </View>
133
+ {!checkNullString(task?.description) && (<HtmlViewer html={task.description} maxHeight={MAX_DESCRIPTION_HEIGHT}/>)}
134
+ </View>), [
135
+ TeamTask?.priority,
136
+ TeamTask?.status,
137
+ getItemColor,
138
+ getItemTitle,
139
+ task?.description,
140
+ task?.name,
141
+ task?.priority,
142
+ task?.status,
143
+ ]);
144
+ const renderDeleteConfirmation = useCallback(() => (<View style={styles.recap}>
145
+ <Text writingType="title">{I18n.t('Team_DeleteTask')}</Text>
146
+ <Text>{I18n.t('Team_DeleteTaskConfirmation')}</Text>
147
+ </View>), [I18n]);
148
+ if (task == null)
149
+ return null;
150
+ return (<ActionSheet visible={visible} title={I18n.t('Team_TaskActions')} headerChildren={isDeleteConfirmation ? renderDeleteConfirmation() : renderRecap()} actionList={actionList} onClose={onClose}/>);
151
+ };
152
+ const styles = StyleSheet.create({
153
+ recap: {
154
+ gap: 8,
155
+ },
156
+ rowWrapper: {
157
+ flexDirection: 'row',
158
+ alignItems: 'center',
159
+ },
160
+ flex: {
161
+ flex: 1,
162
+ },
163
+ badges: {
164
+ flexDirection: 'row',
165
+ alignItems: 'flex-end',
166
+ },
167
+ });
168
+ export default TeamTaskActionSheet;
169
+ //# sourceMappingURL=TeamTaskActionSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamTaskActionSheet.js","sourceRoot":"","sources":["../../../../src/components/atoms/TeamTaskActionSheet/TeamTaskActionSheet.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EACL,WAAW,EACX,KAAK,EACL,eAAe,EACf,UAAU,EACV,IAAI,EACJ,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAa,EACb,cAAc,EACd,QAAQ,GACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,oBAAoB,GACrB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,sBAAsB,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC;AASrE,MAAM,mBAAmB,GAAG,CAAC,EAC3B,IAAI,EACJ,OAAO,EACP,OAAO,EACP,SAAS,GACgB,EAAE,EAAE;IAC7B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MA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,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;KACR;IACD,MAAM,EAAE;QACN,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ interface TeamTaskCardProps {
3
+ name: string;
4
+ priority: string;
5
+ status: string;
6
+ assignedTo?: {
7
+ fullName?: string;
8
+ };
9
+ team?: {
10
+ name?: string;
11
+ };
12
+ taskDate?: string;
13
+ taskDeadline?: string;
14
+ onPress?: () => void;
15
+ }
16
+ declare const TeamTaskCard: ({ name, priority, status, assignedTo, team, taskDate, taskDeadline, onPress, }: TeamTaskCardProps) => React.JSX.Element;
17
+ export default TeamTaskCard;
@@ -0,0 +1,71 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2026 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 { ObjectCard } from '@axelor/aos-mobile-ui';
21
+ import { formatDate, useTranslator, useTypeHelpers, useTypes, } from '@axelor/aos-mobile-core';
22
+ const TeamTaskCard = ({ name, priority, status, assignedTo, team, taskDate, taskDeadline, onPress, }) => {
23
+ const I18n = useTranslator();
24
+ const { TeamTask } = useTypes();
25
+ const { getItemColor, getItemTitle } = useTypeHelpers();
26
+ const borderColor = useMemo(() => getItemColor(TeamTask?.status, status)?.background, [TeamTask?.status, getItemColor, status]);
27
+ return (<ObjectCard showArrow={false} leftContainerFlex={2} onPress={onPress} borderLeftColor={borderColor} upperTexts={{
28
+ items: [
29
+ { displayText: name, isTitle: true },
30
+ {
31
+ iconName: 'person-fill',
32
+ indicatorText: `${I18n.t('Team_AssignedTo')} :`,
33
+ displayText: assignedTo?.fullName,
34
+ hideIf: assignedTo?.fullName == null,
35
+ },
36
+ {
37
+ iconName: 'people-fill',
38
+ indicatorText: `${I18n.t('Team_Team')} :`,
39
+ displayText: team?.name,
40
+ hideIf: team?.name == null,
41
+ },
42
+ {
43
+ iconName: 'calendar-event',
44
+ indicatorText: `${I18n.t('Team_TaskDate')} :`,
45
+ displayText: formatDate(taskDate, I18n.t('Base_DateFormat')),
46
+ hideIf: taskDate == null,
47
+ },
48
+ {
49
+ iconName: 'calendar-check',
50
+ indicatorText: `${I18n.t('Team_TaskDeadline')} :`,
51
+ displayText: formatDate(taskDeadline, I18n.t('Base_DateFormat')),
52
+ hideIf: taskDeadline == null,
53
+ },
54
+ ],
55
+ }} sideBadges={{
56
+ style: styles.badgeWrapper,
57
+ items: [
58
+ {
59
+ displayText: getItemTitle(TeamTask?.priority, priority),
60
+ color: getItemColor(TeamTask?.priority, priority),
61
+ },
62
+ ],
63
+ }}/>);
64
+ };
65
+ const styles = StyleSheet.create({
66
+ badgeWrapper: {
67
+ alignItems: 'flex-end',
68
+ },
69
+ });
70
+ export default TeamTaskCard;
71
+ //# sourceMappingURL=TeamTaskCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TeamTaskCard.js","sourceRoot":"","sources":["../../../../src/components/atoms/TeamTaskCard/TeamTaskCard.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,UAAU,EAAC,MAAM,uBAAuB,CAA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IAAI,IAAI;iBAC3B;gBACD;oBACE,QAAQ,EAAE,gBAAgB;oBAC1B,aAAa,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI;oBAC7C,WAAW,EAAE,UAAU,CAAC,QAAS,EAAE,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;oBAC7D,MAAM,EAAE,QAAQ,IAAI,IAAI;iBACzB;gBACD;oBACE,QAAQ,EAAE,gBAAgB;oBAC1B,aAAa,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI;oBACjD,WAAW,EAAE,UAAU,CAAC,YAAa,EAAE,IAAI,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;oBACjE,MAAM,EAAE,YAAY,IAAI,IAAI;iBAC7B;aACF;SACF,CAAC,CACF,UAAU,CAAC,CAAC;YACV,KAAK,EAAE,MAAM,CAAC,YAAY;YAC1B,KAAK,EAAE;gBACL;oBACE,WAAW,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;oBACvD,KAAK,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;iBAClD;aACF;SACF,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,YAAY,EAAE;QACZ,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as TeamTaskActionSheet } from './TeamTaskActionSheet/TeamTaskActionSheet';
2
+ export { default as TeamTaskCard } from './TeamTaskCard/TeamTaskCard';
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2026 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 TeamTaskActionSheet } from './TeamTaskActionSheet/TeamTaskActionSheet';
19
+ export { default as TeamTaskCard } from './TeamTaskCard/TeamTaskCard';
20
+ //# 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,mBAAmB,EAAC,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './atoms';
2
+ export * from './molecules';
3
+ export * from './organisms';
4
+ export * from './templates';
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2026 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
+ //# 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"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const TeamTaskActionCard: ({ task, onRefresh, }: {
3
+ task: any;
4
+ onRefresh?: () => void;
5
+ }) => React.JSX.Element;
6
+ export default TeamTaskActionCard;
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Axelor Business Solutions
3
+ *
4
+ * Copyright (C) 2026 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 { TeamTaskActionSheet, TeamTaskCard } from '../../atoms';
20
+ const TeamTaskActionCard = ({ task, onRefresh, }) => {
21
+ const [visible, setVisible] = useState(false);
22
+ return (<>
23
+ <TeamTaskCard {...task} onPress={() => setVisible(true)}/>
24
+ <TeamTaskActionSheet task={task} visible={visible} onClose={() => setVisible(false)} onRefresh={onRefresh}/>
25
+ </>);
26
+ };
27
+ export default TeamTaskActionCard;
28
+ //# sourceMappingURL=TeamTaskActionCard.js.map