|
|
|
@ -1,7 +1,7 @@
@@ -1,7 +1,7 @@
|
|
|
|
|
/* eslint-disable react/display-name */ |
|
|
|
|
import React from "react"; |
|
|
|
|
import moment from "moment"; |
|
|
|
|
import { IUser } from "@/shared"; |
|
|
|
|
import { IUser, createFullName } from "@/shared"; |
|
|
|
|
|
|
|
|
|
interface IProps { |
|
|
|
|
profile: IUser; |
|
|
|
@ -18,12 +18,24 @@ interface IProps {
@@ -18,12 +18,24 @@ interface IProps {
|
|
|
|
|
export const PrintComponent = React.forwardRef( |
|
|
|
|
(props: IProps, ref: React.RefObject<HTMLDivElement>) => { |
|
|
|
|
const { profile, startDate, endDate, taskCounts } = props; |
|
|
|
|
|
|
|
|
|
const fullName = createFullName( |
|
|
|
|
profile.info.firstName, |
|
|
|
|
profile.info.middleName, |
|
|
|
|
profile.info.lastName |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div ref={ref} className="print-content-block" style={{ padding: 50 }}> |
|
|
|
|
<p style={{ fontSize: "18px", textDecoration: "underline" }}> |
|
|
|
|
<p style={{ fontSize: "18px" }}> |
|
|
|
|
<strong>{fullName} </strong> |
|
|
|
|
<i>{`(${profile?.info?.position ? profile?.info?.position : ""}${ |
|
|
|
|
profile?.info?.position && profile?.factoryName ? `, ` : "" |
|
|
|
|
}${profile?.factoryName ? `${profile?.factoryName}` : ""})`}</i>
|
|
|
|
|
</p> |
|
|
|
|
<p style={{ fontSize: "18px", marginTop: "0px" }}> |
|
|
|
|
<strong> |
|
|
|
|
{profile.info.lastName} {profile.info.middleName}{" "} |
|
|
|
|
{profile.info.firstName} ({moment(startDate).format("DD-MM-YYYY")} -{" "} |
|
|
|
|
({moment(startDate).format("DD-MM-YYYY")} -{" "} |
|
|
|
|
{moment(endDate).format("DD-MM-YYYY")}) |
|
|
|
|
</strong> |
|
|
|
|
</p> |
|
|
|
|