mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 22:58:17 +00:00
feat: add toggle to DJF
This commit is contained in:
@@ -14,6 +14,12 @@ export interface ManualPaymentSettings {
|
||||
etbEnabled: boolean;
|
||||
usdEnabled: boolean;
|
||||
djfEnabled: boolean;
|
||||
/**
|
||||
* Wider than `djfEnabled`: whether DJF is accepted as a payment currency at
|
||||
* all — offered on the booking forms and payable online. Off leaves existing
|
||||
* DJF invoices settleable by hand.
|
||||
*/
|
||||
djfPaymentsEnabled: boolean;
|
||||
updatedById: string | null;
|
||||
updatedAt?: string;
|
||||
}
|
||||
@@ -24,10 +30,21 @@ export const manualPaymentSettingsService = {
|
||||
return unwrap(response.data);
|
||||
},
|
||||
|
||||
/** Currencies customers may be billed and pay in — open read, no permission. */
|
||||
currencies: async (): Promise<string[]> => {
|
||||
const response = await client.get<ApiResponse<string[]>>(
|
||||
URL_CONSTANTS.MANUAL_PAYMENT_SETTINGS.CURRENCIES,
|
||||
);
|
||||
return unwrap(response.data);
|
||||
},
|
||||
|
||||
/** Partial: an omitted currency keeps its current setting. */
|
||||
update: async (
|
||||
patch: Partial<
|
||||
Pick<ManualPaymentSettings, "etbEnabled" | "usdEnabled" | "djfEnabled">
|
||||
Pick<
|
||||
ManualPaymentSettings,
|
||||
"etbEnabled" | "usdEnabled" | "djfEnabled" | "djfPaymentsEnabled"
|
||||
>
|
||||
>,
|
||||
): Promise<ManualPaymentSettings> => {
|
||||
const response = await client.patch<ApiResponse<ManualPaymentSettings>>(
|
||||
|
||||
Reference in New Issue
Block a user