diff --git a/.env b/.env index abc9812c2..ef503d6f8 100644 --- a/.env +++ b/.env @@ -5,7 +5,7 @@ VITE_CAPTCHA_SITE_KEY=6LckI90qAAAAAK8RP2t0Nohwii1CeKOETsXPVNQA VITE_CAPTCHA_TYPE=reCaptcha VITE_PROJECT_SLUG = ddoxpd VITE_BLOCKS_OIDC_CLIENT_ID = 4354ad04-07b9-4e27-8b93-f53b472e1803 -VITE_BLOCKS_OIDC_REDIRECT_URI = http://localhost:3000/oidc +VITE_BLOCKS_OIDC_REDIRECT_URI = http://localhost:3000/oidc # Build configuration diff --git a/.env.dev b/.env.dev index 2615bf209..86af6a8c9 100644 --- a/.env.dev +++ b/.env.dev @@ -5,6 +5,8 @@ VITE_CAPTCHA_SITE_KEY=6LckI90qAAAAAK8RP2t0Nohwii1CeKOETsXPVNQA VITE_CAPTCHA_TYPE=reCaptcha VITE_PROJECT_SLUG = ddoxpd +VITE_BLOCKS_OIDC_CLIENT_ID = d45f37a6-7f4a-4f38-9a13-06d74531d7ef +VITE_BLOCKS_OIDC_REDIRECT_URI = https://dev-construct.seliseblocks.com/login # Build configuration GENERATE_SOURCEMAP=false diff --git a/src/constant/modules.constants.ts b/src/constant/modules.constants.ts new file mode 100644 index 000000000..8237cb9aa --- /dev/null +++ b/src/constant/modules.constants.ts @@ -0,0 +1,12 @@ +export enum ModuleName { + Cloud = 1, + Construct = 2, + DefaultCloud = 3, + AICloud = 4, + IAMCloud = 5, + Localization = 6, + LMT = 7, + DefaultConstruct = 8, + AIConstruct = 9, + IAMConstruct = 10, +} diff --git a/src/lib/api/types/storage.types.ts b/src/lib/api/types/storage.types.ts index 5c9c9a148..76189ea07 100644 --- a/src/lib/api/types/storage.types.ts +++ b/src/lib/api/types/storage.types.ts @@ -8,6 +8,7 @@ export type GetPreSignedUrlForUploadPayload = { configurationName?: string; projectKey: string; additionalProperties?: Record; + moduleName: number; }; export type GetPreSignedUrlForUploadResponse = { diff --git a/src/modules/inventory/component/advance-inventory-details/advance-inventory-details.tsx b/src/modules/inventory/component/advance-inventory-details/advance-inventory-details.tsx index 0c6b99ff7..6939de5d5 100644 --- a/src/modules/inventory/component/advance-inventory-details/advance-inventory-details.tsx +++ b/src/modules/inventory/component/advance-inventory-details/advance-inventory-details.tsx @@ -28,7 +28,12 @@ import { Skeleton } from '@/components/ui-kit/skeleton'; import { useGetPreSignedUrlForUpload } from '@/lib/api/hooks/use-storage'; import { GetPreSignedUrlForUploadResponse } from '@/lib/api/types/storage.types'; import PlaceHolderImage from '@/assets/images/image_off_placeholder.webp'; -import { useDeleteInventoryItem, useGetInventories, useUpdateInventoryItem } from '../../hooks/use-inventory'; +import { + useDeleteInventoryItem, + useGetInventories, + useUpdateInventoryItem, +} from '../../hooks/use-inventory'; +import { ModuleName } from '@/constant/modules.constants'; /** * A detailed view and editing interface for an individual inventory item. @@ -116,6 +121,7 @@ export function AdvanceInventoryDetails() { configurationName: 'Default', parentDirectoryId: '', tags: '', + moduleName: ModuleName.DefaultConstruct, }, { onSuccess: (responseData) => resolve(responseData), diff --git a/src/modules/inventory/pages/inventory-form/inventory-form.tsx b/src/modules/inventory/pages/inventory-form/inventory-form.tsx index 65cc3b9a9..f7d75ff5b 100644 --- a/src/modules/inventory/pages/inventory-form/inventory-form.tsx +++ b/src/modules/inventory/pages/inventory-form/inventory-form.tsx @@ -15,6 +15,7 @@ import { } from '../../types/inventory.types'; import { useAddInventoryItem } from '../../hooks/use-inventory'; import { AdditionalInfoForm } from '../../component/additional-info-form/additional-info-form'; +import { ModuleName } from '@/constant/modules.constants'; /** * Stepper component provides a multi-step navigation interface, displaying the steps and allowing the user to @@ -170,6 +171,7 @@ export const InventoryFormPage = () => { configurationName: 'Default', parentDirectoryId: '', tags: '', + moduleName: ModuleName.DefaultConstruct, }); if (!data.isSuccess || !data.uploadUrl) { diff --git a/src/modules/profile/components/modals/edit-profile/edit-profile.tsx b/src/modules/profile/components/modals/edit-profile/edit-profile.tsx index 6bae4434a..3a43a08d2 100644 --- a/src/modules/profile/components/modals/edit-profile/edit-profile.tsx +++ b/src/modules/profile/components/modals/edit-profile/edit-profile.tsx @@ -25,6 +25,7 @@ import { Form, FormField, FormItem, FormControl, FormMessage } from '@/component import { UIPhoneInput } from '@/components/core'; import DummyProfile from '@/assets/images/dummy_profile.png'; import { useUpdateAccount } from '@/modules/profile/hooks/use-account'; +import { ModuleName } from '@/constant/modules.constants'; /** * `EditProfile` component allows the user to edit their profile details, including their full name, email, phone number, and profile image. @@ -157,6 +158,7 @@ export function EditProfile({ userInfo, onClose }: Readonly) { configurationName: 'Default', parentDirectoryId: '', tags: '', + moduleName: ModuleName.IAMConstruct, }); if (!data.isSuccess || !data.uploadUrl) { diff --git a/src/modules/task-manager/components/task-details-view/attachment-section.tsx b/src/modules/task-manager/components/task-details-view/attachment-section.tsx index 49dc70d6e..077e9fa0c 100644 --- a/src/modules/task-manager/components/task-details-view/attachment-section.tsx +++ b/src/modules/task-manager/components/task-details-view/attachment-section.tsx @@ -26,6 +26,7 @@ import { Label } from '@/components/ui-kit/label'; import { Input } from '@/components/ui-kit/input'; import { useGetPreSignedUrlForUpload } from '@/lib/api/hooks/use-storage'; import { useErrorHandler } from '@/hooks/use-error-handler'; +import { ModuleName } from '@/constant/modules.constants'; const getFileType = (file: File): FileType => { if (file.type.includes('pdf')) return 'pdf'; @@ -180,6 +181,7 @@ export function AttachmentsSection({ configurationName: 'Default', parentDirectoryId: '', tags: '', + moduleName: ModuleName.DefaultConstruct, }, { onSuccess: (data) => handleUploadSuccess(data, file, resolve),