mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 04:10:32 +00:00
Revert "feat(warehouse) add warehouse propover."
This reverts commit 2aa26959e9.
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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;
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user