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

OUT-46 Integrate APIs #11

Merged
merged 29 commits into from
Feb 9, 2024
Merged

OUT-46 Integrate APIs #11

merged 29 commits into from
Feb 9, 2024

Conversation

aatbip
Copy link
Contributor

@aatbip aatbip commented Jan 31, 2024

Task/Ticket

Integrate APIs

The main changes are

  • Integrated API for client update history
  • Plot data in table
  • Integrated API for custom field access and settings
  • Integrated save API
  • Integrated APIs for manage page
  • Added search/sort functionnalities

Copy link

vercel bot commented Jan 31, 2024

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

Name Status Preview Comments Updated (UTC)
copilot-profile-manager ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 8, 2024 0:16am

if (!clientId) {
respondError('Missing client Id', 422);
}
const copilotClient = new CopilotAPI(z.string().parse(token));

Choose a reason for hiding this comment

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

why this is not inside try/catch?


export const Sidebar = () => {
const appState = useAppState();

const handleMutableSettings = (selected: boolean, type: string) => {
if (!selected) {
if (type === 'profile_settings') {
if (type === ProfileLinks.ProfileSetting) {
const newSettings = appState?.mutableSettings.filter((el: string) => el !== type);
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the underlying logic for both these conditions are same, why the type check at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

d0ed649 commit removes unnecessary if/else comparision @sajjanstha

const newSettings = appState?.mutableSettings.filter((el: string) => el !== type);
appState?.setAppState((prev) => ({ ...prev, mutableSettings: newSettings }));
}
}
if (selected) {
if (type === 'profile_settings') {
if (type === ProfileLinks.ProfileSetting) {
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

d0ed649 commit resolves this @sajjanstha

@aatbip
Copy link
Contributor Author

aatbip commented Feb 8, 2024

I updated the code to use server action in this commit - b6d7909, but there was an error while revalidateTag only in the production. I am not sure why. So for now I have reverted the server actions back. @saugatmaharjan

@aatbip
Copy link
Contributor Author

aatbip commented Feb 9, 2024

leaving server action to do in another branch

@aatbip aatbip merged commit 668e757 into main Feb 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants