Modified assign task popup from Daily task planning component.
This commit is contained in:
parent
5535ff21fa
commit
d20b54a71c
@ -9,6 +9,7 @@ import { useNavigate } from "react-router-dom";
|
||||
const Attendance = ({ attendance, getRole, handleModalData }) => {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const navigate = useNavigate();
|
||||
const [todayDate, setTodayDate] = useState(new Date());
|
||||
|
||||
// Ensure attendance is an array
|
||||
const attendanceList = Array.isArray(attendance) ? attendance : [];
|
||||
@ -41,6 +42,13 @@ const Attendance = ({ attendance, getRole, handleModalData }) => {
|
||||
<>
|
||||
<table className="table ">
|
||||
<thead>
|
||||
<tr className="border-top-0" style={{ textAlign: 'left' }}>
|
||||
<td >
|
||||
<strong>Date : {todayDate.toLocaleDateString('en-GB')}</strong>
|
||||
</td>
|
||||
<td style={{ paddingLeft: '20px' }}>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th className="border-top-0" colSpan={2}>
|
||||
Name
|
||||
@ -126,9 +134,8 @@ const Attendance = ({ attendance, getRole, handleModalData }) => {
|
||||
<nav aria-label="Page ">
|
||||
<ul className="pagination pagination-sm justify-content-end py-1">
|
||||
<li
|
||||
className={`page-item ${
|
||||
currentPage === 1 ? "disabled" : ""
|
||||
}`}
|
||||
className={`page-item ${currentPage === 1 ? "disabled" : ""
|
||||
}`}
|
||||
>
|
||||
<button
|
||||
className="page-link btn-xs"
|
||||
@ -140,9 +147,8 @@ const Attendance = ({ attendance, getRole, handleModalData }) => {
|
||||
{[...Array(totalPages)].map((_, index) => (
|
||||
<li
|
||||
key={index}
|
||||
className={`page-item ${
|
||||
currentPage === index + 1 ? "active" : ""
|
||||
}`}
|
||||
className={`page-item ${currentPage === index + 1 ? "active" : ""
|
||||
}`}
|
||||
>
|
||||
<button
|
||||
className="page-link "
|
||||
@ -153,9 +159,8 @@ const Attendance = ({ attendance, getRole, handleModalData }) => {
|
||||
</li>
|
||||
))}
|
||||
<li
|
||||
className={`page-item ${
|
||||
currentPage === totalPages ? "disabled" : ""
|
||||
}`}
|
||||
className={`page-item ${currentPage === totalPages ? "disabled" : ""
|
||||
}`}
|
||||
>
|
||||
<button
|
||||
className="page-link "
|
||||
|
@ -188,7 +188,7 @@ const AssignRoleModel = ({ assignData, onClose }) => {
|
||||
<div className="form-text text-start">
|
||||
|
||||
<div className="d-flex align-items-center">
|
||||
<strong>Select Team</strong>
|
||||
Select Team
|
||||
<div className="me-2">{displayedSelection}</div>
|
||||
<a
|
||||
className="dropdown-toggle hide-arrow cursor-pointer"
|
||||
@ -272,10 +272,10 @@ const AssignRoleModel = ({ assignData, onClose }) => {
|
||||
)}
|
||||
/>
|
||||
<div className="flex-grow-1">
|
||||
<p className="mb-1 fw-bold" style={{ fontSize: "13px" }}>
|
||||
<p className="mb-0" style={{ fontSize: "13px" }}>
|
||||
{emp.firstName} {emp.lastName}
|
||||
</p>
|
||||
<small className="text-muted" style={{ fontSize: "11px" }}>
|
||||
<small className="text-muted" style={{ fontSize: "11px"}}>
|
||||
{loading ? (
|
||||
<span className="placeholder-glow">
|
||||
<span className="placeholder col-6"></span>
|
||||
@ -347,13 +347,13 @@ const AssignRoleModel = ({ assignData, onClose }) => {
|
||||
<div className="col-md text-start mx-0 px-0">
|
||||
<div className="form-check form-check-inline mt-3 px-1">
|
||||
<label
|
||||
className="form-text fs-6"
|
||||
className="form-text fs-7"
|
||||
htmlFor="inlineCheckbox1"
|
||||
>
|
||||
<strong>Pending Task of Activity:</strong>
|
||||
Pending Task of Activity:
|
||||
</label>
|
||||
<label
|
||||
className="form-check-label ms-4"
|
||||
className="form-check-label fs-7 ms-4"
|
||||
htmlFor="inlineCheckbox1"
|
||||
>
|
||||
|
||||
@ -369,29 +369,38 @@ const AssignRoleModel = ({ assignData, onClose }) => {
|
||||
</div>
|
||||
|
||||
<div className="col-md text-start mx-0 px-0">
|
||||
<div className="form-check form-check-inline mt-2 px-1">
|
||||
<div className="form-check form-check-inline mt-2 px-1 mb-2 text-start">
|
||||
<label
|
||||
className="form-text fs-6"
|
||||
htmlFor="inlineCheckbox1"
|
||||
className="form-check-label fs-7"
|
||||
htmlFor="inlineCheckbox1"
|
||||
>
|
||||
<strong>Target for Today:</strong>
|
||||
Target for Today:
|
||||
</label>
|
||||
</div>
|
||||
<div className="form-check form-check-inline col-sm-2 col">
|
||||
<div className="form-check form-check-inline col-sm-3 mt-2">
|
||||
|
||||
<Controller
|
||||
name="plannedTask"
|
||||
control={control}
|
||||
control={control}
|
||||
|
||||
render={({ field }) => (
|
||||
<input
|
||||
type="text"
|
||||
className="form-control form-control-xs"
|
||||
{...field}
|
||||
id="defaultFormControlInput"
|
||||
aria-describedby="defaultFormControlHelp"
|
||||
/>
|
||||
<div className="d-flex align-items-center gap-1 ">
|
||||
<input
|
||||
type="text"
|
||||
className="form-control form-control-sm"
|
||||
{...field}
|
||||
id="defaultFormControlInput"
|
||||
aria-describedby="defaultFormControlHelp"
|
||||
/>
|
||||
<span style={{ paddingLeft: '6px' }}>{
|
||||
assignData?.workItem?.workItem?.activityMaster
|
||||
?.unitOfMeasurement
|
||||
}</span>
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{errors.plannedTask && (
|
||||
<div className="danger-text mt-1">
|
||||
{errors.plannedTask.message}
|
||||
@ -400,14 +409,15 @@ const AssignRoleModel = ({ assignData, onClose }) => {
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{errors.selectedEmployees && (
|
||||
<div className="danger-text mt-1">
|
||||
<p>{errors.selectedEmployees.message}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<label htmlFor="exampleFormControlTextarea1">
|
||||
<strong>Description</strong>
|
||||
<label htmlFor="exampleFormControlTextarea1" className="m-1 text-lg font-semibold block">
|
||||
Description
|
||||
</label>
|
||||
<Controller
|
||||
name="description"
|
||||
|
Loading…
x
Reference in New Issue
Block a user