Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Edwin950821/BodegaX/llms.txt

Use this file to discover all available pages before exploring further.

The Orders page (/orders), titled Pedidos in the interface, presents a crate orders table inside an Angular Material card layout. In the current implementation the page contains no API calls — the component’s ngOnInit is absent and OrdersComponent makes no HTTP requests. The table rows are hardcoded directly in the HTML template and always display the same two static sample entries: Pacamar (4 cajas, 240.000)andLaPrimavera(6cajas,240.000) and **La Primavera** (6 cajas, 360.000), with a static total footer row of 10 cajas and $600.000.
The data on the Orders page is hardcoded in the HTML template. It does not reflect live database records and is not filtered by client role. Both the client names and quantities are static placeholders that appear for every authenticated user, regardless of role.

Static Orders Table

The orders table always renders the following fixed data:
ClienteCantidad (cajas)TotalAction
Pacamar4$240.000Ver
La Primavera6$360.000Ver
Total10$600.000
Each Ver link is rendered as an underlined anchor (<u>) bound to the ver() method and a [routerLink]="'/view'" directive, so clicking the link invokes ver() (which is currently an empty no-op) and triggers Angular router navigation to the /view route.

Component Behaviour

OrdersComponent is a lightweight shell. It holds the session user in user4 (parsed from sessionStorage key bodegax), manages the sidebar toggle state, and exposes the shouldShowUserName getter for conditionally displaying the user’s name in the header. No HTTP client is injected and no data fetching occurs. The terminar() method, which is wired to the orange Terminar Jornada button in the template, throws Error('Method not implemented.') when called. The end-of-day report feature is not functional on the Orders page in the current source.
// From orders.component.ts
terminar() {
  throw new Error('Method not implemented.');
}
Clicking the Terminar Jornada button on the Orders page will throw an unhandled JavaScript error in the current implementation. The button is present in the template but the handler is not yet implemented. Do not use this button in production.

Page Layout

The Orders page wraps its content in an Angular Material <mat-card> component with a transparent background class, consistent with the rest of the BodegaX module pages. The page header includes:
  • A hamburger menu icon (top-left) that toggles the sidebar via openSidebar(), which delegates to AppService.toggleSidebar().
  • The logged-in user’s name (user4.nombre) displayed in the top-right corner, conditionally shown based on the shouldShowUserName getter.
The shouldShowUserName getter returns true when the sidebar is closed, the screen is not mobile, or the viewport exceeds 768 px — ensuring the username remains visible across common desktop and tablet breakpoints.
The component initialises isMobile from window.innerWidth <= 768 and attaches a resize event listener to keep this flag current as the user resizes the browser. When isMobile is true and sidebarOpen is true, the sidebar overlays the content; closing it returns the full width to the orders table. The shouldShowUserName getter reflects these states to keep the top-right username label visible whenever there is room.

Build docs developers (and LLMs) love