Merge branch 'Service_Project_Managment' of https://git.marcoaiot.com/admin/marco.pms.web into Service_Project_Managment
This commit is contained in:
commit
c311324bad
@ -119,10 +119,20 @@ const JobComments = ({ data }) => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="d-flex justify-content-end gap-3 align-items-center text-end mt-3">
|
||||
<div className="d-flex flex-column flex-md-row justify-content-between align-items-start">
|
||||
{/* LEFT SIDE → Uploaded Files */}
|
||||
<div className="flex-grow-1 ms-10 mt-2">
|
||||
{files?.length > 0 && (
|
||||
<Filelist files={files} removeFile={removeFile} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* RIGHT SIDE → Add Attachment + Submit */}
|
||||
<div className="d-flex gap-3 align-items-center text-end mt-3 ms-10 ms-md-0">
|
||||
<div
|
||||
onClick={() => document.getElementById("attachments").click()}
|
||||
className="cursor-pointer"
|
||||
style={{ whiteSpace: 'nowrap' }}
|
||||
>
|
||||
<input
|
||||
type="file"
|
||||
@ -136,21 +146,22 @@ const JobComments = ({ data }) => {
|
||||
e.target.value = "";
|
||||
}}
|
||||
/>
|
||||
<i className="bx bx-paperclip"></i>
|
||||
<i className="bx bx-sm bx-paperclip mb-1 me-1"></i>
|
||||
Add Attachment
|
||||
</div>
|
||||
|
||||
<button
|
||||
className="btn btn-primary btn-sm px-3"
|
||||
className="btn btn-primary btn-sm px-1 py-1" // smaller padding + slightly smaller font
|
||||
type="submit"
|
||||
disabled={!watch("comment")?.trim() || isPending}
|
||||
>
|
||||
<i className="bx bx-send me-1"></i>
|
||||
<i className="bx bx-xs bx-send me-1"></i>
|
||||
Submit
|
||||
</button>
|
||||
|
||||
</div>
|
||||
{files?.length > 0 && (
|
||||
<Filelist files={files} removeFile={removeFile} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div className="card-body p-0">
|
||||
|
||||
@ -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