SurisCodeFrontend is the frontend application for managing purchase orders, built with a modern tech stack to provide a seamless user experience. The project leverages React for building the user interface, Material-UI for component styling, and Axios for efficient communication with the backend.
Key Features 🔑
- Vendor Selection: Dropdown menus for choosing vendors.
- Item Selection: Interactive checkboxes to select multiple items.
- Informational modals: Display success or error messages.
- Responsive Design: Optimized for all screen sizes with a clean, centered layout.
- React: A JavaScript library for building user interfaces.
- Material-UI: A popular UI component library for styling and design.
- Axios: A promise-based HTTP client for interacting with REST APIs.
- Git: Version control system for tracking changes in the codebase.
- Node.js: Version 16 or higher.
- npm or yarn: Package manager for installing dependencies.
-
Clone this repository:
git clone https://github.com/adrianbona/suriscodefrontend.git cd SurisCodeFrontend -
Install the dependencies:
npm install
-
Start the development server:
npm start
-
Open the application in your browser at:
http://localhost:3000
- Vendor Selection:
- A dropdown menu populated with a list of vendors fetched from the API.
- Item Selection:
- Checkboxes to select multiple items, with validation to ensure proper selection.
- Order Management:
- A submit button that shows a loading spinner while processing the request.
- Informational modal displayed upon completion of the action.
- Item Validation:
- Items must meet certain criteria:
- Price greater than zero (with exceptions for certain items like pillows).
- Descriptions must not contain special characters.
- Filtering by a specific warehouse.
- Items must meet certain criteria:
npm start: Starts the development server.npm test: Runs tests (if any).npm run build: Creates an optimized production build.
-
Backend Integration:
- This frontend is configured to use Axios with the base URL set to:
http://localhost:7288. - Ensure that the backend is running before starting this project.
- This frontend is configured to use Axios with the base URL set to:
-
Styling and Layout:
- Uses Material-UI with customized styles for specific components.
- Includes centered elements, rounded borders, and visual effects such as shadows and gradients.
-
Axios Configuration:
- The
client.jsfile contains the Axios configuration, including the base URL and default headers.
- The