diff --git a/.gitignore b/.gitignore index 173aa33..f96346c 100644 --- a/.gitignore +++ b/.gitignore @@ -40,4 +40,6 @@ yarn-error.log* # typescript *.tsbuildinfo -next-env.d.ts \ No newline at end of file +next-env.d.ts + +dump.sql diff --git a/app/(marketing)/page.tsx b/app/(marketing)/page.tsx index 8826673..4a1e188 100644 --- a/app/(marketing)/page.tsx +++ b/app/(marketing)/page.tsx @@ -9,7 +9,7 @@ import { import { Trans } from '@kit/ui/trans'; import { withI18n } from '~/lib/i18n/with-i18n'; -import { MedReportTitle } from '@/components/MedReportTitle'; +import { MedReportTitle } from '@/components/med-report-title'; function Home() { return ( diff --git a/app/(public)/register-company/page.tsx b/app/(public)/register-company/page.tsx index 5099e36..905e0e6 100644 --- a/app/(public)/register-company/page.tsx +++ b/app/(public)/register-company/page.tsx @@ -54,7 +54,7 @@ export default function RegisterCompany() {
@@ -77,7 +77,6 @@ export default function RegisterCompany() { pendingText="Saatmine..." type="submit" formAction={submitCompanyRegistration} - className="mt-4 hover:bg-primary/90" > diff --git a/lib/root-metdata.ts b/lib/root-metdata.ts index ab70a57..cf221a6 100644 --- a/lib/root-metdata.ts +++ b/lib/root-metdata.ts @@ -32,7 +32,7 @@ export const generateRootMetadata = async (): Promise => { description: appConfig.description, }, icons: { - icon: '/images/favicon/favicon.ico', + icon: '/images/favicon/icon.ico', apple: '/images/favicon/apple-touch-icon.png', }, }; diff --git a/packages/supabase/src/database.types.ts b/packages/supabase/src/database.types.ts index 452ae7b..e69de29 100644 --- a/packages/supabase/src/database.types.ts +++ b/packages/supabase/src/database.types.ts @@ -1,1442 +0,0 @@ -export type Json = - | string - | number - | boolean - | null - | { [key: string]: Json | undefined } - | Json[]; - -export type Database = { - graphql_public: { - Tables: { - [_ in never]: never; - }; - Views: { - [_ in never]: never; - }; - Functions: { - graphql: { - Args: { - operationName?: string; - query?: string; - variables?: Json; - extensions?: Json; - }; - Returns: Json; - }; - }; - Enums: { - [_ in never]: never; - }; - CompositeTypes: { - [_ in never]: never; - }; - }; - public: { - Tables: { - accounts: { - Row: { - created_at: string | null; - created_by: string | null; - email: string | null; - id: string; - is_personal_account: boolean; - name: string; - picture_url: string | null; - primary_owner_user_id: string; - public_data: Json; - slug: string | null; - updated_at: string | null; - updated_by: string | null; - }; - Insert: { - created_at?: string | null; - created_by?: string | null; - email?: string | null; - id?: string; - is_personal_account?: boolean; - name: string; - picture_url?: string | null; - primary_owner_user_id?: string; - public_data?: Json; - slug?: string | null; - updated_at?: string | null; - updated_by?: string | null; - }; - Update: { - created_at?: string | null; - created_by?: string | null; - email?: string | null; - id?: string; - is_personal_account?: boolean; - name?: string; - picture_url?: string | null; - primary_owner_user_id?: string; - public_data?: Json; - slug?: string | null; - updated_at?: string | null; - updated_by?: string | null; - }; - Relationships: []; - }; - accounts_memberships: { - Row: { - account_id: string; - account_role: string; - created_at: string; - created_by: string | null; - updated_at: string; - updated_by: string | null; - user_id: string; - }; - Insert: { - account_id: string; - account_role: string; - created_at?: string; - created_by?: string | null; - updated_at?: string; - updated_by?: string | null; - user_id: string; - }; - Update: { - account_id?: string; - account_role?: string; - created_at?: string; - created_by?: string | null; - updated_at?: string; - updated_by?: string | null; - user_id?: string; - }; - Relationships: [ - { - foreignKeyName: 'accounts_memberships_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'accounts'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'accounts_memberships_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_account_workspace'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'accounts_memberships_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_accounts'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'accounts_memberships_account_role_fkey'; - columns: ['account_role']; - isOneToOne: false; - referencedRelation: 'roles'; - referencedColumns: ['name']; - }, - ]; - }; - billing_customers: { - Row: { - account_id: string; - customer_id: string; - email: string | null; - id: number; - provider: Database['public']['Enums']['billing_provider']; - }; - Insert: { - account_id: string; - customer_id: string; - email?: string | null; - id?: number; - provider: Database['public']['Enums']['billing_provider']; - }; - Update: { - account_id?: string; - customer_id?: string; - email?: string | null; - id?: number; - provider?: Database['public']['Enums']['billing_provider']; - }; - Relationships: [ - { - foreignKeyName: 'billing_customers_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'accounts'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'billing_customers_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_account_workspace'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'billing_customers_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_accounts'; - referencedColumns: ['id']; - }, - ]; - }; - config: { - Row: { - billing_provider: Database['public']['Enums']['billing_provider']; - enable_account_billing: boolean; - enable_team_account_billing: boolean; - enable_team_accounts: boolean; - }; - Insert: { - billing_provider?: Database['public']['Enums']['billing_provider']; - enable_account_billing?: boolean; - enable_team_account_billing?: boolean; - enable_team_accounts?: boolean; - }; - Update: { - billing_provider?: Database['public']['Enums']['billing_provider']; - enable_account_billing?: boolean; - enable_team_account_billing?: boolean; - enable_team_accounts?: boolean; - }; - Relationships: []; - }; - invitations: { - Row: { - account_id: string; - created_at: string; - email: string; - expires_at: string; - id: number; - invite_token: string; - invited_by: string; - role: string; - updated_at: string; - }; - Insert: { - account_id: string; - created_at?: string; - email: string; - expires_at?: string; - id?: number; - invite_token: string; - invited_by: string; - role: string; - updated_at?: string; - }; - Update: { - account_id?: string; - created_at?: string; - email?: string; - expires_at?: string; - id?: number; - invite_token?: string; - invited_by?: string; - role?: string; - updated_at?: string; - }; - Relationships: [ - { - foreignKeyName: 'invitations_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'accounts'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'invitations_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_account_workspace'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'invitations_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_accounts'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'invitations_role_fkey'; - columns: ['role']; - isOneToOne: false; - referencedRelation: 'roles'; - referencedColumns: ['name']; - }, - ]; - }; - nonces: { - Row: { - client_token: string; - created_at: string; - description: string | null; - expires_at: string; - id: string; - last_verification_at: string | null; - last_verification_ip: unknown | null; - last_verification_user_agent: string | null; - metadata: Json | null; - nonce: string; - purpose: string; - revoked: boolean; - revoked_reason: string | null; - scopes: string[] | null; - tags: string[] | null; - used_at: string | null; - user_id: string | null; - verification_attempts: number; - }; - Insert: { - client_token: string; - created_at?: string; - description?: string | null; - expires_at: string; - id?: string; - last_verification_at?: string | null; - last_verification_ip?: unknown | null; - last_verification_user_agent?: string | null; - metadata?: Json | null; - nonce: string; - purpose: string; - revoked?: boolean; - revoked_reason?: string | null; - scopes?: string[] | null; - tags?: string[] | null; - used_at?: string | null; - user_id?: string | null; - verification_attempts?: number; - }; - Update: { - client_token?: string; - created_at?: string; - description?: string | null; - expires_at?: string; - id?: string; - last_verification_at?: string | null; - last_verification_ip?: unknown | null; - last_verification_user_agent?: string | null; - metadata?: Json | null; - nonce?: string; - purpose?: string; - revoked?: boolean; - revoked_reason?: string | null; - scopes?: string[] | null; - tags?: string[] | null; - used_at?: string | null; - user_id?: string | null; - verification_attempts?: number; - }; - Relationships: []; - }; - notifications: { - Row: { - account_id: string; - body: string; - channel: Database['public']['Enums']['notification_channel']; - created_at: string; - dismissed: boolean; - expires_at: string | null; - id: number; - link: string | null; - type: Database['public']['Enums']['notification_type']; - }; - Insert: { - account_id: string; - body: string; - channel?: Database['public']['Enums']['notification_channel']; - created_at?: string; - dismissed?: boolean; - expires_at?: string | null; - id?: never; - link?: string | null; - type?: Database['public']['Enums']['notification_type']; - }; - Update: { - account_id?: string; - body?: string; - channel?: Database['public']['Enums']['notification_channel']; - created_at?: string; - dismissed?: boolean; - expires_at?: string | null; - id?: never; - link?: string | null; - type?: Database['public']['Enums']['notification_type']; - }; - Relationships: [ - { - foreignKeyName: 'notifications_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'accounts'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'notifications_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_account_workspace'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'notifications_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_accounts'; - referencedColumns: ['id']; - }, - ]; - }; - order_items: { - Row: { - created_at: string; - id: string; - order_id: string; - price_amount: number | null; - product_id: string; - quantity: number; - updated_at: string; - variant_id: string; - }; - Insert: { - created_at?: string; - id: string; - order_id: string; - price_amount?: number | null; - product_id: string; - quantity?: number; - updated_at?: string; - variant_id: string; - }; - Update: { - created_at?: string; - id?: string; - order_id?: string; - price_amount?: number | null; - product_id?: string; - quantity?: number; - updated_at?: string; - variant_id?: string; - }; - Relationships: [ - { - foreignKeyName: 'order_items_order_id_fkey'; - columns: ['order_id']; - isOneToOne: false; - referencedRelation: 'orders'; - referencedColumns: ['id']; - }, - ]; - }; - orders: { - Row: { - account_id: string; - billing_customer_id: number; - billing_provider: Database['public']['Enums']['billing_provider']; - created_at: string; - currency: string; - id: string; - status: Database['public']['Enums']['payment_status']; - total_amount: number; - updated_at: string; - }; - Insert: { - account_id: string; - billing_customer_id: number; - billing_provider: Database['public']['Enums']['billing_provider']; - created_at?: string; - currency: string; - id: string; - status: Database['public']['Enums']['payment_status']; - total_amount: number; - updated_at?: string; - }; - Update: { - account_id?: string; - billing_customer_id?: number; - billing_provider?: Database['public']['Enums']['billing_provider']; - created_at?: string; - currency?: string; - id?: string; - status?: Database['public']['Enums']['payment_status']; - total_amount?: number; - updated_at?: string; - }; - Relationships: [ - { - foreignKeyName: 'orders_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'accounts'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'orders_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_account_workspace'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'orders_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_accounts'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'orders_billing_customer_id_fkey'; - columns: ['billing_customer_id']; - isOneToOne: false; - referencedRelation: 'billing_customers'; - referencedColumns: ['id']; - }, - ]; - }; - role_permissions: { - Row: { - id: number; - permission: Database['public']['Enums']['app_permissions']; - role: string; - }; - Insert: { - id?: number; - permission: Database['public']['Enums']['app_permissions']; - role: string; - }; - Update: { - id?: number; - permission?: Database['public']['Enums']['app_permissions']; - role?: string; - }; - Relationships: [ - { - foreignKeyName: 'role_permissions_role_fkey'; - columns: ['role']; - isOneToOne: false; - referencedRelation: 'roles'; - referencedColumns: ['name']; - }, - ]; - }; - roles: { - Row: { - hierarchy_level: number; - name: string; - }; - Insert: { - hierarchy_level: number; - name: string; - }; - Update: { - hierarchy_level?: number; - name?: string; - }; - Relationships: []; - }; - subscription_items: { - Row: { - created_at: string; - id: string; - interval: string; - interval_count: number; - price_amount: number | null; - product_id: string; - quantity: number; - subscription_id: string; - type: Database['public']['Enums']['subscription_item_type']; - updated_at: string; - variant_id: string; - }; - Insert: { - created_at?: string; - id: string; - interval: string; - interval_count: number; - price_amount?: number | null; - product_id: string; - quantity?: number; - subscription_id: string; - type: Database['public']['Enums']['subscription_item_type']; - updated_at?: string; - variant_id: string; - }; - Update: { - created_at?: string; - id?: string; - interval?: string; - interval_count?: number; - price_amount?: number | null; - product_id?: string; - quantity?: number; - subscription_id?: string; - type?: Database['public']['Enums']['subscription_item_type']; - updated_at?: string; - variant_id?: string; - }; - Relationships: [ - { - foreignKeyName: 'subscription_items_subscription_id_fkey'; - columns: ['subscription_id']; - isOneToOne: false; - referencedRelation: 'subscriptions'; - referencedColumns: ['id']; - }, - ]; - }; - subscriptions: { - Row: { - account_id: string; - active: boolean; - billing_customer_id: number; - billing_provider: Database['public']['Enums']['billing_provider']; - cancel_at_period_end: boolean; - created_at: string; - currency: string; - id: string; - period_ends_at: string; - period_starts_at: string; - status: Database['public']['Enums']['subscription_status']; - trial_ends_at: string | null; - trial_starts_at: string | null; - updated_at: string; - }; - Insert: { - account_id: string; - active: boolean; - billing_customer_id: number; - billing_provider: Database['public']['Enums']['billing_provider']; - cancel_at_period_end: boolean; - created_at?: string; - currency: string; - id: string; - period_ends_at: string; - period_starts_at: string; - status: Database['public']['Enums']['subscription_status']; - trial_ends_at?: string | null; - trial_starts_at?: string | null; - updated_at?: string; - }; - Update: { - account_id?: string; - active?: boolean; - billing_customer_id?: number; - billing_provider?: Database['public']['Enums']['billing_provider']; - cancel_at_period_end?: boolean; - created_at?: string; - currency?: string; - id?: string; - period_ends_at?: string; - period_starts_at?: string; - status?: Database['public']['Enums']['subscription_status']; - trial_ends_at?: string | null; - trial_starts_at?: string | null; - updated_at?: string; - }; - Relationships: [ - { - foreignKeyName: 'subscriptions_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'accounts'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'subscriptions_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_account_workspace'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'subscriptions_account_id_fkey'; - columns: ['account_id']; - isOneToOne: false; - referencedRelation: 'user_accounts'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 'subscriptions_billing_customer_id_fkey'; - columns: ['billing_customer_id']; - isOneToOne: false; - referencedRelation: 'billing_customers'; - referencedColumns: ['id']; - }, - ]; - }; - }; - Views: { - user_account_workspace: { - Row: { - id: string | null; - name: string | null; - picture_url: string | null; - subscription_status: - | Database['public']['Enums']['subscription_status'] - | null; - }; - Relationships: []; - }; - user_accounts: { - Row: { - id: string | null; - name: string | null; - picture_url: string | null; - role: string | null; - slug: string | null; - }; - Relationships: [ - { - foreignKeyName: 'accounts_memberships_account_role_fkey'; - columns: ['role']; - isOneToOne: false; - referencedRelation: 'roles'; - referencedColumns: ['name']; - }, - ]; - }; - }; - Functions: { - accept_invitation: { - Args: { - token: string; - user_id: string; - }; - Returns: string; - }; - add_invitations_to_account: { - Args: { - account_slug: string; - invitations: Database['public']['CompositeTypes']['invitation'][]; - }; - Returns: Database['public']['Tables']['invitations']['Row'][]; - }; - can_action_account_member: { - Args: { - target_team_account_id: string; - target_user_id: string; - }; - Returns: boolean; - }; - create_invitation: { - Args: { - account_id: string; - email: string; - role: string; - }; - Returns: { - account_id: string; - created_at: string; - email: string; - expires_at: string; - id: number; - invite_token: string; - invited_by: string; - role: string; - updated_at: string; - }; - }; - create_nonce: { - Args: { - p_user_id?: string; - p_purpose?: string; - p_expires_in_seconds?: number; - p_metadata?: Json; - p_description?: string; - p_tags?: string[]; - p_scopes?: string[]; - p_revoke_previous?: boolean; - }; - Returns: Json; - }; - create_team_account: { - Args: { - account_name: string; - }; - Returns: { - created_at: string | null; - created_by: string | null; - email: string | null; - id: string; - is_personal_account: boolean; - name: string; - picture_url: string | null; - primary_owner_user_id: string; - public_data: Json; - slug: string | null; - updated_at: string | null; - updated_by: string | null; - }; - }; - get_account_invitations: { - Args: { - account_slug: string; - }; - Returns: { - id: number; - email: string; - account_id: string; - invited_by: string; - role: string; - created_at: string; - updated_at: string; - expires_at: string; - inviter_name: string; - inviter_email: string; - }[]; - }; - get_account_members: { - Args: { - account_slug: string; - }; - Returns: { - id: string; - user_id: string; - account_id: string; - role: string; - role_hierarchy_level: number; - primary_owner_user_id: string; - name: string; - email: string; - picture_url: string; - created_at: string; - updated_at: string; - }[]; - }; - get_config: { - Args: Record; - Returns: Json; - }; - get_nonce_status: { - Args: { - p_id: string; - }; - Returns: Json; - }; - get_upper_system_role: { - Args: Record; - Returns: string; - }; - has_active_subscription: { - Args: { - target_account_id: string; - }; - Returns: boolean; - }; - has_more_elevated_role: { - Args: { - target_user_id: string; - target_account_id: string; - role_name: string; - }; - Returns: boolean; - }; - has_permission: { - Args: { - user_id: string; - account_id: string; - permission_name: Database['public']['Enums']['app_permissions']; - }; - Returns: boolean; - }; - has_role_on_account: { - Args: { - account_id: string; - account_role?: string; - }; - Returns: boolean; - }; - has_same_role_hierarchy_level: { - Args: { - target_user_id: string; - target_account_id: string; - role_name: string; - }; - Returns: boolean; - }; - install_extensions: { - Args: Record; - Returns: undefined; - }; - is_aal2: { - Args: Record; - Returns: boolean; - }; - is_account_owner: { - Args: { - account_id: string; - }; - Returns: boolean; - }; - is_account_team_member: { - Args: { - target_account_id: string; - }; - Returns: boolean; - }; - is_mfa_compliant: { - Args: Record; - Returns: boolean; - }; - is_set: { - Args: { - field_name: string; - }; - Returns: boolean; - }; - is_super_admin: { - Args: Record; - Returns: boolean; - }; - is_team_member: { - Args: { - account_id: string; - user_id: string; - }; - Returns: boolean; - }; - revoke_nonce: { - Args: { - p_id: string; - p_reason?: string; - }; - Returns: boolean; - }; - team_account_workspace: { - Args: { - account_slug: string; - }; - Returns: { - id: string; - name: string; - picture_url: string; - slug: string; - role: string; - role_hierarchy_level: number; - primary_owner_user_id: string; - subscription_status: Database['public']['Enums']['subscription_status']; - permissions: Database['public']['Enums']['app_permissions'][]; - }[]; - }; - transfer_team_account_ownership: { - Args: { - target_account_id: string; - new_owner_id: string; - }; - Returns: undefined; - }; - upsert_order: { - Args: { - target_account_id: string; - target_customer_id: string; - target_order_id: string; - status: Database['public']['Enums']['payment_status']; - billing_provider: Database['public']['Enums']['billing_provider']; - total_amount: number; - currency: string; - line_items: Json; - }; - Returns: { - account_id: string; - billing_customer_id: number; - billing_provider: Database['public']['Enums']['billing_provider']; - created_at: string; - currency: string; - id: string; - status: Database['public']['Enums']['payment_status']; - total_amount: number; - updated_at: string; - }; - }; - upsert_subscription: { - Args: { - target_account_id: string; - target_customer_id: string; - target_subscription_id: string; - active: boolean; - status: Database['public']['Enums']['subscription_status']; - billing_provider: Database['public']['Enums']['billing_provider']; - cancel_at_period_end: boolean; - currency: string; - period_starts_at: string; - period_ends_at: string; - line_items: Json; - trial_starts_at?: string; - trial_ends_at?: string; - }; - Returns: { - account_id: string; - active: boolean; - billing_customer_id: number; - billing_provider: Database['public']['Enums']['billing_provider']; - cancel_at_period_end: boolean; - created_at: string; - currency: string; - id: string; - period_ends_at: string; - period_starts_at: string; - status: Database['public']['Enums']['subscription_status']; - trial_ends_at: string | null; - trial_starts_at: string | null; - updated_at: string; - }; - }; - verify_nonce: { - Args: { - p_token: string; - p_purpose: string; - p_user_id?: string; - p_required_scopes?: string[]; - p_max_verification_attempts?: number; - p_ip?: unknown; - p_user_agent?: string; - }; - Returns: Json; - }; - }; - Enums: { - app_permissions: - | 'roles.manage' - | 'billing.manage' - | 'settings.manage' - | 'members.manage' - | 'invites.manage'; - billing_provider: 'stripe' | 'lemon-squeezy' | 'paddle'; - notification_channel: 'in_app' | 'email'; - notification_type: 'info' | 'warning' | 'error'; - payment_status: 'pending' | 'succeeded' | 'failed'; - subscription_item_type: 'flat' | 'per_seat' | 'metered'; - subscription_status: - | 'active' - | 'trialing' - | 'past_due' - | 'canceled' - | 'unpaid' - | 'incomplete' - | 'incomplete_expired' - | 'paused'; - }; - CompositeTypes: { - invitation: { - email: string | null; - role: string | null; - }; - }; - }; - storage: { - Tables: { - buckets: { - Row: { - allowed_mime_types: string[] | null; - avif_autodetection: boolean | null; - created_at: string | null; - file_size_limit: number | null; - id: string; - name: string; - owner: string | null; - owner_id: string | null; - public: boolean | null; - updated_at: string | null; - }; - Insert: { - allowed_mime_types?: string[] | null; - avif_autodetection?: boolean | null; - created_at?: string | null; - file_size_limit?: number | null; - id: string; - name: string; - owner?: string | null; - owner_id?: string | null; - public?: boolean | null; - updated_at?: string | null; - }; - Update: { - allowed_mime_types?: string[] | null; - avif_autodetection?: boolean | null; - created_at?: string | null; - file_size_limit?: number | null; - id?: string; - name?: string; - owner?: string | null; - owner_id?: string | null; - public?: boolean | null; - updated_at?: string | null; - }; - Relationships: []; - }; - migrations: { - Row: { - executed_at: string | null; - hash: string; - id: number; - name: string; - }; - Insert: { - executed_at?: string | null; - hash: string; - id: number; - name: string; - }; - Update: { - executed_at?: string | null; - hash?: string; - id?: number; - name?: string; - }; - Relationships: []; - }; - objects: { - Row: { - bucket_id: string | null; - created_at: string | null; - id: string; - last_accessed_at: string | null; - metadata: Json | null; - name: string | null; - owner: string | null; - owner_id: string | null; - path_tokens: string[] | null; - updated_at: string | null; - user_metadata: Json | null; - version: string | null; - }; - Insert: { - bucket_id?: string | null; - created_at?: string | null; - id?: string; - last_accessed_at?: string | null; - metadata?: Json | null; - name?: string | null; - owner?: string | null; - owner_id?: string | null; - path_tokens?: string[] | null; - updated_at?: string | null; - user_metadata?: Json | null; - version?: string | null; - }; - Update: { - bucket_id?: string | null; - created_at?: string | null; - id?: string; - last_accessed_at?: string | null; - metadata?: Json | null; - name?: string | null; - owner?: string | null; - owner_id?: string | null; - path_tokens?: string[] | null; - updated_at?: string | null; - user_metadata?: Json | null; - version?: string | null; - }; - Relationships: [ - { - foreignKeyName: 'objects_bucketId_fkey'; - columns: ['bucket_id']; - isOneToOne: false; - referencedRelation: 'buckets'; - referencedColumns: ['id']; - }, - ]; - }; - s3_multipart_uploads: { - Row: { - bucket_id: string; - created_at: string; - id: string; - in_progress_size: number; - key: string; - owner_id: string | null; - upload_signature: string; - user_metadata: Json | null; - version: string; - }; - Insert: { - bucket_id: string; - created_at?: string; - id: string; - in_progress_size?: number; - key: string; - owner_id?: string | null; - upload_signature: string; - user_metadata?: Json | null; - version: string; - }; - Update: { - bucket_id?: string; - created_at?: string; - id?: string; - in_progress_size?: number; - key?: string; - owner_id?: string | null; - upload_signature?: string; - user_metadata?: Json | null; - version?: string; - }; - Relationships: [ - { - foreignKeyName: 's3_multipart_uploads_bucket_id_fkey'; - columns: ['bucket_id']; - isOneToOne: false; - referencedRelation: 'buckets'; - referencedColumns: ['id']; - }, - ]; - }; - s3_multipart_uploads_parts: { - Row: { - bucket_id: string; - created_at: string; - etag: string; - id: string; - key: string; - owner_id: string | null; - part_number: number; - size: number; - upload_id: string; - version: string; - }; - Insert: { - bucket_id: string; - created_at?: string; - etag: string; - id?: string; - key: string; - owner_id?: string | null; - part_number: number; - size?: number; - upload_id: string; - version: string; - }; - Update: { - bucket_id?: string; - created_at?: string; - etag?: string; - id?: string; - key?: string; - owner_id?: string | null; - part_number?: number; - size?: number; - upload_id?: string; - version?: string; - }; - Relationships: [ - { - foreignKeyName: 's3_multipart_uploads_parts_bucket_id_fkey'; - columns: ['bucket_id']; - isOneToOne: false; - referencedRelation: 'buckets'; - referencedColumns: ['id']; - }, - { - foreignKeyName: 's3_multipart_uploads_parts_upload_id_fkey'; - columns: ['upload_id']; - isOneToOne: false; - referencedRelation: 's3_multipart_uploads'; - referencedColumns: ['id']; - }, - ]; - }; - }; - Views: { - [_ in never]: never; - }; - Functions: { - can_insert_object: { - Args: { - bucketid: string; - name: string; - owner: string; - metadata: Json; - }; - Returns: undefined; - }; - extension: { - Args: { - name: string; - }; - Returns: string; - }; - filename: { - Args: { - name: string; - }; - Returns: string; - }; - foldername: { - Args: { - name: string; - }; - Returns: string[]; - }; - get_size_by_bucket: { - Args: Record; - Returns: { - size: number; - bucket_id: string; - }[]; - }; - list_multipart_uploads_with_delimiter: { - Args: { - bucket_id: string; - prefix_param: string; - delimiter_param: string; - max_keys?: number; - next_key_token?: string; - next_upload_token?: string; - }; - Returns: { - key: string; - id: string; - created_at: string; - }[]; - }; - list_objects_with_delimiter: { - Args: { - bucket_id: string; - prefix_param: string; - delimiter_param: string; - max_keys?: number; - start_after?: string; - next_token?: string; - }; - Returns: { - name: string; - id: string; - metadata: Json; - updated_at: string; - }[]; - }; - operation: { - Args: Record; - Returns: string; - }; - search: { - Args: { - prefix: string; - bucketname: string; - limits?: number; - levels?: number; - offsets?: number; - search?: string; - sortcolumn?: string; - sortorder?: string; - }; - Returns: { - name: string; - id: string; - updated_at: string; - created_at: string; - last_accessed_at: string; - metadata: Json; - }[]; - }; - }; - Enums: { - [_ in never]: never; - }; - CompositeTypes: { - [_ in never]: never; - }; - }; -}; - -type PublicSchema = Database[Extract]; - -export type Tables< - PublicTableNameOrOptions extends - | keyof (PublicSchema['Tables'] & PublicSchema['Views']) - | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } - ? keyof (Database[PublicTableNameOrOptions['schema']]['Tables'] & - Database[PublicTableNameOrOptions['schema']]['Views']) - : never = never, -> = PublicTableNameOrOptions extends { schema: keyof Database } - ? (Database[PublicTableNameOrOptions['schema']]['Tables'] & - Database[PublicTableNameOrOptions['schema']]['Views'])[TableName] extends { - Row: infer R; - } - ? R - : never - : PublicTableNameOrOptions extends keyof (PublicSchema['Tables'] & - PublicSchema['Views']) - ? (PublicSchema['Tables'] & - PublicSchema['Views'])[PublicTableNameOrOptions] extends { - Row: infer R; - } - ? R - : never - : never; - -export type TablesInsert< - PublicTableNameOrOptions extends - | keyof PublicSchema['Tables'] - | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } - ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] - : never = never, -> = PublicTableNameOrOptions extends { schema: keyof Database } - ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { - Insert: infer I; - } - ? I - : never - : PublicTableNameOrOptions extends keyof PublicSchema['Tables'] - ? PublicSchema['Tables'][PublicTableNameOrOptions] extends { - Insert: infer I; - } - ? I - : never - : never; - -export type TablesUpdate< - PublicTableNameOrOptions extends - | keyof PublicSchema['Tables'] - | { schema: keyof Database }, - TableName extends PublicTableNameOrOptions extends { schema: keyof Database } - ? keyof Database[PublicTableNameOrOptions['schema']]['Tables'] - : never = never, -> = PublicTableNameOrOptions extends { schema: keyof Database } - ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends { - Update: infer U; - } - ? U - : never - : PublicTableNameOrOptions extends keyof PublicSchema['Tables'] - ? PublicSchema['Tables'][PublicTableNameOrOptions] extends { - Update: infer U; - } - ? U - : never - : never; - -export type Enums< - PublicEnumNameOrOptions extends - | keyof PublicSchema['Enums'] - | { schema: keyof Database }, - EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database } - ? keyof Database[PublicEnumNameOrOptions['schema']]['Enums'] - : never = never, -> = PublicEnumNameOrOptions extends { schema: keyof Database } - ? Database[PublicEnumNameOrOptions['schema']]['Enums'][EnumName] - : PublicEnumNameOrOptions extends keyof PublicSchema['Enums'] - ? PublicSchema['Enums'][PublicEnumNameOrOptions] - : never; - -export type CompositeTypes< - PublicCompositeTypeNameOrOptions extends - | keyof PublicSchema['CompositeTypes'] - | { schema: keyof Database }, - CompositeTypeName extends PublicCompositeTypeNameOrOptions extends { - schema: keyof Database; - } - ? keyof Database[PublicCompositeTypeNameOrOptions['schema']]['CompositeTypes'] - : never = never, -> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database } - ? Database[PublicCompositeTypeNameOrOptions['schema']]['CompositeTypes'][CompositeTypeName] - : PublicCompositeTypeNameOrOptions extends keyof PublicSchema['CompositeTypes'] - ? PublicSchema['CompositeTypes'][PublicCompositeTypeNameOrOptions] - : never; diff --git a/packages/ui/src/shadcn/button.tsx b/packages/ui/src/shadcn/button.tsx index 6210a54..4b6c138 100644 --- a/packages/ui/src/shadcn/button.tsx +++ b/packages/ui/src/shadcn/button.tsx @@ -23,7 +23,7 @@ const buttonVariants = cva( link: 'decoration-primary underline-offset-4 hover:underline', }, size: { - default: 'h-9 px-4 py-2', + default: 'h-10 mt-0 py-2 px-8', sm: 'h-8 rounded-md px-3 text-xs', lg: 'h-10 rounded-md px-8', icon: 'h-9 w-9', diff --git a/packages/ui/src/shadcn/dialog.tsx b/packages/ui/src/shadcn/dialog.tsx index 5870ca2..b4ae4ae 100644 --- a/packages/ui/src/shadcn/dialog.tsx +++ b/packages/ui/src/shadcn/dialog.tsx @@ -20,7 +20,7 @@ const DialogOverlay: React.FC< > = ({ className, ...props }) => ( = ({ className, ...props }) => ( = ({ - - - -Created by potrace 1.14, written by Peter Selinger 2001-2017 - - - - + + diff --git a/public/images/favicon/site.webmanifest b/public/images/favicon/site.webmanifest index 0012322..aed9405 100644 --- a/public/images/favicon/site.webmanifest +++ b/public/images/favicon/site.webmanifest @@ -1,6 +1,6 @@ { - "name": "Makerkit", - "short_name": "makerkit", + "name": "Med Report", + "short_name": "medreport", "theme_color": "#fff", "background_color": "#fff", "display": "fullscreen", diff --git a/styles/STYLE_GUIDE.md b/styles/STYLE_GUIDE.md new file mode 100644 index 0000000..87d577f --- /dev/null +++ b/styles/STYLE_GUIDE.md @@ -0,0 +1,67 @@ +# MedReport Design System +## Tokens +### Spacing - gaps +```css +--spacing: 0.25rem; /* 1rem = 16px styles/shadcn-ui.css */ +``` + +```css +gap = --spacing * key +``` +| Key | Value (px) | +|-----|------------| +| 0 | 0 | +| 1 | 4 | +| 2 | 8 | +| 3 | 12 | +| 4 | 16 | +| 5 | 20 | +| 6 | 24 | +| 7 | 28 | +| 8 | 32 | +| 9 | 36 | +| 10 | 40 | +| 11 | 44 | +| 12 | 48 | + +Use as `gap-[key]`, e.g. `gap-7` + +### Radius +```css + --radius: 1rem; /* 16px - styles/shadcn-ui.css */ + --radius-radius: var(--radius); /* styles/theme.css */ + + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); +``` + +```css + .rounded-md { + border-radius: var(--radius-md); + } +``` + +| Class | Radius | +|---------------|-------------| +| rounded-sm | 12 | +| rounded-md | 14 | +| rounded-lg | 16 | +| rounded-xl | 20 | +| rounded-full | 9999 | + +### Custom colors + +All color tokens from [MedReport Design System](https://www.figma.com/design/eJfnhLYy7IP7ARVhmtEPPY/Medreport---Design-system?node-id=70-115&p=f&vars=1&var-id=3269-10748&m=dev) are defined here: + +```styles/shadcn-ui.css``` - colors scheme, global variables, classes +```styles/theme.css``` - color definition for all properties + +Example of usage +```css + --color-text-foreground -> className="[property name]-text-foreground" -> className="text-text-foreground", border-text-foreground +``` + + + + diff --git a/styles/globals.css b/styles/globals.css index 2ee21cd..530eefc 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -32,7 +32,6 @@ body { @apply bg-background text-foreground; font-feature-settings: "rlig" 1, "calt" 1; - /* @apply font-sans */ } *, diff --git a/styles/shadcn-ui.css b/styles/shadcn-ui.css index 1493bbd..4286334 100644 --- a/styles/shadcn-ui.css +++ b/styles/shadcn-ui.css @@ -11,35 +11,64 @@ --font-sans: var(--font-sans) -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --font-heading: var(--font-heading); - --background: var(--color-white); + --background: hsla(0, 0%, 100%, 1); --foreground: hsla(240, 10%, 4%, 1); + --foreground-50: hsla(240, 10%, 4%, 0.5); + + --background-90: hsla(0, 0%, 100%, 0.9); + --background-80: hsla(0, 0%, 100%, 0.8); --card: var(--color-white); --card-foreground: var(--color-neutral-950); - --popover: var(--color-white); + --popover: hsla(0, 0%, 100%, 1); --popover-foreground: hsla(240, 10%, 4%, 1); --primary: hsla(145, 78%, 18%, 1); --primary-foreground: hsla(356, 100%, 97%, 1); + --primary-90: hsla(145, 78%, 18%, 0.9); + --primary-80: hsla(145, 78%, 18%, 0.8); + --primary-50: hsla(145, 78%, 18%, 0.5); + --primary-20: hsla(145, 78%, 18%, 0.2); + --primary-10: hsla(145, 78%, 18%, 0.1); + --secondary: hsla(240, 5%, 96%, 1); --secondary-foreground: hsla(240, 6%, 10%, 1); + + --secondary-90: hsla(240, 5%, 96%, 0.9); + --secondary-80: hsla(240, 5%, 96%, 0.8); + --muted: hsla(240, 5%, 96%, 1); --muted-foreground: hsla(240, 4%, 41%, 1); + --muted-90: hsla(240, 5%, 96%, 0.9); + --muted-80: hsla(240, 5%, 96%, 0.8); + --muted-50: hsla(240, 5%, 96%, 0.5); + --muted-40: hsla(240, 5%, 96%, 0.4); + --accent: hsla(240, 5%, 96%, 1); --accent-foreground: hsla(240, 6%, 10%, 1); + --accent-90: hsla(240, 5%, 96%, 0.9); + --accent-80: hsla(240, 5%, 96%, 0.8); + --accent-50: hsla(240, 5%, 96%, 0.5); + --destructive: hsla(0, 84%, 60%, 1); --destructive-foreground: hsla(0, 0%, 98%, 1); - --border: hsla(240, 6%, 90%, 1); + --destructiv-90: hsla(0, 84%, 60%, 0.9); + --destructiv-80: hsla(0, 84%, 60%, 0.8); + --destructiv-50: hsla(0, 84%, 60%, 0.5); + + + --border: hsla(240, 6%, 90%, 1); --input: hsla(240, 6%, 90%, 1); --ring: var(--color-neutral-800); - --radius: 1rem; + --radius: calc(1rem); + --spacing: 0.25rem; --chart-1: var(--color-orange-400); --chart-2: var(--color-teal-600); @@ -47,15 +76,14 @@ --chart-4: var(--color-yellow-200); --chart-5: var(--color-orange-200); - --sidebar-background: var(--color-neutral-50); - --sidebar-foreground: oklch(37.05% 0.012 285.8); - --sidebar-primary: var(--color-neutral-950); + --sidebar-background: var(--background); + --sidebar-foreground: var(--foreground); + --sidebar-primary: var(--primary); --sidebar-primary-foreground: var(--color-white); - --sidebar-accent: var(--color-neutral-100); - --sidebar-accent-foreground: var(--color-neutral-950); + --sidebar-accent: var(--secondary); + --sidebar-accent-foreground: var(--secondary-foreground); --sidebar-border: var(--border); - --sidebar-ring: var(--color-blue-500); - /* --foreground: 240 10% 4%; */ + --sidebar-ring: var(--ring); } .dark { diff --git a/styles/theme.css b/styles/theme.css index df2155d..efe60af 100644 --- a/styles/theme.css +++ b/styles/theme.css @@ -43,17 +43,74 @@ --color-chart-4: var(--chart-4); --color-chart-5: var(--chart-5); + /* text colors */ + --color-text-foreground: var(--foreground); + --color-text-primary: var(--primary); + --color-text-primary-foreground: var(--primary-foreground); + --color-text-secondary: var(--secondary); + --color-text-secondary-foreground: var(--secondary-foreground); + --color-text-muted: var(--muted); + --color-text-muted-foreground: var(--muted-foreground); + --color-text-accent: var(--accent); + --color-text-accent-foreground: var(--accent-foreground); + --color-text-destructive: var(--destructive); + --color-text-destructive-foreground: var(--destructive-foreground); + --color-text-popover-foreground: var(--popover-foreground); + + /* background colors */ + --color-bg-background: var(--background); + --color-bg-background-90: var(--background-90); + --color-bg-background-80: var(--background-80); + --color-bg-primary: var(--primary); + --color-bg-primary-90: var(--primary-90); + --color-bg-primary-80: var(--primary-80); + --color-bg-primary-20: var(--primary-20); + --color-bg-primary-10: var(--primary-10); + --color-bg-secondary: var(--secondary); + --color-bg-secondary-90: var(--secondary-90); + --color-bg-secondary-80: var(--secondary-80); + --color-bg-destructive: var(--destructive); + --color-bg-destructive-90: var(--destructive-90); + --color-bg-destructive-80: var(--destructive-80); + --color-bg-accent: var(--accent); + --color-bg-accent-90: var(--accent-90); + --color-bg-accent-80: var(--accent-80); + --color-bg-accent-50: var(--accent-50); + --color-bg-muted: var(--muted); + --color-bg-muted-90: var(--muted-90); + --color-bg-muted-80: var(--muted-80); + --color-bg-muted-50: var(--muted-50); + --color-bg-popover: var(--popover); + --color-bg-border: var(--border); + --color-bg-input: var(--input); + + /* border colors */ + --color-border-border: var(--border); + --color-border-foreground: var(--foreground); + --color-border-foreground-50: var(--foreground-50); + --color-border-input: var(--input); + --color-border-ring: var(--ring); + + --color-border-primary: var(--primary); + --color-border-primary-50: var(--primary-50); + --color-border-primary-foreground: var(--primary-foreground); + + --color-border-destructive: var(--destructive-50); + --color-border-toast-destructive: var(--muted-40); + --color-border-muted: var(--muted); + --radius-radius: var(--radius); - --radius-sm: calc(var(--radius) - 4px); - --radius-md: calc(var(--radius) - 2px); - --radius-lg: var(--radius); + --radius-sm: calc(var(--radius) - 2px); + --radius-md: var(--radius); + --radius-lg: calc(var(--radius) + 2px); + --radius-xl: calc(var(--radius) + 4px); --font-sans: -apple-system, var(--font-sans); --font-heading: var(--font-heading); --color-sidebar: var(--sidebar-background); - --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar-foreground: var(--color-text-foreground); --color-sidebar-primary: var(--sidebar-primary); --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); --color-sidebar-accent: var(--sidebar-accent); diff --git a/supabase/config.toml b/supabase/config.toml index 4483207..9bfa6df 100644 --- a/supabase/config.toml +++ b/supabase/config.toml @@ -7,7 +7,7 @@ project_id = "MRB2B" [api] enabled = true # Port to use for the API URL. -port = 54321 +port = 55321 # Schemas to expose in your API. Tables, views and stored procedures in this schema will get API # endpoints. `public` and `graphql_public` schemas are included by default. schemas = ["public", "graphql_public", "audit"] @@ -33,7 +33,7 @@ major_version = 15 [db.pooler] enabled = false # Port to use for the local connection pooler. -port = 54329 +port = 55329 # Specifies when a server connection can be reused by other clients. # Configure one of the supported pooler modes: `transaction`, `session`. pool_mode = "transaction" @@ -67,7 +67,7 @@ enabled = true [studio] enabled = true # Port to use for Supabase Studio. -port = 54323 +port = 55323 # External URL of the API server that frontend connects to. api_url = "http://127.0.0.1" # OpenAI API Key to use for Supabase AI in the Supabase Studio. @@ -78,7 +78,7 @@ openai_api_key = "env(OPENAI_API_KEY)" [inbucket] enabled = true # Port to use for the email testing server web interface. -port = 54324 +port = 55324 # Uncomment to expose additional ports for testing user applications that send emails. # smtp_port = 54325 # pop3_port = 54326 @@ -290,7 +290,7 @@ deno_version = 1 [analytics] enabled = true -port = 54327 +port = 55327 # Configure one of the supported backends: `postgres`, `bigquery`. backend = "postgres"