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

Minor updates in prospect module #3753

Merged
merged 2 commits into from
Dec 28, 2024
Merged

Conversation

rathorevaibhav
Copy link
Member

@rathorevaibhav rathorevaibhav commented Dec 24, 2024

Changes include:

  1. Added an orange dot to highlight new customers
  2. Prospects older than 3 months will be highlighted in red
  3. Small logic fix that was incorrect for currencies other than INR

Summary by CodeRabbit

  • New Features

    • Added a visual indicator for new customers in the prospect information display.
    • Improved formatting of the proposal sent date with enhanced visual cues and organization.
  • Bug Fixes

    • Ensured consistent retrieval of currency information within the budget display.

@rathorevaibhav rathorevaibhav self-assigned this Dec 24, 2024
Copy link

coderabbitai bot commented Dec 24, 2024

Walkthrough

The pull request introduces modifications to the Prospect module, focusing on enhancing the data handling and presentation of prospect information. The changes include adding a datetime casting for the proposal sent date in the Prospect entity and improving the view template to provide more informative and visually appealing display of prospect details, such as adding a new customer badge and implementing a more nuanced date representation.

Changes

File Change Summary
Modules/Prospect/Entities/Prospect.php - Added $casts property to cast proposal_sent_date to datetime
- Modified getFormattedBudgetAttribute to use $this->currency directly
Modules/Prospect/Resources/views/index.blade.php - Added visual badge for new customers
- Improved proposal sent date formatting
- Added conditional date display with color-coded age indication

Possibly related issues

  • Minor changes in prospect module #3745: This issue aligns with the current changes, particularly in improving prospect module presentation and adding more detailed status and formatting options.

Possibly related PRs

Suggested labels

status : reviewed

Suggested reviewers

  • pokhiii

Poem

🕵️ Prospects dancing in the code's embrace,
Dates cast, badges shine with grace
New customers sparkle, timelines unfold
A digital canvas, stories untold! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

cypress bot commented Dec 24, 2024

Employee portal    Run #8943

Run Properties:  status check passed Passed #8943  •  git commit 4e9c084774 ℹ️: Merge fbc9d0e87d28e630a4f1f03cf8057083de10bcf3 into 49e304c8d8c22c1d9203feaa957d...
Project Employee portal
Branch Review refs/pull/3753/merge
Run status status check passed Passed #8943
Run duration 00m 26s
Commit git commit 4e9c084774 ℹ️: Merge fbc9d0e87d28e630a4f1f03cf8057083de10bcf3 into 49e304c8d8c22c1d9203feaa957d...
Committer Vaibhav Rathore
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
View all changes introduced in this branch ↗︎

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
Modules/Prospect/Entities/Prospect.php (1)

54-54: Handle unknown or additional currency codes.

At present, the ternary expression only accounts for 'INR' vs. 'en_US'. Consider adding a default or fallback path to handle other potential currency codes more gracefully.

Modules/Prospect/Resources/views/index.blade.php (2)

49-58: Enclose the new customer badge logic in a more modular component.

This block is clean, but if the new customer logic is extended or updated in the future, consider extracting it into a partial Blade file or a reusable component for single-responsibility.


67-70: Refactor date difference logic to keep Blade thinner.

Storing or computing the date’s three-month difference in a model or helper would centralize this logic and enhance maintainability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49e304c and fbc9d0e.

📒 Files selected for processing (2)
  • Modules/Prospect/Entities/Prospect.php (2 hunks)
  • Modules/Prospect/Resources/views/index.blade.php (2 hunks)
🔇 Additional comments (1)
Modules/Prospect/Entities/Prospect.php (1)

15-17: Add type cast for the proposal_sent_date attribute.

This is a helpful addition for ensuring it's handled as a proper date.

Copy link
Contributor

Coverage report for commit: fbc9d0e
File: coverage.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ███████████████████████ │ 76.2%
  10% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.6%
  20% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.6%
  30% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.6%
  40% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.3%
  50% │ ██░░░░░░░░░░░░░░░░░░░░░ │  4.0%
  60% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.2%
  70% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.3%
  80% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.9%
  90% │ █░░░░░░░░░░░░░░░░░░░░░░ │  3.1%
 100% │ ████░░░░░░░░░░░░░░░░░░░ │ 12.0%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 7.20% | Methods: 8.97%
FilesLinesMethodsBranches
Modules/HR/Console
   JobExpiredEmailToHr.php--100.00%
   QuarterlyReviewSystemForEmployee.php--100.00%
Modules/HR/Console/Recruitment
   ApplicationNoShow.php--100.00%
   DailyMessage.php--100.00%
   MappingOfJobsAndHrRounds.php--100.00%
   MarkApplicationForFollowUp.php--100.00%
   MoveFilesToWordPress.php--100.00%
   ResetIsLatestApplicationRound.php45.45%66.67%100.00%
   SendFollowUpThresholdMail.php--100.00%
   SendInterviewReminders.php--100.00%
Modules/HR/Contracts
   ApplicationServiceContract.php100.00%100.00%100.00%
   EvaluationServiceContract.php100.00%100.00%100.00%
   UniversityServiceContract.php100.00%100.00%100.00%
Modules/HR/Database/Factories
   HrApplicantsFactory.php100.00%100.00%100.00%
   HrApplicationEvaluationFactory.php--100.00%
   HrApplicationMetaFactory.php--100.00%
   HrApplicationRejectionFactory.php--100.00%
   HrApplicationRoundReviewFactory.php--100.00%
   HrApplicationSegmentFactory.php--100.00%
   HrApplicationsFactory.php--100.00%
   HrEmployeeFactory.php--100.00%
   HrFollowUpFactory.php--100.00%
   HrJobsFactory.php--100.00%
   HrResourcesCategoriesFactory.php--100.00%
   HrResourcesFactory.php--100.00%
   HrUniversitiesContactsFactory.php100.00%100.00%100.00%
   HrUniversitiesFactory.php100.00%100.00%100.00%
   HrUniversityAliasesFactory.php100.00%100.00%100.00%
Modules/HR/Database/Migrations
   2020_07_15_110611_create_hr_application_segments_table.php91.67%50.00%100.00%
   2020_07_15_142215_rename_next_interview_comments_column.php50.00%50.00%100.00%
   2020_07_25_202622_update_segment_table_with_segment_parent.php61.54%50.00%100.00%
   2020_09_04_234639_update_application_round_with_calendar_meeting_id.php66.67%50.00%100.00%
   2020_09_06_234443_update_hr_application_round_table_with_is_latest.php50.00%50.00%100.00%
   2020_09_07_171154_create_hr_follow_ups_table.php92.31%50.00%100.00%
   2020_09_08_073438_create_hr_universities_table.php87.50%50.00%100.00%
   2020_09_08_073538_create_hr_universities_contacts_table.php90.00%50.00%100.00%
   2020_09_08_073651_add_hr_university_id_to_hr_applicants_table.php42.86%50.00%100.00%
   2020_11_24_141131_create_hr_university_aliases_table.php85.71%50.00%100.00%
   2020_12_31_112259_alter_posted_by_in_hr_jobs_table.php50.00%50.00%100.00%
   2021_01_01_113149_add_status_to_hr_jobs_table.php50.00%50.00%100.00%
   2021_01_01_123714_add_soft_deletes_to_hr_jobs_table.php50.00%50.00%100.00%
   2022_03_08_064931_update_hr_jobs_table.php50.00%50.00%100.00%
   2022_06_15_141424_add_parameter_slug_column_in_evaluation_parameter_table.php50.00%50.00%100.00%
   2022_07_04_165601_add_verification_status_to_application.php50.00%50.00%100.00%
   2022_07_07_075310_create_hr_job_domains_table.php85.71%50.00%100.00%
   2022_07_15_115016_create_hr_channels_table.php85.71%50.00%100.00%
   2022_07_15_115134_update_hr_applications_with_hr_channels_table.php50.00%50.00%100.00%
   2022_09_01_230847_create_job_requisition_table.php57.14%50.00%100.00%
   2022_09_06_232653_add_status_to_job_requisition.php50.00%50.00%100.00%
   2022_09_12_140344_create_hr_applicant_meta_table.php76.92%50.00%100.00%
   2022_09_19_160414_create_hr_job_designation_table.php85.71%50.00%100.00%
   2022_09_21_145858_create_batch_members_table.php57.14%50.00%100.00%
   2022_09_21_151304_create_batches_table.php83.33%50.00%100.00%
   2022_09_26_134702_alter_column_for_application_meta_value.php50.00%50.00%100.00%
   2024_03_20_161855_add_commencement_date_column_to_employee_salary_table.php50.00%50.00%100.00%
Modules/HR/Database/Seeders
   AddPreparatoryRoundsSeeder.php--100.00%
   ApplicationEvaluationTableSeeder.php--100.00%
   DomainTableSeeder.php--100.00%
   HRDatabaseSeeder.php--100.00%
   HRJobsSeederTableSeeder.php--100.00%
   HRPermissionsTableSeeder.php--100.00%
   HRRoundsTableSeeder.php--100.00%
   HrApplicantsTableSeeder.php--100.00%
   HrApplicationEvaluationSegmentTableSeeder.php--100.00%
   HrApplicationMetaTableSeeder.php--100.00%
   HrApplicationRejectionReasonTableSeeder.php--100.00%
   HrApplicationRoundReviewTableSeeder.php--100.00%
   HrApplicationRoundTableSeeder.php--100.00%
   HrApplicationSegmentTableSeeder.php--100.00%
   HrApplicationsTableSeeder.php--100.00%
   HrChannelsTableSeeder.php--100.00%
   HrDesignationTableSeeder.php100.00%100.00%100.00%
   HrDomainTableSeeder.php100.00%100.00%100.00%
   HrFollowUpTableSeeder.php--100.00%
   HrResourcesCategoriesTableSeeder.php--100.00%
   HrResourcesTableSeeder.php--100.00%
   HrUniversitiesContactsTableSeeder.php--100.00%
   HrUniversitiesTableSeeder.php--100.00%
   HrUniversityAliasesTableSeeder.php--100.00%
   ResumeScreeningEvaluationSeeder.php--100.00%
   SettingsTableSeeder.php--100.00%
   TagTableSeeder.php--100.00%
Modules/HR/Emails
   AppointmentSlotSelectionMail.php--100.00%
   SendHiringMail.php--100.00%
   SendJobExpiredMail.php--100.00%
   SendPayrollListMail.php--100.00%
   SendThreshholdFollowUp.php--100.00%
Modules/HR/Emails/Recruitment/Applicant
   ApplicantCreateAutoResponder.php--100.00%
   NoShow.php--100.00%
   OnHold.php--100.00%
   RoundReviewed.php--100.00%
   ScheduledInterviewReminder.php--100.00%
Modules/HR/Emails/Recruitment/Application
   ApplicationHandover.php--100.00%
   CustomApplicationMail.php--100.00%
   JobChanged.php--100.00%
   RoundNotConducted.php--100.00%
Modules/HR/Emails/Recruitment
   InterviewerScheduledRoundsReminder.php--100.00%
   SendForApproval.php--100.00%
   SendOfferLetter.php--100.00%
Modules/HR/Entities
   Applicant.php1.69%10.00%100.00%
   ApplicantMeta.php--100.00%
   Application.php--100.00%
   ApplicationEvaluationSegment.php--100.00%
   ApplicationMeta.php--100.00%
   ApplicationRound.php--100.00%
   ApplicationRoundReview.php--100.00%
   Assessment.php--100.00%
   Employee.php1.47%4.55%100.00%
   FollowUp.php--100.00%
   HRJobsRounds.php100.00%100.00%100.00%
   HRRejectionReason.php--100.00%
   HRRequisitionHiredBatch.php--100.00%
   HRRequisitionHiredBatchMembers.php--100.00%
   HrChannel.php100.00%100.00%100.00%
   HrJobDesignation.php--100.00%
   HrJobDomain.php--100.00%
   IndividualAssessment.php--100.00%
   Job.php--100.00%
   JobRequisition.php--100.00%
   Round.php--100.00%
   University.php33.33%33.33%100.00%
   UniversityAlias.php100.00%100.00%100.00%
   UniversityContact.php100.00%100.00%100.00%
Modules/HR/Entities/Evaluation
   ApplicationEvaluation.php--100.00%
   Parameter.php--100.00%
   ParameterOption.php--100.00%
   Segment.php--100.00%
Modules/HR/Events
   ApplicationMovedToNewRound.php--100.00%
   CustomMailTriggeredForApplication.php--100.00%
   FollowUpEvent.php--100.00%
   InterviewCommunicationEmailSent.php--100.00%
Modules/HR/Events/Recruitment
   ApplicantEmailVerified.php--100.00%
   ApplicationCreated.php--100.00%
   JobUpdated.php--100.00%
Modules/HR/Exports
   ContractorFeeExport.php--100.00%
   EmployeePayrollExport.php--100.00%
Modules/HR/Helpers
   TemplateHelper.php--100.00%
Modules/HR/Http/Controllers
   EmployeeController.php--100.00%
   EvaluationController.php--100.00%
   HiringController.php--100.00%
   HrChannelController.php--100.00%
   HrJobDesignationController.php--100.00%
   RequisitionController.php--100.00%
   ResourcesController.php--100.00%
   TagsController.php--100.00%
Modules/HR/Http/Controllers/Recruitment
   ApplicantController.php--100.00%
   ApplicationController.php--100.00%
   ApplicationRoundController.php--100.00%
   CampaignsController.php--100.00%
   InternshipApplicationController.php--100.00%
   JobApplicationController.php--100.00%
   JobController.php--100.00%
Table truncated to fit comment

🤖 comment via lucassabreu/comment-coverage-clover

@rathorevaibhav rathorevaibhav merged commit 73a3aed into master Dec 28, 2024
7 checks passed
@rathorevaibhav rathorevaibhav deleted the feature/prospect-updates branch December 28, 2024 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants