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) => {
|
const openStockCredit = (seller) => {
|
||||||
if (!seller?.userId || seller.status !== "active" || !abilities.canStockCredit) {
|
if (!seller?.userId || !abilities.canStockCredit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setSelectedSeller(seller);
|
setSelectedSeller(seller);
|
||||||
@ -168,7 +168,7 @@ export function useHostCoinSellersPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const openStockDebit = (seller) => {
|
const openStockDebit = (seller) => {
|
||||||
if (!seller?.userId || seller.status !== "active" || !abilities.canStockCredit) {
|
if (!seller?.userId || !abilities.canStockCredit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setSelectedSeller(seller);
|
setSelectedSeller(seller);
|
||||||
|
|||||||
@ -230,7 +230,7 @@ export function HostCoinSellersPage() {
|
|||||||
</HostOrgActionModal>
|
</HostOrgActionModal>
|
||||||
|
|
||||||
<HostOrgActionModal
|
<HostOrgActionModal
|
||||||
disabled={!page.abilities.canStockCredit || page.selectedSeller?.status !== "active"}
|
disabled={!page.abilities.canStockCredit}
|
||||||
loading={String(page.loadingAction).startsWith("coin-seller-stock")}
|
loading={String(page.loadingAction).startsWith("coin-seller-stock")}
|
||||||
open={page.activeAction === "stock"}
|
open={page.activeAction === "stock"}
|
||||||
sectioned={false}
|
sectioned={false}
|
||||||
@ -306,7 +306,7 @@ export function HostCoinSellersPage() {
|
|||||||
</HostOrgActionModal>
|
</HostOrgActionModal>
|
||||||
|
|
||||||
<HostOrgActionModal
|
<HostOrgActionModal
|
||||||
disabled={!page.abilities.canStockCredit || page.selectedSeller?.status !== "active"}
|
disabled={!page.abilities.canStockCredit}
|
||||||
loading={String(page.loadingAction).startsWith("coin-seller-stock-debit")}
|
loading={String(page.loadingAction).startsWith("coin-seller-stock-debit")}
|
||||||
open={page.activeAction === "stock-debit"}
|
open={page.activeAction === "stock-debit"}
|
||||||
sectioned={false}
|
sectioned={false}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user