Skip to content

update the behaviour of experience it can show in months as well as i… #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link rel="icon" href="https://joshsoftware.com/wp-content/uploads/2022/07/cropped-ruby-1-2-192x192.png" type="image/png" />
<link rel="icon" href="https://framerusercontent.com/images/avVcibFXI0NwGBmwb1rz1v9f3ts.png" type="image/png" />
<title>Profile Builder</title>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
Expand Down
17 changes: 16 additions & 1 deletion src/components/Builder/BasicInfo/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,22 @@ const BasicInfo = ({ profileData }) => {
</Row>
<Row gutter={16}>
<Col span={12}>
<Form.Item name="josh_joining_date" label="JOSH Joining Date">
<Form.Item
name="josh_joining_date"
label="JOSH Joining Date"
rules={[
{
validator: (_, value) =>
value && value > dayjs()
? Promise.reject(
new Error(
"Joining date cannot be current in the future",
),
)
: Promise.resolve(),
},
]}
>
<DatePicker style={{ width: "100%" }} picker="month" />
</Form.Item>
</Col>
Expand Down
35 changes: 23 additions & 12 deletions src/components/Resume/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,18 +457,29 @@ const Resume = forwardRef(({ data }, ref) => {
</div>
<div>
{(profile?.years_of_experience ||
profile?.josh_joining_date?.String) && (
<div className={styles.iconTextWrapper}>
<CheckSquareOutlined />{" "}
<span>
{calculateTotalExperience(
profile?.years_of_experience,
profile?.josh_joining_date?.String,
)}{" "}
Years of Experience
</span>
</div>
)}
profile?.josh_joining_date?.String) &&
(() => {
const years = calculateTotalExperience(
profile?.years_of_experience,
profile?.josh_joining_date?.String,
);

if (years === 0) {
return null;
}

return (
<div className={styles.iconTextWrapper}>
<CheckSquareOutlined />{" "}
<span>
{years < 1
? `${Math.floor(years * 12)} Months of Experience`
: `${years} Year${years > 1 ? "s" : ""} of Experience`}{" "}
</span>
</div>
);
})()}

{profile?.email && contactDetails && (
<div className={styles.iconTextWrapper}>
<MailOutlined /> <span>{profile?.email}</span>
Expand Down