-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Signup validations on all fields * Functionality for organization setup (#57) * adding the org setup * redirecting after org setup to the root page * adding the org setup * redirecting after org setup to the root page * minor fix * minor fix * did the functionality * added company_id * added controller * styled the org setup page without the two tabs * added the new schema with country and timezone in the model * added company factory * removed comments from factory * text field for business phone * deleted unwanted migrations * used up and down instead of change * model constraint added to companies migration * Company model validation added * schema and validation updated * company attribute and validation updated * remove logo_url coloumn from companies table * seed added and typo fixed * recreate gemfile.lock * unit test for company model added * removed test coverage * added linux arch in gemlock file * company routes added * role and user-company migration added * typo fixed in AddCompanyIdToUser * restored previous migration * removed null: false constraint from AddCompanyIdToUser * company form updated * replaced city-state gem with countries gem * conflict fix * Add minor changes * Dependent destroy added Co-authored-by: Akhil G Krishnan <akhilgkrishnan4u@gmail.com> Co-authored-by: Abinash Panda <abinashp@protonmail.ch> * Keshav/add rolify (#67) * removed role attribute from user * removed roles from user * added rolify * fixed schema * code review changes * Rails upgraded to 7.0.1 and Ruby upgraded to 3.1.0 (#68) * Rails upgraded to 7.0.1 and Ruby upgraded to 3.1.0 * bundle lock fix * Validate all fields on signup page * Put back custom email validation * Prefer devise validation on email first, use meaningful names and keep error messages in locales * Group custom validations together * Override devise email validation and remove custom validation Co-authored-by: JUDIS <61043700+judis007@users.noreply.github.com> Co-authored-by: Akhil G Krishnan <akhilgkrishnan4u@gmail.com> Co-authored-by: Abinash Panda <abinashp@protonmail.ch> Co-authored-by: Keshav Biswa <keshavbiswa21@gmail.com>
- Loading branch information
1 parent
23a8504
commit bf8bcc7
Showing
7 changed files
with
87 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
module Users::RegistrationsHelper | ||
def error_message_on(resource, attribute) | ||
return unless resource.respond_to?(:errors) && resource.errors.include?(attribute) | ||
error = field_error(resource, attribute) | ||
|
||
content_tag(:div, error, class: "tracking-wider block text-xs font-semibold text-red-600") | ||
end | ||
|
||
def error_message_class(resource, attribute) | ||
if resource.respond_to?(:errors) && resource.errors.include?(attribute) | ||
"rounded tracking-wider appearance-none border border-red-600 block w-full px-3 py-2 bg-miru-gray-100 h-8 shadow-sm font-semibold text-xs text-miru-dark-purple-1000 focus:outline-none focus:ring-red-600 focus:border-red-600 sm:text-base" | ||
else | ||
"rounded tracking-wider appearance-none border border-gray-100 block w-full px-3 py-2 bg-miru-gray-100 h-8 shadow-sm font-semibold text-xs text-miru-dark-purple-1000 focus:outline-none focus:ring-miru-gray-1000 focus:border-miru-gray-1000 sm:text-base" | ||
end | ||
end | ||
|
||
private | ||
def field_error(resource, attribute) | ||
resource.errors[attribute].first | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters