Skip to content

Commit

Permalink
kyc complete
Browse files Browse the repository at this point in the history
  • Loading branch information
TinyMurky committed Sep 12, 2024
1 parent e3bd2c5 commit d45ee81
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iSunFA",
"version": "0.8.1+10",
"version": "0.8.1+11",
"private": false,
"scripts": {
"dev": "next dev",
Expand Down
1 change: 0 additions & 1 deletion src/components/edit_bookmark_modal/edit_bookmark_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const EditBookmarkModal = ({ isModalVisible, modalVisibilityHandler }: IAddBookm
}, [isAddBookmarkModalVisible]);

const menuOptionClickHandler = (name: string) => {
// console.log('selectedBookmark', selectedBookmarkRef.current);
setSelectedBookmark((prevSelected) => {
if (prevSelected.includes(name)) {
return prevSelected.filter((item) => item !== name);
Expand Down
1 change: 1 addition & 0 deletions src/components/kyc/kyc_form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ const KYCForm = () => {
...intUploadDocuments,
};
const { isComplete, missingFields } = isKYCFormComplete(companyKYCForm);

if (isComplete) {
const { success, code } = await triggerUpload({
params: {
Expand Down
1 change: 1 addition & 0 deletions src/lib/utils/type_guard/company_kyc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function isCompanyKYC(data: unknown): data is ICompanyKYC {
// );

const isValid = iCompanyKYCValidator.safeParse(data);

return isValid.success;
}

Expand Down
6 changes: 3 additions & 3 deletions src/lib/utils/zod_schema/kyc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export const iCompanyKYCValidator = z.object({
taxCertificateFileId: z.number(),
representativeIdCardFileId: z.number(),
status: z.string(),
reviewer: z.string(),
note: z.string(),
reviewAt: z.number(),
reviewer: z.string().nullable(),
note: z.string().nullable(),
reviewAt: z.number().nullable(),
createdAt: z.number(),
updatedAt: z.number(),
deletedAt: z.number().nullable(),
Expand Down
3 changes: 1 addition & 2 deletions src/pages/api/v1/company/[companyId]/kyc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { createCompanyKYC } from '@/lib/utils/repo/company_kyc.repo';
import { isCompanyKYC, isCompanyKYCForm } from '@/lib/utils/type_guard/company_kyc';
import { validateRequest } from '@/lib/utils/request_validator';
import { APIName } from '@/constants/api_connection';
import loggerBack, { loggerError } from '@/lib/utils/logger_back';
import { loggerError } from '@/lib/utils/logger_back';

async function handlePostRequest(
req: NextApiRequest,
Expand All @@ -30,7 +30,6 @@ async function handlePostRequest(
statusMessage = STATUS_MESSAGE.FORBIDDEN;
} else {
const { body: companyKYCForm } = validateRequest(APIName.KYC_UPLOAD, req, userId);
loggerBack.info({ userId, companyId, companyKYCForm });
if (!isCompanyKYCForm(companyKYCForm)) {
statusMessage = STATUS_MESSAGE.INVALID_INPUT_PARAMETER;
} else {
Expand Down

0 comments on commit d45ee81

Please sign in to comment.