- Define Doc type representing documents with id, name, and binary data
- Export sample documents array with example PDF, DOCX, and XLSX files
- Use Uint8Array to simulate file binary content in-memory
- Funktion `closeReset` hinzugefügt, um `name`, `label`, und `selectedType` beim Schließen des Modals zurückzusetzen
- Stellt sicher, dass das Formular nach der Filtererstellung oder dem manuellen Schließen gelöscht wird
- Modaler `onClose` Handler und `createFiltersAsync` Callback aktualisiert, um `closeReset` zu verwenden
- Validierung für `name` und `type` vor der Filtererstellung hinzugefügt
- Verbinden der Felder `label`, `name` und `type` mit dem Formularstatus
- Hardcodierte Werte im Aufruf `createFiltersAsync` durch Benutzereingaben ersetzt
- Einführung der Funktion `tryCreateFilter` für eine bessere Struktur
- Falsche Verwendung von `Name` und `Label` behoben
Removed the import statement for `FormControlLabel` from `bool-filter.tsx`. Also, eliminated the optional `onClick` property from the `BoolFilterProps` type definition.
Introduced a new `BoolFilter` component to encapsulate the checkbox and switch functionality previously handled in `DocSearchView`. This refactor improves code organization and reusability. Removed unnecessary imports from `doc-search-view.tsx` and added imports for the new component in `bool-filter.tsx`.
- Added `@mui/icons-material` package (v^7.2.0).
- Updated several MUI packages to version 7.2.0.
- Updated `@babel/runtime` to version 7.27.6.
- Updated `@emotion/cache` to version 11.14.0.
- Updated `react-is` to version ^19.1.0.
- Modified `DocSearchView` to use a `Checkbox` with icons for boolean filters.
Introduce state management for disabled filter states in the DocSearchView component. Add Material-UI components for switches and update rendering logic to conditionally display enabled/disabled states. Adjust handling of VARCHAR filters to ensure correct TextField IDs.
Updated the rendering logic for filters to use a switch statement, allowing for flexible handling of different filter types. The layout remains unchanged, but the logic for rendering each filter type has been enhanced for future extensibility.
- Added a new <Box> component to wrap <DocSearch> and <DocSort> for improved styling.
- Changed button text from "New post" to "New filter".
- Removed the old <Box> structure and integrated its contents into the new layout.
- Made the `label` property in the `Filter` type optional for greater flexibility.
- Added `TextField` import in `doc-search-view.tsx` for user input.
- Removed `DocSearch` and `DocSort` components, replacing them with a `TextField` that uses `filter.label` or `filter.type` as its label.
Updated the `DocSearchView` component to initialize the `filters` state with an empty array. Added a new section to render filters, mapping over the `filters` array to display `DocSearch` and `DocSort` components. This improves the user interface by enabling sorting and filtering of displayed posts.
Updated imports to include useEffect for side effects.
Introduced a new state variable `filters` to manage Filter objects.
Implemented useEffect to asynchronously fetch filters using getFiltersAsync.
Changed the icon for the 'Document Search' entry in
`nav-config-dashboard.tsx` from `ic-cart` to `ic-doc-search`.
Added a new SVG file `ic-doc-search.svg` containing the
markup for the updated icon.
Updated project name and version in package-lock.json.
Modified navigation to include a new 'Document Search' item.
Introduced lazy-loaded DocumentSearch component in sections.tsx.
Created doc-search.tsx with a DocSearchView for displaying posts.
Introduces `DocItem`, `DocSearch`, and `DocSort` components for displaying, searching, and sorting documents. The `DocSearchView` component integrates these functionalities, providing a user interface for document management, including a button to create new posts. Updates `index.ts` to export the new `DocSearchView` component.
This commit removes several navigation items from the `navData` array in `nav-config-dashboard.tsx`, including 'Dashboard', 'User', 'Blog', 'Sign in', and 'Not found'. The 'Product' item's `info` property has also been commented out. A commented-out section has been added to preserve the removed items for reference, and `#region` and `#endregion` comments have been introduced for better code organization.
This commit removes the import statement for the `Iconify` component from `src/components/iconify` in `app.tsx`. It also adds an import for the `Fab` component from the `@mui/material` library.
- Added import for `Product` type in `_data.ts`.
- Renamed `_products` to `_productsTextile` and defined a new array of product objects.
- Updated `getProductsAsync` in `product-service.ts` to return the new `_products` array from mock data.
Introduce a new `_filters` constant in `_data.ts` that defines various filter objects for invoices and related data. Update `filter-service.ts` to import `_filters` and define the `Filter` type. Implement `getFiltersAsync` function to asynchronously retrieve the filter data.
Updated the `Filter` type to include `id` and `label` properties. Removed the `dataType` property and replaced it with a `type` property that utilizes the `Type` type. This enhances the filter's structure by providing unique identification and standardizing data type representation.
Introduced a new `Type` definition with five string values: 'BOOLEAN', 'DATE', 'VARCHAR', 'INTEGER', and 'DECIMAL'. Added a `Filter` type that includes a `name` property and a `dataType` property of type `Type`.
Updated the `Product` type in `product-service.ts` to include an optional `url` property. Modified the `Link` component in `product-item.tsx` to use this new `url` for navigation, defaulting to '/404' if not provided. This enhances product item display by making product names clickable.
Updated the `getProducts` function in `product-service.ts` to `getProductsAsync` to reflect its asynchronous nature. Adjusted the import in `products-view.tsx` accordingly and modified the `useEffect` hook in `ProductsView` to utilize the new function, ensuring proper handling of asynchronous requests.
Modified the `Product` type to make `status` and `coverUrl` optional, and added a new `version` property for improved flexibility. Updated the `getProducts` function to reflect these changes. In the `ProductItem` component, added a new `Label` to display the product's version and ensured a default image is used if `coverUrl` is not provided. Updated rendering logic to conditionally show both status and version.
Updated the `Product` type in `product-service.ts` to make `price`, `colors`, and `priceSale` optional. Removed hardcoded values from the `getProducts` function, allowing for more flexible product creation. Enhanced the `ProductItem` component to safely access the `colors` property using optional chaining, defaulting to an empty array if undefined.
Replaced `ProductItemProps` with a new `Product` type in `product-service.ts`, which includes properties like `id`, `name`, `price`, `status`, and `coverUrl`. Updated the `getProducts` function to return `Promise<Product[]>` instead of `Promise<ProductItemProps[]>`. Modified the `ProductItem` component in `product-item.tsx` to accept the new `Product` type. Adjusted `products-view.tsx` to import `Product` and manage the state as `Array<Product>`.
Moved `ProductItemProps` from `product-item.tsx` to `product-service.ts` for centralized access. Updated `product-item.tsx` to import the type from the new location. Adjusted imports in `products-view.tsx` to streamline dependencies and reduce redundancy. This improves code organization and maintains a single source of truth for the `ProductItemProps` type.
Updated `products-view.tsx` to use `useEffect` for fetching products from an API and manage them with a new state variable. Modified rendering logic to display fetched products instead of a mocked list.
Created/modified `product-service.ts` to include the `getProducts` function, simulating an API call that returns an array of product objects.
Modified the `src` attribute of an `<img>` element in `app.tsx` to replace the previous image with a new icon located at "/assets/images/dd-button-icon.webp". This change enhances the visual representation of the application by using a more relevant image.
Updated the `App` component in `app.tsx` to include a new floating action button (Fab) linking to Digital Data. The button now features a transparent background and no box shadow, along with an image for improved visual representation. The `useScrollToTop` function remains unchanged but has a more streamlined implementation.