Revert "feat(warehouse) add warehouse propover."

This reverts commit 2aa26959e9.
This commit is contained in:
elforjani13
2022-02-06 09:58:38 +02:00
committed by a.bouhuolia
parent e1fe28736e
commit 2a61a3de47
6 changed files with 1 additions and 198 deletions

View File

@@ -2,7 +2,6 @@ import React, { useState, useEffect } from 'react';
import { FormGroup, NumericInput, Intent } from '@blueprintjs/core';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
import WarehouseListPopover from '../../containers/WarehouseListPopover';
/**
* Numeric input table cell.
@@ -37,8 +36,7 @@ export default function NumericInputCell({
onValueChange={handleValueChange}
onBlur={onBlur}
fill={true}
buttonPosition={'none'}
rightElement={<WarehouseListPopover />}
buttonPosition={"none"}
/>
</FormGroup>
);

View File

@@ -1,44 +0,0 @@
import React from 'react';
import classNames from 'classnames';
import { FormGroup, Intent, Classes, Radio } from '@blueprintjs/core';
const RadioEditableCell = ({
row: { index, original },
column: { id, radioProps },
cell: { value: initialValue },
payload,
}) => {
const [value, setValue] = React.useState(initialValue);
const onChange = (e) => {
const newValue = e.target.checked;
debugger;
setValue(newValue);
payload.updateData(index, id, newValue);
};
React.useEffect(() => {
setValue(initialValue);
}, [initialValue]);
const error = payload.errors?.[index]?.[id];
return (
<FormGroup
intent={error ? Intent.DANGER : null}
className={classNames(Classes.FILL)}
>
<Radio
value={value}
label={'Warehouse #1'}
onChange={onChange}
checked={initialValue}
minimal={true}
className="ml2"
{...radioProps}
/>
</FormGroup>
);
};
export default RadioEditableCell;

View File

@@ -9,7 +9,6 @@ import NumericInputCell from './NumericInputCell';
import CheckBoxFieldCell from './CheckBoxFieldCell';
import SwitchFieldCell from './SwitchFieldCell';
import TextAreaCell from './TextAreaCell';
import RadioFieldCell from './RadioFieldCell';
export {
AccountsListFieldCell,
@@ -24,5 +23,4 @@ export {
CheckBoxFieldCell,
SwitchFieldCell,
TextAreaCell,
RadioFieldCell,
};