Skip to content

Commit

Permalink
feat: clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
gca-axelor committed Dec 17, 2024
1 parent 1aca1c8 commit 8565142
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,8 @@

import React from 'react';
import {StyleSheet, View} from 'react-native';
import {
useDispatch,
useNavigation,
useSelector,
useTranslator,
} from '@axelor/aos-mobile-core';
import {useNavigation, useTranslator} from '@axelor/aos-mobile-core';
import {Button, useThemeColor} from '@axelor/aos-mobile-ui';
//import {createInternalMove} from '../../../../features/internalMoveSlice';
import {RequestCreation} from '../../../types';

interface RequestCreationButtonProps {
Expand All @@ -48,9 +42,6 @@ const RequestCreationButton = ({
const Colors = useThemeColor();
const I18n = useTranslator();
const navigation = useNavigation();
const dispatch = useDispatch();

const {user} = useSelector((state: any) => state.user);

const handleFinishPress = () => {
if (step === RequestCreation.step.validateLine) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@

import React from 'react';
import {useTranslator} from '@axelor/aos-mobile-core';
import {
checkNullString,
QuantityCard,
Text,
useDigitFormat,
} from '@axelor/aos-mobile-ui';
import {checkNullString, QuantityCard, Text} from '@axelor/aos-mobile-ui';

interface RequestCreationQuantityCardProps {
movedQty: number;
Expand All @@ -41,15 +36,12 @@ const RequestCreationQuantityCard = ({
cancelMove,
productName,
trackingNumber,
availableQty,
productUnit,
}: RequestCreationQuantityCardProps) => {
const I18n = useTranslator();
const formatNumber = useDigitFormat();

return (
<QuantityCard
labelQty={I18n.t('Resquest_Quantity')}
labelQty={I18n.t('Purchase_Quantity')}
defaultValue={movedQty}
onValueChange={setMovedQty}
editable={true}
Expand Down
4 changes: 3 additions & 1 deletion packages/apps/purchase/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"Purchase_CreateRequest": "Create request",
"Purchase_Company": "Company",
"Purchase_Or": "Or",
"Purchase_Unit": "Uµnit",
"Purchase_Unit": "Unit",
"Purchase_Quantity": "Quantity",
"Purchase_ProductTitle": "Product title",
"Purchase_SliceAction_SearchPurchaseRequest": "search purchase request",
"Purchase_SliceAction_SearchSupplier": "search supplier",
"Purchase_SliceAction_SearchProduct": "search product",
Expand Down
2 changes: 2 additions & 0 deletions packages/apps/purchase/src/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"Purchase_Company": "Société",
"Purchase_Or": "Ou",
"Purchase_Unit": "Unité",
"Purchase_Quantity": "Quantité",
"Purchase_ProductTitle": "Nom du produit",
"Purchase_SliceAction_SearchPurchaseRequest": "recherche sur les demandes d'achat",
"Purchase_SliceAction_SearchSupplier": "recherche sur les fournisseurs",
"Purchase_SliceAction_SearchProduct": "recherche sur les produits",
Expand Down
3 changes: 0 additions & 3 deletions packages/apps/purchase/src/screens/RequestCreationScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ const RequestCreationScreen = () => {
[lines, newLine],
);

console.log(unit);

return (
<Screen
removeSpaceOnTop
Expand Down Expand Up @@ -194,7 +192,6 @@ const RequestCreationScreen = () => {
const styles = StyleSheet.create({
container: {
alignItems: 'center',
//height: '100%',
},
rule: {
marginVertical: 15,
Expand Down

0 comments on commit 8565142

Please sign in to comment.