mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-23 08:10:32 +00:00
fix(Branches & warehouses ): mark primary.
This commit is contained in:
@@ -3,7 +3,7 @@ import intl from 'react-intl-universal';
|
||||
import { Intent, Alert } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
|
||||
import { useMarkPrimaryBranches } from 'hooks/query';
|
||||
import { useMarkBranchAsPrimary } from 'hooks/query';
|
||||
import { AppToaster } from 'components';
|
||||
|
||||
import withAlertActions from 'containers/Alert/withAlertActions';
|
||||
@@ -25,7 +25,7 @@ function BranchMarkPrimaryAlert({
|
||||
closeAlert,
|
||||
}) {
|
||||
const { mutateAsync: markPrimaryBranchMutate, isLoading } =
|
||||
useMarkPrimaryBranches();
|
||||
useMarkBranchAsPrimary();
|
||||
|
||||
// Handle cancel mark primary alert.
|
||||
const handleCancelMarkPrimaryAlert = () => {
|
||||
@@ -49,8 +49,8 @@ function BranchMarkPrimaryAlert({
|
||||
|
||||
return (
|
||||
<Alert
|
||||
cancelButtonText={<T id={'cancel'} />}
|
||||
confirmButtonText={<T id={'make_primary'} />}
|
||||
// cancelButtonText={<T id={'cancel'} />}
|
||||
// confirmButtonText={<T id={'make_primary'} />}
|
||||
intent={Intent.WARNING}
|
||||
isOpen={isOpen}
|
||||
onCancel={handleCancelMarkPrimaryAlert}
|
||||
|
||||
@@ -3,7 +3,7 @@ import intl from 'react-intl-universal';
|
||||
import { Intent, Alert } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
|
||||
import { useMarkPrimaryWarehouse } from 'hooks/query';
|
||||
import { useMarkWarehouseAsPrimary } from 'hooks/query';
|
||||
import { AppToaster } from 'components';
|
||||
|
||||
import withAlertActions from 'containers/Alert/withAlertActions';
|
||||
@@ -24,14 +24,14 @@ function WarehouseMarkPrimaryAlert({
|
||||
// #withAlertActions
|
||||
closeAlert,
|
||||
}) {
|
||||
const { mutateAsync: markPrimaryWarehouseMutate, isLoading } =
|
||||
useMarkPrimaryWarehouse();
|
||||
// const { mutateAsync: markPrimaryWarehouseMutate, isLoading } =
|
||||
// useMarkWarehouseAsPrimary();
|
||||
|
||||
// Handle cancel mark primary alert.
|
||||
const handleCancelMarkPrimaryAlert = () => {
|
||||
closeAlert(name);
|
||||
};
|
||||
console.log(warehouseId, 'XX');
|
||||
|
||||
// andle cancel mark primary confirm.
|
||||
const handleConfirmMarkPrimaryWarehouse = () => {
|
||||
markPrimaryWarehouseMutate(warehouseId)
|
||||
|
||||
Reference in New Issue
Block a user