Skip to content

Commit

Permalink
Merge branch 'develop' into ft-admin-notification
Browse files Browse the repository at this point in the history
  • Loading branch information
Prince-Kid authored Oct 19, 2024
2 parents 7ef3d3a + b5d89c1 commit 1ece6cd
Show file tree
Hide file tree
Showing 52 changed files with 23,425 additions and 933 deletions.
Binary file modified .DS_Store
Binary file not shown.
40 changes: 20 additions & 20 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ checks:
complex-logic:
enabled: true
config:
threshold: 4
threshold: 15
file-lines:
enabled: true
config:
threshold: 25000
threshold: 250
method-complexity:
enabled: true
config:
threshold: 50
threshold: 15
method-count:
enabled: true
config:
threshold: 20
method-lines:
enabled: true
config:
threshold: 900
threshold: 200
nested-control-flow:
enabled: true
config:
Expand All @@ -41,20 +41,20 @@ checks:
config:
threshold: #language-specific defaults. overrides affect all languages.
plugins:
rubocop:
enabled: true
eslint:
enabled: false
channel: eslint-8
rubocop:
enabled: true
eslint:
enabled: false
channel: eslint-8
exclude_patterns:
- "config/"
- "db/"
- "dist/"
- "features/"
- "**/node_modules/"
- "script/"
- "**/spec/"
- "**/test/"
- "**/tests/"
- "**/vendor/"
- "**/*.d.ts"
- "config/"
- "db/"
- "dist/"
- "features/"
- "**/node_modules/"
- "script/"
- "**/spec/"
- "**/test/"
- "**/tests/"
- "**/vendor/"
- "**/*.d.ts"
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ coverage
dist
buildcoverage
package-lock.json
yarn.lock
.DS_Store
build/
yarn.lock
build/
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@babel/preset-env": "^7.19.3",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@expo/webpack-config": "^0.17.2",
"@expo/webpack-config": "^19.0.1",
"@iconify/react": "^4.0.0",
"@testing-library/dom": "^8.19.0",
"@testing-library/jest-dom": "^5.16.5",
Expand All @@ -53,7 +53,7 @@
"html-webpack-plugin": "^5.6.0",
"i": "^0.3.7",
"node-polyfill-webpack-plugin": "^2.0.1",
"npm": "^8.19.2",
"npm": "^10.8.3",
"postcss": "^8.4.14",
"postcss-loader": "^7.0.0",
"process": "^0.11.10",
Expand Down Expand Up @@ -83,7 +83,7 @@
"@mui/x-date-pickers": "^5.0.6",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@tinymce/tinymce-react": "^4.2.0",
"@tinymce/tinymce-react": "^5.1.1",
"@types/react-i18next": "^8.1.0",
"@types/react-router": "^5.1.19",
"@types/react-router-dom": "^5.3.3",
Expand Down Expand Up @@ -121,15 +121,15 @@
"react-hot-toast": "^2.4.1",
"react-i18next": "^11.18.6",
"react-icons": "^4.6.0",
"react-js-pagination": "^3.0.3",
"react-js-pagination": "^3.0.2",
"react-loader-spinner": "^6.1.6",
"react-loading-skeleton": "^3.5.0",
"react-modal": "^3.16.1",
"react-paginate": "^8.1.3",
"react-redux": "^8.0.4",
"react-render-html": "^0.6.0",
"react-router-dom": "^6.4.2",
"react-scripts": "^5.0.1",
"react-scripts": "^3.0.1",
"react-select": "^5.7.4",
"react-table": "^7.8.0",
"react-toastify": "^9.0.8",
Expand Down
1 change: 0 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
</head>
<body>
<div id="root"></div>

</body>
</html>
9 changes: 9 additions & 0 deletions src/assets/assets/calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/assets/collaborative-learning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/assets/performance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/assets/strategy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 110 additions & 0 deletions src/components/GoogleForm/GoogleRules.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import React, { useState } from "react";

const RulesModal: React.FC = () => {
const [isOpen, setIsOpen] = useState(false);

return (
<div>
{/* Button to open the modal */}
<button
onClick={() => setIsOpen(true)}
className="bg-primary dark:bg-green-500 rounded-md py-2 px-4 text-white font-medium transition-opacity duration-200"
>
Google Form Rules
</button>

{/* Modal overlay and content */}
{isOpen && (
<div className="fixed inset-0 bg-black bg-opacity-50 flex justify-center flex-col items-center z-50">
<div className="bg-dark-frame-bg p-6 rounded-lg shadow-lg max-w-lg">
<button
onClick={() => setIsOpen(false)}
className="text-gray-600 hover:text-gray-800 float-right font-bold text-xl"
>
&times;
</button>

<h2 className="text-2xl font-semibold mb-4 text-[#165a62]">
Google Form Creation Rules
</h2>
<div className="max-h-96 overflow-y-auto">
<ol className="list-decimal list-inside space-y-2">
<li>
<strong>Use the Correct Entry IDs for Dynamic Fields</strong>
<p>
Every form must contain a field for <strong>USERID</strong>{" "}
, <strong>USEREMAIL</strong> and <strong>JOBTITLE</strong> linked as query parameters in
the form URL.
</p>
</li>
<li>
<strong>Field Placement</strong>
<p>
Ensure that the fields for <strong>USERID</strong>,{" "}
<strong>USEREMAIL</strong> and <strong>JOBTITLE</strong> are correctly positioned.
</p>
</li>
<li>
<strong>Ensure All Required Fields Are Present</strong>
<p>
Include necessary fields and make the dynamic fields
required.
</p>
</li>
<li>
<strong>How to create pre-filled Google form link</strong>
<p>
<ol className="list-decimal list-inside space-y-2">
<li>
<strong>Select the desired fields</strong>
<p>
Select the fields you want to include in the
pre-filled link. Make sure to include the fields for{" "}
<strong>USERID</strong>
, <strong>USEREMAIL</strong> and <strong>JOBTITLE</strong>
</p>
</li>
<li>
<strong>Select the desired URL format</strong>
<p>
Go to the form editor. Click on the three dots in the
top-right and select “Get pre-filled link.”
</p>
</li>
<li>
<strong>
Select the field that will hold the user ID or email
</strong>
<p>
Example: <code>userID</code> with value of{" "}
<code>USERID</code> , <code>Email</code> with value
of <code>USEREMAIL</code> and <code>Job Title</code> with value of <code>JOBTITLE</code>
</p>
</li>
<li>
<strong>
Copy link & paste into{" "}
<code>Google form link field</code>
</strong>
<p>Click on “Get link” and copy the generated link.</p>
</li>
</ol>
</p>
</li>
</ol>
</div>
{/* Close modal button */}
<button
onClick={() => setIsOpen(false)}
className="mt-6 w-full bg-primary dark:bg-[#56C870] text-white py-2 px-4 rounded-md hover:bg-primary transition-colors"
>
Close
</button>
</div>
</div>
)}
</div>
);
};

export default RulesModal;
Loading

0 comments on commit 1ece6cd

Please sign in to comment.