@axelor/aos-mobile-hr 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -0
- package/lib/api/currency-api.d.ts +4 -0
- package/lib/api/currency-api.js +32 -0
- package/lib/api/currency-api.js.map +1 -0
- package/lib/api/distance-api.d.ts +4 -0
- package/lib/api/distance-api.js +40 -0
- package/lib/api/distance-api.js.map +1 -0
- package/lib/api/expense-api.d.ts +37 -0
- package/lib/api/expense-api.js +136 -0
- package/lib/api/expense-api.js.map +1 -0
- package/lib/api/expense-config-api.d.ts +1 -0
- package/lib/api/expense-config-api.js +23 -0
- package/lib/api/expense-config-api.js.map +1 -0
- package/lib/api/expense-line-api.d.ts +24 -0
- package/lib/api/expense-line-api.js +111 -0
- package/lib/api/expense-line-api.js.map +1 -0
- package/lib/api/expense-type-api.d.ts +5 -0
- package/lib/api/expense-type-api.js +56 -0
- package/lib/api/expense-type-api.js.map +1 -0
- package/lib/api/index.d.ts +6 -0
- package/lib/api/index.js +24 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/kilometric-allow-param-api.d.ts +5 -0
- package/lib/api/kilometric-allow-param-api.js +44 -0
- package/lib/api/kilometric-allow-param-api.js.map +1 -0
- package/lib/api/project-api.d.ts +5 -0
- package/lib/api/project-api.js +39 -0
- package/lib/api/project-api.js.map +1 -0
- package/lib/components/atoms/ExpenseCard/ExpenseCard.d.ts +15 -0
- package/lib/components/atoms/ExpenseCard/ExpenseCard.js +130 -0
- package/lib/components/atoms/ExpenseCard/ExpenseCard.js.map +1 -0
- package/lib/components/atoms/ExpenseLineCard/ExpenseLineCard.d.ts +12 -0
- package/lib/components/atoms/ExpenseLineCard/ExpenseLineCard.js +106 -0
- package/lib/components/atoms/ExpenseLineCard/ExpenseLineCard.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/ExpenseAddPopup/ExpenseAddPopup.d.ts +7 -0
- package/lib/components/molecules/ExpenseAddPopup/ExpenseAddPopup.js +78 -0
- package/lib/components/molecules/ExpenseAddPopup/ExpenseAddPopup.js.map +1 -0
- package/lib/components/molecules/ExpenseDetailsValidationButton/ExpenseDetailsValidationButton.d.ts +5 -0
- package/lib/components/molecules/ExpenseDetailsValidationButton/ExpenseDetailsValidationButton.js +76 -0
- package/lib/components/molecules/ExpenseDetailsValidationButton/ExpenseDetailsValidationButton.js.map +1 -0
- package/lib/components/molecules/ExpenseLineDetailCard/ExpenseLineDetailCard.d.ts +11 -0
- package/lib/components/molecules/ExpenseLineDetailCard/ExpenseLineDetailCard.js +131 -0
- package/lib/components/molecules/ExpenseLineDetailCard/ExpenseLineDetailCard.js.map +1 -0
- package/lib/components/molecules/ExpenseLineValidationButton/ExpenseLineValidationButton.d.ts +6 -0
- package/lib/components/molecules/ExpenseLineValidationButton/ExpenseLineValidationButton.js +37 -0
- package/lib/components/molecules/ExpenseLineValidationButton/ExpenseLineValidationButton.js.map +1 -0
- package/lib/components/molecules/ExpenseRefusalPopup/ExpenseRefusalPopup.d.ts +9 -0
- package/lib/components/molecules/ExpenseRefusalPopup/ExpenseRefusalPopup.js +39 -0
- package/lib/components/molecules/ExpenseRefusalPopup/ExpenseRefusalPopup.js.map +1 -0
- package/lib/components/molecules/index.d.ts +5 -0
- package/lib/components/molecules/index.js +23 -0
- package/lib/components/molecules/index.js.map +1 -0
- package/lib/components/templates/BillableSwitchCard/BillableSwitchCard.d.ts +7 -0
- package/lib/components/templates/BillableSwitchCard/BillableSwitchCard.js +26 -0
- package/lib/components/templates/BillableSwitchCard/BillableSwitchCard.js.map +1 -0
- package/lib/components/templates/CityFormInput/CityFormInput.d.ts +9 -0
- package/lib/components/templates/CityFormInput/CityFormInput.js +76 -0
- package/lib/components/templates/CityFormInput/CityFormInput.js.map +1 -0
- package/lib/components/templates/CurrencySearchBar/CurrencySearchBar.d.ts +9 -0
- package/lib/components/templates/CurrencySearchBar/CurrencySearchBar.js +38 -0
- package/lib/components/templates/CurrencySearchBar/CurrencySearchBar.js.map +1 -0
- package/lib/components/templates/DistanceIncrement/DistanceIncrement.d.ts +9 -0
- package/lib/components/templates/DistanceIncrement/DistanceIncrement.js +46 -0
- package/lib/components/templates/DistanceIncrement/DistanceIncrement.js.map +1 -0
- package/lib/components/templates/ExpenseHeader/ExpenseHeader.d.ts +2 -0
- package/lib/components/templates/ExpenseHeader/ExpenseHeader.js +52 -0
- package/lib/components/templates/ExpenseHeader/ExpenseHeader.js.map +1 -0
- package/lib/components/templates/ExpenseLineTypeSwitch/ExpenseLineTypeSwitch.d.ts +4 -0
- package/lib/components/templates/ExpenseLineTypeSwitch/ExpenseLineTypeSwitch.js +63 -0
- package/lib/components/templates/ExpenseLineTypeSwitch/ExpenseLineTypeSwitch.js.map +1 -0
- package/lib/components/templates/ExpenseTypeSearchBar/ExpenseTypeSearchBar.d.ts +5 -0
- package/lib/components/templates/ExpenseTypeSearchBar/ExpenseTypeSearchBar.js +40 -0
- package/lib/components/templates/ExpenseTypeSearchBar/ExpenseTypeSearchBar.js.map +1 -0
- package/lib/components/templates/ExpenseWaitingValidationSearchBar/ExpenseWaitingValidationSearchBar.d.ts +12 -0
- package/lib/components/templates/ExpenseWaitingValidationSearchBar/ExpenseWaitingValidationSearchBar.js +33 -0
- package/lib/components/templates/ExpenseWaitingValidationSearchBar/ExpenseWaitingValidationSearchBar.js.map +1 -0
- package/lib/components/templates/KilometricAllowParamSearchBar/KilometricAllowParamSearchBar.d.ts +9 -0
- package/lib/components/templates/KilometricAllowParamSearchBar/KilometricAllowParamSearchBar.js +81 -0
- package/lib/components/templates/KilometricAllowParamSearchBar/KilometricAllowParamSearchBar.js.map +1 -0
- package/lib/components/templates/KilometricTypeSelectPicker/KilometricTypeSelectPicker.d.ts +8 -0
- package/lib/components/templates/KilometricTypeSelectPicker/KilometricTypeSelectPicker.js +37 -0
- package/lib/components/templates/KilometricTypeSelectPicker/KilometricTypeSelectPicker.js.map +1 -0
- package/lib/components/templates/ProjectSearchBar/ProjectSearchBar.d.ts +9 -0
- package/lib/components/templates/ProjectSearchBar/ProjectSearchBar.js +38 -0
- package/lib/components/templates/ProjectSearchBar/ProjectSearchBar.js.map +1 -0
- package/lib/components/templates/ToggleSwitchMode/ToggleSwitchMode.d.ts +6 -0
- package/lib/components/templates/ToggleSwitchMode/ToggleSwitchMode.js +34 -0
- package/lib/components/templates/ToggleSwitchMode/ToggleSwitchMode.js.map +1 -0
- package/lib/components/templates/index.d.ts +12 -0
- package/lib/components/templates/index.js +30 -0
- package/lib/components/templates/index.js.map +1 -0
- package/lib/features/asyncFunctions-index.d.ts +6 -0
- package/lib/features/asyncFunctions-index.js +24 -0
- package/lib/features/asyncFunctions-index.js.map +1 -0
- package/lib/features/currencySlice.d.ts +16 -0
- package/lib/features/currencySlice.js +49 -0
- package/lib/features/currencySlice.js.map +1 -0
- package/lib/features/distanceSlice.d.ts +22 -0
- package/lib/features/distanceSlice.js +76 -0
- package/lib/features/distanceSlice.js.map +1 -0
- package/lib/features/expenseConfigSlice.d.ts +14 -0
- package/lib/features/expenseConfigSlice.js +48 -0
- package/lib/features/expenseConfigSlice.js.map +1 -0
- package/lib/features/expenseLineSlice.d.ts +76 -0
- package/lib/features/expenseLineSlice.js +180 -0
- package/lib/features/expenseLineSlice.js.map +1 -0
- package/lib/features/expenseSlice.d.ts +105 -0
- package/lib/features/expenseSlice.js +314 -0
- package/lib/features/expenseSlice.js.map +1 -0
- package/lib/features/expenseTypeSlice.d.ts +16 -0
- package/lib/features/expenseTypeSlice.js +49 -0
- package/lib/features/expenseTypeSlice.js.map +1 -0
- package/lib/features/index.d.ts +8 -0
- package/lib/features/index.js +26 -0
- package/lib/features/index.js.map +1 -0
- package/lib/features/kilometricAllowParamSlice.d.ts +18 -0
- package/lib/features/kilometricAllowParamSlice.js +56 -0
- package/lib/features/kilometricAllowParamSlice.js.map +1 -0
- package/lib/features/projectSlice.d.ts +16 -0
- package/lib/features/projectSlice.js +49 -0
- package/lib/features/projectSlice.js.map +1 -0
- package/lib/hooks/use-hr-header-actions.d.ts +1 -0
- package/lib/hooks/use-hr-header-actions.js +53 -0
- package/lib/hooks/use-hr-header-actions.js.map +1 -0
- package/lib/i18n/en.json +68 -0
- package/lib/i18n/fr.json +68 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +66 -0
- package/lib/index.js.map +1 -0
- package/lib/models/forms.d.ts +2 -0
- package/lib/models/forms.js +183 -0
- package/lib/models/forms.js.map +1 -0
- package/lib/models/index.d.ts +4 -0
- package/lib/models/index.js +22 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/objectFields.d.ts +2 -0
- package/lib/models/objectFields.js +87 -0
- package/lib/models/objectFields.js.map +1 -0
- package/lib/models/searchFields.d.ts +2 -0
- package/lib/models/searchFields.js +26 -0
- package/lib/models/searchFields.js.map +1 -0
- package/lib/models/sortFields.d.ts +2 -0
- package/lib/models/sortFields.js +26 -0
- package/lib/models/sortFields.js.map +1 -0
- package/lib/screens/ExpenseDetailsScreen.d.ts +5 -0
- package/lib/screens/ExpenseDetailsScreen.js +85 -0
- package/lib/screens/ExpenseDetailsScreen.js.map +1 -0
- package/lib/screens/ExpenseLineFormScreen.d.ts +5 -0
- package/lib/screens/ExpenseLineFormScreen.js +202 -0
- package/lib/screens/ExpenseLineFormScreen.js.map +1 -0
- package/lib/screens/ExpenseLinesListScreen.d.ts +4 -0
- package/lib/screens/ExpenseLinesListScreen.js +91 -0
- package/lib/screens/ExpenseLinesListScreen.js.map +1 -0
- package/lib/screens/ExpenseListScreen.d.ts +4 -0
- package/lib/screens/ExpenseListScreen.js +138 -0
- package/lib/screens/ExpenseListScreen.js.map +1 -0
- package/lib/screens/index.d.ts +38 -0
- package/lib/screens/index.js +52 -0
- package/lib/screens/index.js.map +1 -0
- package/lib/types/expense.d.ts +27 -0
- package/lib/types/expense.js +80 -0
- package/lib/types/expense.js.map +1 -0
- package/lib/types/expenseLine.d.ts +21 -0
- package/lib/types/expenseLine.js +57 -0
- package/lib/types/expenseLine.js.map +1 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +20 -0
- package/lib/types/index.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 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 createProjectCriteria = (searchValue, activeCompanyId) => {
|
|
20
|
+
const criteria = [getSearchCriterias('hr_project', searchValue)];
|
|
21
|
+
if (activeCompanyId != null) {
|
|
22
|
+
criteria.push({
|
|
23
|
+
fieldName: 'company.id',
|
|
24
|
+
operator: '=',
|
|
25
|
+
value: activeCompanyId,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return criteria;
|
|
29
|
+
};
|
|
30
|
+
export async function searchProject({ searchValue, page = 0, activeCompanyId }) {
|
|
31
|
+
return createStandardSearch({
|
|
32
|
+
model: 'com.axelor.apps.project.db.Project',
|
|
33
|
+
criteria: createProjectCriteria(searchValue, activeCompanyId),
|
|
34
|
+
fieldKey: 'hr_project',
|
|
35
|
+
sortKey: 'hr_project',
|
|
36
|
+
page,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=project-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-api.js","sourceRoot":"","sources":["../../src/api/project-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,qBAAqB,GAAG,CAAC,WAAW,EAAE,eAAe,EAAE,EAAE;IAC7D,MAAM,QAAQ,GAAG,CAAC,kBAAkB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC;IAEjE,IAAI,eAAe,IAAI,IAAI,EAAE;QAC3B,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,YAAY;YACvB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,eAAe;SACvB,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,EAAC,WAAW,EAAE,IAAI,GAAG,CAAC,EAAE,eAAe,EAAC;IAC1E,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,oCAAoC;QAC3C,QAAQ,EAAE,qBAAqB,CAAC,WAAW,EAAE,eAAe,CAAC;QAC7D,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,YAAY;QACrB,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface ExpenseCardProps {
|
|
2
|
+
style?: any;
|
|
3
|
+
statusSelect: number;
|
|
4
|
+
expenseId: number;
|
|
5
|
+
expenseSeq: string;
|
|
6
|
+
onPress: () => void;
|
|
7
|
+
onValidate: () => void;
|
|
8
|
+
onSend: () => void;
|
|
9
|
+
periodeCode?: string;
|
|
10
|
+
inTaxTotal?: string;
|
|
11
|
+
employeeManagerId?: number;
|
|
12
|
+
employeeName?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const ExpenseCard: ({ style, onPress, onValidate, onSend, statusSelect, expenseId, expenseSeq, periodeCode, inTaxTotal, employeeManagerId, employeeName, }: ExpenseCardProps) => JSX.Element;
|
|
15
|
+
export default ExpenseCard;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 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, View } from 'react-native';
|
|
20
|
+
import { Text, useThemeColor, checkNullString, CardIconButton, ObjectCard, } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { AnomalyBubble, useTranslator, useSelector, } from '@axelor/aos-mobile-core';
|
|
22
|
+
import { Expense } from '../../../types';
|
|
23
|
+
const ExpenseCard = ({ style, onPress, onValidate = () => { }, onSend = () => { }, statusSelect, expenseId, expenseSeq, periodeCode, inTaxTotal, employeeManagerId, employeeName, }) => {
|
|
24
|
+
const Colors = useThemeColor();
|
|
25
|
+
const I18n = useTranslator();
|
|
26
|
+
const { user } = useSelector((state) => state.user);
|
|
27
|
+
const userCanValidate = useMemo(() => {
|
|
28
|
+
if ((user?.employee?.hrManager || employeeManagerId === user.id) &&
|
|
29
|
+
statusSelect === Expense.statusSelect.WaitingValidation) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}, [employeeManagerId, statusSelect, user?.employee?.hrManager, user.id]);
|
|
34
|
+
const isDefaultDisplay = useMemo(() => {
|
|
35
|
+
if ((statusSelect === Expense.statusSelect.WaitingValidation &&
|
|
36
|
+
userCanValidate) ||
|
|
37
|
+
statusSelect === Expense.statusSelect.Draft) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
41
|
+
}, [userCanValidate, statusSelect]);
|
|
42
|
+
const borderStyle = useMemo(() => {
|
|
43
|
+
return getBorderStyle(Expense.getStatusColor(statusSelect, Colors)).border;
|
|
44
|
+
}, [Colors, statusSelect]);
|
|
45
|
+
return (<View style={[styles.container, style]}>
|
|
46
|
+
<View style={styles.containerCard}>
|
|
47
|
+
<ObjectCard onPress={onPress} style={borderStyle} leftContainerFlex={2} iconLeftMargin={10} upperTexts={{
|
|
48
|
+
items: [
|
|
49
|
+
{
|
|
50
|
+
customComponent: (<View style={styles.titleContainer}>
|
|
51
|
+
<AnomalyBubble objectName="expense" objectId={expenseId} isIndicationDisabled/>
|
|
52
|
+
<Text writingType="title" style={styles.titleText}>
|
|
53
|
+
{expenseSeq}
|
|
54
|
+
</Text>
|
|
55
|
+
</View>),
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
displayText: `${I18n.t('Hr_Period')} : ${periodeCode}`,
|
|
59
|
+
hideIf: checkNullString(periodeCode),
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
iconName: 'user',
|
|
63
|
+
indicatorText: employeeName,
|
|
64
|
+
hideIfNull: true,
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
}} sideBadges={{
|
|
68
|
+
items: [
|
|
69
|
+
{
|
|
70
|
+
customComponent: !checkNullString(inTaxTotal) && (<Text style={styles.price}>{`${inTaxTotal} ${user?.activeCompany?.currency?.symbol != null
|
|
71
|
+
? user?.activeCompany?.currency?.symbol
|
|
72
|
+
: user?.activeCompany?.currency?.code}`}</Text>),
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
}}/>
|
|
76
|
+
</View>
|
|
77
|
+
{!isDefaultDisplay && (<View style={styles.iconContainer}>
|
|
78
|
+
<CardIconButton iconName={statusSelect === Expense.statusSelect.Draft
|
|
79
|
+
? 'paper-plane'
|
|
80
|
+
: 'check'} iconColor={Colors.primaryColor.foreground} onPress={() => {
|
|
81
|
+
statusSelect === Expense.statusSelect.Draft
|
|
82
|
+
? onSend()
|
|
83
|
+
: onValidate();
|
|
84
|
+
}} style={styles.cardIconButton}/>
|
|
85
|
+
</View>)}
|
|
86
|
+
</View>);
|
|
87
|
+
};
|
|
88
|
+
const getBorderStyle = Colors => StyleSheet.create({
|
|
89
|
+
border: {
|
|
90
|
+
borderLeftWidth: 7,
|
|
91
|
+
borderLeftColor: Colors.background,
|
|
92
|
+
marginHorizontal: 0,
|
|
93
|
+
marginVertical: 0,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
const styles = StyleSheet.create({
|
|
97
|
+
container: {
|
|
98
|
+
display: 'flex',
|
|
99
|
+
flexDirection: 'row',
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
flex: 1,
|
|
102
|
+
width: '92%',
|
|
103
|
+
marginHorizontal: 14,
|
|
104
|
+
justifyContent: 'space-evenly',
|
|
105
|
+
alignSelf: 'center',
|
|
106
|
+
},
|
|
107
|
+
containerCard: {
|
|
108
|
+
flex: 6,
|
|
109
|
+
},
|
|
110
|
+
cardIconButton: {
|
|
111
|
+
flex: 1,
|
|
112
|
+
margin: 0,
|
|
113
|
+
marginLeft: 5,
|
|
114
|
+
},
|
|
115
|
+
iconContainer: {
|
|
116
|
+
flex: 1,
|
|
117
|
+
},
|
|
118
|
+
titleContainer: {
|
|
119
|
+
flexDirection: 'row',
|
|
120
|
+
},
|
|
121
|
+
titleText: {
|
|
122
|
+
alignSelf: 'center',
|
|
123
|
+
marginLeft: 5,
|
|
124
|
+
},
|
|
125
|
+
price: {
|
|
126
|
+
textAlign: 'right',
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
export default ExpenseCard;
|
|
130
|
+
//# sourceMappingURL=ExpenseCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpenseCard.js","sourceRoot":"","sources":["../../../../src/components/atoms/ExpenseCard/ExpenseCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,IAAI,EACJ,aAAa,EACb,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,GACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAgBvC,MAAM,WAAW,GAAG,CAAC,EACnB,KAAK,EACL,OAAO,EACP,UAAU,GAAG,GAAG,EAAE,GAAE,CAAC,EACrB,MAAM,GAAG,GAAG,EAAE,GAAE,CAAC,EACjB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,YAAY,GACK,EAAE,EAAE;IACrB,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,MAAM,EAAC,IAAI,EAAC,GAAG,WAAW,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEvD,MAAM,eAAe,GAAG,OAAO,CAAC,GA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,CAAC;KACd;IACD,KAAK,EAAE;QACL,SAAS,EAAE,OAAO;KACnB;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface ExpenseLineCardProps {
|
|
2
|
+
expenseId: number;
|
|
3
|
+
expenseDate?: string;
|
|
4
|
+
projectName?: string;
|
|
5
|
+
totalAmount?: string;
|
|
6
|
+
currency?: string;
|
|
7
|
+
displayText?: string;
|
|
8
|
+
onLongPress: () => void;
|
|
9
|
+
setCardHeight: (height: any) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const ExpenseLineCard: ({ expenseId, expenseDate, projectName, totalAmount, currency, displayText, onLongPress, setCardHeight, }: ExpenseLineCardProps) => JSX.Element;
|
|
12
|
+
export default ExpenseLineCard;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 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 { Dimensions, StyleSheet, TouchableOpacity } from 'react-native';
|
|
20
|
+
import { Text, useThemeColor, ObjectCard } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { AnomalyBubble, getFullDateItems, useSelector, useTranslator, } from '@axelor/aos-mobile-core';
|
|
22
|
+
const ExpenseLineCard = ({ expenseId, expenseDate, projectName, totalAmount, currency, displayText, onLongPress, setCardHeight, }) => {
|
|
23
|
+
const I18n = useTranslator();
|
|
24
|
+
const Colors = useThemeColor();
|
|
25
|
+
const { user } = useSelector((state) => state.user);
|
|
26
|
+
const styles = useMemo(() => getStyles(Colors), [Colors]);
|
|
27
|
+
const _date = useMemo(() => getFullDateItems(expenseDate, I18n), [I18n, expenseDate]);
|
|
28
|
+
return (<TouchableOpacity onLongPress={onLongPress} delayLongPress={200} activeOpacity={1} onLayout={event => {
|
|
29
|
+
const { height } = event.nativeEvent.layout;
|
|
30
|
+
setCardHeight(_current => (_current == null ? height : _current));
|
|
31
|
+
}}>
|
|
32
|
+
<ObjectCard touchable={false} showArrow={false} style={styles.border} leftContainerFlex={2} upperTexts={{
|
|
33
|
+
style: styles.text,
|
|
34
|
+
items: [
|
|
35
|
+
{
|
|
36
|
+
displayText: displayText,
|
|
37
|
+
isTitle: true,
|
|
38
|
+
numberOfLines: 2,
|
|
39
|
+
style: styles.title,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
indicatorText: _date.day,
|
|
43
|
+
displayText: `${_date.date} ${_date.month}`,
|
|
44
|
+
iconName: 'calendar-alt',
|
|
45
|
+
hideIfNull: true,
|
|
46
|
+
style: styles.details,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
indicatorText: projectName,
|
|
50
|
+
hideIfNull: true,
|
|
51
|
+
style: [styles.details, styles.italic],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
}} sideBadges={{
|
|
55
|
+
items: [
|
|
56
|
+
{
|
|
57
|
+
customComponent: (<Text fontSize={22} style={styles.amountText} textColor={Colors.primaryColor.background}>{`${totalAmount} ${currency != null
|
|
58
|
+
? currency
|
|
59
|
+
: user.activeCompany?.currency?.symbol ||
|
|
60
|
+
user.activeCompany?.currency.name}`}</Text>),
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
customComponent: (<AnomalyBubble objectName="expense-line" objectId={expenseId} indicatorPosition="left" style={styles.anoBubble} textIndicationStyle={styles.anoBubbleText}/>),
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
}}/>
|
|
67
|
+
</TouchableOpacity>);
|
|
68
|
+
};
|
|
69
|
+
const getStyles = Colors => StyleSheet.create({
|
|
70
|
+
title: {
|
|
71
|
+
marginBottom: 5,
|
|
72
|
+
},
|
|
73
|
+
amountText: {
|
|
74
|
+
alignSelf: 'flex-end',
|
|
75
|
+
fontWeight: '900',
|
|
76
|
+
},
|
|
77
|
+
italic: {
|
|
78
|
+
fontStyle: 'italic',
|
|
79
|
+
marginTop: 2,
|
|
80
|
+
},
|
|
81
|
+
details: {
|
|
82
|
+
fontSize: 16,
|
|
83
|
+
},
|
|
84
|
+
text: {
|
|
85
|
+
justifyContent: 'center',
|
|
86
|
+
minHeight: 100,
|
|
87
|
+
},
|
|
88
|
+
border: {
|
|
89
|
+
borderLeftWidth: 7,
|
|
90
|
+
borderLeftColor: Colors.secondaryColor.background,
|
|
91
|
+
marginHorizontal: 0,
|
|
92
|
+
marginVertical: 0,
|
|
93
|
+
paddingRight: 5,
|
|
94
|
+
},
|
|
95
|
+
anoBubble: {
|
|
96
|
+
position: 'absolute',
|
|
97
|
+
right: 0,
|
|
98
|
+
bottom: 0,
|
|
99
|
+
},
|
|
100
|
+
anoBubbleText: {
|
|
101
|
+
width: Dimensions.get('window').width * 0.7,
|
|
102
|
+
bottom: 0,
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
export default ExpenseLineCard;
|
|
106
|
+
//# sourceMappingURL=ExpenseLineCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpenseLineCard.js","sourceRoot":"","sources":["../../../../src/components/atoms/ExpenseLineCard/ExpenseLineCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAA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copyright (C) 2023 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 ExpenseCard } from './ExpenseCard/ExpenseCard';
|
|
19
|
+
export { default as ExpenseLineCard } from './ExpenseLineCard/ExpenseLineCard';
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/atoms/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 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 './templates';
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 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, useState } from 'react';
|
|
19
|
+
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
20
|
+
import { Alert, useThemeColor, LabelText, Picker } from '@axelor/aos-mobile-ui';
|
|
21
|
+
import { useTranslator, useSelector, useDispatch, useNavigation, } from '@axelor/aos-mobile-core';
|
|
22
|
+
import { createExpense, searchExpenseDraft, updateExpense, } from '../../../features/expenseSlice';
|
|
23
|
+
const ExpenseAddPopup = ({ style, visible, onClose, selectedItems }) => {
|
|
24
|
+
const I18n = useTranslator();
|
|
25
|
+
const Colors = useThemeColor();
|
|
26
|
+
const dispatch = useDispatch();
|
|
27
|
+
const navigation = useNavigation();
|
|
28
|
+
const { expenseDraftList } = useSelector(state => state.expense);
|
|
29
|
+
const { user } = useSelector(state => state.user);
|
|
30
|
+
const [expenseSelected, setExpenseSelected] = useState(null);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
dispatch(searchExpenseDraft({ userId: user?.id }));
|
|
33
|
+
}, [dispatch, user?.id]);
|
|
34
|
+
const createExpenseAPI = useCallback(() => {
|
|
35
|
+
const _expense = {
|
|
36
|
+
expenseLineIdList: selectedItems,
|
|
37
|
+
employeeId: user?.employee?.id,
|
|
38
|
+
companyId: user?.activeCompany?.id,
|
|
39
|
+
currencyId: user?.activeCompany?.currency?.id,
|
|
40
|
+
};
|
|
41
|
+
dispatch(createExpense({ expense: _expense, userId: user.id }));
|
|
42
|
+
onClose();
|
|
43
|
+
navigation.navigate('ExpenseListScreen');
|
|
44
|
+
}, [dispatch, onClose, navigation, selectedItems, user]);
|
|
45
|
+
const updateExpenseAPI = useCallback(() => {
|
|
46
|
+
dispatch(updateExpense({
|
|
47
|
+
expenseId: expenseSelected.id,
|
|
48
|
+
version: expenseSelected.version,
|
|
49
|
+
userId: user.id,
|
|
50
|
+
expenseLineIdList: selectedItems,
|
|
51
|
+
}));
|
|
52
|
+
navigation.navigate('ExpenseListScreen');
|
|
53
|
+
onClose();
|
|
54
|
+
}, [dispatch, onClose, expenseSelected, navigation, selectedItems, user.id]);
|
|
55
|
+
return (<Alert style={style} visible={visible} cancelButtonConfig={{ onPress: onClose }} confirmButtonConfig={{
|
|
56
|
+
title: I18n.t('Base_Add'),
|
|
57
|
+
onPress: updateExpenseAPI,
|
|
58
|
+
disabled: expenseSelected == null,
|
|
59
|
+
}} translator={I18n.t}>
|
|
60
|
+
<View style={styles.container}>
|
|
61
|
+
<Picker listItems={expenseDraftList} onValueChange={setExpenseSelected} labelField="expenseSeq" valueField="id" title={I18n.t('Hr_Expense')} isValueItem={true}/>
|
|
62
|
+
<TouchableOpacity onPress={createExpenseAPI} style={styles.labelText}>
|
|
63
|
+
<LabelText iconName="plus" color={Colors.primaryColor.background} title={I18n.t('Hr_NewExpense')} size={16}/>
|
|
64
|
+
</TouchableOpacity>
|
|
65
|
+
</View>
|
|
66
|
+
</Alert>);
|
|
67
|
+
};
|
|
68
|
+
const styles = StyleSheet.create({
|
|
69
|
+
container: {
|
|
70
|
+
flexDirection: 'column',
|
|
71
|
+
width: '100%',
|
|
72
|
+
},
|
|
73
|
+
labelText: {
|
|
74
|
+
marginVertical: 5,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
export default ExpenseAddPopup;
|
|
78
|
+
//# sourceMappingURL=ExpenseAddPopup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpenseAddPopup.js","sourceRoot":"","sources":["../../../../src/components/molecules/ExpenseAddPopup/ExpenseAddPopup.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,EAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAC,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,aAAa,EACb,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,aAAa,GACd,MAAM,gCAAgC,CAAC;AAExC,MAAM,eAAe,GAAG,CAAC,EAAC,KAAK,EAAE,OAAO,EAAE,O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AAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CACnE;UAAA,CAAC,SAAS,CACR,QAAQ,CAAC,MAAM,CACf,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,CACtC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAC/B,IAAI,CAAC,CAAC,EAAE,CAAC,EAEb;QAAA,EAAE,gBAAgB,CACpB;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,aAAa,EAAE,QAAQ;QACvB,KAAK,EAAE,MAAM;KACd;IACD,SAAS,EAAE;QACT,cAAc,EAAE,CAAC;KAClB;CACF,CAAC,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
package/lib/components/molecules/ExpenseDetailsValidationButton/ExpenseDetailsValidationButton.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2023 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, useState } from 'react';
|
|
19
|
+
import { View } from 'react-native';
|
|
20
|
+
import { useTranslator, useSelector, useDispatch } from '@axelor/aos-mobile-core';
|
|
21
|
+
import { Button, useThemeColor } from '@axelor/aos-mobile-ui';
|
|
22
|
+
import { Expense } from '../../../types';
|
|
23
|
+
import { sendExpense, validateExpense } from '../../../features/expenseSlice';
|
|
24
|
+
import ExpenseRefusalPopup from '../ExpenseRefusalPopup/ExpenseRefusalPopup';
|
|
25
|
+
import { StyleSheet } from 'react-native';
|
|
26
|
+
const ExpenseDetailsValidationButton = ({ expense, mode }) => {
|
|
27
|
+
const I18n = useTranslator();
|
|
28
|
+
const dispatch = useDispatch();
|
|
29
|
+
const Colors = useThemeColor();
|
|
30
|
+
const { user } = useSelector(state => state.user);
|
|
31
|
+
const [refusalPopupIsOpen, setRefusalPopupIsOpen] = useState(false);
|
|
32
|
+
const [refusalMessage, setRefusalMessage] = useState('');
|
|
33
|
+
const sendExpenseAPI = useCallback(() => {
|
|
34
|
+
dispatch(sendExpense({
|
|
35
|
+
expenseId: expense.id,
|
|
36
|
+
version: expense.version,
|
|
37
|
+
onExpense: true,
|
|
38
|
+
}));
|
|
39
|
+
}, [dispatch, expense]);
|
|
40
|
+
const validateExpenseAPI = useCallback(() => {
|
|
41
|
+
dispatch(validateExpense({
|
|
42
|
+
expenseId: expense.id,
|
|
43
|
+
version: expense.version,
|
|
44
|
+
onExpense: true,
|
|
45
|
+
mode: mode,
|
|
46
|
+
}));
|
|
47
|
+
}, [dispatch, mode, expense]);
|
|
48
|
+
if (expense.statusSelect === Expense.statusSelect.Draft) {
|
|
49
|
+
return <Button title={I18n.t('Hr_Send')} onPress={sendExpenseAPI}/>;
|
|
50
|
+
}
|
|
51
|
+
if ((user?.employee?.hrManager ||
|
|
52
|
+
expense.employee?.managerUser?.id === user.id) &&
|
|
53
|
+
expense.statusSelect === Expense.statusSelect.WaitingValidation) {
|
|
54
|
+
return (<>
|
|
55
|
+
<View style={styles.buttonContainer}>
|
|
56
|
+
<Button title={I18n.t('Hr_Refuse')} onPress={() => {
|
|
57
|
+
setRefusalPopupIsOpen(true);
|
|
58
|
+
}} color={Colors.errorColor} width="45%" iconName="times"/>
|
|
59
|
+
<Button title={I18n.t('Hr_Validate')} onPress={validateExpenseAPI} width="45%" iconName="check"/>
|
|
60
|
+
</View>
|
|
61
|
+
<ExpenseRefusalPopup expense={expense} mode={mode} refusalMessage={refusalMessage} refusalPopupIsOpen={refusalPopupIsOpen} setRefusalMessage={setRefusalMessage} onClose={() => {
|
|
62
|
+
setRefusalMessage('');
|
|
63
|
+
setRefusalPopupIsOpen(false);
|
|
64
|
+
}}/>
|
|
65
|
+
</>);
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
};
|
|
69
|
+
const styles = StyleSheet.create({
|
|
70
|
+
buttonContainer: {
|
|
71
|
+
flexDirection: 'row',
|
|
72
|
+
justifyContent: 'space-evenly',
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
export default ExpenseDetailsValidationButton;
|
|
76
|
+
//# sourceMappingURL=ExpenseDetailsValidationButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpenseDetailsValidationButton.js","sourceRoot":"","sources":["../../../../src/components/molecules/ExpenseDetailsValidationButton/ExpenseDetailsValidationButton.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACnD,OAAO,EAAC,IAAI,EAAC,MAAM,cAAc,CAAC;AAElC,OAAO,EAAC,aAAa,EAAE,WAAW,EAAE,WAAW,EAAC,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,WAAW,EAAE,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAC5E,OAAO,mBAAmB,MAAM,4CA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AAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,eAAe,EAAE;QACf,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,cAAc;KAC/B;CACF,CAAC,CAAC;AAEH,eAAe,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const ExpenseLineDetailCard: ({ style, item, expense, onEdit, onLongPress, onItemSelection, isSelectionMode, isSelected, }: {
|
|
2
|
+
style: any;
|
|
3
|
+
item: any;
|
|
4
|
+
expense: any;
|
|
5
|
+
onEdit: any;
|
|
6
|
+
onLongPress: any;
|
|
7
|
+
onItemSelection: any;
|
|
8
|
+
isSelectionMode: any;
|
|
9
|
+
isSelected: any;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export default ExpenseLineDetailCard;
|