diff --git a/backend/database/db.go b/backend/database/db.go index a85aa67..f0b1e0e 100644 --- a/backend/database/db.go +++ b/backend/database/db.go @@ -7,7 +7,7 @@ import ( "gorm.io/driver/postgres" "gorm.io/gorm" - "viplight-mrp/models" + "mrp/models" ) var DB *gorm.DB diff --git a/backend/handlers/order_handler.go b/backend/handlers/order_handler.go index 8da6886..2658b1e 100644 --- a/backend/handlers/order_handler.go +++ b/backend/handlers/order_handler.go @@ -5,8 +5,8 @@ import ( "github.com/gin-gonic/gin" - "viplight-mrp/database" - "viplight-mrp/models" + "mrp/database" + "mrp/models" ) func GetsOrders(c *gin.Context) { diff --git a/backend/handlers/part_handler.go b/backend/handlers/part_handler.go index 78af9e0..581395a 100644 --- a/backend/handlers/part_handler.go +++ b/backend/handlers/part_handler.go @@ -5,8 +5,8 @@ import ( "github.com/gin-gonic/gin" - "viplight-mrp/database" - "viplight-mrp/models" + "mrp/database" + "mrp/models" ) func GetPart(c *gin.Context) { diff --git a/backend/handlers/user_handler.go b/backend/handlers/user_handler.go index efcf1f9..501a4a4 100644 --- a/backend/handlers/user_handler.go +++ b/backend/handlers/user_handler.go @@ -9,8 +9,8 @@ import ( "github.com/golang-jwt/jwt/v5" "golang.org/x/crypto/bcrypt" - "viplight-mrp/database" - "viplight-mrp/models" + "mrp/database" + "mrp/models" ) func Login(c *gin.Context) { diff --git a/docker-compose.yml b/docker-compose.yml index f7f23c4..67bba13 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: container_name: mrp_db restart: always ports: - - "5433:5433" + - "5433:5432" environment: POSTGRES_USER: ${DB_USER} POSTGRES_PASSWORD: ${DB_PASSWORD} @@ -40,3 +40,5 @@ services: volumes: pg_data: + external: true + name: viplight_mrp_pg_data diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 5efafe0..d9fc086 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -4,7 +4,6 @@ import PartDetail from "./pages/PartDetail"; import AddPartPage from "./pages/AddPartPage"; import ProfilePage from "./pages/ProfilePage"; import AuthForm from "./components/AuthForm"; -import RegisterForm from "./components/RegisterForm"; const PrivateRoute = ({ children }) => { const token = localStorage.getItem("token"); diff --git a/frontend/src/components/AuthForm.jsx b/frontend/src/components/AuthForm.jsx index d9ab8e6..5655b43 100644 --- a/frontend/src/components/AuthForm.jsx +++ b/frontend/src/components/AuthForm.jsx @@ -24,7 +24,7 @@ const AuthForm = () => { } } catch (err) { setMessage({ - text: err.response?.data?.error || "Неверный логин или пароль", + text: err.response?.data?.error || err.message || "Неверный логин или пароль", isError: true, }); } diff --git a/frontend/src/components/Header.jsx b/frontend/src/components/Header.jsx index 2dc42e3..312f3dc 100644 --- a/frontend/src/components/Header.jsx +++ b/frontend/src/components/Header.jsx @@ -21,27 +21,11 @@ export default function Header({ onRefresh, onOpenScanner }) {
- {user.first_name} {user.last_name} -
-- {user.department} |{" "} - {user.role} + {"Привет, "} + {user.first_name}
- Регистрация сотрудника -
-