Skip to content

The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.

Admin billing: Operations instead of Money (PR 1904)

Janik55a376248d42
diff --git a/apps/web/src/admin/Billing.test.tsx b/apps/web/src/admin/Billing.test.tsx
index 40bd1580..245d4d3e 100644
--- a/apps/web/src/admin/Billing.test.tsx
+++ b/apps/web/src/admin/Billing.test.tsx
@@ -207,7 +207,7 @@ test('the bills list hides canceled bills by default; the Canceled and All bills
expect(html).not.toContain('[email protected]')
})
-test("Billing's own page: lines like Features under Money and Setup, each a link to its page; no tab strip", () => {
+test("Billing's own page: lines like Features under Operations and Setup, each a link to its page; no tab strip", () => {
data['admin.billing.summary'] = {
billing: { stripeConnected: false },
selfServe: { on: false, open: false, closedBecause: null, termsMissing: [] },
@@ -218,9 +218,9 @@ test("Billing's own page: lines like Features under Money and Setup, each a link
automaticTax: false,
}
const html = renderList(null)
- expect(html).toContain('<h3 class="adm-feature-group">Money</h3>')
+ expect(html).toContain('<h3 class="adm-feature-group">Operations</h3>')
expect(html).toContain('<h3 class="adm-feature-group">Setup</h3>')
- expect(html.indexOf('Money')).toBeLessThan(html.indexOf('Setup'))
+ expect(html.indexOf('Operations')).toBeLessThan(html.indexOf('Setup'))
expect(html.match(/class="k-card adm-feature"/g)).toHaveLength(6)
// Each line's button is a link to its page: Connect for Stripe not connected, Change for Prices and rules.
expect(html).toContain(
diff --git a/apps/web/src/admin/Billing.tsx b/apps/web/src/admin/Billing.tsx
index 98a5e284..af41ab45 100644
--- a/apps/web/src/admin/Billing.tsx
+++ b/apps/web/src/admin/Billing.tsx
@@ -287,7 +287,7 @@ function BillingHome() {
/** The page while the summary loads: the groups' headings at once, their lines in their shape. */
function HubSkeleton() {
const t = useT()
- return [t('admin.bills.hub.money'), t('admin.bills.hub.setup')].map(label => (
+ return [t('admin.bills.hub.operations'), t('admin.bills.hub.setup')].map(label => (
<Fragment key={label}>
<LineGroup>{label}</LineGroup>
{[0, 1, 2].map(line => (
diff --git a/apps/web/src/admin/billingModel.test.ts b/apps/web/src/admin/billingModel.test.ts
index 7fca693f..214783a3 100644
--- a/apps/web/src/admin/billingModel.test.ts
+++ b/apps/web/src/admin/billingModel.test.ts
@@ -299,9 +299,9 @@ const line = (s: AdminBillingSummary, id: string) =>
.flatMap(g => g.lines)
.find(l => l.id === id)!
-test("Billing's hub: Money (Bills, Review, Stripe events), then Setup (Stripe, Prices and rules, Sign-up)", () => {
+test("Billing's hub: Operations (Bills, Review, Stripe events), then Setup (Stripe, Prices and rules, Sign-up)", () => {
expect(hubGroups(summary()).map(g => [g.label, g.lines.map(l => l.id)])).toEqual([
- ['Money', ['bills', 'review', 'events']],
+ ['Operations', ['bills', 'review', 'events']],
['Setup', ['stripe', 'rules', 'signup']],
])
// All fine: ok badges, the parts' own summaries, Open everywhere but Prices and rules (Change, no state).
diff --git a/apps/web/src/admin/billingModel.ts b/apps/web/src/admin/billingModel.ts
index a44095ce..a6aaa89d 100644
--- a/apps/web/src/admin/billingModel.ts
+++ b/apps/web/src/admin/billingModel.ts
@@ -315,7 +315,7 @@ export function eventFilterOfHash(hash: string): BillingEventFilter {
/** The address of the Stripe events, filtered: a part of Billing (`#admin/billing/events`, LIN-833). */
export const eventsHref = (filter: BillingEventFilter) => stripeEventsHref(filter)
-// ---- Billing's own page: a line per part, under Money and Setup ----
+// ---- Billing's own page: a line per part, under Operations and Setup ----
/** One part of Billing as a line: what it is, its state, and the page its button opens. */
export type HubLine = {
@@ -328,7 +328,7 @@ export type HubLine = {
/** The button's word. */
action: string
}
-export type HubGroup = { id: 'money' | 'setup'; label: string; lines: HubLine[] }
+export type HubGroup = { id: 'operations' | 'setup'; label: string; lines: HubLine[] }
const CLOSED_BECAUSE: Record<NonNullable<AdminBillingSummary['selfServe']['closedBecause']>, MessageKey> = {
switched_off: msg('admin.bills.summary.signup.switchedOff'),
@@ -443,7 +443,7 @@ function signupLine(s: AdminBillingSummary): HubLine {
export function hubGroups(s: AdminBillingSummary): HubGroup[] {
const { t } = i18n()
return [
- { id: 'money', label: t('admin.bills.hub.money'), lines: [billsLine(s), reviewLine(s), eventsLine(s)] },
+ { id: 'operations', label: t('admin.bills.hub.operations'), lines: [billsLine(s), reviewLine(s), eventsLine(s)] },
{
id: 'setup',
label: t('admin.bills.hub.setup'),
diff --git a/packages/i18n/locales/en/admin.json b/packages/i18n/locales/en/admin.json
index 69b12b9f..466be011 100644
--- a/packages/i18n/locales/en/admin.json
+++ b/packages/i18n/locales/en/admin.json
@@ -505,8 +505,8 @@
"bills.hub.bills": "Every bill and payment, with refunds",
"bills.hub.connect": "Connect",
"bills.hub.events": "What Stripe sent and how it was handled",
- "bills.hub.money": "Money",
"bills.hub.open": "Open",
+ "bills.hub.operations": "Operations",
"bills.hub.review": "Held bills and new trials to check",
"bills.hub.rules": "Plans, minutes, limits and the trial",
"bills.hub.setup": "Setup",