Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Fix: Apply reviews

Anthony Rimet0833bafede72
diff --git a/README.md b/README.md
index 314d9052..e980c3b3 100644
--- a/README.md
+++ b/README.md
@@ -253,12 +253,12 @@ Create a new migration using the following command:
npx supabase db diff | npx supabase migration new <migration_name>
```
-### Password Reset When Forgotten
-If users forgot their password, they can request for a reset. Atomic CRM handle it for you. All the magic is done by the custom route `/forgot-password` and `/set-password` that you can find in the `CRM` component.
+### Password Reset When Forgotten or Password change
+If users forgot their password or want to update it, they can request for a reset. Atomic CRM handle it for you. All the magic is done by the custom route `/forgot-password` and `/set-password` that you can find in the `CRM` component.
If you want to update default configuration:
-### Local development
+#### Local development
1. Go to your `config.toml` file
2. In `[auth]` section set `site_url` to your application URL
@@ -283,7 +283,7 @@ In Recovery email template set the `auth-callback` redirection
Supabase provides an [Inbucket](https://inbucket.org/) instance that allows you to test your emails and configure your flow.
-### Production
+#### Production
This requires you to configure your supabase instance:
@@ -291,3 +291,7 @@ This requires you to configure your supabase instance:
2. In URL Configuration, set Site URL to your application URL
3. In URL Configuration, add the following URL in the Redirect URLs section: `YOUR_APPLICATION_URL/auth-callback`
4. In Email Templates, change the `"{{ .ConfirmationURL }}"` to `"{{ .ConfirmationURL }}/auth-callback"`
+
+### Invite Users
+
+You can invite users to your CRM. The invitation is sent by email. The invited user will receive an email with a link to set a password. Do the same configuration as the password reset process but with the `invite` template.
\ No newline at end of file
diff --git a/package.json b/package.json
index 5880b07d..c304b0dd 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
"papaparse": "^5.4.1",
"prop-types": "^15.8.1",
"ra-data-fakerest": "^5.1.1",
- "ra-supabase": "^3.0.1",
+ "ra-supabase": "^3.1.0",
"react": "^18.2.0",
"react-admin": "^5.1.0",
"react-cropper": "^2.3.3",
diff --git a/src/providers/fakerest/dataProvider.ts b/src/providers/fakerest/dataProvider.ts
index e78b252d..e1ab5748 100644
--- a/src/providers/fakerest/dataProvider.ts
+++ b/src/providers/fakerest/dataProvider.ts
@@ -157,12 +157,12 @@ const dataProviderWithCustomMethod: CrmDataProvider = {
password,
};
},
- async salesCreate({
- password: _password,
- ...data
- }: SalesFormData): Promise<Sale> {
+ async salesCreate({ ...data }: SalesFormData): Promise<Sale> {
const user = await dataProvider.create('sales', {
- data,
+ data: {
+ ...data,
+ password: 'new_password',
+ },
});
return {