Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(contract): add javascript validation #148

Merged
merged 21 commits into from
Dec 10, 2024
Merged

feat(contract): add javascript validation #148

merged 21 commits into from
Dec 10, 2024

Conversation

Chuck-D-Norris
Copy link
Contributor

@Chuck-D-Norris Chuck-D-Norris commented Nov 28, 2024

This pull request includes several changes to the admin contract and tree type views, as well as improvements to form validation and database schema updates. The most important changes include updating URLs, adding form validation, and modifying the database schema.

URL Updates:

  • Updated URLs in app/src/app/Views/Admin/Contract/Create.php, Edit.php, and Contracts.php to include the /admin prefix for better organization and consistency. [1] [2] [3]

Form Validation Enhancements:

  • Enhanced form validation in app/src/public/assets/js/app.js by adding reusable validation functions and event listeners for contract and tree type forms. This includes checks for empty fields, regex pattern validation, date range validation, positive integer validation, and maximum value validation.

Database Schema Modifications:

  • Modified the contracts table in database/start-scripts/0-init.sql to change the data type of start_date and end_date from timestamp to date for better accuracy and consistency.

UI and Form Adjustments:

  • Added error message divs and adjusted form IDs in app/src/app/Views/Admin/Contract/Create.php and Edit.php to improve user experience and error handling. [1] [2]
  • Updated form IDs and removed unnecessary divs for submit buttons in app/src/app/Views/Admin/TreeType/Create.php and Edit.php to streamline the UI. [1] [2]

@Chuck-D-Norris Chuck-D-Norris requested a review from a team as a code owner November 28, 2024 14:38
@github-actions github-actions bot added the area/app/views Categorizes issue or PR as related to app/views. label Nov 28, 2024
@0x1026 0x1026 added this to the Sprint 3 - Prototype milestone Nov 28, 2024
@0x1026 0x1026 changed the title feat (contract): Validation Contracts feat(contract): add javascript validation Nov 29, 2024
@0x1026 0x1026 added lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. milestone/current Indicates an issue or PR that is being worked on at the current milestone. labels Nov 30, 2024
@0x1026 0x1026 force-pushed the main branch 2 times, most recently from f43896f to a6dd618 Compare December 2, 2024 21:12
Copy link
Member

@0x1026 0x1026 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aquest PR no s'ha provat pel propi autor. Revisa les modificacions :)

@0x1026 0x1026 marked this pull request as draft December 2, 2024 23:22
@Projecte-UrbanTree Projecte-UrbanTree deleted a comment from codecov bot Dec 3, 2024
@Chuck-D-Norris Chuck-D-Norris marked this pull request as ready for review December 3, 2024 16:34
@github-actions github-actions bot added area/database Categorizes issue or PR as related to database. area/app/models Categorizes issue or PR as related to app/models. labels Dec 3, 2024
@0x1026 0x1026 requested a review from 24Victor December 3, 2024 23:07
@github-actions github-actions bot added kind/feature Categorizes issue or PR as related to a new feature. and removed area/database Categorizes issue or PR as related to database. area/app/models Categorizes issue or PR as related to app/models. area/app/controllers Categorizes issue or PR as related to app/controllers. area/routes Categorizes issue or PR as related to routes or router. labels Dec 4, 2024
@0x1026 0x1026 force-pushed the main branch 2 times, most recently from bc61500 to 50315fc Compare December 4, 2024 14:07
@0x1026 0x1026 force-pushed the main branch 5 times, most recently from 4a53d39 to 332647b Compare December 5, 2024 04:52
@github-actions github-actions bot added the area/database Categorizes issue or PR as related to database. label Dec 10, 2024
@github-actions github-actions bot added the area/javascript Categorizes issue or PR as related to JavaScript. label Dec 10, 2024
@0x1026 0x1026 merged commit f1327cd into main Dec 10, 2024
15 checks passed
@0x1026 0x1026 deleted the feat/contract branch December 10, 2024 09:19
@0x1026 0x1026 linked an issue Dec 11, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/app/views Categorizes issue or PR as related to app/views. area/database Categorizes issue or PR as related to database. area/javascript Categorizes issue or PR as related to JavaScript. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. milestone/current Indicates an issue or PR that is being worked on at the current milestone.
Projects
Status: Fet
Development

Successfully merging this pull request may close these issues.

Validacions amb JavaScript
4 participants