hugolxt e98b8b601b
Front end Componentss (#5)
1) Progress Bar
https://app.ora.pm/p/fb56ed95daa7456b888d266a050b9afa?v=86662&s=28564&t=k&c=2c1d4ce11f4747b7bcd9814336a8e882

2) Folder Component
https://app.ora.pm/p/fb56ed95daa7456b888d266a050b9afa?v=86662&s=28564&t=k&c=1abbfeae008a486facf59e3cb2ccdd86

3) Api frontend (pas de tickets correspondants)

4) Ask/Pending/Validated/ documents (pas de tickets correspondants)

5) Multiselect [WIP] -> Error message not displaying when the user
search and didn't find in the corresponding options
https://app.ora.pm/p/fb56ed95daa7456b888d266a050b9afa?v=86662&s=28564&t=k&c=1d5ec1f29d2644d3ac7a0c309608c6e3

6) Document Notary Component
https://app.ora.pm/p/fb56ed95daa7456b888d266a050b9afa?v=86662&s=28564&t=k&c=e2da114abf5d40a5adc0c411f7f86c8d

7) Notary Documents For Users Components with filters for each users
according to the document status
https://app.ora.pm/p/fb56ed95daa7456b888d266a050b9afa?v=86662&s=28564&t=k&c=c682d55c2d42438f9a880493a5ac6b12

8) Fix Local Docker Compose Front (pas de tickets correspondants)

9) DropDown Component
https://app.ora.pm/p/fb56ed95daa7456b888d266a050b9afa?v=86662&s=28564&t=k&c=933bcc4418ea46f88c696e52b97d7bfc

10) Minor Fixes

https://app.ora.pm/p/fb56ed95daa7456b888d266a050b9afa?v=86662&s=28564&t=k&c=0c799226315c4d7ca7ee13648105cfcf

https://app.ora.pm/p/fb56ed95daa7456b888d266a050b9afa?v=86662&s=28564&t=k&c=eb9838e8ad894ac5b43e4c8562bc6450

---------

Co-authored-by: leabruchon <89223887+leabruchon@users.noreply.github.com>
2023-04-04 16:44:43 +02:00

60 lines
2.0 KiB
TypeScript

import React from "react";
import classes from "./classes.module.scss";
import { Contact } from "le-coffre-resources/dist/Notary";
import Typography, { ITypo } from "../../Typography";
import Image from "next/image";
import PenIcon from "@Assets/Icons/pen.svg";
import WarningBadge from "../../WarningBadge";
type IProps = {
contact: {
first_name: Contact["first_name"],
last_name: Contact["last_name"],
phone_number: Contact["phone_number"],
cell_phone_number: Contact["cell_phone_number"],
email: Contact["email"],
}
};
type IState = {};
export default class UserFolderHeader extends React.Component<IProps, IState> {
public override render(): JSX.Element {
return <div className={classes["root"]}>
<div className={classes["content"]}>
<div className={classes["container"]}>
<Typography typo={ITypo.NAV_INPUT_16}>Nom</Typography>
<Typography typo={ITypo.P_18}>{this.props.contact.last_name}</Typography>
</div>
<div className={classes["container"]}>
<Typography typo={ITypo.NAV_INPUT_16}>Prénom</Typography>
<Typography typo={ITypo.P_18}>{this.props.contact.first_name}</Typography>
</div>
<div className={classes["container"]}>
<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>
</div>
<div className={classes["container"]}>
<Typography typo={ITypo.NAV_INPUT_16}>E-mail</Typography>
<Typography typo={ITypo.P_18}>{this.props.contact.email}</Typography>
</div>
</div>
<div className={classes["icons"]}>
<WarningBadge />
<Image src={PenIcon} alt="edit" className={classes["edit-icon"]} />
</div>
</div>;
}
private formatPhoneNumber(phoneNumber: string): string {
if (!phoneNumber) return "";
const output = phoneNumber.split('').map((char, index) => {
if(index%2) return char + " ";
return char;
});
return output.join("");
}
}