commit 3a31201c3e7876e4043db7456363ecad79139d96 Author: Vivek Date: Mon Jun 8 04:48:20 2026 +0000 Initial commit diff --git a/index.html b/index.html new file mode 100644 index 0000000..e69de29 diff --git a/package.json b/package.json new file mode 100644 index 0000000..3417bea --- /dev/null +++ b/package.json @@ -0,0 +1,26 @@ +{ + "name": "internal-freight-app", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "@supabase/supabase-js": "^2.39.0", + "@tanstack/react-query": "^5.28.0", + "@tanstack/react-table": "^8.15.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@types/react": "^18.2.24", + "@types/react-dom": "^18.2.8", + "autoprefixer": "^10.4.14", + "postcss": "^8.4.21", + "tailwindcss": "^3.3.2", + "vite": "^5.2.0", + "typescript": "^5.4.5" + } +} \ No newline at end of file diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..96bb01e --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/components/LoadForm.tsx b/src/components/LoadForm.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/components/LoadTable.tsx b/src/components/LoadTable.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/index.css b/src/index.css new file mode 100644 index 0000000..e69de29 diff --git a/src/lib/supabase.ts b/src/lib/supabase.ts new file mode 100644 index 0000000..0b33f76 --- /dev/null +++ b/src/lib/supabase.ts @@ -0,0 +1,3 @@ +const supabase = createClient('https://your-project.supabase.co', 'your-anon-key'); + +export default supabase; \ No newline at end of file diff --git a/src/main.tsx b/src/main.tsx new file mode 100644 index 0000000..bcaa4a0 --- /dev/null +++ b/src/main.tsx @@ -0,0 +1,10 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import App from './App.tsx'; +import './index.css'; + +ReactDOM.createRoot(document.getElementById('root')!).render( + + + +); \ No newline at end of file diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..192b11a --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,48 @@ +export interface Load { + id: string; + date: string | null; + status: string; + vehicle: string | null; + from: string | null; + via: string | null; + to: string | null; + shipper: string | null; + load_type: string | null; + item: string | null; + deliveries: string | null; + freight_charged: number | null; + advance_received: number | null; + paid_to_driver: number | null; + commission: number | null; + driver_freight: number | null; + pending_from_shipper: number | null; + pending_to_driver: number | null; + notes: string | null; + created_at?: string; + updated_at?: string; +} + +export type LoadFormData = Omit; + +export const STATUS_OPTIONS = [ + 'settled', + 'commission received', + 'commission adjusted', + 'commission due', + 'pending collection', + 'partially pending', + 'fully pending from shipper', + 'assigned vehicle', + 'loaded / in transit', + 'partial', + 'available vehicle', + 'pending lead', + 'handled directly by shipper', + 'reconciled', +] as const; + +export const LOAD_TYPE_OPTIONS = [ + 'Full load', + 'Part load', + 'Mixed / multi-drop', +] as const; \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..74769d1 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,8 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], + theme: { + extend: {}, + }, + plugins: [], +} \ No newline at end of file