mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
feat(warehouse) add warehouse gird.
This commit is contained in:
37
src/containers/Preferences/Warehouses/components.js
Normal file
37
src/containers/Preferences/Warehouses/components.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import { Menu, MenuItem, MenuDivider, Intent } from '@blueprintjs/core';
|
||||
import { If, Icon, Can } from '../../../components';
|
||||
import { safeCallback } from 'utils';
|
||||
|
||||
/**
|
||||
* Warehouse context menu.
|
||||
*/
|
||||
export function WarehouseContextMenu({
|
||||
onEditClick,
|
||||
onDeleteClick,
|
||||
onPrimary,
|
||||
}) {
|
||||
return (
|
||||
<Menu>
|
||||
<MenuItem
|
||||
icon={<Icon icon="pen-18" />}
|
||||
text={intl.get('warehouses.action.edit_warehouse')}
|
||||
onClick={safeCallback(onEditClick)}
|
||||
/>
|
||||
<MenuItem
|
||||
icon={<Icon icon="pen-18" />}
|
||||
text={intl.get('warehouses.action.make_as_parimary')}
|
||||
onClick={safeCallback(onPrimary)}
|
||||
/>
|
||||
<MenuDivider />
|
||||
<MenuItem
|
||||
text={intl.get('warehouses.action.delete_warehouse')}
|
||||
icon={<Icon icon="trash-16" iconSize={16} />}
|
||||
intent={Intent.DANGER}
|
||||
onClick={safeCallback(onDeleteClick)}
|
||||
/>
|
||||
</Menu>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user