Skip to content

Commit

Permalink
feat: ✨ updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dfrnoch committed Sep 24, 2023
1 parent 149b111 commit af4e154
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 25 deletions.
File renamed without changes.
Binary file modified bun.lockb
Binary file not shown.
22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
},
"license": "MIT",
"dependencies": {
"motionone": "github:thetarnav/motionone#solid-improvements",
"@solid-primitives/i18n": "^1.4.1",
"@solid-primitives/i18n": "^2",
"@solidjs/router": "^0.8.3",
"@tauri-apps/api": "2.0.0-alpha.7",
"@tauri-apps/api": "2.0.0-alpha.8",
"@tauri-apps/plugin-app": "github:tauri-apps/tauri-plugin-app#v2",
"@tauri-apps/plugin-autostart": "github:tauri-apps/tauri-plugin-autostart#v2",
"@tauri-apps/plugin-clipboard-manager": "github:tauri-apps/tauri-plugin-clipboard-manager#v2",
Expand All @@ -26,18 +25,21 @@
"@tauri-apps/plugin-store": "github:tauri-apps/tauri-plugin-store#v2",
"@tauri-apps/plugin-updater": "github:tauri-apps/tauri-plugin-updater#v2",
"@tauri-apps/plugin-window": "github:tauri-apps/tauri-plugin-window#v2",
"@motionone/solid": "10.16",
"solid-chartjs": "^1.3.8",
"solid-headless": "^0.13.1",
"solid-icons": "^1.0.11",
"solid-icons": "^1.0.12",
"solid-js": "^1.7",
"solid-toast": "^0.5.0"
},
"devDependencies": {
"@tauri-apps/cli": "2.0.0-alpha.13",
"@types/node": "^20.5",
"autoprefixer": "^10.4.15",
"postcss": "^8.4.28",
"tailwindcss": "^3.3.3",
"typescript": "^5.1",
"@biomejs/biome": "1.2.2",
"@tauri-apps/cli": "2.0.0-alpha.14",
"@types/node": "^20.6",
"autoprefixer": "^10.4",
"postcss": "^8.4",
"tailwindcss": "^3",
"typescript": "^5.2",
"vite": "4.4",
"vite-plugin-solid": "^2.7.0"
}
Expand Down
16 changes: 8 additions & 8 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ members = ["prisma-cli"]
tauri-build = { version = "2.0.0-alpha.8", features = [] }

[dependencies]
tauri = { version = "2.0.0-alpha.13", features = ["macos-private-api"] }
tauri = { version = "2.0.0-alpha.14", features = ["macos-private-api"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust", tag = "0.6.8", features = [
prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust", tag = "0.6.9", features = [
"sqlite",
"migrations",
"mocking",
Expand Down
8 changes: 8 additions & 0 deletions src/i18n/dict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export const dict = {
sidebar_section_purchase: "Purchase",
sidebar_section_reports: "Reports",
sidebar_section_directory: "Directory",

home_stats_sales: "Sales",
home_stats_purchase: "Purchase",
home_stats_tax: "Taxes",
},
cs: {
hello: "Ahoj",
Expand All @@ -34,5 +38,9 @@ export const dict = {
sidebar_section_purchase: "Nákup",
sidebar_section_reports: "Reporty",
sidebar_section_directory: "Adresář",

home_stats_sales: "Prodej",
home_stats_purchase: "Nákup",
home_stats_tax: "Daně",
},
};
Binary file added src/screens/Dashboard/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion src/screens/Dashboard/components/Box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ParentComponent } from "solid-js";

const Box: ParentComponent = (props) => {
return (
<div class="rounded-lg border p-2 dark bg-[#E6E6E6] border-[#dddddd] dark:bg-[#282828] dark:border-neutral-600 h-full w-full">
<div class="rounded-lg border p-3 dark bg-[#E6E6E6] border-[#dddddd] dark:bg-[#282828] dark:border-neutral-600 h-full w-full">
{props.children}
</div>
);
Expand Down
19 changes: 19 additions & 0 deletions src/screens/Dashboard/components/StatBox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Component, createSignal } from "solid-js";
import { Platform } from "@tauri-apps/plugin-os";

const StatBox: Component<{
title: string;
value: string;
}> = (props) => {
const [os, setOs] = createSignal<Platform | null>(null);

return (
<div class="flex flex-col justify-between text-grey">
<p class="text-md">{props.title}</p>
<p class="text-2xl font-medium text-primary">{props.value}</p>
<div class="text-green-200">30%</div>
</div>
);
};

export default StatBox;
Binary file modified src/screens/Dashboard/pages/.DS_Store
Binary file not shown.
12 changes: 10 additions & 2 deletions src/screens/Dashboard/pages/Overview.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
import { useSelector } from "@/store";
import { Component } from "solid-js";
import Box from "../components/Box";
import StatBox from "../components/StatBox";
import { useI18n } from "@/i18n";

const Overview: Component = () => {
const {
companyService: { company },
} = useSelector();

const [t] = useI18n();

return (
<div class="grid grid-cols-3 grid-rows-5 gap-4 w-full h-screen">
<div class="col-span-3">
<Box>
<div class="flex flex-row">statistics</div>
<div class="flex flex-row gap-4 justify-between items-center px-2 w-full h-full">
<StatBox title={t.home_stats_purchase()} value="100$" />
<StatBox title={t.home_stats_sales()} value="100$" />
<StatBox title={t.home_stats_tax()} value="69$" />
</div>
</Box>
</div>
<div class="col-span-2 row-span-2 row-start-2">
Expand All @@ -21,7 +29,7 @@ const Overview: Component = () => {
</div>
<div class="col-span-1">
<Box>
<div class="flex flex-row">info </div>
<div class="flex flex-row">info</div>
</Box>
</div>
<div class="col-span-2 row-start-4">
Expand Down
17 changes: 15 additions & 2 deletions src/screens/Dashboard/pages/Sales/Invoices/Invoices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@ import { Component } from "solid-js";

const Invoices: Component = () => {
return (
<div class="flex flex-col items-center justify-center h-full w-full">
<h1 class="text-4xl font-bold text-red">Faktury</h1>
<div class="flex flex-col justify-center items-center w-full h-full">
<table>
<tbody>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
</tbody>
</table>
</div>
);
};
Expand Down

0 comments on commit af4e154

Please sign in to comment.