mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-19 02:13:50 +08:00
feat: support subscription periods (yearly/monthly) (#2265)
* feat: support year/month subscription * feat: add GetPrice() for plan * feat: add GetDuration * feat: gofumpt * feat: add subscription mode for pricing * feat: restrict auto create product operation * fix: format code * feat: add period for plan,remove period from pricing * feat: format code * feat: remove space * feat: remove period in signup page
This commit is contained in:
@ -32,9 +32,9 @@ class PlanListPage extends BaseListPage {
|
||||
createdTime: moment().format(),
|
||||
displayName: `New Plan - ${randomName}`,
|
||||
description: "",
|
||||
pricePerMonth: 10,
|
||||
pricePerYear: 100,
|
||||
price: 10,
|
||||
currency: "USD",
|
||||
period: "Monthly",
|
||||
isEnabled: true,
|
||||
paymentProviders: [],
|
||||
role: "",
|
||||
@ -136,18 +136,18 @@ class PlanListPage extends BaseListPage {
|
||||
...this.getColumnSearchProps("currency"),
|
||||
},
|
||||
{
|
||||
title: i18next.t("plan:Price per month"),
|
||||
dataIndex: "pricePerMonth",
|
||||
key: "pricePerMonth",
|
||||
title: i18next.t("plan:Price"),
|
||||
dataIndex: "price",
|
||||
key: "price",
|
||||
width: "130px",
|
||||
...this.getColumnSearchProps("pricePerMonth"),
|
||||
...this.getColumnSearchProps("price"),
|
||||
},
|
||||
{
|
||||
title: i18next.t("plan:Price per year"),
|
||||
dataIndex: "pricePerYear",
|
||||
key: "pricePerYear",
|
||||
title: i18next.t("plan:Period"),
|
||||
dataIndex: "period",
|
||||
key: "period",
|
||||
width: "130px",
|
||||
...this.getColumnSearchProps("pricePerYear"),
|
||||
...this.getColumnSearchProps("period"),
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Role"),
|
||||
|
Reference in New Issue
Block a user