Merge branch 'dev' into staging
This commit is contained in:
commit
a06642ba22
@ -2,7 +2,6 @@ import { File } from "le-coffre-resources/dist/SuperAdmin";
|
|||||||
|
|
||||||
import BaseSuperAdmin from "../BaseSuperAdmin";
|
import BaseSuperAdmin from "../BaseSuperAdmin";
|
||||||
|
|
||||||
|
|
||||||
// TODO Type get query params -> Where + inclue + orderby
|
// TODO Type get query params -> Where + inclue + orderby
|
||||||
export interface IGetFilesparams {
|
export interface IGetFilesparams {
|
||||||
where?: {};
|
where?: {};
|
||||||
@ -54,10 +53,10 @@ export default class Files extends BaseSuperAdmin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getUploadLink(uid: string): string {
|
public getUploadLink(uid: string): string {
|
||||||
|
console.log("uid", uid);
|
||||||
return this.baseURl.concat(`/upload/${uid}`);
|
return this.baseURl.concat(`/upload/${uid}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async getByUid(uid: string, q?: any): Promise<File> {
|
public async getByUid(uid: string, q?: any): Promise<File> {
|
||||||
const url = new URL(this.baseURl.concat(`/${uid}`));
|
const url = new URL(this.baseURl.concat(`/${uid}`));
|
||||||
const query = { q };
|
const query = { q };
|
||||||
|
@ -58,9 +58,13 @@ class DocumentNotaryClass extends React.Component<IPropsClass, IState> {
|
|||||||
return fileName;
|
return fileName;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const archivedFilesLenght = documentFiles.filter((file) => file.archived_at).length;
|
const archivedFilesLength = documentFiles.filter((file) => file.archived_at).length;
|
||||||
const documentFileLenght = documentFiles.length - archivedFilesLenght;
|
const documentFileLength = documentFiles.length - archivedFilesLength;
|
||||||
return `${documentFileLenght} documents déposés`;
|
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 {
|
} else {
|
||||||
return "Aucun document déposé";
|
return "Aucun document déposé";
|
||||||
|
@ -10,6 +10,9 @@ import BurgerMenu from "./BurgerMenu";
|
|||||||
import WindowStore from "@Front/Stores/WindowStore";
|
import WindowStore from "@Front/Stores/WindowStore";
|
||||||
import Module from "@Front/Config/Module";
|
import Module from "@Front/Config/Module";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import LogoCielNatureIcon from "./logo-ciel-notaires.jpeg";
|
||||||
|
|
||||||
enum EHeaderOpeningState {
|
enum EHeaderOpeningState {
|
||||||
OPEN = "open",
|
OPEN = "open",
|
||||||
CLOSED = "closed",
|
CLOSED = "closed",
|
||||||
@ -19,6 +22,11 @@ enum EHeaderOpeningState {
|
|||||||
type IProps = {
|
type IProps = {
|
||||||
isUserConnected: boolean;
|
isUserConnected: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type IPropsClass = IProps & {
|
||||||
|
isOnCustomerLoginPage: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
type IState = {
|
type IState = {
|
||||||
open: EHeaderOpeningState;
|
open: EHeaderOpeningState;
|
||||||
isBurgerMenuOpen: boolean;
|
isBurgerMenuOpen: boolean;
|
||||||
@ -26,11 +34,11 @@ type IState = {
|
|||||||
isProfileMenuOpen: boolean;
|
isProfileMenuOpen: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class Header extends React.Component<IProps, IState> {
|
class HeaderClass extends React.Component<IPropsClass, IState> {
|
||||||
private onWindowResize = () => {};
|
private onWindowResize = () => {};
|
||||||
private headerBreakpoint = 1300;
|
private headerBreakpoint = 1300;
|
||||||
|
|
||||||
constructor(props: IProps) {
|
constructor(props: IPropsClass) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -85,6 +93,7 @@ export default class Header extends React.Component<IProps, IState> {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
{this.props.isOnCustomerLoginPage && <Image width={70} height={70} alt="ciel-nature" src={LogoCielNatureIcon}></Image>}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -126,3 +135,10 @@ export default class Header extends React.Component<IProps, IState> {
|
|||||||
this.setState({ isProfileMenuOpen: false });
|
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"
|
"labelKey": "design_system"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"CustomersLogin": {
|
||||||
|
"enabled": true,
|
||||||
|
"props": {
|
||||||
|
"path": "/customers/login",
|
||||||
|
"labelKey": "customer_login"
|
||||||
|
}
|
||||||
|
},
|
||||||
"Folder": {
|
"Folder": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"props": {
|
"props": {
|
||||||
|
@ -24,6 +24,13 @@
|
|||||||
"labelKey": "design_system"
|
"labelKey": "design_system"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"CustomersLogin": {
|
||||||
|
"enabled": true,
|
||||||
|
"props": {
|
||||||
|
"path": "/customers/login",
|
||||||
|
"labelKey": "customer_login"
|
||||||
|
}
|
||||||
|
},
|
||||||
"Folder": {
|
"Folder": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"props": {
|
"props": {
|
||||||
|
@ -24,6 +24,13 @@
|
|||||||
"labelKey": "design_system"
|
"labelKey": "design_system"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"CustomersLogin": {
|
||||||
|
"enabled": true,
|
||||||
|
"props": {
|
||||||
|
"path": "/customers/login",
|
||||||
|
"labelKey": "customer_login"
|
||||||
|
}
|
||||||
|
},
|
||||||
"Folder": {
|
"Folder": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"props": {
|
"props": {
|
||||||
|
@ -24,6 +24,13 @@
|
|||||||
"labelKey": "design_system"
|
"labelKey": "design_system"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"CustomersLogin": {
|
||||||
|
"enabled": true,
|
||||||
|
"props": {
|
||||||
|
"path": "/customers/login",
|
||||||
|
"labelKey": "customer_login"
|
||||||
|
}
|
||||||
|
},
|
||||||
"Folder": {
|
"Folder": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"props": {
|
"props": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user