Skip to content

Commit

Permalink
Merge pull request #778 from stasgm/gd-movement-fix
Browse files Browse the repository at this point in the history
chore: editScreen
  • Loading branch information
Kostyanaya authored Nov 21, 2024
2 parents cb16aee + e3cd94a commit d864037
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/app-gd-movement/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expo": {
"name": "GDMN Склад",
"slug": "gdmn-gd-movement",
"version": "1.6.8",
"version": "1.6.9",
"githubUrl": "https://github.com/stasgm/gdmn-mob",
"orientation": "default",
"icon": "./assets/icon.png",
Expand All @@ -26,7 +26,7 @@
"android": {
"package": "com.gsbelarus.gdmovement",
"permissions": ["CAMERA", "VIBRATE"],
"versionCode": 35
"versionCode": 36
},
"web": {
"favicon": "./assets/favicon.png"
Expand Down
4 changes: 2 additions & 2 deletions apps/app-gd-movement/src/screens/Doc/DocEditScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,15 @@ export const DocEditScreen = () => {

useEffect(() => {
//Если меняем тип документа и для поля Откуда есть подразделение по умолчанию
if (docFromContactType) {
if ((docFromContactType && !doc) || (docFromContactType && oldDocTypeId)) {
dispatch(
appActions.setFormParams({
fromContact:
defaultFromDepartment && docDocumentType?.fromType === 'department' ? defaultFromDepartment : undefined,
}),
);
}
}, [dispatch, docDocumentType, defaultFromDepartment, docFromContactType]);
}, [dispatch, docDocumentType, defaultFromDepartment, docFromContactType, doc, oldDocTypeId]);

const handlePresentType = () => {
if (isBlocked) {
Expand Down
4 changes: 2 additions & 2 deletions apps/app-gd-movement/src/screens/Doc/components/DocLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ export const DocLine = ({ item, isSumWNds, onSetLine, onSetDisabledSave }: IProp
const validNumber = new RegExp(/^(\d{1,6}(,|.))?\d{0,4}$/);
const q = validNumber.test(newValue) ? newValue : isQuantity ? keypadValue.quantity : keypadValue.sumWNds;
setKeypadValue(getValue(keypadValue, q));
onSetLine(getValue(keypadValue, parseFloat(q || '0')));
onSetLine(getValue({ ...item, keypadValue }, parseFloat(q || '0')));
},
[isKeyboardOpen, isQuantity, keypadValue, getValue, onSetLine],
[isKeyboardOpen, isQuantity, keypadValue, getValue, onSetLine, item],
);

const handleChangeQuantity = useCallback(() => {
Expand Down

0 comments on commit d864037

Please sign in to comment.