iyansr / megaportal-lite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Megaportal Lite

Overview

This is a Next.js project that uses Typescript, and Hasura.

Getting Started

  1. Clone the repo locally.
  2. Install all necessary packages by running yarn
  3. Run yarn dev to get your dev environment up and running

Open http://localhost:3000 with your browser to see the result.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

The Task

Technical Assignment Task:

Objective: Fix the bugs related to updating the datatable after adding a new target through a modal and the duplication of data when clicking the sync target button.

Steps to follow:

  1. Fork the repository from the original repository.
  2. Clone the forked repository to your local machine.
  3. Set up the development environment if necessary.
  4. Analyze the codebase to identify the cause of the bugs.
  5. Make necessary changes to fix the bugs while minimizing changes that may impact existing functionality.
  6. Test the modified code to ensure that the bugs are resolved and there are no regressions.
  7. Commit the changes to your forked repository, providing meaningful commit messages.
  8. Push the changes to your forked repository.
  9. Share the link to your forked repository with the hiring team for validation.

Bug 1: DataTable not updating after adding a new target through modal:

  • Analyze the code related to adding new targets and updating the DataTable.
  • Identify any missing or incorrect logic that prevents the DataTable from being updated.
  • Make the necessary changes to ensure that the DataTable is updated with the new data after adding a target through the modal.
  • Test the functionality thoroughly to confirm that the DataTable is correctly updated.

Bug 2: Duplication of data when clicking the sync target button:

  • Review the code associated with the sync target button functionality.
  • Identify the reason behind the duplication of data when the button is clicked.
  • Modify the code to prevent data duplication while maintaining the desired synchronization functionality.
  • Test the synchronization process to verify that the duplication issue is resolved.

Additional guidelines:

  • Ensure that your changes follow the existing coding style and conventions used in the codebase.
  • Document any significant changes or assumptions made during the bug fixing process.
  • Feel free to refactor or optimize the codebase where necessary, but be cautious not to introduce new bugs.
  • Test the application thoroughly after making changes to ensure that all functionalities are working as expected.
  • Provide a detailed README file that includes instructions for setting up the project, running the application, and any other relevant information.

Please note that the provided video link should be reviewed to gain a better understanding of the bugs and their context. https://youtu.be/sOKjmCSrPI8 https://youtu.be/1FC2kM2nNXw

Authentication

Get your NEXT_PUBLIC_ACCESS_TOKEN by following this instruction

  1. Copy token value and paste it to NEXT_PUBLIC_ACCESS_TOKEN
  2. If issue persist please reachout to my email.

About


Languages

Language:TypeScript 97.7%Language:JavaScript 2.2%Language:CSS 0.1%Language:Shell 0.0%