Commit Graph

29 Commits

Author SHA1 Message Date
Peter 51642612ec More style changes 2024-08-09 23:16:41 +02:00
Teriuihi cde2a01dd9 Refactor form to use useFormik and FormikProvider
Replaced Formik component with useFormik hook and FormikProvider. This change simplifies the form implementation and separates the form's logic and presentation. The form now benefits from more direct access to formik methods and state.
2024-08-08 21:37:09 +02:00
Peter 4dda70effc Styling for forms 2024-08-08 21:32:37 +02:00
Teriuihi 94c336fb74 Add dropdown and additional info fields to form steps
Updated form interfaces to include optional dropdown and additional info properties. Adjusted form rendering logic to handle these new fields, providing clearer instructions and choices for users. Refined validation messages for consistency and clarity.
2024-08-08 20:33:15 +02:00
Teriuihi 7407372b03 Add branch condition to Discord notification stage
Previously, the Discord notification was sent for all branches. Now, the notification will only be sent for builds on the 'main' or 'master' branches, reducing unnecessary notifications.
2024-08-08 20:32:43 +02:00
Teriuihi 973b6b5e7d Add titles to form data and display them dynamically
Incorporated 'title' property into form data objects for dynamic rendering in the GenericForm component. This enhancement facilitates the use of specific titles for different forms, improving readability and user experience.
2024-08-07 00:41:11 +02:00
Teriuihi f52201b683 Rename variables for clarity and adjust download filename and contents
Renamed the parameter 'e' to 'formikValues' for better clarity in the handleSubmit function. Now load formikValues into the file that get's uploaded so it has the up to date form data. Changed the downloaded JSON filename from 'form_data.json' to 'your_form_data.json' to be more user-friendly.
2024-08-06 23:21:53 +02:00
Teriuihi 9a281ed76c Update backend URLs to use environment variables
Replaced hardcoded backend URLs with environment variables in contact, apply, and verify_email components. Added .env.development and .env.production files to define the base URLs for different environments. This improves flexibility and allows easier configuration changes.
2024-08-06 23:17:37 +02:00
Teriuihi 997baae4d3 Fix JSON serialization in error handling
Replaced steps variable with userInput for JSON serialization in error handling. This ensures that the correct data is saved as a JSON blob when a network error occurs.
2024-08-06 22:28:41 +02:00
Teriuihi 857d61e09d Add staff application form
Introduced a new form for staff applications based on the old staff application form.
2024-08-06 22:23:35 +02:00
Teriuihi d2f15d2627 Refactor forms to use a generic form component
Replaced the contact form with a generic form component to support multiple form configurations. Moved validation schema and form data to a new structure, allowing dynamic form rendering. Updated the App component to utilize this generic approach for handling different forms.
2024-08-06 21:07:20 +02:00
Teriuihi 2eef14ba2e Update API endpoints in contact and verify email forms
This commit changes the API endpoints in contact.tsx and verify_mail.tsx to use the new 'forms-backend.alttd.com' domain. This ensures that form submissions and email verifications are routed correctly to the updated backend.
2024-08-05 00:49:33 +02:00
Teriuihi c725d6e85d Update API endpoints to production URLs
Changed the API endpoints in contact and verify email forms from localhost URLs to the production server. This ensures that the forms submit data to the correct, live endpoints.
2024-08-05 00:28:27 +02:00
Teriuihi 90cc0edcf4 Fix strict equality check in contact form input handler
Updated the input change handler to use strict equality for comparing the previous and current length of the form value, ensuring more reliable condition checks and better handling of form state updates.
2024-08-04 23:21:05 +02:00
Teriuihi 7ab9e25eb5 Handle npm install retries with fallback options
Added an environment variable for maximum retries and a script to handle npm install with fallback to npm ci and retry mechanisms using --legacy-peer-deps and --force options. This might fix npm sucking.
2024-08-04 23:18:56 +02:00
Teriuihi a8ea5c38f1 Update npm install command in Jenkinsfile
Forced installation of npm packages and resolved legacy peer dependency issues by adding `--force` and `--legacy-peer-dep` flags to `npm install` command. This ensures compatibility with certain package versions that may have unresolved peer dependencies.
2024-08-04 23:10:42 +02:00
Teriuihi 8b6e65bad1 Add Jenkinsfile for CI/CD pipeline
This Jenkinsfile sets up a simple CI/CD pipeline with three stages: 'Gradle' for building the project, 'Archive' for saving build artifacts, and 'discord' for sending build notifications. The pipeline uses npm for package management and build steps, and integrates with Discord for build result notifications.
2024-08-04 23:07:12 +02:00
Teriuihi 97ba9cc087 Update build settings and homepage URL for forms app
Changed the homepage URL in package.json to a relative path and adjusted the build command's PUBLIC_URL. Also updated caniuse-lite version in package-lock.json and modified BrowserRouter basename in App.tsx.
2024-08-04 22:57:18 +02:00
Teriuihi 5301940a2f Update fetch URLs and set app base URL
The localhost:8080 server references in fetch calls within verify_mail.tsx and contact.tsx files have been updated to localhost:8002. Furthermore, the application base URL has been set to '/forms' in package.json, and in the BrowserRouter element within App.tsx, to ensure proper routing on the production server.
2024-04-28 21:41:29 +02:00
Teriuihi 011fb9a282 Refactor CSS and modify data display layout
The commit includes modification to the CSS of the verify email component and changes how form data is displayed. The form data that was previously shown in a standard div is now presented in a table format for better readability. Also, it contains minor debug changes in verify_mail.tsx to handle invalid responses.
2024-04-28 17:59:17 +02:00
Teriuihi 394fd6069e Add Formik and Yup to handle forms
Formik and Yup libraries have been introduced to handle forms and their validation, respectively. This improves the clarity and robustness of form validation. Handled logic includes character restrictions, requirement conditions, and minimum and maximum length constraints for the 'username', 'email', and 'question' fields of the contact form.
2024-03-01 20:42:54 +01:00
Peter f210c292f1 missing files for header and fonts 2024-02-10 19:53:56 +01:00
Peter 3baee7f8e5 Fixed footer, messed with some colors. Wasted time on a failed attempted at a darkmode switch 2024-01-14 21:05:13 +01:00
Teriuihi e967a42423 Update styling and header of 'Thank you' page
Refactored the 'Thank you' page for email verification feature by enhancing the display layout and typography. This includes the introduction of a header with dynamic page title provided by 'Helmet', the adoption of a flexbox-based layout for the display of form data, as well as the adjustment of font sizes and margins across elements for improved readability.
2024-01-14 10:18:09 +01:00
Teriuihi 737460a2c2 Add DEBUG component for development environment
Introduced a new DEBUG component exclusively for the development environment. This component contains navigation options for email verification and the 'thank you' page. Updated the .gitignore file to no longer exclude DEBUG files, and included a basic layout and styling for the component.
2024-01-14 10:17:50 +01:00
Teriuihi f2d932bcd7 Add Helmet to manage email verification page title
Integrated the Helmet library in the 'verify_mail.tsx' component to handle setting the page title dynamically to "Email validation". This helps in improving page context for users and SEO. As part of the update, the page title has been set within the newly added Helmet wrapper.
2024-01-14 09:59:26 +01:00
Teriuihi d02df0e418 Update email verification UI and functionality
Updated the user interface for the email verification component, refining the visual organization and style through updates to `verify_mail.tsx` and `VerifyMail.css`. Also, improved the functionality by enforcing a condition that validation code input must be numeric and not more than six characters long. Additionally, added more files to .gitignore to ignore debug files.
2024-01-14 09:52:21 +01:00
Teriuihi 49a71097bc Create site with contact form and email verification
This commit removes the redundant logo.svg file. It then adds several new components including 'footer', 'contact_form', 'home', 'verify_email' in forms/src/components directory. It also includes associated CSS files for styling these components. Updates have also been made in the index.html file for SEO metadata. Changes made aim to enhance functionality and improve user interface.
2024-01-13 15:53:47 +01:00
Teriuihi e5492401fd Initialize project using Create React App 2024-01-06 17:42:33 +01:00