UI changes in View Jobs.

This commit is contained in:
Kartik Sharma 2025-11-17 18:25:42 +05:30
parent 767475c7e5
commit 849567f999
6 changed files with 40 additions and 28 deletions

View File

@ -456,3 +456,8 @@ font-weight: normal;
.fs-md-xlarge { font-size: 170% !important; } .fs-md-xlarge { font-size: 170% !important; }
.fs-md-xxlarge { font-size: calc(1.725rem + 5.7vw) !important; } .fs-md-xxlarge { font-size: calc(1.725rem + 5.7vw) !important; }
} }
.me-16 {
/* margin-inline-end: -7.0625rem !important; */
margin-left: -7.0625rem !important;
}

View File

@ -20,6 +20,12 @@ const JobList = () => {
); );
const jobGrid = [ const jobGrid = [
{
key: "jobTicketUId",
label: "Job Id",
getValue: (e) => e?.jobTicketUId || "N/A",
align: "text-start",
},
{ {
key: "title", key: "title",
label: "Title", label: "Title",
@ -40,12 +46,7 @@ const JobList = () => {
isAlwaysVisible: true, isAlwaysVisible: true,
className: "text-start", className: "text-start",
}, },
{
key: "jobTicketUId",
label: "Job Id",
getValue: (e) => e?.jobTicketUId || "N/A",
align: "text-start",
},
{ {
key: "dueDate", key: "dueDate",
label: "Due On", label: "Due On",

View File

@ -123,7 +123,7 @@ const ManageJob = ({ Job }) => {
size="md" size="md"
/> />
</div> </div>
<div className="col-12 col-md-6 mb-2 mb-md-4"> <div className="col-12 col-md-12 mb-2 mb-md-4">
<Label required>Select Employee</Label> <Label required>Select Employee</Label>
<PmsEmployeeInputTag <PmsEmployeeInputTag
control={control} control={control}

View File

@ -45,30 +45,36 @@ const ManageJobTicket = ({ Job }) => {
return ( return (
<div className="row text-start"> <div className="row text-start">
<div className="col-12"> <div className="col-12">
<div className="d-flex flex-wrap"> <div className="d-flex justify-content-between align-items-center flex-wrap mb-2">
<p> {/* Job Id on left */}
<p className="mb-0">
<span className="fw-medium me-1">Job Id :</span> <span className="fw-medium me-1">Job Id :</span>
{data?.jobTicketUId || "N/A"} {data?.jobTicketUId || "N/A"}
</p> </p>
{/* Edit icon on right */}
<HoverPopup
id="STATUS_CHANEG"
title="Change Status"
Mode="click"
className="end-6 start-50 me-16"
content={
<ChangeStatus
statusId={data?.status?.id}
projectId={projectId}
jobId={Job?.job}
popUpId="STATUS_CHANEG"
/>
}
>
<i className="bx bx-edit bx-sm cursor-pointer"></i>
</HoverPopup>
</div> </div>
<div className="d-flex justify-content-between align-items-center mb-3"> <div className="d-flex justify-content-between align-items-center mb-3">
<div className="d-flex flex-row gap-2"> <div className="d-flex flex-row gap-2">
<span className="badge bg-label-primary">{data?.status?.name}</span> <span className="badge bg-label-primary">{data?.status?.name}</span>
<HoverPopup
id="STATUS_CHANEG"
title="Change Status"
Mode="click"
content={
<ChangeStatus
statusId={data?.status?.id}
projectId={projectId}
jobId={Job?.job}
popUpId={"STATUS_CHANEG"}
/>
}
>
<i className="bx bx-edit bx-sm"></i>
</HoverPopup>
</div> </div>
{data?.dueDate && {data?.dueDate &&
(() => { (() => {

View File

@ -2,7 +2,7 @@ import React, { useEffect, useMemo, useRef, useState } from "react";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { closePopup, openPopup, togglePopup } from "../../slices/localVariablesSlice"; import { closePopup, openPopup, togglePopup } from "../../slices/localVariablesSlice";
const HoverPopup = ({ id, title, content, children, Mode = "hover" }) => { const HoverPopup = ({ id, title, content, children, className, Mode = "hover" }) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const visible = useSelector((s) => s.localVariables.popups[id] || false); const visible = useSelector((s) => s.localVariables.popups[id] || false);
@ -60,7 +60,7 @@ const HoverPopup = ({ id, title, content, children, Mode = "hover" }) => {
{visible && ( {visible && (
<div <div
ref={popupRef} ref={popupRef}
className="bg-white border rounded shadow-sm p-3 position-absolute top-100 start-0 mt-2" className={`bg-white border rounded shadow-sm p-3 position-absolute top-100 mt-2 start-50 translate-middle-x ${className}`}
style={{ zIndex: 1000, width: "240px" }} style={{ zIndex: 1000, width: "240px" }}
onClick={(e) => e.stopPropagation()} // prevents closing when clicking inside onClick={(e) => e.stopPropagation()} // prevents closing when clicking inside
> >
@ -68,7 +68,7 @@ const HoverPopup = ({ id, title, content, children, Mode = "hover" }) => {
<div>{content}</div> <div>{content}</div>
</div> </div>
)} )}
</div> </div>

View File

@ -75,7 +75,7 @@ const ProjectPage = () => {
/> />
<div className="card cursor-pointer mb-5"> <div className="card cursor-pointer mb-5">
<div className="card-body p-2 pb-1"> <div className="card-body py-3 px-6 pb-1">
<div className="d-flex flex-wrap justify-content-between align-items-start"> <div className="d-flex flex-wrap justify-content-between align-items-start">
{/* LEFT SIDE — DATE TOGGLE BUTTONS */} {/* LEFT SIDE — DATE TOGGLE BUTTONS */}
<div className="mb-2"> <div className="mb-2">