- Ersetzte die separate Verwendung von `changedWho` und `changedWhen` durch die neue Methode `getChangedInfo()` in der Klasse `Doc`.
- Aktualisiertes Symbol für `addedWho` von ‚gridicons:add‘ zu ‚mdi:user‘.
- Ersetzte Info-Symbole mit semantisch passenderen Symbolen
- Ändern von `justifyContent` von `flex-end` zu `flex-start` für bessere Ausrichtung
- Falsy-Werte herausgefiltert, um zu verhindern, dass leere Info-Elemente angezeigt werden
- onError-Handler zur renderCover-Komponente hinzugefügt, um ein Fallback-Symbol
anzuzeigen, wenn das Dokumentbild nicht geladen werden kann. Verhindert eine fehlerhafte Bildanzeige durch
, indem die Quelle durch ein standardmäßiges „unbekanntes“ Symbol ersetzt wird.
- Methode `static map()` hinzugefügt, um eine `Doc`-Instanz aus einem Teilobjekt zu erzeugen.
- Umbenennung des Getters `Extension` in `extension`, um mit den Namenskonventionen übereinzustimmen.
- Getter `iconSrc` hinzugefügt, um einen Dateisymbolpfad basierend auf der Dateierweiterung bereitzustellen.
Ersetzte die Verwendung von `fDate()` und rohem `changedWhen` Rendering mit `toLocaleDateString('de-DE')`
für konsistente und lokalisierte Datumsformatierung in Dokumentinfo und Datumsanzeige.
- _documents aus dem Mock-Modul importieren
- DocQuery-Typ für optionale Abfrageparameter hinzufügen
- Implementierung der Funktionen getDocuments, getDocumentById und getDocumentByName
- Beibehaltung der ursprünglichen Doc-Typ-Definition für Konsistenz
- 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.