From 8938ae853c57f9aa6011e966501bb64eaefdcfb2 Mon Sep 17 00:00:00 2001 From: JuruSysadmin Date: Wed, 14 Jan 2026 12:25:39 -0300 Subject: [PATCH] feat: Implement core login, dashboard, and order management features with associated assets and configurations. --- .scannerwork/.sonar_lock | 0 .scannerwork/report-task.txt | 6 + .vscode/settings.json | 6 + app/components/EmotionRegistry.tsx | 95 + app/components/Providers.tsx | 106 + app/dashboard/orders/page.tsx | 29 + app/dashboard/page.tsx | 2 + app/dashboard/profile/page.tsx | 32 + app/globals.css | 37 +- app/layout.tsx | 24 +- app/login/page.tsx | 6 + app/page.tsx | 64 +- jest.config.js | 36 + jest.setup.js | 35 + mui-license.ts | 16 + next.config.ts | 18 +- package-lock.json | 21047 +++++++++++----- package.json | 91 +- public/auth/404-error-dark.png | Bin 0 -> 9912 bytes public/auth/404-error.png | Bin 0 -> 8696 bytes public/auth/500-error-dark.png | Bin 0 -> 10431 bytes public/auth/500-error.png | Bin 0 -> 9200 bytes public/auth/505-error-dark.png | Bin 0 -> 10518 bytes public/auth/505-error.png | Bin 0 -> 9144 bytes public/auth/agency-dark.png | Bin 0 -> 24965 bytes public/auth/agency.png | Bin 0 -> 25904 bytes public/auth/bg1-dark.jpg | Bin 0 -> 60262 bytes public/auth/bg1.jpg | Bin 0 -> 59247 bytes public/auth/bg10-dark.jpeg | Bin 0 -> 26037 bytes public/auth/bg10.jpeg | Bin 0 -> 26080 bytes public/auth/bg11.png | Bin 0 -> 64626 bytes public/auth/bg2-dark.jpg | Bin 0 -> 68231 bytes public/auth/bg2.jpg | Bin 0 -> 86429 bytes public/auth/bg3-dark.jpg | Bin 0 -> 41107 bytes public/auth/bg3.jpg | Bin 0 -> 68429 bytes public/auth/bg4-dark.jpg | Bin 0 -> 34429 bytes public/auth/bg4.jpg | Bin 0 -> 60336 bytes public/auth/bg5-dark.jpg | Bin 0 -> 47877 bytes public/auth/bg5.jpg | Bin 0 -> 57659 bytes public/auth/bg6-dark.jpg | Bin 0 -> 54513 bytes public/auth/bg6.jpg | Bin 0 -> 45297 bytes public/auth/bg7-dark.jpg | Bin 0 -> 69676 bytes public/auth/bg7.jpg | Bin 0 -> 105708 bytes public/auth/bg8-dark.jpg | Bin 0 -> 140827 bytes public/auth/bg8.jpg | Bin 0 -> 96855 bytes public/auth/bg9-dark.jpg | Bin 0 -> 84905 bytes public/auth/bg9.jpg | Bin 0 -> 42568 bytes public/auth/chart-graph-dark.png | Bin 0 -> 9892 bytes public/auth/chart-graph.png | Bin 0 -> 9420 bytes public/auth/membership-dark.png | Bin 0 -> 6533 bytes public/auth/membership.png | Bin 0 -> 6303 bytes public/auth/ok-dark.png | Bin 0 -> 6301 bytes public/auth/ok.png | Bin 0 -> 6055 bytes public/auth/please-verify-your-email-dark.png | Bin 0 -> 7922 bytes public/auth/please-verify-your-email.png | Bin 0 -> 8318 bytes public/auth/welcome-dark.png | Bin 0 -> 7214 bytes public/auth/welcome.png | Bin 0 -> 7020 bytes public/backgrounds/bronze.png | Bin 0 -> 151407 bytes public/backgrounds/errorimg.svg | 44 + public/backgrounds/gold.png | Bin 0 -> 159380 bytes public/backgrounds/login-bg.svg | 1 + public/backgrounds/maintenance2.svg | 57 + public/backgrounds/piggy.png | Bin 0 -> 82619 bytes public/backgrounds/profilebg.jpg | Bin 0 -> 50569 bytes public/backgrounds/silver.png | Bin 0 -> 152690 bytes public/backgrounds/track-bg.png | Bin 0 -> 26370 bytes public/backgrounds/unlimited-bg.png | Bin 0 -> 61532 bytes public/backgrounds/welcome-bg.svg | 9 + public/backgrounds/welcome-bg2.png | Bin 0 -> 140292 bytes public/images/backgrounds/errorimg.svg | 44 + public/images/backgrounds/login-bg.svg | 1 + public/images/backgrounds/maintenance2.svg | 57 + public/images/backgrounds/unlimited-bg.png | Bin 0 -> 61532 bytes public/images/breadcrumb/ChatBc.png | Bin 0 -> 151920 bytes public/images/flag/icon-flag-cn.svg | 10 + public/images/flag/icon-flag-en.svg | 1 + public/images/flag/icon-flag-fr.svg | 1 + public/images/flag/icon-flag-sa.svg | 10 + public/images/flag/icon-flag-vn.svg | 10 + public/images/logos/dark-logo.svg | 7 + public/images/logos/dark-rtl-logo.svg | 5 + public/images/logos/light-logo-rtl.svg | 5 + public/images/logos/light-logo.svg | 5 + public/images/logos/logoIcon.svg | 6 + .../images/products/empty-shopping-cart.svg | 1 + public/images/products/payment-complete.gif | Bin 0 -> 2110524 bytes public/images/products/payment.svg | 1085 + public/images/products/s1.jpg | Bin 0 -> 50239 bytes public/images/products/s10.jpg | Bin 0 -> 94588 bytes public/images/products/s11.jpg | Bin 0 -> 95938 bytes public/images/products/s12.jpg | Bin 0 -> 75524 bytes public/images/products/s2.jpg | Bin 0 -> 61111 bytes public/images/products/s3.jpg | Bin 0 -> 99237 bytes public/images/products/s4.jpg | Bin 0 -> 84198 bytes public/images/products/s5.jpg | Bin 0 -> 124284 bytes public/images/products/s6.jpg | Bin 0 -> 99247 bytes public/images/products/s7.jpg | Bin 0 -> 78225 bytes public/images/products/s8.jpg | Bin 0 -> 183401 bytes public/images/products/s9.jpg | Bin 0 -> 89945 bytes public/images/profile/user-1.jpg | Bin 0 -> 30954 bytes public/images/profile/user-10.jpg | Bin 0 -> 27038 bytes public/images/profile/user-2.jpg | Bin 0 -> 29517 bytes public/images/profile/user-3.jpg | Bin 0 -> 27733 bytes public/images/profile/user-4.jpg | Bin 0 -> 24339 bytes public/images/profile/user-5.jpg | Bin 0 -> 26108 bytes public/images/profile/user-6.jpg | Bin 0 -> 18062 bytes public/images/profile/user-7.jpg | Bin 0 -> 27786 bytes public/images/profile/user-8.jpg | Bin 0 -> 28073 bytes public/images/profile/user-9.jpg | Bin 0 -> 20357 bytes public/images/svgs/facebook-icon.svg | 1 + public/images/svgs/git-icon.svg | 3 + public/images/svgs/google-icon.svg | 6 + public/images/svgs/icon-account.svg | 4 + public/images/svgs/icon-dd-application.svg | 6 + public/images/svgs/icon-dd-cart.svg | 6 + public/images/svgs/icon-dd-chat.svg | 4 + public/images/svgs/icon-dd-date.svg | 4 + public/images/svgs/icon-dd-invoice.svg | 5 + public/images/svgs/icon-dd-lifebuoy.svg | 4 + public/images/svgs/icon-dd-message-box.svg | 4 + public/images/svgs/icon-dd-mobile.svg | 4 + public/images/svgs/icon-inbox.svg | 4 + public/images/svgs/icon-tasks.svg | 6 + public/logo_juru.png | Bin 0 -> 21035 bytes sonnar.bat | 4 + src/declarations.d.ts | 1 + .../dashboard/components/Dashboard.tsx | 16 + .../dashboard/components/DashboardLayout.tsx | 61 + .../components/DashboardOverview.tsx | 40 + src/features/dashboard/components/Logo.tsx | 16 + .../dashboard/components/Scrollbar.tsx | 33 + src/features/dashboard/header/AppLinks.tsx | 64 + src/features/dashboard/header/Header.tsx | 103 + .../dashboard/header/MobileRightSidebar.tsx | 129 + src/features/dashboard/header/Navigation.tsx | 130 + .../dashboard/header/Notification.tsx | 120 + src/features/dashboard/header/Profile.tsx | 168 + src/features/dashboard/header/Search.tsx | 135 + src/features/dashboard/header/data.ts | 185 + src/features/dashboard/index.ts | 3 + .../dashboard/pages/DashboardPage.tsx | 11 + src/features/dashboard/sidebar/MenuItems.ts | 39 + src/features/dashboard/sidebar/Sidebar.tsx | 267 + .../dashboard/sidebar/SidebarItems.tsx | 80 + .../sidebar/components/NavCollapse.tsx | 148 + .../dashboard/sidebar/components/NavGroup.tsx | 34 + .../dashboard/sidebar/components/NavItem.tsx | 117 + .../dashboard/sidebar/types/sidebar.ts | 17 + .../dashboard/store/useCustomizerStore.ts | 52 + src/features/login/api.ts | 37 + .../login/authForms/AuthLogin.test.tsx | 204 + src/features/login/authForms/AuthLogin.tsx | 150 + .../login/authForms/AuthSocialButtons.tsx | 69 + .../login/components/AuthInitializer.tsx | 48 + src/features/login/components/LoginForm.tsx | 82 + .../forms/container/PageContainer.tsx | 15 + .../forms/custom-scroll/Scrollbar.tsx | 32 + .../components/forms/shared/DashboardCard.tsx | 80 + .../components/forms/shared/ScrollToTop.tsx | 16 + .../forms/theme-elements/CustomCheckbox.tsx | 68 + .../forms/theme-elements/CustomFormLabel.tsx | 19 + .../theme-elements/CustomSocialButton.tsx | 15 + .../forms/theme-elements/CustomTextField.tsx | 19 + src/features/login/docs/contrato.md | 105 + src/features/login/hooks/useAuth.ts | 57 + src/features/login/interfaces/types.ts | 38 + src/features/login/schemas/schemas.test.ts | 115 + src/features/login/schemas/schemas.ts | 25 + src/features/login/services/login.service.ts | 42 + src/features/login/store/useAuthStore.ts | 48 + src/features/login/utils/index.ts | 2 + src/features/login/utils/mappers.ts | 17 + src/features/login/utils/tokenRefresh.ts | 107 + src/features/orders/api/order.service.ts | 154 + .../orders/components/CustomPagination.tsx | 33 + .../orders/components/OrderDetailsTabs.tsx | 166 + src/features/orders/components/OrderItem.tsx | 0 .../orders/components/OrderItemsTable.tsx | 209 + .../components/OrderItemsTableColumns.tsx | 166 + src/features/orders/components/OrderTable.tsx | 291 + .../orders/components/OrderTableColumns.tsx | 395 + src/features/orders/components/SearchBar.tsx | 450 + src/features/orders/components/TabPanel.tsx | 27 + .../components/tabs/CargoMovementPanel.tsx | 21 + .../components/tabs/CashAdjustmentPanel.tsx | 21 + .../orders/components/tabs/CuttingPanel.tsx | 21 + .../orders/components/tabs/DeliveryPanel.tsx | 21 + .../components/tabs/InformationPanel.tsx | 21 + .../orders/components/tabs/PreBoxPanel.tsx | 21 + .../orders/components/tabs/TV8Panel.tsx | 21 + .../orders/components/tabs/TimelinePanel.tsx | 21 + src/features/orders/config/colorMappings.json | 26 + src/features/orders/docs/README.md | 45 + .../orders/docs/order-items-implementation.md | 348 + src/features/orders/hooks/useCustomers.ts | 48 + src/features/orders/hooks/useOrderFilters.ts | 37 + src/features/orders/hooks/useOrderItems.ts | 20 + src/features/orders/hooks/useOrders.ts | 28 + src/features/orders/hooks/useSellers.ts | 27 + src/features/orders/index.ts | 9 + src/features/orders/pages/OrdersPage.tsx | 16 + .../orders/schemas/api-response.schema.ts | 34 + .../orders/schemas/api-responses.schema.ts | 41 + .../orders/schemas/customer.schema.ts | 15 + .../orders/schemas/order-filters.schema.ts | 117 + .../orders/schemas/order.item.schema.ts | 37 + src/features/orders/schemas/order.schema.ts | 26 + src/features/orders/schemas/seller.schema.ts | 14 + src/features/orders/schemas/store.schema.ts | 14 + src/features/orders/store/useStores.ts | 29 + src/features/orders/types/index.ts | 132 + src/features/orders/utils/locale.ts | 14 + src/features/orders/utils/orderFormatters.ts | 124 + src/features/orders/utils/orderNormalizer.ts | 105 + src/features/orders/utils/tableHelpers.ts | 72 + src/features/profile/api.ts | 37 + .../profile/components/ProfilePage.tsx | 162 + .../profile/services/profile.service.ts | 10 + src/features/profile/types.ts | 16 + tsconfig.json | 16 +- 220 files changed, 23475 insertions(+), 6656 deletions(-) create mode 100644 .scannerwork/.sonar_lock create mode 100644 .scannerwork/report-task.txt create mode 100644 .vscode/settings.json create mode 100644 app/components/EmotionRegistry.tsx create mode 100644 app/components/Providers.tsx create mode 100644 app/dashboard/orders/page.tsx create mode 100644 app/dashboard/page.tsx create mode 100644 app/dashboard/profile/page.tsx create mode 100644 app/login/page.tsx create mode 100644 jest.config.js create mode 100644 jest.setup.js create mode 100644 mui-license.ts create mode 100644 public/auth/404-error-dark.png create mode 100644 public/auth/404-error.png create mode 100644 public/auth/500-error-dark.png create mode 100644 public/auth/500-error.png create mode 100644 public/auth/505-error-dark.png create mode 100644 public/auth/505-error.png create mode 100644 public/auth/agency-dark.png create mode 100644 public/auth/agency.png create mode 100644 public/auth/bg1-dark.jpg create mode 100644 public/auth/bg1.jpg create mode 100644 public/auth/bg10-dark.jpeg create mode 100644 public/auth/bg10.jpeg create mode 100644 public/auth/bg11.png create mode 100644 public/auth/bg2-dark.jpg create mode 100644 public/auth/bg2.jpg create mode 100644 public/auth/bg3-dark.jpg create mode 100644 public/auth/bg3.jpg create mode 100644 public/auth/bg4-dark.jpg create mode 100644 public/auth/bg4.jpg create mode 100644 public/auth/bg5-dark.jpg create mode 100644 public/auth/bg5.jpg create mode 100644 public/auth/bg6-dark.jpg create mode 100644 public/auth/bg6.jpg create mode 100644 public/auth/bg7-dark.jpg create mode 100644 public/auth/bg7.jpg create mode 100644 public/auth/bg8-dark.jpg create mode 100644 public/auth/bg8.jpg create mode 100644 public/auth/bg9-dark.jpg create mode 100644 public/auth/bg9.jpg create mode 100644 public/auth/chart-graph-dark.png create mode 100644 public/auth/chart-graph.png create mode 100644 public/auth/membership-dark.png create mode 100644 public/auth/membership.png create mode 100644 public/auth/ok-dark.png create mode 100644 public/auth/ok.png create mode 100644 public/auth/please-verify-your-email-dark.png create mode 100644 public/auth/please-verify-your-email.png create mode 100644 public/auth/welcome-dark.png create mode 100644 public/auth/welcome.png create mode 100644 public/backgrounds/bronze.png create mode 100644 public/backgrounds/errorimg.svg create mode 100644 public/backgrounds/gold.png create mode 100644 public/backgrounds/login-bg.svg create mode 100644 public/backgrounds/maintenance2.svg create mode 100644 public/backgrounds/piggy.png create mode 100644 public/backgrounds/profilebg.jpg create mode 100644 public/backgrounds/silver.png create mode 100644 public/backgrounds/track-bg.png create mode 100644 public/backgrounds/unlimited-bg.png create mode 100644 public/backgrounds/welcome-bg.svg create mode 100644 public/backgrounds/welcome-bg2.png create mode 100644 public/images/backgrounds/errorimg.svg create mode 100644 public/images/backgrounds/login-bg.svg create mode 100644 public/images/backgrounds/maintenance2.svg create mode 100644 public/images/backgrounds/unlimited-bg.png create mode 100644 public/images/breadcrumb/ChatBc.png create mode 100644 public/images/flag/icon-flag-cn.svg create mode 100644 public/images/flag/icon-flag-en.svg create mode 100644 public/images/flag/icon-flag-fr.svg create mode 100644 public/images/flag/icon-flag-sa.svg create mode 100644 public/images/flag/icon-flag-vn.svg create mode 100644 public/images/logos/dark-logo.svg create mode 100644 public/images/logos/dark-rtl-logo.svg create mode 100644 public/images/logos/light-logo-rtl.svg create mode 100644 public/images/logos/light-logo.svg create mode 100644 public/images/logos/logoIcon.svg create mode 100644 public/images/products/empty-shopping-cart.svg create mode 100644 public/images/products/payment-complete.gif create mode 100644 public/images/products/payment.svg create mode 100644 public/images/products/s1.jpg create mode 100644 public/images/products/s10.jpg create mode 100644 public/images/products/s11.jpg create mode 100644 public/images/products/s12.jpg create mode 100644 public/images/products/s2.jpg create mode 100644 public/images/products/s3.jpg create mode 100644 public/images/products/s4.jpg create mode 100644 public/images/products/s5.jpg create mode 100644 public/images/products/s6.jpg create mode 100644 public/images/products/s7.jpg create mode 100644 public/images/products/s8.jpg create mode 100644 public/images/products/s9.jpg create mode 100644 public/images/profile/user-1.jpg create mode 100644 public/images/profile/user-10.jpg create mode 100644 public/images/profile/user-2.jpg create mode 100644 public/images/profile/user-3.jpg create mode 100644 public/images/profile/user-4.jpg create mode 100644 public/images/profile/user-5.jpg create mode 100644 public/images/profile/user-6.jpg create mode 100644 public/images/profile/user-7.jpg create mode 100644 public/images/profile/user-8.jpg create mode 100644 public/images/profile/user-9.jpg create mode 100644 public/images/svgs/facebook-icon.svg create mode 100644 public/images/svgs/git-icon.svg create mode 100644 public/images/svgs/google-icon.svg create mode 100644 public/images/svgs/icon-account.svg create mode 100644 public/images/svgs/icon-dd-application.svg create mode 100644 public/images/svgs/icon-dd-cart.svg create mode 100644 public/images/svgs/icon-dd-chat.svg create mode 100644 public/images/svgs/icon-dd-date.svg create mode 100644 public/images/svgs/icon-dd-invoice.svg create mode 100644 public/images/svgs/icon-dd-lifebuoy.svg create mode 100644 public/images/svgs/icon-dd-message-box.svg create mode 100644 public/images/svgs/icon-dd-mobile.svg create mode 100644 public/images/svgs/icon-inbox.svg create mode 100644 public/images/svgs/icon-tasks.svg create mode 100644 public/logo_juru.png create mode 100644 sonnar.bat create mode 100644 src/declarations.d.ts create mode 100644 src/features/dashboard/components/Dashboard.tsx create mode 100644 src/features/dashboard/components/DashboardLayout.tsx create mode 100644 src/features/dashboard/components/DashboardOverview.tsx create mode 100644 src/features/dashboard/components/Logo.tsx create mode 100644 src/features/dashboard/components/Scrollbar.tsx create mode 100644 src/features/dashboard/header/AppLinks.tsx create mode 100644 src/features/dashboard/header/Header.tsx create mode 100644 src/features/dashboard/header/MobileRightSidebar.tsx create mode 100644 src/features/dashboard/header/Navigation.tsx create mode 100644 src/features/dashboard/header/Notification.tsx create mode 100644 src/features/dashboard/header/Profile.tsx create mode 100644 src/features/dashboard/header/Search.tsx create mode 100644 src/features/dashboard/header/data.ts create mode 100644 src/features/dashboard/index.ts create mode 100644 src/features/dashboard/pages/DashboardPage.tsx create mode 100644 src/features/dashboard/sidebar/MenuItems.ts create mode 100644 src/features/dashboard/sidebar/Sidebar.tsx create mode 100644 src/features/dashboard/sidebar/SidebarItems.tsx create mode 100644 src/features/dashboard/sidebar/components/NavCollapse.tsx create mode 100644 src/features/dashboard/sidebar/components/NavGroup.tsx create mode 100644 src/features/dashboard/sidebar/components/NavItem.tsx create mode 100644 src/features/dashboard/sidebar/types/sidebar.ts create mode 100644 src/features/dashboard/store/useCustomizerStore.ts create mode 100644 src/features/login/api.ts create mode 100644 src/features/login/authForms/AuthLogin.test.tsx create mode 100644 src/features/login/authForms/AuthLogin.tsx create mode 100644 src/features/login/authForms/AuthSocialButtons.tsx create mode 100644 src/features/login/components/AuthInitializer.tsx create mode 100644 src/features/login/components/LoginForm.tsx create mode 100644 src/features/login/components/forms/container/PageContainer.tsx create mode 100644 src/features/login/components/forms/custom-scroll/Scrollbar.tsx create mode 100644 src/features/login/components/forms/shared/DashboardCard.tsx create mode 100644 src/features/login/components/forms/shared/ScrollToTop.tsx create mode 100644 src/features/login/components/forms/theme-elements/CustomCheckbox.tsx create mode 100644 src/features/login/components/forms/theme-elements/CustomFormLabel.tsx create mode 100644 src/features/login/components/forms/theme-elements/CustomSocialButton.tsx create mode 100644 src/features/login/components/forms/theme-elements/CustomTextField.tsx create mode 100644 src/features/login/docs/contrato.md create mode 100644 src/features/login/hooks/useAuth.ts create mode 100644 src/features/login/interfaces/types.ts create mode 100644 src/features/login/schemas/schemas.test.ts create mode 100644 src/features/login/schemas/schemas.ts create mode 100644 src/features/login/services/login.service.ts create mode 100644 src/features/login/store/useAuthStore.ts create mode 100644 src/features/login/utils/index.ts create mode 100644 src/features/login/utils/mappers.ts create mode 100644 src/features/login/utils/tokenRefresh.ts create mode 100644 src/features/orders/api/order.service.ts create mode 100644 src/features/orders/components/CustomPagination.tsx create mode 100644 src/features/orders/components/OrderDetailsTabs.tsx create mode 100644 src/features/orders/components/OrderItem.tsx create mode 100644 src/features/orders/components/OrderItemsTable.tsx create mode 100644 src/features/orders/components/OrderItemsTableColumns.tsx create mode 100644 src/features/orders/components/OrderTable.tsx create mode 100644 src/features/orders/components/OrderTableColumns.tsx create mode 100644 src/features/orders/components/SearchBar.tsx create mode 100644 src/features/orders/components/TabPanel.tsx create mode 100644 src/features/orders/components/tabs/CargoMovementPanel.tsx create mode 100644 src/features/orders/components/tabs/CashAdjustmentPanel.tsx create mode 100644 src/features/orders/components/tabs/CuttingPanel.tsx create mode 100644 src/features/orders/components/tabs/DeliveryPanel.tsx create mode 100644 src/features/orders/components/tabs/InformationPanel.tsx create mode 100644 src/features/orders/components/tabs/PreBoxPanel.tsx create mode 100644 src/features/orders/components/tabs/TV8Panel.tsx create mode 100644 src/features/orders/components/tabs/TimelinePanel.tsx create mode 100644 src/features/orders/config/colorMappings.json create mode 100644 src/features/orders/docs/README.md create mode 100644 src/features/orders/docs/order-items-implementation.md create mode 100644 src/features/orders/hooks/useCustomers.ts create mode 100644 src/features/orders/hooks/useOrderFilters.ts create mode 100644 src/features/orders/hooks/useOrderItems.ts create mode 100644 src/features/orders/hooks/useOrders.ts create mode 100644 src/features/orders/hooks/useSellers.ts create mode 100644 src/features/orders/index.ts create mode 100644 src/features/orders/pages/OrdersPage.tsx create mode 100644 src/features/orders/schemas/api-response.schema.ts create mode 100644 src/features/orders/schemas/api-responses.schema.ts create mode 100644 src/features/orders/schemas/customer.schema.ts create mode 100644 src/features/orders/schemas/order-filters.schema.ts create mode 100644 src/features/orders/schemas/order.item.schema.ts create mode 100644 src/features/orders/schemas/order.schema.ts create mode 100644 src/features/orders/schemas/seller.schema.ts create mode 100644 src/features/orders/schemas/store.schema.ts create mode 100644 src/features/orders/store/useStores.ts create mode 100644 src/features/orders/types/index.ts create mode 100644 src/features/orders/utils/locale.ts create mode 100644 src/features/orders/utils/orderFormatters.ts create mode 100644 src/features/orders/utils/orderNormalizer.ts create mode 100644 src/features/orders/utils/tableHelpers.ts create mode 100644 src/features/profile/api.ts create mode 100644 src/features/profile/components/ProfilePage.tsx create mode 100644 src/features/profile/services/profile.service.ts create mode 100644 src/features/profile/types.ts diff --git a/.scannerwork/.sonar_lock b/.scannerwork/.sonar_lock new file mode 100644 index 0000000..e69de29 diff --git a/.scannerwork/report-task.txt b/.scannerwork/report-task.txt new file mode 100644 index 0000000..0bc3250 --- /dev/null +++ b/.scannerwork/report-task.txt @@ -0,0 +1,6 @@ +projectKey=Portal-web +serverUrl=http://localhost:9000 +serverVersion=25.12.0.117093 +dashboardUrl=http://localhost:9000/dashboard?id=Portal-web +ceTaskId=67942efc-3d1c-48c5-87bd-022c220ed6ad +ceTaskUrl=http://localhost:9000/api/ce/task?id=67942efc-3d1c-48c5-87bd-022c220ed6ad diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7083ac1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "sonarlint.connectedMode.project": { + "connectionId": "http-localhost-9000", + "projectKey": "Portal-web" + } +} \ No newline at end of file diff --git a/app/components/EmotionRegistry.tsx b/app/components/EmotionRegistry.tsx new file mode 100644 index 0000000..e8c9edb --- /dev/null +++ b/app/components/EmotionRegistry.tsx @@ -0,0 +1,95 @@ +'use client'; + +import createCache from '@emotion/cache'; +import { useServerInsertedHTML } from 'next/navigation'; +import { CacheProvider as DefaultCacheProvider } from '@emotion/react'; +import type { EmotionCache, Options as OptionsOfCreateCache } from '@emotion/cache'; +import type { ReactNode } from 'react'; +import { useState } from 'react'; +import React from 'react'; + +export type NextAppDirEmotionCacheProviderProps = { + /** This is the options passed to createCache() from 'import createCache from "@emotion/cache"' */ + options: Omit; + /** By default from 'import { CacheProvider } from "@emotion/react"' */ + CacheProvider?: (props: { + value: EmotionCache; + children: ReactNode; + }) => React.JSX.Element | null; + children: ReactNode; +}; + +// Adapted from https://github.com/garronej/tss-react/blob/main/src/next/appDir.tsx +export default function NextAppDirEmotionCacheProvider(props: NextAppDirEmotionCacheProviderProps) { + const { options, CacheProvider = DefaultCacheProvider, children } = props; + + const [registry] = useState(() => { + const cache = createCache(options); + cache.compat = true; + const prevInsert = cache.insert; + let inserted: { name: string; isGlobal: boolean }[] = []; + cache.insert = (...args) => { + const [selector, serialized] = args; + if (cache.inserted[serialized.name] === undefined) { + inserted.push({ + name: serialized.name, + isGlobal: !selector, + }); + } + return prevInsert(...args); + }; + const flush = () => { + const prevInserted = inserted; + inserted = []; + return prevInserted; + }; + return { cache, flush }; + }); + + useServerInsertedHTML(() => { + const inserted = registry.flush(); + if (inserted.length === 0) { + return null; + } + let styles = ''; + let dataEmotionAttribute = registry.cache.key; + + const globals: { + name: string; + style: string; + }[] = []; + + inserted.forEach(({ name, isGlobal }) => { + const style = registry.cache.inserted[name]; + + if (style && typeof style !== 'boolean') { + if (isGlobal) { + globals.push({ name, style }); + } else { + styles += style; + dataEmotionAttribute += ` ${name}`; + } + } + }); + + return ( + <> + {globals.map(({ name, style }) => ( +