Skip to content

Instantly share code, notes, and snippets.

View Ahasra's full-sized avatar

Ahasra Ahasra

  • Muğla
View GitHub Profile
import React, { useState, useEffect } from 'react';
import { ChevronLeft, Plus, Trash2, Edit2, Search, FileText, Truck, Package, Clock, CheckCircle, AlertCircle } from 'lucide-react';
// IndexedDB Setup
const DB_NAME = 'WorkshopDB';
const DB_VERSION = 1;
const initDB = () => {
return new Promise((resolve, reject) => {
const request = indexedDB.open(DB_NAME, DB_VERSION);
request.onerror = () => reject(request.error);
request.onsuccess = () => resolve(request.result);