successfully master fetched of documentType and documentCategor

This commit is contained in:
pramod mahajan 2025-08-28 15:19:15 +05:30
parent 1c9df57c74
commit d42790628c
4 changed files with 23 additions and 2 deletions

View File

@ -193,6 +193,10 @@ const fetchMasterData = async (masterType) => {
return (await MasterRespository.getPaymentMode()).data;
case "Expense Status":
return (await MasterRespository.getExpenseStatus()).data;
case "Document Type":
return (await MasterRespository.getDocumentTypes()).data;
case "Document Category":
return (await MasterRespository.getDocumentCategories()).data;
case "Status":
return [
{

View File

@ -20,7 +20,14 @@ const MasterTable = ({ data, columns, loading, handleModalData }) => {
"noOfPersonsRequired",
"color",
"displayName",
"permissionIds"
"permissionIds",
"entityTypeId",
"regexExpression",
"isMandatory",
"maxFilesAllowed",
"maxSizeAllowedInMB",
"isValidationRequired",
"documentCategory"
];
const safeData = Array.isArray(data) ? data : [];
@ -80,7 +87,11 @@ const MasterTable = ({ data, columns, loading, handleModalData }) => {
<tr>
<th></th>
<th className="text-start"> {selectedMaster === "Activity" ? "Activity" : "Name"}</th>
<th className="text-start"> {selectedMaster === "Activity" ? "Unit" : "Description"}</th>
<th className="text-start"> {selectedMaster === "Activity"
? "Unit"
: selectedMaster === "Document Type"
? "Content Type"
: "Description"}</th>
<th className={` ${!hasMasterPermission && "d-none"}`}>
Actions
</th>

View File

@ -0,0 +1,2 @@
import { api } from "../utils/axiosClient";

View File

@ -81,4 +81,8 @@ export const MasterRespository = {
createExpenseStatus: (data) => api.post("/api/Master/expenses-status", data),
updateExepnseStatus: (id, data) =>
api.put(`/api/Master/expenses-status/edit/${id}`, data),
getDocumentCategories:()=>api.get("/api/Master/document-category/list"),
getDocumentTypes:()=>api.get("/api/Master/document-type/list")
};