remove console
This commit is contained in:
commit
e725efb945
1
.ssh/id_rsa.pub
Normal file
1
.ssh/id_rsa.pub
Normal file
@ -0,0 +1 @@
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDOfOFPvQNw5XguFuX1YNvED8ulP+tIA/5xw7LHcA0gRj3hwILCAEAjuDs+d13zCsnEb0yd+laT3PU9iRIKa28Tynu+sTjGDyfx8MX/HjJtbEzyd6jLn87uTvw/6lzg2y5ZDEa6PEqrPIv0KEhuq6HuU8qAA0nBpsTIAUTK3XR8qm3I6J9Rs1JyBjvIP5UeICApvoLmgHuz6mKdvoQ8qKDWamsL4pSc4Hr7HlQ8ITNhnyS8XMgQInU/I2TzT/I4Dxx5IeFUQ5KOfJJNgK1d+PByLSWUrn+eRXki8m1hjMiwGIehVAriFW1C309SEHxLHjQKUPXHSv4kH7zqjO+p3kY5gwp/lvsBRSnihj8s1lADsJlMqjnSLeIQ+sY2CNkmXXI8ABkzhuJKTGTl+8pzGGhIHzeU7e7lpSn3gLn4p217kIppHNAr6dZH9UaYbgnwVonwr5cLbatRPFyI1NfXKDyZtSYlGQxLQUt9KDrNvVTZzaTt3YwM/YCsRIADAagKosM= gisele-smartchain@MacBook-Pro-6.local
|
44
Dockerfile.front
Normal file
44
Dockerfile.front
Normal file
@ -0,0 +1,44 @@
|
||||
# Install dependencies only when needed
|
||||
FROM node:19-alpine AS deps
|
||||
|
||||
WORKDIR leCoffre-front
|
||||
|
||||
COPY package.json ./
|
||||
|
||||
RUN apk update && apk add openssh-client git
|
||||
|
||||
COPY id_rsa /root/.ssh/id_rsa
|
||||
RUN chmod 600 ~/.ssh/id_rsa
|
||||
RUN eval "$(ssh-agent -s)" && ssh-add /root/.ssh/id_rsa
|
||||
RUN ssh-keyscan github.com smart-chain-fr/leCoffre-resources.git >> /root/.ssh/known_hosts
|
||||
|
||||
RUN npm install --frozen-lockfile
|
||||
|
||||
# Rebuild the source code only when needed
|
||||
FROM node:19-alpine AS builder
|
||||
|
||||
WORKDIR leCoffre-front
|
||||
|
||||
COPY --from=deps leCoffre-front/node_modules ./node_modules
|
||||
COPY --from=deps leCoffre-front/package.json package.json
|
||||
COPY tsconfig.json tsconfig.json
|
||||
COPY src src
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# Production image, copy all the files and run next
|
||||
FROM node:19-alpine AS production
|
||||
|
||||
WORKDIR leCoffre-front
|
||||
|
||||
RUN adduser -D lecoffreuser --uid 10000 && chown -R lecoffreuser .
|
||||
|
||||
COPY public ./public
|
||||
COPY --from=builder --chown=lecoffreuser leCoffre-front/node_modules ./node_modules
|
||||
COPY --from=builder --chown=lecoffreuser leCoffre-front/.next ./.next
|
||||
COPY --from=builder --chown=lecoffreuser leCoffre-front/package.json ./package.json
|
||||
|
||||
USER lecoffreuser
|
||||
|
||||
CMD ["npm", "run", "start"]
|
||||
EXPOSE 3000
|
@ -2,7 +2,6 @@ import { File } from "le-coffre-resources/dist/SuperAdmin";
|
||||
|
||||
import BaseSuperAdmin from "../BaseSuperAdmin";
|
||||
|
||||
|
||||
// TODO Type get query params -> Where + inclue + orderby
|
||||
export interface IGetFilesparams {
|
||||
where?: {};
|
||||
@ -57,7 +56,6 @@ export default class Files extends BaseSuperAdmin {
|
||||
return this.baseURl.concat(`/download/${uid}`);
|
||||
}
|
||||
|
||||
|
||||
public async getByUid(uid: string, q?: any): Promise<File> {
|
||||
const url = new URL(this.baseURl.concat(`/${uid}`));
|
||||
const query = { q };
|
||||
|
@ -58,9 +58,13 @@ class DocumentNotaryClass extends React.Component<IPropsClass, IState> {
|
||||
return fileName;
|
||||
}
|
||||
} else {
|
||||
const archivedFilesLenght = documentFiles.filter((file) => file.archived_at).length;
|
||||
const documentFileLenght = documentFiles.length - archivedFilesLenght;
|
||||
return `${documentFileLenght} documents déposés`;
|
||||
const archivedFilesLength = documentFiles.filter((file) => file.archived_at).length;
|
||||
const documentFileLength = documentFiles.length - archivedFilesLength;
|
||||
if(this.props.document.document_status === EDocumentStatus.ASKED || this.props.document.document_status === EDocumentStatus.REFUSED){
|
||||
return 'Aucun document déposé';
|
||||
}
|
||||
|
||||
return `${documentFileLength} documents déposés`;
|
||||
}
|
||||
} else {
|
||||
return "Aucun document déposé";
|
||||
|
@ -10,6 +10,9 @@ import BurgerMenu from "./BurgerMenu";
|
||||
import WindowStore from "@Front/Stores/WindowStore";
|
||||
import Module from "@Front/Config/Module";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import LogoCielNatureIcon from "./logo-ciel-notaires.jpeg";
|
||||
|
||||
enum EHeaderOpeningState {
|
||||
OPEN = "open",
|
||||
CLOSED = "closed",
|
||||
@ -19,6 +22,11 @@ enum EHeaderOpeningState {
|
||||
type IProps = {
|
||||
isUserConnected: boolean;
|
||||
};
|
||||
|
||||
type IPropsClass = IProps & {
|
||||
isOnCustomerLoginPage: boolean;
|
||||
};
|
||||
|
||||
type IState = {
|
||||
open: EHeaderOpeningState;
|
||||
isBurgerMenuOpen: boolean;
|
||||
@ -26,11 +34,11 @@ type IState = {
|
||||
isProfileMenuOpen: boolean;
|
||||
};
|
||||
|
||||
export default class Header extends React.Component<IProps, IState> {
|
||||
class HeaderClass extends React.Component<IPropsClass, IState> {
|
||||
private onWindowResize = () => {};
|
||||
private headerBreakpoint = 1300;
|
||||
|
||||
constructor(props: IProps) {
|
||||
constructor(props: IPropsClass) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
@ -85,6 +93,7 @@ export default class Header extends React.Component<IProps, IState> {
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{this.props.isOnCustomerLoginPage && <Image width={70} height={70} alt="ciel-nature" src={LogoCielNatureIcon}></Image>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -126,3 +135,10 @@ export default class Header extends React.Component<IProps, IState> {
|
||||
this.setState({ isProfileMenuOpen: false });
|
||||
}
|
||||
}
|
||||
|
||||
export default function Header(props: IProps) {
|
||||
const router = useRouter();
|
||||
const { pathname } = router;
|
||||
let isActive = Module.getInstance().get().modules.pages.CustomersLogin.props.path === pathname;
|
||||
return <HeaderClass {...props} isOnCustomerLoginPage={isActive} />;
|
||||
}
|
||||
|
BIN
src/front/Components/DesignSystem/Header/logo-ciel-notaires.jpeg
Normal file
BIN
src/front/Components/DesignSystem/Header/logo-ciel-notaires.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 128 KiB |
@ -24,6 +24,13 @@
|
||||
"labelKey": "design_system"
|
||||
}
|
||||
},
|
||||
"CustomersLogin": {
|
||||
"enabled": true,
|
||||
"props": {
|
||||
"path": "/customers/login",
|
||||
"labelKey": "customer_login"
|
||||
}
|
||||
},
|
||||
"Folder": {
|
||||
"enabled": true,
|
||||
"props": {
|
||||
|
@ -24,6 +24,13 @@
|
||||
"labelKey": "design_system"
|
||||
}
|
||||
},
|
||||
"CustomersLogin": {
|
||||
"enabled": true,
|
||||
"props": {
|
||||
"path": "/customers/login",
|
||||
"labelKey": "customer_login"
|
||||
}
|
||||
},
|
||||
"Folder": {
|
||||
"enabled": true,
|
||||
"props": {
|
||||
|
@ -24,6 +24,13 @@
|
||||
"labelKey": "design_system"
|
||||
}
|
||||
},
|
||||
"CustomersLogin": {
|
||||
"enabled": true,
|
||||
"props": {
|
||||
"path": "/customers/login",
|
||||
"labelKey": "customer_login"
|
||||
}
|
||||
},
|
||||
"Folder": {
|
||||
"enabled": true,
|
||||
"props": {
|
||||
|
@ -24,6 +24,13 @@
|
||||
"labelKey": "design_system"
|
||||
}
|
||||
},
|
||||
"CustomersLogin": {
|
||||
"enabled": true,
|
||||
"props": {
|
||||
"path": "/customers/login",
|
||||
"labelKey": "customer_login"
|
||||
}
|
||||
},
|
||||
"Folder": {
|
||||
"enabled": true,
|
||||
"props": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user