Add missing frontend platform components and update production deployment
This commit adds all previously untracked files and modifications needed for production deployment: - New marketing components (BenefitsSection, CodeBlock, PluginShowcase, PricingTable) - Platform admin components (EditPlatformEntityModal, PlatformListRow, PlatformListing, PlatformTable) - Updated deployment configuration and scripts - Various frontend API and component improvements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ export interface PlatformBusinessOwner {
|
||||
full_name: string;
|
||||
email: string;
|
||||
role: string;
|
||||
email_verified: boolean;
|
||||
}
|
||||
|
||||
export interface PlatformBusiness {
|
||||
@@ -72,6 +73,7 @@ export interface PlatformUser {
|
||||
is_active: boolean;
|
||||
is_staff: boolean;
|
||||
is_superuser: boolean;
|
||||
email_verified: boolean;
|
||||
business: number | null;
|
||||
business_name?: string;
|
||||
business_subdomain?: string;
|
||||
@@ -83,7 +85,7 @@ export interface PlatformUser {
|
||||
* Get all businesses (platform admin only)
|
||||
*/
|
||||
export const getBusinesses = async (): Promise<PlatformBusiness[]> => {
|
||||
const response = await apiClient.get<PlatformBusiness[]>('/platform/businesses/');
|
||||
const response = await apiClient.get<PlatformBusiness[]>('/api/platform/businesses/');
|
||||
return response.data;
|
||||
};
|
||||
|
||||
@@ -95,7 +97,7 @@ export const updateBusiness = async (
|
||||
data: PlatformBusinessUpdate
|
||||
): Promise<PlatformBusiness> => {
|
||||
const response = await apiClient.patch<PlatformBusiness>(
|
||||
`/platform/businesses/${businessId}/`,
|
||||
`/api/platform/businesses/${businessId}/`,
|
||||
data
|
||||
);
|
||||
return response.data;
|
||||
@@ -108,7 +110,7 @@ export const createBusiness = async (
|
||||
data: PlatformBusinessCreate
|
||||
): Promise<PlatformBusiness> => {
|
||||
const response = await apiClient.post<PlatformBusiness>(
|
||||
'/platform/businesses/',
|
||||
'/api/platform/businesses/',
|
||||
data
|
||||
);
|
||||
return response.data;
|
||||
@@ -118,7 +120,7 @@ export const createBusiness = async (
|
||||
* Get all users (platform admin only)
|
||||
*/
|
||||
export const getUsers = async (): Promise<PlatformUser[]> => {
|
||||
const response = await apiClient.get<PlatformUser[]>('/platform/users/');
|
||||
const response = await apiClient.get<PlatformUser[]>('/api/platform/users/');
|
||||
return response.data;
|
||||
};
|
||||
|
||||
@@ -126,10 +128,17 @@ export const getUsers = async (): Promise<PlatformUser[]> => {
|
||||
* Get users for a specific business
|
||||
*/
|
||||
export const getBusinessUsers = async (businessId: number): Promise<PlatformUser[]> => {
|
||||
const response = await apiClient.get<PlatformUser[]>(`/platform/users/?business=${businessId}`);
|
||||
const response = await apiClient.get<PlatformUser[]>(`/api/platform/users/?business=${businessId}`);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
/**
|
||||
* Verify a user's email (platform admin only)
|
||||
*/
|
||||
export const verifyUserEmail = async (userId: number): Promise<void> => {
|
||||
await apiClient.post(`/api/platform/users/${userId}/verify_email/`);
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// Tenant Invitations
|
||||
// ============================================================================
|
||||
@@ -209,7 +218,7 @@ export interface TenantInvitationAccept {
|
||||
* Get all tenant invitations (platform admin only)
|
||||
*/
|
||||
export const getTenantInvitations = async (): Promise<TenantInvitation[]> => {
|
||||
const response = await apiClient.get<TenantInvitation[]>('/platform/tenant-invitations/');
|
||||
const response = await apiClient.get<TenantInvitation[]>('/api/platform/tenant-invitations/');
|
||||
return response.data;
|
||||
};
|
||||
|
||||
@@ -220,7 +229,7 @@ export const createTenantInvitation = async (
|
||||
data: TenantInvitationCreate
|
||||
): Promise<TenantInvitation> => {
|
||||
const response = await apiClient.post<TenantInvitation>(
|
||||
'/platform/tenant-invitations/',
|
||||
'/api/platform/tenant-invitations/',
|
||||
data
|
||||
);
|
||||
return response.data;
|
||||
@@ -230,14 +239,14 @@ export const createTenantInvitation = async (
|
||||
* Resend a tenant invitation (platform admin only)
|
||||
*/
|
||||
export const resendTenantInvitation = async (invitationId: number): Promise<void> => {
|
||||
await apiClient.post(`/platform/tenant-invitations/${invitationId}/resend/`);
|
||||
await apiClient.post(`/api/platform/tenant-invitations/${invitationId}/resend/`);
|
||||
};
|
||||
|
||||
/**
|
||||
* Cancel a tenant invitation (platform admin only)
|
||||
*/
|
||||
export const cancelTenantInvitation = async (invitationId: number): Promise<void> => {
|
||||
await apiClient.post(`/platform/tenant-invitations/${invitationId}/cancel/`);
|
||||
await apiClient.post(`/api/platform/tenant-invitations/${invitationId}/cancel/`);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -245,7 +254,7 @@ export const cancelTenantInvitation = async (invitationId: number): Promise<void
|
||||
*/
|
||||
export const getInvitationByToken = async (token: string): Promise<TenantInvitationDetail> => {
|
||||
const response = await apiClient.get<TenantInvitationDetail>(
|
||||
`/platform/tenant-invitations/token/${token}/`
|
||||
`/api/platform/tenant-invitations/token/${token}/`
|
||||
);
|
||||
return response.data;
|
||||
};
|
||||
@@ -258,7 +267,7 @@ export const acceptInvitation = async (
|
||||
data: TenantInvitationAccept
|
||||
): Promise<{ detail: string }> => {
|
||||
const response = await apiClient.post<{ detail: string }>(
|
||||
`/platform/tenant-invitations/token/${token}/accept/`,
|
||||
`/api/platform/tenant-invitations/token/${token}/accept/`,
|
||||
data
|
||||
);
|
||||
return response.data;
|
||||
|
||||
Reference in New Issue
Block a user