Skip to content

Commit

Permalink
- updated login dialog
Browse files Browse the repository at this point in the history
- ruff fixes
  • Loading branch information
HardMax71 committed Aug 18, 2024
1 parent 035688a commit ed5efab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 4 additions & 3 deletions desktop_app/src/ui/login_dialog.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from PySide6.QtCore import Qt
from PySide6.QtWidgets import (QDialog, QVBoxLayout, QHBoxLayout, QLabel,
QLineEdit, QPushButton, QFormLayout, QMessageBox)
from PySide6.QtWidgets import (QDialog, QVBoxLayout, QLineEdit, QPushButton, QFormLayout, QMessageBox)
from requests import HTTPError

from desktop_app.src.services.authentication import AuthenticationService


class LoginDialog(QDialog):
def __init__(self, auth_service: AuthenticationService, parent=None):
super().__init__(parent)
Expand Down Expand Up @@ -62,4 +63,4 @@ def keyPressEvent(self, event):
super().keyPressEvent(event)

def show_error_dialog(self, message: str):
QMessageBox.critical(self, "Login Error", message)
QMessageBox.critical(self, "Login Error", message)
6 changes: 2 additions & 4 deletions desktop_app/src/ui/warehouse_visualization_window.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from collections import defaultdict

import matplotlib

matplotlib.use('Qt5Agg')
from PySide6.QtWidgets import QMainWindow, QVBoxLayout, QWidget, QPushButton, QHBoxLayout
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np

from public_api.api import WarehouseAPI, APIClient
from public_api.shared_schemas import WarehouseLayout
Expand Down Expand Up @@ -148,4 +146,4 @@ def init_ui(self):
self.setCentralWidget(central_widget)

def refresh_data(self):
self.visualization_widget.load_warehouse_data()
self.visualization_widget.load_warehouse_data()

0 comments on commit ed5efab

Please sign in to comment.