@hed-hog/category 0.0.329 → 0.0.331

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,6 +47,7 @@ import {
47
47
  SheetTitle,
48
48
  } from '@/components/ui/sheet';
49
49
  import { useDebounce } from '@/hooks/use-debounce';
50
+ import { usePersistedPageSize } from '@/hooks/use-persisted-page-size';
50
51
  import { useApp, useQuery } from '@hed-hog/next-app-provider';
51
52
  import { zodResolver } from '@hookform/resolvers/zod';
52
53
  import * as TablerIcons from '@tabler/icons-react';
@@ -117,7 +118,11 @@ export default function CategoryPage() {
117
118
  const [searchTerm, setSearchTerm] = useState('');
118
119
  const debouncedSearch = useDebounce(searchTerm);
119
120
  const [page, setPage] = useState(1);
120
- const [pageSize, setPageSize] = useState(10);
121
+ const [pageSize, setPageSize] = usePersistedPageSize({
122
+ storageKey: 'pagination:category:pageSize',
123
+ defaultValue: 10,
124
+ allowedValues: [10, 20, 30, 40, 50],
125
+ });
121
126
  const [statusFilter, setStatusFilter] = useState<string>('all');
122
127
  const [parentFilter, setParentFilter] = useState<string>('all');
123
128
  const [selectedLocale, setSelectedLocale] = useState<string>('');
@@ -449,7 +454,7 @@ export default function CategoryPage() {
449
454
  return (
450
455
  <Page>
451
456
  <PageHeader
452
- breadcrumbs={[{ label: 'Home', href: '/' }, { label: t('title') }]}
457
+ breadcrumbs={[{ label: t('home'), href: '/' }, { label: t('title') }]}
453
458
  actions={[
454
459
  {
455
460
  label: t('newCategory'),
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "Category": {
3
+ "home": "Home",
3
4
  "title": "Categories",
4
5
  "description": "Manage all system categories",
5
6
  "newCategory": "New Category",
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "Category": {
3
+ "home": "Início",
3
4
  "title": "Categorias",
4
5
  "description": "Gerencie todas as categorias do sistema",
5
6
  "newCategory": "Nova Categoria",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hed-hog/category",
3
- "version": "0.0.329",
3
+ "version": "0.0.331",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "dependencies": {
@@ -9,11 +9,11 @@
9
9
  "@nestjs/core": "^11",
10
10
  "@nestjs/jwt": "^11",
11
11
  "@nestjs/mapped-types": "*",
12
- "@hed-hog/api-prisma": "0.0.6",
13
- "@hed-hog/api-pagination": "0.0.7",
14
12
  "@hed-hog/api-locale": "0.0.14",
13
+ "@hed-hog/api-prisma": "0.0.6",
15
14
  "@hed-hog/api": "0.0.8",
16
- "@hed-hog/core": "0.0.329"
15
+ "@hed-hog/core": "0.0.331",
16
+ "@hed-hog/api-pagination": "0.0.7"
17
17
  },
18
18
  "exports": {
19
19
  ".": {