autocommit 20-05-2024-07-50
This commit is contained in:
parent
fcecee03a4
commit
ac46869324
|
|
@ -1,8 +0,0 @@
|
||||||
'use client'
|
|
||||||
|
|
||||||
import { ChakraProvider } from '@chakra-ui/react'
|
|
||||||
import { CacheProvider } from '@chakra-ui/next-js'
|
|
||||||
|
|
||||||
export function Providers({ children }: { children: React.ReactNode }) {
|
|
||||||
return (<CacheProvider><ChakraProvider>{children}</ChakraProvider></CacheProvider>)
|
|
||||||
}
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
// point of sales core
|
|
||||||
|
|
||||||
interface Item {
|
|
||||||
id: string
|
|
||||||
name: string
|
|
||||||
price: number
|
|
||||||
// other properties...
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Sale {
|
|
||||||
id: string
|
|
||||||
itemId: string
|
|
||||||
quantity: number
|
|
||||||
timestamp: Date
|
|
||||||
// other properties...
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Inventory {
|
|
||||||
itemId: string
|
|
||||||
quantity: number
|
|
||||||
}
|
|
||||||
|
|
||||||
// import * as rocksdb from 'rocksdb'
|
|
||||||
|
|
||||||
// // Open a RocksDB database
|
|
||||||
// const db = open({ create_if_missing: true }, './mydb')
|
|
||||||
|
|
||||||
// // Put a key-value pair
|
|
||||||
// db.put('key', 'value', (err) => {
|
|
||||||
// if (err) throw err
|
|
||||||
// console.log('Key-value pair stored successfully')
|
|
||||||
// })
|
|
||||||
|
|
||||||
// // Get a value by key
|
|
||||||
// db.get('key', (err, value) => {
|
|
||||||
// if (err) throw err
|
|
||||||
// console.log('Retrieved value:', value)
|
|
||||||
// })
|
|
||||||
|
|
||||||
// // Close the database
|
|
||||||
// db.close((err) => {
|
|
||||||
// if (err) throw err
|
|
||||||
// console.log('Database closed')
|
|
||||||
// })
|
|
||||||
|
|
||||||
const level = require('level-rocksdb')
|
|
||||||
|
|
||||||
// 1) Create our database, supply location and options.
|
|
||||||
// This will create or open the underlying RocksDB store.
|
|
||||||
const db = level('./mydb')
|
|
||||||
|
|
||||||
// 2) Put a key & value
|
|
||||||
db.put('name', 'Level', function (err: any) {
|
|
||||||
if (err) return console.log('Ooops!', err) // some kind of I/O error
|
|
||||||
|
|
||||||
// 3) Fetch by key
|
|
||||||
db.get('name', function (err: any, value: any) {
|
|
||||||
if (err) return console.log('Ooops!', err) // likely the key was not found
|
|
||||||
|
|
||||||
// Ta da!
|
|
||||||
console.log('name=' + value)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
@ -1,20 +1,45 @@
|
||||||
import { fonts } from './fonts'
|
// import { fonts } from './fonts'
|
||||||
import { Inter } from 'next/font/google'
|
// import { Inter } from 'next/font/google'
|
||||||
import 'bootstrap/dist/css/bootstrap.min.css'
|
// import 'bootstrap/dist/css/bootstrap.min.css'
|
||||||
// import './tailwind.css'
|
|
||||||
// import { Providers } from './next-provider'
|
|
||||||
|
|
||||||
const inter = Inter({ subsets: ['latin'] })
|
// const inter = Inter({ subsets: ['latin'] })
|
||||||
|
|
||||||
|
// export default function RootLayout({
|
||||||
|
// children,
|
||||||
|
// }: {
|
||||||
|
// children: React.ReactNode,
|
||||||
|
// }) {
|
||||||
|
// return (
|
||||||
|
// <html lang='en' className={fonts.rubik.variable}>
|
||||||
|
// <body>
|
||||||
|
// {children}
|
||||||
|
// </body>
|
||||||
|
// </html>
|
||||||
|
// )
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
import '@mantine/core/styles.css'
|
||||||
|
|
||||||
|
import { ColorSchemeScript, MantineProvider } from '@mantine/core'
|
||||||
|
|
||||||
|
export const metadata = {
|
||||||
|
title: 'My Mantine app',
|
||||||
|
description: 'I have followed setup instructions carefully',
|
||||||
|
}
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
children,
|
children,
|
||||||
}: {
|
}: {
|
||||||
children: React.ReactNode,
|
children: React.ReactNode
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<html lang='en' className={fonts.rubik.variable}>
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<ColorSchemeScript />
|
||||||
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{children}
|
<MantineProvider>{children}</MantineProvider>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
// point of sales model core
|
||||||
|
|
||||||
|
interface Item {
|
||||||
|
id: string
|
||||||
|
name: string
|
||||||
|
price: number
|
||||||
|
// other properties...
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Sale {
|
||||||
|
id: string
|
||||||
|
itemId: string
|
||||||
|
quantity: number
|
||||||
|
timestamp: Date
|
||||||
|
// other properties...
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Inventory {
|
||||||
|
itemId: string
|
||||||
|
quantity: number
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
// app/providers.tsx
|
|
||||||
// 'use client'
|
|
||||||
|
|
||||||
import { NextUIProvider } from '@nextui-org/react'
|
import { NextUIProvider } from '@nextui-org/react'
|
||||||
|
|
||||||
export function Providers({ children }: { children: React.ReactNode }) {
|
export function Providers({ children }: { children: React.ReactNode }) {
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
// "use client"
|
||||||
|
|
||||||
|
import React from "react"
|
||||||
|
import { Button, Nav, Stack } from "react-bootstrap"
|
||||||
|
import 'bootstrap/dist/css/bootstrap.min.css'
|
||||||
|
import Link from "next/link"
|
||||||
|
|
||||||
|
const NavLink = (props: any) =>
|
||||||
|
<li className="nav-item">
|
||||||
|
<a className="nav-link" href={props.href}>
|
||||||
|
{props.children}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
const Text = (props: any) =>
|
||||||
|
<p>{props.children}</p>
|
||||||
|
|
||||||
|
export default function Page() {
|
||||||
|
return (
|
||||||
|
<Stack direction="horizontal" gap={1} style={{ padding: '1rem' }}>
|
||||||
|
<Stack gap={1} style={{ padding: '1rem' }}>
|
||||||
|
<Text>Point of Sale</Text>
|
||||||
|
<Nav className="flex-column">
|
||||||
|
<NavLink href="/stocks">
|
||||||
|
Stocks
|
||||||
|
</NavLink>
|
||||||
|
<NavLink href="/quantities">
|
||||||
|
Quantities
|
||||||
|
</NavLink>
|
||||||
|
<NavLink href="/inventory">
|
||||||
|
Inventory
|
||||||
|
</NavLink>
|
||||||
|
<NavLink href="/logs">
|
||||||
|
Logs
|
||||||
|
</NavLink>
|
||||||
|
<NavLink href="/receipts">
|
||||||
|
Receipts
|
||||||
|
</NavLink>
|
||||||
|
</Nav>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
<Stack gap={1} style={{ padding: '1rem', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
|
||||||
|
<Text>Stuff</Text>
|
||||||
|
<Button style={{ maxWidth: 'fit-content' }}>Submit THIS</Button>
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
// "use client"
|
import { Container } from '@mantine/core'
|
||||||
|
import { Flex, Button } from '@mantine/core'
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { Button, Nav, Stack } from "react-bootstrap"
|
|
||||||
import 'bootstrap/dist/css/bootstrap.min.css'
|
|
||||||
import Link from "next/link"
|
|
||||||
|
|
||||||
const NavLink = (props: any) =>
|
const NavLink = (props: any) =>
|
||||||
<li className="nav-item">
|
<li className="nav-item">
|
||||||
|
|
@ -16,33 +13,37 @@ const Text = (props: any) =>
|
||||||
<p>{props.children}</p>
|
<p>{props.children}</p>
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
const demoProps = {
|
||||||
<Stack direction="horizontal" gap={1} style={{ padding: '1rem' }}>
|
bg: 'var(--mantine-color-blue-light)',
|
||||||
<Stack gap={1} style={{ padding: '1rem' }}>
|
h: 50,
|
||||||
<Text>Point of Sale</Text>
|
mt: 'md',
|
||||||
<Nav className="flex-column">
|
}
|
||||||
<NavLink href="/stocks">
|
|
||||||
Stocks
|
|
||||||
</NavLink>
|
|
||||||
<NavLink href="/quantities">
|
|
||||||
Quantities
|
|
||||||
</NavLink>
|
|
||||||
<NavLink href="/inventory">
|
|
||||||
Inventory
|
|
||||||
</NavLink>
|
|
||||||
<NavLink href="/logs">
|
|
||||||
Logs
|
|
||||||
</NavLink>
|
|
||||||
<NavLink href="/receipts">
|
|
||||||
Receipts
|
|
||||||
</NavLink>
|
|
||||||
</Nav>
|
|
||||||
</Stack>
|
|
||||||
|
|
||||||
<Stack gap={1} style={{ padding: '1rem', width: '100%', justifyContent: 'center', alignItems: 'center' }}>
|
return (
|
||||||
<Text>Stuff</Text>
|
<>
|
||||||
<Button style={{ maxWidth: 'fit-content' }}>Submit THIS</Button>
|
<Container {...demoProps}>Default Container</Container>
|
||||||
</Stack>
|
|
||||||
</Stack>
|
<Container size="xs" {...demoProps}>
|
||||||
|
xs Container
|
||||||
|
</Container>
|
||||||
|
|
||||||
|
<Container px={0} size="30rem" {...demoProps}>
|
||||||
|
30rem Container without padding
|
||||||
|
</Container>
|
||||||
|
|
||||||
|
<Flex
|
||||||
|
mih={50}
|
||||||
|
bg="rgba(0, 0, 0, .3)"
|
||||||
|
gap="md"
|
||||||
|
justify="flex-start"
|
||||||
|
align="flex-start"
|
||||||
|
direction="row"
|
||||||
|
wrap="wrap"
|
||||||
|
>
|
||||||
|
<Button>Button 1</Button>
|
||||||
|
<Button>Button 2</Button>
|
||||||
|
<Button>Button 3</Button>
|
||||||
|
</Flex>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue