Commit Graph

50 Commits

Author SHA1 Message Date
Teriuihi d88104a985 Add fields for good builds, bad builds, and technical aspects
These new fields enhance the event application form data by capturing more detailed information about the applicant's building experience and technical skills.
2024-10-06 00:53:35 +02:00
Teriuihi 6f79363ec6 Fixed wrong link for event application 2024-10-06 00:39:01 +02:00
Teriuihi 43925b1300 Fixed wrong link for event application 2024-10-06 00:27:48 +02:00
Teriuihi ee54e91051 Add event application form
Implemented a new event application form with validations and necessary fields such as username, email, and event experience. Incorporated the form into the home page with a navigation link and updated form interfaces and data configurations.
2024-09-20 18:01:38 +02:00
Teriuihi 1c4f4b154b Enhance email verification layout styling
Added CSS styles for the fields and field containers to improve the layout and alignment of the email verification page. This change ensures a more structured and visually appealing presentation of the form data.
2024-08-11 19:13:49 +02:00
Teriuihi 30720d0738 Refactor type and string handling in ThankYou component
Changed the `DynamicFormData` type to accept any data type, enhancing flexibility. Updated string handling to be more explicit with type checks, ensuring newline handling works correctly for strings only.
2024-08-11 19:09:31 +02:00
Teriuihi 25c6a15413 Handle single-line and multi-line email verification messages
Previously, multi-line messages were parsed for line breaks while single-line messages were not appropriately handled. This update checks if the value contains line breaks and processes it accordingly, ensuring both single-line and multi-line messages are displayed correctly.
2024-08-11 19:01:00 +02:00
Teriuihi 821e63953b Refactor email verification UI to enhance data display
Replaced table with div and paragraph elements to improve readability of user-submitted data. Added logic to handle multiline form data and remove empty lines, ensuring cleaner and more user-friendly presentation.
2024-08-11 18:47:19 +02:00
Teriuihi ceaca60ece Add additional_info field to form requirements
Include extra guidance for the user to specify their timezone. This aims to reduce ambiguity and ensure better form submissions. The change is minimal but improves overall user experience.
2024-08-11 18:41:56 +02:00
Teriuihi b00b857f29 Add "Apply for staff" link to homepage
This commit enhances the homepage by adding a new link to the "Apply for staff" page, making it easier for visitors to find and access staff application information directly from the main page. The new link is placed alongside the existing "Contact us" link for better visibility.
2024-08-11 18:32:57 +02:00
Teriuihi cf7bdeb481 Enforce integer validation on age and average time fields
Added integer validation messages to the age and avg_time fields to ensure users enter whole numbers. This enhances the form's data integrity by preventing input errors.
2024-08-10 04:35:54 +02:00
Teriuihi afb833bd19 Add useCallback to optimize handleCheckForm
Refactored handleCheckForm using useCallback to prevent unnecessary re-renders. This ensures the function is only re-created when formData.backendFormName changes, improving performance. Updated useEffect dependencies to include handleCheckForm for proper effect cleanup.
2024-08-10 03:27:28 +02:00
Teriuihi 6215944972 Fix missing promise handling in formActiveRedirect
Added a then() clause to handle the resolved promise after calling handleCheckForm in the useEffect. This ensures any asynchronous operations complete as expected and avoids potential unhandled promise rejections.
2024-08-10 03:24:46 +02:00
Teriuihi a08c55ec41 Remove GenericForm import from App.tsx
GenericForm was imported but never used in App.tsx. This clean-up helps in maintaining the codebase by removing unnecessary imports, thus enhancing readability and reducing potential confusion.
2024-08-10 03:24:07 +02:00
Teriuihi 2a56144bbc Enhance npm cache clean error handling in Jenkinsfile
Wrapped npm cache clean command in a try-catch block to improve error handling. This ensures that the build process can proceed even if the npm cache clean step fails. Added an informational echo message for better diagnostics in case of failure.
2024-08-10 03:21:16 +02:00
Teriuihi 98b86363f5 Add npm install fallback and remove unused variable
Added a fallback npm install command in the Jenkinsfile to handle legacy peer dependencies. Also removed an unused variable from genericForm.tsx to improve code clarity and performance.
2024-08-10 03:19:26 +02:00
Teriuihi 75559af7c8 Add form active status check and redirection
Introduced `FormActiveRedirect` component to check if forms are active before rendering. Updated form data to include `backendFormName` and adjusted routes in `App.tsx` to use the new component. This ensures that inactive forms redirect users with a relevant message.
2024-08-10 03:10:25 +02:00
Teriuihi 21e23b98ad Remove unused Field import from GenericForm
This commit eliminates the unused Field import from Formik in the genericForm.tsx file. Removing unused imports helps maintain cleaner and more efficient code.
2024-08-10 00:27:24 +02:00
Teriuihi 67eddc0394 Merge branch 'refs/heads/dev' 2024-08-10 00:26:46 +02:00
Teriuihi d005b72634 Add react-select component and integrate into FormHTML
Added `react-select` library dependency to `package.json` and lock file. Created a new `FormHTML` component in `formHTML.tsx` to handle form field rendering, including support for `select` fields using `react-select` for multi-select functionality.
2024-08-10 00:25:44 +02:00
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 960fc1707b Refactor conditional stage in Jenkinsfile
Updated the 'discord' stage condition to use 'anyOf' for more readable and maintainable branch checks. This change enhances the clarity of branch conditions, ensuring it triggers on either the 'main' or 'master' branches.
2024-08-08 20:38:05 +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