mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
feat(S&P): fix navigation bar if warehouses or branches feature.
This commit is contained in:
@@ -39,10 +39,10 @@ export default function BranchSuggestField({
|
|||||||
<MenuItem
|
<MenuItem
|
||||||
// active={modifiers.active}
|
// active={modifiers.active}
|
||||||
disabled={modifiers.disabled}
|
disabled={modifiers.disabled}
|
||||||
label={branch.code.toString()}
|
label={branch.code}
|
||||||
key={branch.id}
|
key={branch.id}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
text={branch.name.toString()}
|
text={branch.name}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ function MakeJournalEntriesHeader({
|
|||||||
</FastField>
|
</FastField>
|
||||||
|
|
||||||
{/*------------ Currency -----------*/}
|
{/*------------ Currency -----------*/}
|
||||||
{/* <FeatureCan feature={Features.ManualJournal}> */}
|
<FeatureCan feature={Features.ManualJournal}>
|
||||||
<FastField
|
<FastField
|
||||||
name={'currency_code'}
|
name={'currency_code'}
|
||||||
currencies={currencies}
|
currencies={currencies}
|
||||||
@@ -211,7 +211,10 @@ function MakeJournalEntriesHeader({
|
|||||||
currenciesList={currencies}
|
currenciesList={currencies}
|
||||||
selectedCurrencyCode={value}
|
selectedCurrencyCode={value}
|
||||||
onCurrencySelected={(currencyItem) => {
|
onCurrencySelected={(currencyItem) => {
|
||||||
form.setFieldValue('currency_code', currencyItem.currency_code);
|
form.setFieldValue(
|
||||||
|
'currency_code',
|
||||||
|
currencyItem.currency_code,
|
||||||
|
);
|
||||||
form.setFieldValue('exchange_rate', '');
|
form.setFieldValue('exchange_rate', '');
|
||||||
setSelactJournalCurrency(currencyItem);
|
setSelactJournalCurrency(currencyItem);
|
||||||
}}
|
}}
|
||||||
@@ -220,7 +223,7 @@ function MakeJournalEntriesHeader({
|
|||||||
</FormGroup>
|
</FormGroup>
|
||||||
)}
|
)}
|
||||||
</FastField>
|
</FastField>
|
||||||
{/* </FeatureCan> */}
|
</FeatureCan>
|
||||||
|
|
||||||
{/* ----------- Exchange rate ----------- */}
|
{/* ----------- Exchange rate ----------- */}
|
||||||
<If condition={isForeignJournal}>
|
<If condition={isForeignJournal}>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export default function BillFormTopBar() {
|
|||||||
useSetPrimaryBranchToForm();
|
useSetPrimaryBranchToForm();
|
||||||
|
|
||||||
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
||||||
if (!featureCan(Features.Warehouses) || !featureCan(Features.Branches)) {
|
if (!featureCan(Features.Warehouses) && !featureCan(Features.Branches)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export default function VendorCreditNoteFormTopBar() {
|
|||||||
useSetPrimaryBranchToForm();
|
useSetPrimaryBranchToForm();
|
||||||
|
|
||||||
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
||||||
if (!featureCan(Features.Warehouses) || !featureCan(Features.Branches)) {
|
if (!featureCan(Features.Warehouses) && !featureCan(Features.Branches)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export default function CreditNoteFormTopbar() {
|
|||||||
useSetPrimaryBranchToForm();
|
useSetPrimaryBranchToForm();
|
||||||
|
|
||||||
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
||||||
if (!featureCan(Features.Warehouses) || !featureCan(Features.Branches)) {
|
if (!featureCan(Features.Warehouses) && !featureCan(Features.Branches)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export default function EstimtaeFormTopBar() {
|
|||||||
useSetPrimaryBranchToForm();
|
useSetPrimaryBranchToForm();
|
||||||
|
|
||||||
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
||||||
if (!featureCan(Features.Warehouses) || !featureCan(Features.Branches)) {
|
if (!featureCan(Features.Warehouses) && !featureCan(Features.Branches)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export default function InvoiceFormTopBar() {
|
|||||||
useSetPrimaryBranchToForm();
|
useSetPrimaryBranchToForm();
|
||||||
|
|
||||||
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
||||||
if (!featureCan(Features.Warehouses) || !featureCan(Features.Branches)) {
|
if (!featureCan(Features.Warehouses) && !featureCan(Features.Branches)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export default function ReceiptFormTopBar() {
|
|||||||
useSetPrimaryBranchToForm();
|
useSetPrimaryBranchToForm();
|
||||||
|
|
||||||
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
// Can't display the navigation bar if warehouses or branches feature is not enabled.
|
||||||
if (!featureCan(Features.Warehouses) || !featureCan(Features.Branches)) {
|
if (!featureCan(Features.Warehouses) && !featureCan(Features.Branches)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user