working on resetting everything up with updated versions
This commit is contained in:
2
.env.sample
Normal file
2
.env.sample
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
GITHUB_TOKEN=
|
||||||
|
GITEA_TOKEN=
|
@@ -416,3 +416,77 @@
|
|||||||
{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
{"level":"info","time":"2022-07-31T22:12:55-04:00","message":"Getting all Rooms"}
|
{"level":"info","time":"2022-07-31T22:12:55-04:00","message":"Getting all Rooms"}
|
||||||
{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
|
{"logtype":"webserver", "pid":"17028", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
|
||||||
|
{"level":"info","time":"2023-01-09T21:16:10-05:00","message":"Configuration loaded successfully..."}
|
||||||
|
{"level":"debug","time":"2023-01-09T21:16:10-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationFilesDir:./app/files/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
|
||||||
|
{"level":"info","time":"2023-01-09T21:16:10-05:00","message":"Database and Config loaded, starting webserver..."}
|
||||||
|
{"level":"info","time":"2023-01-09T21:19:46-05:00","message":"Configuration loaded successfully..."}
|
||||||
|
{"level":"debug","time":"2023-01-09T21:19:46-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationFilesDir:./app/files/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
|
||||||
|
{"level":"info","time":"2023-01-09T21:19:46-05:00","message":"Database and Config loaded, starting webserver..."}
|
||||||
|
{"level":"debug","time":"2023-01-09T21:19:50-05:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations/1"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/config"}
|
||||||
|
{"level":"debug","time":"2023-01-09T21:35:32-05:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/files/locations/Location0/Location0_cover.png"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
{"level":"debug","time":"2023-01-09T21:35:51-05:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
{"level":"debug","time":"2023-01-09T21:35:59-05:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"404", "method":"GET", "path":"/files/locations/undefined/undefined"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
{"level":"info","time":"2023-01-09T21:36:13-05:00","message":"Getting all Rooms"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
|
||||||
|
{"level":"info","time":"2023-01-09T21:36:21-05:00","message":"Getting all Rooms"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
{"level":"debug","time":"2023-01-09T21:36:27-05:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
|
||||||
|
{"level":"error","time":"2023-01-09T21:37:22-05:00","message":"Unable to fetch all rooms at location: not found"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"500", "method":"GET", "path":"/api/locations/1/rooms"}
|
||||||
|
{"level":"error","time":"2023-01-09T21:37:51-05:00","message":"Unable to fetch all rooms at location: not found"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"500", "method":"GET", "path":"/api/locations/1/rooms"}
|
||||||
|
{"level":"info","time":"2023-01-09T21:39:21-05:00","message":"Getting all Rooms"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/rooms"}
|
||||||
|
{"level":"info","time":"2023-01-09T21:42:45-05:00","message":"Getting all Cabinets"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/cabinets"}
|
||||||
|
{"level":"info","time":"2023-01-09T21:47:13-05:00","message":"Getting all Items"}
|
||||||
|
{"logtype":"webserver", "pid":"22796", "requestid":"", "status":"200", "method":"GET", "path":"/api/items"}
|
||||||
|
{"level":"info","time":"2023-01-09T21:48:56-05:00","message":"Configuration loaded successfully..."}
|
||||||
|
{"level":"debug","time":"2023-01-09T21:48:56-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationFilesDir:./app/files/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
|
||||||
|
{"level":"info","time":"2023-01-09T21:48:56-05:00","message":"Database and Config loaded, starting webserver..."}
|
||||||
|
{"level":"info","time":"2023-01-09T21:49:40-05:00","message":"Configuration loaded successfully..."}
|
||||||
|
{"level":"debug","time":"2023-01-09T21:49:40-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationFilesDir:./app/files/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
|
||||||
|
{"level":"info","time":"2023-01-09T21:49:40-05:00","message":"Database and Config loaded, starting webserver..."}
|
||||||
|
{"logtype":"webserver", "pid":"6108", "requestid":"", "status":"500", "method":"GET", "path":"/api/items/:i"}
|
||||||
|
{"logtype":"webserver", "pid":"6108", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
{"logtype":"webserver", "pid":"6108", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
{"level":"info","time":"2023-01-09T22:08:23-05:00","message":"Configuration loaded successfully..."}
|
||||||
|
{"level":"debug","time":"2023-01-09T22:08:23-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationFilesDir:./app/files/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
|
||||||
|
{"level":"info","time":"2023-01-09T22:08:23-05:00","message":"Database and Config loaded, starting webserver..."}
|
||||||
|
{"level":"debug","time":"2023-01-09T22:08:36-05:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"}
|
||||||
|
{"logtype":"webserver", "pid":"13936", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
|
||||||
|
{"level":"debug","time":"2023-01-09T22:08:48-05:00","message":"Search by term: Location in all items at field: Name"}
|
||||||
|
{"level":"info","time":"2023-01-09T22:08:48-05:00","message":"Searching all items for term: Location"}
|
||||||
|
{"logtype":"webserver", "pid":"13936", "requestid":"", "status":"200", "method":"GET", "path":"/api/search/all"}
|
||||||
|
{"level":"debug","time":"2023-01-09T22:09:00-05:00","message":"Search by term: 0 in all items at field: Name"}
|
||||||
|
{"level":"info","time":"2023-01-09T22:09:00-05:00","message":"Searching all items for term: 0"}
|
||||||
|
{"logtype":"webserver", "pid":"13936", "requestid":"", "status":"200", "method":"GET", "path":"/api/search/all"}
|
||||||
|
{"level":"debug","time":"2023-01-09T22:12:41-05:00","message":"Search by term: Location0 in all items at field: Name"}
|
||||||
|
{"level":"info","time":"2023-01-09T22:12:41-05:00","message":"Searching all items for term: Location0"}
|
||||||
|
{"logtype":"webserver", "pid":"13936", "requestid":"", "status":"200", "method":"GET", "path":"/api/search/all"}
|
||||||
|
{"logtype":"webserver", "pid":"13936", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
{"level":"info","time":"2023-01-09T22:13:47-05:00","message":"Configuration loaded successfully..."}
|
||||||
|
{"level":"debug","time":"2023-01-09T22:13:47-05:00","message":"{Timezone:America/New_York Server:{Port:3500 LocationFilesDir:./app/files/} Logger:{Level:debug LoggingFile:./app/log/goInventorize.log} Authentication:{BasicAuth:false UserName:admin Password:password} Development:false}"}
|
||||||
|
{"level":"info","time":"2023-01-09T22:13:47-05:00","message":"Database and Config loaded, starting webserver..."}
|
||||||
|
{"level":"debug","time":"2023-01-09T22:18:41-05:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"}
|
||||||
|
{"logtype":"webserver", "pid":"15420", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
|
||||||
|
{"logtype":"webserver", "pid":"15420", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
{"level":"debug","time":"2023-01-09T22:18:51-05:00","message":"Returning Locations: [{ID:1 Name:Location0 Description:This is my test description0 Notes:Notes for my location!0 Address: SquareFeet:2500 Latitude:120N Longitude:120N DatePurchased: PurchasePrice:125000 CurrentValue: CoverPhoto:Location0_cover.png Photos:[] Files:[] Rooms:[]}]"}
|
||||||
|
{"logtype":"webserver", "pid":"15420", "requestid":"", "status":"200", "method":"GET", "path":"/api/locations"}
|
||||||
|
{"logtype":"webserver", "pid":"15420", "requestid":"", "status":"200", "method":"GET", "path":"/api/overview/all"}
|
||||||
|
24558
frontend/package-lock.json
generated
24558
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -3,33 +3,32 @@
|
|||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/cache": "^11.9.3",
|
"@emotion/cache": "^11.10.5",
|
||||||
"@emotion/react": "^11.9.3",
|
"@emotion/react": "^11.10.5",
|
||||||
"@emotion/serialize": "^1.0.4",
|
"@emotion/serialize": "^1.1.1",
|
||||||
"@emotion/utils": "^1.1.0",
|
"@emotion/utils": "^1.2.0",
|
||||||
"@mantine/core": "^5.0.0",
|
"@mantine/core": "^5.10.0",
|
||||||
"@mantine/dates": "^5.0.0",
|
"@mantine/dates": "^5.10.0",
|
||||||
"@mantine/dropzone": "^5.0.0",
|
"@mantine/dropzone": "^5.10.0",
|
||||||
"@mantine/form": "^5.0.0",
|
"@mantine/form": "^5.10.0",
|
||||||
"@mantine/hooks": "^5.0.0",
|
"@mantine/hooks": "^5.10.0",
|
||||||
"@mantine/notifications": "^5.0.0",
|
"@mantine/notifications": "^5.10.0",
|
||||||
"@tabler/icons": "^1.78.1",
|
"@tabler/icons": "^1.119.0",
|
||||||
"@testing-library/jest-dom": "^5.16.4",
|
"@testing-library/jest-dom": "^5.16.5",
|
||||||
"@testing-library/react": "^12.1.5",
|
"@testing-library/react": "^13.4.0",
|
||||||
"@testing-library/user-event": "^13.5.0",
|
"@testing-library/user-event": "^14.4.3",
|
||||||
"base-64": "^1.0.0",
|
"base-64": "^1.0.0",
|
||||||
"dayjs": "^1.11.4",
|
"dayjs": "^1.11.7",
|
||||||
"jotai": "^1.7.6",
|
"jotai": "^1.12.1",
|
||||||
"npm-check-updates": "^12.5.12",
|
"npm-check-updates": "^16.6.2",
|
||||||
"react": "^17.0.2",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^18.2.0",
|
||||||
"react-icons": "^4.4.0",
|
"react-icons": "^4.7.1",
|
||||||
"react-jss": "^10.9.1",
|
"react-jss": "^10.9.2",
|
||||||
"react-router": "^6.3.0",
|
"react-router": "^6.6.2",
|
||||||
"react-router-dom": "^6.3.0",
|
"react-router-dom": "^6.6.2",
|
||||||
"react-scripts": "5.0.0",
|
"react-scripts": "5.0.1",
|
||||||
"tabler-icons": "^1.35.0",
|
"web-vitals": "^3.1.0"
|
||||||
"web-vitals": "^2.1.4"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "react-scripts start",
|
||||||
|
@@ -12,7 +12,7 @@ import { showNotification } from '@mantine/notifications';
|
|||||||
|
|
||||||
import { backendAPI, defaultURLS } from './services/backend-api';
|
import { backendAPI, defaultURLS } from './services/backend-api';
|
||||||
|
|
||||||
import { serverConfigAtom } from './state/main'
|
import { serverConfigAtom } from './state/state'
|
||||||
|
|
||||||
|
|
||||||
import SideBar from './components/SideBar';
|
import SideBar from './components/SideBar';
|
||||||
|
11
frontend/src/Notifications.js
Normal file
11
frontend/src/Notifications.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
|
||||||
|
function Notifications() {
|
||||||
|
|
||||||
|
|
||||||
|
return(
|
||||||
|
<></>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Notifications;
|
@@ -2,7 +2,7 @@ import React, {useState, useEffect, useContext } from 'react';
|
|||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import { Header, MediaQuery, Burger, Text, ThemeIcon, Group, Title, createStyles, useMantineTheme } from '@mantine/core';
|
import { Header, MediaQuery, Burger, Text, ThemeIcon, Group, Title, createStyles, useMantineTheme } from '@mantine/core';
|
||||||
import { BsHouseDoor } from 'react-icons/bs'
|
import { BsHouseDoor } from 'react-icons/bs'
|
||||||
import { menuOpenedAtom } from '../state/main';
|
import { menuOpenedAtom } from '../state/state';
|
||||||
|
|
||||||
|
|
||||||
function AppHeader(props) {
|
function AppHeader(props) {
|
||||||
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import { Text, Button, Card, Group, Menu, Image, Badge } from '@mantine/core'
|
import { Text, Button, Card, Group, Menu, Image, Badge } from '@mantine/core'
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { activePageAtom, roomFilterAtom, serverConfigAtom } from '../../state/main';
|
import { activePageAtom, roomFilterAtom, serverConfigAtom } from '../../state/state';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import { Text, Button, Card, Group, Menu, Image, Badge } from '@mantine/core'
|
import { Text, Button, Card, Group, Menu, Image, Badge } from '@mantine/core'
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { activePageAtom, roomFilterAtom, serverConfigAtom } from '../../state/main';
|
import { activePageAtom, roomFilterAtom, serverConfigAtom } from '../../state/state';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@ import { DatePicker } from '@mantine/dates';
|
|||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { useForm } from '@mantine/form';
|
import { useForm } from '@mantine/form';
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import { serverConfigAtom } from '../../state/main'
|
import { serverConfigAtom } from '../../state/state'
|
||||||
import { backendAPI } from '../../services/backend-api';
|
import { backendAPI } from '../../services/backend-api';
|
||||||
import { IMAGE_MIME_TYPE } from '@mantine/dropzone';
|
import { IMAGE_MIME_TYPE } from '@mantine/dropzone';
|
||||||
import CustomDropZone from '../CustomDropZone';
|
import CustomDropZone from '../CustomDropZone';
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import React, {useState, useEffect, useContext, createContext} from 'react';
|
import React, {useState, useEffect, useContext, createContext} from 'react';
|
||||||
import { Text, Title, ThemeIcon, Group, Container, Space } from '@mantine/core'
|
import { Text, Title, ThemeIcon, Group, Container, Space } from '@mantine/core'
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import { serverConfigAtom } from '../../state/main'
|
import { serverConfigAtom } from '../../state/state'
|
||||||
import { GoLocation } from 'react-icons/go'
|
import { GoLocation } from 'react-icons/go'
|
||||||
import { BsDoorClosed, BsDiagram2 } from 'react-icons/bs'
|
import { BsDoorClosed, BsDiagram2 } from 'react-icons/bs'
|
||||||
import { useNotifications } from '@mantine/notifications';
|
import { useNotifications } from '@mantine/notifications';
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import React, {useState, useEffect } from 'react';
|
import React, {useState, useEffect } from 'react';
|
||||||
import { useAtom } from 'jotai'
|
import { useAtom } from 'jotai'
|
||||||
import { serverConfigAtom } from '../../state/main';
|
import { serverConfigAtom } from '../../state/state';
|
||||||
import { Loader, Center, Title, Group, Button, Space, Container, ThemeIcon, Text, Image } from '@mantine/core'
|
import { Loader, Center, Title, Group, Button, Space, Container, ThemeIcon, Text, Image } from '@mantine/core'
|
||||||
import { useNavigate, useLocation, useParams } from "react-router-dom";
|
import { useNavigate, useLocation, useParams } from "react-router-dom";
|
||||||
import { useNotifications } from '@mantine/notifications';
|
import { useNotifications } from '@mantine/notifications';
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import React, {useState, useEffect } from 'react';
|
import React, {useState, useEffect } from 'react';
|
||||||
import { useAtom } from 'jotai'
|
import { useAtom } from 'jotai'
|
||||||
import { serverConfigAtom } from '../../state/main';
|
import { serverConfigAtom } from '../../state/state';
|
||||||
import { HiPlus } from 'react-icons/hi'
|
import { HiPlus } from 'react-icons/hi'
|
||||||
import { Loader, Center, SimpleGrid, Title, Group, Button } from '@mantine/core'
|
import { Loader, Center, SimpleGrid, Title, Group, Button } from '@mantine/core'
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import React, {useState, useEffect, useContext, createContext} from 'react';
|
import React, {useState, useEffect, useContext, createContext} from 'react';
|
||||||
import { useAtom } from 'jotai'
|
import { useAtom } from 'jotai'
|
||||||
import { roomFilterAtom, serverConfigAtom } from '../../state/main';
|
import { roomFilterAtom, serverConfigAtom } from '../../state/state';
|
||||||
import { Text, Loader, Center, Card, Image, Badge, Button, SimpleGrid, Group, Title, ActionIcon } from '@mantine/core'
|
import { Text, Loader, Center, Card, Image, Badge, Button, SimpleGrid, Group, Title, ActionIcon } from '@mantine/core'
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
import { useNotifications } from '@mantine/notifications';
|
import { useNotifications } from '@mantine/notifications';
|
||||||
|
@@ -3,6 +3,7 @@ import ReactDOM from 'react-dom';
|
|||||||
import App from './App';
|
import App from './App';
|
||||||
import reportWebVitals from './reportWebVitals';
|
import reportWebVitals from './reportWebVitals';
|
||||||
import { NotificationsProvider } from '@mantine/notifications';
|
import { NotificationsProvider } from '@mantine/notifications';
|
||||||
|
import { Notifications } from './Notifications.js'
|
||||||
|
|
||||||
//setup api
|
//setup api
|
||||||
//const backendPort = process.env.REACT_APP_BACKEND_PORT
|
//const backendPort = process.env.REACT_APP_BACKEND_PORT
|
||||||
@@ -11,6 +12,7 @@ import { NotificationsProvider } from '@mantine/notifications';
|
|||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<NotificationsProvider>
|
<NotificationsProvider>
|
||||||
|
<Notifications />
|
||||||
<App />
|
<App />
|
||||||
</NotificationsProvider>
|
</NotificationsProvider>
|
||||||
</React.StrictMode>,
|
</React.StrictMode>,
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import { atom } from 'jotai'
|
import { atom } from 'jotai'
|
||||||
|
import { atomWithReset } from 'jotai/utils'
|
||||||
|
|
||||||
|
|
||||||
export const serverConfigAtom = atom({})
|
export const serverConfigAtom = atom({})
|
||||||
@@ -12,3 +13,7 @@ export const activePageAtom = atom({})
|
|||||||
// Filters for all pages to pass back and forth
|
// Filters for all pages to pass back and forth
|
||||||
export const locationFilterAtom = atom({})
|
export const locationFilterAtom = atom({})
|
||||||
export const roomFilterAtom = atom({})
|
export const roomFilterAtom = atom({})
|
||||||
|
|
||||||
|
// Notification history and notification stack
|
||||||
|
export const notificationHistory = atom([])
|
||||||
|
export const notifications = atomWithReset([])
|
5
go.mod
5
go.mod
@@ -15,10 +15,11 @@ require (
|
|||||||
github.com/stretchr/testify v1.7.0 // indirect
|
github.com/stretchr/testify v1.7.0 // indirect
|
||||||
github.com/valyala/fasthttp v1.28.0 // indirect
|
github.com/valyala/fasthttp v1.28.0 // indirect
|
||||||
go.etcd.io/bbolt v1.3.6 // indirect
|
go.etcd.io/bbolt v1.3.6 // indirect
|
||||||
golang.org/x/sys v0.0.0-20210820121016-41cdb8703e55 // indirect
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||||
|
golang.org/x/sys v0.2.0 // indirect
|
||||||
google.golang.org/appengine v1.6.7 // indirect
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace gitea.derajnet.duckdns.org/changeme => ../
|
replace gitea.derajnet.duckdns.org/changeme => ../
|
||||||
|
15
go.sum
15
go.sum
@@ -74,8 +74,9 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
|
|||||||
golang.org/x/net v0.0.0-20191105084925-a882066a44e0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20191105084925-a882066a44e0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20210510120150-4163338589ed h1:p9UgmWI9wKpfYmgaV/IZKGdXc5qEK45tDwwwDyjS26I=
|
|
||||||
golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
||||||
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@@ -87,13 +88,17 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210820121016-41cdb8703e55 h1:rw6UNGRMfarCepjI8qOepea/SXwIBVfTKjztZ5gBbq4=
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210820121016-41cdb8703e55/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
|
||||||
|
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||||
@@ -114,5 +119,5 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8
|
|||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
@@ -60,8 +60,9 @@ func (s *Server) GetAllItemsAtCabinetHandler(c *fiber.Ctx) error {
|
|||||||
return c.Status(fiber.StatusOK).JSON(items)
|
return c.Status(fiber.StatusOK).JSON(items)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddNewItemHandler adds a new room
|
// AddNewItemHandler adds a new item
|
||||||
func (s *Server) AddNewItemHandler(c *fiber.Ctx) error {
|
func (s *Server) AddNewItemHandler(c *fiber.Ctx) error {
|
||||||
|
// If we supply a room ID it is an item in a room, if not it is in a cabinet
|
||||||
storageType := "room"
|
storageType := "room"
|
||||||
cabinetID := 0
|
cabinetID := 0
|
||||||
roomID, err := c.ParamsInt("roomID")
|
roomID, err := c.ParamsInt("roomID")
|
||||||
|
2
main.go
2
main.go
@@ -111,8 +111,8 @@ func main() {
|
|||||||
server.WebServer.Get("/api/cabinets", server.GetAllCabinetsHandler)
|
server.WebServer.Get("/api/cabinets", server.GetAllCabinetsHandler)
|
||||||
server.WebServer.Get("/api/cabinets/:cabinetID", server.GetCabinetHandler)
|
server.WebServer.Get("/api/cabinets/:cabinetID", server.GetCabinetHandler)
|
||||||
server.WebServer.Post("/api/cabinets/:roomID/new", server.AddNewCabinetHandler)
|
server.WebServer.Post("/api/cabinets/:roomID/new", server.AddNewCabinetHandler)
|
||||||
server.WebServer.Get("/api/cabinets/:cabinetID/items", server.GetAllItemsAtCabinetHandler)
|
|
||||||
server.WebServer.Delete("/api/cabinets/:cabinetID", server.DeleteCabinetHandler)
|
server.WebServer.Delete("/api/cabinets/:cabinetID", server.DeleteCabinetHandler)
|
||||||
|
server.WebServer.Get("/api/cabinets/:cabinetID/items", server.GetAllItemsAtCabinetHandler)
|
||||||
// Item Routes
|
// Item Routes
|
||||||
server.WebServer.Get("/api/items", server.GetAllItemsHandler)
|
server.WebServer.Get("/api/items", server.GetAllItemsHandler)
|
||||||
server.WebServer.Get("/api/items/:itemID", server.GetItemHandler)
|
server.WebServer.Get("/api/items/:itemID", server.GetItemHandler)
|
||||||
|
Reference in New Issue
Block a user