Changed 'Role' to 'Application Role'

This commit is contained in:
Pramod Mahajan 2025-04-15 01:08:59 +05:30
parent 57272eb894
commit d1c36dfd97
7 changed files with 14 additions and 12 deletions

View File

@ -61,8 +61,8 @@ const onSubmit = (values) => {
const cachedData = getCachedData( "Role" );
const updatedData = [...cachedData, resp.data];
cacheData("Role", updatedData);
showToast("Role Added successfully.", "success");
cacheData("Application Role", updatedData);
showToast("Application Role Added successfully.", "success");
onClose()
} ).catch( ( err ) =>
{

View File

@ -101,7 +101,7 @@ const EditMaster=({master,onClose})=> {
setIsLoading( false )
const cachedData = getCachedData("Role");
const cachedData = getCachedData("Application Role");
if (cachedData) {
@ -109,9 +109,9 @@ const EditMaster=({master,onClose})=> {
role.id === resp.data?.id ? { ...role, ...resp.data } : role
);
cacheData("Role", updatedData);
cacheData("Application Role", updatedData);
}
showToast( "Role Update successfully.", "success" );
showToast( "Application Role Updated successfully.", "success" );
setIsLoading(false)
onClose()
}).catch((Err)=>{

View File

@ -33,13 +33,13 @@ const MasterModal = ({ modaldata, closeModal }) => {
onClick={closeModal}
></button>
<div className="text-center mb-2"></div>
{modaldata?.modalType === "Role" && (
{modaldata?.modalType === "Application Role" && (
<CreateRole
masmodalType={modaldata.masterType}
onClose={closeModal}
/>
)}
{modaldata?.modalType === "Edit-Role" && (
{modaldata?.modalType === "Edit-Application Role" && (
<EditRole master={modaldata} onClose={closeModal} />
)}
{modaldata?.modalType === "delete" && (

View File

@ -1,4 +1,6 @@
export const mastersList = [{id:1, name: "Role"},{id:2, name: "Job Role"},{id:3,name:"Activity"}]
// it important ------
export const mastersList = [ {id: 1, name: "Application Role"}, {id: 2, name: "Job Role"}, {id: 3, name: "Activity"} ]
// -------------------
export const dailyTask = [
{

View File

@ -35,7 +35,7 @@ const useMaster = () => {
} else {
let response;
switch (selectedMaster) {
case "Role":
case "Application Role":
response = await MasterRespository.getRoles();
response = response.data;
break;

View File

@ -28,7 +28,7 @@ const MasterTable = ( {data, columns, loading, handleModalData} ) =>
.map((col) => ({
...col,
label:
col.key === "role" || col.key === "Activity" || col.key === "status" ? "Name" : col.label,
col.key === "role" || col.key === "activityName" || col.key === "status" ? "Name" : col.label,
}));
return (
@ -45,7 +45,7 @@ const MasterTable = ( {data, columns, loading, handleModalData} ) =>
<thead>
<tr>
<th></th>
<th>{ selectedMaster} Name</th>
<th> Name</th>
<th>{selectedMaster} {selectedMaster === "Activity" ? "Unit":"Description" }</th>
<th className={` ${!hasMasterPermission && 'd-none'}`}>Actions</th>
</tr>

View File

@ -3,7 +3,7 @@ import { createSlice } from "@reduxjs/toolkit";
const localVariablesSlice = createSlice({
name: "localVariables",
initialState: {
selectedMaster:"Role",
selectedMaster:"Application Role",
regularizationCount:0,
projectId:1,