@salesforce/webapp-template-feature-react-authentication-experimental 1.107.1 → 1.107.3
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/dist/.a4drules/skills/creating-webapp/SKILL.md +20 -0
- package/dist/.a4drules/skills/deploying-to-salesforce/SKILL.md +229 -0
- package/dist/.a4drules/skills/exploring-graphql-schema/SKILL.md +7 -18
- package/dist/.a4drules/skills/using-graphql/SKILL.md +2 -1
- package/dist/.a4drules/webapp-code-quality.md +5 -2
- package/dist/.a4drules/webapp-data-access.md +25 -0
- package/dist/.a4drules/webapp-deployment.md +32 -0
- package/dist/.a4drules/webapp-react-typescript.md +4 -12
- package/dist/.a4drules/webapp-react.md +7 -13
- package/dist/AGENT.md +3 -0
- package/dist/CHANGELOG.md +19 -0
- package/dist/eslint.config.js +7 -0
- package/dist/force-app/main/default/webapplications/feature-react-authentication/codegen.yml +1 -0
- package/dist/force-app/main/default/webapplications/feature-react-authentication/eslint.config.js +2 -0
- package/dist/force-app/main/default/webapplications/feature-react-authentication/package.json +3 -9
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/app.tsx +3 -1
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/components/alerts/status-alert.tsx +1 -1
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/features/authentication/api/userProfileApi.ts +10 -10
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/features/authentication/pages/Profile.tsx +26 -4
- package/dist/force-app/main/default/webapplications/feature-react-authentication/tsconfig.json +7 -1
- package/dist/package-lock.json +9995 -0
- package/dist/package.json +7 -7
- package/package.json +2 -2
- package/dist/.a4drules/skills/generating-micro-frontend-lwc/SKILL.md +0 -137
- package/dist/force-app/main/default/webapplications/feature-react-authentication/tsconfig.tsbuildinfo +0 -1
|
@@ -46,8 +46,19 @@ export default function Profile() {
|
|
|
46
46
|
setSubmitError(null);
|
|
47
47
|
setSuccess(false);
|
|
48
48
|
try {
|
|
49
|
-
const updated = await updateUserProfile<ProfileFormValues
|
|
50
|
-
|
|
49
|
+
const updated = await updateUserProfile<Partial<ProfileFormValues>>(user.id, value);
|
|
50
|
+
// Merge with submitted values so missing fields (e.g. due to FLS) don't break the form
|
|
51
|
+
setProfile({
|
|
52
|
+
FirstName: updated.FirstName ?? value.FirstName ?? "",
|
|
53
|
+
LastName: updated.LastName ?? value.LastName ?? "",
|
|
54
|
+
Email: updated.Email ?? value.Email ?? "",
|
|
55
|
+
Phone: updated.Phone ?? value.Phone ?? null,
|
|
56
|
+
Street: updated.Street ?? value.Street ?? null,
|
|
57
|
+
City: updated.City ?? value.City ?? null,
|
|
58
|
+
State: updated.State ?? value.State ?? null,
|
|
59
|
+
PostalCode: updated.PostalCode ?? value.PostalCode ?? null,
|
|
60
|
+
Country: updated.Country ?? value.Country ?? null,
|
|
61
|
+
});
|
|
51
62
|
setSuccess(true);
|
|
52
63
|
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
53
64
|
} catch (err) {
|
|
@@ -59,10 +70,21 @@ export default function Profile() {
|
|
|
59
70
|
|
|
60
71
|
useEffect(() => {
|
|
61
72
|
let mounted = true;
|
|
62
|
-
fetchUserProfile<ProfileFormValues
|
|
73
|
+
fetchUserProfile<Partial<ProfileFormValues>>(user.id)
|
|
63
74
|
.then((data) => {
|
|
64
75
|
if (mounted) {
|
|
65
|
-
|
|
76
|
+
// Merge with defaults so missing fields (e.g. due to FLS) don't break the form
|
|
77
|
+
setProfile({
|
|
78
|
+
FirstName: data.FirstName ?? "",
|
|
79
|
+
LastName: data.LastName ?? "",
|
|
80
|
+
Email: data.Email ?? "",
|
|
81
|
+
Phone: data.Phone ?? null,
|
|
82
|
+
Street: data.Street ?? null,
|
|
83
|
+
City: data.City ?? null,
|
|
84
|
+
State: data.State ?? null,
|
|
85
|
+
PostalCode: data.PostalCode ?? null,
|
|
86
|
+
Country: data.Country ?? null,
|
|
87
|
+
});
|
|
66
88
|
}
|
|
67
89
|
})
|
|
68
90
|
.catch((err: any) => {
|
package/dist/force-app/main/default/webapplications/feature-react-authentication/tsconfig.json
CHANGED
|
@@ -31,6 +31,12 @@
|
|
|
31
31
|
"@assets/*": ["./src/assets/*"]
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
"include": [
|
|
34
|
+
"include": [
|
|
35
|
+
"src",
|
|
36
|
+
"e2e",
|
|
37
|
+
"vite-env.d.ts",
|
|
38
|
+
"vitest-env.d.ts",
|
|
39
|
+
"vitest.setup.ts"
|
|
40
|
+
],
|
|
35
41
|
"references": [{ "path": "./tsconfig.node.json" }]
|
|
36
42
|
}
|