Initial commit

This commit is contained in:
Vivek 2026-06-08 04:48:20 +00:00
commit 3a31201c3e
11 changed files with 101 additions and 0 deletions

0
index.html Normal file
View file

26
package.json Normal file
View file

@ -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"
}
}

6
postcss.config.js Normal file
View file

@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

0
src/App.tsx Normal file
View file

View file

View file

0
src/index.css Normal file
View file

3
src/lib/supabase.ts Normal file
View file

@ -0,0 +1,3 @@
const supabase = createClient('https://your-project.supabase.co', 'your-anon-key');
export default supabase;

10
src/main.tsx Normal file
View file

@ -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(
<React.StrictMode>
<App />
</React.StrictMode>
);

48
src/types/index.ts Normal file
View file

@ -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<Load, 'id' | 'created_at' | 'updated_at'>;
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;

8
tailwind.config.js Normal file
View file

@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
}