Merge branch 'staging'
This commit is contained in:
commit
8eb996d22b
@ -6,22 +6,29 @@ include:
|
|||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
build-app:
|
build-app:
|
||||||
|
tags:
|
||||||
|
- frontbuild
|
||||||
|
stage: build
|
||||||
extends: .build_template
|
extends: .build_template
|
||||||
|
variables:
|
||||||
|
DOCKER_BUILD_PATH: "./Dockerfile"
|
||||||
|
PRODUCTION_BRANCH: main
|
||||||
|
STAGING_BRANCH: staging
|
||||||
|
|
||||||
deploy-to-staging:
|
deploy-to-staging:
|
||||||
|
tags:
|
||||||
|
- front
|
||||||
|
- staging
|
||||||
rules:
|
rules:
|
||||||
- if: "$CI_COMMIT_BRANCH == $STAGING_BRANCH"
|
- if: "$CI_COMMIT_BRANCH == $STAGING_BRANCH"
|
||||||
extends: .deploy_template
|
extends: .deploy_template
|
||||||
tags:
|
|
||||||
- staging
|
|
||||||
extends: .deploy_template
|
|
||||||
|
|
||||||
deploy-to-prod:
|
deploy-to-prod:
|
||||||
|
tags:
|
||||||
|
- front
|
||||||
|
- prod
|
||||||
rules:
|
rules:
|
||||||
- if: "$CI_COMMIT_BRANCH == $PRODUCTION_BRANCH"
|
- if: "$CI_COMMIT_BRANCH == $PRODUCTION_BRANCH"
|
||||||
tags:
|
|
||||||
- prod
|
|
||||||
- front
|
|
||||||
extends: .deploy_template
|
extends: .deploy_template
|
||||||
|
@ -24,6 +24,7 @@ export const VerificationTab = ({ userId }: VerificationTabProps) => {
|
|||||||
const [verificationResponse, verificationError] = await verification(
|
const [verificationResponse, verificationError] = await verification(
|
||||||
userId
|
userId
|
||||||
);
|
);
|
||||||
|
console.log(verificationResponse)
|
||||||
|
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
|
|
||||||
@ -39,9 +40,15 @@ export const VerificationTab = ({ userId }: VerificationTabProps) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const debouncedINNHC = useDebouncedCallback((str) => {
|
const debouncedINNHC = useDebouncedCallback((str) => {
|
||||||
|
if (!verificationInfo) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
patchVerification({
|
patchVerification({
|
||||||
taxnumber: str.replace(/[^0-9]/g,""),
|
comment,
|
||||||
|
taxnumber: str,
|
||||||
id: verificationInfo?._id,
|
id: verificationInfo?._id,
|
||||||
|
status: verificationInfo?.status,
|
||||||
|
accepted: verificationInfo?.accepted,
|
||||||
});
|
});
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
@ -59,6 +66,7 @@ export const VerificationTab = ({ userId }: VerificationTabProps) => {
|
|||||||
accepted,
|
accepted,
|
||||||
comment,
|
comment,
|
||||||
id: verificationInfo._id,
|
id: verificationInfo._id,
|
||||||
|
taxnumber: INN,
|
||||||
status: verificationInfo.status,
|
status: verificationInfo.status,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -76,6 +84,7 @@ export const VerificationTab = ({ userId }: VerificationTabProps) => {
|
|||||||
await requestVefification();
|
await requestVefification();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log("verificationInfo", verificationInfo)
|
||||||
return (
|
return (
|
||||||
<Box sx={{ padding: "25px" }}>
|
<Box sx={{ padding: "25px" }}>
|
||||||
<Typography
|
<Typography
|
||||||
@ -135,8 +144,8 @@ export const VerificationTab = ({ userId }: VerificationTabProps) => {
|
|||||||
if (!verificationInfo) {
|
if (!verificationInfo) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setINN(event.target.value)
|
setINN(event.target.value.replace(/[^0-9]/g,""))
|
||||||
debouncedINNHC(event.target.value)}
|
debouncedINNHC(event.target.value.replace(/[^0-9]/g,""))}
|
||||||
}
|
}
|
||||||
placeholder="ИНН"
|
placeholder="ИНН"
|
||||||
/>
|
/>
|
||||||
|
@ -19,9 +19,10 @@ const translateMessage: Record<string, string> = {
|
|||||||
|
|
||||||
export const parseAxiosError = (nativeError: unknown): [string, number?] => {
|
export const parseAxiosError = (nativeError: unknown): [string, number?] => {
|
||||||
const error = nativeError as AxiosError;
|
const error = nativeError as AxiosError;
|
||||||
|
console.log(error)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
error.response?.data &&
|
error.response?.data && error.response?.data !== "Not Found" &&
|
||||||
"statusCode" in (error.response.data as ServerError)
|
"statusCode" in (error.response.data as ServerError)
|
||||||
) {
|
) {
|
||||||
const serverError = error.response.data as ServerError
|
const serverError = error.response.data as ServerError
|
||||||
|
Loading…
Reference in New Issue
Block a user