Skip to content

Conversation

cswni
Copy link
Contributor

@cswni cswni commented Mar 13, 2025

image

This pull request introduces several new components and refactors existing ones in the src/sections/ownership directory. The changes include the addition of new modals, table components, and constants to enhance the ownership section's functionality.

New Components and Modals:

Table Enhancements:

Constants and Types:

Refactoring:

cswni added 2 commits March 13, 2025 12:21
Introduced new components and updates for ownership management:
- `ownership-table.tsx`: Displays the ownership list with pagination, sorting, and loading states.
- `ownership-table-row.tsx`: Represents individual rows in the table, with settings and actions.
- `ownership-create.tsx`: Implements a modal for registering ownership campaigns.
- `ownership-modal-content.tsx`: Handles the content and logic for registering assets.
- `ownership-settings-modal.tsx`: Modal for configuring ownership settings per asset.
- `ownership-settings-modal-content.tsx`: Contains the form and fields for asset-specific configurations.

Updated:
- `ownership-view.tsx`: Integrated the new table and create ownership features.
- `CONSTANTS.tsx`: Added labels and colors for ownership types and statuses.
- `index.tsx`: Updated exports for ownership's main view.
@cswni cswni requested review from Jadapema and geolffreym March 13, 2025 18:25
@cswni cswni self-assigned this Mar 13, 2025
@cswni cswni changed the title App/feat/UI ownership feat(ui): ownership section (WIP) Mar 13, 2025
cswni added 3 commits March 17, 2025 14:19
- Add OwnershipTimelineModal for viewing asset history.
- Remove unused `type` field from ownership data, constants, and UI.
- Update OwnershipSettingsModal to dynamically fetch and upsert data.
- Improve region handling with multi-select and checkbox UI.
- Add `fetchAssetSettings` and `upsertAssetSettings` utilities.
- Add CustomRandom utility to generate pseudo-random numbers in `src/utils/random.ts`. The implementation uses a linear congruential generator (LCG).
- Update key generation logic in `ownership-settings-modal-content.tsx` to improve `randomKey` usage by adding context-specific suffixes.
- Replace `Math.random()` with `CustomRandom.get()` in `ownership-view.tsx` for generating random assets. Adjusted all relevant instances, including policies, statuses, and other random values.
@cswni cswni moved this from Backlog to In Progress in [email protected] Mar 17, 2025
- `src/pages/ownership.tsx`:
  - Wrapped `OwnershipView` with `WithAuth` for authentication checks.
  - Updated header title from "Ownership" to "Finance".
- `src/sections/ownership/components/ownership-create.tsx`:
  - Renamed `confirmPublish` to `ownershipConfirmPublish` for clarity.
  - Updated modal title from "Register a campaign" to "Register an asset".
  - Improved modal behavior to better align with ownership use cases.
Copy link

@Jadapema Jadapema moved this from In Progress to On review in [email protected] Mar 17, 2025
@Jadapema Jadapema moved this from On review to On hold in [email protected] Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: On hold

Development

Successfully merging this pull request may close these issues.

1 participant