@djangocfg/layouts 2.1.327 → 2.1.332
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/layouts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.332",
|
|
4
4
|
"description": "Simple, straightforward layout components for Next.js - import and use with props",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"layouts",
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
"check": "tsc --noEmit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@djangocfg/api": "^2.1.
|
|
88
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
89
|
-
"@djangocfg/debuger": "^2.1.
|
|
90
|
-
"@djangocfg/i18n": "^2.1.
|
|
91
|
-
"@djangocfg/monitor": "^2.1.
|
|
92
|
-
"@djangocfg/ui-core": "^2.1.
|
|
93
|
-
"@djangocfg/ui-nextjs": "^2.1.
|
|
87
|
+
"@djangocfg/api": "^2.1.332",
|
|
88
|
+
"@djangocfg/centrifugo": "^2.1.332",
|
|
89
|
+
"@djangocfg/debuger": "^2.1.332",
|
|
90
|
+
"@djangocfg/i18n": "^2.1.332",
|
|
91
|
+
"@djangocfg/monitor": "^2.1.332",
|
|
92
|
+
"@djangocfg/ui-core": "^2.1.332",
|
|
93
|
+
"@djangocfg/ui-nextjs": "^2.1.332",
|
|
94
94
|
"@hookform/resolvers": "^5.2.2",
|
|
95
95
|
"consola": "^3.4.2",
|
|
96
96
|
"lucide-react": "^0.545.0",
|
|
@@ -120,15 +120,15 @@
|
|
|
120
120
|
"uuid": "^11.1.0"
|
|
121
121
|
},
|
|
122
122
|
"devDependencies": {
|
|
123
|
-
"@djangocfg/api": "^2.1.
|
|
124
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
125
|
-
"@djangocfg/debuger": "^2.1.
|
|
126
|
-
"@djangocfg/i18n": "^2.1.
|
|
127
|
-
"@djangocfg/monitor": "^2.1.
|
|
128
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
129
|
-
"@djangocfg/ui-core": "^2.1.
|
|
130
|
-
"@djangocfg/ui-nextjs": "^2.1.
|
|
131
|
-
"@djangocfg/ui-tools": "^2.1.
|
|
123
|
+
"@djangocfg/api": "^2.1.332",
|
|
124
|
+
"@djangocfg/centrifugo": "^2.1.332",
|
|
125
|
+
"@djangocfg/debuger": "^2.1.332",
|
|
126
|
+
"@djangocfg/i18n": "^2.1.332",
|
|
127
|
+
"@djangocfg/monitor": "^2.1.332",
|
|
128
|
+
"@djangocfg/typescript-config": "^2.1.332",
|
|
129
|
+
"@djangocfg/ui-core": "^2.1.332",
|
|
130
|
+
"@djangocfg/ui-nextjs": "^2.1.332",
|
|
131
|
+
"@djangocfg/ui-tools": "^2.1.332",
|
|
132
132
|
"@types/node": "^24.7.2",
|
|
133
133
|
"@types/react": "^19.1.0",
|
|
134
134
|
"@types/react-dom": "^19.1.0",
|
|
@@ -6,7 +6,7 @@ import { useForm } from 'react-hook-form';
|
|
|
6
6
|
import { toast } from '@djangocfg/ui-core/hooks';
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
|
|
9
|
+
PatchedCfgUserUpdateRequest, PatchedCfgUserUpdateRequestSchema,
|
|
10
10
|
useAuth
|
|
11
11
|
} from '@djangocfg/api/auth';
|
|
12
12
|
import {
|
|
@@ -21,8 +21,8 @@ export const ProfileForm = () => {
|
|
|
21
21
|
const [isEditing, setIsEditing] = useState(false);
|
|
22
22
|
const [isSaving, setIsSaving] = useState(false);
|
|
23
23
|
|
|
24
|
-
const form = useForm<
|
|
25
|
-
resolver: zodResolver(
|
|
24
|
+
const form = useForm<PatchedCfgUserUpdateRequest>({
|
|
25
|
+
resolver: zodResolver(PatchedCfgUserUpdateRequestSchema),
|
|
26
26
|
defaultValues: {
|
|
27
27
|
first_name: '',
|
|
28
28
|
last_name: '',
|
|
@@ -45,7 +45,7 @@ export const ProfileForm = () => {
|
|
|
45
45
|
}
|
|
46
46
|
}, [user, form]);
|
|
47
47
|
|
|
48
|
-
const handleSubmit = async (data:
|
|
48
|
+
const handleSubmit = async (data: PatchedCfgUserUpdateRequest) => {
|
|
49
49
|
setIsSaving(true);
|
|
50
50
|
try {
|
|
51
51
|
await updateProfile(data);
|
|
@@ -57,7 +57,7 @@ export const ProfileForm = () => {
|
|
|
57
57
|
const fieldErrors = error.response.data;
|
|
58
58
|
Object.entries(fieldErrors).forEach(([field, messages]) => {
|
|
59
59
|
if (Array.isArray(messages) && messages.length > 0) {
|
|
60
|
-
form.setError(field as keyof
|
|
60
|
+
form.setError(field as keyof PatchedCfgUserUpdateRequest, {
|
|
61
61
|
type: 'server',
|
|
62
62
|
message: messages[0],
|
|
63
63
|
});
|