UI alignment at View Managejob Ticket in jobs.
This commit is contained in:
parent
12184091cd
commit
7470a6836f
@ -7,6 +7,7 @@ import Avatar from "../common/Avatar";
|
||||
import EmployeeAvatarGroup from "../common/EmployeeAvatarGroup";
|
||||
import JobStatusLog from "./JobStatusLog";
|
||||
import JobComments from "./JobComments";
|
||||
import { daysLeft } from "../../utils/appUtils";
|
||||
|
||||
const ManageJobTicket = ({ Job }) => {
|
||||
const { data, isLoading, isError, error } = useServiceProjectJobDetails(
|
||||
@ -41,17 +42,39 @@ const ManageJobTicket = ({ Job }) => {
|
||||
return (
|
||||
<div className="row text-start">
|
||||
<div className="col-12">
|
||||
<h6 className="fs-5 fw-semibold">{data?.title}</h6>
|
||||
<div className="d-flex justify-content-between">
|
||||
<div className="d-flex flex-row gap-2">
|
||||
<i className="bx bx-calendar"></i>{" "}
|
||||
<span>{formatUTCToLocalTime(data?.createdAt, true)}</span>
|
||||
</div>
|
||||
<div className="d-flex justify-content-between align-items-center mb-3">
|
||||
<span className="badge bg-label-primary">{data?.status?.name}</span>
|
||||
{data?.dueDate && (() => {
|
||||
const { days, color } = daysLeft(data?.startDate, data?.dueDate);
|
||||
return (
|
||||
<span style={{ fontSize: "12px" }}>
|
||||
<span className="fw-medium me-1">Days Left :</span>
|
||||
<span className={`badge bg-${color}`}>
|
||||
{days !== null ? `${days} days` : "N/A"}
|
||||
</span>
|
||||
</span>
|
||||
);
|
||||
})()}
|
||||
|
||||
</div>
|
||||
<div className="d-flex flex-wrap my-3">
|
||||
<p>{data?.description}</p>
|
||||
<h6 className="fs-5 fw-semibold">{data?.title}</h6>
|
||||
|
||||
<div className="d-flex flex-wrap">
|
||||
<p>
|
||||
<span className="fw-medium me-1">Description :</span>
|
||||
{data?.description || "N/A"}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="d-flex justify-content-between mb-4">
|
||||
<div className="d-flex flex-row gap-1 fw-medium">
|
||||
<i className="bx bx-calendar"></i>{" "}
|
||||
<span>Created Date : {formatUTCToLocalTime(data?.createdAt, true)}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="d-flex flex-row gap-5">
|
||||
<span className="fw-medium">
|
||||
<i className="bx bx-calendar"></i> Start Date : {formatUTCToLocalTime(data?.startDate)}
|
||||
@ -61,11 +84,12 @@ const ManageJobTicket = ({ Job }) => {
|
||||
<i className="bx bx-calendar"></i> Due on : {formatUTCToLocalTime(data?.startDate)}
|
||||
</span>
|
||||
</div>
|
||||
<div className="d-block mt-2">
|
||||
</div>
|
||||
<div className="d-block mt-4 mb-3">
|
||||
<div className="d-flex align-items-center mb-2">
|
||||
<small className="fs-6 text-secondary fs-italic me-3 mt-2">
|
||||
<em>Created By</em>
|
||||
</small>{" "}
|
||||
<span className="fs-6 fw-medium me-5">
|
||||
Created By
|
||||
</span>{" "}
|
||||
<Avatar
|
||||
size="xs"
|
||||
firstName={data?.createdBy?.firstName}
|
||||
@ -77,8 +101,8 @@ const ManageJobTicket = ({ Job }) => {
|
||||
</div>
|
||||
</div>
|
||||
<div className="d-flex align-items-center">
|
||||
<small className="fs-6 text-secondary fs-italic me-3 mt-2">
|
||||
<em>Assigned</em>
|
||||
<small className="fs-6 fw-medium me-3">
|
||||
Assigned By
|
||||
</small>
|
||||
<div className="d-flex flex-row gap-3">
|
||||
{data?.assignees?.map((emp) => (
|
||||
|
||||
@ -45,11 +45,19 @@ const OffcanvasComponent = ({
|
||||
aria-labelledby={`${id}-label`}
|
||||
>
|
||||
<div className="offcanvas-header">
|
||||
<div className='d-flex flex-row gap-3'>
|
||||
<i className='bx bx-lg bx-left-arrow-alt cursor-pointer' data-bs-dismiss="offcanvas"
|
||||
aria-label="Close"></i> <i className='bx bx-briefcase text-primary'></i> <h5 className="offcanvas-title" id={`${id}-label`}>{title}</h5>
|
||||
<div className="d-flex align-items-center gap-3">
|
||||
<i
|
||||
className="bx bx-lg bx-left-arrow-alt cursor-pointer"
|
||||
data-bs-dismiss="offcanvas"
|
||||
aria-label="Close"
|
||||
></i>
|
||||
<i className="bx bx-briefcase text-primary"></i>
|
||||
<h5 className="offcanvas-title mb-0" id={`${id}-label`}>
|
||||
{title}
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
|
||||
<button
|
||||
type="button"
|
||||
className="btn-close"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user