Merge branch 'pramod_Enhancement#86_plannedDisplayInReport' of https://git.marcoaiot.com/admin/marco.pms.web into pramod_Enhancement#86_plannedDisplayInReport

This commit is contained in:
Vikas Nale 2025-04-17 16:27:07 +05:30
commit 83b6c2a307
3 changed files with 20 additions and 20 deletions

View File

@ -7,7 +7,9 @@ const EmployeeNav = ({ onPillClick, activePill }) => {
<ul className="nav nav-tabs"> <ul className="nav nav-tabs">
<li className="nav-item"> <li className="nav-item">
<a <a
className={`nav-link ${activePill === "account" ? "active" : ""}`} className={`nav-link py-1 px-2 small ${
activePill === "account" ? "active" : ""
}`}
href="#" href="#"
onClick={(e) => { onClick={(e) => {
e.preventDefault(); // Prevent page reload e.preventDefault(); // Prevent page reload

View File

@ -95,7 +95,6 @@ const ManageRole = ({ employeeId, onClosed }) => {
setIsLoading(false); setIsLoading(false);
}; };
return ( return (
<div <div
className={`modal fade `} className={`modal fade `}

View File

@ -1,11 +1,5 @@
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
const Avatar = ({ firstName, lastName, size = "sm" }) => {
// Combine firstName and lastName to create a unique string for hashing
const fullName = `${firstName} ${lastName}`;
const [bgClass, setBgClass] = useState("");
// A simple hash function to generate a deterministic value from the name // A simple hash function to generate a deterministic value from the name
function hashString(str) { function hashString(str) {
let hash = 0; let hash = 0;
@ -16,6 +10,13 @@ const Avatar = ({ firstName, lastName, size = "sm" }) => {
return hash; return hash;
} }
const Avatar = ({ firstName, lastName, size = "sm" }) => {
// Combine firstName and lastName to create a unique string for hashing
const fullName = `${firstName} ${lastName}`;
const [bgClass, setBgClass] = useState("");
// Function to generate the avatar text
function generateAvatarText(firstName, lastName) { function generateAvatarText(firstName, lastName) {
if (!firstName) return ""; if (!firstName) return "";
if (!lastName || lastName.trim() === "") { if (!lastName || lastName.trim() === "") {
@ -49,7 +50,6 @@ const Avatar = ({ firstName, lastName, size = "sm" }) => {
}, [fullName]); // Re-run if the fullName changes }, [fullName]); // Re-run if the fullName changes
return ( return (
<>
<div className="avatar-wrapper p-1"> <div className="avatar-wrapper p-1">
<div className={`avatar avatar-${size} me-2`}> <div className={`avatar avatar-${size} me-2`}>
<span className={`avatar-initial rounded-circle ${bgClass}`}> <span className={`avatar-initial rounded-circle ${bgClass}`}>
@ -57,7 +57,6 @@ const Avatar = ({ firstName, lastName, size = "sm" }) => {
</span> </span>
</div> </div>
</div> </div>
</>
); );
}; };