diff --git a/src/components/Expenses/PreviewDocument.jsx b/src/components/Expenses/PreviewDocument.jsx
index 9c0f5c49..7ea0c3ec 100644
--- a/src/components/Expenses/PreviewDocument.jsx
+++ b/src/components/Expenses/PreviewDocument.jsx
@@ -1,27 +1,53 @@
-import { useState } from 'react';
+import { useState } from "react";
const PreviewDocument = ({ imageUrl }) => {
const [loading, setLoading] = useState(true);
+ const [rotation, setRotation] = useState(0);
return (
-
+ <>
+
+ setRotation((prev) => prev + 90)}
+ >
+
+
+
{loading && (
-
- Loading...
-
+
Loading...
)}
-

setLoading(false)}
- />
+
+
+

setLoading(false)}
+ />
+
+
+
+
+
+ >
);
};
diff --git a/src/components/collections/CollectionSkeleton.jsx b/src/components/collections/CollectionSkeleton.jsx
new file mode 100644
index 00000000..82878454
--- /dev/null
+++ b/src/components/collections/CollectionSkeleton.jsx
@@ -0,0 +1,211 @@
+import React from "react";
+
+const SkeletonLine = ({ height = 20, width = "100%", className = "" }) => (
+
+);
+
+export const PaymentHistorySkeleton = ({ count = 2 }) => {
+ return (
+
+ {[...Array(count)].map((_, idx) => (
+
+
+ {/* Top Row: Date + Amount */}
+
+ {/* Date */}
+ {/* Amount */}
+
+
+
+ {/* Transaction ID */}
+
+
+
+
+ {/* Received By (Avatar + Name) */}
+
+ {" "}
+ {/* Avatar */}
+ {/* Name */}
+
+
+
+
+ ))}
+
+ );
+};
+
+export const CollectionDetailsSkeleton = () => {
+ return (
+
+ {/* Title */}
+
+
+ {/* Header Row */}
+
+
+ {/* Project */}
+
+
+ {/* Invoice & E-Invoice */}
+
+
+ {/* Invoice Date & Client Submitted */}
+
+
+ {/* Expected Payment & Mark as Completed */}
+
+
+ {/* Basic & Tax Amount */}
+
+
+ {/* Balance & Created At */}
+
+
+ {/* Created By */}
+
+
+ {/* Description */}
+
+
+ {/* Attachments */}
+
+
+ {[...Array(3)].map((_, idx) => (
+
+ ))}
+
+
+
+ {/* Tabs */}
+
+
+ {/* Tab Content (Comments / Payments) */}
+
+
+ );
+};
+
+export const CollectionTableSkeleton = () => {
+ const columnCount = 8;
+
+ return (
+
+
+
+
+
+
+ {[...Array(columnCount - 1)].map((_, i) => (
+ |
+
+ |
+ ))}
+
+
+ |
+
+
+
+ {[...Array(8)].map((_, rowIdx) => (
+
+ {[...Array(columnCount - 1)].map((_, colIdx) => (
+ |
+
+ |
+ ))}
+
+
+ |
+
+ ))}
+
+
+
+ {/* Pagination Skeleton */}
+
+
+
+
+
+
+ );
+};
diff --git a/src/components/master/MasterModal.jsx b/src/components/master/MasterModal.jsx
index 44d2af60..0eab1b08 100644
--- a/src/components/master/MasterModal.jsx
+++ b/src/components/master/MasterModal.jsx
@@ -16,6 +16,7 @@ import ManageDocumentCategory from "./ManageDocumentCategory";
import ManageDocumentType from "./ManageDocumentType";
import ManageServices from "./Services/ManageServices";
import ServiceGroups from "./Services/ServicesGroups";
+import ManagePaymentHead from "./paymentAdjustmentHead/ManagePaymentHead";
const MasterModal = ({ modaldata, closeModal }) => {
if (!modaldata?.modalType || modaldata.modalType === "delete") {
@@ -67,6 +68,8 @@ const MasterModal = ({ modaldata, closeModal }) => {
"Manage-Services": (
),
+ "Payment Adjustment Head": ,
+ "Edit-Payment Adjustment Head":
};
return (
diff --git a/src/components/master/paymentAdjustmentHead/ManagePaymentHead.jsx b/src/components/master/paymentAdjustmentHead/ManagePaymentHead.jsx
new file mode 100644
index 00000000..1afba4ab
--- /dev/null
+++ b/src/components/master/paymentAdjustmentHead/ManagePaymentHead.jsx
@@ -0,0 +1,107 @@
+import React, { useEffect } from "react";
+import { z } from "zod";
+import { useForm } from "react-hook-form";
+import { zodResolver } from "@hookform/resolvers/zod";
+import Label from "../../common/Label";
+import { useCreatePaymentAjustmentHead, useUpdatePaymentAjustmentHead } from "../../../hooks/masterHook/useMaster";
+
+export const simpleFormSchema = z.object({
+ name: z.string().min(1, "Name is required"),
+ description: z.string().min(1, "Description is required"),
+});
+
+const ManagePaymentHead = ({ data, onClose }) => {
+ const {
+ register,
+ handleSubmit,
+ reset,
+ formState: { errors },
+ } = useForm({
+ resolver: zodResolver(simpleFormSchema),
+ defaultValues: {
+ name: "",
+ description: "",
+ },
+ });
+
+ const {mutate:CreateAjustmentHead,isPending} = useCreatePaymentAjustmentHead(()=>{
+ handleClose?.()
+ });
+ const {mutate:UpdateAjustmentHead,isPending:isUpdating} = useUpdatePaymentAjustmentHead(()=>{
+ handleClose?.()
+ })
+ const onSubmit = (formData) => {
+ if(data){
+ let id = data?.id;
+ const payload = {
+ ...formData,
+ id:id,
+ }
+ UpdateAjustmentHead({id:id,payload:payload})
+ }else{
+ let payload={
+ ...formData
+ }
+ CreateAjustmentHead(payload)
+ }
+ };
+
+ useEffect(() => {
+ if (data) {
+ reset({
+ name: data.name,
+ description: data.description,
+ });
+ }
+ }, [data]);
+ const handleClose = () => {
+ reset();
+ onClose();
+ };
+ return (
+
+ );
+};
+
+export default ManagePaymentHead;
diff --git a/src/hooks/masterHook/useMaster.js b/src/hooks/masterHook/useMaster.js
index 5b31f79a..cdcdb685 100644
--- a/src/hooks/masterHook/useMaster.js
+++ b/src/hooks/masterHook/useMaster.js
@@ -10,6 +10,14 @@ import {
} from "@tanstack/react-query";
import showToast from "../../services/toastService";
+export const usePaymentAjustmentHead = (isActive) => {
+ return useQuery({
+ queryKey: ["paymentType", isActive],
+ queryFn: async () =>
+ await MasterRespository.getPaymentAdjustmentHead(isActive),
+ });
+};
+
export const useServices = () => {
return useQuery({
queryKey: ["services"],
@@ -28,9 +36,8 @@ export const useActivitiesByGroups = (groupId) => {
return useQuery({
queryKey: ["activties", groupId],
queryFn: async () => await MasterRespository.getActivitesByGroup(groupId),
-
+
enabled: !!groupId,
-
});
};
export const useGlobalServices = () => {
@@ -296,6 +303,8 @@ const fetchMasterData = async (masterType) => {
return (await MasterRespository.getDocumentTypes()).data;
case "Document Category":
return (await MasterRespository.getDocumentCategories()).data;
+ case "Payment Adjustment Head":
+ return (await MasterRespository.getPaymentAdjustmentHead(true)).data;
case "Status":
return [
{
@@ -448,8 +457,6 @@ export const useUpdateApplicationRole = (onSuccessCallback) => {
});
};
-
-
//-----Create work Category-------------------------------
export const useCreateWorkCategory = (onSuccessCallback) => {
const queryClient = useQueryClient();
@@ -719,7 +726,12 @@ export const useCreateService = (onSuccessCallback) => {
},
onError: (error) => {
debugger;
- showToast( error?.response?.data?.message || error?.message || "Something went wrong", "error");
+ showToast(
+ error?.response?.data?.message ||
+ error?.message ||
+ "Something went wrong",
+ "error"
+ );
},
});
};
@@ -742,7 +754,12 @@ export const useUpdateService = (onSuccessCallback) => {
if (onSuccessCallback) onSuccessCallback(data);
},
onError: (error) => {
- showToast(error?.response?.data?.message || error?.message || "Something went wrong", "error");
+ showToast(
+ error?.response?.data?.message ||
+ error?.message ||
+ "Something went wrong",
+ "error"
+ );
},
});
};
@@ -759,16 +776,23 @@ export const useCreateActivityGroup = (onSuccessCallback) => {
queryClient.invalidateQueries({
queryKey: ["groups"],
});
- debugger
- showToast( data?.message ||
- data?.response?.data?.message || "Activity Group created successfully.",
+ debugger;
+ showToast(
+ data?.message ||
+ data?.response?.data?.message ||
+ "Activity Group created successfully.",
"success"
);
if (onSuccessCallback) onSuccessCallback(data);
},
onError: (error) => {
- showToast(error?.response?.data?.message || error?.message || "Something went wrong", "error");
+ showToast(
+ error?.response?.data?.message ||
+ error?.message ||
+ "Something went wrong",
+ "error"
+ );
},
});
};
@@ -776,8 +800,8 @@ export const useUpdateActivityGroup = (onSuccessCallback) => {
const queryClient = useQueryClient();
return useMutation({
- mutationFn: async ({id,payload}) => {
- const response = await MasterRespository.updateActivityGrop(id,payload);
+ mutationFn: async ({ id, payload }) => {
+ const response = await MasterRespository.updateActivityGrop(id, payload);
return response;
},
onSuccess: (data, variables) => {
@@ -787,7 +811,8 @@ export const useUpdateActivityGroup = (onSuccessCallback) => {
showToast(
data?.message ||
- data?.response?.data?.message|| "Activity Group Updated successfully.",
+ data?.response?.data?.message ||
+ "Activity Group Updated successfully.",
"success"
);
@@ -813,7 +838,12 @@ export const useCreateActivity = (onSuccessCallback) => {
if (onSuccessCallback) onSuccessCallback(data);
},
onError: (error) => {
- showToast(error?.response?.data?.message || error?.message || "Something went wrong", "error");
+ showToast(
+ error?.response?.data?.message ||
+ error?.message ||
+ "Something went wrong",
+ "error"
+ );
},
});
};
@@ -835,7 +865,12 @@ export const useUpdateActivity = (onSuccessCallback) => {
if (onSuccessCallback) onSuccessCallback(data);
},
onError: (error) => {
- showToast(error?.response?.data?.message || error?.message || "Something went wrong", "error");
+ showToast(
+ error?.response?.data?.message ||
+ error?.message ||
+ "Something went wrong",
+ "error"
+ );
},
});
};
@@ -969,6 +1004,52 @@ export const useUpdateDocumentType = (onSuccessCallback) => {
},
});
};
+
+// ==============================Payment Adjustment Head =============================
+export const useCreatePaymentAjustmentHead = (onSuccessCallback) => {
+ const queryClient = useQueryClient();
+
+ return useMutation({
+ mutationFn: async (payload) => {
+ const resp = await MasterRespository.createPaymentAjustmentHead(payload);
+ return resp.data;
+ },
+ onSuccess: (data) => {
+ queryClient.invalidateQueries({
+ queryKey: ["masterData", "Payment Adjustment Head"],
+ });
+ showToast("Payment Ajustment Head successfully", "success");
+ if (onSuccessCallback) onSuccessCallback(data);
+ },
+ onError: (error) => {
+ showToast(error.message || "Something went wrong", "error");
+ },
+ });
+};
+export const useUpdatePaymentAjustmentHead = (onSuccessCallback) => {
+ const queryClient = useQueryClient();
+
+ return useMutation({
+ mutationFn: async ({ id, payload }) => {
+ const resp = await MasterRespository.updatePaymentAjustmentHead(
+ id,
+ payload
+ );
+ return resp.data;
+ },
+ onSuccess: (data) => {
+ queryClient.invalidateQueries({
+ queryKey: ["masterData", "Payment Adjustment Head"],
+ });
+ showToast("Payment Ajustment Head Updated successfully", "success");
+ if (onSuccessCallback) onSuccessCallback(data);
+ },
+ onError: (error) => {
+ showToast(error.message || "Something went wrong", "error");
+ },
+ });
+};
+// ====================x=x====================x=x==================================
// -Delete Master --------
export const useDeleteMasterItem = () => {
const queryClient = useQueryClient();
@@ -1002,14 +1083,12 @@ export const useDeleteMasterItem = () => {
});
};
-
-export const useDeleteServiceGroup =()=>{
- const queryClient = useQueryClient();
+export const useDeleteServiceGroup = () => {
+ const queryClient = useQueryClient();
return useMutation({
- mutationFn: async (id)=>await MasterRespository.deleteActivityGroup(id),
- onSuccess: ({_,variable}) => {
-
+ mutationFn: async (id) => await MasterRespository.deleteActivityGroup(id),
+ onSuccess: ({ _, variable }) => {
queryClient.invalidateQueries({ queryKey: ["groups"] });
showToast(`Group deleted successfully.`, "success");
@@ -1023,15 +1102,13 @@ export const useDeleteServiceGroup =()=>{
showToast(message, "error");
},
});
-}
-export const useDeleteActivity =()=>{
- const queryClient = useQueryClient();
+};
+export const useDeleteActivity = () => {
+ const queryClient = useQueryClient();
return useMutation({
- mutationFn: async (id)=>await MasterRespository.deleteActivity(id),
- onSuccess: ({_,variable}) => {
-
-
+ mutationFn: async (id) => await MasterRespository.deleteActivity(id),
+ onSuccess: ({ _, variable }) => {
queryClient.invalidateQueries({ queryKey: ["activties"] });
showToast(`Acivity deleted successfully.`, "success");
@@ -1045,4 +1122,4 @@ export const useDeleteActivity =()=>{
showToast(message, "error");
},
});
-}
+};
diff --git a/src/hooks/useCollections.jsx b/src/hooks/useCollections.jsx
new file mode 100644
index 00000000..c300462d
--- /dev/null
+++ b/src/hooks/useCollections.jsx
@@ -0,0 +1,152 @@
+import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
+import { CollectionRepository } from "../repositories/ColllectionRepository";
+import showToast from "../services/toastService";
+
+export const useCollections = (
+ pageSize,
+ pageNumber,
+ fromDate,
+ toDate,
+ isPending,
+ isActive,
+ projectId,
+ searchString
+) => {
+ return useQuery({
+ queryKey: [
+ "collections",
+ pageSize,
+ pageNumber,
+ fromDate,
+ toDate,
+ isPending,
+ isActive,
+ projectId,
+ searchString,
+ ],
+
+ queryFn: async () => {
+ const response = await CollectionRepository.getCollections(
+ pageSize,
+ pageNumber,
+ fromDate,
+ toDate,
+ isPending,
+ isActive,
+ projectId,
+ searchString
+ );
+ return response.data;
+ },
+
+ keepPreviousData: true,
+ staleTime: 1000 * 60 * 1,
+ });
+};
+
+
+export const useCollection =(collectionId)=>{
+ return useQuery({
+ queryKey:["collection",collectionId],
+ queryFn:async()=> {
+ const resp = await CollectionRepository.getCollection(collectionId);
+ return resp.data
+ },
+ enabled:!!collectionId
+ })
+}
+
+
+// =========================Mutation======================
+
+export const useCreateCollection = (onSuccessCallBack) => {
+ const clinent = useQueryClient();
+ return useMutation({
+ mutationFn: async (payload) =>
+ await CollectionRepository.createNewCollection(payload),
+ onSuccess: (_, variables) => {
+ showToast("New Collection created Successfully", "success");
+ clinent.invalidateQueries({ queryKey: ["collections"] });
+ if (onSuccessCallBack) onSuccessCallBack();
+ },
+ onError: (error) => {
+ showToast(
+ error.response.data.message || error.message || "Something Went wrong"
+ );
+ },
+ });
+};
+
+export const useMarkedPaymentReceived = (onSuccessCallBack) => {
+ const client = useQueryClient();
+ return useMutation({
+ mutationFn: async (payload) =>
+ await CollectionRepository.markPaymentReceived(payload),
+ onSuccess: async () => {
+ client.invalidateQueries({ queryKey: ["collections"] });
+ showToast("Payment Received marked Successfully", "success");
+ if (onSuccessCallBack) onSuccessCallBack();
+ },
+ onError: (error) => {
+ showToast(
+ error.response.data.message || error.message || "Something Went wrong"
+ );
+ },
+ });
+};
+
+export const useAddPayment = (onSuccessCallBack) => {
+ const client = useQueryClient();
+
+ return useMutation({
+ mutationFn: (payload) => CollectionRepository.makeReceivePayment(payload),
+ onSuccess: () => {
+ client.invalidateQueries({ queryKey: ["collections"] });
+ client.invalidateQueries({ queryKey: ["collection"] });
+ showToast("Payment Received marked Successfully", "success");
+ if (onSuccessCallBack) onSuccessCallBack();
+ },
+ onError: (error) => {
+ showToast(
+ error?.response?.data?.message || error.message || "Something Went wrong"
+ );
+ },
+ });
+};
+
+export const useAddComment = (onSuccessCallBack) => {
+ const client = useQueryClient();
+
+ return useMutation({
+ mutationFn: (payload) => CollectionRepository.addComment(payload),
+ onSuccess: () => {
+ client.invalidateQueries({ queryKey: ["collections"] });
+ client.invalidateQueries({ queryKey: ["collection"] });
+ showToast("Comment Successfully", "success");
+ if (onSuccessCallBack) onSuccessCallBack();
+ },
+ onError: (error) => {
+ showToast(
+ error?.response?.data?.message || error.message || "Something Went wrong"
+ );
+ },
+ });
+};
+
+export const useUpdateCollection =(onSuccessCallBack)=>{
+ const client = useQueryClient();
+ return useMutation({
+ mutationFn:async({collectionId,payload})=> await CollectionRepository.updateCollection(collectionId,payload),
+ onSuccess: () => {
+ client.invalidateQueries({ queryKey: ["collections"] });
+ client.invalidateQueries({ queryKey: ["collection"] });
+ showToast("Collection Updated Successfully", "success");
+ if (onSuccessCallBack) onSuccessCallBack();
+ },
+ onError: (error) => {
+ showToast(
+ error?.response?.data?.message || error.message || "Something Went wrong"
+ );
+ },
+ })
+}
\ No newline at end of file
diff --git a/src/pages/collections/CollectionPage.jsx b/src/pages/collections/CollectionPage.jsx
index 7617d40a..aac80d26 100644
--- a/src/pages/collections/CollectionPage.jsx
+++ b/src/pages/collections/CollectionPage.jsx
@@ -220,4 +220,4 @@ if (!isAdmin && !canAddPayment && !canEditCollection && !canViewCollection && !c
);
};
-export default CollectionPage;
\ No newline at end of file
+export default CollectionPage;
diff --git a/src/repositories/ColllectionRepository.jsx b/src/repositories/ColllectionRepository.jsx
new file mode 100644
index 00000000..8eb512da
--- /dev/null
+++ b/src/repositories/ColllectionRepository.jsx
@@ -0,0 +1,29 @@
+import { api } from "../utils/axiosClient";
+import { DirectoryRepository } from "./DirectoryRepository";
+
+export const CollectionRepository = {
+ createNewCollection: (data) =>
+ api.post(`/api/Collection/invoice/create`, data),
+ updateCollection:(id,data)=>{
+ api.put(`/api/Collection/invoice/edit/${id}`,data)
+ },
+ getCollections: (pageSize, pageNumber,fromDate,toDate, isPending,isActive,projectId, searchString) => {
+ let url = `/api/Collection/invoice/list?pageSize=${pageSize}&pageNumber=${pageNumber}&isPending=${isPending}&isActive=${isActive}&searchString=${searchString}`;
+
+ const params = [];
+ if (fromDate) params.push(`fromDate=${fromDate}`);
+ if (toDate) params.push(`toDate=${toDate}`);
+ if(projectId) params.push(`projectId=${projectId}`)
+
+ if (params.length > 0) {
+ url += `&${params.join("&")}`;
+ }
+ return api.get(url);
+ },
+
+ makeReceivePayment:(data)=> api.post(`/api/Collection/invoice/payment/received`,data),
+ markPaymentReceived:(invoiceId)=>api.put(`/api/Collection/invoice/marked/completed/${invoiceId}`),
+ getCollection:(id)=>api.get(`/api/Collection/invoice/details/${id}`),
+ addComment:(data)=>api.post(`/api/Collection/invoice/add/comment`,data)
+};
+
diff --git a/src/repositories/MastersRepository.jsx b/src/repositories/MastersRepository.jsx
index 3e9fac8f..efd8764b 100644
--- a/src/repositories/MastersRepository.jsx
+++ b/src/repositories/MastersRepository.jsx
@@ -58,6 +58,11 @@ export const MasterRespository = {
"Document Type": (id) => api.delete(`/api/Master/document-type/delete/${id}`),
"Document Category": (id) =>
api.delete(`/api/Master/document-category/delete/${id}`),
+ "Payment Adjustment Head": (id, isActive) =>
+ api.delete(
+ `/api/Master/payment-adjustment-head/delete/${id}`,
+ (isActive = false)
+ ),
getWorkCategory: () => api.get(`/api/master/work-categories`),
createWorkCategory: (data) => api.post(`/api/master/work-category`, data),
@@ -124,10 +129,16 @@ export const MasterRespository = {
api.put(`/api/Master/activity-group/edit/${serviceId}`, data),
getActivitesByGroup: (activityGroupId) =>
api.get(`api/master/activities?activityGroupId=${activityGroupId}`),
- deleteActivityGroup:(id)=>api.delete(`/api/Master/activity-group/delete/${id}`),
+ deleteActivityGroup: (id) =>
+ api.delete(`/api/Master/activity-group/delete/${id}`),
-
- deleteActivity:(id)=>api.delete(`/api/Master/activity/delete/${id}`),
+ deleteActivity: (id) => api.delete(`/api/Master/activity/delete/${id}`),
getOrganizationType: () => api.get("/api/Master/organization-type/list"),
+ getPaymentAdjustmentHead: (isActive) =>
+ api.get(`/api/Master/payment-adjustment-head/list?isActive=${isActive}`),
+ createPaymentAjustmentHead: (data) =>
+ api.post(`/api/Master/payment-adjustment-head`, data),
+ updatePaymentAjustmentHead: (id, data) =>
+ api.put(`/api/Master/payment-adjustment-head/edit/${id}`, data),
};
diff --git a/src/utils/appUtils.js b/src/utils/appUtils.js
index 69437dc1..5093522d 100644
--- a/src/utils/appUtils.js
+++ b/src/utils/appUtils.js
@@ -107,3 +107,31 @@ export const formatCurrency = (amount, currency = "INR", locale = "en-US") => {
export const countDigit = (num) => {
return Math.abs(num).toString().length;
};
+export const formatFigure = (
+ amount,
+ {
+ type = "number",
+ currency = "INR",
+ locale = "en-US",
+ notation = "standard", // standard or compact
+ compactDisplay = "short",
+ minimumFractionDigits = 0,
+ maximumFractionDigits = 2,
+ } = {}
+) => {
+ if (amount == null || isNaN(amount)) return "-";
+
+ const formatterOptions = {
+ style: type === "currency" ? "currency" : type === "percent" ? "percent" : "decimal",
+ notation: notation,
+ compactDisplay,
+ minimumFractionDigits,
+ maximumFractionDigits,
+ };
+
+ if (type === "currency") {
+ formatterOptions.currency = currency;
+ }
+
+ return new Intl.NumberFormat(locale, formatterOptions).format(amount);
+};
\ No newline at end of file
diff --git a/src/utils/constants.jsx b/src/utils/constants.jsx
index 7ddccf56..5a1f816d 100644
--- a/src/utils/constants.jsx
+++ b/src/utils/constants.jsx
@@ -1,12 +1,13 @@
+export const BASE_URL = process.env.VITE_BASE_URL;
+
+// export const BASE_URL = "https://api.marcoaiot.com";
+
+
export const THRESH_HOLD = 48; // hours
export const DURATION_TIME = 10; // minutes
export const ITEMS_PER_PAGE = 20;
export const OTP_EXPIRY_SECONDS = 300; // OTP time
-export const BASE_URL = process.env.VITE_BASE_URL;
-
-// export const BASE_URL = "https://api.marcoaiot.com";
-
export const MANAGE_MASTER = "588a8824-f924-4955-82d8-fc51956cf323";
export const VIEW_MASTER = "5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d";
@@ -49,7 +50,7 @@ export const DIRECTORY_ADMIN = "4286a13b-bb40-4879-8c6d-18e9e393beda";
export const DIRECTORY_MANAGER = "62668630-13ce-4f52-a0f0-db38af2230c5";
export const DIRECTORY_USER = "0f919170-92d4-4337-abd3-49b66fc871bb";
-// ========================Finance=========================================================
+
// -----------------------Expense----------------------------------------
export const VIEW_SELF_EXPENSE = "385be49f-8fde-440e-bdbc-3dffeb8dd116";
@@ -65,6 +66,15 @@ export const PROCESS_EXPENSE = "ea5a1529-4ee8-4828-80ea-0e23c9d4dd11";
export const EXPENSE_MANAGE = "ea5a1529-4ee8-4828-80ea-0e23c9d4dd11";
+export const EXPENSE_REJECTEDBY = [
+ "d1ee5eec-24b6-4364-8673-a8f859c60729",
+ "965eda62-7907-4963-b4a1-657fb0b2724b",
+];
+
+
+
+export const EXPENSE_DRAFT = "297e0d8f-f668-41b5-bfea-e03b354251c8";
+
// --------------------------------Collection----------------------------
export const ADMIN_COLLECTION = "dbf17591-09fe-4c93-9e1a-12db8f5cc5de";
@@ -73,15 +83,6 @@ export const CREATE_COLLECTION = "b93141fd-dbd3-4051-8f57-bf25d18e3555";
export const EDIT_COLLECTION = "455187b4-fef1-41f9-b3d0-025d0b6302c3";
export const ADDPAYMENT_COLLECTION = "061d9ccd-85b4-4cb0-be06-2f9f32cebb72";
-// ==========================================================================================
-
-export const EXPENSE_REJECTEDBY = [
- "d1ee5eec-24b6-4364-8673-a8f859c60729",
- "965eda62-7907-4963-b4a1-657fb0b2724b",
-];
-
-export const EXPENSE_DRAFT = "297e0d8f-f668-41b5-bfea-e03b354251c8";
-
// ----------------------------Tenant-------------------------
export const SUPPER_TENANT = "d032cb1a-3f30-462c-bef0-7ace73a71c0b";
export const MANAGE_TENANTS = "00e20637-ce8d-4417-bec4-9b31b5e65092";
@@ -154,4 +155,25 @@ export const PROJECT_STATUS = [
label: "Completed",
},
];
-export const DEFAULT_EMPTY_STATUS_ID = "00000000-0000-0000-0000-000000000000";
\ No newline at end of file
+
+
+export const EXPENSE_STATUS = {
+ daft:"297e0d8f-f668-41b5-bfea-e03b354251c8",
+ review_pending:"6537018f-f4e9-4cb3-a210-6c3b2da999d7",
+ payment_pending:"f18c5cfd-7815-4341-8da2-2c2d65778e27",
+ approve_pending:"4068007f-c92f-4f37-a907-bc15fe57d4d8",
+
+}
+
+export const UUID_REGEX =
+ /^\/employee\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
+
+export const ALLOW_PROJECTSTATUS_ID = [
+ "603e994b-a27f-4e5d-a251-f3d69b0498ba",
+ "cdad86aa-8a56-4ff4-b633-9c629057dfef",
+ "b74da4c2-d07e-46f2-9919-e75e49b12731",
+];
+
+export const DEFAULT_EMPTY_STATUS_ID = "00000000-0000-0000-0000-000000000000";
+
+