Skip to content

Ttonev/hr portal latest #6

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

Open
wants to merge 4 commits into
base: skrastev/sales-tabs
Choose a base branch
from

Conversation

tishko0
Copy link

@tishko0 tishko0 commented Apr 10, 2025

No description provided.

@tishko0 tishko0 requested a review from dkamburov April 10, 2025 11:30
@tishko0 tishko0 added the ❌ status: awaiting-test PRs awaiting manual verification label Apr 10, 2025
@skrustev skrustev changed the base branch from vnext to skrastev/sales-tabs April 14, 2025 07:47
Copy link
Member

@mddragnev mddragnev left a comment

Choose a reason for hiding this comment

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

  1. Could you please remove the routing from the app. We dont need all that boilerplate. Also, delete the files that you dont need.
  2. When running npm run build an error is thrown

return <>{formattedDate}</>;
};

const clearSorting = useCallback(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need useCallback hook here?

setIsSorted(false);
}, []);

const handleSortingChanged = useCallback(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need useCallback hook here?

Copy link
Author

Choose a reason for hiding this comment

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

It is recommended since sorting is passed as a prop to the button and the grid. Using it should avoid unnecessary re-render and improve performance.

Copy link
Member

Choose a reason for hiding this comment

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

Have you tested this and did u see a boost in performance? useCallback is needed for:

  1. If you pass that function as a dependancy to another hook
  2. The function is passed as a prop (like you do) to a component that uses memoization. Our components dont use neither useMemonorReact.memo`.
    I don't see any benefit overcomplicating the code, plus that if you don't need it you could cause a minor performance lost

@MayaKirova
Copy link

When building and running the main app( npm run build and npm run preview), routing to the sample seems to be incorrect as it currently loads the wrong view from the hr-portal-view and not the actual sample:
image

@tishko0
Copy link
Author

tishko0 commented Apr 22, 2025

  1. Could you please remove the routing from the app. We dont need all that boilerplate. Also, delete the files that you dont need.
  2. When running npm run build an error is thrown

it is building for me, can you please show what error it throws:
image

If it is regarding the main app as per maya's comment, I have updated the routes for the hr-portal, the rest of the apps still point towards the view tho

@@ -1,5 +1,5 @@
body {
font-family: 'Open Sans', sans-serif;
--ig-font-family: "Open Sans", sans-serif;
Copy link
Member

Choose a reason for hiding this comment

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

Do you need this? Doesnt this font family come from the ig-typography class?

@@ -3,8 +3,7 @@
<head>
<meta charset="utf-8" />
<title>HR Portal</title>
<link href='https://fonts.googleapis.com/icon?family=Material+Icons' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Titillium+Web:wght@300;400;600;700' rel='stylesheet'>
<link href='https://fonts.googleapis.com/icon?family=Material+Icons' rel='stylesheet'>S
Copy link
Member

Choose a reason for hiding this comment

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

There is a S letter at the end of line 6

setIsSorted(false);
}, []);

const handleSortingChanged = useCallback(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Have you tested this and did u see a boost in performance? useCallback is needed for:

  1. If you pass that function as a dependancy to another hook
  2. The function is passed as a prop (like you do) to a component that uses memoization. Our components dont use neither useMemonorReact.memo`.
    I don't see any benefit overcomplicating the code, plus that if you don't need it you could cause a minor performance lost

@mddragnev
Copy link
Member

Please inside the project/hr-portal remove the routing since it is not needed.

@@ -12,14 +12,14 @@ export const routes: RouteObject[] = [
children: [
{ index: true, loader: () => redirect('inventory') },
{ path: 'inventory', element: <ERPHGridView /> },
{ path: 'hr-portal', element: <HRPortalView /> },
{ path: 'hr-portal', element: <HRPortal /> },
Copy link
Member

@mddragnev mddragnev Apr 22, 2025

Choose a reason for hiding this comment

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

This is not correct. You should change the content of the HRPportalView instead of replacing it here. Also, the sample does not look good. Images are missing, the themes are not correct when running the main app.
Screenshot 2025-04-22 at 14 12 05

@@ -0,0 +1,19 @@
body {
background: hsla(var(--ig-surface-500, 0 0% 100%));
Copy link
Member

Choose a reason for hiding this comment

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

Do you need these colors here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❌ status: awaiting-test PRs awaiting manual verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants