Skip to content
Merged

Dev #964

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 12 additions & 0 deletions src/constant/modules.constants.ts
Original file line number Diff line number Diff line change
@@ -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,
}
1 change: 1 addition & 0 deletions src/lib/api/types/storage.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type GetPreSignedUrlForUploadPayload = {
configurationName?: string;
projectKey: string;
additionalProperties?: Record<string, string>;
moduleName: number;
};

export type GetPreSignedUrlForUploadResponse = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -116,6 +121,7 @@ export function AdvanceInventoryDetails() {
configurationName: 'Default',
parentDirectoryId: '',
tags: '',
moduleName: ModuleName.DefaultConstruct,
},
{
onSuccess: (responseData) => resolve(responseData),
Expand Down
2 changes: 2 additions & 0 deletions src/modules/inventory/pages/inventory-form/inventory-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -170,6 +171,7 @@ export const InventoryFormPage = () => {
configurationName: 'Default',
parentDirectoryId: '',
tags: '',
moduleName: ModuleName.DefaultConstruct,
});

if (!data.isSuccess || !data.uploadUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -157,6 +158,7 @@ export function EditProfile({ userInfo, onClose }: Readonly<EditProfileProps>) {
configurationName: 'Default',
parentDirectoryId: '',
tags: '',
moduleName: ModuleName.IAMConstruct,
});

if (!data.isSuccess || !data.uploadUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -180,6 +181,7 @@ export function AttachmentsSection({
configurationName: 'Default',
parentDirectoryId: '',
tags: '',
moduleName: ModuleName.DefaultConstruct,
},
{
onSuccess: (data) => handleUploadSuccess(data, file, resolve),
Expand Down
Loading