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

integration with the generate and create api #314

Merged
merged 7 commits into from
Apr 17, 2024
Merged

Conversation

Bhavya-egov
Copy link
Contributor

@Bhavya-egov Bhavya-egov commented Apr 17, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new React component for data file management (UploadData).
    • Added new hooks for campaign ID generation and resource data management.
    • Enhanced campaign configuration with new steps and fields.
    • Updated the version of @egovernments/digit-ui-css to 1.0.14-campaign.
  • Enhancements

    • Improved visual styling for file upload components.
    • Updated proxy paths for more efficient data handling.
  • Bug Fixes

    • Corrected import paths and component references across various modules.
    • Updated package.json with the ajv package dependency.

Copy link
Contributor

coderabbitai bot commented Apr 17, 2024

Walkthrough

Walkthrough

The update enriches the micro-ui framework with new features like a data upload management React component, a custom hook for generating campaign IDs, and enhanced logic in the SetupCampaign page for handling various campaign management scenarios.

Changes

File Path Change Summary
.../components/UploadData.js, .../hooks/useGenerateIdCampaign.js, .../pages/employee/SetupCampaign.js Introduced a React component for data uploads, a custom hook for generating campaign IDs, and updated logic in the SetupCampaign page for improved campaign management.
.../hooks/useResourceData.js Added new function useResourceData from Digit.Hooks.campaign.
.../public/index.html Updated @egovernments/digit-ui-css version from 1.0.13-campaign to 1.0.14-campaign.
.../package.json Added ajv package as a dependency with version ^8.12.0.

Poem

🐇🌟
A hop and a skip in the code, quite neat,
With changes so swift, and none too discreet.
Upgraded with style, and hooks that entice,
Now smoother than ever, just like ice.
Cheers to the devs, with each line they compose,
In the world of code, where creativity flows! 🎉🐰


Recent Review Details

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between e1a1b68 and 54355b0.
Files selected for processing (3)
  • micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
  • micro-ui/web/micro-ui-internals/package.json (2 hunks)
  • micro-ui/web/public/index.html (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • micro-ui/web/micro-ui-internals/example/public/index.html
  • micro-ui/web/micro-ui-internals/package.json
  • micro-ui/web/public/index.html

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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
Contributor

@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: 1

@@ -16,7 +16,7 @@
/> -->
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].13-campaign/dist/index.css" />
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected].14-campaign/dist/index.css" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

Verification Result: Issue with CSS Version Link

The verification process aimed to confirm the accessibility of the updated version 1.0.14-campaign of @egovernments/digit-ui-css at the specified URL. The script executed returned a 404 HTTP status code, indicating that the resource is not found at the provided URL.

Action Required:

  • Please check the version number and the URL for any typographical errors.
  • Verify if the version 1.0.14-campaign is correctly published and available on the CDN.
  • Consider reverting to a previous version if the current one is not yet deployed.
Analysis chain

Confirm that the updated version 1.0.14-campaign of @egovernments/digit-ui-css is correctly deployed and accessible at the specified URL.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Check if the specified CSS version is accessible.
curl -o /dev/null -s -w "%{http_code}\n" https://unpkg.com/@egovernments/[email protected]/dist/index.css

Length of output: 122

body: {
"ResourceDetails": {
"type": data?.uploadFacility?.[0]?.type,
"hierarchyType": "ADMIN",
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Bhavya-egov make this also as a param

url: `/project-factory/v1/data/_generate`,
changeQueryName : `${type}-${hierarchyType}`,
params: {
tenantId: "mz",
Copy link
Collaborator

Choose a reason for hiding this comment

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

const tenantId = Digit.ULBService.getCurrentTenantId();
better to use this hook instead of directly setting value as mz

const filesArray = [fileStoreIds?.[0]?.fileStoreId];
const { data: { fileStoreIds: fileUrl } = {} } = await Digit.UploadServices.Filefetch(filesArray, tenantId);
const fileData = fileUrl.map((i) => {
const t = i?.url?.split("/");
Copy link
Collaborator

Choose a reason for hiding this comment

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

rename , dont use t or dd give proper names

tenantId: tenantId,
type: type,
forceUpdate: false,
hierarchyType: "ADMIN",
Copy link
Collaborator

Choose a reason for hiding this comment

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

hirarchy type should only be present in 1 file

@jagankumar-egov jagankumar-egov merged commit 0be2985 into campaign Apr 17, 2024
2 of 3 checks passed
@jagankumar-egov jagankumar-egov deleted the HLM-5110 branch April 17, 2024 11:41
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