Compare commits

..

No commits in common. "4985c46814f0a6e56a27ce4d4bd48f1fff4eae61" and "649d56f992528ba742a2f415118d6dd38aa954bd" have entirely different histories.

6 changed files with 9 additions and 53 deletions

View File

@ -14,9 +14,8 @@ describe('DATABASE', () => {
})
it('create csv', () => {
let res = create_csv_database('csv_db/x.csv', { "a_key": ['initial'], "a_value": [''] })
let res = create_csv_database('csv_db/x.csv', { "a_key": [], "a_value": [] })
print_head(res)
delete_row_by_key(res, "initial", "a_key")
add_row(res, { "a_key": ["x"], "a_value": ["y"] })
print_head(res)

View File

@ -17,7 +17,7 @@ export function save_db(db: CSVDatabase) {
}
export function add_row(db: CSVDatabase, row: any) {
let d = DataFrame(row)
let d = DataFrame([row])
db.df = db.df.vstack(d)
}

View File

@ -1,49 +0,0 @@
import { Container } from '@mantine/core'
import { Flex, Button } from '@mantine/core'
import React from "react"
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 InventoryPage() {
const demoProps = {
bg: 'var(--mantine-color-blue-light)',
h: 50,
mt: 'md',
}
return (
<>
<Container {...demoProps}>Default Container</Container>
<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>
</>
)
}

View File

@ -42,6 +42,7 @@ export function create_inventory_dataframe(inventories: Inventory[]): CSVDatabas
return create_csv_database(filepath, inventories)
}
function create_models() {
const items: Item[] = [
{ id: '1', name: 'Item 1', price: 100 },

View File

@ -0,0 +1,6 @@
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
}

View File

@ -1,2 +1 @@
a_key,a_value
x,y

1 a_key a_value
x y