format all front repo
This commit is contained in:
parent
dae26fd7a0
commit
f9ec6a47bd
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -31,5 +31,8 @@
|
|||||||
"rust-client.rustupPath": "${env:HOME}/elrondsdk/vendor-rust/bin/rustup",
|
"rust-client.rustupPath": "${env:HOME}/elrondsdk/vendor-rust/bin/rustup",
|
||||||
"rust-client.rlsPath": "${env:HOME}/elrondsdk/vendor-rust/bin/rls",
|
"rust-client.rlsPath": "${env:HOME}/elrondsdk/vendor-rust/bin/rls",
|
||||||
"rust-client.disableRustup": true,
|
"rust-client.disableRustup": true,
|
||||||
"rust-client.autoStartRls": false
|
"rust-client.autoStartRls": false,
|
||||||
|
"[typescriptreact]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
}
|
||||||
}
|
}
|
15
package-lock.json
generated
15
package-lock.json
generated
@ -21,6 +21,7 @@
|
|||||||
"eslint-config-next": "13.2.4",
|
"eslint-config-next": "13.2.4",
|
||||||
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.18",
|
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.18",
|
||||||
"next": "13.2.4",
|
"next": "13.2.4",
|
||||||
|
"prettier": "^2.8.7",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-select": "^5.7.2",
|
"react-select": "^5.7.2",
|
||||||
@ -3506,6 +3507,20 @@
|
|||||||
"node": ">= 0.8.0"
|
"node": ">= 0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/prettier": {
|
||||||
|
"version": "2.8.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz",
|
||||||
|
"integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==",
|
||||||
|
"bin": {
|
||||||
|
"prettier": "bin-prettier.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.13.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/prop-types": {
|
"node_modules/prop-types": {
|
||||||
"version": "15.8.1",
|
"version": "15.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint",
|
||||||
|
"format": "prettier --write src"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.10.6",
|
"@emotion/react": "^11.10.6",
|
||||||
@ -22,6 +23,7 @@
|
|||||||
"eslint-config-next": "13.2.4",
|
"eslint-config-next": "13.2.4",
|
||||||
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.18",
|
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.18",
|
||||||
"next": "13.2.4",
|
"next": "13.2.4",
|
||||||
|
"prettier": "^2.8.7",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-select": "^5.7.2",
|
"react-select": "^5.7.2",
|
||||||
@ -31,5 +33,3 @@
|
|||||||
"typescript": "4.9.5"
|
"typescript": "4.9.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,9 +17,7 @@ export default class Auth extends BaseApiService {
|
|||||||
public async getIdnotJwt(autorizationCode: string | string[]): Promise<any> {
|
public async getIdnotJwt(autorizationCode: string | string[]): Promise<any> {
|
||||||
const variables = FrontendVariables.getInstance();
|
const variables = FrontendVariables.getInstance();
|
||||||
const baseBackUrl =
|
const baseBackUrl =
|
||||||
variables.BACK_API_PROTOCOL +
|
variables.BACK_API_PROTOCOL + variables.BACK_API_HOST + (variables.BACK_API_PORT ? ":" + variables.BACK_API_PORT : "");
|
||||||
variables.BACK_API_HOST +
|
|
||||||
(variables.BACK_API_PORT ? ":" + variables.BACK_API_PORT : "");
|
|
||||||
const url = new URL(`${baseBackUrl}/api/v1/idnot-user/${autorizationCode}`);
|
const url = new URL(`${baseBackUrl}/api/v1/idnot-user/${autorizationCode}`);
|
||||||
try {
|
try {
|
||||||
return await this.postRequest<any>(url);
|
return await this.postRequest<any>(url);
|
||||||
|
@ -12,9 +12,7 @@ export default abstract class BaseApiService {
|
|||||||
BaseApiService.baseUrl ??=
|
BaseApiService.baseUrl ??=
|
||||||
FrontendVariables.getInstance().BACK_API_PROTOCOL +
|
FrontendVariables.getInstance().BACK_API_PROTOCOL +
|
||||||
FrontendVariables.getInstance().BACK_API_HOST +
|
FrontendVariables.getInstance().BACK_API_HOST +
|
||||||
(FrontendVariables.getInstance().BACK_API_PORT
|
(FrontendVariables.getInstance().BACK_API_PORT ? ":" + FrontendVariables.getInstance().BACK_API_PORT : "") +
|
||||||
? ":" + FrontendVariables.getInstance().BACK_API_PORT
|
|
||||||
: "") +
|
|
||||||
FrontendVariables.getInstance().BACK_API_ROOT_URL +
|
FrontendVariables.getInstance().BACK_API_ROOT_URL +
|
||||||
FrontendVariables.getInstance().BACK_API_VERSION;
|
FrontendVariables.getInstance().BACK_API_VERSION;
|
||||||
}
|
}
|
||||||
@ -45,24 +43,18 @@ export default abstract class BaseApiService {
|
|||||||
return this.sendRequest<T>(request);
|
return this.sendRequest<T>(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async postRequest<T>(
|
protected async postRequest<T>(url: URL, body: { [key: string]: unknown } = {}) {
|
||||||
url: URL,
|
|
||||||
body: { [key: string]: unknown } = {}
|
|
||||||
) {
|
|
||||||
return this.sendRequest<T>(
|
return this.sendRequest<T>(
|
||||||
async () =>
|
async () =>
|
||||||
await fetch(url, {
|
await fetch(url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: this.buildHeaders(ContentType.JSON),
|
headers: this.buildHeaders(ContentType.JSON),
|
||||||
body: this.buildBody(body),
|
body: this.buildBody(body),
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async putRequest<T>(
|
protected async putRequest<T>(url: URL, body: { [key: string]: unknown } = {}) {
|
||||||
url: URL,
|
|
||||||
body: { [key: string]: unknown } = {}
|
|
||||||
) {
|
|
||||||
const request = async () =>
|
const request = async () =>
|
||||||
await fetch(url, {
|
await fetch(url, {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
@ -73,10 +65,7 @@ export default abstract class BaseApiService {
|
|||||||
return this.sendRequest<T>(request);
|
return this.sendRequest<T>(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async patchRequest<T>(
|
protected async patchRequest<T>(url: URL, body: { [key: string]: unknown } = {}) {
|
||||||
url: URL,
|
|
||||||
body: { [key: string]: unknown } = {}
|
|
||||||
) {
|
|
||||||
const request = async () =>
|
const request = async () =>
|
||||||
await fetch(url, {
|
await fetch(url, {
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
@ -87,10 +76,7 @@ export default abstract class BaseApiService {
|
|||||||
return this.sendRequest<T>(request);
|
return this.sendRequest<T>(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async deleteRequest<T>(
|
protected async deleteRequest<T>(url: URL, body: { [key: string]: unknown } = {}) {
|
||||||
url: URL,
|
|
||||||
body: { [key: string]: unknown } = {}
|
|
||||||
) {
|
|
||||||
const request = async () =>
|
const request = async () =>
|
||||||
await fetch(url, {
|
await fetch(url, {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
@ -117,10 +103,7 @@ export default abstract class BaseApiService {
|
|||||||
return this.processResponse<T>(response, request);
|
return this.processResponse<T>(response, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async processResponse<T>(
|
protected async processResponse<T>(response: Response, request: () => Promise<Response>): Promise<T> {
|
||||||
response: Response,
|
|
||||||
request: () => Promise<Response>
|
|
||||||
): Promise<T> {
|
|
||||||
let responseJson: any | null;
|
let responseJson: any | null;
|
||||||
try {
|
try {
|
||||||
responseJson = await response.json();
|
responseJson = await response.json();
|
||||||
|
@ -31,8 +31,7 @@ export default class Users extends BaseNotary {
|
|||||||
|
|
||||||
public async getAuthorizationCode(): Promise<any> {
|
public async getAuthorizationCode(): Promise<any> {
|
||||||
try {
|
try {
|
||||||
const url =
|
const url = new URL(`https://qual-connexion.idnot.fr/IdPOAuth2/authorize/idnot_idp_v1?
|
||||||
new URL(`https://qual-connexion.idnot.fr/IdPOAuth2/authorize/idnot_idp_v1?
|
|
||||||
client_id=4501646203F3EF67
|
client_id=4501646203F3EF67
|
||||||
&redirect_uri=https://app.stg.lecoffre.smart-chain.fr/
|
&redirect_uri=https://app.stg.lecoffre.smart-chain.fr/
|
||||||
&scope=openid,profile,offline_access
|
&scope=openid,profile,offline_access
|
||||||
|
@ -7,9 +7,7 @@ Then, add the tezoslink.net RPC endpoint to your prefered Tezos JS library.
|
|||||||
> i.e with [Sotez](https://github.com/AndrewKishino/sotez) :
|
> i.e with [Sotez](https://github.com/AndrewKishino/sotez) :
|
||||||
>
|
>
|
||||||
> ```js
|
> ```js
|
||||||
> const sotez = new Sotez(
|
> const sotez = new Sotez("https://<NETWORK>.tezoslink.net/v1/<YOUR_PROJECT_ID>");
|
||||||
> "https://<NETWORK>.tezoslink.net/v1/<YOUR_PROJECT_ID>"
|
|
||||||
> );
|
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
## Networks
|
## Networks
|
||||||
|
@ -31,7 +31,7 @@ export default function Button(props: IProps) {
|
|||||||
onClick,
|
onClick,
|
||||||
children,
|
children,
|
||||||
icon,
|
icon,
|
||||||
iconStyle
|
iconStyle,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const attributes = { ...props, variant, disabled, type, isloading, fullwidth };
|
const attributes = { ...props, variant, disabled, type, isloading, fullwidth };
|
||||||
|
@ -6,20 +6,18 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
&.PENDING{
|
&.PENDING {
|
||||||
border-color: $orange-soft;
|
border-color: $orange-soft;
|
||||||
}
|
}
|
||||||
&.VALIDATED{
|
&.VALIDATED {
|
||||||
border-color: $green-soft;
|
border-color: $green-soft;
|
||||||
}
|
}
|
||||||
.valid-radius{
|
.valid-radius {
|
||||||
background-color: $green-flash;
|
background-color: $green-flash;
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
}
|
}
|
||||||
.trash{
|
.trash {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,8 +13,7 @@ type IProps = {
|
|||||||
uid: Document["uid"];
|
uid: Document["uid"];
|
||||||
document_type: Document["document_type"];
|
document_type: Document["document_type"];
|
||||||
document_status: Document["document_status"];
|
document_status: Document["document_status"];
|
||||||
|
};
|
||||||
}
|
|
||||||
openDeletionModal?: (uid: Document["uid"]) => void;
|
openDeletionModal?: (uid: Document["uid"]) => void;
|
||||||
};
|
};
|
||||||
type IState = {};
|
type IState = {};
|
||||||
@ -25,30 +24,34 @@ export default class DocumentNotary extends React.Component<IProps, IState> {
|
|||||||
this.onOpenDeletionModal = this.onOpenDeletionModal.bind(this);
|
this.onOpenDeletionModal = this.onOpenDeletionModal.bind(this);
|
||||||
}
|
}
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return <div className={classNames(classes["root"], classes[this.props.document.document_status])}>
|
return (
|
||||||
|
<div className={classNames(classes["root"], classes[this.props.document.document_status])}>
|
||||||
<div>
|
<div>
|
||||||
<Typography typo={ITypo.P_SB_16}>{this.props.document?.document_type?.name}</Typography>
|
<Typography typo={ITypo.P_SB_16}>{this.props.document?.document_type?.name}</Typography>
|
||||||
<Typography typo={ITypo.CAPTION_14}>Aucun document déposé</Typography>
|
<Typography typo={ITypo.CAPTION_14}>Aucun document déposé</Typography>
|
||||||
</div>
|
</div>
|
||||||
{this.renderIcon()}
|
{this.renderIcon()}
|
||||||
</div>;
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private renderIcon(): JSX.Element {
|
private renderIcon(): JSX.Element {
|
||||||
switch (this.props.document.document_status) {
|
switch (this.props.document.document_status) {
|
||||||
case "VALIDATED":
|
case "VALIDATED":
|
||||||
return <div className={classes["valid-radius"]}>
|
return (
|
||||||
|
<div className={classes["valid-radius"]}>
|
||||||
<Image src={ValidIcon} alt="valid icon" />
|
<Image src={ValidIcon} alt="valid icon" />
|
||||||
</div>
|
</div>
|
||||||
|
);
|
||||||
case "PENDING":
|
case "PENDING":
|
||||||
return <WarningBadge />
|
return <WarningBadge />;
|
||||||
default:
|
default:
|
||||||
return <Image src={TrashIcon} alt="trash icon" className={classes["trash"]} onClick={this.onOpenDeletionModal}/>;
|
return <Image src={TrashIcon} alt="trash icon" className={classes["trash"]} onClick={this.onOpenDeletionModal} />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private onOpenDeletionModal(): void {
|
private onOpenDeletionModal(): void {
|
||||||
if(!this.props.openDeletionModal) return;
|
if (!this.props.openDeletionModal) return;
|
||||||
this.props.openDeletionModal(this.props.document.uid);
|
this.props.openDeletionModal(this.props.document.uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,23 +9,21 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display:grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||||
gap: 32px;
|
gap: 32px;
|
||||||
@media (max-width: $screen-l) {
|
@media (max-width: $screen-l) {
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
|
|
||||||
}
|
}
|
||||||
@media (max-width: $screen-s) {
|
@media (max-width: $screen-s) {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.isSignleDescription {
|
&.isSignleDescription {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.edit-icon{
|
.edit-icon {
|
||||||
margin-left: 48px;
|
margin-left: 48px;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -14,14 +14,15 @@ type IProps = {
|
|||||||
export default function FolderBoxInformation(props: IProps) {
|
export default function FolderBoxInformation(props: IProps) {
|
||||||
const { isDescription = false } = props;
|
const { isDescription = false } = props;
|
||||||
|
|
||||||
return <div className={classNames(classes["root"], isDescription && classes["isSignleDescription"])}>
|
return (
|
||||||
|
<div className={classNames(classes["root"], isDescription && classes["isSignleDescription"])}>
|
||||||
<div className={classes["content"]}>
|
<div className={classes["content"]}>
|
||||||
{isDescription ?
|
{isDescription ? (
|
||||||
<div className={classes["text-container"]}>
|
<div className={classes["text-container"]}>
|
||||||
<Typography typo={ITypo.NAV_INPUT_16}>Note dossier :</Typography>
|
<Typography typo={ITypo.NAV_INPUT_16}>Note dossier :</Typography>
|
||||||
<Typography typo={ITypo.P_18}>{props.folder.description ?? "..."}</Typography>
|
<Typography typo={ITypo.P_18}>{props.folder.description ?? "..."}</Typography>
|
||||||
</div>
|
</div>
|
||||||
:
|
) : (
|
||||||
<>
|
<>
|
||||||
<div className={classes["text-container"]}>
|
<div className={classes["text-container"]}>
|
||||||
<Typography typo={ITypo.NAV_INPUT_16}>Intitulé du dossier</Typography>
|
<Typography typo={ITypo.NAV_INPUT_16}>Intitulé du dossier</Typography>
|
||||||
@ -40,10 +41,11 @@ export default function FolderBoxInformation(props: IProps) {
|
|||||||
<Typography typo={ITypo.P_18}>{formatDate(props.folder.created_at)}</Typography>
|
<Typography typo={ITypo.P_18}>{formatDate(props.folder.created_at)}</Typography>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<Image src={PenICon} alt="edit informations" className={classes["edit-icon"]} />
|
<Image src={PenICon} alt="edit informations" className={classes["edit-icon"]} />
|
||||||
</div>;
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatDate(date: Date | null): string {
|
function formatDate(date: Date | null): string {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
border: 1px solid $grey-medium;
|
border: 1px solid $grey-medium;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&:hover{
|
&:hover {
|
||||||
background-color: $grey-medium;
|
background-color: $grey-medium;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -18,7 +18,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.warning{
|
.warning {
|
||||||
margin-left: 32px;
|
margin-left: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotar
|
|||||||
type IProps = {
|
type IProps = {
|
||||||
folder: IDashBoardFolder;
|
folder: IDashBoardFolder;
|
||||||
onSelectedFolder?: (folder: IDashBoardFolder) => void;
|
onSelectedFolder?: (folder: IDashBoardFolder) => void;
|
||||||
}
|
};
|
||||||
type IState = {};
|
type IState = {};
|
||||||
|
|
||||||
export default class FolderContainer extends React.Component<IProps, IState> {
|
export default class FolderContainer extends React.Component<IProps, IState> {
|
||||||
@ -19,13 +19,19 @@ export default class FolderContainer extends React.Component<IProps, IState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return <div className={classes["root"]} onClick={this.onSelectedFolder}>
|
return (
|
||||||
|
<div className={classes["root"]} onClick={this.onSelectedFolder}>
|
||||||
<div className={classes["left-side"]}>
|
<div className={classes["left-side"]}>
|
||||||
<Typography typo={ITypo.P_16}>{"Dossier ".concat(this.props.folder.folder_number)}</Typography>
|
<Typography typo={ITypo.P_16}>{"Dossier ".concat(this.props.folder.folder_number)}</Typography>
|
||||||
{this.countPendingDocuments() > 0 && <div className={classes["warning"]}><WarningBadge /></div>}
|
{this.countPendingDocuments() > 0 && (
|
||||||
|
<div className={classes["warning"]}>
|
||||||
|
<WarningBadge />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<Image alt="chevron" src={ChevronIcon} />
|
<Image alt="chevron" src={ChevronIcon} />
|
||||||
</div>;
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private countPendingDocuments(): number {
|
private countPendingDocuments(): number {
|
||||||
|
@ -14,14 +14,19 @@ type IState = {};
|
|||||||
|
|
||||||
export default class FolderList extends React.Component<IProps, IState> {
|
export default class FolderList extends React.Component<IProps, IState> {
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return <div className={classes["root"]}>
|
return (
|
||||||
|
<div className={classes["root"]}>
|
||||||
{this.props.folders.map((folder) => {
|
{this.props.folders.map((folder) => {
|
||||||
return <div onClick={this.props.onCloseLeftSide} key={folder.uid}>
|
return (
|
||||||
|
<div onClick={this.props.onCloseLeftSide} key={folder.uid}>
|
||||||
<Link href={"/dossier/".concat(folder.uid)}>
|
<Link href={"/dossier/".concat(folder.uid)}>
|
||||||
<FolderContainer folder={folder} onSelectedFolder={this.props.onSelectedFolder} />;
|
<FolderContainer folder={folder} onSelectedFolder={this.props.onSelectedFolder} />;
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
})};
|
);
|
||||||
</div>;
|
})}
|
||||||
|
;
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,22 +24,27 @@ export default class FolderListContainer extends React.Component<IProps, IState>
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return <div className={classes["root"]}>
|
return (
|
||||||
|
<div className={classes["root"]}>
|
||||||
<div>
|
<div>
|
||||||
<div className={classes["searchbar"]}>
|
<div className={classes["searchbar"]}>
|
||||||
<SearchBar folders={this.props.folders} onChange={this.filterFolders} />
|
<SearchBar folders={this.props.folders} onChange={this.filterFolders} />
|
||||||
</div>
|
</div>
|
||||||
<FolderList folders={this.state.filteredFolders} onSelectedFolder={this.props.onSelectedFolder && this.props.onSelectedFolder} onCloseLeftSide={this.props.onCloseLeftSide}/>
|
<FolderList
|
||||||
|
folders={this.state.filteredFolders}
|
||||||
|
onSelectedFolder={this.props.onSelectedFolder && this.props.onSelectedFolder}
|
||||||
|
onCloseLeftSide={this.props.onCloseLeftSide}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<Button fullwidth={"true"}>Créer un dossier</Button>
|
<Button fullwidth={"true"}>Créer un dossier</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private filterFolders(folders: IDashBoardFolder[]): IDashBoardFolder[] {
|
private filterFolders(folders: IDashBoardFolder[]): IDashBoardFolder[] {
|
||||||
this.setState({ filteredFolders: folders })
|
this.setState({ filteredFolders: folders });
|
||||||
return folders;
|
return folders;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
.root {
|
.root {
|
||||||
position: relative;
|
position: relative;
|
||||||
textarea{
|
textarea {
|
||||||
resize: none;
|
resize: none;
|
||||||
height: auto;
|
height: auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-family: 'Inter';
|
font-family: "Inter";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
@ -17,7 +17,7 @@ type IState = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default class Notifications extends React.Component<IProps, IState> {
|
export default class Notifications extends React.Component<IProps, IState> {
|
||||||
private removeOnToastChange: () => void = () => { };
|
private removeOnToastChange: () => void = () => {};
|
||||||
|
|
||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -38,7 +38,9 @@ export default class Notifications extends React.Component<IProps, IState> {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{this.props.isModalOpen && <NotificationModal isOpen={this.props.isModalOpen} closeModal={this.props.closeNotificationModal} />}
|
{this.props.isModalOpen && (
|
||||||
|
<NotificationModal isOpen={this.props.isModalOpen} closeModal={this.props.closeNotificationModal} />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,7 @@ type IProps = {
|
|||||||
openProfileModal: () => void;
|
openProfileModal: () => void;
|
||||||
closeProfileModal: () => void;
|
closeProfileModal: () => void;
|
||||||
};
|
};
|
||||||
type IState = {
|
type IState = {};
|
||||||
};
|
|
||||||
|
|
||||||
export default class Profile extends React.Component<IProps, IState> {
|
export default class Profile extends React.Component<IProps, IState> {
|
||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
|
@ -26,7 +26,7 @@ type IState = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default class Header extends React.Component<IProps, IState> {
|
export default class Header extends React.Component<IProps, IState> {
|
||||||
private onWindowResize = () => { };
|
private onWindowResize = () => {};
|
||||||
private headerBreakpoint = 1300;
|
private headerBreakpoint = 1300;
|
||||||
|
|
||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
@ -53,31 +53,40 @@ export default class Header extends React.Component<IProps, IState> {
|
|||||||
<Image src={LogoIcon} alt="logo" className={classes["logo"]} />
|
<Image src={LogoIcon} alt="logo" className={classes["logo"]} />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
{this.props.isUserConnected &&
|
{this.props.isUserConnected && (
|
||||||
<>
|
<>
|
||||||
<Navigation />
|
<Navigation />
|
||||||
<div className={classes["right-section"]}>
|
<div className={classes["right-section"]}>
|
||||||
<div className={classes["notification-section"]}>
|
<div className={classes["notification-section"]}>
|
||||||
<Notifications isModalOpen={this.state.isNotificationMenuOpen} openNotificationModal={this.openNotificationMenu} closeNotificationModal={this.closeNotificationMenu} />
|
<Notifications
|
||||||
|
isModalOpen={this.state.isNotificationMenuOpen}
|
||||||
|
openNotificationModal={this.openNotificationMenu}
|
||||||
|
closeNotificationModal={this.closeNotificationMenu}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes["profile-section"]}>
|
<div className={classes["profile-section"]}>
|
||||||
<Profile isModalOpen={this.state.isProfileMenuOpen} closeProfileModal={this.closeProfileMenu} openProfileModal={this.openProfileMenu} />
|
<Profile
|
||||||
|
isModalOpen={this.state.isProfileMenuOpen}
|
||||||
|
closeProfileModal={this.closeProfileMenu}
|
||||||
|
openProfileModal={this.openProfileMenu}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes["burger-menu"]}>
|
<div className={classes["burger-menu"]}>
|
||||||
<BurgerMenu isModalOpen={this.state.isBurgerMenuOpen} closeBurgerMenu={this.closeBurgerMenu} openBurgerMenu={this.openBurgerMenu} />
|
<BurgerMenu
|
||||||
|
isModalOpen={this.state.isBurgerMenuOpen}
|
||||||
|
closeBurgerMenu={this.closeBurgerMenu}
|
||||||
|
openBurgerMenu={this.openBurgerMenu}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
}
|
)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override componentDidMount() {
|
public override componentDidMount() {
|
||||||
this.onWindowResize = WindowStore.getInstance().onResize((window) =>
|
this.onWindowResize = WindowStore.getInstance().onResize((window) => this.onResize(window));
|
||||||
this.onResize(window)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override componentWillUnmount() {
|
public override componentWillUnmount() {
|
||||||
|
@ -9,12 +9,12 @@ type IState = {};
|
|||||||
type IFolderInformation = {
|
type IFolderInformation = {
|
||||||
label: string;
|
label: string;
|
||||||
value: string;
|
value: string;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
export default class InformationBox extends React.Component<IProps, IState> {
|
export default class InformationBox extends React.Component<IProps, IState> {
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return <div className={classes["root"]}>
|
return (
|
||||||
|
<div className={classes["root"]}>
|
||||||
{/* {this.props.informations.map((information, key) => {
|
{/* {this.props.informations.map((information, key) => {
|
||||||
const output = <div className={classes["information"] } key={key}>
|
const output = <div className={classes["information"] } key={key}>
|
||||||
<span className={classes["label"]}>{information.label}</span>
|
<span className={classes["label"]}>{information.label}</span>
|
||||||
@ -22,6 +22,7 @@ export default class InformationBox extends React.Component<IProps, IState> {
|
|||||||
</div>;
|
</div>;
|
||||||
return output;
|
return output;
|
||||||
})}; */}
|
})}; */}
|
||||||
</div>;
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,5 @@ export default class LogOutButton extends React.Component<IProps, IState> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private disconnect() {
|
private disconnect() {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -13,14 +13,14 @@ type IState = {
|
|||||||
export default class Alert extends React.Component<IProps, IState> {
|
export default class Alert extends React.Component<IProps, IState> {
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
closeText: "Ok",
|
closeText: "Ok",
|
||||||
...Modal.defaultProps
|
...Modal.defaultProps,
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
isOpen: this.props.isOpen ?? true,
|
isOpen: this.props.isOpen ?? true,
|
||||||
}
|
};
|
||||||
this.onClose = this.onClose.bind(this);
|
this.onClose = this.onClose.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ export default class Confirm extends React.Component<IProps, IState> {
|
|||||||
cancelText: "Cancel",
|
cancelText: "Cancel",
|
||||||
confirmText: "Confirm",
|
confirmText: "Confirm",
|
||||||
isConfirmButtonDisabled: false,
|
isConfirmButtonDisabled: false,
|
||||||
...Modal.defaultProps
|
...Modal.defaultProps,
|
||||||
};
|
};
|
||||||
|
|
||||||
public override render(): JSX.Element | null {
|
public override render(): JSX.Element | null {
|
||||||
@ -30,8 +30,7 @@ export default class Confirm extends React.Component<IProps, IState> {
|
|||||||
onClose={this.props.onClose}
|
onClose={this.props.onClose}
|
||||||
header={this.props.header}
|
header={this.props.header}
|
||||||
footer={this.footer()}
|
footer={this.footer()}
|
||||||
animationDelay={this.props.animationDelay}
|
animationDelay={this.props.animationDelay}>
|
||||||
>
|
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
@ -40,7 +39,6 @@ export default class Confirm extends React.Component<IProps, IState> {
|
|||||||
private footer(): JSX.Element {
|
private footer(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div className={classes["buttons-container"]}>
|
<div className={classes["buttons-container"]}>
|
||||||
|
|
||||||
{this.props.showCancelButton && (
|
{this.props.showCancelButton && (
|
||||||
<Button variant={EButtonVariant.GHOST} onClick={this.props.onClose}>
|
<Button variant={EButtonVariant.GHOST} onClick={this.props.onClose}>
|
||||||
{this.props.cancelText}
|
{this.props.cancelText}
|
||||||
|
@ -28,7 +28,7 @@ type IState = {
|
|||||||
|
|
||||||
export default class Modal extends React.Component<IProps, IState> {
|
export default class Modal extends React.Component<IProps, IState> {
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
animationDelay: 250
|
animationDelay: 250,
|
||||||
};
|
};
|
||||||
public rootRefElement = React.createRef<HTMLDivElement>();
|
public rootRefElement = React.createRef<HTMLDivElement>();
|
||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
@ -36,19 +36,23 @@ export default class Modal extends React.Component<IProps, IState> {
|
|||||||
this.close = this.close.bind(this);
|
this.close = this.close.bind(this);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
willClose: false
|
willClose: false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override render(): JSX.Element | null {
|
public override render(): JSX.Element | null {
|
||||||
if (!this.props.isOpen) return null;
|
if (!this.props.isOpen) return null;
|
||||||
const onClick = (this.props.hasContainerClosable && this.close) || (() => { });
|
const onClick = (this.props.hasContainerClosable && this.close) || (() => {});
|
||||||
return (
|
return (
|
||||||
<div ref={this.rootRefElement} className={classes["root"]} data-side-background={this.props.withSideBackground} data-will-close={this.state.willClose.toString()}>
|
<div
|
||||||
|
ref={this.rootRefElement}
|
||||||
|
className={classes["root"]}
|
||||||
|
data-side-background={this.props.withSideBackground}
|
||||||
|
data-will-close={this.state.willClose.toString()}>
|
||||||
<div className={classes["background"]} onClick={this.close} />
|
<div className={classes["background"]} onClick={this.close} />
|
||||||
<div
|
<div
|
||||||
className={[classes["container"], this.props.hasTransparentBackground && classes["transparant-background"]].join(" ")}
|
className={[classes["container"], this.props.hasTransparentBackground && classes["transparant-background"]].join(" ")}
|
||||||
onClick={onClick} >
|
onClick={onClick}>
|
||||||
{this.props.closeBtn && (
|
{this.props.closeBtn && (
|
||||||
<div className={classes["cross"]}>
|
<div className={classes["cross"]}>
|
||||||
<Image alt="Unplugged" src={CrossIcon} className={classes["close-icon"]} onClick={this.close} />
|
<Image alt="Unplugged" src={CrossIcon} className={classes["close-icon"]} onClick={this.close} />
|
||||||
@ -73,12 +77,12 @@ export default class Modal extends React.Component<IProps, IState> {
|
|||||||
|
|
||||||
protected close() {
|
protected close() {
|
||||||
if (this.state.willClose) return;
|
if (this.state.willClose) return;
|
||||||
this.setState({ willClose: true })
|
this.setState({ willClose: true });
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
willClose: false
|
willClose: false,
|
||||||
})
|
});
|
||||||
this.props.onClose()
|
this.props.onClose();
|
||||||
}, this.props.animationDelay)
|
}, this.props.animationDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,9 +11,8 @@
|
|||||||
border: 1px solid $grey-medium;
|
border: 1px solid $grey-medium;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
||||||
&.active{
|
&.active {
|
||||||
padding: 16px 24px;
|
padding: 16px 24px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.label {
|
.label {
|
||||||
font-family: var(--font-primary);
|
font-family: var(--font-primary);
|
||||||
@ -32,7 +31,7 @@
|
|||||||
border: none;
|
border: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
>div {
|
> div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ import { IOption } from "../Select";
|
|||||||
import Typography, { ITypo } from "../Typography";
|
import Typography, { ITypo } from "../Typography";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
options: IOption[];
|
options: IOption[];
|
||||||
label?: string | JSX.Element;
|
label?: string | JSX.Element;
|
||||||
@ -26,13 +25,13 @@ type IState = {
|
|||||||
export default class MultiSelect extends React.Component<IProps, IState> {
|
export default class MultiSelect extends React.Component<IProps, IState> {
|
||||||
public static defaultProps: Partial<IProps> = {
|
public static defaultProps: Partial<IProps> = {
|
||||||
placeholder: "Sélectionner une option...",
|
placeholder: "Sélectionner une option...",
|
||||||
}
|
};
|
||||||
|
|
||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
isSelectedOption: this.props.defaultValue ? true : false
|
isSelectedOption: this.props.defaultValue ? true : false,
|
||||||
}
|
};
|
||||||
this.onChange = this.onChange.bind(this);
|
this.onChange = this.onChange.bind(this);
|
||||||
this.onEmptyResearch = this.onEmptyResearch.bind(this);
|
this.onEmptyResearch = this.onEmptyResearch.bind(this);
|
||||||
}
|
}
|
||||||
@ -41,13 +40,13 @@ export default class MultiSelect extends React.Component<IProps, IState> {
|
|||||||
<div className={classes["root"]}>
|
<div className={classes["root"]}>
|
||||||
<div className={classNames(classes["label-container"], this.state.isSelectedOption && classes["active"])}>
|
<div className={classNames(classes["label-container"], this.state.isSelectedOption && classes["active"])}>
|
||||||
{this.props.label && <div className={classes["label"]}>{this.props.label}</div>}
|
{this.props.label && <div className={classes["label"]}>{this.props.label}</div>}
|
||||||
{this.state.isSelectedOption &&
|
{this.state.isSelectedOption && (
|
||||||
<>
|
<>
|
||||||
< Typography typo={ITypo.NAV_INPUT_16}>
|
<Typography typo={ITypo.NAV_INPUT_16}>
|
||||||
<div className={classes["is-active-placeholder"]}>{this.props.placeholder}</div>
|
<div className={classes["is-active-placeholder"]}>{this.props.placeholder}</div>
|
||||||
</Typography>
|
</Typography>
|
||||||
</>
|
</>
|
||||||
}
|
)}
|
||||||
<div className={classes["input-container"]}>
|
<div className={classes["input-container"]}>
|
||||||
<ReactSelect
|
<ReactSelect
|
||||||
placeholder={this.props.placeholder}
|
placeholder={this.props.placeholder}
|
||||||
@ -63,17 +62,16 @@ export default class MultiSelect extends React.Component<IProps, IState> {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div >
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private onChange(newValue: MultiValue<IOption>, actionMeta: ActionMeta<IOption>) {
|
private onChange(newValue: MultiValue<IOption>, actionMeta: ActionMeta<IOption>) {
|
||||||
this.props.onChange && this.props.onChange(newValue, actionMeta);
|
this.props.onChange && this.props.onChange(newValue, actionMeta);
|
||||||
this.setState({ isSelectedOption: newValue.length > 0 });
|
this.setState({ isSelectedOption: newValue.length > 0 });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private onEmptyResearch(){
|
private onEmptyResearch() {
|
||||||
return "Aucune option correspondante"
|
return "Aucune option correspondante";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ export const styles = {
|
|||||||
fontSize: "16px",
|
fontSize: "16px",
|
||||||
lineHeight: "22px",
|
lineHeight: "22px",
|
||||||
color: "#939393",
|
color: "#939393",
|
||||||
letter: "0.5 px"
|
letter: "0.5 px",
|
||||||
}),
|
}),
|
||||||
multiValue: (provided: any) => ({
|
multiValue: (provided: any) => ({
|
||||||
...provided,
|
...provided,
|
||||||
@ -65,13 +65,12 @@ export const styles = {
|
|||||||
}),
|
}),
|
||||||
indicatorSeparator: () => ({
|
indicatorSeparator: () => ({
|
||||||
display: "none",
|
display: "none",
|
||||||
|
|
||||||
}),
|
}),
|
||||||
menu: (provided: any) => ({
|
menu: (provided: any) => ({
|
||||||
...provided,
|
...provided,
|
||||||
position: "static",
|
position: "static",
|
||||||
border: "0",
|
border: "0",
|
||||||
boxShadow: "none"
|
boxShadow: "none",
|
||||||
}),
|
}),
|
||||||
menuList: (provided: any) => ({
|
menuList: (provided: any) => ({
|
||||||
...provided,
|
...provided,
|
||||||
@ -87,7 +86,7 @@ export const styles = {
|
|||||||
">svg": {
|
">svg": {
|
||||||
width: "16px",
|
width: "16px",
|
||||||
height: "16px",
|
height: "16px",
|
||||||
}
|
},
|
||||||
}),
|
}),
|
||||||
indicatorsContainer: (provided: any) => ({
|
indicatorsContainer: (provided: any) => ({
|
||||||
...provided,
|
...provided,
|
||||||
@ -99,4 +98,3 @@ export const styles = {
|
|||||||
fontSize: "16px",
|
fontSize: "16px",
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,12 +6,11 @@ type IProps = {
|
|||||||
percentage: number;
|
percentage: number;
|
||||||
};
|
};
|
||||||
export default class ProgressBar extends React.Component<IProps> {
|
export default class ProgressBar extends React.Component<IProps> {
|
||||||
|
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
const quantity = (this.props.percentage.toFixed(2)).toString().concat("%")
|
const quantity = this.props.percentage.toFixed(2).toString().concat("%");
|
||||||
return (
|
return (
|
||||||
<div className={classes["root"]}>
|
<div className={classes["root"]}>
|
||||||
<div className={classes["progress"]} style={{ width: quantity }} >
|
<div className={classes["progress"]} style={{ width: quantity }}>
|
||||||
<Typography typo={ITypo.P_16}>
|
<Typography typo={ITypo.P_16}>
|
||||||
<div className={classes["percentage"]}>{quantity}</div>
|
<div className={classes["percentage"]}>{quantity}</div>
|
||||||
</Typography>
|
</Typography>
|
||||||
|
@ -11,7 +11,9 @@ type IProps = {
|
|||||||
export default class QuantityProgressBar extends React.Component<IProps> {
|
export default class QuantityProgressBar extends React.Component<IProps> {
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
let numerator: number = this.props.currentNumber;
|
let numerator: number = this.props.currentNumber;
|
||||||
if (this.props.currentNumber > this.props.total) { numerator = this.props.total }
|
if (this.props.currentNumber > this.props.total) {
|
||||||
|
numerator = this.props.total;
|
||||||
|
}
|
||||||
|
|
||||||
const percentage = (numerator / this.props.total) * 100;
|
const percentage = (numerator / this.props.total) * 100;
|
||||||
return (
|
return (
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
padding: 24px 0;
|
padding: 24px 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-family: 'Inter';
|
font-family: "Inter";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
@ -13,7 +13,6 @@ type IState = {
|
|||||||
hasValue: boolean;
|
hasValue: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export default class SearchBar extends React.Component<IProps, IState> {
|
export default class SearchBar extends React.Component<IProps, IState> {
|
||||||
public constructor(props: IProps) {
|
public constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -24,15 +23,21 @@ export default class SearchBar extends React.Component<IProps, IState> {
|
|||||||
this.onChange = this.onChange.bind(this);
|
this.onChange = this.onChange.bind(this);
|
||||||
}
|
}
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return <div className={classes["root"]}>
|
return (
|
||||||
|
<div className={classes["root"]}>
|
||||||
<Image src={LoopIcon} alt="Loop icon" />
|
<Image src={LoopIcon} alt="Loop icon" />
|
||||||
{!this.state.hasValue && <Typography typo={ITypo.P_ERR_18}><div className={classes["fake-placeholder"]}>Select</div></Typography>}
|
{!this.state.hasValue && (
|
||||||
|
<Typography typo={ITypo.P_ERR_18}>
|
||||||
|
<div className={classes["fake-placeholder"]}>Select</div>
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
<input type="text" placeholder="" className={classes["input"]} onChange={this.onChange} />
|
<input type="text" placeholder="" className={classes["input"]} onChange={this.onChange} />
|
||||||
</div>;
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private onChange(event: React.ChangeEvent<HTMLInputElement>) {
|
private onChange(event: React.ChangeEvent<HTMLInputElement>) {
|
||||||
const hasValue = event.target.value.length > 0
|
const hasValue = event.target.value.length > 0;
|
||||||
this.doesInputHaveValue(hasValue);
|
this.doesInputHaveValue(hasValue);
|
||||||
if (!this.props.onChange) return;
|
if (!this.props.onChange) return;
|
||||||
this.props.onChange(this.filterFolders(event));
|
this.props.onChange(this.filterFolders(event));
|
||||||
@ -43,7 +48,9 @@ export default class SearchBar extends React.Component<IProps, IState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private filterFolders(event: React.ChangeEvent<HTMLInputElement>) {
|
private filterFolders(event: React.ChangeEvent<HTMLInputElement>) {
|
||||||
const filteredFolders: IDashBoardFolder[] = this.props.folders.filter((folder) => folder.folder_number.includes(event.target.value));
|
const filteredFolders: IDashBoardFolder[] = this.props.folders.filter((folder) =>
|
||||||
|
folder.folder_number.includes(event.target.value),
|
||||||
|
);
|
||||||
return filteredFolders;
|
return filteredFolders;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
border-radius: 8px 0 0 8px;
|
border-radius: 8px 0 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container-input chevron-icon{
|
.container-input chevron-icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
@ -113,12 +113,12 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: 11px;
|
margin-right: 11px;
|
||||||
|
|
||||||
>svg {
|
> svg {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
margin-right: 11px;
|
margin-right: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
>img {
|
> img {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ type IState = {
|
|||||||
export default class Select extends React.Component<IProps, IState> {
|
export default class Select extends React.Component<IProps, IState> {
|
||||||
private contentRef = React.createRef<HTMLUListElement>();
|
private contentRef = React.createRef<HTMLUListElement>();
|
||||||
private rootRef = React.createRef<HTMLDivElement>();
|
private rootRef = React.createRef<HTMLDivElement>();
|
||||||
private removeOnresize = () => { };
|
private removeOnresize = () => {};
|
||||||
|
|
||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -67,7 +67,6 @@ export default class Select extends React.Component<IProps, IState> {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<Image className={classes["chevron-icon"]} data-open={this.state.isOpen} src={ChevronIcon} alt="chevron icon" />
|
<Image className={classes["chevron-icon"]} data-open={this.state.isOpen} src={ChevronIcon} alt="chevron icon" />
|
||||||
</label>
|
</label>
|
||||||
@ -82,14 +81,11 @@ export default class Select extends React.Component<IProps, IState> {
|
|||||||
{this.props.options.map((option, index) => (
|
{this.props.options.map((option, index) => (
|
||||||
<li key={`${index}-${option.value}`} className={classes["container-li"]} onClick={(e) => this.onSelect(option, e)}>
|
<li key={`${index}-${option.value}`} className={classes["container-li"]} onClick={(e) => this.onSelect(option, e)}>
|
||||||
<div className={classes["token-icon"]}>{option.icon}</div>
|
<div className={classes["token-icon"]}>{option.icon}</div>
|
||||||
<Typography typo={ITypo.P_18}>
|
<Typography typo={ITypo.P_18}>{option.label}</Typography>
|
||||||
{option.label}
|
|
||||||
</Typography>
|
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
{this.state.isOpen && <div className={classes["backdrop"]} onClick={this.toggle} />}
|
{this.state.isOpen && <div className={classes["backdrop"]} onClick={this.toggle} />}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -16,18 +16,19 @@ type IState = {
|
|||||||
event: React.MouseEvent<HTMLElement> | null;
|
event: React.MouseEvent<HTMLElement> | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
const LightTooltip = styled(({ className, ...props }: TooltipProps) => (
|
const LightTooltip = styled(({ className, ...props }: TooltipProps) => <TooltipMUI {...props} classes={{ popper: className }} />)(
|
||||||
<TooltipMUI {...props} classes={{ popper: className }} />
|
({ theme }) => ({
|
||||||
))(({ theme }) => ({
|
|
||||||
[`& .${tooltipClasses.tooltip}`]: {
|
[`& .${tooltipClasses.tooltip}`]: {
|
||||||
backgroundColor: "var(--colormerdum)",
|
backgroundColor: "var(--colormerdum)",
|
||||||
color: "var(--colormerdum)",
|
color: "var(--colormerdum)",
|
||||||
//boxShadow: theme.shadows[1],
|
//boxShadow: theme.shadows[1],
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
},[`& .${tooltipClasses.arrow}`]: {
|
},
|
||||||
|
[`& .${tooltipClasses.arrow}`]: {
|
||||||
// color: theme.palette.common.black,
|
// color: theme.palette.common.black,
|
||||||
},
|
},
|
||||||
}));
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
export default class Tooltip extends React.Component<IProps, IState> {
|
export default class Tooltip extends React.Component<IProps, IState> {
|
||||||
static defaultProps: Partial<IProps> = {
|
static defaultProps: Partial<IProps> = {
|
||||||
@ -41,9 +42,7 @@ export default class Tooltip extends React.Component<IProps, IState> {
|
|||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<LightTooltip title={this.props.text} placement="top" arrow>
|
<LightTooltip title={this.props.text} placement="top" arrow>
|
||||||
<span
|
<span className={this.props.className} style={!this.props.isNotFlex ? { display: "flex" } : {}}>
|
||||||
className={this.props.className}
|
|
||||||
style={!this.props.isNotFlex ? { display: "flex" } : {}}>
|
|
||||||
<Image src={ToolTipIcon} alt="toolTip icon" />
|
<Image src={ToolTipIcon} alt="toolTip icon" />
|
||||||
</span>
|
</span>
|
||||||
</LightTooltip>
|
</LightTooltip>
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
.root {
|
.root {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.title{
|
.title {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.content{
|
.content {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
|
@ -7,28 +7,34 @@ import DocumentNotary from "../../Document/DocumentNotary";
|
|||||||
type IProps = {
|
type IProps = {
|
||||||
title: string;
|
title: string;
|
||||||
subtitle?: string;
|
subtitle?: string;
|
||||||
documents: {
|
documents:
|
||||||
|
| {
|
||||||
uid: Document["uid"];
|
uid: Document["uid"];
|
||||||
document_type: Document["document_type"];
|
document_type: Document["document_type"];
|
||||||
document_status: Document["document_status"];
|
document_status: Document["document_status"];
|
||||||
|
}[]
|
||||||
}[] | null;
|
| null;
|
||||||
openDeletionModal: (uid: Document["uid"]) => void;
|
openDeletionModal: (uid: Document["uid"]) => void;
|
||||||
};
|
};
|
||||||
type IState = {};
|
type IState = {};
|
||||||
|
|
||||||
export default class DocumentList extends React.Component<IProps, IState> {
|
export default class DocumentList extends React.Component<IProps, IState> {
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return <div className={classes["root"]}>
|
return (
|
||||||
|
<div className={classes["root"]}>
|
||||||
<div className={classes["title"]}>
|
<div className={classes["title"]}>
|
||||||
<Typography typo={ITypo.P_SB_18}>{this.props.title}</Typography>
|
<Typography typo={ITypo.P_SB_18}>{this.props.title}</Typography>
|
||||||
</div>
|
</div>
|
||||||
<Typography typo={ITypo.P_16}>{this.props.subtitle}</Typography>
|
<Typography typo={ITypo.P_16}>{this.props.subtitle}</Typography>
|
||||||
<div className={classes["content"]}>
|
<div className={classes["content"]}>
|
||||||
{this.props.documents && this.props.documents.map((document) => {
|
{this.props.documents &&
|
||||||
return <DocumentNotary document={document} key={document.uid} openDeletionModal={this.props.openDeletionModal}/>
|
this.props.documents.map((document) => {
|
||||||
|
return (
|
||||||
|
<DocumentNotary document={document} key={document.uid} openDeletionModal={this.props.openDeletionModal} />
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
gap: 32px;
|
gap: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.icons {
|
.icons {
|
||||||
|
@ -8,18 +8,19 @@ import WarningBadge from "../../WarningBadge";
|
|||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
contact: {
|
contact: {
|
||||||
first_name: Contact["first_name"],
|
first_name: Contact["first_name"];
|
||||||
last_name: Contact["last_name"],
|
last_name: Contact["last_name"];
|
||||||
phone_number: Contact["phone_number"],
|
phone_number: Contact["phone_number"];
|
||||||
cell_phone_number: Contact["cell_phone_number"],
|
cell_phone_number: Contact["cell_phone_number"];
|
||||||
email: Contact["email"],
|
email: Contact["email"];
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
type IState = {};
|
type IState = {};
|
||||||
|
|
||||||
export default class UserFolderHeader extends React.Component<IProps, IState> {
|
export default class UserFolderHeader extends React.Component<IProps, IState> {
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return <div className={classes["root"]}>
|
return (
|
||||||
|
<div className={classes["root"]}>
|
||||||
<div className={classes["content"]}>
|
<div className={classes["content"]}>
|
||||||
<div className={classes["container"]}>
|
<div className={classes["container"]}>
|
||||||
<Typography typo={ITypo.NAV_INPUT_16}>Nom</Typography>
|
<Typography typo={ITypo.NAV_INPUT_16}>Nom</Typography>
|
||||||
@ -33,7 +34,10 @@ export default class UserFolderHeader extends React.Component<IProps, IState> {
|
|||||||
|
|
||||||
<div className={classes["container"]}>
|
<div className={classes["container"]}>
|
||||||
<Typography typo={ITypo.NAV_INPUT_16}>Numéro de téléphone</Typography>
|
<Typography typo={ITypo.NAV_INPUT_16}>Numéro de téléphone</Typography>
|
||||||
<Typography typo={ITypo.P_18}>{this.formatPhoneNumber(this.props.contact.phone_number) ?? this.formatPhoneNumber(this.props.contact.cell_phone_number)}</Typography>
|
<Typography typo={ITypo.P_18}>
|
||||||
|
{this.formatPhoneNumber(this.props.contact.phone_number) ??
|
||||||
|
this.formatPhoneNumber(this.props.contact.cell_phone_number)}
|
||||||
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={classes["container"]}>
|
<div className={classes["container"]}>
|
||||||
@ -43,15 +47,16 @@ export default class UserFolderHeader extends React.Component<IProps, IState> {
|
|||||||
</div>
|
</div>
|
||||||
<div className={classes["icons"]}>
|
<div className={classes["icons"]}>
|
||||||
<WarningBadge />
|
<WarningBadge />
|
||||||
<Image src={PenIcon} alt="edit" className={classes["edit-icon"]} onClick={this.onEditClick}/>
|
<Image src={PenIcon} alt="edit" className={classes["edit-icon"]} onClick={this.onEditClick} />
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private formatPhoneNumber(phoneNumber: string): string {
|
private formatPhoneNumber(phoneNumber: string): string {
|
||||||
if (!phoneNumber) return "";
|
if (!phoneNumber) return "";
|
||||||
const output = phoneNumber.split('').map((char, index) => {
|
const output = phoneNumber.split("").map((char, index) => {
|
||||||
if(index%2) return char + " ";
|
if (index % 2) return char + " ";
|
||||||
return char;
|
return char;
|
||||||
});
|
});
|
||||||
return output.join("");
|
return output.join("");
|
||||||
|
@ -8,12 +8,12 @@ import QuantityProgressBar from "../QuantityProgressBar";
|
|||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import DocumentList from "./DocumentList";
|
import DocumentList from "./DocumentList";
|
||||||
import Button, { EButtonVariant } from "../Button";
|
import Button, { EButtonVariant } from "../Button";
|
||||||
import PlusIcon from "@Assets/Icons/plus.svg"
|
import PlusIcon from "@Assets/Icons/plus.svg";
|
||||||
import Confirm from "../Modal/Confirm";
|
import Confirm from "../Modal/Confirm";
|
||||||
import { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";
|
import { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
customer: Customer
|
customer: Customer;
|
||||||
animationDelay?: number;
|
animationDelay?: number;
|
||||||
folder: IDashBoardFolder;
|
folder: IDashBoardFolder;
|
||||||
};
|
};
|
||||||
@ -25,7 +25,7 @@ type IState = {
|
|||||||
|
|
||||||
export default class UserFolder extends React.Component<IProps, IState> {
|
export default class UserFolder extends React.Component<IProps, IState> {
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
animationDelay: 300
|
animationDelay: 300,
|
||||||
};
|
};
|
||||||
public rootRefElement = React.createRef<HTMLDivElement>();
|
public rootRefElement = React.createRef<HTMLDivElement>();
|
||||||
|
|
||||||
@ -34,21 +34,20 @@ export default class UserFolder extends React.Component<IProps, IState> {
|
|||||||
this.state = {
|
this.state = {
|
||||||
isOpen: false,
|
isOpen: false,
|
||||||
isOpenDeletionModal: false,
|
isOpenDeletionModal: false,
|
||||||
willClose: false
|
willClose: false,
|
||||||
};
|
};
|
||||||
this.toggleOpen = this.toggleOpen.bind(this);
|
this.toggleOpen = this.toggleOpen.bind(this);
|
||||||
this.closeDeletionModal = this.closeDeletionModal.bind(this);
|
this.closeDeletionModal = this.closeDeletionModal.bind(this);
|
||||||
this.openDeletionModal = this.openDeletionModal.bind(this);
|
this.openDeletionModal = this.openDeletionModal.bind(this);
|
||||||
this.openComponent = this.openComponent.bind(this);
|
this.openComponent = this.openComponent.bind(this);
|
||||||
this.closeComponent = this.closeComponent.bind(this);
|
this.closeComponent = this.closeComponent.bind(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
|
|
||||||
const documentsAsked: Document[] | null = this.getDocumentsByStatus("ASKED");
|
const documentsAsked: Document[] | null = this.getDocumentsByStatus("ASKED");
|
||||||
const otherDocuments: Document[] | null = this.getValidatedAndPendindDocuments();
|
const otherDocuments: Document[] | null = this.getValidatedAndPendindDocuments();
|
||||||
|
|
||||||
return <div className={classes["root"]}>
|
return (
|
||||||
|
<div className={classes["root"]}>
|
||||||
<Confirm
|
<Confirm
|
||||||
isOpen={this.state.isOpenDeletionModal}
|
isOpen={this.state.isOpenDeletionModal}
|
||||||
onClose={this.closeDeletionModal}
|
onClose={this.closeDeletionModal}
|
||||||
@ -60,25 +59,45 @@ export default class UserFolder extends React.Component<IProps, IState> {
|
|||||||
</Confirm>
|
</Confirm>
|
||||||
|
|
||||||
<div className={classes["header"]} onClick={this.toggleOpen}>
|
<div className={classes["header"]} onClick={this.toggleOpen}>
|
||||||
<UserFolderHeader contact={this.props.
|
<UserFolderHeader contact={this.props.customer.contact} />
|
||||||
customer.contact} />
|
<Image
|
||||||
<Image src={ChevronIcon} alt="chevron open close" className={classNames(classes["chevron-icon"], this.state.isOpen && classes["open"])} onClick={this.toggleOpen} />
|
src={ChevronIcon}
|
||||||
|
alt="chevron open close"
|
||||||
|
className={classNames(classes["chevron-icon"], this.state.isOpen && classes["open"])}
|
||||||
|
onClick={this.toggleOpen}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{this.state.isOpen &&
|
{this.state.isOpen && (
|
||||||
<div className={classes["container"]} data-will-close={this.state.willClose.toString()} ref={this.rootRefElement}>
|
<div className={classes["container"]} data-will-close={this.state.willClose.toString()} ref={this.rootRefElement}>
|
||||||
<QuantityProgressBar title="Complétion du dossier" total={100} currentNumber={this.calculateDocumentsPercentageProgress()} />
|
<QuantityProgressBar
|
||||||
|
title="Complétion du dossier"
|
||||||
|
total={100}
|
||||||
|
currentNumber={this.calculateDocumentsPercentageProgress()}
|
||||||
|
/>
|
||||||
<div className={classes["content"]}>
|
<div className={classes["content"]}>
|
||||||
<DocumentList documents={documentsAsked} title="Documents demandés" openDeletionModal={this.openDeletionModal} />
|
<DocumentList
|
||||||
<DocumentList documents={otherDocuments} title="Documents à valider / validés" subtitle="Vous avez des documents à valider." openDeletionModal={this.openDeletionModal} />
|
documents={documentsAsked}
|
||||||
|
title="Documents demandés"
|
||||||
|
openDeletionModal={this.openDeletionModal}
|
||||||
|
/>
|
||||||
|
<DocumentList
|
||||||
|
documents={otherDocuments}
|
||||||
|
title="Documents à valider / validés"
|
||||||
|
subtitle="Vous avez des documents à valider."
|
||||||
|
openDeletionModal={this.openDeletionModal}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes["button-container"]}>
|
<div className={classes["button-container"]}>
|
||||||
<Button variant={EButtonVariant.LINE} icon={PlusIcon}>Demander un autre document </Button>
|
<Button variant={EButtonVariant.LINE} icon={PlusIcon}>
|
||||||
|
Demander un autre document{" "}
|
||||||
|
</Button>
|
||||||
<Button>Envoyer un mail de demande de documents</Button>
|
<Button>Envoyer un mail de demande de documents</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
)}
|
||||||
</div>;
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override componentDidUpdate(): void {
|
public override componentDidUpdate(): void {
|
||||||
@ -94,10 +113,11 @@ export default class UserFolder extends React.Component<IProps, IState> {
|
|||||||
|
|
||||||
private getDocumentsByStatus(status: string): Document[] | null {
|
private getDocumentsByStatus(status: string): Document[] | null {
|
||||||
if (!this.props.customer.documents) return null;
|
if (!this.props.customer.documents) return null;
|
||||||
return this.props.customer.documents.filter((document) => document.document_status === status && document.folder.uid === this.props.folder.uid);
|
return this.props.customer.documents.filter(
|
||||||
|
(document) => document.document_status === status && document.folder.uid === this.props.folder.uid,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Get all documents Validated, pending
|
// Get all documents Validated, pending
|
||||||
private getValidatedAndPendindDocuments(): Document[] | null {
|
private getValidatedAndPendindDocuments(): Document[] | null {
|
||||||
const pendingDocuments = this.getDocumentsByStatus("PENDING");
|
const pendingDocuments = this.getDocumentsByStatus("PENDING");
|
||||||
@ -117,40 +137,37 @@ export default class UserFolder extends React.Component<IProps, IState> {
|
|||||||
private toggleOpen(): void {
|
private toggleOpen(): void {
|
||||||
if (this.state.isOpen) {
|
if (this.state.isOpen) {
|
||||||
this.closeComponent();
|
this.closeComponent();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.openComponent();
|
this.openComponent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private openComponent(): void {
|
private openComponent(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
isOpen: true
|
isOpen: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private closeComponent(): void {
|
private closeComponent(): void {
|
||||||
if (this.state.willClose) return;
|
if (this.state.willClose) return;
|
||||||
this.setState({ willClose: true })
|
this.setState({ willClose: true });
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
isOpen: false,
|
isOpen: false,
|
||||||
willClose: false
|
willClose: false,
|
||||||
});
|
});
|
||||||
}, this.props.animationDelay)
|
}, this.props.animationDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
private openDeletionModal(uid: string): void {
|
private openDeletionModal(uid: string): void {
|
||||||
// TODO: call API to delete document
|
// TODO: call API to delete document
|
||||||
this.setState({
|
this.setState({
|
||||||
isOpenDeletionModal: true
|
isOpenDeletionModal: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
private closeDeletionModal(): void {
|
private closeDeletionModal(): void {
|
||||||
this.setState({
|
this.setState({
|
||||||
isOpenDeletionModal: false
|
isOpenDeletionModal: false,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,10 @@ type IState = {};
|
|||||||
|
|
||||||
export default class WarningBadge extends React.Component<IProps, IState> {
|
export default class WarningBadge extends React.Component<IProps, IState> {
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return <div className={classes["root"]}>
|
return (
|
||||||
|
<div className={classes["root"]}>
|
||||||
<Image src={WarningIcon} alt="warning icon" />
|
<Image src={WarningIcon} alt="warning icon" />
|
||||||
</div>;
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,6 @@ export default class InputField extends React.Component<IProps> {
|
|||||||
{this.props.inputStatus === "success" && <Image alt="success icon" src={SuccessIcon} />}
|
{this.props.inputStatus === "success" && <Image alt="success icon" src={SuccessIcon} />}
|
||||||
{this.props.inputStatus === "error" && <Image alt="error icon" src={ErrorIcon} />}
|
{this.props.inputStatus === "error" && <Image alt="error icon" src={ErrorIcon} />}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{this.props.errorMsg && <div className={classes["errorMsg"]}>{this.props.errorMsg}</div>}
|
{this.props.errorMsg && <div className={classes["errorMsg"]}>{this.props.errorMsg}</div>}
|
||||||
</>
|
</>
|
||||||
|
@ -27,9 +27,7 @@ export default class DefaultDoubleSidePage extends React.Component<IProps, IStat
|
|||||||
<Header isUserConnected={false} />
|
<Header isUserConnected={false} />
|
||||||
<div className={classes["content"]}>
|
<div className={classes["content"]}>
|
||||||
<div className={classes["sides"]}>
|
<div className={classes["sides"]}>
|
||||||
<div className={classes["side-content"]}>
|
<div className={classes["side-content"]}>{this.props.children}</div>
|
||||||
{this.props.children}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className={classNames(classes["sides"], classes["image-container"])}>
|
<div className={classNames(classes["sides"], classes["image-container"])}>
|
||||||
<Image alt={"right side image"} src={this.props.image} className={classes["image"]} />
|
<Image alt={"right side image"} src={this.props.image} className={classes["image"]} />
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
min-width: 389px;
|
min-width: 389px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.closable-left-side {
|
.closable-left-side {
|
||||||
@ -44,7 +43,6 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.chevron-icon {
|
.chevron-icon {
|
||||||
margin-top: 21px;
|
margin-top: 21px;
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import 'reflect-metadata';
|
import "reflect-metadata";
|
||||||
import React, { ReactNode } from "react";
|
import React, { ReactNode } from "react";
|
||||||
import classes from "./classes.module.scss";
|
import classes from "./classes.module.scss";
|
||||||
import FolderListContainer from "@Front/Components/DesignSystem/FolderListContainer";
|
import FolderListContainer from "@Front/Components/DesignSystem/FolderListContainer";
|
||||||
import Header from "@Front/Components/DesignSystem/Header";
|
import Header from "@Front/Components/DesignSystem/Header";
|
||||||
import Version from "@Front/Components/DesignSystem/Version";
|
import Version from "@Front/Components/DesignSystem/Version";
|
||||||
import { folders } from "@Front/Components/Layouts/DesignSystem/dummyData"
|
import { folders } from "@Front/Components/Layouts/DesignSystem/dummyData";
|
||||||
import { OfficeFolder } from 'le-coffre-resources/dist/Customer';
|
import { OfficeFolder } from "le-coffre-resources/dist/Customer";
|
||||||
import chevronIcon from "@Assets/Icons/chevron.svg";
|
import chevronIcon from "@Assets/Icons/chevron.svg";
|
||||||
import Image from 'next/image';
|
import Image from "next/image";
|
||||||
import classNames from 'classnames';
|
import classNames from "classnames";
|
||||||
import WindowStore from '@Front/Stores/WindowStore';
|
import WindowStore from "@Front/Stores/WindowStore";
|
||||||
type IProps = {
|
type IProps = {
|
||||||
title: string;
|
title: string;
|
||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
@ -25,14 +25,14 @@ export type IDashBoardFolder = {
|
|||||||
uid: OfficeFolder["uid"];
|
uid: OfficeFolder["uid"];
|
||||||
name: OfficeFolder["name"];
|
name: OfficeFolder["name"];
|
||||||
folder_number: OfficeFolder["folder_number"];
|
folder_number: OfficeFolder["folder_number"];
|
||||||
documents?: OfficeFolder["documents"]
|
documents?: OfficeFolder["documents"];
|
||||||
description: OfficeFolder["description"];
|
description: OfficeFolder["description"];
|
||||||
deed: OfficeFolder["deed"];
|
deed: OfficeFolder["deed"];
|
||||||
created_at: OfficeFolder["created_at"];
|
created_at: OfficeFolder["created_at"];
|
||||||
office_folder_has_customers?: OfficeFolder["office_folder_has_customers"];
|
office_folder_has_customers?: OfficeFolder["office_folder_has_customers"];
|
||||||
};
|
};
|
||||||
export default class DefaultNotaryDashboard extends React.Component<IProps, IState> {
|
export default class DefaultNotaryDashboard extends React.Component<IProps, IState> {
|
||||||
private onWindowResize = () => { };
|
private onWindowResize = () => {};
|
||||||
public static defaultProps = {
|
public static defaultProps = {
|
||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
};
|
};
|
||||||
@ -49,16 +49,19 @@ export default class DefaultNotaryDashboard extends React.Component<IProps, ISta
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes["root"]}>
|
<div className={classes["root"]}>
|
||||||
<Header isUserConnected={true} />
|
<Header isUserConnected={true} />
|
||||||
<div className={classes["content"]}>
|
<div className={classes["content"]}>
|
||||||
<div className={classNames(classes["left-side"], this.state.isLeftSideOpen && classes["opened"])}>
|
<div className={classNames(classes["left-side"], this.state.isLeftSideOpen && classes["opened"])}>
|
||||||
<FolderListContainer folders={this.state.folders} onSelectedFolder={this.props.onSelectedFolder} onCloseLeftSide={this.onCloseLeftSide} />
|
<FolderListContainer
|
||||||
|
folders={this.state.folders}
|
||||||
|
onSelectedFolder={this.props.onSelectedFolder}
|
||||||
|
onCloseLeftSide={this.onCloseLeftSide}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={classNames(classes["closable-left-side"])}>
|
<div className={classNames(classes["closable-left-side"])}>
|
||||||
<Image alt='open side menu' src={chevronIcon} className={classes["chevron-icon"]} onClick={this.onOpenLeftSide} />
|
<Image alt="open side menu" src={chevronIcon} className={classes["chevron-icon"]} onClick={this.onOpenLeftSide} />
|
||||||
</div>
|
</div>
|
||||||
<div className={classes["right-side"]}>{this.props.children}</div>
|
<div className={classes["right-side"]}>{this.props.children}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -68,9 +71,7 @@ export default class DefaultNotaryDashboard extends React.Component<IProps, ISta
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override componentDidMount(): void {
|
public override componentDidMount(): void {
|
||||||
this.onWindowResize = WindowStore.getInstance().onResize((window) =>
|
this.onWindowResize = WindowStore.getInstance().onResize((window) => this.onResize(window));
|
||||||
this.onResize(window)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
public override componentWillUnmount() {
|
public override componentWillUnmount() {
|
||||||
this.onWindowResize();
|
this.onWindowResize();
|
||||||
|
@ -2,7 +2,7 @@ import React, { ReactNode } from "react";
|
|||||||
import classes from "./classes.module.scss";
|
import classes from "./classes.module.scss";
|
||||||
import Header from "@Front/Components/DesignSystem/Header";
|
import Header from "@Front/Components/DesignSystem/Header";
|
||||||
import Version from "@Front/Components/DesignSystem/Version";
|
import Version from "@Front/Components/DesignSystem/Version";
|
||||||
import 'reflect-metadata';
|
import "reflect-metadata";
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -4,18 +4,22 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
align-items: flex-start;
|
||||||
|
|
||||||
.radiobox-container{
|
.radiobox-container {
|
||||||
margin: 32px 0;
|
margin: 32px 0;
|
||||||
}
|
}
|
||||||
.button-container{
|
|
||||||
|
.button-container {
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
:first-child{
|
|
||||||
|
:first-child {
|
||||||
margin-right: 32px;
|
margin-right: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.new-client{
|
|
||||||
>:not(:last-child){
|
.new-client {
|
||||||
|
> :not(:last-child) {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import { ActionMeta, MultiValue } from "react-select";
|
|||||||
import { IOption } from "@Front/Components/DesignSystem/Select";
|
import { IOption } from "@Front/Components/DesignSystem/Select";
|
||||||
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
||||||
import Form from "@Front/Components/DesignSystem/Form";
|
import Form from "@Front/Components/DesignSystem/Form";
|
||||||
|
import ChevonIcon from "@Assets/icons/chevron.svg";
|
||||||
|
|
||||||
type IProps = {};
|
type IProps = {};
|
||||||
type IState = {
|
type IState = {
|
||||||
@ -17,7 +18,7 @@ type IState = {
|
|||||||
isNewClientSelected: boolean;
|
isNewClientSelected: boolean;
|
||||||
hasNewClientSelected: boolean;
|
hasNewClientSelected: boolean;
|
||||||
};
|
};
|
||||||
export default class AddClientToFolder extends BasePage<IProps, IState>{
|
export default class AddClientToFolder extends BasePage<IProps, IState> {
|
||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -41,10 +42,16 @@ export default class AddClientToFolder extends BasePage<IProps, IState>{
|
|||||||
return (
|
return (
|
||||||
<DefaultNotaryDashboard title={"Ajouter client(s)"} onSelectedFolder={this.onSelectedFolder}>
|
<DefaultNotaryDashboard title={"Ajouter client(s)"} onSelectedFolder={this.onSelectedFolder}>
|
||||||
<div className={classes["root"]}>
|
<div className={classes["root"]}>
|
||||||
|
<Button icon={ChevonIcon} variant={EButtonVariant.LINE}>
|
||||||
|
Retour
|
||||||
|
</Button>
|
||||||
<Typography typo={ITypo.H1Bis}>Associer un ou plusieurs client(s)</Typography>
|
<Typography typo={ITypo.H1Bis}>Associer un ou plusieurs client(s)</Typography>
|
||||||
<Form>
|
<Form>
|
||||||
<div className={classes["radiobox-container"]}>
|
<div className={classes["radiobox-container"]}>
|
||||||
<RadioBox name="client" onChange={this.onExistingClientSelected} defaultChecked={this.state.isExistingClientSelected}>
|
<RadioBox
|
||||||
|
name="client"
|
||||||
|
onChange={this.onExistingClientSelected}
|
||||||
|
defaultChecked={this.state.isExistingClientSelected}>
|
||||||
<Typography typo={ITypo.P_ERR_18}>Client existant</Typography>
|
<Typography typo={ITypo.P_ERR_18}>Client existant</Typography>
|
||||||
</RadioBox>
|
</RadioBox>
|
||||||
<RadioBox name="client" onChange={this.onNewClientSelected} defaultChecked={this.state.isNewClientSelected}>
|
<RadioBox name="client" onChange={this.onNewClientSelected} defaultChecked={this.state.isNewClientSelected}>
|
||||||
@ -52,17 +59,20 @@ export default class AddClientToFolder extends BasePage<IProps, IState>{
|
|||||||
</RadioBox>
|
</RadioBox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{this.state.isExistingClientSelected && (
|
||||||
{this.state.isExistingClientSelected && <div className={classes["existing-client"]}>
|
<div className={classes["existing-client"]}>
|
||||||
<MultiSelect options={selectOptions} placeholder="Client" onChange={this.onMutiSelectChange} />
|
<MultiSelect options={selectOptions} placeholder="Client" onChange={this.onMutiSelectChange} />
|
||||||
<div className={classes["button-container"]}>
|
<div className={classes["button-container"]}>
|
||||||
<Button variant={EButtonVariant.GHOST}>Annuler</Button>
|
<Button variant={EButtonVariant.GHOST}>Annuler</Button>
|
||||||
<Button disabled={!this.state.hasNewClientSelected ? true : false} type="submit">Associer au dossier</Button>
|
<Button disabled={!this.state.hasNewClientSelected ? true : false} type="submit">
|
||||||
|
Associer au dossier
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
)}
|
||||||
|
|
||||||
{this.state.isNewClientSelected && <div className={classes["new-client"]}>
|
{this.state.isNewClientSelected && (
|
||||||
|
<div className={classes["new-client"]}>
|
||||||
<InputField name="input field" fakeplaceholder="Nom" />
|
<InputField name="input field" fakeplaceholder="Nom" />
|
||||||
<InputField name="input field" fakeplaceholder="Prénom" />
|
<InputField name="input field" fakeplaceholder="Prénom" />
|
||||||
<InputField name="input field" fakeplaceholder="E-mail" isEmail />
|
<InputField name="input field" fakeplaceholder="E-mail" isEmail />
|
||||||
@ -71,7 +81,8 @@ export default class AddClientToFolder extends BasePage<IProps, IState>{
|
|||||||
<Button variant={EButtonVariant.GHOST}>Annuler</Button>
|
<Button variant={EButtonVariant.GHOST}>Annuler</Button>
|
||||||
<Button type="submit">Associer au dossier</Button>
|
<Button type="submit">Associer au dossier</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>}
|
</div>
|
||||||
|
)}
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
</DefaultNotaryDashboard>
|
</DefaultNotaryDashboard>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.folder-conatainer{
|
.folder-conatainer {
|
||||||
width: 389px ;
|
width: 389px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ export const customer2: Customer = {
|
|||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
updated_at: new Date(),
|
updated_at: new Date(),
|
||||||
status: ECustomerStatus.VALIDATED,
|
status: ECustomerStatus.VALIDATED,
|
||||||
documents: [document, documentPending, documentDeposited, ],
|
documents: [document, documentPending, documentDeposited],
|
||||||
};
|
};
|
||||||
|
|
||||||
export const folderWithPendingDocument: OfficeFolder = {
|
export const folderWithPendingDocument: OfficeFolder = {
|
||||||
@ -234,7 +234,6 @@ export const document2: Document = {
|
|||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export const folders: OfficeFolder[] = [
|
export const folders: OfficeFolder[] = [
|
||||||
folderWithPendingDocument,
|
folderWithPendingDocument,
|
||||||
folderWithPendingDocument1,
|
folderWithPendingDocument1,
|
||||||
|
@ -13,7 +13,7 @@ import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField"
|
|||||||
import QuantityProgressBar from "@Front/Components/DesignSystem/QuantityProgressBar";
|
import QuantityProgressBar from "@Front/Components/DesignSystem/QuantityProgressBar";
|
||||||
import "reflect-metadata";
|
import "reflect-metadata";
|
||||||
import FolderContainer from "@Front/Components/DesignSystem/FolderContainer";
|
import FolderContainer from "@Front/Components/DesignSystem/FolderContainer";
|
||||||
import { customer2, document, documentDeposited, documentPending, folder, folderWithPendingDocument, folders } from "./dummyData"
|
import { customer2, document, documentDeposited, documentPending, folder, folderWithPendingDocument, folders } from "./dummyData";
|
||||||
import DocumentNotary from "@Front/Components/DesignSystem/Document/DocumentNotary";
|
import DocumentNotary from "@Front/Components/DesignSystem/Document/DocumentNotary";
|
||||||
import Select, { IOption } from "@Front/Components/DesignSystem/Select";
|
import Select, { IOption } from "@Front/Components/DesignSystem/Select";
|
||||||
import UserFolder from "@Front/Components/DesignSystem/UserFolder";
|
import UserFolder from "@Front/Components/DesignSystem/UserFolder";
|
||||||
@ -28,7 +28,6 @@ type IState = {
|
|||||||
type IProps = {};
|
type IProps = {};
|
||||||
|
|
||||||
export default class DesignSystem extends BasePage<IProps, IState> {
|
export default class DesignSystem extends BasePage<IProps, IState> {
|
||||||
|
|
||||||
constructor(props: IProps) {
|
constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -39,18 +38,15 @@ export default class DesignSystem extends BasePage<IProps, IState> {
|
|||||||
this.onSelectedOption = this.onSelectedOption.bind(this);
|
this.onSelectedOption = this.onSelectedOption.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
|
|
||||||
const selectOptions: IOption[] = [
|
const selectOptions: IOption[] = [
|
||||||
{ value: "1", label: "Divorce" },
|
{ value: "1", label: "Divorce" },
|
||||||
{ value: "2", label: "Succession" },
|
{ value: "2", label: "Succession" },
|
||||||
{ value: "3", label: "Vente immobilière" },
|
{ value: "3", label: "Vente immobilière" },
|
||||||
]
|
];
|
||||||
return (
|
return (
|
||||||
<DefaultTemplate title={"HomePage"}>
|
<DefaultTemplate title={"HomePage"}>
|
||||||
<div className={classes["root"]}>
|
<div className={classes["root"]}>
|
||||||
|
|
||||||
<div className={classes["section"]}>
|
<div className={classes["section"]}>
|
||||||
<div className={classes["sub-section"]}>
|
<div className={classes["sub-section"]}>
|
||||||
<Typography typo={ITypo.H1}>Website design System</Typography>
|
<Typography typo={ITypo.H1}>Website design System</Typography>
|
||||||
@ -174,7 +170,6 @@ export default class DesignSystem extends BasePage<IProps, IState> {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes["sub-section"]}>
|
<div className={classes["sub-section"]}>
|
||||||
|
|
||||||
<Typography typo={ITypo.P_16}>Folder with document waiting for being validate</Typography>
|
<Typography typo={ITypo.P_16}>Folder with document waiting for being validate</Typography>
|
||||||
<div className={classes["folder-conatainer"]}>
|
<div className={classes["folder-conatainer"]}>
|
||||||
<FolderContainer folder={folderWithPendingDocument} />
|
<FolderContainer folder={folderWithPendingDocument} />
|
||||||
@ -188,7 +183,12 @@ export default class DesignSystem extends BasePage<IProps, IState> {
|
|||||||
</div>
|
</div>
|
||||||
<div className={classes["sub-section"]}>
|
<div className={classes["sub-section"]}>
|
||||||
<div className={classes["folder-conatainer"]}>
|
<div className={classes["folder-conatainer"]}>
|
||||||
<Select options={selectOptions} onChange={this.onSelectedOption} placeholder={"Type d’acte"} selectedOption={this.state.selectedOption} />
|
<Select
|
||||||
|
options={selectOptions}
|
||||||
|
onChange={this.onSelectedOption}
|
||||||
|
placeholder={"Type d’acte"}
|
||||||
|
selectedOption={this.state.selectedOption}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -236,7 +236,6 @@ export default class DesignSystem extends BasePage<IProps, IState> {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className={classes["section"]}>
|
<div className={classes["section"]}>
|
||||||
<div className={classes["sub-section"]}>
|
<div className={classes["sub-section"]}>
|
||||||
<Typography typo={ITypo.H3}>Document SearchBar</Typography>
|
<Typography typo={ITypo.H3}>Document SearchBar</Typography>
|
||||||
@ -254,8 +253,6 @@ export default class DesignSystem extends BasePage<IProps, IState> {
|
|||||||
<FolderList folders={folders} />
|
<FolderList folders={folders} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</DefaultTemplate>
|
</DefaultTemplate>
|
||||||
);
|
);
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.modal-title{
|
.modal-title {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ type IState = {
|
|||||||
selectedFolder: IDashBoardFolder | null;
|
selectedFolder: IDashBoardFolder | null;
|
||||||
isArchivedModalOpen: boolean;
|
isArchivedModalOpen: boolean;
|
||||||
};
|
};
|
||||||
export default class Folder extends BasePage<IProps, IState>{
|
export default class Folder extends BasePage<IProps, IState> {
|
||||||
public constructor(props: IProps) {
|
public constructor(props: IProps) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -73,7 +73,9 @@ export default class Folder extends BasePage<IProps, IState>{
|
|||||||
<div className={classes["no-folder-selected"]}>
|
<div className={classes["no-folder-selected"]}>
|
||||||
<Typography typo={ITypo.H1Bis}>Informations du dossier</Typography>
|
<Typography typo={ITypo.H1Bis}>Informations du dossier</Typography>
|
||||||
<div className={classes["choose-a-folder"]}>
|
<div className={classes["choose-a-folder"]}>
|
||||||
<Typography typo={ITypo.P_18} color={ITypoColor.GREY}>Veuillez sélectionner un dossier.</Typography>
|
<Typography typo={ITypo.P_18} color={ITypoColor.GREY}>
|
||||||
|
Veuillez sélectionner un dossier.
|
||||||
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,18 +3,17 @@
|
|||||||
.root {
|
.root {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-bottom: 32px;
|
padding-bottom: 32px;
|
||||||
.no-client{
|
.no-client {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 72px;
|
padding: 72px;
|
||||||
.title{
|
.title {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.client{
|
.client {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 32px;
|
gap: 32px;
|
||||||
}
|
}
|
||||||
|
@ -14,29 +14,36 @@ type IState = {};
|
|||||||
|
|
||||||
export default class ClientSection extends React.Component<IProps, IState> {
|
export default class ClientSection extends React.Component<IProps, IState> {
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return <div className={classes["root"]}>
|
return (
|
||||||
{this.doesFolderHaveCustomer() ?
|
<div className={classes["root"]}>
|
||||||
<div className={classes["client"]}>
|
{this.doesFolderHaveCustomer() ? (
|
||||||
{this.renderCustomerFolders()}
|
<div className={classes["client"]}>{this.renderCustomerFolders()}</div>
|
||||||
</div>
|
) : (
|
||||||
:
|
|
||||||
<div className={classes["no-client"]}>
|
<div className={classes["no-client"]}>
|
||||||
<div className={classes["title"]}>
|
<div className={classes["title"]}>
|
||||||
<Typography typo={ITypo.P_18}>Aucun client n’est associé au dossier.</Typography>
|
<Typography typo={ITypo.P_18}>Aucun client n’est associé au dossier.</Typography>
|
||||||
</div>
|
</div>
|
||||||
<Link href={"/dossier/".concat(this.props.folder.uid).concat("/ajouter-client")}>
|
<Link href={"/dossier/".concat(this.props.folder.uid).concat("/ajouter-client")}>
|
||||||
<Button variant={EButtonVariant.LINE} icon={PlusIcon}>Ajouter un client</Button>
|
<Button variant={EButtonVariant.LINE} icon={PlusIcon}>
|
||||||
|
Ajouter un client
|
||||||
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</div>}
|
</div>
|
||||||
</div>;
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private renderCustomerFolders() {
|
private renderCustomerFolders() {
|
||||||
const output = this.props.folder.office_folder_has_customers?.map((folderHasCustomer, key) => {
|
const output = this.props.folder.office_folder_has_customers?.map((folderHasCustomer, key) => {
|
||||||
if (!folderHasCustomer.customer) return null;
|
if (!folderHasCustomer.customer) return null;
|
||||||
// TODO : Les documents ASKED fonctionne mais les autres documents ne doivcent etre seulement ceux qui correspondent au folder
|
// TODO : Les documents ASKED fonctionne mais les autres documents ne doivcent etre seulement ceux qui correspondent au folder
|
||||||
return <div className={classes["user-folder"]} key={folderHasCustomer.customer.uid}><UserFolder folder={this.props.folder} customer={folderHasCustomer.customer} /></div>;
|
return (
|
||||||
})
|
<div className={classes["user-folder"]} key={folderHasCustomer.customer.uid}>
|
||||||
|
<UserFolder folder={this.props.folder} customer={folderHasCustomer.customer} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
});
|
||||||
return output ?? null;
|
return output ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.modal-title{
|
.modal-title {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ type IState = {
|
|||||||
selectedFolder: IDashBoardFolder | null;
|
selectedFolder: IDashBoardFolder | null;
|
||||||
isArchivedModalOpen: boolean;
|
isArchivedModalOpen: boolean;
|
||||||
};
|
};
|
||||||
class FolderInformationClass extends BasePage<IPropsClass, IState>{
|
class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
||||||
public constructor(props: IPropsClass) {
|
public constructor(props: IPropsClass) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -35,13 +35,14 @@ class FolderInformationClass extends BasePage<IPropsClass, IState>{
|
|||||||
return (
|
return (
|
||||||
<DefaultNotaryDashboard title={"Dossier"} onSelectedFolder={this.onSelectedFolder}>
|
<DefaultNotaryDashboard title={"Dossier"} onSelectedFolder={this.onSelectedFolder}>
|
||||||
<div className={classes["root"]}>
|
<div className={classes["root"]}>
|
||||||
{this.state.selectedFolder
|
{this.state.selectedFolder ? (
|
||||||
?
|
|
||||||
<div className={classes["folder-informations"]}>
|
<div className={classes["folder-informations"]}>
|
||||||
<div className={classes["folder-header"]}>
|
<div className={classes["folder-header"]}>
|
||||||
<div className={classes["header"]}>
|
<div className={classes["header"]}>
|
||||||
<Typography typo={ITypo.H1Bis}>Informations du dossier</Typography>
|
<Typography typo={ITypo.H1Bis}>Informations du dossier</Typography>
|
||||||
<Button variant={EButtonVariant.LINE} icon={ChevronIcon}>Modifier les collaborateurs</Button>
|
<Button variant={EButtonVariant.LINE} icon={ChevronIcon}>
|
||||||
|
Modifier les collaborateurs
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<FolderBoxInformation folder={this.state.selectedFolder} />
|
<FolderBoxInformation folder={this.state.selectedFolder} />
|
||||||
<div className={classes["second-box"]}>
|
<div className={classes["second-box"]}>
|
||||||
@ -56,7 +57,9 @@ class FolderInformationClass extends BasePage<IPropsClass, IState>{
|
|||||||
{!this.doesFolderHaveCustomer() && <ClientSection folder={this.state.selectedFolder} />}
|
{!this.doesFolderHaveCustomer() && <ClientSection folder={this.state.selectedFolder} />}
|
||||||
|
|
||||||
<div className={classes["button-container"]}>
|
<div className={classes["button-container"]}>
|
||||||
<Button variant={EButtonVariant.GHOST} onClick={this.openArchivedModal}>Archiver le dossier</Button>
|
<Button variant={EButtonVariant.GHOST} onClick={this.openArchivedModal}>
|
||||||
|
Archiver le dossier
|
||||||
|
</Button>
|
||||||
<Button variant={EButtonVariant.SECONDARY}>Supprimer le dossier</Button>
|
<Button variant={EButtonVariant.SECONDARY}>Supprimer le dossier</Button>
|
||||||
</div>
|
</div>
|
||||||
<Confirm
|
<Confirm
|
||||||
@ -72,13 +75,16 @@ class FolderInformationClass extends BasePage<IPropsClass, IState>{
|
|||||||
<InputField name="input field" fakeplaceholder="Description" textarea />
|
<InputField name="input field" fakeplaceholder="Description" textarea />
|
||||||
</Confirm>
|
</Confirm>
|
||||||
</div>
|
</div>
|
||||||
:
|
) : (
|
||||||
<div className={classes["no-folder-selected"]}>
|
<div className={classes["no-folder-selected"]}>
|
||||||
<Typography typo={ITypo.H1Bis}>Informations du dossier</Typography>
|
<Typography typo={ITypo.H1Bis}>Informations du dossier</Typography>
|
||||||
<div className={classes["choose-a-folder"]}>
|
<div className={classes["choose-a-folder"]}>
|
||||||
<Typography typo={ITypo.P_18} color={ITypoColor.GREY}>Veuillez sélectionner un dossier.</Typography>
|
<Typography typo={ITypo.P_18} color={ITypoColor.GREY}>
|
||||||
|
Veuillez sélectionner un dossier.
|
||||||
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</div>}
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</DefaultNotaryDashboard>
|
</DefaultNotaryDashboard>
|
||||||
);
|
);
|
||||||
|
@ -15,21 +15,13 @@ export default class LoginClass extends BasePage {
|
|||||||
<div className={classes["root"]}>
|
<div className={classes["root"]}>
|
||||||
<Image alt="coffre" src={CoffreIcon} />
|
<Image alt="coffre" src={CoffreIcon} />
|
||||||
<Typography typo={ITypo.H1}>
|
<Typography typo={ITypo.H1}>
|
||||||
<div className={classes["title"]}>
|
<div className={classes["title"]}>Connexion espace professionnel</div>
|
||||||
Connexion espace professionnel
|
|
||||||
</div>
|
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button onClick={this.redirectUserOnConnection}>
|
<Button onClick={this.redirectUserOnConnection}>S’identifier avec ID.not</Button>
|
||||||
S’identifier avec ID.not
|
|
||||||
</Button>
|
|
||||||
<Typography typo={ITypo.P_18}>
|
<Typography typo={ITypo.P_18}>
|
||||||
<div className={classes["forget-password"]}>
|
<div className={classes["forget-password"]}>Vous n’arrivez pas à vous connecter ?</div>
|
||||||
Vous n’arrivez pas à vous connecter ?
|
|
||||||
</div>
|
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button variant={EButtonVariant.LINE}>
|
<Button variant={EButtonVariant.LINE}>Contacter l’administrateur</Button>
|
||||||
Contacter l’administrateur
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</DefaultDoubleSidePage>
|
</DefaultDoubleSidePage>
|
||||||
);
|
);
|
||||||
@ -38,9 +30,7 @@ export default class LoginClass extends BasePage {
|
|||||||
private redirectUserOnConnection() {
|
private redirectUserOnConnection() {
|
||||||
const variables = FrontendVariables.getInstance();
|
const variables = FrontendVariables.getInstance();
|
||||||
const baseFronturl =
|
const baseFronturl =
|
||||||
variables.BACK_API_PROTOCOL +
|
variables.BACK_API_PROTOCOL + variables.FRONT_APP_HOST + (variables.FRONT_APP_PORT ? ":" + variables.FRONT_APP_PORT : "");
|
||||||
variables.FRONT_APP_HOST +
|
|
||||||
(variables.FRONT_APP_PORT ? ":" + variables.FRONT_APP_PORT : "");
|
|
||||||
const authorizeEndPoint = variables.IDNOT_AUTHORIZE_ENDPOINT;
|
const authorizeEndPoint = variables.IDNOT_AUTHORIZE_ENDPOINT;
|
||||||
const clientId = variables.IDNOT_CLIENT_ID;
|
const clientId = variables.IDNOT_CLIENT_ID;
|
||||||
const url = `${authorizeEndPoint}?client_id=${clientId}&redirect_uri=${baseFronturl}/authorized-client&scope=openid,profile,offline_access&response_type=code`;
|
const url = `${authorizeEndPoint}?client_id=${clientId}&redirect_uri=${baseFronturl}/authorized-client&scope=openid,profile,offline_access&response_type=code`;
|
||||||
|
@ -14,7 +14,7 @@ import Auth from "@Front/Api/Auth/IdNot";
|
|||||||
import Folder from "../Folder";
|
import Folder from "../Folder";
|
||||||
import LoginClass from "../Login";
|
import LoginClass from "../Login";
|
||||||
|
|
||||||
type IPropsClass = {};
|
type IPropsClass = {};
|
||||||
|
|
||||||
// type IStateClass = {};
|
// type IStateClass = {};
|
||||||
|
|
||||||
@ -86,5 +86,5 @@ export default function LoginCallBack(props: IPropsClass) {
|
|||||||
getIdNotJwt();
|
getIdNotJwt();
|
||||||
return <Folder {...props} />;
|
return <Folder {...props} />;
|
||||||
}
|
}
|
||||||
return <LoginClass {...props}/>
|
return <LoginClass {...props} />;
|
||||||
}
|
}
|
||||||
|
@ -12,18 +12,30 @@ export type NextPageWithLayout<TProps = Record<string, unknown>, TInitialProps =
|
|||||||
type AppPropsWithLayout = AppProps & {
|
type AppPropsWithLayout = AppProps & {
|
||||||
Component: NextPageWithLayout;
|
Component: NextPageWithLayout;
|
||||||
} & {
|
} & {
|
||||||
backApiProtocol: string,
|
backApiProtocol: string;
|
||||||
backApiHost: string,
|
backApiHost: string;
|
||||||
backApiPort: string,
|
backApiPort: string;
|
||||||
backApiRootUrl: string,
|
backApiRootUrl: string;
|
||||||
backApiVersion: string,
|
backApiVersion: string;
|
||||||
frontAppHost: string,
|
frontAppHost: string;
|
||||||
frontAppPort: string,
|
frontAppPort: string;
|
||||||
idNotAuthorizeEndpoint: string;
|
idNotAuthorizeEndpoint: string;
|
||||||
idNotClientId: string;
|
idNotClientId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const MyApp = (({ Component, pageProps, backApiProtocol, backApiHost, backApiPort, backApiRootUrl, backApiVersion, frontAppHost, frontAppPort, idNotAuthorizeEndpoint, idNotClientId }: AppPropsWithLayout) => {
|
const MyApp = (({
|
||||||
|
Component,
|
||||||
|
pageProps,
|
||||||
|
backApiProtocol,
|
||||||
|
backApiHost,
|
||||||
|
backApiPort,
|
||||||
|
backApiRootUrl,
|
||||||
|
backApiVersion,
|
||||||
|
frontAppHost,
|
||||||
|
frontAppPort,
|
||||||
|
idNotAuthorizeEndpoint,
|
||||||
|
idNotClientId,
|
||||||
|
}: AppPropsWithLayout) => {
|
||||||
const getLayout = Component.getLayout ?? ((page) => <DefaultLayout children={page}></DefaultLayout>);
|
const getLayout = Component.getLayout ?? ((page) => <DefaultLayout children={page}></DefaultLayout>);
|
||||||
|
|
||||||
FrontendVariables.getInstance().BACK_API_PROTOCOL = backApiProtocol;
|
FrontendVariables.getInstance().BACK_API_PROTOCOL = backApiProtocol;
|
||||||
@ -36,7 +48,6 @@ const MyApp = (({ Component, pageProps, backApiProtocol, backApiHost, backApiPor
|
|||||||
FrontendVariables.getInstance().IDNOT_AUTHORIZE_ENDPOINT = idNotAuthorizeEndpoint;
|
FrontendVariables.getInstance().IDNOT_AUTHORIZE_ENDPOINT = idNotAuthorizeEndpoint;
|
||||||
FrontendVariables.getInstance().IDNOT_CLIENT_ID = idNotClientId;
|
FrontendVariables.getInstance().IDNOT_CLIENT_ID = idNotClientId;
|
||||||
|
|
||||||
|
|
||||||
return getLayout(<Component {...pageProps} />);
|
return getLayout(<Component {...pageProps} />);
|
||||||
}) as AppType;
|
}) as AppType;
|
||||||
|
|
||||||
@ -52,6 +63,6 @@ MyApp.getInitialProps = async () => {
|
|||||||
idNotAuthorizeEndpoint: process.env["IDNOT_AUTHORIZE_ENDPOINT"],
|
idNotAuthorizeEndpoint: process.env["IDNOT_AUTHORIZE_ENDPOINT"],
|
||||||
idNotClientId: process.env["IDNOT_CLIENT_ID"],
|
idNotClientId: process.env["IDNOT_CLIENT_ID"],
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
|
||||||
export default MyApp;
|
export default MyApp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user