- Add shot name in project lobal selection
- Sort jobrole in edit employee
This commit is contained in:
parent
70ac3e0344
commit
31a9f55b63
@ -10,7 +10,11 @@ import { changeMaster } from "../../slices/localVariablesSlice";
|
|||||||
import { Link, useNavigate, useParams } from "react-router-dom";
|
import { Link, useNavigate, useParams } from "react-router-dom";
|
||||||
import { formatDate } from "../../utils/dateUtils";
|
import { formatDate } from "../../utils/dateUtils";
|
||||||
import { useEmployeeProfile } from "../../hooks/useEmployees";
|
import { useEmployeeProfile } from "../../hooks/useEmployees";
|
||||||
import { cacheData, clearCacheKey, getCachedData } from "../../slices/apiDataManager";
|
import {
|
||||||
|
cacheData,
|
||||||
|
clearCacheKey,
|
||||||
|
getCachedData,
|
||||||
|
} from "../../slices/apiDataManager";
|
||||||
import { clearApiCacheKey } from "../../slices/apiCacheSlice";
|
import { clearApiCacheKey } from "../../slices/apiCacheSlice";
|
||||||
|
|
||||||
const mobileNumberRegex = /^[0-9]\d{9}$/;
|
const mobileNumberRegex = /^[0-9]\d{9}$/;
|
||||||
@ -177,7 +181,6 @@ const ManageEmployee = ({ employeeId, onClosed }) => {
|
|||||||
clearCacheKey("allEmployeeList");
|
clearCacheKey("allEmployeeList");
|
||||||
clearCacheKey("allInactiveEmployeeList");
|
clearCacheKey("allInactiveEmployeeList");
|
||||||
clearCacheKey("employeeProfile");
|
clearCacheKey("employeeProfile");
|
||||||
|
|
||||||
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
reset();
|
reset();
|
||||||
@ -238,10 +241,7 @@ const ManageEmployee = ({ employeeId, onClosed }) => {
|
|||||||
{employee ? "Update Employee" : "Create Employee"}
|
{employee ? "Update Employee" : "Create Employee"}
|
||||||
</h6>
|
</h6>
|
||||||
|
|
||||||
<span
|
<span className="cursor-pointer fs-6" onClick={() => onClosed()}>
|
||||||
className="cursor-pointer fs-6"
|
|
||||||
onClick={() => onClosed()}
|
|
||||||
>
|
|
||||||
<i className="bx bx-x"></i>
|
<i className="bx bx-x"></i>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -509,11 +509,13 @@ const ManageEmployee = ({ employeeId, onClosed }) => {
|
|||||||
<option disabled value="">
|
<option disabled value="">
|
||||||
Select Role
|
Select Role
|
||||||
</option>
|
</option>
|
||||||
{job_role?.map((item) => (
|
{[...job_role]
|
||||||
<option value={item?.id} key={item.id}>
|
.sort((a, b) => a.name.localeCompare(b.name))
|
||||||
{item?.name}{" "}
|
.map((item) => (
|
||||||
</option>
|
<option value={item?.id} key={item.id}>
|
||||||
))}
|
{item?.name}{" "}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{errors.jobRoleId && (
|
{errors.jobRoleId && (
|
||||||
|
@ -145,7 +145,15 @@ const Header = () => {
|
|||||||
dispatch(setProjectId(project?.id))
|
dispatch(setProjectId(project?.id))
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{project?.name}
|
{project?.name}{" "}
|
||||||
|
{project?.shortName ? (
|
||||||
|
<span class="text-primary fw-semibold">
|
||||||
|
{" "}
|
||||||
|
({project?.shortName})
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user