2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-27 01:00:53 +00:00

[UI] Reimplement calendar views (#8933)

* Add deps for @fullcalendar

* Basic calendar setup

* Add locale support

* Add custom <SegmentedIconControl> component

* optional 'control' for panel

* Scaffolding out build index page

* Fetch build orders based on calendar dates

* Display builds

* Click to navigate to build

* Working on custom header

* Implement button functionality

* Display current month name

* Implement datepicker dropdown

* Adjust layout

* Custom rendering

* Include part detail

* Implement hook to track calendar state

* Clearing search causes immediate update

* Offload core functionality into hook

- Adds search input

* Spread props correctly

* Cleanup

* Allow build orders to be edited directly from calendar view

* Cleanup

* Fix for InvenTreeCalendarProps

* Improve date range filtering for Build model

* Simplify BuildFilter

* Refactoring

* PurchaseOrder calendar implementation

* Allow edit of purchase orders

* Refactor and implement for all order types

- Add missing "issue_date" field for SalesOrder
- Refactor API for other order types
- Fix rendering issues

* Bump API version

* Add playwright tests for calendar (simple)

* Fix migrations

* Simplify notifications

* Refactor filter components

- Make them more generic

* Enable custom filters for calendars

* Custom filters per table

* Display status label

* Refactoring

* Update playwright tests

* Update build order docs

* Bug fix for order date editing

* Update purchase order docs

* Return Order docs

* Update date formatting
This commit is contained in:
Oliver
2025-03-16 18:01:51 +11:00
committed by GitHub
parent 191c0b1007
commit 3afafe594b
54 changed files with 1287 additions and 342 deletions

View File

@ -1,6 +1,8 @@
import { expect } from '@playwright/test';
import { test } from '../baseFixtures.ts';
import {
activateCalendarView,
activateTableView,
clearTableFilters,
clickButtonIfVisible,
clickOnRowMenu,
@ -11,11 +13,12 @@ import {
} from '../helpers.ts';
import { doQuickLogin } from '../login.ts';
test('Purchase Orders - List', async ({ page }) => {
test('Purchase Orders - Table', async ({ page }) => {
await doQuickLogin(page);
await page.getByRole('tab', { name: 'Purchasing' }).click();
await loadTab(page, 'Purchase Orders');
await activateTableView(page);
await clearTableFilters(page);
@ -39,6 +42,30 @@ test('Purchase Orders - List', async ({ page }) => {
await page.getByText('2025-07-17').waitFor(); // Target Date
});
test('Purchase Orders - Calendar', async ({ page }) => {
await doQuickLogin(page);
await page.getByRole('tab', { name: 'Purchasing' }).click();
await loadTab(page, 'Purchase Orders');
// Ensure view is in "calendar" mode
await activateCalendarView(page);
// Check for expected components
await page.getByLabel('action-button-previous-month').waitFor();
await page.getByLabel('action-button-next-month').waitFor();
await page.getByLabel('calendar-select-month').click();
await page.getByRole('button', { name: 'Jan' }).waitFor();
await page.getByRole('button', { name: 'Feb' }).waitFor();
await page.getByRole('button', { name: 'Dec' }).click();
await page.getByText('December').waitFor();
// Put back into table view
await activateTableView(page);
});
test('Purchase Orders - Barcodes', async ({ page }) => {
await doQuickLogin(page);
@ -157,6 +184,7 @@ test('Purchase Orders - Filters', async ({ page }) => {
await page.getByRole('tab', { name: 'Purchasing' }).click();
await loadTab(page, 'Purchase Orders');
await activateTableView(page);
// Open filters drawer
await openFilterDrawer(page);