mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-15 21:03:21 +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:
@ -41,6 +41,7 @@ model User {
|
||||
lang String?
|
||||
atollId String?
|
||||
islandId String?
|
||||
Bill Payment[]
|
||||
|
||||
@@map("user")
|
||||
}
|
||||
@ -108,12 +109,36 @@ model Island {
|
||||
}
|
||||
|
||||
model Device {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
mac String
|
||||
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
mac String
|
||||
isActive Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
User User? @relation(fields: [userId], references: [id])
|
||||
userId String?
|
||||
Bill Payment? @relation(fields: [billId], references: [id])
|
||||
billId String?
|
||||
}
|
||||
|
||||
model Payment {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
amount Int
|
||||
paid Boolean @default(false)
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
devices Device[]
|
||||
userId String
|
||||
}
|
||||
|
||||
model BillFormula {
|
||||
id String @id @default(cuid())
|
||||
formula String
|
||||
baseAmount Float
|
||||
discountPercentage Float
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
Reference in New Issue
Block a user