@axelor/aos-mobile-maintenance 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/lib/api/equipement-maintenance-api.d.ts +5 -0
- package/lib/api/equipement-maintenance-api.js +42 -0
- package/lib/api/equipement-maintenance-api.js.map +1 -0
- package/lib/api/index.d.ts +2 -0
- package/lib/api/index.js +20 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/maintenance-request-api.d.ts +14 -0
- package/lib/api/maintenance-request-api.js +86 -0
- package/lib/api/maintenance-request-api.js.map +1 -0
- package/lib/components/atoms/EquipementMaintenanceCard/EquipementMaintenanceCard.d.ts +14 -0
- package/lib/components/atoms/EquipementMaintenanceCard/EquipementMaintenanceCard.js +57 -0
- package/lib/components/atoms/EquipementMaintenanceCard/EquipementMaintenanceCard.js.map +1 -0
- package/lib/components/atoms/MaintenanceRequestCard/MaintenanceRequestCard.d.ts +15 -0
- package/lib/components/atoms/MaintenanceRequestCard/MaintenanceRequestCard.js +69 -0
- package/lib/components/atoms/MaintenanceRequestCard/MaintenanceRequestCard.js.map +1 -0
- package/lib/components/atoms/index.d.ts +2 -0
- package/lib/components/atoms/index.js +20 -0
- package/lib/components/atoms/index.js.map +1 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.js +21 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/molecules/ActionRadioSelect/ActionRadioSelect.d.ts +10 -0
- package/lib/components/molecules/ActionRadioSelect/ActionRadioSelect.js +46 -0
- package/lib/components/molecules/ActionRadioSelect/ActionRadioSelect.js.map +1 -0
- package/lib/components/molecules/ActionTypePicker/ActionTypePicker.d.ts +12 -0
- package/lib/components/molecules/ActionTypePicker/ActionTypePicker.js +29 -0
- package/lib/components/molecules/ActionTypePicker/ActionTypePicker.js.map +1 -0
- package/lib/components/molecules/EquipementMaintenanceActionCard/EquipementMaintenanceActionCard.d.ts +9 -0
- package/lib/components/molecules/EquipementMaintenanceActionCard/EquipementMaintenanceActionCard.js +36 -0
- package/lib/components/molecules/EquipementMaintenanceActionCard/EquipementMaintenanceActionCard.js.map +1 -0
- package/lib/components/molecules/index.d.ts +3 -0
- package/lib/components/molecules/index.js +21 -0
- package/lib/components/molecules/index.js.map +1 -0
- package/lib/components/organisms/EquipementMaintenanceSearchBar/EquipementMaintenanceSearchBar.d.ts +15 -0
- package/lib/components/organisms/EquipementMaintenanceSearchBar/EquipementMaintenanceSearchBar.js +47 -0
- package/lib/components/organisms/EquipementMaintenanceSearchBar/EquipementMaintenanceSearchBar.js.map +1 -0
- package/lib/components/organisms/MaintenanceRequestFilters/MaintenanceRequestFilters.d.ts +12 -0
- package/lib/components/organisms/MaintenanceRequestFilters/MaintenanceRequestFilters.js +51 -0
- package/lib/components/organisms/MaintenanceRequestFilters/MaintenanceRequestFilters.js.map +1 -0
- package/lib/components/organisms/index.d.ts +2 -0
- package/lib/components/organisms/index.js +20 -0
- package/lib/components/organisms/index.js.map +1 -0
- package/lib/features/asyncFunctions-index.d.ts +2 -0
- package/lib/features/asyncFunctions-index.js +20 -0
- package/lib/features/asyncFunctions-index.js.map +1 -0
- package/lib/features/equipementMaintenanceSlice.d.ts +7 -0
- package/lib/features/equipementMaintenanceSlice.js +50 -0
- package/lib/features/equipementMaintenanceSlice.js.map +1 -0
- package/lib/features/index.d.ts +2 -0
- package/lib/features/index.js +20 -0
- package/lib/features/index.js.map +1 -0
- package/lib/features/maintenanceRequestSlice.d.ts +22 -0
- package/lib/features/maintenanceRequestSlice.js +59 -0
- package/lib/features/maintenanceRequestSlice.js.map +1 -0
- package/lib/hooks/use-maintenance-header-actions.d.ts +1 -0
- package/lib/hooks/use-maintenance-header-actions.js +54 -0
- package/lib/hooks/use-maintenance-header-actions.js.map +1 -0
- package/lib/i18n/en.json +19 -0
- package/lib/i18n/fr.json +19 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +76 -0
- package/lib/index.js.map +1 -0
- package/lib/models/forms.d.ts +2 -0
- package/lib/models/forms.js +46 -0
- package/lib/models/forms.js.map +1 -0
- package/lib/models/index.d.ts +5 -0
- package/lib/models/index.js +23 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/objectFields.d.ts +2 -0
- package/lib/models/objectFields.js +44 -0
- package/lib/models/objectFields.js.map +1 -0
- package/lib/models/searchFields.d.ts +2 -0
- package/lib/models/searchFields.js +32 -0
- package/lib/models/searchFields.js.map +1 -0
- package/lib/models/sortFields.d.ts +2 -0
- package/lib/models/sortFields.js +22 -0
- package/lib/models/sortFields.js.map +1 -0
- package/lib/models/typeObjects.d.ts +2 -0
- package/lib/models/typeObjects.js +69 -0
- package/lib/models/typeObjects.js.map +1 -0
- package/lib/screens/MaintenanceRequestFormScreen.d.ts +5 -0
- package/lib/screens/MaintenanceRequestFormScreen.js +54 -0
- package/lib/screens/MaintenanceRequestFormScreen.js.map +1 -0
- package/lib/screens/MaintenanceRequestListScreen.d.ts +3 -0
- package/lib/screens/MaintenanceRequestListScreen.js +60 -0
- package/lib/screens/MaintenanceRequestListScreen.js.map +1 -0
- package/lib/screens/index.d.ts +24 -0
- package/lib/screens/index.js +36 -0
- package/lib/screens/index.js.map +1 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Maintenance
|
|
3
|
+
tags: Readme
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<h1 align="center">@axelor/aos-mobile-maintenance</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 maintenance 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 8.5.0.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
Install the library :
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
yarn add @axelor/aos-mobile-maintenance
|
|
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 {MaintenanceModule} from '@axelor/aos-mobile-maintenance';
|
|
32
|
+
|
|
33
|
+
const App = () => {
|
|
34
|
+
return <Application modules={[MaintenanceModule]} 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,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 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 createEquipementMaintenanceCriteria = ({ searchValue, machineId }) => {
|
|
20
|
+
const criteria = [
|
|
21
|
+
getSearchCriterias('maintenance_equipementMaintenance', searchValue),
|
|
22
|
+
];
|
|
23
|
+
if (machineId != null) {
|
|
24
|
+
criteria.push({
|
|
25
|
+
fieldName: 'machine.id',
|
|
26
|
+
operator: '=',
|
|
27
|
+
value: machineId,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return criteria;
|
|
31
|
+
};
|
|
32
|
+
export async function searchEquipementMaintenance({ searchValue, machineId, page = 0, }) {
|
|
33
|
+
return createStandardSearch({
|
|
34
|
+
model: 'com.axelor.apps.maintenance.db.EquipementMaintenance',
|
|
35
|
+
criteria: createEquipementMaintenanceCriteria({ searchValue, machineId }),
|
|
36
|
+
fieldKey: 'maintenance_equipementMaintenance',
|
|
37
|
+
sortKey: 'maintenance_equipementMaintenance',
|
|
38
|
+
page,
|
|
39
|
+
provider: 'model',
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=equipement-maintenance-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equipement-maintenance-api.js","sourceRoot":"","sources":["../../src/api/equipement-maintenance-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EAEpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,mCAAmC,GAAG,CAAC,EAAC,WAAW,EAAE,SAAS,EAAC,EAAE,EAAE;IACvE,MAAM,QAAQ,GAAe;QAC3B,kBAAkB,CAAC,mCAAmC,EAAE,WAAW,CAAC;KACrE,CAAC;IAEF,IAAI,SAAS,IAAI,IAAI,EAAE;QACrB,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,YAAY;YACvB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,EAChD,WAAW,EACX,SAAS,EACT,IAAI,GAAG,CAAC,GAKT;IACC,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,sDAAsD;QAC7D,QAAQ,EAAE,mCAAmC,CAAC,EAAC,WAAW,EAAE,SAAS,EAAC,CAAC;QACvE,QAAQ,EAAE,mCAAmC;QAC7C,OAAO,EAAE,mCAAmC;QAC5C,IAAI;QACJ,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC"}
|
package/lib/api/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 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 { searchEquipementMaintenance as searchEquipementMaintenanceApi } from './equipement-maintenance-api';
|
|
19
|
+
export { createMaintenanceRequest as createMaintenanceRequestApi, searchMaintenanceRequests as searchMaintenanceRequestsApi, } from './maintenance-request-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,2BAA2B,IAAI,8BAA8B,EAAC,MAAM,8BAA8B,CAAC;AAC3G,OAAO,EACL,wBAAwB,IAAI,2BAA2B,EACvD,yBAAyB,IAAI,4BAA4B,GAC1D,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function searchMaintenanceRequests({ searchValue, statusList, actionType, userId, machineId, page, filterDomain, }: {
|
|
2
|
+
searchValue?: string;
|
|
3
|
+
statusList?: any[];
|
|
4
|
+
actionType?: number;
|
|
5
|
+
userId?: number;
|
|
6
|
+
machineId?: number;
|
|
7
|
+
page?: number;
|
|
8
|
+
filterDomain?: any;
|
|
9
|
+
}): Promise<any>;
|
|
10
|
+
export declare function createMaintenanceRequest({ equipementMaintenanceId, expectedDate, actionSelect, }: {
|
|
11
|
+
equipementMaintenanceId: any;
|
|
12
|
+
expectedDate: any;
|
|
13
|
+
actionSelect: any;
|
|
14
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 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, getActionApi, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
|
+
const createMaintenanceRequestCriterias = ({ searchValue, statusList, actionType, userId, machineId, }) => {
|
|
20
|
+
const criteria = [
|
|
21
|
+
getSearchCriterias('maintenance_maintenanceRequest', searchValue),
|
|
22
|
+
];
|
|
23
|
+
if (Array.isArray(statusList) && statusList.length > 0) {
|
|
24
|
+
criteria.push({
|
|
25
|
+
operator: 'or',
|
|
26
|
+
criteria: statusList.map(({ value }) => ({
|
|
27
|
+
fieldName: 'statusSelect',
|
|
28
|
+
operator: '=',
|
|
29
|
+
value: value,
|
|
30
|
+
})),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
if (actionType != null) {
|
|
34
|
+
criteria.push({
|
|
35
|
+
fieldName: 'actionSelect',
|
|
36
|
+
operator: '=',
|
|
37
|
+
value: actionType,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (userId != null) {
|
|
41
|
+
criteria.push({
|
|
42
|
+
fieldName: 'requestBy.id',
|
|
43
|
+
operator: '=',
|
|
44
|
+
value: userId,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (machineId != null) {
|
|
48
|
+
criteria.push({
|
|
49
|
+
fieldName: 'machine.id',
|
|
50
|
+
operator: '=',
|
|
51
|
+
value: machineId,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return criteria;
|
|
55
|
+
};
|
|
56
|
+
export async function searchMaintenanceRequests({ searchValue, statusList, actionType, userId, machineId, page = 0, filterDomain, }) {
|
|
57
|
+
return createStandardSearch({
|
|
58
|
+
model: 'com.axelor.apps.maintenance.db.MaintenanceRequest',
|
|
59
|
+
criteria: createMaintenanceRequestCriterias({
|
|
60
|
+
searchValue,
|
|
61
|
+
statusList,
|
|
62
|
+
actionType,
|
|
63
|
+
userId,
|
|
64
|
+
machineId,
|
|
65
|
+
}),
|
|
66
|
+
fieldKey: 'maintenance_maintenanceRequest',
|
|
67
|
+
sortKey: 'maintenance_maintenanceRequest',
|
|
68
|
+
page,
|
|
69
|
+
filter: filterDomain,
|
|
70
|
+
provider: 'model',
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
export async function createMaintenanceRequest({ equipementMaintenanceId, expectedDate, actionSelect, }) {
|
|
74
|
+
return getActionApi().send({
|
|
75
|
+
method: 'post',
|
|
76
|
+
url: '/ws/aos/maintenance-request',
|
|
77
|
+
body: { equipementMaintenanceId, expectedDate, actionSelect },
|
|
78
|
+
description: 'create maintenance request',
|
|
79
|
+
matchers: {
|
|
80
|
+
modelName: 'com.axelor.apps.maintenance.db.MaintenanceRequest',
|
|
81
|
+
id: Date.now(),
|
|
82
|
+
fields: { equipementMaintenanceId: 'equipementMaintenance.id' },
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=maintenance-request-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maintenance-request-api.js","sourceRoot":"","sources":["../../src/api/maintenance-request-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EAEpB,YAAY,EACZ,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,iCAAiC,GAAG,CAAC,EACzC,WAAW,EACX,UAAU,EACV,UAAU,EACV,MAAM,EACN,SAAS,GACV,EAAE,EAAE;IACH,MAAM,QAAQ,GAAe;QAC3B,kBAAkB,CAAC,gCAAgC,EAAE,WAAW,CAAC;KAClE,CAAC;IAEF,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;QACtD,QAAQ,CAAC,IAAI,CAAC;YACZ,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,CAAC;gBACrC,S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,GAAG,EAAE,6BAA6B;QAClC,IAAI,EAAE,EAAC,uBAAuB,EAAE,YAAY,EAAE,YAAY,EAAC;QAC3D,WAAW,EAAE,4BAA4B;QACzC,QAAQ,EAAE;YACR,SAAS,EAAE,mDAAmD;YAC9D,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE;YACd,MAAM,EAAE,EAAC,uBAAuB,EAAE,0BAA0B,EAAC;SAC9D;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface EquipementMaintenanceCardProps {
|
|
3
|
+
style?: any;
|
|
4
|
+
image?: {
|
|
5
|
+
id: number;
|
|
6
|
+
};
|
|
7
|
+
code: string;
|
|
8
|
+
name: string;
|
|
9
|
+
machine: {
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare const EquipementMaintenanceCard: ({ style, image, code, name, machine, }: EquipementMaintenanceCardProps) => React.JSX.Element;
|
|
14
|
+
export default EquipementMaintenanceCard;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { StyleSheet } from 'react-native';
|
|
20
|
+
import { useMetafileUri, useTranslator } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { ObjectCard } from '@axelor/aos-mobile-ui';
|
|
22
|
+
const EquipementMaintenanceCard = ({ style, image, code, name, machine, }) => {
|
|
23
|
+
const I18n = useTranslator();
|
|
24
|
+
const formatMetaFile = useMetafileUri();
|
|
25
|
+
return (<ObjectCard style={[styles.card, style]} showArrow={false} touchable={false} leftContainerFlex={2} image={image?.id != null
|
|
26
|
+
? {
|
|
27
|
+
generalStyle: styles.imageSize,
|
|
28
|
+
imageSize: styles.imageSize,
|
|
29
|
+
resizeMode: 'contain',
|
|
30
|
+
defaultIconSize: 50,
|
|
31
|
+
source: formatMetaFile(image.id),
|
|
32
|
+
}
|
|
33
|
+
: undefined} upperTexts={{
|
|
34
|
+
items: [
|
|
35
|
+
{ isTitle: true, displayText: code },
|
|
36
|
+
{ displayText: name },
|
|
37
|
+
{
|
|
38
|
+
iconName: 'wrench',
|
|
39
|
+
indicatorText: `${I18n.t('Maintenance_Machine')} :`,
|
|
40
|
+
displayText: machine.name,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
}}/>);
|
|
44
|
+
};
|
|
45
|
+
const styles = StyleSheet.create({
|
|
46
|
+
card: {
|
|
47
|
+
marginHorizontal: 0,
|
|
48
|
+
marginVertical: 4,
|
|
49
|
+
paddingRight: 5,
|
|
50
|
+
},
|
|
51
|
+
imageSize: {
|
|
52
|
+
height: 50,
|
|
53
|
+
width: 50,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
export default EquipementMaintenanceCard;
|
|
57
|
+
//# sourceMappingURL=EquipementMaintenanceCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EquipementMaintenanceCard.js","sourceRoot":"","sources":["../../../../src/components/atoms/EquipementMaintenanceCard/EquipementMaintenanceCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA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AAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,gBAAgB,EAAE,CAAC;QACnB,cAAc,EAAE,CAAC;QACjB,YAAY,EAAE,CAAC;KAChB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;KACV;CACF,CAAC,CAAC;AAEH,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface MaintenanceRequestCardProps {
|
|
3
|
+
style?: any;
|
|
4
|
+
equipementMaintenance: {
|
|
5
|
+
code: string;
|
|
6
|
+
};
|
|
7
|
+
machine: {
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
expectedDate?: string;
|
|
11
|
+
statusSelect: number;
|
|
12
|
+
actionSelect: number;
|
|
13
|
+
}
|
|
14
|
+
declare const MaintenanceRequestCard: ({ style, equipementMaintenance, machine, expectedDate, statusSelect, actionSelect, }: MaintenanceRequestCardProps) => React.JSX.Element;
|
|
15
|
+
export default MaintenanceRequestCard;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 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 { formatDate, useTranslator, useTypeHelpers, useTypes, } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { ObjectCard } from '@axelor/aos-mobile-ui';
|
|
22
|
+
const MaintenanceRequestCard = ({ style, equipementMaintenance, machine, expectedDate, statusSelect, actionSelect, }) => {
|
|
23
|
+
const I18n = useTranslator();
|
|
24
|
+
const { MaintenanceRequest } = useTypes();
|
|
25
|
+
const { getItemColor, getItemTitle } = useTypeHelpers();
|
|
26
|
+
const borderStyle = useMemo(() => getBorderStyles(getItemColor(MaintenanceRequest?.statusSelect, statusSelect)
|
|
27
|
+
?.background)?.border, [MaintenanceRequest?.statusSelect, getItemColor, statusSelect]);
|
|
28
|
+
return (<ObjectCard style={[styles.card, borderStyle, style]} showArrow={false} touchable={false} leftContainerFlex={2} upperTexts={{
|
|
29
|
+
items: [
|
|
30
|
+
{
|
|
31
|
+
isTitle: true,
|
|
32
|
+
displayText: equipementMaintenance.code,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
iconName: 'wrench',
|
|
36
|
+
indicatorText: `${I18n.t('Maintenance_Machine')} :`,
|
|
37
|
+
displayText: machine.name,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
iconName: 'calendar-event',
|
|
41
|
+
indicatorText: `${I18n.t('Maintenance_Deadline')} :`,
|
|
42
|
+
displayText: formatDate(expectedDate, I18n.t('Base_DateFormat')),
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
}} sideBadges={{
|
|
46
|
+
items: [
|
|
47
|
+
{
|
|
48
|
+
style: { width: undefined, paddingHorizontal: 5 },
|
|
49
|
+
color: getItemColor(MaintenanceRequest?.actionSelect, actionSelect),
|
|
50
|
+
displayText: getItemTitle(MaintenanceRequest?.actionSelect, actionSelect),
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
}}/>);
|
|
54
|
+
};
|
|
55
|
+
const getBorderStyles = (color) => StyleSheet.create({
|
|
56
|
+
border: {
|
|
57
|
+
borderLeftWidth: 7,
|
|
58
|
+
borderLeftColor: color,
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
const styles = StyleSheet.create({
|
|
62
|
+
card: {
|
|
63
|
+
marginHorizontal: 10,
|
|
64
|
+
marginVertical: 4,
|
|
65
|
+
paddingRight: 5,
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
export default MaintenanceRequestCard;
|
|
69
|
+
//# sourceMappingURL=MaintenanceRequestCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaintenanceRequestCard.js","sourceRoot":"","sources":["../../../../src/components/atoms/MaintenanceRequestCard/MaintenanceRequestCard.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,EACL,UAAU,EACV,aAAa,EACb,cAAc,EACd,QAAQ,GACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAejD,MAAM,sBAAsB,GAAG,CAAC,EAC9B,KAAK,EACL,qBAAqB,EACrB,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,YAAY,GACgB,EAAE,EAAE;IAChC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,EAAC,kBAAkB,EAAC,GAAG,QAAQ,EAAE,CAAC;IACxC,MAAM,EAAC,YAAY,EAAE,YAAY,EAAC,GAAG,cAAc,EAAE,CAAC;IAEtD,MAAM,WAAW,GAAG,OAAO,CACzB,GAAG,EAAE,CACH,eAAe,CACb,YAAY,CAAC,kBAAkB,EAAE,YAAY,EAAE,YAAY,CAAC;QAC1D,EAAE,UAAU,CACf,EAAE,MAAM,EACX,CAAC,kBAAkB,EA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AAC;AAEL,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,gBAAgB,EAAE,EAAE;QACpB,cAAc,EAAE,CAAC;QACjB,YAAY,EAAE,CAAC;KAChB;CACF,CAAC,CAAC;AAEH,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 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 EquipementMaintenanceCard } from './EquipementMaintenanceCard/EquipementMaintenanceCard';
|
|
19
|
+
export { default as MaintenanceRequestCard } from './MaintenanceRequestCard/MaintenanceRequestCard';
|
|
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,yBAAyB,EAAC,MAAM,uDAAuD,CAAC;AAC3G,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,iDAAiD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 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
|
+
//# 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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ActionRadioSelectProps {
|
|
3
|
+
style?: any;
|
|
4
|
+
title?: string;
|
|
5
|
+
defaultValue?: number;
|
|
6
|
+
onChange: (value: number) => void;
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const ActionRadioSelect: ({ style, title, defaultValue, onChange, readonly, }: ActionRadioSelectProps) => React.JSX.Element;
|
|
10
|
+
export default ActionRadioSelect;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 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, useMemo } from 'react';
|
|
19
|
+
import { StyleSheet } from 'react-native';
|
|
20
|
+
import { useTranslator, useTypeHelpers, useTypes } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { RadioSelect } from '@axelor/aos-mobile-ui';
|
|
22
|
+
const ActionRadioSelect = ({ style, title = 'Maintenance_RequestActionType', defaultValue, onChange, readonly = false, }) => {
|
|
23
|
+
const I18n = useTranslator();
|
|
24
|
+
const { MaintenanceRequest } = useTypes();
|
|
25
|
+
const { getSelectionItems } = useTypeHelpers();
|
|
26
|
+
const statusList = useMemo(() => getSelectionItems(MaintenanceRequest?.actionSelect).map(_i => ({
|
|
27
|
+
..._i,
|
|
28
|
+
id: `${_i.key}`,
|
|
29
|
+
})), [MaintenanceRequest?.actionSelect, getSelectionItems]);
|
|
30
|
+
const handleChange = useCallback((value) => {
|
|
31
|
+
onChange(parseInt(value, 10));
|
|
32
|
+
}, [onChange]);
|
|
33
|
+
return (<RadioSelect style={[styles.radioSelect, style]} direction="row" question={I18n.t(title)} questionStyle={styles.question} items={statusList} onChange={handleChange} readonly={readonly} defaultValue={`${defaultValue}`}/>);
|
|
34
|
+
};
|
|
35
|
+
const styles = StyleSheet.create({
|
|
36
|
+
radioSelect: {
|
|
37
|
+
alignSelf: 'center',
|
|
38
|
+
width: '90%',
|
|
39
|
+
},
|
|
40
|
+
question: {
|
|
41
|
+
fontWeight: null,
|
|
42
|
+
marginLeft: 10,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
export default ActionRadioSelect;
|
|
46
|
+
//# sourceMappingURL=ActionRadioSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionRadioSelect.js","sourceRoot":"","sources":["../../../../src/components/molecules/ActionRadioSelect/ActionRadioSelect.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AAClD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAUlD,MAAM,iBAAiB,GAAG,CAAC,EACzB,KAAK,EACL,KAAK,GAAG,+BAA+B,EACvC,YAAY,EACZ,QAAQ,EACR,QAAQ,GAAG,KAAK,GACO,EAAE,EAAE;IAC3B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,MAAM,EAAC,kBAAkB,EAAC,GAAG,QAAQ,EAAE,CAAC;IACxC,MAAM,EAAC,iBAAiB,EAAC,GAAG,cAAc,EAAE,CAAC;IAE7C,MAAM,UAAU,GAAG,OAAO,CACxB,GAAG,EAAE,CACH,iBAAiB,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC7D,GAAG,EAAE;QACL,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE;KAChB,CAAC,CAAC,EACL,CAAC,kBAAkB,EAAE,YAAY,EAAE,iBAAiB,CAAC,CACtD,CAAC;IAEF,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAAa,EAAE,EAAE;QAChB,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;IAChC,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,CAAC,WAAW,CACV,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,CACnC,SAAS,CAAC,KAAK,CACf,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CACxB,aAAa,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAC/B,KAAK,CAAC,CAAC,UAAU,CAAC,CAClB,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,YAAY,CAAC,CAAC,GAAG,YAAY,EAAE,CAAC,EAChC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,WAAW,EAAE;QACX,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,KAAK;KACb;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE,EAAE;KACf;CACF,CAAC,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ActionTypePickerProps {
|
|
3
|
+
style?: any;
|
|
4
|
+
title?: string;
|
|
5
|
+
defaultValue?: number;
|
|
6
|
+
onChange: (value: number) => void;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
showTitle?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const ActionTypePicker: ({ style, title, defaultValue, onChange, required, readonly, showTitle, }: ActionTypePickerProps) => React.JSX.Element;
|
|
12
|
+
export default ActionTypePicker;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 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 { useTranslator, useTypeHelpers, useTypes } from '@axelor/aos-mobile-core';
|
|
20
|
+
import { Picker } from '@axelor/aos-mobile-ui';
|
|
21
|
+
const ActionTypePicker = ({ style, title = 'Maintenance_RequestActionType', defaultValue, onChange, required = false, readonly = false, showTitle = true, }) => {
|
|
22
|
+
const I18n = useTranslator();
|
|
23
|
+
const { MaintenanceRequest } = useTypes();
|
|
24
|
+
const { getSelectionItems } = useTypeHelpers();
|
|
25
|
+
const statusList = useMemo(() => getSelectionItems(MaintenanceRequest?.actionSelect), [MaintenanceRequest?.actionSelect, getSelectionItems]);
|
|
26
|
+
return (<Picker style={style} title={showTitle && I18n.t(title)} placeholder={I18n.t(title)} listItems={statusList} defaultValue={defaultValue} valueField="key" labelField="title" onValueChange={onChange} required={required} readonly={readonly}/>);
|
|
27
|
+
};
|
|
28
|
+
export default ActionTypePicker;
|
|
29
|
+
//# sourceMappingURL=ActionTypePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionTypePicker.js","sourceRoot":"","sources":["../../../../src/components/molecules/ActionTypePicker/ActionTypePic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AAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface EquipementMaintenanceActionCardProps {
|
|
3
|
+
style?: any;
|
|
4
|
+
item: any;
|
|
5
|
+
onPress: () => void;
|
|
6
|
+
readonly?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const EquipementMaintenanceActionCard: ({ style, item, onPress, readonly, }: EquipementMaintenanceActionCardProps) => React.JSX.Element;
|
|
9
|
+
export default EquipementMaintenanceActionCard;
|
package/lib/components/molecules/EquipementMaintenanceActionCard/EquipementMaintenanceActionCard.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { StyleSheet } from 'react-native';
|
|
20
|
+
import { useTranslator } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { ActionCard } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { EquipementMaintenanceCard } from '../../atoms';
|
|
23
|
+
const EquipementMaintenanceActionCard = ({ style, item, onPress, readonly = false, }) => {
|
|
24
|
+
const I18n = useTranslator();
|
|
25
|
+
return (<ActionCard style={[styles.card, style]} actionList={[{ iconName: 'x-lg', onPress, hidden: readonly }]} translator={I18n.t}>
|
|
26
|
+
<EquipementMaintenanceCard {...item}/>
|
|
27
|
+
</ActionCard>);
|
|
28
|
+
};
|
|
29
|
+
const styles = StyleSheet.create({
|
|
30
|
+
card: {
|
|
31
|
+
width: '90%',
|
|
32
|
+
alignSelf: 'center',
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
export default EquipementMaintenanceActionCard;
|
|
36
|
+
//# sourceMappingURL=EquipementMaintenanceActionCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EquipementMaintenanceActionCard.js","sourceRoot":"","sources":["../../../../src/components/molecules/EquipementMaintenanceActionCard/EquipementMaintenanceActionCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAC,yBAAyB,EAAC,MAAM,aAAa,CAAC;AAStD,MAAM,+BAA+B,GAAG,CAAC,EACvC,KAAK,EACL,IAAI,EACJ,OAAO,EACP,QAAQ,GAAG,KAAK,GACqB,EAAE,EAAE;IACzC,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAC7B,OAAO,CACL,CAAC,UAAU,CACT,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAC5B,UAAU,CAAC,CAAC,CAAC,EAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,CAAC,CAAC,CAC5D,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACnB;MAAA,CAAC,yBAAyB,CAAC,IAAI,IAAI,CAAC,EACtC;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as ActionRadioSelect } from './ActionRadioSelect/ActionRadioSelect';
|
|
2
|
+
export { default as ActionTypePicker } from './ActionTypePicker/ActionTypePicker';
|
|
3
|
+
export { default as EquipementMaintenanceActionCard } from './EquipementMaintenanceActionCard/EquipementMaintenanceActionCard';
|