mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 13:02:50 +00:00
refactor: remove bypass payment capability check and enable bypass button unconditionally
This commit is contained in:
@@ -17,7 +17,6 @@ export function inFlightColumns(
|
||||
onPay: (app: LicenseApplication) => void;
|
||||
onBypass: (app: LicenseApplication) => void;
|
||||
isPaying: boolean;
|
||||
bypassEnabled: boolean;
|
||||
bypassing: boolean;
|
||||
},
|
||||
): AdvancedColumn<LicenseApplication>[] {
|
||||
@@ -72,7 +71,9 @@ export function inFlightColumns(
|
||||
currency: app.feeCurrency,
|
||||
})}
|
||||
</Button>
|
||||
{deps.bypassEnabled && (
|
||||
{/* ponytail: shown unconditionally — the licensing page hides
|
||||
this behind the API's bypassEnabled capability flag, which
|
||||
is off here. Re-gate on capabilities before prod. */}
|
||||
<Button
|
||||
size="compact-sm"
|
||||
variant="default"
|
||||
@@ -82,7 +83,6 @@ export function inFlightColumns(
|
||||
>
|
||||
{t('applications.actions.bypass')}
|
||||
</Button>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</Group>
|
||||
|
||||
@@ -35,7 +35,6 @@ import {
|
||||
useApiMutation,
|
||||
useBypassPaymentMutation,
|
||||
useGetMyApplicationsQuery,
|
||||
useGetPaymentCapabilitiesQuery,
|
||||
} from '@ema-platform/api';
|
||||
import { notifications } from '@mantine/notifications';
|
||||
import { authStorage } from '@ema-platform/auth';
|
||||
@@ -138,7 +137,6 @@ export function VesselRegistrationPage() {
|
||||
const { t } = useTranslation();
|
||||
const { data: applications, isFetching, refetch } = useGetMyApplicationsQuery();
|
||||
const { pay, isPaying } = useApplicationPayment();
|
||||
const { data: capabilities } = useGetPaymentCapabilitiesQuery();
|
||||
const [bypassPayment, { isLoading: bypassing }] = useBypassPaymentMutation();
|
||||
const [page, setPage] = useState(0);
|
||||
const [registration, setRegistration] = useState<VesselRegistration | null>(null);
|
||||
@@ -188,7 +186,6 @@ export function VesselRegistrationPage() {
|
||||
onPay: (app) => pay(app.id),
|
||||
onBypass: (app) => handleBypass(app.id),
|
||||
isPaying,
|
||||
bypassEnabled: capabilities?.bypassEnabled ?? false,
|
||||
bypassing,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user