mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
add reseller change plan button
This commit is contained in:
parent
bd6486ca58
commit
911424c505
@ -97,6 +97,7 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
monitorLimit: true,
|
||||
teamMemberLimit: true,
|
||||
planType: true,
|
||||
changePlanLink: true,
|
||||
},
|
||||
}
|
||||
);
|
||||
@ -393,6 +394,21 @@ const Settings: FunctionComponent<ComponentProps> = (
|
||||
<Card
|
||||
title={`You have purchased this project from ${reseller.name}`}
|
||||
description={`If you would like to change the plan, please contact ${reseller.name} at ${reseller.description}`}
|
||||
buttons={
|
||||
reseller.changePlanLink
|
||||
? [
|
||||
{
|
||||
title: `Change Plan`,
|
||||
onClick: () => {
|
||||
Navigation.navigate(
|
||||
reseller.changePlanLink!
|
||||
);
|
||||
},
|
||||
icon: IconProp.Edit,
|
||||
},
|
||||
]
|
||||
: []
|
||||
}
|
||||
>
|
||||
<div className="space-y-2">
|
||||
<div className="text-sm font-medium text-gray-500">
|
||||
|
@ -13,6 +13,7 @@ import TableMetadata from 'Common/Types/Database/TableMetadata';
|
||||
import IconProp from 'Common/Types/Icon/IconProp';
|
||||
import BaseModel from 'Common/Models/BaseModel';
|
||||
import Permission from 'Common/Types/Permission';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
|
||||
@TableAccessControl({
|
||||
create: [],
|
||||
@ -98,7 +99,7 @@ export default class Reseller extends BaseModel {
|
||||
@TableColumn({
|
||||
required: true,
|
||||
type: TableColumnType.ShortText,
|
||||
canReadOnRelationQuery: true,
|
||||
canReadOnRelationQuery: false,
|
||||
title: 'Username',
|
||||
description: 'Username of the reseller',
|
||||
})
|
||||
@ -117,7 +118,7 @@ export default class Reseller extends BaseModel {
|
||||
@TableColumn({
|
||||
required: true,
|
||||
type: TableColumnType.ShortText,
|
||||
canReadOnRelationQuery: true,
|
||||
canReadOnRelationQuery: false,
|
||||
title: 'Password',
|
||||
description: 'Password for reseller to login',
|
||||
})
|
||||
@ -217,4 +218,24 @@ export default class Reseller extends BaseModel {
|
||||
transformer: ObjectID.getDatabaseTransformer(),
|
||||
})
|
||||
public deletedByUserId?: ObjectID = undefined;
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
required: false,
|
||||
type: TableColumnType.ShortURL,
|
||||
canReadOnRelationQuery: true,
|
||||
title: 'Change Plan Link',
|
||||
description: 'Reseller Change plan Link',
|
||||
})
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: ColumnType.ShortURL,
|
||||
length: ColumnLength.ShortURL,
|
||||
transformer: URL.getDatabaseTransformer(),
|
||||
})
|
||||
public changePlanLink?: URL = undefined;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user