mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-02 03:38:22 +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:
8
hooks/use-formula.ts
Normal file
8
hooks/use-formula.ts
Normal file
@ -0,0 +1,8 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/lib/db";
|
||||
|
||||
export async function useFormula() {
|
||||
const formula = await prisma.billFormula.findFirst();
|
||||
return formula;
|
||||
}
|
Reference in New Issue
Block a user