Skip to content
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

Issue11 #26

Merged
merged 6 commits into from
Nov 2, 2023
Merged
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
32 changes: 32 additions & 0 deletions client/components/client/ClienCardDropdown.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"use client";
import React from "react";
import { EllipsisHorizontalIcon } from "@heroicons/react/24/outline";

function ClienCardDropdown() {
return (
<div className="dropdown dropdown-right text-secondary">
<label tabIndex={0} className="">
<EllipsisHorizontalIcon className="h-8 w-8 cursor-pointer stroke-1 text-accent hover:stroke-2" />
</label>
<ul
tabIndex={0}
className="dropdown-menu-small"
>
<li>
<a>Add Outreach</a>
</li>
<li>
<a>Edit</a>
</li>
<li>
<a>Archive</a>
</li>
<li>
<a>Delete</a>
</li>
</ul>
</div>
);
}

export default ClienCardDropdown;
66 changes: 36 additions & 30 deletions client/components/client/ClientCard.jsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
import React from 'react'
import { EllipsisHorizontalIcon, PhoneIcon, EnvelopeIcon, MapPinIcon } from '@heroicons/react/24/outline'
import React, { useState } from "react";
import ClienCardDropdown from "@/components/client/ClienCardDropdown";

import {
PhoneIcon,
EnvelopeIcon,
MapPinIcon,
} from "@heroicons/react/24/outline";
const ClientCard = ({ client }) => {
return (
<section className="client-card mb-8">
<div>
<div className="flex justify-between">
<h3 className="">{client.businessName}</h3>
<EllipsisHorizontalIcon className="h-8 w-8 text-accent stroke-1 hover:stroke-2 cursor-pointer" />
</div>
<hr />
<span className="text-sm italic">{client.businessType}</span>
<div className="client-contact">
<div className="contact-info-group">
<PhoneIcon className="contact-icon me-4" />
<p className="text-base">{client.phone}</p>
</div>
<div className="contact-info-group">
<EnvelopeIcon className="contact-icon me-4" />
<p className="text-base">{client.email}</p>
</div>
<div className="contact-info-group">
<MapPinIcon className="contact-icon me-4" />
<p className="text-base">{client.address}</p>
</div>
</div>
</div>
</section>
)
}
return (
<section className="client-card">
<div>
<div className="relative flex justify-between">
<h3 className="">{client.businessName}</h3>
<ClienCardDropdown />
</div>
<hr />
<span className="text-sm italic">{client.businessType}</span>
<div className="client-contact">
<div className="contact-info-group">
<PhoneIcon className="contact-icon me-4" />
<p className="text-base">{client.phone}</p>
</div>
<div className="contact-info-group">
<EnvelopeIcon className="contact-icon me-4" />
<p className="text-base">{client.email}</p>
</div>
<div className="contact-info-group">
<MapPinIcon className="contact-icon me-4" />
<p className="text-base">{client.address}</p>
</div>
</div>
</div>
</section>
);
};

export default ClientCard
export default ClientCard;
2 changes: 1 addition & 1 deletion client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.4"
}
}
}
4 changes: 4 additions & 0 deletions client/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ hr {
@apply mt-3 z-[1] p-2 shadow menu menu-sm dropdown-content bg-primary border border-secondary rounded-box w-52;
}

.dropdown-menu-small {
@apply mt-3 z-[1] p-2 shadow menu menu-sm dropdown-content bg-primary border border-secondary rounded-box w-36;
}

/* Forms */

form {
Expand Down