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

feat(cms): Orders api config and edit function #165

Merged
merged 7 commits into from
Sep 4, 2024

Conversation

limivann
Copy link
Contributor

  • Integrated functionality to fetch and display order data via the Orders API.
  • Added features to edit and delete individual orders directly from the orders page.

@limivann limivann requested a review from Iyzyman August 27, 2024 13:15
@limivann limivann self-assigned this Aug 27, 2024
@limivann limivann requested a review from jack-thant as a code owner August 27, 2024 13:15
Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
website-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Sep 2, 2024 2:47pm

@limivann limivann requested a review from chanbakjsd as a code owner August 27, 2024 13:51
@github-actions github-actions bot temporarily deployed to Preview - website August 27, 2024 14:05 Inactive
Copy link
Contributor

@Iyzyman Iyzyman left a comment

Choose a reason for hiding this comment

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

LGTM, but can I ask why you used Class for Order instead of Type?

@Iyzyman Iyzyman self-requested a review September 1, 2024 12:19
Iyzyman
Iyzyman previously approved these changes Sep 1, 2024
@limivann
Copy link
Contributor Author

limivann commented Sep 2, 2024

LGTM, but can I ask why you used Class for Order instead of Type?

We used Class instead of Type to iterate the keys of Order

 for (const key of Object.keys(new Order())) {
    const renderCellComponent = RenderCellFactory.get(data[0], key);
    const renderCell: React.FC<{ children?: React.ReactNode }> =
      renderCellComponent instanceof Promise
        ? renderCellComponent
        : renderCellComponent;

Copy link
Member

@chanbakjsd chanbakjsd left a comment

Choose a reason for hiding this comment

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

There are just a few issues to address :)

apps/cms/src/@types/Order.ts Show resolved Hide resolved
apps/cms/src/admin/views/MerchSales.tsx Outdated Show resolved Hide resolved
apps/web/features/merch/services/api.ts Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to Preview - website September 2, 2024 14:51 Inactive
Copy link

github-actions bot commented Sep 2, 2024

Deployment preview link: https://website-mvnwtn13n-cse-it.vercel.app

@limivann
Copy link
Contributor Author

limivann commented Sep 2, 2024

Hi @chanbakjsd , I have made the following changes:

  • added toast messages to display error messages when triggered, using react-toastify because payloadcms is also using it internally
  • fixed inconsistency issue of snake case and camel case, also changed implementation of prettifyKeys to convert camel to human readable titles
  • reverted unnecessary changes

CC: @Iyzyman

@limivann limivann requested a review from chanbakjsd September 2, 2024 14:54
@chanbakjsd chanbakjsd enabled auto-merge (squash) September 3, 2024 13:09
@Iyzyman Iyzyman self-requested a review September 3, 2024 14:53
Copy link
Contributor

@jack-thant jack-thant left a comment

Choose a reason for hiding this comment

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

LGTM🚀

@chanbakjsd chanbakjsd merged commit 9ffa53b into main Sep 4, 2024
6 checks passed
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.

4 participants