mirror of
				https://github.com/i701/sarlink-portal.git
				synced 2025-11-04 06:26:59 +00:00 
			
		
		
		
	Enhance dashboard functionality with new payment and device management features
- Added new PaymentPage component for processing payments and displaying devices to pay. - Introduced DeviceDetails component for viewing individual device information. - Implemented PriceCalculator component for calculating costs based on user input. - Integrated Jotai for state management across components, including device cart functionality. - Updated layout to include Jotai Provider for state management. - Enhanced DevicesTable with AddDevicesToCartButton for adding devices to the cart. - Refactored sidebar to include a link to the new Price Calculator page. - Updated Prisma schema to include Payment and BillFormula models for better data handling. - Added new UI components for device cart management and drawer functionality. - Improved overall user experience with responsive design adjustments and new UI elements.
This commit is contained in:
		
							
								
								
									
										29
									
								
								prisma/migrations/20241205155316_add/migration.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								prisma/migrations/20241205155316_add/migration.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
-- AlterTable
 | 
			
		||||
ALTER TABLE "user" ADD COLUMN     "policyAccepted" BOOLEAN NOT NULL DEFAULT false,
 | 
			
		||||
ADD COLUMN     "termsAccepted" BOOLEAN NOT NULL DEFAULT false;
 | 
			
		||||
 | 
			
		||||
-- CreateTable
 | 
			
		||||
CREATE TABLE "Bill" (
 | 
			
		||||
    "id" TEXT NOT NULL,
 | 
			
		||||
    "name" TEXT NOT NULL,
 | 
			
		||||
    "amount" INTEGER NOT NULL,
 | 
			
		||||
    "paid" BOOLEAN NOT NULL DEFAULT false,
 | 
			
		||||
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
 | 
			
		||||
    "updatedAt" TIMESTAMP(3) NOT NULL,
 | 
			
		||||
    "deviceId" TEXT,
 | 
			
		||||
 | 
			
		||||
    CONSTRAINT "Bill_pkey" PRIMARY KEY ("id")
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
-- CreateTable
 | 
			
		||||
CREATE TABLE "BillFormula" (
 | 
			
		||||
    "id" TEXT NOT NULL,
 | 
			
		||||
    "formula" TEXT NOT NULL,
 | 
			
		||||
    "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
 | 
			
		||||
    "updatedAt" TIMESTAMP(3) NOT NULL,
 | 
			
		||||
 | 
			
		||||
    CONSTRAINT "BillFormula_pkey" PRIMARY KEY ("id")
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
-- AddForeignKey
 | 
			
		||||
ALTER TABLE "Bill" ADD CONSTRAINT "Bill_deviceId_fkey" FOREIGN KEY ("deviceId") REFERENCES "Device"("id") ON DELETE SET NULL ON UPDATE CASCADE;
 | 
			
		||||
		Reference in New Issue
	
	Block a user