Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

Partners (#24)

Brad Barbin25c2c977a1c5
diff --git a/SCHEMA.md b/SCHEMA.md
index c65fa6f70c..95d642f798 100644
--- a/SCHEMA.md
+++ b/SCHEMA.md
@@ -2251,6 +2251,7 @@ CREATE TABLE "employeeJob" (
"shiftId" TEXT,
"managerId" TEXT,
"title" TEXT,
+ "startDate" DATE,
CONSTRAINT "employeeJob_pkey" PRIMARY KEY ("id"),
CONSTRAINT "employeeJob_id_fkey" FOREIGN KEY ("id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,
@@ -2480,3 +2481,24 @@ CREATE TABLE "holiday" (
CREATE VIEW "holiday_years" AS SELECT DISTINCT "year" FROM "holiday";
```
+
+
+## `partners`
+
+```sql
+CREATE TABLE "partner" (
+ "id" TEXT NOT NULL,
+ "hoursPerWeek" INTEGER NOT NULL DEFAULT 0,
+ "active" BOOLEAN NOT NULL DEFAULT true,
+ "createdBy" TEXT NOT NULL,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedBy" TEXT,
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "partner_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "partner_id_fkey" FOREIGN KEY ("id") REFERENCES "supplier"("id"),
+ CONSTRAINT "partner_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user"("id"),
+ CONSTRAINT "partner_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user"("id")
+);
+```
+
diff --git a/apps/carbon/app/components/Form/Ability.tsx b/apps/carbon/app/components/Form/Ability.tsx
index 822405dd6b..25397fb801 100644
--- a/apps/carbon/app/components/Form/Ability.tsx
+++ b/apps/carbon/app/components/Form/Ability.tsx
@@ -9,7 +9,7 @@ import {
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo } from "react";
import { useField } from "remix-validated-form";
-import type { getAbilitiesList } from "~/services/resources";
+import type { getAbilitiesList } from "~/modules/resources";
import { mapRowsToOptions } from "~/utils/form";
import type { SelectProps } from "./Select";
diff --git a/apps/carbon/app/components/Form/Customer.tsx b/apps/carbon/app/components/Form/Customer.tsx
index 0ecd12b484..f4afcf815d 100644
--- a/apps/carbon/app/components/Form/Customer.tsx
+++ b/apps/carbon/app/components/Form/Customer.tsx
@@ -9,7 +9,7 @@ import {
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo } from "react";
import { useField } from "remix-validated-form";
-import type { getCustomersList } from "~/services/sales";
+import type { getCustomersList } from "~/modules/sales";
import { mapRowsToOptions } from "~/utils/form";
import type { SelectProps } from "./Select";
diff --git a/apps/carbon/app/components/Form/CustomerContact.tsx b/apps/carbon/app/components/Form/CustomerContact.tsx
index 12385a7d26..256a696a0d 100644
--- a/apps/carbon/app/components/Form/CustomerContact.tsx
+++ b/apps/carbon/app/components/Form/CustomerContact.tsx
@@ -9,8 +9,8 @@ import {
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo, useRef } from "react";
import { useControlField, useField } from "remix-validated-form";
-import type { CustomerContact as CustomerContactType } from "~/interfaces/Sales/types";
-import type { getCustomerContacts } from "~/services/sales";
+import type { CustomerContact as CustomerContactType } from "~/modules/sales";
+import type { getCustomerContacts } from "~/modules/sales";
import type { SelectProps } from "./Select";
type CustomerContactSelectProps = Omit<SelectProps, "options" | "onChange"> & {
diff --git a/apps/carbon/app/components/Form/Department.tsx b/apps/carbon/app/components/Form/Department.tsx
index 14c1072333..1718ec2392 100644
--- a/apps/carbon/app/components/Form/Department.tsx
+++ b/apps/carbon/app/components/Form/Department.tsx
@@ -9,7 +9,7 @@ import {
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo } from "react";
import { useField } from "remix-validated-form";
-import type { getDepartmentsList } from "~/services/resources";
+import type { getDepartmentsList } from "~/modules/resources";
import { mapRowsToOptions } from "~/utils/form";
import type { SelectProps } from "./Select";
diff --git a/apps/carbon/app/components/Form/Location.tsx b/apps/carbon/app/components/Form/Location.tsx
index 4535dca23c..ae8530dbe1 100644
--- a/apps/carbon/app/components/Form/Location.tsx
+++ b/apps/carbon/app/components/Form/Location.tsx
@@ -9,7 +9,7 @@ import {
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo } from "react";
import { useField } from "remix-validated-form";
-import type { getLocationsList } from "~/services/resources";
+import type { getLocationsList } from "~/modules/resources";
import { mapRowsToOptions } from "~/utils/form";
import type { SelectProps } from "./Select";
diff --git a/apps/carbon/app/components/Form/Supplier.tsx b/apps/carbon/app/components/Form/Supplier.tsx
index 330384efac..e893daa8ed 100644
--- a/apps/carbon/app/components/Form/Supplier.tsx
+++ b/apps/carbon/app/components/Form/Supplier.tsx
@@ -9,7 +9,7 @@ import {
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo } from "react";
import { useField } from "remix-validated-form";
-import type { getSuppliersList } from "~/services/purchasing";
+import type { getSuppliersList } from "~/modules/purchasing";
import { mapRowsToOptions } from "~/utils/form";
import type { SelectProps } from "./Select";
diff --git a/apps/carbon/app/components/Form/SupplierContact.tsx b/apps/carbon/app/components/Form/SupplierContact.tsx
index 3681d695b8..f81ed7f999 100644
--- a/apps/carbon/app/components/Form/SupplierContact.tsx
+++ b/apps/carbon/app/components/Form/SupplierContact.tsx
@@ -9,8 +9,10 @@ import {
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo, useRef } from "react";
import { useControlField, useField } from "remix-validated-form";
-import type { SupplierContact as SupplierContactType } from "~/interfaces/Purchasing/types";
-import type { getSupplierContacts } from "~/services/purchasing";
+import type {
+ SupplierContact as SupplierContactType,
+ getSupplierContacts,
+} from "~/modules/purchasing";
import type { SelectProps } from "./Select";
type SupplierContactSelectProps = Omit<SelectProps, "options" | "onChange"> & {
diff --git a/apps/carbon/app/components/Layout/Sidebar/CollapsibleSidebar.tsx b/apps/carbon/app/components/Layout/Sidebar/CollapsibleSidebar.tsx
index 10c993ef0a..470b7bbf78 100644
--- a/apps/carbon/app/components/Layout/Sidebar/CollapsibleSidebar.tsx
+++ b/apps/carbon/app/components/Layout/Sidebar/CollapsibleSidebar.tsx
@@ -31,7 +31,6 @@ export const CollapsibleSidebar = ({ children }: PropsWithChildren<{}>) => {
borderRightStyle="solid"
position="relative"
h="calc(100vh - 50px)"
- overflowY="scroll"
>
<Tooltip label={sidebar.isOpen ? "Collapse" : "Expand"} placement="right">
<IconButton
diff --git a/apps/carbon/app/components/Layout/Sidebar/ContentSidebar.tsx b/apps/carbon/app/components/Layout/Sidebar/ContentSidebar.tsx
index 42014b5b14..238b021b25 100644
--- a/apps/carbon/app/components/Layout/Sidebar/ContentSidebar.tsx
+++ b/apps/carbon/app/components/Layout/Sidebar/ContentSidebar.tsx
@@ -19,8 +19,7 @@ const ContentSidebar = ({ links }: { links: Route[] }) => {
borderBottomStyle={"solid"}
borderBottomWidth={1}
borderBottomColor={borderColor}
- px={2}
- py={4}
+ p={2}
w="full"
>
{links.map((route) => {
@@ -33,6 +32,7 @@ const ContentSidebar = ({ links }: { links: Route[] }) => {
as={Link}
to={route.to}
variant={isActive ? "solid" : "ghost"}
+ border="none"
fontWeight={isActive ? "bold" : "normal"}
justifyContent="start"
w="full"
diff --git a/apps/carbon/app/components/Layout/Sidebar/GroupedContentSidebar.tsx b/apps/carbon/app/components/Layout/Sidebar/GroupedContentSidebar.tsx
index d163ceb2b2..a609d29a50 100644
--- a/apps/carbon/app/components/Layout/Sidebar/GroupedContentSidebar.tsx
+++ b/apps/carbon/app/components/Layout/Sidebar/GroupedContentSidebar.tsx
@@ -22,8 +22,7 @@ const GroupedContentSidebar = ({ groups }: { groups: RouteGroup[] }) => {
borderBottomStyle={"solid"}
borderBottomWidth={1}
borderBottomColor={borderColor}
- px={2}
- py={4}
+ p={2}
w="full"
>
<Text
@@ -46,6 +45,7 @@ const GroupedContentSidebar = ({ groups }: { groups: RouteGroup[] }) => {
as={Link}
to={route.to}
variant={isActive ? "solid" : "ghost"}
+ border="none"
fontWeight={isActive ? "bold" : "normal"}
leftIcon={route.icon}
justifyContent="start"
diff --git a/apps/carbon/app/components/Search/Search/Search.tsx b/apps/carbon/app/components/Search/Search/Search.tsx
index 68bffcf1b9..15465b63a3 100644
--- a/apps/carbon/app/components/Search/Search/Search.tsx
+++ b/apps/carbon/app/components/Search/Search/Search.tsx
@@ -82,8 +82,6 @@ const SearchModal = ({
? tokens.map((token) => `"${token}"`).join(" <-> ")
: q;
- console.log(supabase);
-
const result = await supabase
?.from("search")
.select()
diff --git a/apps/carbon/app/components/Selectors/CustomerSelect/CustomerSelect.tsx b/apps/carbon/app/components/Selectors/CustomerSelect/CustomerSelect.tsx
index aecd9b839e..8e69095c9f 100644
--- a/apps/carbon/app/components/Selectors/CustomerSelect/CustomerSelect.tsx
+++ b/apps/carbon/app/components/Selectors/CustomerSelect/CustomerSelect.tsx
@@ -1,7 +1,7 @@
import { Select, createFilter } from "@carbon/react";
import { useFetcher } from "@remix-run/react";
import { useEffect } from "react";
-import type { getCustomersList } from "~/services/sales";
+import type { getCustomersList } from "~/modules/sales";
import { mapRowsToOptions } from "~/utils/form";
type CustomerSelectProps = {
diff --git a/apps/carbon/app/components/Selectors/SupplierSelect/SupplierSelect.tsx b/apps/carbon/app/components/Selectors/SupplierSelect/SupplierSelect.tsx
index b4ec40eca2..d272ecb01b 100644
--- a/apps/carbon/app/components/Selectors/SupplierSelect/SupplierSelect.tsx
+++ b/apps/carbon/app/components/Selectors/SupplierSelect/SupplierSelect.tsx
@@ -1,7 +1,7 @@
import { Select, createFilter } from "@carbon/react";
import { useFetcher } from "@remix-run/react";
import { useEffect } from "react";
-import type { getSuppliersList } from "~/services/purchasing";
+import type { getSuppliersList } from "~/modules/purchasing";
import { mapRowsToOptions } from "~/utils/form";
type SupplierSelectProps = {
diff --git a/apps/carbon/app/components/Selectors/UserSelect/types.ts b/apps/carbon/app/components/Selectors/UserSelect/types.ts
index 6b93ee87aa..1e794244eb 100644
--- a/apps/carbon/app/components/Selectors/UserSelect/types.ts
+++ b/apps/carbon/app/components/Selectors/UserSelect/types.ts
@@ -8,7 +8,7 @@ import type {
RefObject,
} from "react";
-import type { User, Group } from "~/interfaces/Users/types";
+import type { User, Group } from "~/modules/users";
export type ComboBoxRefs = {
containerRef: RefObject<HTMLDivElement>;
diff --git a/apps/carbon/app/components/Selectors/UserSelect/useUserSelect.ts b/apps/carbon/app/components/Selectors/UserSelect/useUserSelect.ts
index 9a36de571c..0f70f5e8a4 100644
--- a/apps/carbon/app/components/Selectors/UserSelect/useUserSelect.ts
+++ b/apps/carbon/app/components/Selectors/UserSelect/useUserSelect.ts
@@ -5,7 +5,7 @@ import debounce from "lodash/debounce";
import words from "lodash/words";
import type { AriaAttributes, ChangeEvent, KeyboardEvent } from "react";
import { useEffect, useState, useMemo, useCallback, useRef } from "react";
-import type { Group } from "~/interfaces/Users/types";
+import type { Group } from "~/modules/users";
import type {
OptionGroup,
diff --git a/apps/carbon/app/hooks/usePermissions.tsx b/apps/carbon/app/hooks/usePermissions.tsx
index f5c66a7c76..021893e2bb 100644
--- a/apps/carbon/app/hooks/usePermissions.tsx
+++ b/apps/carbon/app/hooks/usePermissions.tsx
@@ -1,5 +1,5 @@
import { useCallback } from "react";
-import type { Permission } from "~/interfaces/Users/types";
+import type { Permission } from "~/modules/users";
import type { Role } from "~/types";
import { useRouteData } from "./useRouteData";
diff --git a/apps/carbon/app/interfaces/Account/index.ts b/apps/carbon/app/interfaces/Account/index.ts
deleted file mode 100644
index f97d900f06..0000000000
--- a/apps/carbon/app/interfaces/Account/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import useAccountSidebar from "./useAccountSidebar";
-
-export { useAccountSidebar };
diff --git a/apps/carbon/app/interfaces/Resources/index.ts b/apps/carbon/app/interfaces/Resources/index.ts
deleted file mode 100644
index ff16b414fc..0000000000
--- a/apps/carbon/app/interfaces/Resources/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import useResourcesSidebar from "./useResourcesSidebar";
-
-export { useResourcesSidebar };
diff --git a/apps/carbon/app/modules/account/index.ts b/apps/carbon/app/modules/account/index.ts
new file mode 100644
index 0000000000..684aed031a
--- /dev/null
+++ b/apps/carbon/app/modules/account/index.ts
@@ -0,0 +1,3 @@
+export * from "./services";
+export * from "./interfaces";
+export * from "./types";
diff --git a/apps/carbon/app/interfaces/Account/Password/PasswordForm/PasswordForm.tsx b/apps/carbon/app/modules/account/interfaces/Password/PasswordForm/PasswordForm.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Account/Password/PasswordForm/PasswordForm.tsx
rename to apps/carbon/app/modules/account/interfaces/Password/PasswordForm/PasswordForm.tsx
index 7630ef2a14..0dca5c2002 100644
--- a/apps/carbon/app/interfaces/Account/Password/PasswordForm/PasswordForm.tsx
+++ b/apps/carbon/app/modules/account/interfaces/Password/PasswordForm/PasswordForm.tsx
@@ -2,7 +2,7 @@ import { Box, VStack } from "@chakra-ui/react";
import { useRef, useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import { Password, Submit } from "~/components/Form";
-import { accountPasswordValidator } from "~/services/account";
+import { accountPasswordValidator } from "~/modules/account";
const PasswordForm = () => {
const [passwordsMatch, setPasswordsMatch] = useState(false);
diff --git a/apps/carbon/app/interfaces/Account/Password/PasswordForm/index.ts b/apps/carbon/app/modules/account/interfaces/Password/PasswordForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Account/Password/PasswordForm/index.ts
rename to apps/carbon/app/modules/account/interfaces/Password/PasswordForm/index.ts
diff --git a/apps/carbon/app/interfaces/Account/Password/index.ts b/apps/carbon/app/modules/account/interfaces/Password/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Account/Password/index.ts
rename to apps/carbon/app/modules/account/interfaces/Password/index.ts
diff --git a/apps/carbon/app/interfaces/Account/Personal/PersonalDataForm/PersonalDataForm.tsx b/apps/carbon/app/modules/account/interfaces/Personal/PersonalDataForm/PersonalDataForm.tsx
similarity index 85%
rename from apps/carbon/app/interfaces/Account/Personal/PersonalDataForm/PersonalDataForm.tsx
rename to apps/carbon/app/modules/account/interfaces/Personal/PersonalDataForm/PersonalDataForm.tsx
index aa3e88c19a..d1c9c5e8f6 100644
--- a/apps/carbon/app/interfaces/Account/Personal/PersonalDataForm/PersonalDataForm.tsx
+++ b/apps/carbon/app/modules/account/interfaces/Personal/PersonalDataForm/PersonalDataForm.tsx
@@ -1,8 +1,8 @@
import { Box, Grid, VStack } from "@chakra-ui/react";
import { ValidatedForm } from "remix-validated-form";
import { Submit } from "~/components/Form";
-import type { PersonalData } from "~/interfaces/Account/types";
-import { accountPersonalDataValidator } from "~/services/account";
+import type { PersonalData } from "~/modules/account";
+import { accountPersonalDataValidator } from "~/modules/account";
type PersonalDataFormProps = {
personalData: PersonalData;
diff --git a/apps/carbon/app/interfaces/Account/Personal/PersonalDataForm/index.ts b/apps/carbon/app/modules/account/interfaces/Personal/PersonalDataForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Account/Personal/PersonalDataForm/index.ts
rename to apps/carbon/app/modules/account/interfaces/Personal/PersonalDataForm/index.ts
diff --git a/apps/carbon/app/interfaces/Account/Personal/index.ts b/apps/carbon/app/modules/account/interfaces/Personal/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Account/Personal/index.ts
rename to apps/carbon/app/modules/account/interfaces/Personal/index.ts
diff --git a/apps/carbon/app/interfaces/Account/Profile/ProfileForm/ProfileForm.tsx b/apps/carbon/app/modules/account/interfaces/Profile/ProfileForm/ProfileForm.tsx
similarity index 91%
rename from apps/carbon/app/interfaces/Account/Profile/ProfileForm/ProfileForm.tsx
rename to apps/carbon/app/modules/account/interfaces/Profile/ProfileForm/ProfileForm.tsx
index 0452fda498..86251563c2 100644
--- a/apps/carbon/app/interfaces/Account/Profile/ProfileForm/ProfileForm.tsx
+++ b/apps/carbon/app/modules/account/interfaces/Profile/ProfileForm/ProfileForm.tsx
@@ -3,8 +3,8 @@ import { useParams } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Hidden, Input, Submit, TextArea } from "~/components/Form";
import { SectionTitle } from "~/components/Layout";
-import type { User } from "~/interfaces/Users/types";
-import { accountProfileValidator } from "~/services/account";
+import { accountProfileValidator } from "~/modules/account";
+import type { User } from "~/modules/users";
type ProfileFormProps = {
user: User;
diff --git a/apps/carbon/app/interfaces/Account/Profile/ProfileForm/index.ts b/apps/carbon/app/modules/account/interfaces/Profile/ProfileForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Account/Profile/ProfileForm/index.ts
rename to apps/carbon/app/modules/account/interfaces/Profile/ProfileForm/index.ts
diff --git a/apps/carbon/app/interfaces/Account/Profile/ProfilePhotoForm/ProfilePhotoForm.tsx b/apps/carbon/app/modules/account/interfaces/Profile/ProfilePhotoForm/ProfilePhotoForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Account/Profile/ProfilePhotoForm/ProfilePhotoForm.tsx
rename to apps/carbon/app/modules/account/interfaces/Profile/ProfilePhotoForm/ProfilePhotoForm.tsx
index ab98c828f3..25827c1e47 100644
--- a/apps/carbon/app/interfaces/Account/Profile/ProfilePhotoForm/ProfilePhotoForm.tsx
+++ b/apps/carbon/app/modules/account/interfaces/Profile/ProfilePhotoForm/ProfilePhotoForm.tsx
@@ -5,7 +5,7 @@ import type { ChangeEvent } from "react";
import { useRef } from "react";
import { Avatar } from "~/components";
import { useSupabase } from "~/lib/supabase";
-import type { Account } from "~/interfaces/Account/types";
+import type { Account } from "~/modules/account";
type ProfilePhotoFormProps = {
user: Account;
diff --git a/apps/carbon/app/interfaces/Account/Profile/ProfilePhotoForm/index.ts b/apps/carbon/app/modules/account/interfaces/Profile/ProfilePhotoForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Account/Profile/ProfilePhotoForm/index.ts
rename to apps/carbon/app/modules/account/interfaces/Profile/ProfilePhotoForm/index.ts
diff --git a/apps/carbon/app/interfaces/Account/Profile/index.ts b/apps/carbon/app/modules/account/interfaces/Profile/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Account/Profile/index.ts
rename to apps/carbon/app/modules/account/interfaces/Profile/index.ts
diff --git a/apps/carbon/app/interfaces/Account/UserAttributes/UserAttributesForm.tsx b/apps/carbon/app/modules/account/interfaces/UserAttributes/UserAttributesForm.tsx
similarity index 99%
rename from apps/carbon/app/interfaces/Account/UserAttributes/UserAttributesForm.tsx
rename to apps/carbon/app/modules/account/interfaces/UserAttributes/UserAttributesForm.tsx
index ed0199ae48..d9cbe46cdc 100644
--- a/apps/carbon/app/interfaces/Account/UserAttributes/UserAttributesForm.tsx
+++ b/apps/carbon/app/modules/account/interfaces/UserAttributes/UserAttributesForm.tsx
@@ -25,15 +25,15 @@ import {
} from "~/components/Form";
import { UserSelect } from "~/components/Selectors";
import { usePermissions, useUser } from "~/hooks";
-import type { PublicAttributes } from "~/interfaces/Account/types";
-import { DataType } from "~/interfaces/Users/types";
import {
attributeBooleanValidator,
attributeNumericValidator,
attributeTextValidator,
attributeUserValidator,
deleteUserAttributeValueValidator,
-} from "~/services/account";
+} from "~/modules/account";
+import type { PublicAttributes } from "~/modules/account";
+import { DataType } from "~/modules/users";
type UserAttributesFormProps = {
attributeCategory?: PublicAttributes;
diff --git a/apps/carbon/app/interfaces/Account/UserAttributes/index.ts b/apps/carbon/app/modules/account/interfaces/UserAttributes/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Account/UserAttributes/index.ts
rename to apps/carbon/app/modules/account/interfaces/UserAttributes/index.ts
diff --git a/apps/carbon/app/modules/account/interfaces/index.ts b/apps/carbon/app/modules/account/interfaces/index.ts
new file mode 100644
index 0000000000..454cdb48a2
--- /dev/null
+++ b/apps/carbon/app/modules/account/interfaces/index.ts
@@ -0,0 +1,7 @@
+import useAccountSidebar from "./useAccountSidebar";
+
+export { useAccountSidebar };
+export * from "./Password";
+export * from "./Personal";
+export * from "./Profile";
+export * from "./UserAttributes";
diff --git a/apps/carbon/app/interfaces/Account/useAccountSidebar.tsx b/apps/carbon/app/modules/account/interfaces/useAccountSidebar.tsx
similarity index 100%
rename from apps/carbon/app/interfaces/Account/useAccountSidebar.tsx
rename to apps/carbon/app/modules/account/interfaces/useAccountSidebar.tsx
diff --git a/apps/carbon/app/services/account/account.form.ts b/apps/carbon/app/modules/account/services/account.form.ts
similarity index 100%
rename from apps/carbon/app/services/account/account.form.ts
rename to apps/carbon/app/modules/account/services/account.form.ts
diff --git a/apps/carbon/app/services/account/account.server.ts b/apps/carbon/app/modules/account/services/account.server.ts
similarity index 100%
rename from apps/carbon/app/services/account/account.server.ts
rename to apps/carbon/app/modules/account/services/account.server.ts
diff --git a/apps/carbon/app/services/account/index.ts b/apps/carbon/app/modules/account/services/index.ts
similarity index 100%
rename from apps/carbon/app/services/account/index.ts
rename to apps/carbon/app/modules/account/services/index.ts
diff --git a/apps/carbon/app/interfaces/Account/types.ts b/apps/carbon/app/modules/account/types.ts
similarity index 79%
rename from apps/carbon/app/interfaces/Account/types.ts
rename to apps/carbon/app/modules/account/types.ts
index a734ca0a9e..7b148dd8fb 100644
--- a/apps/carbon/app/interfaces/Account/types.ts
+++ b/apps/carbon/app/modules/account/types.ts
@@ -1,4 +1,4 @@
-import type { getAccount, getPublicAttributes } from "~/services/account";
+import type { getAccount, getPublicAttributes } from "./services";
export type Account = NonNullable<
Awaited<ReturnType<typeof getAccount>>["data"]
diff --git a/apps/carbon/app/modules/parts/index.ts b/apps/carbon/app/modules/parts/index.ts
new file mode 100644
index 0000000000..afccf2b240
--- /dev/null
+++ b/apps/carbon/app/modules/parts/index.ts
@@ -0,0 +1,3 @@
+// export * from "./services";
+export * from "./interfaces";
+// export * from "./types";
diff --git a/apps/carbon/app/interfaces/Parts/Toolbar/PartsTree.tsx b/apps/carbon/app/modules/parts/interfaces/Toolbar/PartsTree.tsx
similarity index 100%
rename from apps/carbon/app/interfaces/Parts/Toolbar/PartsTree.tsx
rename to apps/carbon/app/modules/parts/interfaces/Toolbar/PartsTree.tsx
diff --git a/apps/carbon/app/interfaces/Parts/Toolbar/index.ts b/apps/carbon/app/modules/parts/interfaces/Toolbar/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Parts/Toolbar/index.ts
rename to apps/carbon/app/modules/parts/interfaces/Toolbar/index.ts
diff --git a/apps/carbon/app/interfaces/Parts/index.ts b/apps/carbon/app/modules/parts/interfaces/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Parts/index.ts
rename to apps/carbon/app/modules/parts/interfaces/index.ts
diff --git a/apps/carbon/app/modules/purchasing/index.ts b/apps/carbon/app/modules/purchasing/index.ts
new file mode 100644
index 0000000000..684aed031a
--- /dev/null
+++ b/apps/carbon/app/modules/purchasing/index.ts
@@ -0,0 +1,3 @@
+export * from "./services";
+export * from "./interfaces";
+export * from "./types";
diff --git a/apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypeForm/SupplierTypeForm.tsx b/apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypeForm/SupplierTypeForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypeForm/SupplierTypeForm.tsx
rename to apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypeForm/SupplierTypeForm.tsx
index 3ae1020af4..8cae6f8f61 100644
--- a/apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypeForm/SupplierTypeForm.tsx
+++ b/apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypeForm/SupplierTypeForm.tsx
@@ -14,7 +14,7 @@ import { useNavigate } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Color, Hidden, Input, Submit } from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { supplierTypeValidator } from "~/services/purchasing";
+import { supplierTypeValidator } from "~/modules/purchasing";
import type { TypeOfValidator } from "~/types/validators";
type SupplierTypeFormProps = {
diff --git a/apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypeForm/index.ts b/apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypeForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypeForm/index.ts
rename to apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypeForm/index.ts
diff --git a/apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypesTable/SupplierTypesTable.tsx b/apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypesTable/SupplierTypesTable.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypesTable/SupplierTypesTable.tsx
rename to apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypesTable/SupplierTypesTable.tsx
index 5852354d97..4ace8b0d0a 100644
--- a/apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypesTable/SupplierTypesTable.tsx
+++ b/apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypesTable/SupplierTypesTable.tsx
@@ -6,7 +6,7 @@ import { BsPencilSquare, BsPeopleFill } from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { SupplierType } from "~/interfaces/Purchasing/types";
+import type { SupplierType } from "~/modules/purchasing";
type SupplierTypesTableProps = {
data: SupplierType[];
diff --git a/apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypesTable/index.ts b/apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypesTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypesTable/index.ts
rename to apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypesTable/index.ts
diff --git a/apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypesTableFilters/SupplierTypesTableFilters.tsx b/apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypesTableFilters/SupplierTypesTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypesTableFilters/SupplierTypesTableFilters.tsx
rename to apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypesTableFilters/SupplierTypesTableFilters.tsx
index 0060e46a5a..e1c5e8108c 100644
--- a/apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypesTableFilters/SupplierTypesTableFilters.tsx
+++ b/apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypesTableFilters/SupplierTypesTableFilters.tsx
@@ -24,7 +24,7 @@ const SupplierTypesTableFilters = () => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
</HStack>
<HStack spacing={2}>
diff --git a/apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypesTableFilters/index.ts b/apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypesTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Purchasing/SupplierTypes/SupplierTypesTableFilters/index.ts
rename to apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/SupplierTypesTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Purchasing/SupplierTypes/index.ts b/apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Purchasing/SupplierTypes/index.ts
rename to apps/carbon/app/modules/purchasing/interfaces/SupplierTypes/index.ts
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/SupplierForm.tsx b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/SupplierForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/SupplierForm.tsx
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/SupplierForm.tsx
index 5ce438fa73..827bc688e1 100644
--- a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/SupplierForm.tsx
+++ b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/SupplierForm.tsx
@@ -22,17 +22,17 @@ import {
TextArea,
Hidden,
} from "~/components/Form";
-import { supplierValidator } from "~/services/purchasing";
+import { usePermissions, useRouteData } from "~/hooks";
+import { supplierValidator } from "~/modules/purchasing";
import type {
SupplierContact,
SupplierLocation,
SupplierStatus,
SupplierType,
-} from "~/interfaces/Purchasing/types";
+} from "~/modules/purchasing";
import { mapRowsToOptions } from "~/utils/form";
-import { usePermissions, useRouteData } from "~/hooks";
-import { SupplierContacts, SupplierLocations } from "./components";
import type { TypeOfValidator } from "~/types/validators";
+import { SupplierContacts, SupplierLocations } from "./components";
type SupplierFormProps = {
initialValues: TypeOfValidator<typeof supplierValidator>;
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierContacts.tsx b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierContacts.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierContacts.tsx
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierContacts.tsx
index 7ded7b29fc..7edcc1f155 100644
--- a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierContacts.tsx
+++ b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierContacts.tsx
@@ -12,14 +12,11 @@ import {
import { useNavigate, useParams } from "@remix-run/react";
import { useState } from "react";
import { IoMdAdd } from "react-icons/io";
-import type {
- SupplierContact,
- SupplierLocation,
-} from "~/interfaces/Purchasing/types";
import { Contact } from "~/components";
import { ConfirmDelete } from "~/components/Modals";
-import SupplierContactForm from "./SupplierContactsForm";
import { usePermissions } from "~/hooks";
+import type { SupplierContact, SupplierLocation } from "~/modules/purchasing";
+import SupplierContactForm from "./SupplierContactsForm";
type SupplierContactProps = {
contacts?: SupplierContact[];
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierContactsForm.tsx b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierContactsForm.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierContactsForm.tsx
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierContactsForm.tsx
index 3d79ed6f63..c0eeb6b047 100644
--- a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierContactsForm.tsx
+++ b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierContactsForm.tsx
@@ -21,11 +21,8 @@ import {
TextArea,
} from "~/components/Form";
import { usePermissions } from "~/hooks";
-import type {
- SupplierContact,
- SupplierLocation,
-} from "~/interfaces/Purchasing/types";
-import { supplierContactValidator } from "~/services/purchasing";
+import type { SupplierContact, SupplierLocation } from "~/modules/purchasing";
+import { supplierContactValidator } from "~/modules/purchasing";
type SupplierContactFormProps = {
contact?: SupplierContact;
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierLocationForm.tsx b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierLocationForm.tsx
similarity index 95%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierLocationForm.tsx
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierLocationForm.tsx
index 465eda6d2e..e126a5551f 100644
--- a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierLocationForm.tsx
+++ b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierLocationForm.tsx
@@ -14,8 +14,8 @@ import { useParams } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Hidden, Input, Submit } from "~/components/Form";
import { usePermissions } from "~/hooks";
-import type { SupplierLocation } from "~/interfaces/Purchasing/types";
-import { supplierLocationValidator } from "~/services/purchasing";
+import type { SupplierLocation } from "~/modules/purchasing";
+import { supplierLocationValidator } from "~/modules/purchasing";
type SupplierLocationFormProps = {
location?: SupplierLocation;
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierLocations.tsx b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierLocations.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierLocations.tsx
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierLocations.tsx
index 2bfc59f955..36fb15e3e1 100644
--- a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/SupplierLocations.tsx
+++ b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/SupplierLocations.tsx
@@ -15,7 +15,7 @@ import { IoMdAdd } from "react-icons/io";
import { Address } from "~/components";
import { ConfirmDelete } from "~/components/Modals";
import { usePermissions } from "~/hooks";
-import type { SupplierLocation } from "~/interfaces/Purchasing/types";
+import type { SupplierLocation } from "~/modules/purchasing";
import SupplierLocationForm from "./SupplierLocationForm";
type SupplierLocationProps = {
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/index.ts b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/components/index.ts
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/components/index.ts
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/index.ts b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/SupplierForm/index.ts
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/SupplierForm/index.ts
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SuppliersTable/SuppliersTable.tsx b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SuppliersTable/SuppliersTable.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/SuppliersTable/SuppliersTable.tsx
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/SuppliersTable/SuppliersTable.tsx
index 6e59979dde..c04ea3af80 100644
--- a/apps/carbon/app/interfaces/Purchasing/Suppliers/SuppliersTable/SuppliersTable.tsx
+++ b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SuppliersTable/SuppliersTable.tsx
@@ -5,7 +5,7 @@ import { memo, useMemo } from "react";
import { BsPencilSquare, BsPlus } from "react-icons/bs";
import { Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { Supplier } from "~/interfaces/Purchasing/types";
+import type { Supplier } from "~/modules/purchasing";
type SuppliersTableProps = {
data: Supplier[];
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SuppliersTable/index.ts b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SuppliersTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/SuppliersTable/index.ts
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/SuppliersTable/index.ts
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SuppliersTableFilters/SuppliersTableFilters.tsx b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SuppliersTableFilters/SuppliersTableFilters.tsx
similarity index 95%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/SuppliersTableFilters/SuppliersTableFilters.tsx
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/SuppliersTableFilters/SuppliersTableFilters.tsx
index 4c6167e33b..52c936183b 100644
--- a/apps/carbon/app/interfaces/Purchasing/Suppliers/SuppliersTableFilters/SuppliersTableFilters.tsx
+++ b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SuppliersTableFilters/SuppliersTableFilters.tsx
@@ -4,10 +4,7 @@ import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
import { usePermissions, useUrlParams } from "~/hooks";
-import type {
- SupplierStatus,
- SupplierType,
-} from "~/interfaces/Purchasing/types";
+import type { SupplierStatus, SupplierType } from "~/modules/purchasing";
import { mapRowsToOptions } from "~/utils/form";
type SuppliersTableFiltersProps = {
@@ -50,7 +47,7 @@ const SuppliersTableFilters = ({
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
{supplierTypeOptions.length > 0 && (
<Select
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/SuppliersTableFilters/index.ts b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/SuppliersTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/SuppliersTableFilters/index.ts
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/SuppliersTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Purchasing/Suppliers/index.ts b/apps/carbon/app/modules/purchasing/interfaces/Suppliers/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Purchasing/Suppliers/index.ts
rename to apps/carbon/app/modules/purchasing/interfaces/Suppliers/index.ts
diff --git a/apps/carbon/app/interfaces/Purchasing/index.ts b/apps/carbon/app/modules/purchasing/interfaces/index.ts
similarity index 60%
rename from apps/carbon/app/interfaces/Purchasing/index.ts
rename to apps/carbon/app/modules/purchasing/interfaces/index.ts
index 938fcc8f88..64f6cad37c 100644
--- a/apps/carbon/app/interfaces/Purchasing/index.ts
+++ b/apps/carbon/app/modules/purchasing/interfaces/index.ts
@@ -1,3 +1,5 @@
import usePurchasingSidebar from "./usePurchasingSidebar";
export { usePurchasingSidebar };
+export * from "./Suppliers";
+export * from "./SupplierTypes";
diff --git a/apps/carbon/app/interfaces/Purchasing/usePurchasingSidebar.tsx b/apps/carbon/app/modules/purchasing/interfaces/usePurchasingSidebar.tsx
similarity index 100%
rename from apps/carbon/app/interfaces/Purchasing/usePurchasingSidebar.tsx
rename to apps/carbon/app/modules/purchasing/interfaces/usePurchasingSidebar.tsx
diff --git a/apps/carbon/app/services/purchasing/index.ts b/apps/carbon/app/modules/purchasing/services/index.ts
similarity index 100%
rename from apps/carbon/app/services/purchasing/index.ts
rename to apps/carbon/app/modules/purchasing/services/index.ts
diff --git a/apps/carbon/app/services/purchasing/purchasing.form.ts b/apps/carbon/app/modules/purchasing/services/purchasing.form.ts
similarity index 100%
rename from apps/carbon/app/services/purchasing/purchasing.form.ts
rename to apps/carbon/app/modules/purchasing/services/purchasing.form.ts
diff --git a/apps/carbon/app/services/purchasing/purchasing.server.ts b/apps/carbon/app/modules/purchasing/services/purchasing.server.ts
similarity index 100%
rename from apps/carbon/app/services/purchasing/purchasing.server.ts
rename to apps/carbon/app/modules/purchasing/services/purchasing.server.ts
diff --git a/apps/carbon/app/interfaces/Purchasing/types.ts b/apps/carbon/app/modules/purchasing/types.ts
similarity index 95%
rename from apps/carbon/app/interfaces/Purchasing/types.ts
rename to apps/carbon/app/modules/purchasing/types.ts
index a166ca66ca..694a1ea4a4 100644
--- a/apps/carbon/app/interfaces/Purchasing/types.ts
+++ b/apps/carbon/app/modules/purchasing/types.ts
@@ -4,7 +4,7 @@ import type {
getSuppliers,
getSupplierStatuses,
getSupplierTypes,
-} from "~/services/purchasing";
+} from "./services";
export type Supplier = NonNullable<
Awaited<ReturnType<typeof getSuppliers>>["data"]
diff --git a/apps/carbon/app/modules/resources/index.ts b/apps/carbon/app/modules/resources/index.ts
new file mode 100644
index 0000000000..684aed031a
--- /dev/null
+++ b/apps/carbon/app/modules/resources/index.ts
@@ -0,0 +1,3 @@
+export * from "./services";
+export * from "./interfaces";
+export * from "./types";
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTable/AbilitiesTable.tsx b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilitiesTable/AbilitiesTable.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTable/AbilitiesTable.tsx
rename to apps/carbon/app/modules/resources/interfaces/Abilities/AbilitiesTable/AbilitiesTable.tsx
index c464d44590..ef1eae292b 100644
--- a/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTable/AbilitiesTable.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilitiesTable/AbilitiesTable.tsx
@@ -7,7 +7,7 @@ import { IoMdTrash } from "react-icons/io";
import { Avatar } from "~/components";
import { Table } from "~/components";
import { usePermissions } from "~/hooks";
-import type { Abilities, AbilityDatum } from "~/interfaces/Resources/types";
+import type { Abilities, AbilityDatum } from "~/modules/resources";
import AbilityChart from "../AbilityChart";
type AbilitiesTableProps = {
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTable/index.ts b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilitiesTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTable/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Abilities/AbilitiesTable/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx
rename to apps/carbon/app/modules/resources/interfaces/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx
index 1bcb39f251..e0d9d84e76 100644
--- a/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilitiesTableFilters/AbilitiesTableFilters.tsx
@@ -24,7 +24,7 @@ const AbilitiesTableFilters = () => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
</HStack>
<HStack spacing={2}>
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTableFilters/index.ts b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilitiesTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Abilities/AbilitiesTableFilters/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Abilities/AbilitiesTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityChart/AbilityChart.tsx b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilityChart/AbilityChart.tsx
similarity index 99%
rename from apps/carbon/app/interfaces/Resources/Abilities/AbilityChart/AbilityChart.tsx
rename to apps/carbon/app/modules/resources/interfaces/Abilities/AbilityChart/AbilityChart.tsx
index b70d4fc8a9..4a50d8d926 100644
--- a/apps/carbon/app/interfaces/Resources/Abilities/AbilityChart/AbilityChart.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilityChart/AbilityChart.tsx
@@ -8,7 +8,7 @@ import { PatternLines } from "@visx/pattern";
import { scaleLinear } from "@visx/scale";
import { AreaClosed, LinePath } from "@visx/shape";
import { useRef } from "react";
-import type { AbilityDatum } from "~/interfaces/Resources/types";
+import type { AbilityDatum } from "~/modules/resources";
type AbilityChartProps = {
data: AbilityDatum[];
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityChart/index.ts b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilityChart/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Abilities/AbilityChart/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Abilities/AbilityChart/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx
rename to apps/carbon/app/modules/resources/interfaces/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx
index c64daa1fae..38629e31cb 100644
--- a/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx
@@ -6,8 +6,8 @@ import { BsPencilSquare } from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { Avatar, Table } from "~/components";
import { usePermissions } from "~/hooks";
-import { AbilityEmployeeStatus } from "~/interfaces/Resources/types";
-import type { AbilityEmployees } from "~/interfaces/Resources/types";
+import { AbilityEmployeeStatus } from "~/modules/resources";
+import type { AbilityEmployees } from "~/modules/resources";
type AbilityEmployeeTableProps = {
employees: AbilityEmployees;
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/index.ts b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilityEmployeesTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Abilities/AbilityEmployeesTable/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/AbilityForm.tsx b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilityForm/AbilityForm.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/AbilityForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/Abilities/AbilityForm/AbilityForm.tsx
index d58920d788..50d69507d1 100644
--- a/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/AbilityForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilityForm/AbilityForm.tsx
@@ -22,7 +22,7 @@ import {
Submit,
} from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { abilityValidator } from "~/services/resources";
+import { abilityValidator } from "~/modules/resources";
import type { TypeOfValidator } from "~/types/validators";
type AbilityFormProps = {
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/index.ts b/apps/carbon/app/modules/resources/interfaces/Abilities/AbilityForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Abilities/AbilityForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx b/apps/carbon/app/modules/resources/interfaces/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx
similarity index 95%
rename from apps/carbon/app/interfaces/Resources/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx
index 11f0025674..52f0325ac8 100644
--- a/apps/carbon/app/interfaces/Resources/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Abilities/EmployeeAbilityForm/EmployeeAbilityForm.tsx
@@ -15,9 +15,9 @@ import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import { Employee, Hidden, Select, Slider, Submit } from "~/components/Form";
import { usePermissions } from "~/hooks";
-import type { Ability } from "~/interfaces/Resources/types";
-import { AbilityEmployeeStatus } from "~/interfaces/Resources/types";
-import { employeeAbilityValidator } from "~/services/resources";
+import type { Ability } from "~/modules/resources";
+import { AbilityEmployeeStatus } from "~/modules/resources";
+import { employeeAbilityValidator } from "~/modules/resources";
import type { TypeOfValidator } from "~/types/validators";
type EmployeeAbilityFormProps = {
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/EmployeeAbilityForm/index.ts b/apps/carbon/app/modules/resources/interfaces/Abilities/EmployeeAbilityForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Abilities/EmployeeAbilityForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Abilities/EmployeeAbilityForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Abilities/index.ts b/apps/carbon/app/modules/resources/interfaces/Abilities/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Abilities/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Abilities/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx
rename to apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx
index cf0ab76904..d79bf8d75d 100644
--- a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoriesTable/AttributesCategoriesTable.tsx
@@ -15,7 +15,7 @@ import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
import { ConfirmDelete } from "~/components/Modals";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { AttributeCategory } from "~/interfaces/Resources/types";
+import type { AttributeCategory } from "~/modules/resources";
type AttributeCategoriesTableProps = {
data: AttributeCategory[];
diff --git a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoriesTable/index.ts b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoriesTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoriesTable/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoriesTable/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoriesTableFilters/AttributeCategoriesTableFilters.tsx b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoriesTableFilters/AttributeCategoriesTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoriesTableFilters/AttributeCategoriesTableFilters.tsx
rename to apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoriesTableFilters/AttributeCategoriesTableFilters.tsx
index fb94022e29..517bd8b7d7 100644
--- a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoriesTableFilters/AttributeCategoriesTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoriesTableFilters/AttributeCategoriesTableFilters.tsx
@@ -24,7 +24,7 @@ const AttributeCategoriesTableFilters = () => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
</HStack>
<HStack spacing={2}>
diff --git a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoriesTableFilters/index.ts b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoriesTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoriesTableFilters/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoriesTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoryDetail/AttributeCategoryDetail.tsx b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoryDetail/AttributeCategoryDetail.tsx
similarity index 99%
rename from apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoryDetail/AttributeCategoryDetail.tsx
rename to apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoryDetail/AttributeCategoryDetail.tsx
index 60c2f7bc8e..e5aa1ae0b7 100644
--- a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoryDetail/AttributeCategoryDetail.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoryDetail/AttributeCategoryDetail.tsx
@@ -29,7 +29,7 @@ import { ConfirmDelete } from "~/components/Modals";
import type {
Attribute,
AttributeCategoryDetail as AttributeCategoryDetailType,
-} from "~/interfaces/Resources/types";
+} from "~/modules/resources";
import { useUrlParams } from "~/hooks";
type AttributeCategoryDetailProps = {
diff --git a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoryDetail/index.ts b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoryDetail/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoryDetail/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoryDetail/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoryForm/AttributeCategoryForm.tsx b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoryForm/AttributeCategoryForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoryForm/AttributeCategoryForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoryForm/AttributeCategoryForm.tsx
index df457d031a..58532873c1 100644
--- a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoryForm/AttributeCategoryForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoryForm/AttributeCategoryForm.tsx
@@ -13,7 +13,7 @@ import {
import { ValidatedForm } from "remix-validated-form";
import { Boolean, Input, Hidden, Submit } from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { attributeCategoryValidator } from "~/services/resources";
+import { attributeCategoryValidator } from "~/modules/resources";
import type { TypeOfValidator } from "~/types/validators";
type AttributeCategoryFormProps = {
diff --git a/apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoryForm/index.ts b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoryForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Attributes/AttributeCategoryForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Attributes/AttributeCategoryForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Attributes/AttributeForm/AttributeForm.tsx b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeForm/AttributeForm.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Resources/Attributes/AttributeForm/AttributeForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/Attributes/AttributeForm/AttributeForm.tsx
index 08a06085ba..50e19444a2 100644
--- a/apps/carbon/app/interfaces/Resources/Attributes/AttributeForm/AttributeForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeForm/AttributeForm.tsx
@@ -21,8 +21,8 @@ import {
Select,
} from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { DataType } from "~/interfaces/Users/types";
-import { attributeValidator } from "~/services/resources";
+import { attributeValidator } from "~/modules/resources";
+import { DataType } from "~/modules/users";
import type { TypeOfValidator } from "~/types/validators";
import { mapRowsToOptions } from "~/utils/form";
diff --git a/apps/carbon/app/interfaces/Resources/Attributes/AttributeForm/index.ts b/apps/carbon/app/modules/resources/interfaces/Attributes/AttributeForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Attributes/AttributeForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Attributes/AttributeForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Attributes/index.ts b/apps/carbon/app/modules/resources/interfaces/Attributes/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Attributes/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Attributes/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Departments/DepartmentForm/DepartmentForm.tsx b/apps/carbon/app/modules/resources/interfaces/Departments/DepartmentForm/DepartmentForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/Departments/DepartmentForm/DepartmentForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/Departments/DepartmentForm/DepartmentForm.tsx
index 77667c0c6f..9deda10204 100644
--- a/apps/carbon/app/interfaces/Resources/Departments/DepartmentForm/DepartmentForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Departments/DepartmentForm/DepartmentForm.tsx
@@ -14,7 +14,7 @@ import { useNavigate } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Color, Department, Hidden, Input, Submit } from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { departmentValidator } from "~/services/resources";
+import { departmentValidator } from "~/modules/resources";
import type { TypeOfValidator } from "~/types/validators";
type DepartmentFormProps = {
diff --git a/apps/carbon/app/interfaces/Resources/Departments/DepartmentForm/index.ts b/apps/carbon/app/modules/resources/interfaces/Departments/DepartmentForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Departments/DepartmentForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Departments/DepartmentForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Departments/DepartmentsTable/DepartmentsTable.tsx b/apps/carbon/app/modules/resources/interfaces/Departments/DepartmentsTable/DepartmentsTable.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/Departments/DepartmentsTable/DepartmentsTable.tsx
rename to apps/carbon/app/modules/resources/interfaces/Departments/DepartmentsTable/DepartmentsTable.tsx
index 9966d79751..73a0e5e282 100644
--- a/apps/carbon/app/interfaces/Resources/Departments/DepartmentsTable/DepartmentsTable.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Departments/DepartmentsTable/DepartmentsTable.tsx
@@ -6,7 +6,7 @@ import { BsPencilSquare } from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { Department } from "~/interfaces/Resources/types";
+import type { Department } from "~/modules/resources";
type DepartmentsTableProps = {
data: Department[];
diff --git a/apps/carbon/app/interfaces/Resources/Departments/DepartmentsTable/index.ts b/apps/carbon/app/modules/resources/interfaces/Departments/DepartmentsTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Departments/DepartmentsTable/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Departments/DepartmentsTable/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Departments/DepartmentsTableFilters/DepartmentsTableFilters.tsx b/apps/carbon/app/modules/resources/interfaces/Departments/DepartmentsTableFilters/DepartmentsTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Resources/Departments/DepartmentsTableFilters/DepartmentsTableFilters.tsx
rename to apps/carbon/app/modules/resources/interfaces/Departments/DepartmentsTableFilters/DepartmentsTableFilters.tsx
index 76af94cf46..d5896328d2 100644
--- a/apps/carbon/app/interfaces/Resources/Departments/DepartmentsTableFilters/DepartmentsTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Departments/DepartmentsTableFilters/DepartmentsTableFilters.tsx
@@ -25,7 +25,7 @@ const DepartmentsTableFilters = () => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
</HStack>
<HStack spacing={2}>
diff --git a/apps/carbon/app/interfaces/Resources/Departments/DepartmentsTableFilters/index.ts b/apps/carbon/app/modules/resources/interfaces/Departments/DepartmentsTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Departments/DepartmentsTableFilters/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Departments/DepartmentsTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Departments/index.ts b/apps/carbon/app/modules/resources/interfaces/Departments/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Departments/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Departments/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentForm/EquipmentForm.tsx b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentForm/EquipmentForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/Equipment/EquipmentForm/EquipmentForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentForm/EquipmentForm.tsx
index 7231dbcf2f..41ffa71ecd 100644
--- a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentForm/EquipmentForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentForm/EquipmentForm.tsx
@@ -26,8 +26,8 @@ import {
TextArea,
} from "~/components/Form";
import { usePermissions } from "~/hooks";
-import type { getWorkCellList } from "~/services/resources";
-import { equipmentValidator } from "~/services/resources";
+import type { getWorkCellList } from "~/modules/resources";
+import { equipmentValidator } from "~/modules/resources";
import type { TypeOfValidator } from "~/types/validators";
import { mapRowsToOptions } from "~/utils/form";
diff --git a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentForm/index.ts b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Equipment/EquipmentForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypeDetail/EquipmentTypeDetail.tsx b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypeDetail/EquipmentTypeDetail.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypeDetail/EquipmentTypeDetail.tsx
rename to apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypeDetail/EquipmentTypeDetail.tsx
index 28c4ebf86a..a49e1cf97a 100644
--- a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypeDetail/EquipmentTypeDetail.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypeDetail/EquipmentTypeDetail.tsx
@@ -20,7 +20,7 @@ import { useState } from "react";
import { BsPencilSquare } from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { ConfirmDelete } from "~/components/Modals";
-import type { EquipmentTypeDetail as EquipmentTypeDetailType } from "~/interfaces/Resources/types";
+import type { EquipmentTypeDetail as EquipmentTypeDetailType } from "~/modules/resources";
import { useUrlParams } from "~/hooks";
type Equipment = {
diff --git a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypeDetail/index.ts b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypeDetail/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypeDetail/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypeDetail/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypeForm/EquipmentTypeForm.tsx b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypeForm/EquipmentTypeForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypeForm/EquipmentTypeForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypeForm/EquipmentTypeForm.tsx
index 2663858ac3..23983e0375 100644
--- a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypeForm/EquipmentTypeForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypeForm/EquipmentTypeForm.tsx
@@ -20,7 +20,7 @@ import {
Ability,
} from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { equipmentTypeValidator } from "~/services/resources";
+import { equipmentTypeValidator } from "~/modules/resources";
import type { TypeOfValidator } from "~/types/validators";
type EquipmentTypeFormProps = {
diff --git a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypeForm/index.ts b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypeForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypeForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypeForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx
rename to apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx
index 4c6ee53770..e7a49c3bb4 100644
--- a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypesTable/EquipmentTypesTable.tsx
@@ -23,7 +23,7 @@ import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
import { ConfirmDelete } from "~/components/Modals";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { EquipmentType } from "~/interfaces/Resources/types";
+import type { EquipmentType } from "~/modules/resources";
type EquipmentTypesTableProps = {
data: EquipmentType[];
diff --git a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypesTable/index.ts b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypesTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypesTable/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypesTable/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypesTableFilters/EquipmentTypesTableFilters.tsx b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypesTableFilters/EquipmentTypesTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypesTableFilters/EquipmentTypesTableFilters.tsx
rename to apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypesTableFilters/EquipmentTypesTableFilters.tsx
index ec456557ad..15dd588a40 100644
--- a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypesTableFilters/EquipmentTypesTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypesTableFilters/EquipmentTypesTableFilters.tsx
@@ -24,7 +24,7 @@ const EquipmentTypesTableFilters = () => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
</HStack>
<HStack spacing={2}>
diff --git a/apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypesTableFilters/index.ts b/apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypesTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Equipment/EquipmentTypesTableFilters/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Equipment/EquipmentTypesTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Equipment/index.ts b/apps/carbon/app/modules/resources/interfaces/Equipment/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Equipment/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Equipment/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Holidays/HolidayForm/HolidayForm.tsx b/apps/carbon/app/modules/resources/interfaces/Holidays/HolidayForm/HolidayForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/Holidays/HolidayForm/HolidayForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/Holidays/HolidayForm/HolidayForm.tsx
index aa1e504970..e86258927e 100644
--- a/apps/carbon/app/interfaces/Resources/Holidays/HolidayForm/HolidayForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Holidays/HolidayForm/HolidayForm.tsx
@@ -14,7 +14,7 @@ import { useNavigate } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { DatePicker, Hidden, Input, Submit } from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { holidayValidator } from "~/services/resources";
+import { holidayValidator } from "~/modules/resources";
import type { TypeOfValidator } from "~/types/validators";
type HolidayFormProps = {
diff --git a/apps/carbon/app/interfaces/Resources/Holidays/HolidayForm/index.ts b/apps/carbon/app/modules/resources/interfaces/Holidays/HolidayForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Holidays/HolidayForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Holidays/HolidayForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Holidays/HolidaysTable/HolidaysTable.tsx b/apps/carbon/app/modules/resources/interfaces/Holidays/HolidaysTable/HolidaysTable.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/Holidays/HolidaysTable/HolidaysTable.tsx
rename to apps/carbon/app/modules/resources/interfaces/Holidays/HolidaysTable/HolidaysTable.tsx
index a0e2e9d5bd..dbe53ec2de 100644
--- a/apps/carbon/app/interfaces/Resources/Holidays/HolidaysTable/HolidaysTable.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Holidays/HolidaysTable/HolidaysTable.tsx
@@ -6,7 +6,7 @@ import { BsPencilSquare } from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { Holiday } from "~/interfaces/Resources/types";
+import type { Holiday } from "~/modules/resources";
type HolidaysTableProps = {
data: Holiday[];
diff --git a/apps/carbon/app/interfaces/Resources/Holidays/HolidaysTable/index.ts b/apps/carbon/app/modules/resources/interfaces/Holidays/HolidaysTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Holidays/HolidaysTable/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Holidays/HolidaysTable/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Holidays/HolidaysTableFilters/HolidaysTableFilters.tsx b/apps/carbon/app/modules/resources/interfaces/Holidays/HolidaysTableFilters/HolidaysTableFilters.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Resources/Holidays/HolidaysTableFilters/HolidaysTableFilters.tsx
rename to apps/carbon/app/modules/resources/interfaces/Holidays/HolidaysTableFilters/HolidaysTableFilters.tsx
index b7302c6cf1..322ccfad39 100644
--- a/apps/carbon/app/interfaces/Resources/Holidays/HolidaysTableFilters/HolidaysTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Holidays/HolidaysTableFilters/HolidaysTableFilters.tsx
@@ -34,7 +34,7 @@ const HolidaysTableFilters = ({ years }: HolidaysTableFiltersProps) => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
<Select
// @ts-ignore
diff --git a/apps/carbon/app/interfaces/Resources/Holidays/HolidaysTableFilters/index.ts b/apps/carbon/app/modules/resources/interfaces/Holidays/HolidaysTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Holidays/HolidaysTableFilters/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Holidays/HolidaysTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Holidays/index.ts b/apps/carbon/app/modules/resources/interfaces/Holidays/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Holidays/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Holidays/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationForm/LocationForm.tsx b/apps/carbon/app/modules/resources/interfaces/Locations/LocationForm/LocationForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/Locations/LocationForm/LocationForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/Locations/LocationForm/LocationForm.tsx
index cd1bd97e47..05338bc67e 100644
--- a/apps/carbon/app/interfaces/Resources/Locations/LocationForm/LocationForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Locations/LocationForm/LocationForm.tsx
@@ -14,7 +14,7 @@ import { useNavigate } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Hidden, Input, Number, Submit, Timezone } from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { locationValidator } from "~/services/resources";
+import { locationValidator } from "~/modules/resources";
import type { TypeOfValidator } from "~/types/validators";
type LocationFormProps = {
diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationForm/index.ts b/apps/carbon/app/modules/resources/interfaces/Locations/LocationForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Locations/LocationForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Locations/LocationForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationsTable/LocationsTable.tsx b/apps/carbon/app/modules/resources/interfaces/Locations/LocationsTable/LocationsTable.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/Locations/LocationsTable/LocationsTable.tsx
rename to apps/carbon/app/modules/resources/interfaces/Locations/LocationsTable/LocationsTable.tsx
index 81636a9602..52db75f2e9 100644
--- a/apps/carbon/app/interfaces/Resources/Locations/LocationsTable/LocationsTable.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Locations/LocationsTable/LocationsTable.tsx
@@ -6,7 +6,7 @@ import { BsPencilSquare } from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { ShiftLocation } from "~/interfaces/Resources/types";
+import type { ShiftLocation } from "~/modules/resources";
type LocationsTableProps = {
data: ShiftLocation[];
diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationsTable/index.ts b/apps/carbon/app/modules/resources/interfaces/Locations/LocationsTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Locations/LocationsTable/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Locations/LocationsTable/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationsTableFilters/LocationsTableFilters.tsx b/apps/carbon/app/modules/resources/interfaces/Locations/LocationsTableFilters/LocationsTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Resources/Locations/LocationsTableFilters/LocationsTableFilters.tsx
rename to apps/carbon/app/modules/resources/interfaces/Locations/LocationsTableFilters/LocationsTableFilters.tsx
index 358a9d0181..9d75eca64c 100644
--- a/apps/carbon/app/interfaces/Resources/Locations/LocationsTableFilters/LocationsTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Locations/LocationsTableFilters/LocationsTableFilters.tsx
@@ -25,7 +25,7 @@ const LocationsTableFilters = () => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
</HStack>
<HStack spacing={2}>
diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationsTableFilters/index.ts b/apps/carbon/app/modules/resources/interfaces/Locations/LocationsTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Locations/LocationsTableFilters/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Locations/LocationsTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Locations/index.ts b/apps/carbon/app/modules/resources/interfaces/Locations/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Locations/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Locations/index.ts
diff --git a/apps/carbon/app/modules/resources/interfaces/Partners/PartnerForm/PartnerForm.tsx b/apps/carbon/app/modules/resources/interfaces/Partners/PartnerForm/PartnerForm.tsx
new file mode 100644
index 0000000000..27e02b8722
--- /dev/null
+++ b/apps/carbon/app/modules/resources/interfaces/Partners/PartnerForm/PartnerForm.tsx
@@ -0,0 +1,81 @@
+import {
+ Button,
+ Drawer,
+ DrawerBody,
+ DrawerCloseButton,
+ DrawerContent,
+ DrawerFooter,
+ DrawerHeader,
+ DrawerOverlay,
+ HStack,
+ VStack,
+} from "@chakra-ui/react";
+import { useNavigate } from "@remix-run/react";
+import { ValidatedForm } from "remix-validated-form";
+import { Number, Submit, Supplier } from "~/components/Form";
+import { usePermissions } from "~/hooks";
+import { partnerValidator } from "~/modules/resources";
+import type { TypeOfValidator } from "~/types/validators";
+
+type SupplierFormProps = {
+ initialValues: TypeOfValidator<typeof partnerValidator>;
+};
+
+const SupplierForm = ({ initialValues }: SupplierFormProps) => {
+ const permissions = usePermissions();
+ const navigate = useNavigate();
+ const onClose = () => navigate(-1);
+
+ const isEditing = initialValues.id !== "";
+ const isDisabled = isEditing
+ ? !permissions.can("update", "resources")
+ : !permissions.can("create", "resources");
+
+ return (
+ <Drawer onClose={onClose} isOpen={true} size="sm">
+ <ValidatedForm
+ validator={partnerValidator}
+ method="post"
+ action={
+ isEditing
+ ? `/x/resources/partners/${initialValues.id}`
+ : "/x/resources/partners/new"
+ }
+ defaultValues={initialValues}
+ >
+ <DrawerOverlay />
+ <DrawerContent>
+ <DrawerCloseButton />
+ <DrawerHeader>{isEditing ? "Edit" : "New"} Supplier</DrawerHeader>
+ <DrawerBody pb={8}>
+ <VStack spacing={4} alignItems="start">
+ <Supplier name="id" label="Supplier" />
+ <Number
+ name="hoursPerWeek"
+ label="Hours per Week"
+ helperText="The number of hours per week the supplier is available to work."
+ min={0}
+ max={10000}
+ />
+ </VStack>
+ </DrawerBody>
+ <DrawerFooter>
+ <HStack spacing={2}>
+ <Submit isDisabled={isDisabled}>Save</Submit>
+ <Button
+ size="md"
+ colorScheme="gray"
+ variant="solid"
+ onClick={onClose}
+ >
+ Cancel
+ </Button>
+ </HStack>
+ </DrawerFooter>
+ </DrawerContent>
+ </ValidatedForm>
+ </Drawer>
+ );
+};
+
+export default SupplierForm;
diff --git a/apps/carbon/app/modules/resources/interfaces/Partners/PartnerForm/index.ts b/apps/carbon/app/modules/resources/interfaces/Partners/PartnerForm/index.ts
new file mode 100644
index 0000000000..14124cdb70
--- /dev/null
+++ b/apps/carbon/app/modules/resources/interfaces/Partners/PartnerForm/index.ts
@@ -0,0 +1,3 @@
+import PartnerForm from "./PartnerForm";
+
+export default PartnerForm;
diff --git a/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTable/PartnersTable.tsx b/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTable/PartnersTable.tsx
new file mode 100644
index 0000000000..9bb5651549
--- /dev/null
+++ b/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTable/PartnersTable.tsx
@@ -0,0 +1,101 @@
+import { Avatar, HStack, Link, MenuItem } from "@chakra-ui/react";
+import { useNavigate } from "@remix-run/react";
+import type { ColumnDef } from "@tanstack/react-table";
+import { memo, useCallback, useMemo } from "react";
+import { BsPencilSquare } from "react-icons/bs";
+import { IoMdTrash } from "react-icons/io";
+import { Table } from "~/components";
+import { usePermissions, useUrlParams } from "~/hooks";
+import type { Partner } from "~/modules/resources";
+
+type PartnersTableProps = {
+ data: Partner[];
+ count: number;
+};
+
+const PartnersTable = memo(({ data, count }: PartnersTableProps) => {
+ const navigate = useNavigate();
+ const permissions = usePermissions();
+ const [params] = useUrlParams();
+
+ const rows = data.map((row) => {
+ if (Array.isArray(row.supplier)) {
+ return {
+ ...row,
+ supplierName: row.supplier[0].name,
+ };
+ }
+ return {
+ ...row,
+ supplierName: row.supplier?.name,
+ };
+ });
+
+ const columns = useMemo<ColumnDef<typeof rows[number]>[]>(() => {
+ return [
+ {
+ accessorKey: "supplier",
+ header: "Supplier",
+ cell: ({ row }) => (
+ <HStack spacing={2}>
+ <Avatar size="sm" name={row.original.supplierName} />
+
+ <Link
+ onClick={() => {
+ navigate(`/x/purchasing/suppliers/${row?.original.id}`);
+ }}
+ >
+ {row.original.supplierName}
+ </Link>
+ </HStack>
+ ),
+ },
+ {
+ accessorKey: "hoursPerWeek",
+ header: "Hours per Week",
+ cell: (item) => item.getValue(),
+ },
+ ];
+ }, [navigate]);
+
+ const renderContextMenu = useCallback(
+ (row: typeof rows[number]) => {
+ return (
+ <>
+ <MenuItem
+ icon={<BsPencilSquare />}
+ onClick={() => {
+ navigate(`/x/resources/partners/${row.id}?${params.toString()}`);
+ }}
+ >
+ Edit Partner
+ </MenuItem>
+ <MenuItem
+ isDisabled={!permissions.can("delete", "resources")}
+ icon={<IoMdTrash />}
+ onClick={() => {
+ navigate(
+ `/x/resources/partners/delete/${row.id}?${params.toString()}`
+ );
+ }}
+ >
+ Delete Partner
+ </MenuItem>
+ </>
+ );
+ },
+ [navigate, params, permissions]
+ );
+
+ return (
+ <Table<typeof rows[number]>
+ data={rows}
+ count={count}
+ columns={columns}
+ renderContextMenu={renderContextMenu}
+ />
+ );
+});
+
+PartnersTable.displayName = "PartnersTable";
+export default PartnersTable;
diff --git a/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTable/index.ts b/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTable/index.ts
new file mode 100644
index 0000000000..082843e88e
--- /dev/null
+++ b/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTable/index.ts
@@ -0,0 +1,3 @@
+import PartnersTable from "./PartnersTable";
+
+export default PartnersTable;
diff --git a/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTableFilters/PartnersTableFilters.tsx b/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTableFilters/PartnersTableFilters.tsx
new file mode 100644
index 0000000000..f232e137d9
--- /dev/null
+++ b/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTableFilters/PartnersTableFilters.tsx
@@ -0,0 +1,47 @@
+import { useColor } from "@carbon/react";
+import { Button, HStack } from "@chakra-ui/react";
+import { Link } from "@remix-run/react";
+import { IoMdAdd } from "react-icons/io";
+import { DebouncedInput } from "~/components/Search";
+import { usePermissions, useUrlParams } from "~/hooks";
+
+const LocationsTableFilters = () => {
+ const [params] = useUrlParams();
+ const permissions = usePermissions();
+ const borderColor = useColor("gray.200");
+
+ return (
+ <HStack
+ borderBottomColor={borderColor}
+ borderBottomStyle="solid"
+ borderBottomWidth={1}
+ justifyContent="space-between"
+ px={4}
+ py={3}
+ w="full"
+ >
+ <HStack spacing={2}>
+ <DebouncedInput
+ param="name"
+ size="sm"
+ minW={180}
+ placeholder="Filter by name"
+ />
+ </HStack>
+ <HStack spacing={2}>
+ {permissions.can("create", "resources") && (
+ <Button
+ as={Link}
+ to={`new?${params.toString()}`}
+ colorScheme="brand"
+ leftIcon={<IoMdAdd />}
+ >
+ New Partner
+ </Button>
+ )}
+ </HStack>
+ </HStack>
+ );
+};
+
+export default LocationsTableFilters;
diff --git a/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTableFilters/index.ts b/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTableFilters/index.ts
new file mode 100644
index 0000000000..2b1d86f2c2
--- /dev/null
+++ b/apps/carbon/app/modules/resources/interfaces/Partners/PartnersTableFilters/index.ts
@@ -0,0 +1,3 @@
+import PartnersTableFilters from "./PartnersTableFilters";
+
+export default PartnersTableFilters;
diff --git a/apps/carbon/app/modules/resources/interfaces/Partners/index.ts b/apps/carbon/app/modules/resources/interfaces/Partners/index.ts
new file mode 100644
index 0000000000..0ec638805b
--- /dev/null
+++ b/apps/carbon/app/modules/resources/interfaces/Partners/index.ts
@@ -0,0 +1,5 @@
+import PartnersTable from "./PartnersTable";
+import PartnersTableFilters from "./PartnersTableFilters";
+import PartnerForm from "./PartnerForm";
+
+export { PartnersTable, PartnersTableFilters, PartnerForm };
diff --git a/apps/carbon/app/interfaces/Resources/People/PeopleTable/PeopleTable.tsx b/apps/carbon/app/modules/resources/interfaces/People/PeopleTable/PeopleTable.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Resources/People/PeopleTable/PeopleTable.tsx
rename to apps/carbon/app/modules/resources/interfaces/People/PeopleTable/PeopleTable.tsx
index 846bdaa095..5e5d15107a 100644
--- a/apps/carbon/app/interfaces/Resources/People/PeopleTable/PeopleTable.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/People/PeopleTable/PeopleTable.tsx
@@ -5,8 +5,8 @@ import { memo, useCallback, useMemo } from "react";
import { BsPencilSquare } from "react-icons/bs";
import { Avatar, Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { AttributeCategory, Person } from "~/interfaces/Resources/types";
-import { DataType } from "~/interfaces/Users/types";
+import type { AttributeCategory, Person } from "~/modules/resources";
+import { DataType } from "~/modules/users";
type PeopleTableProps = {
attributeCategories: AttributeCategory[];
diff --git a/apps/carbon/app/interfaces/Resources/People/PeopleTable/index.ts b/apps/carbon/app/modules/resources/interfaces/People/PeopleTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/People/PeopleTable/index.ts
rename to apps/carbon/app/modules/resources/interfaces/People/PeopleTable/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/People/PeopleTableFilters/PeopleTableFilters.tsx b/apps/carbon/app/modules/resources/interfaces/People/PeopleTableFilters/PeopleTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Resources/People/PeopleTableFilters/PeopleTableFilters.tsx
rename to apps/carbon/app/modules/resources/interfaces/People/PeopleTableFilters/PeopleTableFilters.tsx
index 873db8f553..90612c592f 100644
--- a/apps/carbon/app/interfaces/Resources/People/PeopleTableFilters/PeopleTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/People/PeopleTableFilters/PeopleTableFilters.tsx
@@ -4,7 +4,7 @@ import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { EmployeeType } from "~/interfaces/Users/types";
+import type { EmployeeType } from "~/modules/users";
import { mapRowsToOptions } from "~/utils/form";
type PeopleTableFiltersProps = {
@@ -37,7 +37,7 @@ const PeopleTableFilters = ({ employeeTypes }: PeopleTableFiltersProps) => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
<Select
// @ts-ignore
diff --git a/apps/carbon/app/interfaces/Resources/People/PeopleTableFilters/index.ts b/apps/carbon/app/modules/resources/interfaces/People/PeopleTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/People/PeopleTableFilters/index.ts
rename to apps/carbon/app/modules/resources/interfaces/People/PeopleTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/People/index.ts b/apps/carbon/app/modules/resources/interfaces/People/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/People/index.ts
rename to apps/carbon/app/modules/resources/interfaces/People/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonAbilities/PersonAbilities.tsx b/apps/carbon/app/modules/resources/interfaces/Person/PersonAbilities/PersonAbilities.tsx
similarity index 94%
rename from apps/carbon/app/interfaces/Resources/Person/PersonAbilities/PersonAbilities.tsx
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonAbilities/PersonAbilities.tsx
index b0505ed881..b6dbc11dfd 100644
--- a/apps/carbon/app/interfaces/Resources/Person/PersonAbilities/PersonAbilities.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Person/PersonAbilities/PersonAbilities.tsx
@@ -18,9 +18,9 @@ import type { IconType } from "react-icons";
import { BsCheckLg, BsBarChartFill } from "react-icons/bs";
import { FaThumbsUp } from "react-icons/fa";
-import type { EmployeeAbility } from "~/interfaces/Resources/types";
-import { getTrainingStatus } from "~/interfaces/Resources/types";
-import { AbilityEmployeeStatus } from "~/interfaces/Resources/types";
+import type { EmployeeAbility } from "~/modules/resources";
+import { getTrainingStatus } from "~/modules/resources";
+import { AbilityEmployeeStatus } from "~/modules/resources";
type PersonAbilitiesProps = {
abilities: EmployeeAbility[];
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonAbilities/index.ts b/apps/carbon/app/modules/resources/interfaces/Person/PersonAbilities/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Person/PersonAbilities/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonAbilities/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonDaysOff/PersonDaysOff.tsx b/apps/carbon/app/modules/resources/interfaces/Person/PersonDaysOff/PersonDaysOff.tsx
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Person/PersonDaysOff/PersonDaysOff.tsx
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonDaysOff/PersonDaysOff.tsx
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonDaysOff/index.ts b/apps/carbon/app/modules/resources/interfaces/Person/PersonDaysOff/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Person/PersonDaysOff/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonDaysOff/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonHeader/PersonHeader.tsx b/apps/carbon/app/modules/resources/interfaces/Person/PersonHeader/PersonHeader.tsx
similarity index 94%
rename from apps/carbon/app/interfaces/Resources/Person/PersonHeader/PersonHeader.tsx
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonHeader/PersonHeader.tsx
index c6fa603bfa..8c3f67d827 100644
--- a/apps/carbon/app/interfaces/Resources/Person/PersonHeader/PersonHeader.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Person/PersonHeader/PersonHeader.tsx
@@ -2,7 +2,7 @@ import { Button, Heading, HStack, Text, VStack } from "@chakra-ui/react";
import { BsEnvelopeFill } from "react-icons/bs";
import { Avatar } from "~/components";
import { usePermissions } from "~/hooks";
-import type { Account } from "~/interfaces/Account/types";
+import type { Account } from "~/modules/account";
const PersonHeader = ({ user }: { user: Account }) => {
const permissions = usePermissions();
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonHeader/index.ts b/apps/carbon/app/modules/resources/interfaces/Person/PersonHeader/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Person/PersonHeader/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonHeader/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonJob/PersonJob.tsx b/apps/carbon/app/modules/resources/interfaces/Person/PersonJob/PersonJob.tsx
similarity index 90%
rename from apps/carbon/app/interfaces/Resources/Person/PersonJob/PersonJob.tsx
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonJob/PersonJob.tsx
index d39d3ac441..5ce0615457 100644
--- a/apps/carbon/app/interfaces/Resources/Person/PersonJob/PersonJob.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Person/PersonJob/PersonJob.tsx
@@ -9,11 +9,18 @@ import {
import { useFetcher } from "@remix-run/react";
import { useEffect, useMemo, useState } from "react";
import { useControlField, useField, ValidatedForm } from "remix-validated-form";
-import { Employee, Hidden, Input, Location, Submit } from "~/components/Form";
+import {
+ DatePicker,
+ Employee,
+ Hidden,
+ Input,
+ Location,
+ Submit,
+} from "~/components/Form";
import { SectionTitle } from "~/components/Layout";
-import type { EmployeeJob } from "~/interfaces/Resources/types";
-import type { getShiftsList } from "~/services/resources";
-import { employeeJobValidator } from "~/services/resources";
+import type { EmployeeJob } from "~/modules/resources";
+import type { getShiftsList } from "~/modules/resources";
+import { employeeJobValidator } from "~/modules/resources";
import { mapRowsToOptions } from "~/utils/form";
type PersonJobProps = {
@@ -60,6 +67,7 @@ const PersonJob = ({ job }: PersonJobProps) => {
<SectionTitle title="Job" />
<VStack w="full" alignItems="start" spacing={4}>
<Input name="title" label="Title" />
+ <DatePicker name="startDate" label="Start Date" />
<Location
name="locationId"
label="Location"
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonJob/index.ts b/apps/carbon/app/modules/resources/interfaces/Person/PersonJob/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Person/PersonJob/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonJob/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonNotes/PersonNotes.tsx b/apps/carbon/app/modules/resources/interfaces/Person/PersonNotes/PersonNotes.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Resources/Person/PersonNotes/PersonNotes.tsx
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonNotes/PersonNotes.tsx
index ad63b529c9..ad06513103 100644
--- a/apps/carbon/app/interfaces/Resources/Person/PersonNotes/PersonNotes.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Person/PersonNotes/PersonNotes.tsx
@@ -16,8 +16,8 @@ import { Avatar } from "~/components";
import { RichText, Submit } from "~/components/Form";
import { SectionTitle } from "~/components/Layout";
import { usePermissions, useUser } from "~/hooks";
-import type { Note } from "~/interfaces/Resources/types";
-import { noteValidator } from "~/services/resources";
+import type { Note } from "~/modules/resources";
+import { noteValidator } from "~/modules/resources";
type PersonNoteProps = {
notes: Note[];
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonNotes/index.ts b/apps/carbon/app/modules/resources/interfaces/Person/PersonNotes/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Person/PersonNotes/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonNotes/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonOvertime/PersonOvertime.tsx b/apps/carbon/app/modules/resources/interfaces/Person/PersonOvertime/PersonOvertime.tsx
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Person/PersonOvertime/PersonOvertime.tsx
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonOvertime/PersonOvertime.tsx
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonOvertime/index.ts b/apps/carbon/app/modules/resources/interfaces/Person/PersonOvertime/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Person/PersonOvertime/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonOvertime/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonTabs/PersonTabs.tsx b/apps/carbon/app/modules/resources/interfaces/Person/PersonTabs/PersonTabs.tsx
similarity index 85%
rename from apps/carbon/app/interfaces/Resources/Person/PersonTabs/PersonTabs.tsx
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonTabs/PersonTabs.tsx
index 1d1ff9ad71..c1e84ac2c6 100644
--- a/apps/carbon/app/interfaces/Resources/Person/PersonTabs/PersonTabs.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Person/PersonTabs/PersonTabs.tsx
@@ -11,15 +11,11 @@ import {
} from "@chakra-ui/react";
import { BiLockAlt } from "react-icons/bi";
import { SectionTitle } from "~/components/Layout";
-import { ProfileForm } from "~/interfaces/Account/Profile";
-import type {
- PublicAttributes,
- PrivateAttributes,
-} from "~/interfaces/Account/types";
-import { UserAttributesForm } from "~/interfaces/Account/UserAttributes";
-import type { User } from "~/interfaces/Users/types";
-import { PersonJob, PersonNotes } from "~/interfaces/Resources/Person";
-import type { EmployeeJob, Note } from "~/interfaces/Resources/types";
+import { ProfileForm, UserAttributesForm } from "~/modules/account";
+import type { PublicAttributes, PrivateAttributes } from "~/modules/account";
+import { PersonJob, PersonNotes } from "~/modules/resources";
+import type { EmployeeJob, Note } from "~/modules/resources";
+import type { User } from "~/modules/users";
type PersonTabsProps = {
user: User;
diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonTabs/index.ts b/apps/carbon/app/modules/resources/interfaces/Person/PersonTabs/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Person/PersonTabs/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Person/PersonTabs/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Person/index.ts b/apps/carbon/app/modules/resources/interfaces/Person/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Person/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Person/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftForm/ShiftForm.tsx b/apps/carbon/app/modules/resources/interfaces/Shifts/ShiftForm/ShiftForm.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Resources/Shifts/ShiftForm/ShiftForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/Shifts/ShiftForm/ShiftForm.tsx
index cb4aa2b26d..10f2941f36 100644
--- a/apps/carbon/app/interfaces/Resources/Shifts/ShiftForm/ShiftForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Shifts/ShiftForm/ShiftForm.tsx
@@ -23,7 +23,7 @@ import {
TimePicker,
} from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { shiftValidator } from "~/services/resources";
+import { shiftValidator } from "~/modules/resources";
import type { TypeOfValidator } from "~/types/validators";
type ShiftFormProps = {
diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftForm/index.ts b/apps/carbon/app/modules/resources/interfaces/Shifts/ShiftForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Shifts/ShiftForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Shifts/ShiftForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTable/ShiftsTable.tsx b/apps/carbon/app/modules/resources/interfaces/Shifts/ShiftsTable/ShiftsTable.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Resources/Shifts/ShiftsTable/ShiftsTable.tsx
rename to apps/carbon/app/modules/resources/interfaces/Shifts/ShiftsTable/ShiftsTable.tsx
index 971a39ae9e..72f700dea2 100644
--- a/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTable/ShiftsTable.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Shifts/ShiftsTable/ShiftsTable.tsx
@@ -7,7 +7,7 @@ import { IoMdTrash } from "react-icons/io";
import { Avatar } from "~/components";
import { Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { Shift } from "~/interfaces/Resources/types";
+import type { Shift } from "~/modules/resources";
type ShiftsTableProps = {
data: Shift[];
diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTable/index.ts b/apps/carbon/app/modules/resources/interfaces/Shifts/ShiftsTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Shifts/ShiftsTable/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Shifts/ShiftsTable/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx b/apps/carbon/app/modules/resources/interfaces/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx
similarity index 94%
rename from apps/carbon/app/interfaces/Resources/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx
rename to apps/carbon/app/modules/resources/interfaces/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx
index bcbd90cf02..7197dff398 100644
--- a/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx
@@ -4,7 +4,7 @@ import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { ShiftLocation } from "~/interfaces/Resources/types";
+import type { ShiftLocation } from "~/modules/resources";
import { mapRowsToOptions } from "~/utils/form";
type ShiftsTableFiltersProps = {
@@ -35,7 +35,7 @@ const ShiftsTableFilters = ({ locations }: ShiftsTableFiltersProps) => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
<Select
// @ts-ignore
diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTableFilters/index.ts b/apps/carbon/app/modules/resources/interfaces/Shifts/ShiftsTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Shifts/ShiftsTableFilters/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Shifts/ShiftsTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/Shifts/index.ts b/apps/carbon/app/modules/resources/interfaces/Shifts/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/Shifts/index.ts
rename to apps/carbon/app/modules/resources/interfaces/Shifts/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellForm/WorkCellForm.tsx b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellForm/WorkCellForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/WorkCells/WorkCellForm/WorkCellForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellForm/WorkCellForm.tsx
index afeb90b382..9d156b7345 100644
--- a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellForm/WorkCellForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellForm/WorkCellForm.tsx
@@ -22,7 +22,7 @@ import {
DatePicker,
} from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { workCellValidator } from "~/services/resources";
+import { workCellValidator } from "~/modules/resources";
import type { TypeOfValidator } from "~/types/validators";
import { mapRowsToOptions } from "~/utils/form";
diff --git a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellForm/index.ts b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/WorkCells/WorkCellForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypeDetail/WorkCellTypeDetail.tsx b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypeDetail/WorkCellTypeDetail.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypeDetail/WorkCellTypeDetail.tsx
rename to apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypeDetail/WorkCellTypeDetail.tsx
index ba2121b382..915b0e98e7 100644
--- a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypeDetail/WorkCellTypeDetail.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypeDetail/WorkCellTypeDetail.tsx
@@ -20,7 +20,7 @@ import { useState } from "react";
import { BsPencilSquare } from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { ConfirmDelete } from "~/components/Modals";
-import type { WorkCellTypeDetail as WorkCellTypeDetailType } from "~/interfaces/Resources/types";
+import type { WorkCellTypeDetailType } from "~/modules/resources";
import { useUrlParams } from "~/hooks";
type WorkCell = NonNullable<WorkCellTypeDetailType["workCell"]>;
diff --git a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypeDetail/index.ts b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypeDetail/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypeDetail/index.ts
rename to apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypeDetail/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypeForm/WorkCellTypeForm.tsx b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypeForm/WorkCellTypeForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypeForm/WorkCellTypeForm.tsx
rename to apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypeForm/WorkCellTypeForm.tsx
index 39bdb3b287..ed523a52ba 100644
--- a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypeForm/WorkCellTypeForm.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypeForm/WorkCellTypeForm.tsx
@@ -20,7 +20,7 @@ import {
Ability,
} from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { workCellTypeValidator } from "~/services/resources";
+import { workCellTypeValidator } from "~/modules/resources";
import type { TypeOfValidator } from "~/types/validators";
type WorkCellTypeFormProps = {
diff --git a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypeForm/index.ts b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypeForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypeForm/index.ts
rename to apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypeForm/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx
rename to apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx
index ec67081a6f..0113e44052 100644
--- a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypesTable/WorkCellTypesTable.tsx
@@ -23,7 +23,7 @@ import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
import { ConfirmDelete } from "~/components/Modals";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { WorkCellType } from "~/interfaces/Resources/types";
+import type { WorkCellType } from "~/modules/resources";
type WorkCellTypesTableProps = {
data: WorkCellType[];
diff --git a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypesTable/index.ts b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypesTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypesTable/index.ts
rename to apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypesTable/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypesTableFilters/WorkCellTypesTableFilters.tsx b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypesTableFilters/WorkCellTypesTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypesTableFilters/WorkCellTypesTableFilters.tsx
rename to apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypesTableFilters/WorkCellTypesTableFilters.tsx
index eeecc42819..1b0039ee35 100644
--- a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypesTableFilters/WorkCellTypesTableFilters.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypesTableFilters/WorkCellTypesTableFilters.tsx
@@ -24,7 +24,7 @@ const WorkCellTypesTableFilters = () => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
</HStack>
<HStack spacing={2}>
diff --git a/apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypesTableFilters/index.ts b/apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypesTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/WorkCells/WorkCellTypesTableFilters/index.ts
rename to apps/carbon/app/modules/resources/interfaces/WorkCells/WorkCellTypesTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Resources/WorkCells/index.ts b/apps/carbon/app/modules/resources/interfaces/WorkCells/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Resources/WorkCells/index.ts
rename to apps/carbon/app/modules/resources/interfaces/WorkCells/index.ts
diff --git a/apps/carbon/app/modules/resources/interfaces/index.ts b/apps/carbon/app/modules/resources/interfaces/index.ts
new file mode 100644
index 0000000000..bf53725be1
--- /dev/null
+++ b/apps/carbon/app/modules/resources/interfaces/index.ts
@@ -0,0 +1,14 @@
+import useResourcesSidebar from "./useResourcesSidebar";
+
+export { useResourcesSidebar };
+export * from "./Abilities";
+export * from "./Attributes";
+export * from "./Departments";
+export * from "./Equipment";
+export * from "./Holidays";
+export * from "./Locations";
+export * from "./Partners";
+export * from "./People";
+export * from "./Person";
+export * from "./Shifts";
+export * from "./WorkCells";
diff --git a/apps/carbon/app/interfaces/Resources/useResourcesSidebar.tsx b/apps/carbon/app/modules/resources/interfaces/useResourcesSidebar.tsx
similarity index 88%
rename from apps/carbon/app/interfaces/Resources/useResourcesSidebar.tsx
rename to apps/carbon/app/modules/resources/interfaces/useResourcesSidebar.tsx
index 0453c1527f..fd2bfef426 100644
--- a/apps/carbon/app/interfaces/Resources/useResourcesSidebar.tsx
+++ b/apps/carbon/app/modules/resources/interfaces/useResourcesSidebar.tsx
@@ -17,12 +17,12 @@ const resourcesRoutes: RouteGroup[] = [
to: "/x/resources/equipment",
},
{
- name: "Facilities",
- to: "/x/resources/facilities",
+ name: "Partners",
+ to: "/x/resources/partners",
},
{
- name: "Crews",
- to: "/x/resources/crews",
+ name: "Work Cells",
+ to: "/x/resources/work-cells",
},
],
},
@@ -53,10 +53,6 @@ const resourcesRoutes: RouteGroup[] = [
name: "Shifts",
to: "/x/resources/shifts",
},
- {
- name: "Work Cells",
- to: "/x/resources/work-cells",
- },
],
},
];
diff --git a/apps/carbon/app/services/resources/index.ts b/apps/carbon/app/modules/resources/services/index.ts
similarity index 100%
rename from apps/carbon/app/services/resources/index.ts
rename to apps/carbon/app/modules/resources/services/index.ts
diff --git a/apps/carbon/app/services/resources/resources.form.ts b/apps/carbon/app/modules/resources/services/resources.form.ts
similarity index 95%
rename from apps/carbon/app/services/resources/resources.form.ts
rename to apps/carbon/app/modules/resources/services/resources.form.ts
index 4bf6e5ee8d..ec9bb57f4d 100644
--- a/apps/carbon/app/services/resources/resources.form.ts
+++ b/apps/carbon/app/modules/resources/services/resources.form.ts
@@ -1,7 +1,7 @@
import { withZod } from "@remix-validated-form/with-zod";
import { z } from "zod";
import { zfd } from "zod-form-data";
-import { DataType } from "~/interfaces/Users/types";
+import { DataType } from "~/modules/users";
export const abilityValidator = withZod(
z
@@ -95,6 +95,7 @@ export const employeeAbilityValidator = withZod(
export const employeeJobValidator = withZod(
z.object({
title: z.string().min(1, { message: "Title is required" }),
+ startDate: zfd.text(z.string().optional()),
locationId: zfd.text(z.string().optional()),
shiftId: zfd.text(z.string().optional()),
managerId: zfd.text(z.string().optional()),
@@ -158,6 +159,15 @@ export const noteValidator = withZod(
})
);
+export const partnerValidator = withZod(
+ z.object({
+ id: z.string().min(36, { message: "Partner is required" }),
+ hoursPerWeek: zfd.numeric(
+ z.number().min(0, { message: "Hours are required" })
+ ),
+ })
+);
+
export const shiftValidator = withZod(
z.object({
id: zfd.text(z.string().optional()),
diff --git a/apps/carbon/app/services/resources/resources.server.ts b/apps/carbon/app/modules/resources/services/resources.server.ts
similarity index 94%
rename from apps/carbon/app/services/resources/resources.server.ts
rename to apps/carbon/app/modules/resources/services/resources.server.ts
index 04465d0acb..ab3fccc661 100644
--- a/apps/carbon/app/services/resources/resources.server.ts
+++ b/apps/carbon/app/modules/resources/services/resources.server.ts
@@ -1,7 +1,7 @@
import type { Database } from "@carbon/database";
import type { SupabaseClient } from "@supabase/supabase-js";
-import type { DataType, Employee } from "~/interfaces/Users/types";
-import { getEmployees } from "~/services/users";
+import type { DataType, Employee } from "~/modules/users";
+import { getEmployees } from "~/modules/users";
import type { GenericQueryFilters } from "~/utils/query";
import { setGenericQueryFilters } from "~/utils/query";
@@ -93,6 +93,13 @@ export async function deleteNote(
return client.from("userNote").update({ active: false }).eq("id", noteId);
}
+export async function deletePartner(
+ client: SupabaseClient<Database>,
+ partnerId: string
+) {
+ return client.from("partner").delete().eq("id", partnerId);
+}
+
export async function deleteShift(
client: SupabaseClient<Database>,
shiftId: string
@@ -322,7 +329,7 @@ export async function getEmployeeJob(
) {
return client
.from("employeeJob")
- .select("title, locationId, shiftId, managerId")
+ .select("title, locationId, shiftId, managerId, startDate")
.eq("id", employeeId)
.single();
}
@@ -334,7 +341,7 @@ export async function getEquipment(
return client
.from("equipment")
.select(
- "id, name, description, operatorsRequired, setupHours, equipmentType(id, name), workCell(id, name)"
+ "id, name, description, operatorsRequired, setupHours, equipmentType(id, name), workCell(id, name), location(id, name)"
)
.eq("id", equipmentId)
.eq("active", true)
@@ -469,6 +476,37 @@ export async function getNotes(
.order("createdAt");
}
+export async function getPartner(
+ client: SupabaseClient<Database>,
+ partnerId: string
+) {
+ return client
+ .from("partner")
+ .select(`id, hoursPerWeek, supplier(name)`)
+ .eq("id", partnerId)
+ .single();
+}
+
+export async function getPartners(
+ client: SupabaseClient<Database>,
+ args?: GenericQueryFilters & { name: string | null }
+) {
+ let query = client
+ .from("partner")
+ .select(`id, supplier(name), hoursPerWeek`, { count: "exact" })
+ .eq("active", true);
+
+ if (args?.name) {
+ query = query.ilike("name", `%${args.name}%`);
+ }
+
+ if (args) {
+ query = setGenericQueryFilters(query, args, "supplier(name)");
+ }
+
+ return query;
+}
+
export async function getShift(
client: SupabaseClient<Database>,
shiftId: string
@@ -913,6 +951,7 @@ export async function upsertEmployeeJob(
employeeId: string,
employeeJob: {
title: string | null;
+ startDate: string | null;
locationId: string | null;
shiftId: string | null;
managerId: string | null;
@@ -1032,6 +1071,26 @@ export async function upsertLocation(
return client.from("location").insert([location]).select("id");
}
+export async function upsertPartner(
+ client: SupabaseClient<Database>,
+ partner:
+ | {
+ id: string;
+ hoursPerWeek?: number;
+ createdBy: string;
+ }
+ | {
+ id: string;
+ hoursPerWeek?: number;
+ updatedBy: string;
+ }
+) {
+ if ("updatedBy" in partner) {
+ return client.from("partner").update(partner).eq("id", partner.id);
+ }
+ return client.from("partner").insert([partner]);
+}
+
export async function upsertShift(
client: SupabaseClient<Database>,
shift: {
diff --git a/apps/carbon/app/interfaces/Resources/types.ts b/apps/carbon/app/modules/resources/types.ts
similarity index 91%
rename from apps/carbon/app/interfaces/Resources/types.ts
rename to apps/carbon/app/modules/resources/types.ts
index 0ea924d339..c16bdb2dea 100644
--- a/apps/carbon/app/interfaces/Resources/types.ts
+++ b/apps/carbon/app/modules/resources/types.ts
@@ -12,12 +12,13 @@ import type {
getEquipment,
getLocations,
getNotes,
+ getPartners,
getPeople,
getShifts,
getWorkCellTypes,
getWorkCellType,
getHolidays,
-} from "~/services/resources";
+} from "./services";
export type Ability = NonNullable<
Awaited<ReturnType<typeof getAbility>>["data"]
@@ -63,7 +64,7 @@ export type AttributeCategory = NonNullable<
Awaited<ReturnType<typeof getAttributeCategories>>["data"]
>[number];
-export type AttributeCategoryDetail = NonNullable<
+export type AttributeCategoryDetailType = NonNullable<
Awaited<ReturnType<typeof getAttributeCategory>>["data"]
>;
@@ -97,7 +98,7 @@ export type EquipmentType = NonNullable<
Awaited<ReturnType<typeof getEquipmentTypes>>["data"]
>[number];
-export type EquipmentTypeDetail = NonNullable<
+export type EquipmentTypeDetailType = NonNullable<
Awaited<ReturnType<typeof getEquipmentType>>["data"]
>;
@@ -113,6 +114,10 @@ export type Note = NonNullable<
Awaited<ReturnType<typeof getNotes>>["data"]
>[number];
+export type Partner = NonNullable<
+ Awaited<ReturnType<typeof getPartners>>["data"]
+>[number];
+
export type Person = NonNullable<
Awaited<ReturnType<typeof getPeople>>["data"]
>[number];
@@ -129,6 +134,6 @@ export type WorkCellType = NonNullable<
Awaited<ReturnType<typeof getWorkCellTypes>>["data"]
>[number];
-export type WorkCellTypeDetail = NonNullable<
+export type WorkCellTypeDetailType = NonNullable<
Awaited<ReturnType<typeof getWorkCellType>>["data"]
>;
diff --git a/apps/carbon/app/modules/sales/index.ts b/apps/carbon/app/modules/sales/index.ts
new file mode 100644
index 0000000000..684aed031a
--- /dev/null
+++ b/apps/carbon/app/modules/sales/index.ts
@@ -0,0 +1,3 @@
+export * from "./services";
+export * from "./interfaces";
+export * from "./types";
diff --git a/apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypeForm/CustomerTypeForm.tsx b/apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypeForm/CustomerTypeForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypeForm/CustomerTypeForm.tsx
rename to apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypeForm/CustomerTypeForm.tsx
index d66729ff8d..d556ed04c5 100644
--- a/apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypeForm/CustomerTypeForm.tsx
+++ b/apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypeForm/CustomerTypeForm.tsx
@@ -14,7 +14,7 @@ import { useNavigate } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Color, Hidden, Input, Submit } from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { customerTypeValidator } from "~/services/sales";
+import { customerTypeValidator } from "~/modules/sales";
import type { TypeOfValidator } from "~/types/validators";
type CustomerTypeFormProps = {
diff --git a/apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypeForm/index.ts b/apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypeForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypeForm/index.ts
rename to apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypeForm/index.ts
diff --git a/apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypesTable/CustomerTypesTable.tsx b/apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypesTable/CustomerTypesTable.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypesTable/CustomerTypesTable.tsx
rename to apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypesTable/CustomerTypesTable.tsx
index 58e791f3f4..f73921ab08 100644
--- a/apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypesTable/CustomerTypesTable.tsx
+++ b/apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypesTable/CustomerTypesTable.tsx
@@ -6,7 +6,7 @@ import { BsPencilSquare, BsPeopleFill } from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { CustomerType } from "~/interfaces/Sales/types";
+import type { CustomerType } from "~/modules/sales";
type CustomerTypesTableProps = {
data: CustomerType[];
diff --git a/apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypesTable/index.ts b/apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypesTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypesTable/index.ts
rename to apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypesTable/index.ts
diff --git a/apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypesTableFilters/CustomerTypesTableFilters.tsx b/apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypesTableFilters/CustomerTypesTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypesTableFilters/CustomerTypesTableFilters.tsx
rename to apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypesTableFilters/CustomerTypesTableFilters.tsx
index b1b46721bf..fd284e4536 100644
--- a/apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypesTableFilters/CustomerTypesTableFilters.tsx
+++ b/apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypesTableFilters/CustomerTypesTableFilters.tsx
@@ -24,7 +24,7 @@ const CustomerTypesTableFilters = () => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
</HStack>
<HStack spacing={2}>
diff --git a/apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypesTableFilters/index.ts b/apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypesTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Sales/CustomerTypes/CustomerTypesTableFilters/index.ts
rename to apps/carbon/app/modules/sales/interfaces/CustomerTypes/CustomerTypesTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Sales/CustomerTypes/index.ts b/apps/carbon/app/modules/sales/interfaces/CustomerTypes/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Sales/CustomerTypes/index.ts
rename to apps/carbon/app/modules/sales/interfaces/CustomerTypes/index.ts
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/CustomerForm.tsx b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/CustomerForm.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Sales/Customers/CustomerForm/CustomerForm.tsx
rename to apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/CustomerForm.tsx
index c485d539cd..47e2446b67 100644
--- a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/CustomerForm.tsx
+++ b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/CustomerForm.tsx
@@ -22,13 +22,13 @@ import {
TextArea,
Hidden,
} from "~/components/Form";
-import { customerValidator } from "~/services/sales";
+import { customerValidator } from "~/modules/sales";
import type {
CustomerContact,
CustomerLocation,
CustomerStatus,
CustomerType,
-} from "~/interfaces/Sales/types";
+} from "~/modules/sales";
import { mapRowsToOptions } from "~/utils/form";
import { usePermissions, useRouteData } from "~/hooks";
import { CustomerContacts, CustomerLocations } from "./components";
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerContacts.tsx b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerContacts.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerContacts.tsx
rename to apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerContacts.tsx
index b994609956..e4f6246b9e 100644
--- a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerContacts.tsx
+++ b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerContacts.tsx
@@ -12,14 +12,11 @@ import {
import { useNavigate, useParams } from "@remix-run/react";
import { useState } from "react";
import { IoMdAdd } from "react-icons/io";
-import type {
- CustomerContact,
- CustomerLocation,
-} from "~/interfaces/Sales/types";
import { Contact } from "~/components";
import { ConfirmDelete } from "~/components/Modals";
-import CustomerContactForm from "./CustomerContactsForm";
+import type { CustomerContact, CustomerLocation } from "~/modules/sales";
import { usePermissions } from "~/hooks";
+import CustomerContactForm from "./CustomerContactsForm";
type CustomerContactProps = {
contacts?: CustomerContact[];
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerContactsForm.tsx b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerContactsForm.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerContactsForm.tsx
rename to apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerContactsForm.tsx
index 2dccc7d9f6..0823ca7efe 100644
--- a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerContactsForm.tsx
+++ b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerContactsForm.tsx
@@ -21,11 +21,8 @@ import {
TextArea,
} from "~/components/Form";
import { usePermissions } from "~/hooks";
-import type {
- CustomerContact,
- CustomerLocation,
-} from "~/interfaces/Sales/types";
-import { customerContactValidator } from "~/services/sales";
+import type { CustomerContact, CustomerLocation } from "~/modules/sales";
+import { customerContactValidator } from "~/modules/sales";
type CustomerContactFormProps = {
contact?: CustomerContact;
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerLocationForm.tsx b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerLocationForm.tsx
similarity index 95%
rename from apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerLocationForm.tsx
rename to apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerLocationForm.tsx
index 3ef1397d5b..2c4c986153 100644
--- a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerLocationForm.tsx
+++ b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerLocationForm.tsx
@@ -14,8 +14,8 @@ import { useParams } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Hidden, Input, Submit } from "~/components/Form";
import { usePermissions } from "~/hooks";
-import type { CustomerLocation } from "~/interfaces/Sales/types";
-import { customerLocationValidator } from "~/services/sales";
+import type { CustomerLocation } from "~/modules/sales";
+import { customerLocationValidator } from "~/modules/sales";
type CustomerLocationFormProps = {
location?: CustomerLocation;
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerLocations.tsx b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerLocations.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerLocations.tsx
rename to apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerLocations.tsx
index 350a0a0bce..a1fcea0145 100644
--- a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/CustomerLocations.tsx
+++ b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/CustomerLocations.tsx
@@ -15,7 +15,7 @@ import { IoMdAdd } from "react-icons/io";
import { Address } from "~/components";
import { ConfirmDelete } from "~/components/Modals";
import { usePermissions } from "~/hooks";
-import type { CustomerLocation } from "~/interfaces/Sales/types";
+import type { CustomerLocation } from "~/modules/sales";
import CustomerLocationForm from "./CustomerLocationForm";
type CustomerLocationProps = {
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/index.ts b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Sales/Customers/CustomerForm/components/index.ts
rename to apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/components/index.ts
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomerForm/index.ts b/apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Sales/Customers/CustomerForm/index.ts
rename to apps/carbon/app/modules/sales/interfaces/Customers/CustomerForm/index.ts
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomersTable/CustomersTable.tsx b/apps/carbon/app/modules/sales/interfaces/Customers/CustomersTable/CustomersTable.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Sales/Customers/CustomersTable/CustomersTable.tsx
rename to apps/carbon/app/modules/sales/interfaces/Customers/CustomersTable/CustomersTable.tsx
index 465d99dbef..c67bcfe39f 100644
--- a/apps/carbon/app/interfaces/Sales/Customers/CustomersTable/CustomersTable.tsx
+++ b/apps/carbon/app/modules/sales/interfaces/Customers/CustomersTable/CustomersTable.tsx
@@ -5,7 +5,7 @@ import { memo, useMemo } from "react";
import { BsPencilSquare, BsPlus } from "react-icons/bs";
import { Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { Customer } from "~/interfaces/Sales/types";
+import type { Customer } from "~/modules/sales";
type CustomersTableProps = {
data: Customer[];
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomersTable/index.ts b/apps/carbon/app/modules/sales/interfaces/Customers/CustomersTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Sales/Customers/CustomersTable/index.ts
rename to apps/carbon/app/modules/sales/interfaces/Customers/CustomersTable/index.ts
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomersTableFilters/CustomersTableFilters.tsx b/apps/carbon/app/modules/sales/interfaces/Customers/CustomersTableFilters/CustomersTableFilters.tsx
similarity index 95%
rename from apps/carbon/app/interfaces/Sales/Customers/CustomersTableFilters/CustomersTableFilters.tsx
rename to apps/carbon/app/modules/sales/interfaces/Customers/CustomersTableFilters/CustomersTableFilters.tsx
index 251eff5343..9f24c3adad 100644
--- a/apps/carbon/app/interfaces/Sales/Customers/CustomersTableFilters/CustomersTableFilters.tsx
+++ b/apps/carbon/app/modules/sales/interfaces/Customers/CustomersTableFilters/CustomersTableFilters.tsx
@@ -4,7 +4,7 @@ import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { CustomerStatus, CustomerType } from "~/interfaces/Sales/types";
+import type { CustomerStatus, CustomerType } from "~/modules/sales";
import { mapRowsToOptions } from "~/utils/form";
type CustomersTableFiltersProps = {
@@ -47,7 +47,7 @@ const CustomersTableFilters = ({
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
{customerTypeOptions.length > 0 && (
<Select
diff --git a/apps/carbon/app/interfaces/Sales/Customers/CustomersTableFilters/index.ts b/apps/carbon/app/modules/sales/interfaces/Customers/CustomersTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Sales/Customers/CustomersTableFilters/index.ts
rename to apps/carbon/app/modules/sales/interfaces/Customers/CustomersTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Sales/Customers/index.ts b/apps/carbon/app/modules/sales/interfaces/Customers/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Sales/Customers/index.ts
rename to apps/carbon/app/modules/sales/interfaces/Customers/index.ts
diff --git a/apps/carbon/app/interfaces/Sales/index.ts b/apps/carbon/app/modules/sales/interfaces/index.ts
similarity index 55%
rename from apps/carbon/app/interfaces/Sales/index.ts
rename to apps/carbon/app/modules/sales/interfaces/index.ts
index 64e2b65aa8..7aa3f90ada 100644
--- a/apps/carbon/app/interfaces/Sales/index.ts
+++ b/apps/carbon/app/modules/sales/interfaces/index.ts
@@ -1,3 +1,5 @@
import useSalesSidebar from "./useSalesSidebar";
export { useSalesSidebar };
+export * from "./CustomerTypes";
+export * from "./Customers";
diff --git a/apps/carbon/app/interfaces/Sales/useSalesSidebar.tsx b/apps/carbon/app/modules/sales/interfaces/useSalesSidebar.tsx
similarity index 100%
rename from apps/carbon/app/interfaces/Sales/useSalesSidebar.tsx
rename to apps/carbon/app/modules/sales/interfaces/useSalesSidebar.tsx
diff --git a/apps/carbon/app/services/sales/index.ts b/apps/carbon/app/modules/sales/services/index.ts
similarity index 100%
rename from apps/carbon/app/services/sales/index.ts
rename to apps/carbon/app/modules/sales/services/index.ts
diff --git a/apps/carbon/app/services/sales/sales.form.ts b/apps/carbon/app/modules/sales/services/sales.form.ts
similarity index 100%
rename from apps/carbon/app/services/sales/sales.form.ts
rename to apps/carbon/app/modules/sales/services/sales.form.ts
diff --git a/apps/carbon/app/services/sales/sales.server.ts b/apps/carbon/app/modules/sales/services/sales.server.ts
similarity index 100%
rename from apps/carbon/app/services/sales/sales.server.ts
rename to apps/carbon/app/modules/sales/services/sales.server.ts
diff --git a/apps/carbon/app/interfaces/Sales/types.ts b/apps/carbon/app/modules/sales/types.ts
similarity index 96%
rename from apps/carbon/app/interfaces/Sales/types.ts
rename to apps/carbon/app/modules/sales/types.ts
index e3e4f4ba0e..2fc0a7bdcd 100644
--- a/apps/carbon/app/interfaces/Sales/types.ts
+++ b/apps/carbon/app/modules/sales/types.ts
@@ -4,7 +4,7 @@ import type {
getCustomers,
getCustomerStatuses,
getCustomerTypes,
-} from "~/services/sales";
+} from "./services";
export type Customer = NonNullable<
Awaited<ReturnType<typeof getCustomers>>["data"]
diff --git a/apps/carbon/app/modules/users/index.ts b/apps/carbon/app/modules/users/index.ts
new file mode 100644
index 0000000000..684aed031a
--- /dev/null
+++ b/apps/carbon/app/modules/users/index.ts
@@ -0,0 +1,3 @@
+export * from "./services";
+export * from "./interfaces";
+export * from "./types";
diff --git a/apps/carbon/app/interfaces/Users/Customers/CreateCustomerModal/CreateCustomerModal.tsx b/apps/carbon/app/modules/users/interfaces/Customers/CreateCustomerModal/CreateCustomerModal.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Users/Customers/CreateCustomerModal/CreateCustomerModal.tsx
rename to apps/carbon/app/modules/users/interfaces/Customers/CreateCustomerModal/CreateCustomerModal.tsx
index 0bb26bda19..2a69a053fe 100644
--- a/apps/carbon/app/interfaces/Users/Customers/CreateCustomerModal/CreateCustomerModal.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Customers/CreateCustomerModal/CreateCustomerModal.tsx
@@ -17,7 +17,7 @@ import { useRef, useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import { Customer, Submit, CustomerContact } from "~/components/Form";
import { useUrlParams } from "~/hooks";
-import { createCustomerAccountValidator } from "~/services/users";
+import { createCustomerAccountValidator } from "~/modules/users";
import type { Result } from "~/types";
const CreateCustomerModal = () => {
diff --git a/apps/carbon/app/interfaces/Users/Customers/CreateCustomerModal/index.ts b/apps/carbon/app/modules/users/interfaces/Customers/CreateCustomerModal/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Customers/CreateCustomerModal/index.ts
rename to apps/carbon/app/modules/users/interfaces/Customers/CreateCustomerModal/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTable/CustomerAccountsTable.tsx b/apps/carbon/app/modules/users/interfaces/Customers/CustomerAccountsTable/CustomerAccountsTable.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTable/CustomerAccountsTable.tsx
rename to apps/carbon/app/modules/users/interfaces/Customers/CustomerAccountsTable/CustomerAccountsTable.tsx
index e03f4fc68f..e536a7667a 100644
--- a/apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTable/CustomerAccountsTable.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Customers/CustomerAccountsTable/CustomerAccountsTable.tsx
@@ -6,8 +6,8 @@ import { FaBan } from "react-icons/fa";
import { IoMdTrash } from "react-icons/io";
import { Avatar, Table } from "~/components";
import { usePermissions } from "~/hooks";
-import type { Customer } from "~/interfaces/Users/types";
-import { ResendInviteModal, DeactivateUsersModal } from "~/interfaces/Users";
+import type { Customer } from "~/modules/users";
+import { ResendInviteModal, DeactivateUsersModal } from "~/modules/users";
type CustomerAccountsTableProps = {
data: Customer[];
diff --git a/apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTable/index.ts b/apps/carbon/app/modules/users/interfaces/Customers/CustomerAccountsTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTable/index.ts
rename to apps/carbon/app/modules/users/interfaces/Customers/CustomerAccountsTable/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTableFilters/CustomerAccountsTableFilters.tsx b/apps/carbon/app/modules/users/interfaces/Customers/CustomerAccountsTableFilters/CustomerAccountsTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTableFilters/CustomerAccountsTableFilters.tsx
rename to apps/carbon/app/modules/users/interfaces/Customers/CustomerAccountsTableFilters/CustomerAccountsTableFilters.tsx
index 66343dc0c3..899d19880a 100644
--- a/apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTableFilters/CustomerAccountsTableFilters.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Customers/CustomerAccountsTableFilters/CustomerAccountsTableFilters.tsx
@@ -4,7 +4,7 @@ import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { CustomerType } from "~/interfaces/Sales/types";
+import type { CustomerType } from "~/modules/sales";
import { mapRowsToOptions } from "~/utils/form";
type CustomerAccountsTableFiltersProps = {
@@ -39,7 +39,7 @@ const CustomerAccountsTableFilters = ({
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
<Select
// @ts-ignore
diff --git a/apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTableFilters/index.ts b/apps/carbon/app/modules/users/interfaces/Customers/CustomerAccountsTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTableFilters/index.ts
rename to apps/carbon/app/modules/users/interfaces/Customers/CustomerAccountsTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Customers/index.ts b/apps/carbon/app/modules/users/interfaces/Customers/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Customers/index.ts
rename to apps/carbon/app/modules/users/interfaces/Customers/index.ts
diff --git a/apps/carbon/app/interfaces/Users/DeactivateUsersModal/DeactivateUsersModal.tsx b/apps/carbon/app/modules/users/interfaces/DeactivateUsersModal/DeactivateUsersModal.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Users/DeactivateUsersModal/DeactivateUsersModal.tsx
rename to apps/carbon/app/modules/users/interfaces/DeactivateUsersModal/DeactivateUsersModal.tsx
index fa8c58f5af..3309c14147 100644
--- a/apps/carbon/app/interfaces/Users/DeactivateUsersModal/DeactivateUsersModal.tsx
+++ b/apps/carbon/app/modules/users/interfaces/DeactivateUsersModal/DeactivateUsersModal.tsx
@@ -12,7 +12,7 @@ import {
} from "@chakra-ui/react";
import { ValidatedForm } from "remix-validated-form";
import { UserSelect } from "~/components/Selectors";
-import { deactivateUsersValidator } from "~/services/users";
+import { deactivateUsersValidator } from "~/modules/users";
type DeactivateUsersModalProps = {
userIds: string[];
diff --git a/apps/carbon/app/interfaces/Users/DeactivateUsersModal/index.ts b/apps/carbon/app/modules/users/interfaces/DeactivateUsersModal/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/DeactivateUsersModal/index.ts
rename to apps/carbon/app/modules/users/interfaces/DeactivateUsersModal/index.ts
diff --git a/apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypeForm/EmployeeTypeForm.tsx b/apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypeForm/EmployeeTypeForm.tsx
similarity index 94%
rename from apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypeForm/EmployeeTypeForm.tsx
rename to apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypeForm/EmployeeTypeForm.tsx
index f953aef049..e3aba25643 100644
--- a/apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypeForm/EmployeeTypeForm.tsx
+++ b/apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypeForm/EmployeeTypeForm.tsx
@@ -17,9 +17,9 @@ import { useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import { Color, Hidden, Input, Submit } from "~/components/Form";
import { usePermissions } from "~/hooks";
-import PermissionCheckboxes from "~/interfaces/Users/components/Permission";
-import type { Permission } from "~/interfaces/Users/types";
-import { employeeTypeValidator } from "~/services/users";
+import PermissionCheckboxes from "~/modules/users/interfaces/components/Permission";
+import type { Permission } from "~/modules/users";
+import { employeeTypeValidator } from "~/modules/users";
import type { TypeOfValidator } from "~/types/validators";
type EmployeeTypeFormProps = {
diff --git a/apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypeForm/index.ts b/apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypeForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypeForm/index.ts
rename to apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypeForm/index.ts
diff --git a/apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypesTable/EmployeeTypesTable.tsx b/apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypesTable/EmployeeTypesTable.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypesTable/EmployeeTypesTable.tsx
rename to apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypesTable/EmployeeTypesTable.tsx
index 7848c38abf..0cb6817053 100644
--- a/apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypesTable/EmployeeTypesTable.tsx
+++ b/apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypesTable/EmployeeTypesTable.tsx
@@ -6,7 +6,7 @@ import { BsPencilSquare, BsPeopleFill } from "react-icons/bs";
import { IoMdTrash } from "react-icons/io";
import { Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { EmployeeType } from "~/interfaces/Users/types";
+import type { EmployeeType } from "~/modules/users";
type EmployeeTypesTableProps = {
data: EmployeeType[];
diff --git a/apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypesTable/index.ts b/apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypesTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypesTable/index.ts
rename to apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypesTable/index.ts
diff --git a/apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypesTableFilters/EmployeeTypesTableFilters.tsx b/apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypesTableFilters/EmployeeTypesTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypesTableFilters/EmployeeTypesTableFilters.tsx
rename to apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypesTableFilters/EmployeeTypesTableFilters.tsx
index 3d8447cf72..0fbf7d80bc 100644
--- a/apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypesTableFilters/EmployeeTypesTableFilters.tsx
+++ b/apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypesTableFilters/EmployeeTypesTableFilters.tsx
@@ -24,7 +24,7 @@ const EmployeeTypesTableFilters = () => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
</HStack>
<HStack spacing={2}>
diff --git a/apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypesTableFilters/index.ts b/apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypesTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/EmployeeTypes/EmployeeTypesTableFilters/index.ts
rename to apps/carbon/app/modules/users/interfaces/EmployeeTypes/EmployeeTypesTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Users/EmployeeTypes/index.ts b/apps/carbon/app/modules/users/interfaces/EmployeeTypes/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/EmployeeTypes/index.ts
rename to apps/carbon/app/modules/users/interfaces/EmployeeTypes/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx b/apps/carbon/app/modules/users/interfaces/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Users/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx
rename to apps/carbon/app/modules/users/interfaces/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx
index 541ebe38d4..adbe490643 100644
--- a/apps/carbon/app/interfaces/Users/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Employees/BulkEditPermissionsForm/BulkEditPermissionsForm.tsx
@@ -16,9 +16,9 @@ import { useFetcher } from "@remix-run/react";
import { useEffect, useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import { Employees, Hidden, Radios, Submit } from "~/components/Form";
-import { bulkPermissionsValidator } from "~/services/users";
+import { bulkPermissionsValidator } from "~/modules/users";
import PermissionCheckboxes from "../../components/Permission";
-import type { Permission } from "../../types";
+import type { Permission } from "../../../types";
type BulkEditPermissionsProps = {
userIds: string[];
diff --git a/apps/carbon/app/interfaces/Users/Employees/BulkEditPermissionsForm/index.ts b/apps/carbon/app/modules/users/interfaces/Employees/BulkEditPermissionsForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Employees/BulkEditPermissionsForm/index.ts
rename to apps/carbon/app/modules/users/interfaces/Employees/BulkEditPermissionsForm/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Employees/CreateEmployeeModal/CreateEmployeeModal.tsx b/apps/carbon/app/modules/users/interfaces/Employees/CreateEmployeeModal/CreateEmployeeModal.tsx
similarity index 95%
rename from apps/carbon/app/interfaces/Users/Employees/CreateEmployeeModal/CreateEmployeeModal.tsx
rename to apps/carbon/app/modules/users/interfaces/Employees/CreateEmployeeModal/CreateEmployeeModal.tsx
index a148f796c8..9f19580996 100644
--- a/apps/carbon/app/interfaces/Users/Employees/CreateEmployeeModal/CreateEmployeeModal.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Employees/CreateEmployeeModal/CreateEmployeeModal.tsx
@@ -14,8 +14,8 @@ import type { PostgrestResponse } from "@supabase/supabase-js";
import { useEffect, useRef } from "react";
import { ValidatedForm } from "remix-validated-form";
import { Input, Select, Submit } from "~/components/Form";
-import type { EmployeeType } from "~/interfaces/Users/types";
-import { createEmployeeValidator } from "~/services/users";
+import type { EmployeeType } from "~/modules/users";
+import { createEmployeeValidator } from "~/modules/users";
import type { Result } from "~/types";
import { mapRowsToOptions } from "~/utils/form";
diff --git a/apps/carbon/app/interfaces/Users/Employees/CreateEmployeeModal/index.ts b/apps/carbon/app/modules/users/interfaces/Employees/CreateEmployeeModal/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Employees/CreateEmployeeModal/index.ts
rename to apps/carbon/app/modules/users/interfaces/Employees/CreateEmployeeModal/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Employees/EmployeePermissionsForm/EmployeePermissionsForm.tsx b/apps/carbon/app/modules/users/interfaces/Employees/EmployeePermissionsForm/EmployeePermissionsForm.tsx
similarity index 94%
rename from apps/carbon/app/interfaces/Users/Employees/EmployeePermissionsForm/EmployeePermissionsForm.tsx
rename to apps/carbon/app/modules/users/interfaces/Employees/EmployeePermissionsForm/EmployeePermissionsForm.tsx
index 2d3e78afe0..221e1b2bf1 100644
--- a/apps/carbon/app/interfaces/Users/Employees/EmployeePermissionsForm/EmployeePermissionsForm.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Employees/EmployeePermissionsForm/EmployeePermissionsForm.tsx
@@ -17,9 +17,9 @@ import type { PostgrestResponse } from "@supabase/supabase-js";
import { useEffect, useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import { Hidden, Select, Submit } from "~/components/Form";
-import PermissionCheckboxes from "~/interfaces/Users/components/Permission";
-import type { EmployeeType, Permission } from "~/interfaces/Users/types";
-import { employeeValidator } from "~/services/users";
+import PermissionCheckboxes from "~/modules/users/interfaces/components/Permission";
+import type { EmployeeType, Permission } from "~/modules/users";
+import { employeeValidator } from "~/modules/users";
import type { TypeOfValidator } from "~/types/validators";
import { mapRowsToOptions } from "~/utils/form";
diff --git a/apps/carbon/app/interfaces/Users/Employees/EmployeePermissionsForm/index.ts b/apps/carbon/app/modules/users/interfaces/Employees/EmployeePermissionsForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Employees/EmployeePermissionsForm/index.ts
rename to apps/carbon/app/modules/users/interfaces/Employees/EmployeePermissionsForm/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Employees/EmployeesTable/EmployeesTable.tsx b/apps/carbon/app/modules/users/interfaces/Employees/EmployeesTable/EmployeesTable.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Users/Employees/EmployeesTable/EmployeesTable.tsx
rename to apps/carbon/app/modules/users/interfaces/Employees/EmployeesTable/EmployeesTable.tsx
index 83f5d57026..181a8620de 100644
--- a/apps/carbon/app/interfaces/Users/Employees/EmployeesTable/EmployeesTable.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Employees/EmployeesTable/EmployeesTable.tsx
@@ -7,9 +7,12 @@ import { FaBan } from "react-icons/fa";
import { IoMdTrash } from "react-icons/io";
import { Avatar, Table } from "~/components";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { Employee } from "~/interfaces/Users/types";
-import { BulkEditPermissionsForm } from "~/interfaces/Users/Employees";
-import { ResendInviteModal, DeactivateUsersModal } from "~/interfaces/Users";
+import type { Employee } from "~/modules/users";
+import {
+ BulkEditPermissionsForm,
+ ResendInviteModal,
+ DeactivateUsersModal,
+} from "~/modules/users";
type EmployeesTableProps = {
data: Employee[];
diff --git a/apps/carbon/app/interfaces/Users/Employees/EmployeesTable/index.ts b/apps/carbon/app/modules/users/interfaces/Employees/EmployeesTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Employees/EmployeesTable/index.ts
rename to apps/carbon/app/modules/users/interfaces/Employees/EmployeesTable/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Employees/EmployeesTableFilters/EmployeesTableFilters.tsx b/apps/carbon/app/modules/users/interfaces/Employees/EmployeesTableFilters/EmployeesTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Users/Employees/EmployeesTableFilters/EmployeesTableFilters.tsx
rename to apps/carbon/app/modules/users/interfaces/Employees/EmployeesTableFilters/EmployeesTableFilters.tsx
index a091f82cc4..0ad079bf8a 100644
--- a/apps/carbon/app/interfaces/Users/Employees/EmployeesTableFilters/EmployeesTableFilters.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Employees/EmployeesTableFilters/EmployeesTableFilters.tsx
@@ -4,7 +4,7 @@ import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { EmployeeType } from "~/interfaces/Users/types";
+import type { EmployeeType } from "~/modules/users";
import { mapRowsToOptions } from "~/utils/form";
type EmployeesTableFiltersProps = {
@@ -39,7 +39,7 @@ const EmployeesTableFilters = ({
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
<Select
// @ts-ignore
diff --git a/apps/carbon/app/interfaces/Users/Employees/EmployeesTableFilters/index.ts b/apps/carbon/app/modules/users/interfaces/Employees/EmployeesTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Employees/EmployeesTableFilters/index.ts
rename to apps/carbon/app/modules/users/interfaces/Employees/EmployeesTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Employees/index.ts b/apps/carbon/app/modules/users/interfaces/Employees/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Employees/index.ts
rename to apps/carbon/app/modules/users/interfaces/Employees/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Groups/GroupsForm/GroupsForm.tsx b/apps/carbon/app/modules/users/interfaces/Groups/GroupsForm/GroupsForm.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Users/Groups/GroupsForm/GroupsForm.tsx
rename to apps/carbon/app/modules/users/interfaces/Groups/GroupsForm/GroupsForm.tsx
index e278f3d246..8a4517b4ab 100644
--- a/apps/carbon/app/interfaces/Users/Groups/GroupsForm/GroupsForm.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Groups/GroupsForm/GroupsForm.tsx
@@ -14,7 +14,7 @@ import { useNavigate } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { Hidden, Input, Submit, Users } from "~/components/Form";
import { usePermissions } from "~/hooks";
-import { groupValidator } from "~/services/users";
+import { groupValidator } from "~/modules/users";
import type { TypeOfValidator } from "~/types/validators";
type GroupFormProps = {
diff --git a/apps/carbon/app/interfaces/Users/Groups/GroupsForm/index.ts b/apps/carbon/app/modules/users/interfaces/Groups/GroupsForm/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Groups/GroupsForm/index.ts
rename to apps/carbon/app/modules/users/interfaces/Groups/GroupsForm/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Groups/GroupsTable/GroupsTable.tsx b/apps/carbon/app/modules/users/interfaces/Groups/GroupsTable/GroupsTable.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Users/Groups/GroupsTable/GroupsTable.tsx
rename to apps/carbon/app/modules/users/interfaces/Groups/GroupsTable/GroupsTable.tsx
index a2292e6282..e5620a4f68 100644
--- a/apps/carbon/app/interfaces/Users/Groups/GroupsTable/GroupsTable.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Groups/GroupsTable/GroupsTable.tsx
@@ -7,7 +7,7 @@ import { IoMdTrash } from "react-icons/io";
import { Avatar } from "~/components";
import { Table } from "~/components";
import { usePermissions } from "~/hooks";
-import type { Group } from "~/interfaces/Users/types";
+import type { Group } from "~/modules/users";
type GroupsTableProps = {
data: Group[];
diff --git a/apps/carbon/app/interfaces/Users/Groups/GroupsTable/index.ts b/apps/carbon/app/modules/users/interfaces/Groups/GroupsTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Groups/GroupsTable/index.ts
rename to apps/carbon/app/modules/users/interfaces/Groups/GroupsTable/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Groups/GroupsTableFilters/GroupsTableFilters.tsx b/apps/carbon/app/modules/users/interfaces/Groups/GroupsTableFilters/GroupsTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Users/Groups/GroupsTableFilters/GroupsTableFilters.tsx
rename to apps/carbon/app/modules/users/interfaces/Groups/GroupsTableFilters/GroupsTableFilters.tsx
index bfd68db6e1..0f73b90a36 100644
--- a/apps/carbon/app/interfaces/Users/Groups/GroupsTableFilters/GroupsTableFilters.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Groups/GroupsTableFilters/GroupsTableFilters.tsx
@@ -24,7 +24,7 @@ const GroupsTableFilters = () => {
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
</HStack>
<HStack spacing={2}>
diff --git a/apps/carbon/app/interfaces/Users/Groups/GroupsTableFilters/index.ts b/apps/carbon/app/modules/users/interfaces/Groups/GroupsTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Groups/GroupsTableFilters/index.ts
rename to apps/carbon/app/modules/users/interfaces/Groups/GroupsTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Groups/index.ts b/apps/carbon/app/modules/users/interfaces/Groups/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Groups/index.ts
rename to apps/carbon/app/modules/users/interfaces/Groups/index.ts
diff --git a/apps/carbon/app/interfaces/Users/ResendInviteModal/ResendInviteModal.tsx b/apps/carbon/app/modules/users/interfaces/ResendInviteModal/ResendInviteModal.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Users/ResendInviteModal/ResendInviteModal.tsx
rename to apps/carbon/app/modules/users/interfaces/ResendInviteModal/ResendInviteModal.tsx
index bb167ac000..790051fbf3 100644
--- a/apps/carbon/app/interfaces/Users/ResendInviteModal/ResendInviteModal.tsx
+++ b/apps/carbon/app/modules/users/interfaces/ResendInviteModal/ResendInviteModal.tsx
@@ -13,7 +13,7 @@ import {
import { useFetcher } from "@remix-run/react";
import { ValidatedForm } from "remix-validated-form";
import { UserSelect } from "~/components/Selectors";
-import { resendInviteValidator } from "~/services/users";
+import { resendInviteValidator } from "~/modules/users";
type ResendInviteModalProps = {
userIds: string[];
diff --git a/apps/carbon/app/interfaces/Users/ResendInviteModal/index.ts b/apps/carbon/app/modules/users/interfaces/ResendInviteModal/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/ResendInviteModal/index.ts
rename to apps/carbon/app/modules/users/interfaces/ResendInviteModal/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx b/apps/carbon/app/modules/users/interfaces/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx
similarity index 98%
rename from apps/carbon/app/interfaces/Users/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx
rename to apps/carbon/app/modules/users/interfaces/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx
index 5ddde7298e..f6a022ff22 100644
--- a/apps/carbon/app/interfaces/Users/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Suppliers/CreateSupplierModal/CreateSupplierModal.tsx
@@ -17,7 +17,7 @@ import { useRef, useState } from "react";
import { ValidatedForm } from "remix-validated-form";
import { Supplier, Submit, SupplierContact } from "~/components/Form";
import { useUrlParams } from "~/hooks";
-import { createSupplierAccountValidator } from "~/services/users";
+import { createSupplierAccountValidator } from "~/modules/users";
import type { Result } from "~/types";
const CreateSupplierModal = () => {
diff --git a/apps/carbon/app/interfaces/Users/Suppliers/CreateSupplierModal/index.ts b/apps/carbon/app/modules/users/interfaces/Suppliers/CreateSupplierModal/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Suppliers/CreateSupplierModal/index.ts
rename to apps/carbon/app/modules/users/interfaces/Suppliers/CreateSupplierModal/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx b/apps/carbon/app/modules/users/interfaces/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx
similarity index 97%
rename from apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx
rename to apps/carbon/app/modules/users/interfaces/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx
index e41dfab07e..397ec14c6f 100644
--- a/apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx
@@ -6,8 +6,8 @@ import { FaBan } from "react-icons/fa";
import { IoMdTrash } from "react-icons/io";
import { Avatar, Table } from "~/components";
import { usePermissions } from "~/hooks";
-import type { Supplier } from "~/interfaces/Users/types";
-import { ResendInviteModal, DeactivateUsersModal } from "~/interfaces/Users";
+import type { Supplier } from "~/modules/users";
+import { ResendInviteModal, DeactivateUsersModal } from "~/modules/users";
type SupplierAccountsTableProps = {
data: Supplier[];
diff --git a/apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTable/index.ts b/apps/carbon/app/modules/users/interfaces/Suppliers/SupplierAccountsTable/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTable/index.ts
rename to apps/carbon/app/modules/users/interfaces/Suppliers/SupplierAccountsTable/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTableFilters/SupplierAccountsTableFilters.tsx b/apps/carbon/app/modules/users/interfaces/Suppliers/SupplierAccountsTableFilters/SupplierAccountsTableFilters.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTableFilters/SupplierAccountsTableFilters.tsx
rename to apps/carbon/app/modules/users/interfaces/Suppliers/SupplierAccountsTableFilters/SupplierAccountsTableFilters.tsx
index 3b4c929d50..0d22db897e 100644
--- a/apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTableFilters/SupplierAccountsTableFilters.tsx
+++ b/apps/carbon/app/modules/users/interfaces/Suppliers/SupplierAccountsTableFilters/SupplierAccountsTableFilters.tsx
@@ -4,7 +4,7 @@ import { Link } from "@remix-run/react";
import { IoMdAdd } from "react-icons/io";
import { DebouncedInput } from "~/components/Search";
import { usePermissions, useUrlParams } from "~/hooks";
-import type { SupplierType } from "~/interfaces/Purchasing/types";
+import type { SupplierType } from "~/modules/purchasing";
import { mapRowsToOptions } from "~/utils/form";
type SupplierAccountsTableFiltersProps = {
@@ -39,7 +39,7 @@ const SupplierAccountsTableFilters = ({
param="name"
size="sm"
minW={180}
- placeholder="Search by name"
+ placeholder="Filter by name"
/>
<Select
// @ts-ignore
diff --git a/apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTableFilters/index.ts b/apps/carbon/app/modules/users/interfaces/Suppliers/SupplierAccountsTableFilters/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTableFilters/index.ts
rename to apps/carbon/app/modules/users/interfaces/Suppliers/SupplierAccountsTableFilters/index.ts
diff --git a/apps/carbon/app/interfaces/Users/Suppliers/index.ts b/apps/carbon/app/modules/users/interfaces/Suppliers/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/Suppliers/index.ts
rename to apps/carbon/app/modules/users/interfaces/Suppliers/index.ts
diff --git a/apps/carbon/app/interfaces/Users/components/Permission/Permission.tsx b/apps/carbon/app/modules/users/interfaces/components/Permission/Permission.tsx
similarity index 96%
rename from apps/carbon/app/interfaces/Users/components/Permission/Permission.tsx
rename to apps/carbon/app/modules/users/interfaces/components/Permission/Permission.tsx
index 529540c2b0..8b63388c0f 100644
--- a/apps/carbon/app/interfaces/Users/components/Permission/Permission.tsx
+++ b/apps/carbon/app/modules/users/interfaces/components/Permission/Permission.tsx
@@ -1,6 +1,6 @@
import { Box, Checkbox, Stack } from "@chakra-ui/react";
import { capitalize } from "~/utils/string";
-import type { Permission } from "~/interfaces/Users/types";
+import type { Permission } from "~/modules/users";
type PermissionProps = {
module: string;
diff --git a/apps/carbon/app/interfaces/Users/components/Permission/index.ts b/apps/carbon/app/modules/users/interfaces/components/Permission/index.ts
similarity index 100%
rename from apps/carbon/app/interfaces/Users/components/Permission/index.ts
rename to apps/carbon/app/modules/users/interfaces/components/Permission/index.ts
diff --git a/apps/carbon/app/interfaces/Users/index.ts b/apps/carbon/app/modules/users/interfaces/index.ts
similarity index 61%
rename from apps/carbon/app/interfaces/Users/index.ts
rename to apps/carbon/app/modules/users/interfaces/index.ts
index 7b4d4cb573..0b35a63926 100644
--- a/apps/carbon/app/interfaces/Users/index.ts
+++ b/apps/carbon/app/modules/users/interfaces/index.ts
@@ -3,3 +3,8 @@ import ResendInviteModal from "./ResendInviteModal";
import useUsersSidebar from "./useUsersSidebar";
export { DeactivateUsersModal, ResendInviteModal, useUsersSidebar };
+export * from "./Customers";
+export * from "./Employees";
+export * from "./EmployeeTypes";
+export * from "./Groups";
+export * from "./Suppliers";
diff --git a/apps/carbon/app/interfaces/Users/useUsersSidebar.tsx b/apps/carbon/app/modules/users/interfaces/useUsersSidebar.tsx
similarity index 100%
rename from apps/carbon/app/interfaces/Users/useUsersSidebar.tsx
rename to apps/carbon/app/modules/users/interfaces/useUsersSidebar.tsx
diff --git a/apps/carbon/app/services/users/index.ts b/apps/carbon/app/modules/users/services/index.ts
similarity index 100%
rename from apps/carbon/app/services/users/index.ts
rename to apps/carbon/app/modules/users/services/index.ts
diff --git a/apps/carbon/app/services/users/users.form.ts b/apps/carbon/app/modules/users/services/users.form.ts
similarity index 100%
rename from apps/carbon/app/services/users/users.form.ts
rename to apps/carbon/app/modules/users/services/users.form.ts
diff --git a/apps/carbon/app/services/users/users.server.ts b/apps/carbon/app/modules/users/services/users.server.ts
similarity index 99%
rename from apps/carbon/app/services/users/users.server.ts
rename to apps/carbon/app/modules/users/services/users.server.ts
index d3ebacb148..2c8ad46f43 100644
--- a/apps/carbon/app/services/users/users.server.ts
+++ b/apps/carbon/app/modules/users/services/users.server.ts
@@ -9,14 +9,14 @@ import type {
Feature,
Permission,
User,
-} from "~/interfaces/Users/types";
+} from "~/modules/users";
+import { getSupplierContact } from "~/modules/purchasing";
import {
deleteAuthAccount,
sendInviteByEmail,
sendMagicLink,
} from "~/services/auth";
-import { getSupplierContact } from "~/services/purchasing";
-import { getCustomerContact } from "~/services/sales";
+import { getCustomerContact } from "~/modules/sales";
import { requireAuthSession, flash } from "~/services/session";
import type { Result } from "~/types";
import type { GenericQueryFilters } from "~/utils/query";
@@ -605,7 +605,8 @@ async function insertSupplierAccount(
async function insertUser(
client: SupabaseClient<Database>,
- user: Omit<User, "fullName">
+ //TODO: fix this type
+ user: Omit<User, "fullName" | "createdAt">
) {
return client.from("user").insert([user]).select("*");
}
diff --git a/apps/carbon/app/interfaces/Users/types.ts b/apps/carbon/app/modules/users/types.ts
similarity index 98%
rename from apps/carbon/app/interfaces/Users/types.ts
rename to apps/carbon/app/modules/users/types.ts
index 2d01a059d2..5d7ef3408c 100644
--- a/apps/carbon/app/interfaces/Users/types.ts
+++ b/apps/carbon/app/modules/users/types.ts
@@ -7,7 +7,7 @@ import type {
getPermissionsByEmployeeType,
getSuppliers,
getUsers,
-} from "~/services/users";
+} from "./services";
export type Customer = NonNullable<
Awaited<ReturnType<typeof getCustomers>>["data"]
diff --git a/apps/carbon/app/queues/bulk-permissions.queue.server.ts b/apps/carbon/app/queues/bulk-permissions.queue.server.ts
index 1e7ceae9a0..16bd002f62 100644
--- a/apps/carbon/app/queues/bulk-permissions.queue.server.ts
+++ b/apps/carbon/app/queues/bulk-permissions.queue.server.ts
@@ -1,7 +1,7 @@
import { Queue } from "~/lib/bullmq";
import { getSupabaseServiceRole } from "~/lib/supabase";
-import type { Permission } from "~/interfaces/Users/types";
-import { updatePermissions } from "~/services/users";
+import type { Permission } from "~/modules/users";
+import { updatePermissions } from "~/modules/users";
export type BulkPermissionsQueueData = {
id: string;
diff --git a/apps/carbon/app/queues/deactivate-users.queue.server.ts b/apps/carbon/app/queues/deactivate-users.queue.server.ts
index 96704ea79e..2be90f4c45 100644
--- a/apps/carbon/app/queues/deactivate-users.queue.server.ts
+++ b/apps/carbon/app/queues/deactivate-users.queue.server.ts
@@ -1,6 +1,6 @@
import { Queue } from "~/lib/bullmq";
import { getSupabaseServiceRole } from "~/lib/supabase";
-import { deactivateUser } from "~/services/users";
+import { deactivateUser } from "~/modules/users";
export type DeactivateUserQueueData = {
id: string;
diff --git a/apps/carbon/app/queues/resend-invites.queue.server.ts b/apps/carbon/app/queues/resend-invites.queue.server.ts
index ed8af6880f..2bb8b0dbfc 100644
--- a/apps/carbon/app/queues/resend-invites.queue.server.ts
+++ b/apps/carbon/app/queues/resend-invites.queue.server.ts
@@ -1,6 +1,6 @@
import { Queue } from "~/lib/bullmq";
import { getSupabaseServiceRole } from "~/lib/supabase";
-import { resendInvite } from "~/services/users";
+import { resendInvite } from "~/modules/users";
export type ResendInvitesQueueData = {
id: string;
diff --git a/apps/carbon/app/root.tsx b/apps/carbon/app/root.tsx
index f1aeeb7643..837abcd274 100644
--- a/apps/carbon/app/root.tsx
+++ b/apps/carbon/app/root.tsx
@@ -25,7 +25,7 @@ export function links() {
export const meta: MetaFunction = () => ({
charset: "utf-8",
title: "Carbon ERP",
- viewport: "width=device-width,initial-scale=1",
+ viewport: "width=device-width",
});
interface DocumentProps {
diff --git a/apps/carbon/app/routes/_public+/callback.tsx b/apps/carbon/app/routes/_public+/callback.tsx
index 466406f3e4..06acbda3d8 100644
--- a/apps/carbon/app/routes/_public+/callback.tsx
+++ b/apps/carbon/app/routes/_public+/callback.tsx
@@ -6,7 +6,7 @@ import { useFetcher } from "@remix-run/react";
import { callbackValidator } from "~/services/auth/auth.form";
import { getSupabase } from "~/lib/supabase";
import { refreshAccessToken } from "~/services/auth";
-import { getUserByEmail } from "~/services/users";
+import { getUserByEmail } from "~/modules/users";
import {
commitAuthSession,
destroyAuthSession,
diff --git a/apps/carbon/app/routes/_public+/forgot-password.tsx b/apps/carbon/app/routes/_public+/forgot-password.tsx
index e28df2d2b1..6c20fca721 100644
--- a/apps/carbon/app/routes/_public+/forgot-password.tsx
+++ b/apps/carbon/app/routes/_public+/forgot-password.tsx
@@ -18,7 +18,7 @@ import { ValidatedForm, validationError } from "remix-validated-form";
import { Input, Submit } from "~/components/Form";
import { getAuthSession } from "~/services/session";
import { forgotPasswordValidator, sendMagicLink } from "~/services/auth";
-import { getUserByEmail } from "~/services/users";
+import { getUserByEmail } from "~/modules/users";
import { assertIsPost } from "~/utils/http";
import type { FormActionData, Result } from "~/types";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/_public+/reset-password.tsx b/apps/carbon/app/routes/_public+/reset-password.tsx
index df8c7beab0..f7c310ad2a 100644
--- a/apps/carbon/app/routes/_public+/reset-password.tsx
+++ b/apps/carbon/app/routes/_public+/reset-password.tsx
@@ -15,7 +15,7 @@ import { useNavigate } from "@remix-run/react";
import { ValidatedForm, validationError } from "remix-validated-form";
import { Password, Submit } from "~/components/Form";
import { resetPasswordValidator } from "~/services/auth";
-import { resetPassword } from "~/services/users";
+import { resetPassword } from "~/modules/users";
import { requireAuthSession, flash } from "~/services/session";
import { error, success } from "~/utils/result";
import { assertIsPost } from "~/utils/http";
diff --git a/apps/carbon/app/routes/api+/purchasing.supplier-contacts.tsx b/apps/carbon/app/routes/api+/purchasing.supplier-contacts.tsx
index 552482fc5f..bee2871fcf 100644
--- a/apps/carbon/app/routes/api+/purchasing.supplier-contacts.tsx
+++ b/apps/carbon/app/routes/api+/purchasing.supplier-contacts.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import { requirePermissions } from "~/services/auth";
-import { getSupplierContacts } from "~/services/purchasing";
+import { getSupplierContacts } from "~/modules/purchasing";
import { flash } from "~/services/session";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/api+/purchasing.suppliers.tsx b/apps/carbon/app/routes/api+/purchasing.suppliers.tsx
index 22ca60dd4e..bd177c24a7 100644
--- a/apps/carbon/app/routes/api+/purchasing.suppliers.tsx
+++ b/apps/carbon/app/routes/api+/purchasing.suppliers.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import { requirePermissions } from "~/services/auth";
-import { getSuppliersList } from "~/services/purchasing";
+import { getSuppliersList } from "~/modules/purchasing";
export async function loader({ request }: LoaderArgs) {
const authorized = await requirePermissions(request, {
diff --git a/apps/carbon/app/routes/api+/resources.abilities.tsx b/apps/carbon/app/routes/api+/resources.abilities.tsx
index 905f6dfc58..1c93b9fa72 100644
--- a/apps/carbon/app/routes/api+/resources.abilities.tsx
+++ b/apps/carbon/app/routes/api+/resources.abilities.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
+import { getAbilitiesList } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { getAbilitiesList } from "~/services/resources";
export async function loader({ request }: LoaderArgs) {
const authorized = await requirePermissions(request, {
diff --git a/apps/carbon/app/routes/api+/resources.departments.tsx b/apps/carbon/app/routes/api+/resources.departments.tsx
index 12298a68ee..7405931d91 100644
--- a/apps/carbon/app/routes/api+/resources.departments.tsx
+++ b/apps/carbon/app/routes/api+/resources.departments.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
+import { getDepartmentsList } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { getDepartmentsList } from "~/services/resources";
export async function loader({ request }: LoaderArgs) {
const authorized = await requirePermissions(request, {
diff --git a/apps/carbon/app/routes/api+/resources.locations.tsx b/apps/carbon/app/routes/api+/resources.locations.tsx
index 0ca78bea10..293f002f2a 100644
--- a/apps/carbon/app/routes/api+/resources.locations.tsx
+++ b/apps/carbon/app/routes/api+/resources.locations.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
+import { getLocationsList } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { getLocationsList } from "~/services/resources";
export async function loader({ request }: LoaderArgs) {
const authorized = await requirePermissions(request, {
diff --git a/apps/carbon/app/routes/api+/resources.shifts.tsx b/apps/carbon/app/routes/api+/resources.shifts.tsx
index 0583fecf8f..a407975080 100644
--- a/apps/carbon/app/routes/api+/resources.shifts.tsx
+++ b/apps/carbon/app/routes/api+/resources.shifts.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
+import { getShiftsList } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { getShiftsList } from "~/services/resources";
export async function loader({ request }: LoaderArgs) {
const authorized = await requirePermissions(request, {
diff --git a/apps/carbon/app/routes/api+/resources.work-cells.tsx b/apps/carbon/app/routes/api+/resources.work-cells.tsx
index 81f26a65a4..634eb44105 100644
--- a/apps/carbon/app/routes/api+/resources.work-cells.tsx
+++ b/apps/carbon/app/routes/api+/resources.work-cells.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
+import { getWorkCellList } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { getWorkCellList } from "~/services/resources";
export async function loader({ request }: LoaderArgs) {
const authorized = await requirePermissions(request, {
diff --git a/apps/carbon/app/routes/api+/sales.customer-contacts.tsx b/apps/carbon/app/routes/api+/sales.customer-contacts.tsx
index d45eef1baf..4661cdfd3e 100644
--- a/apps/carbon/app/routes/api+/sales.customer-contacts.tsx
+++ b/apps/carbon/app/routes/api+/sales.customer-contacts.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
+import { getCustomerContacts } from "~/modules/sales";
import { requirePermissions } from "~/services/auth";
-import { getCustomerContacts } from "~/services/sales";
import { flash } from "~/services/session";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/api+/sales.customers.tsx b/apps/carbon/app/routes/api+/sales.customers.tsx
index 566d5bd505..3ad62ed9bf 100644
--- a/apps/carbon/app/routes/api+/sales.customers.tsx
+++ b/apps/carbon/app/routes/api+/sales.customers.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
+import { getCustomersList } from "~/modules/sales";
import { requirePermissions } from "~/services/auth";
-import { getCustomersList } from "~/services/sales";
export async function loader({ request }: LoaderArgs) {
const authorized = await requirePermissions(request, {
diff --git a/apps/carbon/app/routes/api+/users.employee-types.tsx b/apps/carbon/app/routes/api+/users.employee-types.tsx
index e1a02c7d11..da775a0f27 100644
--- a/apps/carbon/app/routes/api+/users.employee-types.tsx
+++ b/apps/carbon/app/routes/api+/users.employee-types.tsx
@@ -1,6 +1,6 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
-import { getEmployeeTypes } from "~/services/users";
+import { getEmployeeTypes } from "~/modules/users";
import { requirePermissions } from "~/services/auth";
export async function loader({ request }: LoaderArgs) {
diff --git a/apps/carbon/app/routes/api+/users.empty-permissions.tsx b/apps/carbon/app/routes/api+/users.empty-permissions.tsx
index d238790bdc..8e44ea0dbf 100644
--- a/apps/carbon/app/routes/api+/users.empty-permissions.tsx
+++ b/apps/carbon/app/routes/api+/users.empty-permissions.tsx
@@ -1,11 +1,8 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/router";
+import { getFeatures, makeEmptyPermissionsFromFeatures } from "~/modules/users";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import {
- getFeatures,
- makeEmptyPermissionsFromFeatures,
-} from "~/services/users";
import { error } from "~/utils/result";
export async function loader({ request }: LoaderArgs) {
diff --git a/apps/carbon/app/routes/api+/users.groups.tsx b/apps/carbon/app/routes/api+/users.groups.tsx
index c432379298..ade1fe9fb8 100644
--- a/apps/carbon/app/routes/api+/users.groups.tsx
+++ b/apps/carbon/app/routes/api+/users.groups.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import { arrayToTree } from "performant-array-to-tree";
-import type { Group } from "~/interfaces/Users/types";
+import type { Group } from "~/modules/users";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/_layout.tsx b/apps/carbon/app/routes/x+/_layout.tsx
index f7b6037e77..0e3fd23d41 100644
--- a/apps/carbon/app/routes/x+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/_layout.tsx
@@ -7,7 +7,7 @@ import { Outlet, useLoaderData } from "@remix-run/react";
import { useEffect } from "react";
import { IconSidebar, Topbar } from "~/components/Layout";
import { getSupabase, SupabaseProvider } from "~/lib/supabase";
-import { getUserClaims, getCurrentUser } from "~/services/users";
+import { getUserClaims, getCurrentUser } from "~/modules/users";
import {
destroyAuthSession,
getSessionFlash,
diff --git a/apps/carbon/app/routes/x+/account+/$userId.attribute.tsx b/apps/carbon/app/routes/x+/account+/$userId.attribute.tsx
index 76a69fe0f7..a1422171a7 100644
--- a/apps/carbon/app/routes/x+/account+/$userId.attribute.tsx
+++ b/apps/carbon/app/routes/x+/account+/$userId.attribute.tsx
@@ -6,12 +6,12 @@ import {
attributeNumericValidator,
attributeTextValidator,
attributeUserValidator,
-} from "~/services/account";
+ upsertUserAttributeValue,
+} from "~/modules/account";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { upsertUserAttributeValue } from "~/services/account";
-import { getAttribute } from "~/services/resources";
-import { getUserClaims } from "~/services/users";
+import { getAttribute } from "~/modules/resources";
+import { getUserClaims } from "~/modules/users";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/account+/$userId.delete.attribute.tsx b/apps/carbon/app/routes/x+/account+/$userId.delete.attribute.tsx
index ea42cc99f5..b40997134d 100644
--- a/apps/carbon/app/routes/x+/account+/$userId.delete.attribute.tsx
+++ b/apps/carbon/app/routes/x+/account+/$userId.delete.attribute.tsx
@@ -2,9 +2,9 @@ import type { ActionArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { deleteUserAttributeValue } from "~/services/account";
-import { getAttribute } from "~/services/resources";
-import { getUserClaims } from "~/services/users";
+import { deleteUserAttributeValue } from "~/modules/account";
+import { getAttribute } from "~/modules/resources";
+import { getUserClaims } from "~/modules/users";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/account+/_layout.tsx b/apps/carbon/app/routes/x+/account+/_layout.tsx
index 6f274a18e7..14fcdde6a3 100644
--- a/apps/carbon/app/routes/x+/account+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/account+/_layout.tsx
@@ -3,7 +3,7 @@ import { Grid, VStack } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { ContentSidebar } from "~/components/Layout/Sidebar";
-import { useAccountSidebar } from "~/interfaces/Account";
+import { useAccountSidebar } from "~/modules/account";
export const meta: MetaFunction = () => ({
title: "Carbon | My Account",
diff --git a/apps/carbon/app/routes/x+/account+/password.tsx b/apps/carbon/app/routes/x+/account+/password.tsx
index 90739e4667..2346575d7d 100644
--- a/apps/carbon/app/routes/x+/account+/password.tsx
+++ b/apps/carbon/app/routes/x+/account+/password.tsx
@@ -3,8 +3,7 @@ import { json, redirect } from "@remix-run/router";
import { validationError } from "remix-validated-form";
import { PageTitle } from "~/components/Layout";
import { getSupabaseServiceRole } from "~/lib/supabase";
-import { PasswordForm } from "~/interfaces/Account/Password";
-import { accountPasswordValidator } from "~/services/account";
+import { PasswordForm, accountPasswordValidator } from "~/modules/account";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
diff --git a/apps/carbon/app/routes/x+/account+/personal.tsx b/apps/carbon/app/routes/x+/account+/personal.tsx
index b5bc3956f8..6b962429ee 100644
--- a/apps/carbon/app/routes/x+/account+/personal.tsx
+++ b/apps/carbon/app/routes/x+/account+/personal.tsx
@@ -4,9 +4,8 @@ import { redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { json } from "@remix-run/router";
import { PageTitle, SectionTitle } from "~/components/Layout";
-import { UserAttributesForm } from "~/interfaces/Account/UserAttributes";
-import type { PrivateAttributes } from "~/interfaces/Account/types";
-import { getPrivateAttributes } from "~/services/account";
+import type { PrivateAttributes } from "~/modules/account";
+import { UserAttributesForm, getPrivateAttributes } from "~/modules/account";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/account+/profile.tsx b/apps/carbon/app/routes/x+/account+/profile.tsx
index 0ac1eb2ffd..69616535ab 100644
--- a/apps/carbon/app/routes/x+/account+/profile.tsx
+++ b/apps/carbon/app/routes/x+/account+/profile.tsx
@@ -5,16 +5,17 @@ import { useLoaderData } from "@remix-run/react";
import { json } from "@remix-run/router";
import { validationError } from "remix-validated-form";
import { PageTitle, SectionTitle } from "~/components/Layout";
-import { ProfileForm, ProfilePhotoForm } from "~/interfaces/Account/Profile";
-import { UserAttributesForm } from "~/interfaces/Account/UserAttributes";
-import type { PublicAttributes } from "~/interfaces/Account/types";
import {
+ ProfileForm,
+ ProfilePhotoForm,
+ UserAttributesForm,
accountProfileValidator,
getAccount,
getPublicAttributes,
updateAvatar,
updatePublicAccount,
-} from "~/services/account";
+} from "~/modules/account";
+import type { PublicAttributes } from "~/modules/account";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
diff --git a/apps/carbon/app/routes/x+/purchasing+/_layout.tsx b/apps/carbon/app/routes/x+/purchasing+/_layout.tsx
index 6386ca85d2..b1a7320495 100644
--- a/apps/carbon/app/routes/x+/purchasing+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/_layout.tsx
@@ -2,7 +2,7 @@ import { Grid, VStack } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout/Sidebar";
-import { usePurchasingSidebar } from "~/interfaces/Purchasing";
+import { usePurchasingSidebar } from "~/modules/purchasing";
export const meta: MetaFunction = () => ({
title: "Carbon | Purchasing",
diff --git a/apps/carbon/app/routes/x+/purchasing+/supplier-types.$supplierTypeId.tsx b/apps/carbon/app/routes/x+/purchasing+/supplier-types.$supplierTypeId.tsx
index 903e310bb4..b2f94b9ca0 100644
--- a/apps/carbon/app/routes/x+/purchasing+/supplier-types.$supplierTypeId.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/supplier-types.$supplierTypeId.tsx
@@ -3,13 +3,13 @@ import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { SupplierTypeForm } from "~/interfaces/Purchasing/SupplierTypes";
-import { requirePermissions } from "~/services/auth";
import {
- supplierTypeValidator,
+ SupplierTypeForm,
getSupplierType,
+ supplierTypeValidator,
upsertSupplierType,
-} from "~/services/purchasing";
+} from "~/modules/purchasing";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
@@ -25,6 +25,15 @@ export async function loader({ request, params }: LoaderArgs) {
const supplierType = await getSupplierType(client, supplierTypeId);
+ if (supplierType.error) {
+ return redirect(
+ "/x/purchasing/supplier-types",
+ await flash(
+ request,
+ error(supplierType.error, "Failed to get supplier type")
+ )
+ );
+ }
if (supplierType?.data?.protected) {
return redirect(
"/x/purchasing/supplier-types",
@@ -33,7 +42,7 @@ export async function loader({ request, params }: LoaderArgs) {
}
return json({
- supplierType,
+ supplierType: supplierType.data,
});
}
@@ -79,9 +88,9 @@ export default function EditSupplierTypesRoute() {
const { supplierType } = useLoaderData<typeof loader>();
const initialValues = {
- id: supplierType.data?.id ?? undefined,
- name: supplierType.data?.name ?? "",
- color: supplierType.data?.color ?? "#000000",
+ id: supplierType.id ?? undefined,
+ name: supplierType.name ?? "",
+ color: supplierType.color ?? "#000000",
};
return <SupplierTypeForm initialValues={initialValues} />;
diff --git a/apps/carbon/app/routes/x+/purchasing+/supplier-types.delete.$supplierTypeId.tsx b/apps/carbon/app/routes/x+/purchasing+/supplier-types.delete.$supplierTypeId.tsx
index 3482046980..edb10c6aef 100644
--- a/apps/carbon/app/routes/x+/purchasing+/supplier-types.delete.$supplierTypeId.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/supplier-types.delete.$supplierTypeId.tsx
@@ -2,8 +2,8 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
+import { deleteSupplierType, getSupplierType } from "~/modules/purchasing";
import { requirePermissions } from "~/services/auth";
-import { deleteSupplierType, getSupplierType } from "~/services/purchasing";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
import { notFound } from "~/utils/http";
diff --git a/apps/carbon/app/routes/x+/purchasing+/supplier-types.new.tsx b/apps/carbon/app/routes/x+/purchasing+/supplier-types.new.tsx
index 025a6b2e54..e8a714cbed 100644
--- a/apps/carbon/app/routes/x+/purchasing+/supplier-types.new.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/supplier-types.new.tsx
@@ -2,12 +2,12 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { SupplierTypeForm } from "~/interfaces/Purchasing/SupplierTypes";
-import { requirePermissions } from "~/services/auth";
import {
+ SupplierTypeForm,
supplierTypeValidator,
upsertSupplierType,
-} from "~/services/purchasing";
+} from "~/modules/purchasing";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/purchasing+/supplier-types.tsx b/apps/carbon/app/routes/x+/purchasing+/supplier-types.tsx
index 53afe252f5..93610c8dfc 100644
--- a/apps/carbon/app/routes/x+/purchasing+/supplier-types.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/supplier-types.tsx
@@ -5,9 +5,9 @@ import { Outlet, useLoaderData } from "@remix-run/react";
import {
SupplierTypesTable,
SupplierTypesTableFilters,
-} from "~/interfaces/Purchasing/SupplierTypes";
+ getSupplierTypes,
+} from "~/modules/purchasing";
import { requirePermissions } from "~/services/auth";
-import { getSupplierTypes } from "~/services/purchasing";
import { getGenericQueryFilters } from "~/utils/query";
export async function loader({ request }: LoaderArgs) {
diff --git a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.$supplierContactId.tsx b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.$supplierContactId.tsx
index 807ea598b5..4ec0186a53 100644
--- a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.$supplierContactId.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.$supplierContactId.tsx
@@ -1,11 +1,11 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { requirePermissions } from "~/services/auth";
import {
- updateSupplierContact,
supplierContactValidator,
-} from "~/services/purchasing";
+ updateSupplierContact,
+} from "~/modules/purchasing";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, badRequest, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.delete.$supplierContactId.tsx b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.delete.$supplierContactId.tsx
index 1ab1c4d8a9..8ac29ec011 100644
--- a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.delete.$supplierContactId.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.delete.$supplierContactId.tsx
@@ -1,7 +1,7 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { requirePermissions } from "~/services/auth";
-import { deleteSupplierContact } from "~/services/purchasing";
+import { deleteSupplierContact } from "~/modules/purchasing";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.new.tsx b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.new.tsx
index 95160b63c4..1fb6807019 100644
--- a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.new.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.contact.new.tsx
@@ -1,11 +1,11 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { requirePermissions } from "~/services/auth";
import {
insertSupplierContact,
supplierContactValidator,
-} from "~/services/purchasing";
+} from "~/modules/purchasing";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.$supplierLocationId.tsx b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.$supplierLocationId.tsx
index fa99cedb45..ad2a0851a8 100644
--- a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.$supplierLocationId.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.$supplierLocationId.tsx
@@ -1,11 +1,11 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { requirePermissions } from "~/services/auth";
import {
updateSupplierLocation,
supplierLocationValidator,
-} from "~/services/purchasing";
+} from "~/modules/purchasing";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, badRequest, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.delete.$supplierLocationId.tsx b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.delete.$supplierLocationId.tsx
index 3914251892..70aadc33be 100644
--- a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.delete.$supplierLocationId.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.delete.$supplierLocationId.tsx
@@ -1,7 +1,7 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
+import { deleteSupplierLocation } from "~/modules/purchasing";
import { requirePermissions } from "~/services/auth";
-import { deleteSupplierLocation } from "~/services/purchasing";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.new.tsx b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.new.tsx
index 2b4c9b6157..b2d76804f2 100644
--- a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.new.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.location.new.tsx
@@ -1,11 +1,11 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { requirePermissions } from "~/services/auth";
import {
insertSupplierLocation,
supplierLocationValidator,
-} from "~/services/purchasing";
+} from "~/modules/purchasing";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.tsx b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.tsx
index 021a812564..bb099c1cfb 100644
--- a/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/suppliers.$supplierId.tsx
@@ -1,17 +1,16 @@
import type { ActionArgs, LoaderArgs } from "@remix-run/node";
-import { json } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
+import { json, redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { SupplierForm } from "~/interfaces/Purchasing/Suppliers";
-import { requirePermissions } from "~/services/auth";
import {
+ SupplierForm,
getSupplier,
getSupplierContacts,
getSupplierLocations,
supplierValidator,
updateSupplier,
-} from "~/services/purchasing";
+} from "~/modules/purchasing";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/purchasing+/suppliers.new.tsx b/apps/carbon/app/routes/x+/purchasing+/suppliers.new.tsx
index 24f097baef..a24a9ef440 100644
--- a/apps/carbon/app/routes/x+/purchasing+/suppliers.new.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/suppliers.new.tsx
@@ -1,9 +1,12 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { SupplierForm } from "~/interfaces/Purchasing/Suppliers";
+import {
+ SupplierForm,
+ insertSupplier,
+ supplierValidator,
+} from "~/modules/purchasing";
import { requirePermissions } from "~/services/auth";
-import { insertSupplier, supplierValidator } from "~/services/purchasing";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/purchasing+/suppliers.tsx b/apps/carbon/app/routes/x+/purchasing+/suppliers.tsx
index c33f489a5f..10cd218619 100644
--- a/apps/carbon/app/routes/x+/purchasing+/suppliers.tsx
+++ b/apps/carbon/app/routes/x+/purchasing+/suppliers.tsx
@@ -6,13 +6,11 @@ import { Outlet, useLoaderData } from "@remix-run/react";
import {
SuppliersTable,
SuppliersTableFilters,
-} from "~/interfaces/Purchasing/Suppliers";
-import { requirePermissions } from "~/services/auth";
-import {
getSuppliers,
getSupplierStatuses,
getSupplierTypes,
-} from "~/services/purchasing";
+} from "~/modules/purchasing";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/_layout.tsx b/apps/carbon/app/routes/x+/resources+/_layout.tsx
index 166aee42d5..b55fb47529 100644
--- a/apps/carbon/app/routes/x+/resources+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/resources+/_layout.tsx
@@ -2,7 +2,7 @@ import { Grid, VStack } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout/Sidebar";
-import { useResourcesSidebar } from "~/interfaces/Resources";
+import { useResourcesSidebar } from "~/modules/resources";
export const meta: MetaFunction = () => ({
title: "Carbon | Resources",
diff --git a/apps/carbon/app/routes/x+/resources+/abilities.delete.$abilityId.tsx b/apps/carbon/app/routes/x+/resources+/abilities.delete.$abilityId.tsx
index 3497c6eebd..076787c2d3 100644
--- a/apps/carbon/app/routes/x+/resources+/abilities.delete.$abilityId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/abilities.delete.$abilityId.tsx
@@ -2,8 +2,8 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
+import { deleteAbility, getAbility } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteAbility, getAbility } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
import { notFound } from "~/utils/http";
diff --git a/apps/carbon/app/routes/x+/resources+/abilities.new.tsx b/apps/carbon/app/routes/x+/resources+/abilities.new.tsx
index 6609b32ed7..d407112a35 100644
--- a/apps/carbon/app/routes/x+/resources+/abilities.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/abilities.new.tsx
@@ -2,17 +2,17 @@ import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { AbilityForm } from "~/interfaces/Resources/Abilities";
-import { assertIsPost } from "~/utils/http";
-import { error, success } from "~/utils/result";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
+ AbilityForm,
abilityValidator,
deleteAbility,
insertAbility,
insertEmployeeAbilities,
-} from "~/services/resources";
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
+import { assertIsPost } from "~/utils/http";
+import { error, success } from "~/utils/result";
function makeCurve(startingPoint: number, weeks: number) {
return {
diff --git a/apps/carbon/app/routes/x+/resources+/abilities.tsx b/apps/carbon/app/routes/x+/resources+/abilities.tsx
index 9268afdb6b..b09507bfff 100644
--- a/apps/carbon/app/routes/x+/resources+/abilities.tsx
+++ b/apps/carbon/app/routes/x+/resources+/abilities.tsx
@@ -1,15 +1,14 @@
import { VStack } from "@chakra-ui/react";
import type { LoaderArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-import { json } from "@remix-run/node";
+import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
import {
AbilitiesTable,
AbilitiesTableFilters,
-} from "~/interfaces/Resources/Abilities";
+ getAbilities,
+} from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { getAbilities } from "~/services/resources";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.$id.tsx b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.$id.tsx
index c9490cdad9..0dc90541b3 100644
--- a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.$id.tsx
+++ b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.$id.tsx
@@ -3,16 +3,16 @@ import { redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { validationError } from "remix-validated-form";
import { useRouteData } from "~/hooks";
-import { EmployeeAbilityForm } from "~/interfaces/Resources/Abilities";
-import type { Ability } from "~/interfaces/Resources/types";
-import { getTrainingStatus } from "~/interfaces/Resources/types";
-import { AbilityEmployeeStatus } from "~/interfaces/Resources/types";
-import { requirePermissions } from "~/services/auth";
+import { EmployeeAbilityForm } from "~/modules/resources/interfaces/Abilities";
+import type { Ability } from "~/modules/resources";
import {
+ AbilityEmployeeStatus,
employeeAbilityValidator,
getEmployeeAbility,
+ getTrainingStatus,
upsertEmployeeAbility,
-} from "~/services/resources";
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
@@ -104,9 +104,10 @@ export default function EmployeeAbilityRoute() {
if (Array.isArray(employeeAbility?.user)) {
throw new Error("employeeAbility.user is an array");
}
+
const initialValues = {
- employeeId: employeeAbility?.user?.id,
- trainingStatus: getTrainingStatus(employeeAbility),
+ employeeId: employeeAbility?.user?.id ?? "",
+ trainingStatus: getTrainingStatus(employeeAbility) ?? "",
trainingPercent: getTrainingPercent(
employeeAbility?.trainingDays,
routeData?.weeks
diff --git a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.delete.$id.tsx b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.delete.$id.tsx
index 789708fb4b..1901ce56ba 100644
--- a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.delete.$id.tsx
+++ b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.delete.$id.tsx
@@ -3,9 +3,9 @@ import { redirect } from "@remix-run/node";
import { useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
import { useRouteData } from "~/hooks";
-import type { Ability } from "~/interfaces/Resources/types";
+import type { Ability } from "~/modules/resources";
+import { deleteEmployeeAbility } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteEmployeeAbility } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.new.tsx b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.new.tsx
index 284457b607..023b4638f7 100644
--- a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.employee.new.tsx
@@ -3,14 +3,14 @@ import { redirect } from "@remix-run/node";
import { useNavigate, useParams } from "@remix-run/react";
import { validationError } from "remix-validated-form";
import { useRouteData } from "~/hooks";
-import { EmployeeAbilityForm } from "~/interfaces/Resources/Abilities";
-import type { Ability } from "~/interfaces/Resources/types";
-import { AbilityEmployeeStatus } from "~/interfaces/Resources/types";
+import { EmployeeAbilityForm } from "~/modules/resources/interfaces/Abilities";
+import type { Ability } from "~/modules/resources";
+import { AbilityEmployeeStatus } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import {
employeeAbilityValidator,
upsertEmployeeAbility,
-} from "~/services/resources";
+} from "~/modules/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
@@ -74,6 +74,7 @@ export default function NewEmployeeAbilityRoute() {
return (
<EmployeeAbilityForm
initialValues={{
+ // @ts-expect-error
employeeId: undefined,
}}
ability={abilitiesRouteData?.ability}
diff --git a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.tsx b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.tsx
index 1acea622c3..77ebc73fd5 100644
--- a/apps/carbon/app/routes/x+/resources+/ability.$abilityId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/ability.$abilityId.tsx
@@ -26,15 +26,13 @@ import { Hidden, Input, Submit } from "~/components/Form";
import {
AbilityChart,
AbilityEmployeesTable,
-} from "~/interfaces/Resources/Abilities";
-import type { AbilityDatum } from "~/interfaces/Resources/types";
-import { requirePermissions } from "~/services/auth";
-import {
+ abilityCurveValidator,
abilityNameValidator,
getAbility,
updateAbility,
- abilityCurveValidator,
-} from "~/services/resources";
+} from "~/modules/resources";
+import type { AbilityDatum } from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/attribute.$attributeId.tsx b/apps/carbon/app/routes/x+/resources+/attribute.$attributeId.tsx
index 30a9af486b..ee1449684d 100644
--- a/apps/carbon/app/routes/x+/resources+/attribute.$attributeId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/attribute.$attributeId.tsx
@@ -1,8 +1,8 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
+import { attributeValidator, updateAttribute } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { attributeValidator, updateAttribute } from "~/services/resources";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/attribute.delete.$attributeId.tsx b/apps/carbon/app/routes/x+/resources+/attribute.delete.$attributeId.tsx
index ef6a2571d5..bdb3121336 100644
--- a/apps/carbon/app/routes/x+/resources+/attribute.delete.$attributeId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/attribute.delete.$attributeId.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
+import { deleteAttribute } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteAttribute } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/attribute.new.tsx b/apps/carbon/app/routes/x+/resources+/attribute.new.tsx
index e26cd17f04..38a15ae123 100644
--- a/apps/carbon/app/routes/x+/resources+/attribute.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/attribute.new.tsx
@@ -2,9 +2,9 @@ import type { ActionArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
+import { attributeValidator, insertAttribute } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { attributeValidator, insertAttribute } from "~/services/resources";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/attributes.$categoryId.tsx b/apps/carbon/app/routes/x+/resources+/attributes.$categoryId.tsx
index 07394daa8d..63de8c1de5 100644
--- a/apps/carbon/app/routes/x+/resources+/attributes.$categoryId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/attributes.$categoryId.tsx
@@ -2,14 +2,14 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { redirect, json } from "@remix-run/node";
import { useLoaderData, useNavigate } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { AttributeCategoryForm } from "~/interfaces/Resources/Attributes";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
+ AttributeCategoryForm,
attributeCategoryValidator,
getAttributeCategory,
updateAttributeCategory,
-} from "~/services/resources";
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/attributes.delete.$categoryId.tsx b/apps/carbon/app/routes/x+/resources+/attributes.delete.$categoryId.tsx
index 3adb079dca..123ebcf1a9 100644
--- a/apps/carbon/app/routes/x+/resources+/attributes.delete.$categoryId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/attributes.delete.$categoryId.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
+import { deleteAttributeCategory } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteAttributeCategory } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.$attributeId.tsx b/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.$attributeId.tsx
index 3eb993b964..4dc3931a6e 100644
--- a/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.$attributeId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.$attributeId.tsx
@@ -3,10 +3,9 @@ import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { useRouteData } from "~/hooks";
-import { AttributeForm } from "~/interfaces/Resources/Attributes";
-import type { AttributeDataType } from "~/interfaces/Resources/types";
+import { AttributeForm, getAttribute } from "~/modules/resources";
+import type { AttributeDataType } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { getAttribute } from "~/services/resources";
import { flash } from "~/services/session";
import { notFound } from "~/utils/http";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.new.tsx b/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.new.tsx
index 41a0da11b1..3a81846188 100644
--- a/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.new.tsx
@@ -1,7 +1,8 @@
import { useNavigate, useParams } from "@remix-run/react";
import { useRouteData } from "~/hooks";
-import { AttributeForm } from "~/interfaces/Resources/Attributes";
-import type { AttributeDataType } from "~/interfaces/Resources/types";
+import { AttributeForm } from "~/modules/resources";
+import type { AttributeDataType } from "~/modules/resources";
+import { DataType } from "~/modules/users";
export default function NewAttributeRoute() {
const { categoryId } = useParams();
@@ -17,7 +18,7 @@ export default function NewAttributeRoute() {
<AttributeForm
initialValues={{
name: "",
- attributeDataTypeId: undefined,
+ attributeDataTypeId: DataType.Text,
userAttributeCategoryId: categoryId,
canSelfManage: true,
}}
diff --git a/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.tsx b/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.tsx
index 85f002ff26..4a8232adba 100644
--- a/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/attributes.list.$categoryId.tsx
@@ -2,13 +2,13 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData, useNavigate } from "@remix-run/react";
import { useUrlParams } from "~/hooks";
-import { AttributeCategoryDetail } from "~/interfaces/Resources/Attributes";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
+ AttributeCategoryDetail,
getAttributeCategory,
updateAttributeSortOrder,
-} from "~/services/resources";
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/attributes.new.tsx b/apps/carbon/app/routes/x+/resources+/attributes.new.tsx
index 1c4d21d323..f420dc438e 100644
--- a/apps/carbon/app/routes/x+/resources+/attributes.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/attributes.new.tsx
@@ -2,13 +2,13 @@ import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useNavigate } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { AttributeCategoryForm } from "~/interfaces/Resources/Attributes";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
+ AttributeCategoryForm,
attributeCategoryValidator,
insertAttributeCategory,
-} from "~/services/resources";
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/attributes.tsx b/apps/carbon/app/routes/x+/resources+/attributes.tsx
index 347afce8c5..a93c4addfd 100644
--- a/apps/carbon/app/routes/x+/resources+/attributes.tsx
+++ b/apps/carbon/app/routes/x+/resources+/attributes.tsx
@@ -1,17 +1,14 @@
import { VStack } from "@chakra-ui/react";
import type { LoaderArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-import { json } from "@remix-run/node";
+import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
+import { requirePermissions } from "~/services/auth";
import {
AttributeCategoriesTable,
AttributeCategoriesTableFilters,
-} from "~/interfaces/Resources/Attributes";
-import { requirePermissions } from "~/services/auth";
-import {
getAttributeCategories,
getAttributeDataTypes,
-} from "~/services/resources";
+} from "~/modules/resources";
import { flash } from "~/services/session";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/departments.$departmentId.tsx b/apps/carbon/app/routes/x+/resources+/departments.$departmentId.tsx
index 22ca10ce61..7c5e45c36a 100644
--- a/apps/carbon/app/routes/x+/resources+/departments.$departmentId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/departments.$departmentId.tsx
@@ -3,14 +3,14 @@ import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { DepartmentForm } from "~/interfaces/Resources/Departments";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
- getDepartment,
+ DepartmentForm,
departmentValidator,
+ getDepartment,
upsertDepartment,
-} from "~/services/resources";
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/departments.delete.$departmentId.tsx b/apps/carbon/app/routes/x+/resources+/departments.delete.$departmentId.tsx
index 31d7fc5abc..1183599029 100644
--- a/apps/carbon/app/routes/x+/resources+/departments.delete.$departmentId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/departments.delete.$departmentId.tsx
@@ -2,8 +2,8 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
+import { deleteDepartment, getDepartment } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteDepartment, getDepartment } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
import { notFound } from "~/utils/http";
diff --git a/apps/carbon/app/routes/x+/resources+/departments.new.tsx b/apps/carbon/app/routes/x+/resources+/departments.new.tsx
index 74ba79f6a4..1b99b06dc4 100644
--- a/apps/carbon/app/routes/x+/resources+/departments.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/departments.new.tsx
@@ -1,9 +1,12 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { DepartmentForm } from "~/interfaces/Resources/Departments";
+import {
+ DepartmentForm,
+ departmentValidator,
+ upsertDepartment,
+} from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { departmentValidator, upsertDepartment } from "~/services/resources";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/departments.tsx b/apps/carbon/app/routes/x+/resources+/departments.tsx
index 03a53553b0..c109d5bc3c 100644
--- a/apps/carbon/app/routes/x+/resources+/departments.tsx
+++ b/apps/carbon/app/routes/x+/resources+/departments.tsx
@@ -6,10 +6,10 @@ import { Outlet, useLoaderData } from "@remix-run/react";
import {
DepartmentsTable,
DepartmentsTableFilters,
-} from "~/interfaces/Resources/Departments";
+ getDepartments,
+} from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { getDepartments } from "~/services/resources";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/equipment.$typeId.tsx b/apps/carbon/app/routes/x+/resources+/equipment.$typeId.tsx
index 96ce346b0d..fe6dd535d2 100644
--- a/apps/carbon/app/routes/x+/resources+/equipment.$typeId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/equipment.$typeId.tsx
@@ -2,14 +2,14 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { redirect, json } from "@remix-run/node";
import { useLoaderData, useNavigate } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { EquipmentTypeForm } from "~/interfaces/Resources/Equipment";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import {
+ EquipmentTypeForm,
equipmentTypeValidator,
getEquipmentType,
upsertEquipmentType,
-} from "~/services/resources";
+} from "~/modules/resources";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/equipment.delete.$typeId.tsx b/apps/carbon/app/routes/x+/resources+/equipment.delete.$typeId.tsx
index 2483aa48cd..c21c53ca2b 100644
--- a/apps/carbon/app/routes/x+/resources+/equipment.delete.$typeId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/equipment.delete.$typeId.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
+import { deleteEquipmentType } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteEquipmentType } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.$equipmentId.tsx b/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.$equipmentId.tsx
index 8dff2a602b..e3cfd6c81e 100644
--- a/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.$equipmentId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.$equipmentId.tsx
@@ -3,10 +3,9 @@ import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { useRouteData } from "~/hooks";
-import { EquipmentForm } from "~/interfaces/Resources/Equipment";
-import type { EquipmentType } from "~/interfaces/Resources/types";
+import type { EquipmentType } from "~/modules/resources";
+import { EquipmentForm, getEquipment } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { getEquipment } from "~/services/resources";
import { flash } from "~/services/session";
import { notFound } from "~/utils/http";
import { error } from "~/utils/result";
@@ -47,6 +46,7 @@ export default function EditEquipmentRoute() {
!equipment ||
!typeId ||
Array.isArray(equipment.equipmentType) ||
+ Array.isArray(equipment.location) ||
Array.isArray(equipment.workCell)
) {
return null;
@@ -58,6 +58,7 @@ export default function EditEquipmentRoute() {
id: equipment?.id,
name: equipment?.name ?? "",
description: equipment?.description ?? "",
+ locationId: equipment?.location?.id ?? "",
equipmentTypeId: equipment?.equipmentType?.id ?? typeId,
operatorsRequired: equipment?.operatorsRequired ?? 1,
setupHours: equipment?.setupHours ?? 0,
diff --git a/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.new.tsx b/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.new.tsx
index 210733f1db..d1561dd7e3 100644
--- a/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.new.tsx
@@ -1,7 +1,7 @@
import { useNavigate, useParams } from "@remix-run/react";
import { useRouteData } from "~/hooks";
-import { EquipmentForm } from "~/interfaces/Resources/Equipment";
-import type { EquipmentType } from "~/interfaces/Resources/types";
+import { EquipmentForm } from "~/modules/resources";
+import type { EquipmentType } from "~/modules/resources";
export default function NewEquipmentRoute() {
const { typeId } = useParams();
diff --git a/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.tsx b/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.tsx
index 615754c40e..a2e4eb5f7a 100644
--- a/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/equipment.list.$typeId.tsx
@@ -2,10 +2,9 @@ import type { LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData, useNavigate } from "@remix-run/react";
import { useUrlParams } from "~/hooks";
-import { EquipmentTypeDetail } from "~/interfaces/Resources/Equipment";
+import { EquipmentTypeDetail, getEquipmentType } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { getEquipmentType } from "~/services/resources";
import { notFound } from "~/utils/http";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/equipment.new.tsx b/apps/carbon/app/routes/x+/resources+/equipment.new.tsx
index 944f856d4d..dd93fd7f77 100644
--- a/apps/carbon/app/routes/x+/resources+/equipment.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/equipment.new.tsx
@@ -2,13 +2,13 @@ import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useNavigate } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { EquipmentTypeForm } from "~/interfaces/Resources/Equipment";
import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
+ EquipmentTypeForm,
equipmentTypeValidator,
upsertEquipmentType,
-} from "~/services/resources";
+} from "~/modules/resources";
+import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/equipment.tsx b/apps/carbon/app/routes/x+/resources+/equipment.tsx
index 86b4360d09..640403be36 100644
--- a/apps/carbon/app/routes/x+/resources+/equipment.tsx
+++ b/apps/carbon/app/routes/x+/resources+/equipment.tsx
@@ -6,9 +6,9 @@ import { Outlet, useLoaderData } from "@remix-run/react";
import {
EquipmentTypesTable,
EquipmentTypesTableFilters,
-} from "~/interfaces/Resources/Equipment";
+ getEquipmentTypes,
+} from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { getEquipmentTypes } from "~/services/resources";
import { flash } from "~/services/session";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/equipment.unit.$equipmentId.tsx b/apps/carbon/app/routes/x+/resources+/equipment.unit.$equipmentId.tsx
index fbd17caaf9..4933af9e1f 100644
--- a/apps/carbon/app/routes/x+/resources+/equipment.unit.$equipmentId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/equipment.unit.$equipmentId.tsx
@@ -1,8 +1,8 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
+import { equipmentValidator, upsertEquipment } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { equipmentValidator, upsertEquipment } from "~/services/resources";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/equipment.unit.delete.$equipmentId.tsx b/apps/carbon/app/routes/x+/resources+/equipment.unit.delete.$equipmentId.tsx
index 9b1f38eed9..7dc81e629b 100644
--- a/apps/carbon/app/routes/x+/resources+/equipment.unit.delete.$equipmentId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/equipment.unit.delete.$equipmentId.tsx
@@ -3,8 +3,8 @@ import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
+import { deleteEquipment, getEquipment } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteEquipment, getEquipment } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/equipment.unit.new.tsx b/apps/carbon/app/routes/x+/resources+/equipment.unit.new.tsx
index aa16cb1021..9c671a1f1c 100644
--- a/apps/carbon/app/routes/x+/resources+/equipment.unit.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/equipment.unit.new.tsx
@@ -2,9 +2,9 @@ import type { ActionArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
+import { equipmentValidator, upsertEquipment } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { equipmentValidator, upsertEquipment } from "~/services/resources";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/holidays.$holidayId.tsx b/apps/carbon/app/routes/x+/resources+/holidays.$holidayId.tsx
index d263cf1eec..091c10815d 100644
--- a/apps/carbon/app/routes/x+/resources+/holidays.$holidayId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/holidays.$holidayId.tsx
@@ -3,14 +3,14 @@ import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { HolidayForm } from "~/interfaces/Resources/Holidays";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
+ HolidayForm,
getHoliday,
holidayValidator,
upsertHoliday,
-} from "~/services/resources";
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/holidays.delete.$holidayId.tsx b/apps/carbon/app/routes/x+/resources+/holidays.delete.$holidayId.tsx
index d0dce9a9a0..138cfdeab1 100644
--- a/apps/carbon/app/routes/x+/resources+/holidays.delete.$holidayId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/holidays.delete.$holidayId.tsx
@@ -2,8 +2,8 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
+import { deleteHoliday, getHoliday } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteHoliday, getHoliday } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
import { notFound } from "~/utils/http";
diff --git a/apps/carbon/app/routes/x+/resources+/holidays.new.tsx b/apps/carbon/app/routes/x+/resources+/holidays.new.tsx
index ad28c6d7e9..f52c50cb84 100644
--- a/apps/carbon/app/routes/x+/resources+/holidays.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/holidays.new.tsx
@@ -1,9 +1,12 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { HolidayForm } from "~/interfaces/Resources/Holidays";
import { requirePermissions } from "~/services/auth";
-import { holidayValidator, upsertHoliday } from "~/services/resources";
+import {
+ HolidayForm,
+ holidayValidator,
+ upsertHoliday,
+} from "~/modules/resources";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/holidays.tsx b/apps/carbon/app/routes/x+/resources+/holidays.tsx
index 35b873e200..73f133dbc1 100644
--- a/apps/carbon/app/routes/x+/resources+/holidays.tsx
+++ b/apps/carbon/app/routes/x+/resources+/holidays.tsx
@@ -6,10 +6,11 @@ import { Outlet, useLoaderData } from "@remix-run/react";
import {
HolidaysTable,
HolidaysTableFilters,
-} from "~/interfaces/Resources/Holidays";
+ getHolidays,
+ getHolidayYears,
+} from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { getHolidays, getHolidayYears } from "~/services/resources";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/locations.$locationId.tsx b/apps/carbon/app/routes/x+/resources+/locations.$locationId.tsx
index 3546eceb88..08129fad82 100644
--- a/apps/carbon/app/routes/x+/resources+/locations.$locationId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/locations.$locationId.tsx
@@ -3,14 +3,14 @@ import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { LocationForm } from "~/interfaces/Resources/Locations";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
+ LocationForm,
getLocation,
locationValidator,
upsertLocation,
-} from "~/services/resources";
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
import { getLocalTimeZone } from "@internationalized/date";
diff --git a/apps/carbon/app/routes/x+/resources+/locations.delete.$locationId.tsx b/apps/carbon/app/routes/x+/resources+/locations.delete.$locationId.tsx
index ef18e865bd..51fd34457f 100644
--- a/apps/carbon/app/routes/x+/resources+/locations.delete.$locationId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/locations.delete.$locationId.tsx
@@ -2,8 +2,8 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
+import { deleteLocation, getLocation } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteLocation, getLocation } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
import { notFound } from "~/utils/http";
diff --git a/apps/carbon/app/routes/x+/resources+/locations.new.tsx b/apps/carbon/app/routes/x+/resources+/locations.new.tsx
index 9f4e0918bc..5472cfdf69 100644
--- a/apps/carbon/app/routes/x+/resources+/locations.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/locations.new.tsx
@@ -2,9 +2,12 @@ import { getLocalTimeZone } from "@internationalized/date";
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { LocationForm } from "~/interfaces/Resources/Locations";
+import {
+ LocationForm,
+ locationValidator,
+ upsertLocation,
+} from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { locationValidator, upsertLocation } from "~/services/resources";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/locations.tsx b/apps/carbon/app/routes/x+/resources+/locations.tsx
index 8cd5ab53ce..00f722fb11 100644
--- a/apps/carbon/app/routes/x+/resources+/locations.tsx
+++ b/apps/carbon/app/routes/x+/resources+/locations.tsx
@@ -6,10 +6,10 @@ import { Outlet, useLoaderData } from "@remix-run/react";
import {
LocationsTable,
LocationsTableFilters,
-} from "~/interfaces/Resources/Locations";
+ getLocations,
+} from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { getLocations } from "~/services/resources";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/partners.$supplierId.tsx b/apps/carbon/app/routes/x+/resources+/partners.$supplierId.tsx
new file mode 100644
index 0000000000..4c34d4be82
--- /dev/null
+++ b/apps/carbon/app/routes/x+/resources+/partners.$supplierId.tsx
@@ -0,0 +1,85 @@
+import type { ActionArgs, LoaderArgs } from "@remix-run/node";
+import { json } from "@remix-run/node";
+import { redirect } from "@remix-run/node";
+import { useLoaderData } from "@remix-run/react";
+import { validationError } from "remix-validated-form";
+import {
+ PartnerForm,
+ partnerValidator,
+ getPartner,
+ upsertPartner,
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
+import { assertIsPost, notFound } from "~/utils/http";
+import { error, success } from "~/utils/result";
+
+export async function loader({ request, params }: LoaderArgs) {
+ const { client } = await requirePermissions(request, {
+ view: "resources",
+ });
+
+ const { supplierId } = params;
+ if (!supplierId) throw notFound("Partner ID was not found");
+
+ const partner = await getPartner(client, supplierId);
+
+ if (partner.error) {
+ return redirect(
+ "/x/resources/partners",
+ await flash(request, error(partner.error, "Failed to get partner"))
+ );
+ }
+
+ return json({
+ partner: partner.data,
+ });
+}
+
+export async function action({ request }: ActionArgs) {
+ assertIsPost(request);
+ const { client, userId } = await requirePermissions(request, {
+ create: "resources",
+ });
+
+ const validation = await partnerValidator.validate(await request.formData());
+
+ if (validation.error) {
+ return validationError(validation.error);
+ }
+
+ const { id, hoursPerWeek } = validation.data;
+ if (!id) throw notFound("Partner ID was not found");
+
+ const updatePartner = await upsertPartner(client, {
+ id,
+ hoursPerWeek,
+ updatedBy: userId,
+ });
+
+ if (updatePartner.error) {
+ return redirect(
+ "/x/resources/partners",
+ await flash(
+ request,
+ error(updatePartner.error, "Failed to create partner.")
+ )
+ );
+ }
+
+ return redirect(
+ "/x/resources/partners",
+ await flash(request, success("Partner updated."))
+ );
+}
+
+export default function PartnerRoute() {
+ const { partner } = useLoaderData<typeof loader>();
+
+ const initialValues = {
+ id: partner.id,
+ hoursPerWeek: partner.hoursPerWeek,
+ };
+
+ return <PartnerForm initialValues={initialValues} />;
+}
diff --git a/apps/carbon/app/routes/x+/resources+/partners.delete.$supplierId.tsx b/apps/carbon/app/routes/x+/resources+/partners.delete.$supplierId.tsx
new file mode 100644
index 0000000000..5bbb022d36
--- /dev/null
+++ b/apps/carbon/app/routes/x+/resources+/partners.delete.$supplierId.tsx
@@ -0,0 +1,83 @@
+import type { ActionArgs, LoaderArgs } from "@remix-run/node";
+import { json, redirect } from "@remix-run/node";
+import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
+import { ConfirmDelete } from "~/components/Modals";
+import { deletePartner, getPartner } from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
+import { error, success } from "~/utils/result";
+import { notFound } from "~/utils/http";
+
+export async function loader({ request, params }: LoaderArgs) {
+ const { client } = await requirePermissions(request, {
+ view: "resources",
+ role: "employee",
+ });
+
+ const { supplierId } = params;
+ if (!supplierId) throw notFound("supplierId not found");
+
+ const partner = await getPartner(client, supplierId);
+ if (partner.error) {
+ return redirect(
+ "/x/resources/partners",
+ await flash(request, error(partner.error, "Failed to get partner"))
+ );
+ }
+
+ return json({
+ partner: partner.data,
+ });
+}
+
+export async function action({ request, params }: ActionArgs) {
+ const { client } = await requirePermissions(request, {
+ delete: "resources",
+ });
+
+ const { supplierId } = params;
+ if (!supplierId) {
+ return redirect(
+ "/x/resources/partners",
+ await flash(request, error(params, "Failed to get partner id"))
+ );
+ }
+
+ const { error: deletePartnerError } = await deletePartner(client, supplierId);
+ if (deletePartnerError) {
+ return redirect(
+ "/x/resources/partners",
+ await flash(
+ request,
+ error(deletePartnerError, "Failed to delete partner")
+ )
+ );
+ }
+
+ return redirect(
+ "/x/resources/partners",
+ await flash(request, success("Successfully deleted partner"))
+ );
+}
+
+export default function DeletePartnerRoute() {
+ const { supplierId } = useParams();
+ const { partner } = useLoaderData<typeof loader>();
+ const navigate = useNavigate();
+
+ if (!supplierId || !partner || !partner.supplier) return null;
+ const name = Array.isArray(partner.supplier)
+ ? partner.supplier[0].name
+ : partner.supplier.name;
+
+ const onCancel = () => navigate("/x/resources/partners");
+
+ return (
+ <ConfirmDelete
+ action={`/x/resources/partners/delete/${supplierId}`}
+ name={name}
+ text={`Are you sure you want to delete the partner: ${name}? This cannot be undone.`}
+ onCancel={onCancel}
+ />
+ );
+}
diff --git a/apps/carbon/app/routes/x+/resources+/partners.new.tsx b/apps/carbon/app/routes/x+/resources+/partners.new.tsx
new file mode 100644
index 0000000000..dacc72d17f
--- /dev/null
+++ b/apps/carbon/app/routes/x+/resources+/partners.new.tsx
@@ -0,0 +1,57 @@
+import type { ActionArgs } from "@remix-run/node";
+import { redirect } from "@remix-run/node";
+import { validationError } from "remix-validated-form";
+import {
+ PartnerForm,
+ partnerValidator,
+ upsertPartner,
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
+import { assertIsPost } from "~/utils/http";
+import { error, success } from "~/utils/result";
+
+export async function action({ request }: ActionArgs) {
+ assertIsPost(request);
+ const { client, userId } = await requirePermissions(request, {
+ create: "resources",
+ });
+
+ const validation = await partnerValidator.validate(await request.formData());
+
+ if (validation.error) {
+ return validationError(validation.error);
+ }
+
+ const { id, hoursPerWeek } = validation.data;
+
+ const createPartner = await upsertPartner(client, {
+ id,
+ hoursPerWeek,
+ createdBy: userId,
+ });
+
+ if (createPartner.error) {
+ return redirect(
+ "/x/resources/partners",
+ await flash(
+ request,
+ error(createPartner.error, "Failed to create partner.")
+ )
+ );
+ }
+
+ return redirect(
+ "/x/resources/partners",
+ await flash(request, success("Partner created."))
+ );
+}
+
+export default function NewPartnerRoute() {
+ const initialValues = {
+ id: "",
+ hoursPerWeek: 0,
+ };
+
+ return <PartnerForm initialValues={initialValues} />;
+}
diff --git a/apps/carbon/app/routes/x+/resources+/partners.tsx b/apps/carbon/app/routes/x+/resources+/partners.tsx
new file mode 100644
index 0000000000..26713723dd
--- /dev/null
+++ b/apps/carbon/app/routes/x+/resources+/partners.tsx
@@ -0,0 +1,57 @@
+import { VStack } from "@chakra-ui/react";
+import type { LoaderArgs } from "@remix-run/node";
+import { redirect } from "@remix-run/node";
+import { json } from "@remix-run/node";
+import { Outlet, useLoaderData } from "@remix-run/react";
+import {
+ PartnersTable,
+ PartnersTableFilters,
+ getPartners,
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
+import { getGenericQueryFilters } from "~/utils/query";
+import { error } from "~/utils/result";
+
+export async function loader({ request }: LoaderArgs) {
+ const { client } = await requirePermissions(request, {
+ view: "resources",
+ role: "employee",
+ });
+
+ const url = new URL(request.url);
+ const searchParams = new URLSearchParams(url.search);
+ const name = searchParams.get("name");
+ const { limit, offset, sorts } = getGenericQueryFilters(searchParams);
+
+ const partners = await getPartners(client, {
+ name,
+ limit,
+ offset,
+ sorts,
+ });
+
+ if (partners.error) {
+ return redirect(
+ "/x/resources",
+ await flash(request, error(partners.error, "Failed to load partners"))
+ );
+ }
+
+ return json({
+ partners: partners.data ?? [],
+ count: partners.count ?? 0,
+ });
+}
+
+export default function Route() {
+ const { partners, count } = useLoaderData<typeof loader>();
+
+ return (
+ <VStack w="full" h="full" spacing={0}>
+ <PartnersTableFilters />
+ <PartnersTable data={partners} count={count} />
+ <Outlet />
+ </VStack>
+ );
+}
diff --git a/apps/carbon/app/routes/x+/resources+/people.tsx b/apps/carbon/app/routes/x+/resources+/people.tsx
index 4482e0fdbc..14da49b619 100644
--- a/apps/carbon/app/routes/x+/resources+/people.tsx
+++ b/apps/carbon/app/routes/x+/resources+/people.tsx
@@ -4,11 +4,15 @@ import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
import { usePermissions } from "~/hooks";
-import { PeopleTable, PeopleTableFilters } from "~/interfaces/Resources/People";
+import {
+ PeopleTable,
+ PeopleTableFilters,
+ getAttributeCategories,
+ getPeople,
+} from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { getAttributeCategories, getPeople } from "~/services/resources";
import { flash } from "~/services/session";
-import { getEmployeeTypes } from "~/services/users";
+import { getEmployeeTypes } from "~/modules/users";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/person.$personId.notes.delete.$noteId.tsx b/apps/carbon/app/routes/x+/resources+/person.$personId.notes.delete.$noteId.tsx
index 92edbffd57..4bd874fd72 100644
--- a/apps/carbon/app/routes/x+/resources+/person.$personId.notes.delete.$noteId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/person.$personId.notes.delete.$noteId.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
+import { deleteNote } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteNote } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/person.$personId.notes.new.tsx b/apps/carbon/app/routes/x+/resources+/person.$personId.notes.new.tsx
index a448dd7e0f..caba91c0da 100644
--- a/apps/carbon/app/routes/x+/resources+/person.$personId.notes.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/person.$personId.notes.new.tsx
@@ -2,8 +2,8 @@ import type { ActionArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import { redirect } from "react-router";
import { validationError } from "remix-validated-form";
+import { insertNote, noteValidator } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { insertNote, noteValidator } from "~/services/resources";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/person.$personId.tsx b/apps/carbon/app/routes/x+/resources+/person.$personId.tsx
index 76faff9978..c6c132174b 100644
--- a/apps/carbon/app/routes/x+/resources+/person.$personId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/person.$personId.tsx
@@ -4,30 +4,28 @@ import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import {
- PersonAbilities,
- PersonHeader,
- PersonTabs,
- PersonDaysOff,
- PersonOvertime,
-} from "~/interfaces/Resources/Person";
-import type { EmployeeJob } from "~/interfaces/Resources/types";
import logger from "~/lib/logger";
+import type { EmployeeJob } from "~/modules/resources";
import {
accountProfileValidator,
getAccount,
getPrivateAttributes,
getPublicAttributes,
updatePublicAccount,
-} from "~/services/account";
-import { requirePermissions } from "~/services/auth";
+} from "~/modules/account";
import {
+ PersonAbilities,
+ PersonHeader,
+ PersonTabs,
+ PersonDaysOff,
+ PersonOvertime,
employeeJobValidator,
getEmployeeAbilities,
getEmployeeJob,
getNotes,
upsertEmployeeJob,
-} from "~/services/resources";
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
@@ -128,10 +126,12 @@ export async function action({ request, params }: ActionArgs) {
return validationError(validation.error);
}
- const { title, locationId, shiftId, managerId } = validation.data;
+ const { title, startDate, locationId, shiftId, managerId } =
+ validation.data;
const updateJob = await upsertEmployeeJob(client, personId, {
title: title ?? null,
+ startDate: startDate ?? null,
locationId: locationId ?? null,
shiftId: shiftId ?? null,
managerId: managerId ?? null,
diff --git a/apps/carbon/app/routes/x+/resources+/shifts.$shiftId.tsx b/apps/carbon/app/routes/x+/resources+/shifts.$shiftId.tsx
index b92f54ab68..eb7dfe6cd8 100644
--- a/apps/carbon/app/routes/x+/resources+/shifts.$shiftId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/shifts.$shiftId.tsx
@@ -3,10 +3,14 @@ import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { ShiftForm } from "~/interfaces/Resources/Shifts";
+import {
+ ShiftForm,
+ getShift,
+ shiftValidator,
+ upsertShift,
+} from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { getShift, shiftValidator, upsertShift } from "~/services/resources";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/shifts.delete.$shiftId.tsx b/apps/carbon/app/routes/x+/resources+/shifts.delete.$shiftId.tsx
index 688c6a0655..6cacdd138d 100644
--- a/apps/carbon/app/routes/x+/resources+/shifts.delete.$shiftId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/shifts.delete.$shiftId.tsx
@@ -2,8 +2,8 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
+import { deleteShift, getShift } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteShift, getShift } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
import { notFound } from "~/utils/http";
diff --git a/apps/carbon/app/routes/x+/resources+/shifts.new.tsx b/apps/carbon/app/routes/x+/resources+/shifts.new.tsx
index 4e6c9bd82d..f6714697d9 100644
--- a/apps/carbon/app/routes/x+/resources+/shifts.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/shifts.new.tsx
@@ -1,9 +1,8 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { ShiftForm } from "~/interfaces/Resources/Shifts";
+import { ShiftForm, shiftValidator, upsertShift } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { shiftValidator, upsertShift } from "~/services/resources";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
@@ -48,6 +47,8 @@ export default function NewShiftRoute() {
friday: true,
saturday: false,
sunday: false,
+ startTime: "08:00",
+ endTime: "17:00",
};
return <ShiftForm initialValues={initialValues} />;
diff --git a/apps/carbon/app/routes/x+/resources+/shifts.tsx b/apps/carbon/app/routes/x+/resources+/shifts.tsx
index 977075a87b..5d8572dfef 100644
--- a/apps/carbon/app/routes/x+/resources+/shifts.tsx
+++ b/apps/carbon/app/routes/x+/resources+/shifts.tsx
@@ -3,10 +3,14 @@ import type { LoaderArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
-import { ShiftsTable, ShiftsTableFilters } from "~/interfaces/Resources/Shifts";
+import {
+ ShiftsTable,
+ ShiftsTableFilters,
+ getLocations,
+ getShifts,
+} from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { getLocations, getShifts } from "~/services/resources";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/work-cells.$typeId.tsx b/apps/carbon/app/routes/x+/resources+/work-cells.$typeId.tsx
index ecda8f6f8b..4d8bb8b23c 100644
--- a/apps/carbon/app/routes/x+/resources+/work-cells.$typeId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/work-cells.$typeId.tsx
@@ -2,14 +2,14 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { redirect, json } from "@remix-run/node";
import { useLoaderData, useNavigate } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { WorkCellTypeForm } from "~/interfaces/Resources/WorkCells";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
+ WorkCellTypeForm,
workCellTypeValidator,
getWorkCellType,
upsertWorkCellType,
-} from "~/services/resources";
+} from "~/modules/resources";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/work-cells.cell.$workCellId.tsx b/apps/carbon/app/routes/x+/resources+/work-cells.cell.$workCellId.tsx
index b7d94d8f86..3110a21e22 100644
--- a/apps/carbon/app/routes/x+/resources+/work-cells.cell.$workCellId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/work-cells.cell.$workCellId.tsx
@@ -1,8 +1,8 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
+import { workCellValidator, upsertWorkCell } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { workCellValidator, upsertWorkCell } from "~/services/resources";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/work-cells.cell.delete.$workCellId.tsx b/apps/carbon/app/routes/x+/resources+/work-cells.cell.delete.$workCellId.tsx
index feac1a33f9..a7e837b366 100644
--- a/apps/carbon/app/routes/x+/resources+/work-cells.cell.delete.$workCellId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/work-cells.cell.delete.$workCellId.tsx
@@ -3,8 +3,8 @@ import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
+import { deleteWorkCell, getWorkCell } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteWorkCell, getWorkCell } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/work-cells.cell.new.tsx b/apps/carbon/app/routes/x+/resources+/work-cells.cell.new.tsx
index 97f99244b4..1a96fc9194 100644
--- a/apps/carbon/app/routes/x+/resources+/work-cells.cell.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/work-cells.cell.new.tsx
@@ -2,9 +2,9 @@ import type { ActionArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
+import { workCellValidator, upsertWorkCell } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { workCellValidator, upsertWorkCell } from "~/services/resources";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/work-cells.delete.$typeId.tsx b/apps/carbon/app/routes/x+/resources+/work-cells.delete.$typeId.tsx
index 8dbc08a3f8..583f2ba17a 100644
--- a/apps/carbon/app/routes/x+/resources+/work-cells.delete.$typeId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/work-cells.delete.$typeId.tsx
@@ -1,7 +1,7 @@
import type { LoaderArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
+import { deleteWorkCellType } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { deleteWorkCellType } from "~/services/resources";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.$workCellId.tsx b/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.$workCellId.tsx
index f6b0948f4c..68d6f497e0 100644
--- a/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.$workCellId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.$workCellId.tsx
@@ -3,10 +3,9 @@ import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { useRouteData } from "~/hooks";
-import { WorkCellForm } from "~/interfaces/Resources/WorkCells";
-import type { WorkCellType } from "~/interfaces/Resources/types";
+import { WorkCellForm, getWorkCell } from "~/modules/resources";
+import type { WorkCellType } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { getWorkCell } from "~/services/resources";
import { flash } from "~/services/session";
import { notFound } from "~/utils/http";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.new.tsx b/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.new.tsx
index 4bb42bda4f..54902440be 100644
--- a/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.new.tsx
@@ -1,7 +1,7 @@
import { useNavigate, useParams } from "@remix-run/react";
import { useRouteData } from "~/hooks";
-import { WorkCellForm } from "~/interfaces/Resources/WorkCells";
-import type { WorkCellType } from "~/interfaces/Resources/types";
+import { WorkCellForm } from "~/modules/resources";
+import type { WorkCellType } from "~/modules/resources";
export default function NewWorkCellRoute() {
const { typeId } = useParams();
diff --git a/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.tsx b/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.tsx
index 5eb676c03d..2e6fa2ffb8 100644
--- a/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/work-cells.list.$typeId.tsx
@@ -2,10 +2,9 @@ import type { LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData, useNavigate } from "@remix-run/react";
import { useUrlParams } from "~/hooks";
-import { WorkCellTypeDetail } from "~/interfaces/Resources/WorkCells";
+import { WorkCellTypeDetail, getWorkCellType } from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { getWorkCellType } from "~/services/resources";
import { notFound } from "~/utils/http";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/work-cells.new.tsx b/apps/carbon/app/routes/x+/resources+/work-cells.new.tsx
index 4afe845ced..ebaaf41786 100644
--- a/apps/carbon/app/routes/x+/resources+/work-cells.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/work-cells.new.tsx
@@ -2,13 +2,13 @@ import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useNavigate } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { WorkCellTypeForm } from "~/interfaces/Resources/WorkCells";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import {
+ WorkCellTypeForm,
workCellTypeValidator,
upsertWorkCellType,
-} from "~/services/resources";
+} from "~/modules/resources";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/resources+/work-cells.tsx b/apps/carbon/app/routes/x+/resources+/work-cells.tsx
index f7ef761a6e..2131a8eb12 100644
--- a/apps/carbon/app/routes/x+/resources+/work-cells.tsx
+++ b/apps/carbon/app/routes/x+/resources+/work-cells.tsx
@@ -1,14 +1,13 @@
import { VStack } from "@chakra-ui/react";
import type { LoaderArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-import { json } from "@remix-run/node";
+import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
import {
WorkCellTypesTable,
WorkCellTypesTableFilters,
-} from "~/interfaces/Resources/WorkCells";
+ getWorkCellTypes,
+} from "~/modules/resources";
import { requirePermissions } from "~/services/auth";
-import { getWorkCellTypes } from "~/services/resources";
import { flash } from "~/services/session";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/sales+/_layout.tsx b/apps/carbon/app/routes/x+/sales+/_layout.tsx
index 1471b73239..3c4eff24ff 100644
--- a/apps/carbon/app/routes/x+/sales+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/sales+/_layout.tsx
@@ -2,7 +2,7 @@ import { Grid, VStack } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout/Sidebar";
-import { useSalesSidebar } from "~/interfaces/Sales";
+import { useSalesSidebar } from "~/modules/sales";
export const meta: MetaFunction = () => ({
title: "Carbon | Sales",
diff --git a/apps/carbon/app/routes/x+/sales+/customer-types.$customerTypeId.tsx b/apps/carbon/app/routes/x+/sales+/customer-types.$customerTypeId.tsx
index 63838a46e3..5c79495922 100644
--- a/apps/carbon/app/routes/x+/sales+/customer-types.$customerTypeId.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customer-types.$customerTypeId.tsx
@@ -3,13 +3,13 @@ import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { CustomerTypeForm } from "~/interfaces/Sales/CustomerTypes";
+import { CustomerTypeForm } from "~/modules/sales";
import { requirePermissions } from "~/services/auth";
import {
customerTypeValidator,
getCustomerType,
upsertCustomerType,
-} from "~/services/sales";
+} from "~/modules/sales";
import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/sales+/customer-types.delete.$customerTypeId.tsx b/apps/carbon/app/routes/x+/sales+/customer-types.delete.$customerTypeId.tsx
index 22165e99c1..ec6770140d 100644
--- a/apps/carbon/app/routes/x+/sales+/customer-types.delete.$customerTypeId.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customer-types.delete.$customerTypeId.tsx
@@ -2,8 +2,8 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
+import { deleteCustomerType, getCustomerType } from "~/modules/sales";
import { requirePermissions } from "~/services/auth";
-import { deleteCustomerType, getCustomerType } from "~/services/sales";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
import { notFound } from "~/utils/http";
diff --git a/apps/carbon/app/routes/x+/sales+/customer-types.new.tsx b/apps/carbon/app/routes/x+/sales+/customer-types.new.tsx
index b34e225eef..8f5705a7fd 100644
--- a/apps/carbon/app/routes/x+/sales+/customer-types.new.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customer-types.new.tsx
@@ -2,9 +2,12 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { CustomerTypeForm } from "~/interfaces/Sales/CustomerTypes";
+import {
+ CustomerTypeForm,
+ customerTypeValidator,
+ upsertCustomerType,
+} from "~/modules/sales";
import { requirePermissions } from "~/services/auth";
-import { customerTypeValidator, upsertCustomerType } from "~/services/sales";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/sales+/customer-types.tsx b/apps/carbon/app/routes/x+/sales+/customer-types.tsx
index c674aff003..6ea4687c35 100644
--- a/apps/carbon/app/routes/x+/sales+/customer-types.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customer-types.tsx
@@ -5,9 +5,9 @@ import { Outlet, useLoaderData } from "@remix-run/react";
import {
CustomerTypesTable,
CustomerTypesTableFilters,
-} from "~/interfaces/Sales/CustomerTypes";
+ getCustomerTypes,
+} from "~/modules/sales";
import { requirePermissions } from "~/services/auth";
-import { getCustomerTypes } from "~/services/sales";
import { getGenericQueryFilters } from "~/utils/query";
export async function loader({ request }: LoaderArgs) {
diff --git a/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.$customerContactId.tsx b/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.$customerContactId.tsx
index 8a850eb203..1c0d21a322 100644
--- a/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.$customerContactId.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.$customerContactId.tsx
@@ -1,11 +1,11 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { requirePermissions } from "~/services/auth";
import {
updateCustomerContact,
customerContactValidator,
-} from "~/services/sales";
+} from "~/modules/sales";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, badRequest, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.delete.$customerContactId.tsx b/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.delete.$customerContactId.tsx
index af2b616eef..c0a5d709ca 100644
--- a/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.delete.$customerContactId.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.delete.$customerContactId.tsx
@@ -1,7 +1,7 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
+import { deleteCustomerContact } from "~/modules/sales";
import { requirePermissions } from "~/services/auth";
-import { deleteCustomerContact } from "~/services/sales";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.new.tsx b/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.new.tsx
index 08c93069a1..5cf07a291f 100644
--- a/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.new.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customers.$customerId.contact.new.tsx
@@ -1,11 +1,11 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { requirePermissions } from "~/services/auth";
import {
insertCustomerContact,
customerContactValidator,
-} from "~/services/sales";
+} from "~/modules/sales";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.$customerLocationId.tsx b/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.$customerLocationId.tsx
index 578cb4ece1..99496a8395 100644
--- a/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.$customerLocationId.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.$customerLocationId.tsx
@@ -1,11 +1,11 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { requirePermissions } from "~/services/auth";
import {
updateCustomerLocation,
customerLocationValidator,
-} from "~/services/sales";
+} from "~/modules/sales";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, badRequest, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.delete.$customerLocationId.tsx b/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.delete.$customerLocationId.tsx
index 6143ce5aa9..c8634aca14 100644
--- a/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.delete.$customerLocationId.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.delete.$customerLocationId.tsx
@@ -1,7 +1,7 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
+import { deleteCustomerLocation } from "~/modules/sales";
import { requirePermissions } from "~/services/auth";
-import { deleteCustomerLocation } from "~/services/sales";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.new.tsx b/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.new.tsx
index ecf1e9c9f1..52a4a72447 100644
--- a/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.new.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customers.$customerId.location.new.tsx
@@ -1,11 +1,11 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { requirePermissions } from "~/services/auth";
import {
insertCustomerLocation,
customerLocationValidator,
-} from "~/services/sales";
+} from "~/modules/sales";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/sales+/customers.$customerId.tsx b/apps/carbon/app/routes/x+/sales+/customers.$customerId.tsx
index e1feef8a97..22b5c15c09 100644
--- a/apps/carbon/app/routes/x+/sales+/customers.$customerId.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customers.$customerId.tsx
@@ -1,17 +1,16 @@
import type { ActionArgs, LoaderArgs } from "@remix-run/node";
-import { json } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
+import { json, redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { CustomerForm } from "~/interfaces/Sales/Customers";
-import { requirePermissions } from "~/services/auth";
import {
+ CustomerForm,
getCustomer,
getCustomerContacts,
getCustomerLocations,
customerValidator,
updateCustomer,
-} from "~/services/sales";
+} from "~/modules/sales";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/sales+/customers.new.tsx b/apps/carbon/app/routes/x+/sales+/customers.new.tsx
index 3f421eacd1..8fbbacb804 100644
--- a/apps/carbon/app/routes/x+/sales+/customers.new.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customers.new.tsx
@@ -1,9 +1,12 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { CustomerForm } from "~/interfaces/Sales/Customers";
+import {
+ CustomerForm,
+ insertCustomer,
+ customerValidator,
+} from "~/modules/sales";
import { requirePermissions } from "~/services/auth";
-import { insertCustomer, customerValidator } from "~/services/sales";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/sales+/customers.tsx b/apps/carbon/app/routes/x+/sales+/customers.tsx
index 9cd34f636c..09d5af7efe 100644
--- a/apps/carbon/app/routes/x+/sales+/customers.tsx
+++ b/apps/carbon/app/routes/x+/sales+/customers.tsx
@@ -1,18 +1,15 @@
import { VStack } from "@chakra-ui/react";
import type { LoaderArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-import { json } from "@remix-run/node";
+import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
import {
CustomersTable,
CustomersTableFilters,
-} from "~/interfaces/Sales/Customers";
-import { requirePermissions } from "~/services/auth";
-import {
getCustomers,
getCustomerStatuses,
getCustomerTypes,
-} from "~/services/sales";
+} from "~/modules/sales";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/users+/_layout.tsx b/apps/carbon/app/routes/x+/users+/_layout.tsx
index 105c0d230d..cf0b145b73 100644
--- a/apps/carbon/app/routes/x+/users+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/users+/_layout.tsx
@@ -2,7 +2,7 @@ import { Grid, VStack } from "@chakra-ui/react";
import type { MetaFunction } from "@remix-run/node";
import { Outlet } from "@remix-run/react";
import { GroupedContentSidebar } from "~/components/Layout/Sidebar";
-import { useUsersSidebar } from "~/interfaces/Users";
+import { useUsersSidebar } from "~/modules/users";
export const meta: MetaFunction = () => ({
title: "Carbon | Users",
diff --git a/apps/carbon/app/routes/x+/users+/bulk-edit-permissions.tsx b/apps/carbon/app/routes/x+/users+/bulk-edit-permissions.tsx
index 2037cf5e30..ab1f0a8914 100644
--- a/apps/carbon/app/routes/x+/users+/bulk-edit-permissions.tsx
+++ b/apps/carbon/app/routes/x+/users+/bulk-edit-permissions.tsx
@@ -1,7 +1,7 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import type { Permission } from "~/interfaces/Users/types";
+import type { Permission } from "~/modules/users";
import type { BulkPermissionsQueueData } from "~/queues";
import { bulkPermissionsQueue } from "~/queues";
import { requirePermissions } from "~/services/auth";
@@ -9,7 +9,7 @@ import { flash } from "~/services/session";
import {
bulkPermissionsValidator,
userPermissionsValidator,
-} from "~/services/users";
+} from "~/modules/users";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/users+/customers.new.tsx b/apps/carbon/app/routes/x+/users+/customers.new.tsx
index 69075be420..5094becc1a 100644
--- a/apps/carbon/app/routes/x+/users+/customers.new.tsx
+++ b/apps/carbon/app/routes/x+/users+/customers.new.tsx
@@ -1,14 +1,14 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
+ CreateCustomerModal,
createCustomerAccount,
createCustomerAccountValidator,
-} from "~/services/users";
+} from "~/modules/users";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
-import { CreateCustomerModal } from "~/interfaces/Users/Customers";
export async function action({ request }: ActionArgs) {
assertIsPost(request);
diff --git a/apps/carbon/app/routes/x+/users+/customers.tsx b/apps/carbon/app/routes/x+/users+/customers.tsx
index ddb3e631a6..04046fdc2a 100644
--- a/apps/carbon/app/routes/x+/users+/customers.tsx
+++ b/apps/carbon/app/routes/x+/users+/customers.tsx
@@ -1,17 +1,16 @@
import { VStack } from "@chakra-ui/react";
import type { LoaderArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-import { json } from "@remix-run/node";
+import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
import { usePermissions } from "~/hooks";
+import { getCustomerTypes } from "~/modules/sales";
import {
CustomerAccountsTable,
CustomerAccountsTableFilters,
-} from "~/interfaces/Users/Customers";
+ getCustomers,
+} from "~/modules/users";
import { requirePermissions } from "~/services/auth";
-import { getCustomerTypes } from "~/services/sales";
import { flash } from "~/services/session";
-import { getCustomers } from "~/services/users";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/users+/deactivate.tsx b/apps/carbon/app/routes/x+/users+/deactivate.tsx
index 2d269bf4b6..4e3f1cf19c 100644
--- a/apps/carbon/app/routes/x+/users+/deactivate.tsx
+++ b/apps/carbon/app/routes/x+/users+/deactivate.tsx
@@ -2,10 +2,10 @@ import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
import type { DeactivateUserQueueData } from "~/queues";
+import { deactivateUser, deactivateUsersValidator } from "~/modules/users";
import { deactivateUsersQueue } from "~/queues";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { deactivateUser, deactivateUsersValidator } from "~/services/users";
import { safeRedirect } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/users+/employee-types.$employeeTypeId.tsx b/apps/carbon/app/routes/x+/users+/employee-types.$employeeTypeId.tsx
index 77faca736a..ccc6e1ed31 100644
--- a/apps/carbon/app/routes/x+/users+/employee-types.$employeeTypeId.tsx
+++ b/apps/carbon/app/routes/x+/users+/employee-types.$employeeTypeId.tsx
@@ -3,17 +3,17 @@ import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { EmployeeTypeForm } from "~/interfaces/Users/EmployeeTypes";
-import { requirePermissions } from "~/services/auth";
import {
+ EmployeeTypeForm,
employeeTypeValidator,
+ employeeTypePermissionsValidator,
getEmployeeType,
getPermissionsByEmployeeType,
makePermissionsFromEmployeeType,
- employeeTypePermissionsValidator,
upsertEmployeeType,
upsertEmployeeTypePermissions,
-} from "~/services/users";
+} from "~/modules/users";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
@@ -62,6 +62,7 @@ export async function action({ request }: ActionArgs) {
}
const { id, name, color, data } = validation.data;
+ if (!id) throw notFound("id not found");
const permissions = JSON.parse(data);
const jsonValidation =
@@ -79,7 +80,7 @@ export async function action({ request }: ActionArgs) {
const updateEmployeeType = await upsertEmployeeType(client, {
id,
name,
- color: color || null,
+ color: color ?? undefined,
});
if (updateEmployeeType.error) {
@@ -128,5 +129,10 @@ export default function EditEmployeeTypesRoute() {
permissions: employeeTypePermissions,
};
- return <EmployeeTypeForm initialValues={initialValues} />;
+ return (
+ <EmployeeTypeForm
+ // @ts-expect-error
+ initialValues={initialValues}
+ />
+ );
}
diff --git a/apps/carbon/app/routes/x+/users+/employee-types.delete.$employeeTypeId.tsx b/apps/carbon/app/routes/x+/users+/employee-types.delete.$employeeTypeId.tsx
index 03d635dd45..d5fad93a0b 100644
--- a/apps/carbon/app/routes/x+/users+/employee-types.delete.$employeeTypeId.tsx
+++ b/apps/carbon/app/routes/x+/users+/employee-types.delete.$employeeTypeId.tsx
@@ -2,8 +2,8 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
+import { deleteEmployeeType, getEmployeeType } from "~/modules/users";
import { requirePermissions } from "~/services/auth";
-import { deleteEmployeeType, getEmployeeType } from "~/services/users";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
import { notFound } from "~/utils/http";
diff --git a/apps/carbon/app/routes/x+/users+/employee-types.new.tsx b/apps/carbon/app/routes/x+/users+/employee-types.new.tsx
index 9b5a27237d..1b8a5f6315 100644
--- a/apps/carbon/app/routes/x+/users+/employee-types.new.tsx
+++ b/apps/carbon/app/routes/x+/users+/employee-types.new.tsx
@@ -3,16 +3,16 @@ import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { EmployeeTypeForm } from "~/interfaces/Users/EmployeeTypes";
-import { requirePermissions } from "~/services/auth";
import {
+ EmployeeTypeForm,
employeeTypeValidator,
employeeTypePermissionsValidator,
getFeatures,
insertEmployeeType,
makeEmptyPermissionsFromFeatures,
upsertEmployeeTypePermissions,
-} from "~/services/users";
+} from "~/modules/users";
+import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
import { error, success } from "~/utils/result";
@@ -123,5 +123,10 @@ export default function NewEmployeeTypesRoute() {
permissions,
};
- return <EmployeeTypeForm initialValues={initialValues} />;
+ return (
+ <EmployeeTypeForm
+ //@ts-expect-error
+ initialValues={initialValues}
+ />
+ );
}
diff --git a/apps/carbon/app/routes/x+/users+/employee-types.tsx b/apps/carbon/app/routes/x+/users+/employee-types.tsx
index 0d19d721c0..8b7086652a 100644
--- a/apps/carbon/app/routes/x+/users+/employee-types.tsx
+++ b/apps/carbon/app/routes/x+/users+/employee-types.tsx
@@ -5,9 +5,9 @@ import { Outlet, useLoaderData } from "@remix-run/react";
import {
EmployeeTypesTable,
EmployeeTypesTableFilters,
-} from "~/interfaces/Users/EmployeeTypes";
+ getEmployeeTypes,
+} from "~/modules/users";
import { requirePermissions } from "~/services/auth";
-import { getEmployeeTypes } from "~/services/users";
import { getGenericQueryFilters } from "~/utils/query";
export async function loader({ request }: LoaderArgs) {
diff --git a/apps/carbon/app/routes/x+/users+/employees.$employeeId.tsx b/apps/carbon/app/routes/x+/users+/employees.$employeeId.tsx
index fd774795d0..6579b4cfc7 100644
--- a/apps/carbon/app/routes/x+/users+/employees.$employeeId.tsx
+++ b/apps/carbon/app/routes/x+/users+/employees.$employeeId.tsx
@@ -3,17 +3,17 @@ import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { EmployeePermissionsForm } from "~/interfaces/Users/Employees";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
- userPermissionsValidator,
+ EmployeePermissionsForm,
employeeValidator,
getClaims,
getEmployee,
makePermissionsFromClaims,
updateEmployee,
-} from "~/services/users";
+ userPermissionsValidator,
+} from "~/modules/users";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error } from "~/utils/result";
@@ -108,6 +108,7 @@ export default function UsersEmployeeRoute() {
return (
<EmployeePermissionsForm
name={`${employee?.user?.firstName} ${employee?.user?.lastName}`}
+ // @ts-expect-error
initialValues={initialValues}
/>
);
diff --git a/apps/carbon/app/routes/x+/users+/employees.new.tsx b/apps/carbon/app/routes/x+/users+/employees.new.tsx
index e35ef3054b..a1d81ed979 100644
--- a/apps/carbon/app/routes/x+/users+/employees.new.tsx
+++ b/apps/carbon/app/routes/x+/users+/employees.new.tsx
@@ -4,11 +4,11 @@ import { validationError } from "remix-validated-form";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
import {
+ CreateEmployeeModal,
createEmployeeAccount,
createEmployeeValidator,
-} from "~/services/users";
+} from "~/modules/users";
import { assertIsPost } from "~/utils/http";
-import { CreateEmployeeModal } from "~/interfaces/Users/Employees";
export async function action({ request }: ActionArgs) {
assertIsPost(request);
diff --git a/apps/carbon/app/routes/x+/users+/employees.tsx b/apps/carbon/app/routes/x+/users+/employees.tsx
index 18a7f05168..d20a31d663 100644
--- a/apps/carbon/app/routes/x+/users+/employees.tsx
+++ b/apps/carbon/app/routes/x+/users+/employees.tsx
@@ -1,16 +1,16 @@
import { VStack } from "@chakra-ui/react";
import type { LoaderArgs } from "@remix-run/node";
-import { redirect } from "@remix-run/node";
-import { json } from "@remix-run/node";
+import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
import { usePermissions } from "~/hooks";
import {
EmployeesTable,
EmployeesTableFilters,
-} from "~/interfaces/Users/Employees";
+ getEmployees,
+ getEmployeeTypes,
+} from "~/modules/users";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { getEmployees, getEmployeeTypes } from "~/services/users";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/users+/groups.$groupId.tsx b/apps/carbon/app/routes/x+/users+/groups.$groupId.tsx
index 1f85468393..cee115adbc 100644
--- a/apps/carbon/app/routes/x+/users+/groups.$groupId.tsx
+++ b/apps/carbon/app/routes/x+/users+/groups.$groupId.tsx
@@ -3,15 +3,15 @@ import { json } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { useLoaderData } from "@remix-run/react";
import { validationError } from "remix-validated-form";
-import { GroupForm } from "~/interfaces/Users/Groups";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
+ GroupForm,
getGroupMembers,
groupValidator,
upsertGroup,
upsertGroupMembers,
-} from "~/services/users";
+} from "~/modules/users";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
import { assertIsPost, notFound } from "~/utils/http";
import { error, success } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/users+/groups.delete.$groupId.tsx b/apps/carbon/app/routes/x+/users+/groups.delete.$groupId.tsx
index c9d7eba715..4029ff3ecc 100644
--- a/apps/carbon/app/routes/x+/users+/groups.delete.$groupId.tsx
+++ b/apps/carbon/app/routes/x+/users+/groups.delete.$groupId.tsx
@@ -2,8 +2,8 @@ import type { ActionArgs, LoaderArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { useLoaderData, useNavigate, useParams } from "@remix-run/react";
import { ConfirmDelete } from "~/components/Modals";
+import { deleteGroup, getGroup } from "~/modules/users";
import { requirePermissions } from "~/services/auth";
-import { deleteGroup, getGroup } from "~/services/users";
import { flash } from "~/services/session";
import { error, success } from "~/utils/result";
import { notFound } from "~/utils/http";
diff --git a/apps/carbon/app/routes/x+/users+/groups.new.tsx b/apps/carbon/app/routes/x+/users+/groups.new.tsx
index 4017d8f866..24bee2fd0c 100644
--- a/apps/carbon/app/routes/x+/users+/groups.new.tsx
+++ b/apps/carbon/app/routes/x+/users+/groups.new.tsx
@@ -2,17 +2,17 @@ import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { GroupForm } from "~/interfaces/Users/Groups";
-import { flash } from "~/services/session";
-import { assertIsPost } from "~/utils/http";
-import { error, success } from "~/utils/result";
-import { requirePermissions } from "~/services/auth";
import {
+ GroupForm,
insertGroup,
deleteGroup,
groupValidator,
upsertGroupMembers,
-} from "~/services/users";
+} from "~/modules/users";
+import { flash } from "~/services/session";
+import { assertIsPost } from "~/utils/http";
+import { error, success } from "~/utils/result";
+import { requirePermissions } from "~/services/auth";
export async function action({ request }: ActionArgs) {
assertIsPost(request);
@@ -69,6 +69,7 @@ export async function action({ request }: ActionArgs) {
export default function NewGroupRoute() {
const initialValues = {
+ id: "",
name: "",
selections: [],
};
diff --git a/apps/carbon/app/routes/x+/users+/groups.tsx b/apps/carbon/app/routes/x+/users+/groups.tsx
index 11a28035f2..f08e39f560 100644
--- a/apps/carbon/app/routes/x+/users+/groups.tsx
+++ b/apps/carbon/app/routes/x+/users+/groups.tsx
@@ -3,11 +3,10 @@ import type { LoaderArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
import { arrayToTree } from "performant-array-to-tree";
-import { GroupsTable, GroupsTableFilters } from "~/interfaces/Users/Groups";
-import type { Group } from "~/interfaces/Users/types";
+import type { Group } from "~/modules/users";
+import { GroupsTable, GroupsTableFilters, getGroups } from "~/modules/users";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { getGroups } from "~/services/users";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/routes/x+/users+/resend-invite.tsx b/apps/carbon/app/routes/x+/users+/resend-invite.tsx
index 38aef9e3bf..6c1e290dc6 100644
--- a/apps/carbon/app/routes/x+/users+/resend-invite.tsx
+++ b/apps/carbon/app/routes/x+/users+/resend-invite.tsx
@@ -1,11 +1,11 @@
import type { ActionArgs } from "@remix-run/node";
import { json } from "@remix-run/node";
import { validationError } from "remix-validated-form";
+import { resendInvite, resendInviteValidator } from "~/modules/users";
import type { ResendInvitesQueueData } from "~/queues";
import { resendInvitesQueue } from "~/queues";
import { requirePermissions } from "~/services/auth";
import { flash } from "~/services/session";
-import { resendInvite, resendInviteValidator } from "~/services/users";
import { error, success } from "~/utils/result";
export async function action({ request }: ActionArgs) {
diff --git a/apps/carbon/app/routes/x+/users+/suppliers.new.tsx b/apps/carbon/app/routes/x+/users+/suppliers.new.tsx
index 85537b22af..c04a7e6a88 100644
--- a/apps/carbon/app/routes/x+/users+/suppliers.new.tsx
+++ b/apps/carbon/app/routes/x+/users+/suppliers.new.tsx
@@ -1,14 +1,14 @@
import type { ActionArgs } from "@remix-run/node";
import { redirect } from "@remix-run/node";
import { validationError } from "remix-validated-form";
-import { requirePermissions } from "~/services/auth";
-import { flash } from "~/services/session";
import {
+ CreateSupplierModal,
createSupplierAccount,
createSupplierAccountValidator,
-} from "~/services/users";
+} from "~/modules/users";
+import { requirePermissions } from "~/services/auth";
+import { flash } from "~/services/session";
import { assertIsPost } from "~/utils/http";
-import { CreateSupplierModal } from "~/interfaces/Users/Suppliers";
export async function action({ request }: ActionArgs) {
assertIsPost(request);
diff --git a/apps/carbon/app/routes/x+/users+/suppliers.tsx b/apps/carbon/app/routes/x+/users+/suppliers.tsx
index baa98fe6dd..9f865ab8fa 100644
--- a/apps/carbon/app/routes/x+/users+/suppliers.tsx
+++ b/apps/carbon/app/routes/x+/users+/suppliers.tsx
@@ -4,14 +4,14 @@ import { redirect } from "@remix-run/node";
import { json } from "@remix-run/node";
import { Outlet, useLoaderData } from "@remix-run/react";
import { usePermissions } from "~/hooks";
+import { getSupplierTypes } from "~/modules/purchasing";
import {
SupplierAccountsTable,
SupplierAccountsTableFilters,
-} from "~/interfaces/Users/Suppliers";
+ getSuppliers,
+} from "~/modules/users";
import { requirePermissions } from "~/services/auth";
-import { getSupplierTypes } from "~/services/purchasing";
import { flash } from "~/services/session";
-import { getSuppliers } from "~/services/users";
import { getGenericQueryFilters } from "~/utils/query";
import { error } from "~/utils/result";
diff --git a/apps/carbon/app/services/auth/auth.server.ts b/apps/carbon/app/services/auth/auth.server.ts
index b86ecd49bb..f330d63c16 100644
--- a/apps/carbon/app/services/auth/auth.server.ts
+++ b/apps/carbon/app/services/auth/auth.server.ts
@@ -8,7 +8,7 @@ import { VERCEL_URL } from "~/config/env";
import { REFRESH_ACCESS_TOKEN_THRESHOLD } from "~/config/env";
import { getSupabase, getSupabaseServiceRole } from "~/lib/supabase";
import { requireAuthSession, flash } from "~/services/session";
-import { getUserClaims } from "~/services/users";
+import { getUserClaims } from "~/modules/users";
import { error } from "~/utils/result";
import type { AuthSession } from "./types";
diff --git a/docs/.gitkeep b/docs/.gitkeep
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/package.json b/package.json
index c474ac6739..8577156063 100755
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"private": true,
"workspaces": [
"apps/*",
- "docs",
+ "www",
"packages/*"
],
"scripts": {
@@ -29,7 +29,7 @@
"deploy": "turbo run deploy",
"dev": "turbo run dev --no-cache --parallel --continue --filter=./apps/* --filter=./packages/*",
"dev:apps": "turbo run dev --no-cache --parallel --continue --filter=./apps/*",
- "dev:docs": "turbo run dev --no-cache --parallel --continue --filter=./docs",
+ "dev:www": "turbo run dev --no-cache --parallel --continue --filter=./www",
"dev:packages": "turbo run dev --no-cache --parallel --continue --filter=./packages/*",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"init": "run-s db:init db:start",
@@ -52,7 +52,7 @@
"node": ">=16"
},
"lint-staged": {
- "(apps|docs|packages)/**/*.{js,ts,jsx,tsx}": [
+ "(apps|packages|www)/**/*.{js,ts,jsx,tsx}": [
"prettier --write",
"eslint --fix --max-warnings=0"
],
diff --git a/packages/carbon-database/src/types.ts b/packages/carbon-database/src/types.ts
index e69de29bb2..18631ffd5d 100644
--- a/packages/carbon-database/src/types.ts
+++ b/packages/carbon-database/src/types.ts
@@ -0,0 +1,1485 @@
+export type Json =
+ | string
+ | number
+ | boolean
+ | null
+ | { [key: string]: Json }
+ | Json[];
+
+export interface Database {
+ public: {
+ Tables: {
+ ability: {
+ Row: {
+ name: string;
+ createdBy: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ id: string;
+ curve: Json;
+ shadowWeeks: number;
+ active: boolean;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ createdBy: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ curve?: Json;
+ shadowWeeks?: number;
+ active?: boolean;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ createdBy?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ curve?: Json;
+ shadowWeeks?: number;
+ active?: boolean;
+ createdAt?: string;
+ };
+ };
+ address: {
+ Row: {
+ addressLine1: string | null;
+ addressLine2: string | null;
+ city: string | null;
+ state: string | null;
+ postalCode: string | null;
+ countryId: number | null;
+ phone: string | null;
+ fax: string | null;
+ id: string;
+ };
+ Insert: {
+ addressLine1?: string | null;
+ addressLine2?: string | null;
+ city?: string | null;
+ state?: string | null;
+ postalCode?: string | null;
+ countryId?: number | null;
+ phone?: string | null;
+ fax?: string | null;
+ id?: string;
+ };
+ Update: {
+ addressLine1?: string | null;
+ addressLine2?: string | null;
+ city?: string | null;
+ state?: string | null;
+ postalCode?: string | null;
+ countryId?: number | null;
+ phone?: string | null;
+ fax?: string | null;
+ id?: string;
+ };
+ };
+ attributeDataType: {
+ Row: {
+ label: string;
+ id: number;
+ isBoolean: boolean;
+ isDate: boolean;
+ isList: boolean;
+ isNumeric: boolean;
+ isText: boolean;
+ isUser: boolean;
+ };
+ Insert: {
+ label: string;
+ id?: number;
+ isBoolean?: boolean;
+ isDate?: boolean;
+ isList?: boolean;
+ isNumeric?: boolean;
+ isText?: boolean;
+ isUser?: boolean;
+ };
+ Update: {
+ label?: string;
+ id?: number;
+ isBoolean?: boolean;
+ isDate?: boolean;
+ isList?: boolean;
+ isNumeric?: boolean;
+ isText?: boolean;
+ isUser?: boolean;
+ };
+ };
+ contact: {
+ Row: {
+ firstName: string;
+ lastName: string;
+ email: string;
+ title: string | null;
+ mobilePhone: string | null;
+ homePhone: string | null;
+ workPhone: string | null;
+ fax: string | null;
+ addressLine1: string | null;
+ addressLine2: string | null;
+ city: string | null;
+ state: string | null;
+ postalCode: string | null;
+ countryId: number | null;
+ birthday: string | null;
+ notes: string | null;
+ id: string;
+ };
+ Insert: {
+ firstName: string;
+ lastName: string;
+ email: string;
+ title?: string | null;
+ mobilePhone?: string | null;
+ homePhone?: string | null;
+ workPhone?: string | null;
+ fax?: string | null;
+ addressLine1?: string | null;
+ addressLine2?: string | null;
+ city?: string | null;
+ state?: string | null;
+ postalCode?: string | null;
+ countryId?: number | null;
+ birthday?: string | null;
+ notes?: string | null;
+ id?: string;
+ };
+ Update: {
+ firstName?: string;
+ lastName?: string;
+ email?: string;
+ title?: string | null;
+ mobilePhone?: string | null;
+ homePhone?: string | null;
+ workPhone?: string | null;
+ fax?: string | null;
+ addressLine1?: string | null;
+ addressLine2?: string | null;
+ city?: string | null;
+ state?: string | null;
+ postalCode?: string | null;
+ countryId?: number | null;
+ birthday?: string | null;
+ notes?: string | null;
+ id?: string;
+ };
+ };
+ country: {
+ Row: {
+ name: string;
+ code: string;
+ id: number;
+ };
+ Insert: {
+ name: string;
+ code: string;
+ id?: number;
+ };
+ Update: {
+ name?: string;
+ code?: string;
+ id?: number;
+ };
+ };
+ crew: {
+ Row: {
+ name: string;
+ description: string | null;
+ crewLeaderId: string | null;
+ groupId: string;
+ workCellId: string | null;
+ id: string;
+ };
+ Insert: {
+ name: string;
+ description?: string | null;
+ crewLeaderId?: string | null;
+ groupId: string;
+ workCellId?: string | null;
+ id?: string;
+ };
+ Update: {
+ name?: string;
+ description?: string | null;
+ crewLeaderId?: string | null;
+ groupId?: string;
+ workCellId?: string | null;
+ id?: string;
+ };
+ };
+ crewAbility: {
+ Row: {
+ crewId: string;
+ abilityId: string;
+ id: string;
+ active: boolean;
+ };
+ Insert: {
+ crewId: string;
+ abilityId: string;
+ id?: string;
+ active?: boolean;
+ };
+ Update: {
+ crewId?: string;
+ abilityId?: string;
+ id?: string;
+ active?: boolean;
+ };
+ };
+ customer: {
+ Row: {
+ name: string;
+ description: string | null;
+ customerTypeId: string | null;
+ customerStatusId: string | null;
+ taxId: string | null;
+ accountManagerId: string | null;
+ logo: string | null;
+ createdBy: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ id: string;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ description?: string | null;
+ customerTypeId?: string | null;
+ customerStatusId?: string | null;
+ taxId?: string | null;
+ accountManagerId?: string | null;
+ logo?: string | null;
+ createdBy?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ description?: string | null;
+ customerTypeId?: string | null;
+ customerStatusId?: string | null;
+ taxId?: string | null;
+ accountManagerId?: string | null;
+ logo?: string | null;
+ createdBy?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ };
+ customerAccount: {
+ Row: {
+ id: string;
+ customerId: string;
+ };
+ Insert: {
+ id: string;
+ customerId: string;
+ };
+ Update: {
+ id?: string;
+ customerId?: string;
+ };
+ };
+ customerContact: {
+ Row: {
+ customerId: string;
+ contactId: string;
+ customerLocationId: string | null;
+ userId: string | null;
+ id: string;
+ };
+ Insert: {
+ customerId: string;
+ contactId: string;
+ customerLocationId?: string | null;
+ userId?: string | null;
+ id?: string;
+ };
+ Update: {
+ customerId?: string;
+ contactId?: string;
+ customerLocationId?: string | null;
+ userId?: string | null;
+ id?: string;
+ };
+ };
+ customerLocation: {
+ Row: {
+ customerId: string;
+ addressId: string;
+ id: string;
+ };
+ Insert: {
+ customerId: string;
+ addressId: string;
+ id?: string;
+ };
+ Update: {
+ customerId?: string;
+ addressId?: string;
+ id?: string;
+ };
+ };
+ customerStatus: {
+ Row: {
+ name: string;
+ updatedAt: string | null;
+ id: string;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ updatedAt?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ updatedAt?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ };
+ customerType: {
+ Row: {
+ name: string;
+ updatedAt: string | null;
+ id: string;
+ color: string | null;
+ protected: boolean;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string | null;
+ protected?: boolean;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string | null;
+ protected?: boolean;
+ createdAt?: string;
+ };
+ };
+ department: {
+ Row: {
+ name: string;
+ parentDepartmentId: string | null;
+ createdBy: string;
+ updatedBy: string | null;
+ updatedAt: string | null;
+ id: string;
+ color: string;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ parentDepartmentId?: string | null;
+ createdBy: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ parentDepartmentId?: string | null;
+ createdBy?: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string;
+ createdAt?: string;
+ };
+ };
+ employee: {
+ Row: {
+ id: string;
+ employeeTypeId: string;
+ };
+ Insert: {
+ id: string;
+ employeeTypeId: string;
+ };
+ Update: {
+ id?: string;
+ employeeTypeId?: string;
+ };
+ };
+ employeeAbility: {
+ Row: {
+ employeeId: string;
+ abilityId: string;
+ lastTrainingDate: string | null;
+ id: string;
+ active: boolean;
+ trainingDays: number;
+ trainingCompleted: boolean | null;
+ };
+ Insert: {
+ employeeId: string;
+ abilityId: string;
+ lastTrainingDate?: string | null;
+ id?: string;
+ active?: boolean;
+ trainingDays?: number;
+ trainingCompleted?: boolean | null;
+ };
+ Update: {
+ employeeId?: string;
+ abilityId?: string;
+ lastTrainingDate?: string | null;
+ id?: string;
+ active?: boolean;
+ trainingDays?: number;
+ trainingCompleted?: boolean | null;
+ };
+ };
+ employeeJob: {
+ Row: {
+ id: string;
+ locationId: string | null;
+ shiftId: string | null;
+ managerId: string | null;
+ title: string | null;
+ startDate: string | null;
+ departmentId: string | null;
+ workCellId: string | null;
+ };
+ Insert: {
+ id: string;
+ locationId?: string | null;
+ shiftId?: string | null;
+ managerId?: string | null;
+ title?: string | null;
+ startDate?: string | null;
+ departmentId?: string | null;
+ workCellId?: string | null;
+ };
+ Update: {
+ id?: string;
+ locationId?: string | null;
+ shiftId?: string | null;
+ managerId?: string | null;
+ title?: string | null;
+ startDate?: string | null;
+ departmentId?: string | null;
+ workCellId?: string | null;
+ };
+ };
+ employeeShift: {
+ Row: {
+ employeeId: string;
+ shiftId: string;
+ id: string;
+ };
+ Insert: {
+ employeeId: string;
+ shiftId: string;
+ id?: string;
+ };
+ Update: {
+ employeeId?: string;
+ shiftId?: string;
+ id?: string;
+ };
+ };
+ employeeType: {
+ Row: {
+ name: string;
+ updatedAt: string | null;
+ id: string;
+ color: string;
+ protected: boolean;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string;
+ protected?: boolean;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string;
+ protected?: boolean;
+ createdAt?: string;
+ };
+ };
+ employeeTypePermission: {
+ Row: {
+ employeeTypeId: string;
+ featureId: string;
+ updatedAt: string | null;
+ create: boolean;
+ delete: boolean;
+ update: boolean;
+ view: boolean;
+ createdAt: string;
+ };
+ Insert: {
+ employeeTypeId: string;
+ featureId: string;
+ updatedAt?: string | null;
+ create?: boolean;
+ delete?: boolean;
+ update?: boolean;
+ view?: boolean;
+ createdAt?: string;
+ };
+ Update: {
+ employeeTypeId?: string;
+ featureId?: string;
+ updatedAt?: string | null;
+ create?: boolean;
+ delete?: boolean;
+ update?: boolean;
+ view?: boolean;
+ createdAt?: string;
+ };
+ };
+ equipment: {
+ Row: {
+ name: string;
+ description: string | null;
+ equipmentTypeId: string;
+ locationId: string;
+ workCellId: string | null;
+ activeDate: string | null;
+ createdBy: string;
+ updatedBy: string | null;
+ updatedAt: string | null;
+ id: string;
+ operatorsRequired: number;
+ setupHours: number;
+ active: boolean;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ description?: string | null;
+ equipmentTypeId: string;
+ locationId: string;
+ workCellId?: string | null;
+ activeDate?: string | null;
+ createdBy: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ operatorsRequired?: number;
+ setupHours?: number;
+ active?: boolean;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ description?: string | null;
+ equipmentTypeId?: string;
+ locationId?: string;
+ workCellId?: string | null;
+ activeDate?: string | null;
+ createdBy?: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ operatorsRequired?: number;
+ setupHours?: number;
+ active?: boolean;
+ createdAt?: string;
+ };
+ };
+ equipmentType: {
+ Row: {
+ name: string;
+ description: string | null;
+ requiredAbility: string | null;
+ createdBy: string;
+ updatedBy: string | null;
+ updatedAt: string | null;
+ id: string;
+ color: string;
+ active: boolean;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ description?: string | null;
+ requiredAbility?: string | null;
+ createdBy: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string;
+ active?: boolean;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ description?: string | null;
+ requiredAbility?: string | null;
+ createdBy?: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string;
+ active?: boolean;
+ createdAt?: string;
+ };
+ };
+ feature: {
+ Row: {
+ name: string;
+ updatedAt: string | null;
+ id: string;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ updatedAt?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ updatedAt?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ };
+ group: {
+ Row: {
+ name: string;
+ id: string;
+ updatedAt: string | null;
+ isIdentityGroup: boolean;
+ isEmployeeTypeGroup: boolean;
+ isCustomerOrgGroup: boolean;
+ isCustomerTypeGroup: boolean;
+ isSupplierTypeGroup: boolean;
+ isSupplierOrgGroup: boolean;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ id?: string;
+ updatedAt?: string | null;
+ isIdentityGroup?: boolean;
+ isEmployeeTypeGroup?: boolean;
+ isCustomerOrgGroup?: boolean;
+ isCustomerTypeGroup?: boolean;
+ isSupplierTypeGroup?: boolean;
+ isSupplierOrgGroup?: boolean;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ id?: string;
+ updatedAt?: string | null;
+ isIdentityGroup?: boolean;
+ isEmployeeTypeGroup?: boolean;
+ isCustomerOrgGroup?: boolean;
+ isCustomerTypeGroup?: boolean;
+ isSupplierTypeGroup?: boolean;
+ isSupplierOrgGroup?: boolean;
+ createdAt?: string;
+ };
+ };
+ holiday: {
+ Row: {
+ name: string;
+ date: string;
+ createdBy: string;
+ updatedBy: string | null;
+ updatedAt: string | null;
+ id: string;
+ year: number | null;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ date: string;
+ createdBy: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ year?: number | null;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ date?: string;
+ createdBy?: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ year?: number | null;
+ createdAt?: string;
+ };
+ };
+ location: {
+ Row: {
+ name: string;
+ timezone: string;
+ latitude: number | null;
+ longitude: number | null;
+ createdBy: string;
+ updatedBy: string | null;
+ updatedAt: string | null;
+ id: string;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ timezone: string;
+ latitude?: number | null;
+ longitude?: number | null;
+ createdBy: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ timezone?: string;
+ latitude?: number | null;
+ longitude?: number | null;
+ createdBy?: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ };
+ membership: {
+ Row: {
+ groupId: string;
+ memberGroupId: string | null;
+ memberUserId: string | null;
+ id: number;
+ };
+ Insert: {
+ groupId: string;
+ memberGroupId?: string | null;
+ memberUserId?: string | null;
+ id?: number;
+ };
+ Update: {
+ groupId?: string;
+ memberGroupId?: string | null;
+ memberUserId?: string | null;
+ id?: number;
+ };
+ };
+ partner: {
+ Row: {
+ id: string;
+ createdBy: string;
+ updatedBy: string | null;
+ updatedAt: string | null;
+ hoursPerWeek: number;
+ active: boolean;
+ createdAt: string;
+ };
+ Insert: {
+ id: string;
+ createdBy: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ hoursPerWeek?: number;
+ active?: boolean;
+ createdAt?: string;
+ };
+ Update: {
+ id?: string;
+ createdBy?: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ hoursPerWeek?: number;
+ active?: boolean;
+ createdAt?: string;
+ };
+ };
+ search: {
+ Row: {
+ id: number;
+ name: string;
+ entity: Database["public"]["Enums"]["search_entity"] | null;
+ uuid: string | null;
+ link: string;
+ description: string | null;
+ fts: unknown | null;
+ };
+ Insert: {
+ id?: number;
+ name: string;
+ entity?: Database["public"]["Enums"]["search_entity"] | null;
+ uuid?: string | null;
+ link: string;
+ description?: string | null;
+ fts?: unknown | null;
+ };
+ Update: {
+ id?: number;
+ name?: string;
+ entity?: Database["public"]["Enums"]["search_entity"] | null;
+ uuid?: string | null;
+ link?: string;
+ description?: string | null;
+ fts?: unknown | null;
+ };
+ };
+ shift: {
+ Row: {
+ name: string;
+ startTime: string;
+ endTime: string;
+ locationId: string;
+ id: string;
+ sunday: boolean;
+ monday: boolean;
+ tuesday: boolean;
+ wednesday: boolean;
+ thursday: boolean;
+ friday: boolean;
+ saturday: boolean;
+ active: boolean;
+ };
+ Insert: {
+ name: string;
+ startTime: string;
+ endTime: string;
+ locationId: string;
+ id?: string;
+ sunday?: boolean;
+ monday?: boolean;
+ tuesday?: boolean;
+ wednesday?: boolean;
+ thursday?: boolean;
+ friday?: boolean;
+ saturday?: boolean;
+ active?: boolean;
+ };
+ Update: {
+ name?: string;
+ startTime?: string;
+ endTime?: string;
+ locationId?: string;
+ id?: string;
+ sunday?: boolean;
+ monday?: boolean;
+ tuesday?: boolean;
+ wednesday?: boolean;
+ thursday?: boolean;
+ friday?: boolean;
+ saturday?: boolean;
+ active?: boolean;
+ };
+ };
+ supplier: {
+ Row: {
+ name: string;
+ description: string | null;
+ supplierTypeId: string | null;
+ supplierStatusId: string | null;
+ taxId: string | null;
+ accountManagerId: string | null;
+ logo: string | null;
+ createdBy: string | null;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ id: string;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ description?: string | null;
+ supplierTypeId?: string | null;
+ supplierStatusId?: string | null;
+ taxId?: string | null;
+ accountManagerId?: string | null;
+ logo?: string | null;
+ createdBy?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ description?: string | null;
+ supplierTypeId?: string | null;
+ supplierStatusId?: string | null;
+ taxId?: string | null;
+ accountManagerId?: string | null;
+ logo?: string | null;
+ createdBy?: string | null;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ };
+ supplierAccount: {
+ Row: {
+ id: string;
+ supplierId: string;
+ };
+ Insert: {
+ id: string;
+ supplierId: string;
+ };
+ Update: {
+ id?: string;
+ supplierId?: string;
+ };
+ };
+ supplierContact: {
+ Row: {
+ supplierId: string;
+ contactId: string;
+ supplierLocationId: string | null;
+ userId: string | null;
+ id: string;
+ };
+ Insert: {
+ supplierId: string;
+ contactId: string;
+ supplierLocationId?: string | null;
+ userId?: string | null;
+ id?: string;
+ };
+ Update: {
+ supplierId?: string;
+ contactId?: string;
+ supplierLocationId?: string | null;
+ userId?: string | null;
+ id?: string;
+ };
+ };
+ supplierLocation: {
+ Row: {
+ supplierId: string;
+ addressId: string;
+ id: string;
+ };
+ Insert: {
+ supplierId: string;
+ addressId: string;
+ id?: string;
+ };
+ Update: {
+ supplierId?: string;
+ addressId?: string;
+ id?: string;
+ };
+ };
+ supplierStatus: {
+ Row: {
+ name: string;
+ updatedAt: string | null;
+ id: string;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ updatedAt?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ updatedAt?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ };
+ supplierType: {
+ Row: {
+ name: string;
+ updatedAt: string | null;
+ id: string;
+ color: string | null;
+ protected: boolean;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string | null;
+ protected?: boolean;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string | null;
+ protected?: boolean;
+ createdAt?: string;
+ };
+ };
+ user: {
+ Row: {
+ id: string;
+ email: string;
+ firstName: string;
+ lastName: string;
+ avatarUrl: string | null;
+ emailVerified: string | null;
+ updatedAt: string | null;
+ fullName: string | null;
+ about: string;
+ active: boolean | null;
+ createdAt: string;
+ };
+ Insert: {
+ id: string;
+ email: string;
+ firstName: string;
+ lastName: string;
+ avatarUrl?: string | null;
+ emailVerified?: string | null;
+ updatedAt?: string | null;
+ fullName?: string | null;
+ about?: string;
+ active?: boolean | null;
+ createdAt?: string;
+ };
+ Update: {
+ id?: string;
+ email?: string;
+ firstName?: string;
+ lastName?: string;
+ avatarUrl?: string | null;
+ emailVerified?: string | null;
+ updatedAt?: string | null;
+ fullName?: string | null;
+ about?: string;
+ active?: boolean | null;
+ createdAt?: string;
+ };
+ };
+ userAttribute: {
+ Row: {
+ name: string;
+ userAttributeCategoryId: string;
+ attributeDataTypeId: number;
+ listOptions: string[] | null;
+ createdBy: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ id: string;
+ sortOrder: number;
+ canSelfManage: boolean | null;
+ active: boolean | null;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ userAttributeCategoryId: string;
+ attributeDataTypeId: number;
+ listOptions?: string[] | null;
+ createdBy: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ sortOrder?: number;
+ canSelfManage?: boolean | null;
+ active?: boolean | null;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ userAttributeCategoryId?: string;
+ attributeDataTypeId?: number;
+ listOptions?: string[] | null;
+ createdBy?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ sortOrder?: number;
+ canSelfManage?: boolean | null;
+ active?: boolean | null;
+ createdAt?: string;
+ };
+ };
+ userAttributeCategory: {
+ Row: {
+ name: string;
+ createdBy: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ id: string;
+ public: boolean | null;
+ protected: boolean | null;
+ active: boolean | null;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ createdBy: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ public?: boolean | null;
+ protected?: boolean | null;
+ active?: boolean | null;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ createdBy?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ public?: boolean | null;
+ protected?: boolean | null;
+ active?: boolean | null;
+ createdAt?: string;
+ };
+ };
+ userAttributeValue: {
+ Row: {
+ userAttributeId: string;
+ userId: string;
+ valueBoolean: boolean | null;
+ valueDate: string | null;
+ valueNumeric: number | null;
+ valueText: string | null;
+ valueUser: string | null;
+ createdBy: string;
+ updatedAt: string | null;
+ updatedBy: string | null;
+ id: string;
+ createdAt: string;
+ };
+ Insert: {
+ userAttributeId: string;
+ userId: string;
+ valueBoolean?: boolean | null;
+ valueDate?: string | null;
+ valueNumeric?: number | null;
+ valueText?: string | null;
+ valueUser?: string | null;
+ createdBy: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ Update: {
+ userAttributeId?: string;
+ userId?: string;
+ valueBoolean?: boolean | null;
+ valueDate?: string | null;
+ valueNumeric?: number | null;
+ valueText?: string | null;
+ valueUser?: string | null;
+ createdBy?: string;
+ updatedAt?: string | null;
+ updatedBy?: string | null;
+ id?: string;
+ createdAt?: string;
+ };
+ };
+ userNote: {
+ Row: {
+ userId: string;
+ note: string;
+ createdBy: string;
+ id: string;
+ noteRichText: Json;
+ active: boolean;
+ createdAt: string;
+ updatedAt: string | null;
+ };
+ Insert: {
+ userId: string;
+ note: string;
+ createdBy: string;
+ id?: string;
+ noteRichText?: Json;
+ active?: boolean;
+ createdAt?: string;
+ updatedAt?: string | null;
+ };
+ Update: {
+ userId?: string;
+ note?: string;
+ createdBy?: string;
+ id?: string;
+ noteRichText?: Json;
+ active?: boolean;
+ createdAt?: string;
+ updatedAt?: string | null;
+ };
+ };
+ workCell: {
+ Row: {
+ name: string;
+ description: string | null;
+ departmentId: string;
+ locationId: string | null;
+ workCellTypeId: string;
+ activeDate: string | null;
+ createdBy: string;
+ updatedBy: string | null;
+ updatedAt: string | null;
+ id: string;
+ defaultStandardFactor: Database["public"]["Enums"]["factor"];
+ active: boolean;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ description?: string | null;
+ departmentId: string;
+ locationId?: string | null;
+ workCellTypeId: string;
+ activeDate?: string | null;
+ createdBy: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ defaultStandardFactor?: Database["public"]["Enums"]["factor"];
+ active?: boolean;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ description?: string | null;
+ departmentId?: string;
+ locationId?: string | null;
+ workCellTypeId?: string;
+ activeDate?: string | null;
+ createdBy?: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ defaultStandardFactor?: Database["public"]["Enums"]["factor"];
+ active?: boolean;
+ createdAt?: string;
+ };
+ };
+ workCellType: {
+ Row: {
+ name: string;
+ description: string | null;
+ requiredAbility: string | null;
+ createdBy: string;
+ updatedBy: string | null;
+ updatedAt: string | null;
+ id: string;
+ color: string;
+ active: boolean;
+ createdAt: string;
+ };
+ Insert: {
+ name: string;
+ description?: string | null;
+ requiredAbility?: string | null;
+ createdBy: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string;
+ active?: boolean;
+ createdAt?: string;
+ };
+ Update: {
+ name?: string;
+ description?: string | null;
+ requiredAbility?: string | null;
+ createdBy?: string;
+ updatedBy?: string | null;
+ updatedAt?: string | null;
+ id?: string;
+ color?: string;
+ active?: boolean;
+ createdAt?: string;
+ };
+ };
+ };
+ Views: {
+ group_member: {
+ Row: {
+ id: number | null;
+ name: string | null;
+ isIdentityGroup: boolean | null;
+ isEmployeeTypeGroup: boolean | null;
+ isCustomerOrgGroup: boolean | null;
+ isCustomerTypeGroup: boolean | null;
+ isSupplierOrgGroup: boolean | null;
+ isSupplierTypeGroup: boolean | null;
+ groupId: string | null;
+ memberGroupId: string | null;
+ memberUserId: string | null;
+ user: Json | null;
+ };
+ };
+ groups_recursive: {
+ Row: {
+ groupId: string | null;
+ name: string | null;
+ parentId: string | null;
+ isIdentityGroup: boolean | null;
+ isEmployeeTypeGroup: boolean | null;
+ isCustomerOrgGroup: boolean | null;
+ isCustomerTypeGroup: boolean | null;
+ isSupplierOrgGroup: boolean | null;
+ isSupplierTypeGroup: boolean | null;
+ user: Json | null;
+ };
+ };
+ groups_view: {
+ Row: {
+ id: string | null;
+ isEmployeeTypeGroup: boolean | null;
+ isCustomerOrgGroup: boolean | null;
+ isCustomerTypeGroup: boolean | null;
+ isSupplierOrgGroup: boolean | null;
+ isSupplierTypeGroup: boolean | null;
+ name: string | null;
+ parentId: string | null;
+ users: Json | null;
+ };
+ };
+ holiday_years: {
+ Row: {
+ year: number | null;
+ };
+ };
+ };
+ Functions: {
+ _xid_machine_id: {
+ Args: Record<PropertyKey, never>;
+ Returns: number;
+ };
+ delete_claim: {
+ Args: { uid: string; claim: string };
+ Returns: string;
+ };
+ get_claim: {
+ Args: { uid: string; claim: string };
+ Returns: Json;
+ };
+ get_claims: {
+ Args: { uid: string };
+ Returns: Json;
+ };
+ get_my_claim: {
+ Args: { claim: string };
+ Returns: Json;
+ };
+ get_my_claims: {
+ Args: Record<PropertyKey, never>;
+ Returns: Json;
+ };
+ groups_for_user: {
+ Args: { uid: string };
+ Returns: Json;
+ };
+ groups_query: {
+ Args: { _name: string; _uid: string };
+ Returns: {
+ id: string;
+ name: string;
+ parentId: string;
+ isEmployeeTypeGroup: boolean;
+ isCustomerOrgGroup: boolean;
+ isCustomerTypeGroup: boolean;
+ isSupplierOrgGroup: boolean;
+ isSupplierTypeGroup: boolean;
+ users: Json;
+ }[];
+ };
+ is_claims_admin: {
+ Args: Record<PropertyKey, never>;
+ Returns: boolean;
+ };
+ set_claim: {
+ Args: { uid: string; claim: string; value: Json };
+ Returns: string;
+ };
+ users_for_groups: {
+ Args: { groups: string[] };
+ Returns: Json;
+ };
+ xid: {
+ Args: { _at: string };
+ Returns: unknown;
+ };
+ xid_counter: {
+ Args: { _xid: unknown };
+ Returns: number;
+ };
+ xid_decode: {
+ Args: { _xid: unknown };
+ Returns: number[];
+ };
+ xid_encode: {
+ Args: { _id: number[] };
+ Returns: unknown;
+ };
+ xid_machine: {
+ Args: { _xid: unknown };
+ Returns: number[];
+ };
+ xid_pid: {
+ Args: { _xid: unknown };
+ Returns: number;
+ };
+ xid_time: {
+ Args: { _xid: unknown };
+ Returns: string;
+ };
+ };
+ Enums: {
+ factor:
+ | "Hours/Piece"
+ | "Hours/100 Pieces"
+ | "Hours/1000 Pieces"
+ | "Minutes/Piece"
+ | "Minutes/100 Pieces"
+ | "Minutes/1000 Pieces"
+ | "Pieces/Hour"
+ | "Pieces/Minute"
+ | "Seconds/Piece"
+ | "Total Hours"
+ | "Total Minutes";
+ search_entity:
+ | "Resource"
+ | "Person"
+ | "Customer"
+ | "Supplier"
+ | "Job"
+ | "Part"
+ | "Purchase Order"
+ | "Sales Order"
+ | "Document";
+ };
+ };
+}
diff --git a/packages/carbon-database/supabase/migrations/20230224035103_shifts.sql b/packages/carbon-database/supabase/migrations/20230224035103_shifts.sql
index 90e5ad3a36..0feda08d77 100644
--- a/packages/carbon-database/supabase/migrations/20230224035103_shifts.sql
+++ b/packages/carbon-database/supabase/migrations/20230224035103_shifts.sql
@@ -142,6 +142,7 @@ CREATE TABLE "employeeJob" (
"shiftId" TEXT,
"managerId" TEXT,
"title" TEXT,
+ "startDate" DATE,
CONSTRAINT "employeeJob_pkey" PRIMARY KEY ("id"),
CONSTRAINT "employeeJob_id_fkey" FOREIGN KEY ("id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,
diff --git a/packages/carbon-database/supabase/migrations/20230319224154_partners.sql b/packages/carbon-database/supabase/migrations/20230319224154_partners.sql
new file mode 100644
index 0000000000..bd23d71233
--- /dev/null
+++ b/packages/carbon-database/supabase/migrations/20230319224154_partners.sql
@@ -0,0 +1,14 @@
+CREATE TABLE "partner" (
+ "id" TEXT NOT NULL,
+ "hoursPerWeek" INTEGER NOT NULL DEFAULT 0,
+ "active" BOOLEAN NOT NULL DEFAULT true,
+ "createdBy" TEXT NOT NULL,
+ "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
+ "updatedBy" TEXT,
+ "updatedAt" TIMESTAMP WITH TIME ZONE,
+
+ CONSTRAINT "partner_pkey" PRIMARY KEY ("id"),
+ CONSTRAINT "partner_id_fkey" FOREIGN KEY ("id") REFERENCES "supplier"("id"),
+ CONSTRAINT "partner_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "user"("id"),
+ CONSTRAINT "partner_updatedBy_fkey" FOREIGN KEY ("updatedBy") REFERENCES "user"("id")
+);
\ No newline at end of file
diff --git a/packages/carbon-database/tsup.config.bundled_o7g8q4dn64b.mjs b/packages/carbon-database/tsup.config.bundled_o7g8q4dn64b.mjs
new file mode 100644
index 0000000000..acf61a5741
--- /dev/null
+++ b/packages/carbon-database/tsup.config.bundled_o7g8q4dn64b.mjs
@@ -0,0 +1,15 @@
+// tsup.config.ts
+import { defineConfig } from "tsup";
+var isProduction = process.env.NODE_ENV === "production";
+var tsup_config_default = defineConfig({
+ clean: true,
+ dts: true,
+ entry: ["src/index.ts"],
+ format: ["cjs", "esm"],
+ minify: isProduction,
+ sourcemap: true
+});
+export {
+ tsup_config_default as default
+};
+//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidHN1cC5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9faW5qZWN0ZWRfZmlsZW5hbWVfXyA9IFwiL1VzZXJzL2JiYXJiaW4vQ29kZS9jYXJib24vcGFja2FnZXMvY2FyYm9uLWRhdGFiYXNlL3RzdXAuY29uZmlnLnRzXCI7Y29uc3QgX19pbmplY3RlZF9kaXJuYW1lX18gPSBcIi9Vc2Vycy9iYmFyYmluL0NvZGUvY2FyYm9uL3BhY2thZ2VzL2NhcmJvbi1kYXRhYmFzZVwiO2NvbnN0IF9faW5qZWN0ZWRfaW1wb3J0X21ldGFfdXJsX18gPSBcImZpbGU6Ly8vVXNlcnMvYmJhcmJpbi9Db2RlL2NhcmJvbi9wYWNrYWdlcy9jYXJib24tZGF0YWJhc2UvdHN1cC5jb25maWcudHNcIjtpbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tIFwidHN1cFwiO1xuXG5jb25zdCBpc1Byb2R1Y3Rpb24gPSBwcm9jZXNzLmVudi5OT0RFX0VOViA9PT0gXCJwcm9kdWN0aW9uXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGRlZmluZUNvbmZpZyh7XG4gIGNsZWFuOiB0cnVlLFxuICBkdHM6IHRydWUsXG4gIGVudHJ5OiBbXCJzcmMvaW5kZXgudHNcIl0sXG4gIGZvcm1hdDogW1wiY2pzXCIsIFwiZXNtXCJdLFxuICBtaW5pZnk6IGlzUHJvZHVjdGlvbixcbiAgc291cmNlbWFwOiB0cnVlLFxufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQXVTLFNBQVMsb0JBQW9CO0FBRXBVLElBQU0sZUFBZSxRQUFRLElBQUksYUFBYTtBQUU5QyxJQUFPLHNCQUFRLGFBQWE7QUFBQSxFQUMxQixPQUFPO0FBQUEsRUFDUCxLQUFLO0FBQUEsRUFDTCxPQUFPLENBQUMsY0FBYztBQUFBLEVBQ3RCLFFBQVEsQ0FBQyxPQUFPLEtBQUs7QUFBQSxFQUNyQixRQUFRO0FBQUEsRUFDUixXQUFXO0FBQ2IsQ0FBQzsiLAogICJuYW1lcyI6IFtdCn0K
diff --git a/packages/carbon-redis/tsup.config.bundled_r5u3e79sewr.mjs b/packages/carbon-redis/tsup.config.bundled_r5u3e79sewr.mjs
new file mode 100644
index 0000000000..3f51cd567b
--- /dev/null
+++ b/packages/carbon-redis/tsup.config.bundled_r5u3e79sewr.mjs
@@ -0,0 +1,15 @@
+// tsup.config.ts
+import { defineConfig } from "tsup";
+var isProduction = process.env.NODE_ENV === "production";
+var tsup_config_default = defineConfig({
+ clean: true,
+ dts: true,
+ entry: ["src/index.ts"],
+ format: ["cjs", "esm"],
+ minify: isProduction,
+ sourcemap: true
+});
+export {
+ tsup_config_default as default
+};
+//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidHN1cC5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9faW5qZWN0ZWRfZmlsZW5hbWVfXyA9IFwiL1VzZXJzL2JiYXJiaW4vQ29kZS9jYXJib24vcGFja2FnZXMvY2FyYm9uLXJlZGlzL3RzdXAuY29uZmlnLnRzXCI7Y29uc3QgX19pbmplY3RlZF9kaXJuYW1lX18gPSBcIi9Vc2Vycy9iYmFyYmluL0NvZGUvY2FyYm9uL3BhY2thZ2VzL2NhcmJvbi1yZWRpc1wiO2NvbnN0IF9faW5qZWN0ZWRfaW1wb3J0X21ldGFfdXJsX18gPSBcImZpbGU6Ly8vVXNlcnMvYmJhcmJpbi9Db2RlL2NhcmJvbi9wYWNrYWdlcy9jYXJib24tcmVkaXMvdHN1cC5jb25maWcudHNcIjtpbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tIFwidHN1cFwiO1xuXG5jb25zdCBpc1Byb2R1Y3Rpb24gPSBwcm9jZXNzLmVudi5OT0RFX0VOViA9PT0gXCJwcm9kdWN0aW9uXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGRlZmluZUNvbmZpZyh7XG4gIGNsZWFuOiB0cnVlLFxuICBkdHM6IHRydWUsXG4gIGVudHJ5OiBbXCJzcmMvaW5kZXgudHNcIl0sXG4gIGZvcm1hdDogW1wiY2pzXCIsIFwiZXNtXCJdLFxuICBtaW5pZnk6IGlzUHJvZHVjdGlvbixcbiAgc291cmNlbWFwOiB0cnVlLFxufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQThSLFNBQVMsb0JBQW9CO0FBRTNULElBQU0sZUFBZSxRQUFRLElBQUksYUFBYTtBQUU5QyxJQUFPLHNCQUFRLGFBQWE7QUFBQSxFQUMxQixPQUFPO0FBQUEsRUFDUCxLQUFLO0FBQUEsRUFDTCxPQUFPLENBQUMsY0FBYztBQUFBLEVBQ3RCLFFBQVEsQ0FBQyxPQUFPLEtBQUs7QUFBQSxFQUNyQixRQUFRO0FBQUEsRUFDUixXQUFXO0FBQ2IsQ0FBQzsiLAogICJuYW1lcyI6IFtdCn0K
diff --git a/docs/.eslintrc.js b/www/.eslintrc.js
similarity index 100%
rename from docs/.eslintrc.js
rename to www/.eslintrc.js
diff --git a/docs/README.md b/www/README.md
similarity index 95%
rename from docs/README.md
rename to www/README.md
index 4d87288ff2..95d81fcfbd 100644
--- a/docs/README.md
+++ b/www/README.md
@@ -9,5 +9,5 @@ After reading the documentation, you should have enough knowledge to modify a mo
From the root repo run:
```bash
-$ yarn dev:docs
+$ yarn dev:www
```
diff --git a/docs/components/features.tsx b/www/components/features.tsx
similarity index 100%
rename from docs/components/features.tsx
rename to www/components/features.tsx
diff --git a/docs/components/index.ts b/www/components/index.ts
similarity index 100%
rename from docs/components/index.ts
rename to www/components/index.ts
diff --git a/www/components/pages/Home.tsx b/www/components/pages/Home.tsx
new file mode 100644
index 0000000000..13e100c583
--- /dev/null
+++ b/www/components/pages/Home.tsx
@@ -0,0 +1,47 @@
+import React from "react";
+import Head from "next/head";
+import Features from "../features";
+
+export default function Home() {
+ return (
+ <>
+ <Head>
+ <title>Carbon ERP</title>
+ <meta
+ name="og:description"
+ content="Carbon ERP is an open source high performance ERP for manufacturing."
+ />
+ </Head>
+
+ <div className="px-4 py-16 mx-auto sm:pt-20 sm:pb-24 lg:max-w-7xl lg:pt-24">
+ <div className="flex flex-col justify-between text-center">
+ <div>
+ <h1 className="max-w-5xl mx-auto nx-text-6xl font-extrabold tracking-tighter leading-[1.1] text-6xl sm:text-7xl lg:nx-text-8xl xl:nx-text-8xl">
+ ERP &nbsp;
+ <span className="pr-1 inline-block text-transparent bg-clip-text bg-gradient-to-r from-green-500 to-blue-500 ">
+ for the builders
+ </span>
+ </h1>
+ <p className="mt-6 nx-text-xl font-medium leading-tight text-gray-400 sm:nx-text-2xl md:nx-text-3xl lg:nx-text-4xl">
+ Carbon ERP is an open source high performance ERP for
+ manufacturers.
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <div className="relative from-gray-50 to-gray-100">
+ <div className="px-4 py-16 mx-auto sm:pt-20 sm:pb-24 lg:max-w-7xl lg:pt-24">
+ <h2 className="nx-text-4xl font-extrabold tracking-tight lg:nx-text-5xl xl:nx-text-6xl lg:text-center dark:text-white">
+ Fully customizable and extensible
+ </h2>
+ <p className="mx-auto mt-4 text-lg font-medium text-gray-400 lg:max-w-3xl lg:text-xl lg:text-center">
+ We've taken the best of modern, open-source technology and combined
+ it into a lightning-fast, easy-to-use, open-source ERP system.
+ </p>
+ <Features />
+ </div>
+ </div>
+ </>
+ );
+}
diff --git a/docs/next-env.d.ts b/www/next-env.d.ts
similarity index 100%
rename from docs/next-env.d.ts
rename to www/next-env.d.ts
diff --git a/docs/next.config.js b/www/next.config.js
similarity index 100%
rename from docs/next.config.js
rename to www/next.config.js
diff --git a/docs/package.json b/www/package.json
similarity index 97%
rename from docs/package.json
rename to www/package.json
index d546f6b439..938f54b253 100644
--- a/docs/package.json
+++ b/www/package.json
@@ -1,5 +1,5 @@
{
- "name": "docs",
+ "name": "www",
"version": "0.0.0",
"private": true,
"scripts": {
diff --git a/docs/pages/_app.tsx b/www/pages/_app.tsx
similarity index 100%
rename from docs/pages/_app.tsx
rename to www/pages/_app.tsx
diff --git a/www/pages/_meta.json b/www/pages/_meta.json
new file mode 100644
index 0000000000..10ca8b2e2c
--- /dev/null
+++ b/www/pages/_meta.json
@@ -0,0 +1,16 @@
+{
+ "*": {
+ "type": "page"
+ },
+ "index": {
+ "title": "Home",
+ "type": "page",
+ "display": "hidden",
+ "theme": {
+ "layout": "raw",
+ "sidebar": false,
+ "toc": true
+ }
+ },
+ "docs": "Docs"
+}
diff --git a/docs/pages/_meta.json b/www/pages/docs/_meta.json
similarity index 100%
rename from docs/pages/_meta.json
rename to www/pages/docs/_meta.json
diff --git a/docs/pages/core-concepts/_meta.json b/www/pages/docs/core-concepts/_meta.json
similarity index 100%
rename from docs/pages/core-concepts/_meta.json
rename to www/pages/docs/core-concepts/_meta.json
diff --git a/docs/pages/getting-started.mdx b/www/pages/docs/getting-started.mdx
similarity index 98%
rename from docs/pages/getting-started.mdx
rename to www/pages/docs/getting-started.mdx
index 11be163b1d..42c294a0d7 100644
--- a/docs/pages/getting-started.mdx
+++ b/www/pages/docs/getting-started.mdx
@@ -5,7 +5,7 @@ description: Carbon ERP is a high-performance, open-source ERP for manufacturing
# Getting Started
-Before getting started with development, it's good to have a basic understanding of our [tech stack](/stack)
+Before getting started with development, it's good to have a basic understanding of our [tech stack](/stack).
You'll also need to have [Docker installed](https://docs.docker.com/desktop/install/mac-install/) and [yarn installed](https://yarnpkg.com/lang/en/docs/install/#debian-stable)
on your system since this monorepo uses the yarn package manager.
diff --git a/docs/pages/index.mdx b/www/pages/docs/index.mdx
similarity index 97%
rename from docs/pages/index.mdx
rename to www/pages/docs/index.mdx
index be807e216b..96f0033c2f 100644
--- a/docs/pages/index.mdx
+++ b/www/pages/docs/index.mdx
@@ -3,7 +3,7 @@ title: What is Carbon ERP?
description: Carbon ERP is a high-performance, open-source ERP for manufacturing.
---
-import { Features } from "../components";
+import { Features } from "../../components";
# Carbon ERP
diff --git a/docs/pages/principles/_meta.json b/www/pages/docs/principles/_meta.json
similarity index 74%
rename from docs/pages/principles/_meta.json
rename to www/pages/docs/principles/_meta.json
index cd99813538..26efabd18d 100644
--- a/docs/pages/principles/_meta.json
+++ b/www/pages/docs/principles/_meta.json
@@ -1,5 +1,6 @@
{
"simplicity": "Simple",
+ "extensiblity": "Extensible",
"open-source": "Open Source",
"productivity": "Productive"
}
diff --git a/www/pages/index.mdx b/www/pages/index.mdx
new file mode 100644
index 0000000000..115217e62c
--- /dev/null
+++ b/www/pages/index.mdx
@@ -0,0 +1,7 @@
+---
+title: Carbon ERP | An open source high performance ERP for manufacturing
+---
+
+import Home from "../components/pages/Home";
+
+<Home />
diff --git a/docs/postcss.config.js b/www/postcss.config.js
similarity index 100%
rename from docs/postcss.config.js
rename to www/postcss.config.js
diff --git a/docs/public/favicon.ico b/www/public/favicon.ico
similarity index 100%
rename from docs/public/favicon.ico
rename to www/public/favicon.ico
diff --git a/docs/public/logo-dark.png b/www/public/logo-dark.png
similarity index 100%
rename from docs/public/logo-dark.png
rename to www/public/logo-dark.png
diff --git a/docs/public/logo-light.png b/www/public/logo-light.png
similarity index 100%
rename from docs/public/logo-light.png
rename to www/public/logo-light.png
diff --git a/docs/styles.css b/www/styles.css
similarity index 100%
rename from docs/styles.css
rename to www/styles.css
diff --git a/docs/tailwind.config.js b/www/tailwind.config.js
similarity index 100%
rename from docs/tailwind.config.js
rename to www/tailwind.config.js
diff --git a/docs/theme.config.js b/www/theme.config.js
similarity index 88%
rename from docs/theme.config.js
rename to www/theme.config.js
index 8100dc788b..d6c056c77d 100644
--- a/docs/theme.config.js
+++ b/www/theme.config.js
@@ -17,12 +17,14 @@ export default {
project: {
link: "https://github.com/barbinbrad/carbon", // GitHub link in the navbar
},
- docsRepositoryBase:
- "https://github.com/barbinbrad/carbon/blob/main/apps/docs", // base URL for the docs repository
+ docsRepositoryBase: "https://github.com/barbinbrad/carbon/blob/main/apps/www", // base URL for the docs repository
navigation: {
next: true,
prev: true,
},
+ sidebar: {
+ defaultMenuCollapseLevel: 1,
+ },
darkMode: true,
footer: {
text: `Carbon ERP ${new Date().getFullYear()}. All rights reserved.`,
diff --git a/docs/tsconfig.json b/www/tsconfig.json
similarity index 100%
rename from docs/tsconfig.json
rename to www/tsconfig.json
diff --git a/docs/vercel.json b/www/vercel.json
similarity index 100%
rename from docs/vercel.json
rename to www/vercel.json