Skip to content

Commit

Permalink
Merge pull request #3221 from LiteFarmOrg/REVERT_LF-4240_DATA_POLICY_…
Browse files Browse the repository at this point in the history
…UPDATES

Revert "Merge pull request #3217 from LiteFarmOrg/LF-4240/April_2024_data_policy_updates"
  • Loading branch information
kathyavini authored Jun 5, 2024
2 parents 5ec1be4 + 5cd0c94 commit 81587ef
Show file tree
Hide file tree
Showing 11 changed files with 292 additions and 315 deletions.
30 changes: 0 additions & 30 deletions packages/api/db/migration/20240603204923_reset_has_consent.js

This file was deleted.

5 changes: 3 additions & 2 deletions packages/webapp/src/containers/Consent/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useForm } from 'react-hook-form';
import React, { useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import PureConsent from '../../components/Consent';
import { userFarmSelector } from '../userFarmSlice';
Expand All @@ -14,7 +15,6 @@ import PortugueseWorkerConsent from './locales/pt/Worker.Consent.md';
import SpanishOwnerConsent from './locales/es/Owner.Consent.md';
import SpanishWorkerConsent from './locales/es/Worker.Consent.md';
import { getLanguageFromLocalStorage } from '../../util/getLanguageFromLocalStorage';
import { CONSENT_VERSION } from '../../util/constants';

const languageConsent = {
en: { worker: <EnglishWorkerConsent />, owner: <EnglishOwnerConsent /> },
Expand Down Expand Up @@ -42,6 +42,7 @@ function ConsentForm({

formState: { errors },
} = useForm();
const [consentVersion] = useState('5.0');
const consent =
role.role_id === 3 ? getLanguageConsent(language).worker : getLanguageConsent(language).owner;
const checkboxName = 'consentCheckbox';
Expand All @@ -57,7 +58,7 @@ function ConsentForm({
};

const updateConsent = (data) => {
dispatch(patchConsent({ has_consent: true, consent_version: CONSENT_VERSION, goForwardTo }));
dispatch(patchConsent({ has_consent: true, consent_version: consentVersion, goForwardTo }));
};

return (
Expand Down
78 changes: 37 additions & 41 deletions packages/webapp/src/containers/Consent/locales/en/Owner.Consent.md

Large diffs are not rendered by default.

52 changes: 25 additions & 27 deletions packages/webapp/src/containers/Consent/locales/en/Worker.Consent.md

Large diffs are not rendered by default.

103 changes: 50 additions & 53 deletions packages/webapp/src/containers/Consent/locales/es/Owner.Consent.md

Large diffs are not rendered by default.

70 changes: 32 additions & 38 deletions packages/webapp/src/containers/Consent/locales/es/Worker.Consent.md

Large diffs are not rendered by default.

79 changes: 47 additions & 32 deletions packages/webapp/src/containers/Consent/locales/fr/Owner.Consent.md

Large diffs are not rendered by default.

78 changes: 48 additions & 30 deletions packages/webapp/src/containers/Consent/locales/fr/Worker.Consent.md

Large diffs are not rendered by default.

58 changes: 26 additions & 32 deletions packages/webapp/src/containers/Consent/locales/pt/Owner.Consent.md

Large diffs are not rendered by default.

52 changes: 24 additions & 28 deletions packages/webapp/src/containers/Consent/locales/pt/Worker.Consent.md

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions packages/webapp/src/util/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ export const SUPPORT_EMAIL = '[email protected]';
// Changing this forces logout and updates the new release card
export const APP_VERSION = '3.6.0';
export const VERSION_RELEASE_NOTES_LINK = 'https://www.litefarm.org/post/a-new-look-for-a-new-year';

export const CONSENT_VERSION = '6.0';

0 comments on commit 81587ef

Please sign in to comment.