successfully master fetched of documentType and documentCategor
This commit is contained in:
parent
1c9df57c74
commit
d42790628c
@ -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 [
|
||||
{
|
||||
|
@ -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>
|
||||
|
2
src/repositories/DocumentRepository.jsx
Normal file
2
src/repositories/DocumentRepository.jsx
Normal file
@ -0,0 +1,2 @@
|
||||
import { api } from "../utils/axiosClient";
|
||||
|
@ -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")
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user