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

[TM-1766] entity get and index site #995

Open
wants to merge 21 commits into
base: staging
Choose a base branch
from

Conversation

pachonjcl
Copy link
Collaborator


// @ts-ignore
export const siteDataProvider: DataProvider = {
// @ts-expect-error until we can get the whole DataProvider on Project DTOs
Copy link
Collaborator

Choose a reason for hiding this comment

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

Site DTOs instead of Project for this copied comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

const { record } = useShowContext();
const createPath = useCreatePath();

const getReportsPath = (view: keyof typeof modules) => {
if (!record) return;

console.log("record", record);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove testing console.log calls

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

resource: modules.project.ResourceName,
type: "show",
id: record?.project?.uuid ?? record?.projectUuid
})}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will be needed eventually, but it shouldn't be needed for this PR. This component is only used for report types.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, reverting

@@ -29,6 +29,8 @@ const QuickActions: FC = () => {
justifyContent: "space-between"
};

console.log("record", record);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

to={createPath({
resource: modules.project.ResourceName,
type: "show",
id: record?.project?.uuid ?? record?.projectUuid
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this one is only used for sites, record?.projectUuid should be fine here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed


const siteConnection = createGetEntityConnection<SiteFullDto>("sites", true);
export const loadSite = connectionLoader(siteConnection);
export const useSite = connectionHook(siteConnection);
Copy link
Collaborator

Choose a reason for hiding this comment

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

These appear to be a duplicate of fullSiteConnection

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@roguenet
Copy link
Collaborator

roguenet commented Mar 3, 2025

This doesn't appear to address the PD site/[uuid]/index.page.tsx page, SitesTable or ProjectSitesList. All uses of the api/v2/projects/{uuid}/sites API should be replaced with the sites index that admin is now using, passing a new projectId filter param.

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.

3 participants