fix coin seller stock actions for disabled sellers
This commit is contained in:
parent
6ab21a8baa
commit
2215b01743
@ -159,7 +159,7 @@ export function useHostCoinSellersPage() {
|
||||
};
|
||||
|
||||
const openStockCredit = (seller) => {
|
||||
if (!seller?.userId || seller.status !== "active" || !abilities.canStockCredit) {
|
||||
if (!seller?.userId || !abilities.canStockCredit) {
|
||||
return;
|
||||
}
|
||||
setSelectedSeller(seller);
|
||||
@ -168,7 +168,7 @@ export function useHostCoinSellersPage() {
|
||||
};
|
||||
|
||||
const openStockDebit = (seller) => {
|
||||
if (!seller?.userId || seller.status !== "active" || !abilities.canStockCredit) {
|
||||
if (!seller?.userId || !abilities.canStockCredit) {
|
||||
return;
|
||||
}
|
||||
setSelectedSeller(seller);
|
||||
|
||||
@ -230,7 +230,7 @@ export function HostCoinSellersPage() {
|
||||
</HostOrgActionModal>
|
||||
|
||||
<HostOrgActionModal
|
||||
disabled={!page.abilities.canStockCredit || page.selectedSeller?.status !== "active"}
|
||||
disabled={!page.abilities.canStockCredit}
|
||||
loading={String(page.loadingAction).startsWith("coin-seller-stock")}
|
||||
open={page.activeAction === "stock"}
|
||||
sectioned={false}
|
||||
@ -306,7 +306,7 @@ export function HostCoinSellersPage() {
|
||||
</HostOrgActionModal>
|
||||
|
||||
<HostOrgActionModal
|
||||
disabled={!page.abilities.canStockCredit || page.selectedSeller?.status !== "active"}
|
||||
disabled={!page.abilities.canStockCredit}
|
||||
loading={String(page.loadingAction).startsWith("coin-seller-stock-debit")}
|
||||
open={page.activeAction === "stock-debit"}
|
||||
sectioned={false}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user