diff --git a/index.html b/index.html index 0ac2d657..6c752530 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ - Marco PMS + OnFieldWork.com diff --git a/public/img/app/dashboard-light-09.png b/public/img/app/dashboard-light-09.png new file mode 100644 index 00000000..316a52e8 Binary files /dev/null and b/public/img/app/dashboard-light-09.png differ diff --git a/public/img/icons/diamond-info - Copy.svg b/public/img/icons/diamond-info - Copy.svg new file mode 100644 index 00000000..5f24f9ef --- /dev/null +++ b/public/img/icons/diamond-info - Copy.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/img/icons/google-play-icon.png b/public/img/icons/google-play-icon.png index 117bcb16..1365ff35 100644 Binary files a/public/img/icons/google-play-icon.png and b/public/img/icons/google-play-icon.png differ diff --git a/src/components/Directory/CardViewContact.jsx b/src/components/Directory/CardViewContact.jsx index 8e6c8068..0b446da0 100644 --- a/src/components/Directory/CardViewContact.jsx +++ b/src/components/Directory/CardViewContact.jsx @@ -61,7 +61,7 @@ const CardViewContact = ({ (contact?.name || "").trim().split(" ")[1]?.charAt(0) || "" } />{" "} - {contact?.name} + {contact?.name}
{IsActive && ( diff --git a/src/components/Directory/NoteCardDirectoryEditable.jsx b/src/components/Directory/NoteCardDirectoryEditable.jsx index 5ef8d08f..bc6ff517 100644 --- a/src/components/Directory/NoteCardDirectoryEditable.jsx +++ b/src/components/Directory/NoteCardDirectoryEditable.jsx @@ -87,7 +87,7 @@ const NoteCardDirectoryEditable = ({ />
contactProfile(noteItem.contactId)} > @@ -98,7 +98,7 @@ const NoteCardDirectoryEditable = ({
-
+
by{" "} @@ -184,7 +184,7 @@ const NoteCardDirectoryEditable = ({ ) : (
)} diff --git a/src/components/Documents/DocumentFilterPanel.jsx b/src/components/Documents/DocumentFilterPanel.jsx index edc613e1..04f54956 100644 --- a/src/components/Documents/DocumentFilterPanel.jsx +++ b/src/components/Documents/DocumentFilterPanel.jsx @@ -13,230 +13,236 @@ import { useParams } from "react-router-dom"; const DocumentFilterPanel = forwardRef( ({ entityTypeId, onApply, setFilterdata }, ref) => { - const [resetKey, setResetKey] = useState(0); - const { status } = useParams(); + const [resetKey, setResetKey] = useState(0); + const { status } = useParams(); - const { data, isError, isLoading, error } = - useDocumentFilterEntities(entityTypeId); + const { data, isError, isLoading, error } = + useDocumentFilterEntities(entityTypeId); - //changes + useEffect(() => { + return () => { + closePanel(); + }; + }, []); - const dynamicDocumentFilterDefaultValues = useMemo(() => { - return { - ...DocumentFilterDefaultValues, - uploadedByIds: DocumentFilterDefaultValues.uploadedByIds || [], - documentCategoryIds: DocumentFilterDefaultValues.documentCategoryIds || [], - documentTypeIds: DocumentFilterDefaultValues.documentTypeIds || [], - documentTagIds: DocumentFilterDefaultValues.documentTagIds || [], - startDate: DocumentFilterDefaultValues.startDate, - endDate: DocumentFilterDefaultValues.endDate, + //changes + + const dynamicDocumentFilterDefaultValues = useMemo(() => { + return { + ...DocumentFilterDefaultValues, + uploadedByIds: DocumentFilterDefaultValues.uploadedByIds || [], + documentCategoryIds: DocumentFilterDefaultValues.documentCategoryIds || [], + documentTypeIds: DocumentFilterDefaultValues.documentTypeIds || [], + documentTagIds: DocumentFilterDefaultValues.documentTagIds || [], + startDate: DocumentFilterDefaultValues.startDate, + endDate: DocumentFilterDefaultValues.endDate, + }; + + }, [status]); + + const methods = useForm({ + resolver: zodResolver(DocumentFilterSchema), + defaultValues: dynamicDocumentFilterDefaultValues, + }); + + const { handleSubmit, reset, setValue, watch } = methods; + + // Watch values from form + const isUploadedAt = watch("isUploadedAt"); + const isVerified = watch("isVerified"); + + // Close the offcanvas (bootstrap specific) + const closePanel = () => { + document.querySelector(".offcanvas.show .btn-close")?.click(); }; - }, [status]); + useImperativeHandle(ref, () => ({ + resetFieldValue: (name, value) => { + if (value !== undefined) { + setValue(name, value); + } else { + reset({ ...methods.getValues(), [name]: DocumentFilterDefaultValues[name] }); + } + }, + getValues: methods.getValues, // optional, to read current filter state + })); - const methods = useForm({ - resolver: zodResolver(DocumentFilterSchema), - defaultValues: dynamicDocumentFilterDefaultValues, - }); - - const { handleSubmit, reset, setValue, watch } = methods; - - // Watch values from form - const isUploadedAt = watch("isUploadedAt"); - const isVerified = watch("isVerified"); - - // Close the offcanvas (bootstrap specific) - const closePanel = () => { - document.querySelector(".offcanvas.show .btn-close")?.click(); - }; - - useImperativeHandle(ref, () => ({ - resetFieldValue: (name, value) => { - if (value !== undefined) { - setValue(name, value); - } else { - reset({ ...methods.getValues(), [name]: DocumentFilterDefaultValues[name] }); + //changes + useEffect(() => { + if (data && setFilterdata) { + setFilterdata(data); } - }, - getValues: methods.getValues, // optional, to read current filter state - })); + }, [data, setFilterdata]); - //changes - useEffect(() => { - if (data && setFilterdata) { - setFilterdata(data); - } - }, [data, setFilterdata]); + const onSubmit = (values) => { + onApply({ + ...values, + startDate: values.startDate + ? moment.utc(values.startDate, "DD-MM-YYYY").toISOString() + : null, + endDate: values.endDate + ? moment.utc(values.endDate, "DD-MM-YYYY").toISOString() + : null, + }); + // closePanel(); + }; - const onSubmit = (values) => { - onApply({ - ...values, - startDate: values.startDate - ? moment.utc(values.startDate, "DD-MM-YYYY").toISOString() - : null, - endDate: values.endDate - ? moment.utc(values.endDate, "DD-MM-YYYY").toISOString() - : null, - }); - // closePanel(); - }; + const onClear = () => { + reset(DocumentFilterDefaultValues); + setResetKey((prev) => prev + 1); + onApply(DocumentFilterDefaultValues); + // closePanel(); + }; - const onClear = () => { - reset(DocumentFilterDefaultValues); - setResetKey((prev) => prev + 1); - onApply(DocumentFilterDefaultValues); - // closePanel(); - }; + if (isLoading) return
Loading...
; + if (isError) + return
Error: {error?.message || "Something went wrong!"}
; - if (isLoading) return
Loading...
; - if (isError) - return
Error: {error?.message || "Something went wrong!"}
; - - const { - uploadedBy = [], - documentCategory = [], - documentType = [], - documentTag = [], - } = data?.data || {}; + const { + uploadedBy = [], + documentCategory = [], + documentType = [], + documentTag = [], + } = data?.data || {}; - return ( - -
- {/* Date Range Section */} -
-
- -
- - + return ( + + + {/* Date Range Section */} +
+
+ +
+ + +
+
+ + +
+ + {/* Dropdown Filters */} +
+ + + + +
+ + {/* Status Filter */} +
+ +
+ + + + +
- -
- - {/* Dropdown Filters */} -
- - - - -
- - {/* Status Filter */} -
- -
- - - - - + {/* Footer Buttons */} +
+ +
-
- - {/* Footer Buttons */} -
- - -
- - - ); -}); + + + ); + }); export default DocumentFilterPanel; diff --git a/src/components/Documents/DocumentVersionList.jsx b/src/components/Documents/DocumentVersionList.jsx index ea1bdc13..9061c52c 100644 --- a/src/components/Documents/DocumentVersionList.jsx +++ b/src/components/Documents/DocumentVersionList.jsx @@ -74,7 +74,7 @@ const DocumentVersionList = ({ firstName={currentDoc.uploadedBy?.firstName} lastName={currentDoc.uploadedBy?.lastName} /> - + {`${currentDoc.uploadedBy?.firstName ?? ""} ${currentDoc.uploadedBy?.lastName ?? ""}`.trim() || "N/A"} @@ -196,7 +196,7 @@ const DocumentVersionList = ({ firstName={document.uploadedBy?.firstName} lastName={document.uploadedBy?.lastName} /> - + {`${document.uploadedBy?.firstName ?? ""} ${document.uploadedBy?.lastName ?? ""}`.trim() || "N/A"} @@ -216,7 +216,7 @@ const DocumentVersionList = ({ firstName={document.verifiedBy?.firstName} lastName={document.verifiedBy?.lastName} /> - + {`${document.verifiedBy?.firstName ?? ""} ${document.verifiedBy?.lastName ?? ""}`.trim() || "N/A"} diff --git a/src/components/Layout/Sidebar.jsx b/src/components/Layout/Sidebar.jsx index 07fa2c90..fb5349c4 100644 --- a/src/components/Layout/Sidebar.jsx +++ b/src/components/Layout/Sidebar.jsx @@ -15,7 +15,7 @@ const Sidebar = () => { > diff --git a/src/pages/Home/LandingPage.css b/src/pages/Home/LandingPage.css index 35b05e9e..b449465c 100644 --- a/src/pages/Home/LandingPage.css +++ b/src/pages/Home/LandingPage.css @@ -654,3 +654,15 @@ nav.layout-navbar.navbar-active::after { height: 100%; object-fit: cover; } + +.light-style .landing-hero { + background: linear-gradient(138.18deg, #eae8fd, #ede7e7 94.44%); +} + +.text-green { + color: #49bf3c !important; +} + +.text-blue { + color: var(--bs-blue); +} diff --git a/src/pages/Home/LandingPage.jsx b/src/pages/Home/LandingPage.jsx index d3288a9d..24c69924 100644 --- a/src/pages/Home/LandingPage.jsx +++ b/src/pages/Home/LandingPage.jsx @@ -54,15 +54,27 @@ const LandingPage = () => { > - {/* Mobile menu toggle: End*/} - + + {/* - {/* */} PMS - {/* */} + PMS + + */} + + + + OnField + Work + .com
{/* Menu logo wrapper: End */} @@ -226,7 +238,7 @@ const LandingPage = () => { @@ -367,7 +379,7 @@ const LandingPage = () => {
{" "}
- keyboard + keyboard
Inventory Management

@@ -436,7 +448,7 @@ const LandingPage = () => { {" "} @@ -627,7 +639,7 @@ const LandingPage = () => { aria-expanded="true" aria-controls="accordionOne" > - What is MarcoPMS? + What is OnFieldWork.com? @@ -684,7 +696,7 @@ const LandingPage = () => { aria-expanded="false" aria-controls="accordionThree" > - How secure is Marco PMS? + How secure is OnFieldWork.com?

{ data-bs-parent="#accordionExample" >
- Security is at the core of Marco PMS. We use + Security is at the core of OnFieldWork.com. We use industry-standard encryption (SSL/TLS) to protect data in transit and advanced encryption to safeguard data at rest. Role-based access controls ensure that only @@ -754,13 +766,13 @@ const LandingPage = () => { data-bs-parent="#accordionExample" >
- Marco PMS operate under a proprietary license combined - with a subscription model. This means customers don’t - own the software but are granted the right to access and - use it through the cloud under our Terms of Service. - Depending on the plan, licensing may be based on users, - features, or usage, and you can upgrade, downgrade, or - cancel at any time. non! + OnFieldWork.com operate under a proprietary license + combined with a subscription model. This means customers + don’t own the software but are granted the right to + access and use it through the cloud under our Terms of + Service. Depending on the plan, licensing may be based + on users, features, or usage, and you can upgrade, + downgrade, or cancel at any time. non!
@@ -774,7 +786,7 @@ const LandingPage = () => { aria-expanded="false" aria-controls="accordionSix" > - Can I customize Marco PMS for my business needs? + Can I customize OnFieldWork.com for my business needs?
{ data-bs-parent="#accordionExample" >
- Yes, Marco PMS is designed to be flexible and adaptable. - You can customize workflows, user roles, permissions, - and reporting to match your organization’s unique - processes. Depending on your plan, we also support - advanced customization such as integrating with + Yes, OnFieldWork.com is designed to be flexible and + adaptable. You can customize workflows, user roles, + permissions, and reporting to match your organization’s + unique processes. Depending on your plan, we also + support advanced customization such as integrating with third-party tools, adding custom fields, and tailoring modules to fit your business requirements.
@@ -823,7 +835,12 @@ const LandingPage = () => { alt="hero elements" >
-
+
{" "}

@@ -1164,7 +1181,7 @@ const LandingPage = () => { src="/img/brand/marco.png" width="50" /> - Marco PMS + OnFieldWork.com

@@ -1252,7 +1269,7 @@ const LandingPage = () => { apple icon { + const [loding, setLoading] = useState(false); - const [loding, setLoading] = useState(false) - - const { register, + const { + register, handleSubmit, formState: { errors }, reset, - getValues } = useForm({ - resolver: zodResolver(forgotPassSceham), - defaultValues: { - email: "" - } - }) + getValues, + } = useForm({ + resolver: zodResolver(forgotPassSceham), + defaultValues: { + email: "", + }, + }); const onSubmit = async (data) => { try { - setLoading(true) - const response = await AuthRepository.forgotPassword(data) + setLoading(true); + const response = await AuthRepository.forgotPassword(data); if (response.data && response.success) - showToast("verification email has been sent to your registered email address", "success") - reset() - setLoading(false) + showToast( + "verification email has been sent to your registered email address", + "success" + ); + reset(); + setLoading(false); } catch (err) { - reset() + reset(); if (err.response.status === 404) { - showToast("verification email has been sent to your registered email address", "success") + showToast( + "verification email has been sent to your registered email address", + "success" + ); } else { - showToast("Something wrong", "error") + showToast("Something wrong", "error"); } - setLoading(false) + setLoading(false); } - } + }; return ( -
-
-

Forgot Password? 🔒

+
+
+
+ + + +
+ +
+
Forgot Password?

- Enter your email and we'll send you instructions to reset your password + Enter your email and we'll send you instructions to reset your + password

-
+
)}
- -
- - - Back to login - -
+
+ + + Back to login + +
{/* Footer Text */} -
); }; -export default ForgotPasswordPage; \ No newline at end of file +export default ForgotPasswordPage; diff --git a/src/pages/authentication/LoginPage.jsx b/src/pages/authentication/LoginPage.jsx index 0015a605..4431bf25 100644 --- a/src/pages/authentication/LoginPage.jsx +++ b/src/pages/authentication/LoginPage.jsx @@ -45,11 +45,11 @@ const LoginPage = () => { if (data.rememberMe) { localStorage.setItem("jwtToken", response.data.token); localStorage.setItem("refreshToken", response.data.refreshToken); - removeSession("session") + removeSession("session"); } else { sessionStorage.setItem("jwtToken", response.data.token); sessionStorage.setItem("refreshToken", response.data.refreshToken); - removeSession("local") + removeSession("local"); } setLoading(false); navigate("/auth/switch/org"); @@ -78,25 +78,35 @@ const LoginPage = () => { }, [IsLoginWithOTP]); useEffect(() => { - const token = - localStorage.getItem("jwtToken") || - sessionStorage.getItem("jwtToken"); + const token = + localStorage.getItem("jwtToken") || sessionStorage.getItem("jwtToken"); - if (token) { - navigate("/dashboard", { replace: true }); - } -}, []); + if (token) { + navigate("/dashboard", { replace: true }); + } + }, []); return (
-

Welcome to PMS!

+ + +
+ Welcome to
+

+ {" "} + OnField + Work + .com +

+

{IsLoginWithOTP ? "Enter your email to receive a one-time password (OTP)." : "Please sign in to your account and start the adventure"}

-
{/* Email */}
@@ -219,7 +229,6 @@ const LoginPage = () => { )} - {/* Footer Text */} {!IsLoginWithOTP ? (

diff --git a/src/pages/authentication/RegisterPage.jsx b/src/pages/authentication/RegisterPage.jsx index 65b7d619..6e05cfdb 100644 --- a/src/pages/authentication/RegisterPage.jsx +++ b/src/pages/authentication/RegisterPage.jsx @@ -37,33 +37,36 @@ const registerSchema = z.object({ const RegisterPage = () => { const [registered, setRegristered] = useState(false); const [industries, setIndustries] = useState([]); - const [Loading,setLoading] = useState(false) + const [Loading, setLoading] = useState(false); const { register, handleSubmit, - formState: { errors },reset + formState: { errors }, + reset, } = useForm({ resolver: zodResolver(registerSchema), }); const onSubmit = async (data) => { try { - setLoading(true) + setLoading(true); const response = await MarketRepository.requestDemo(data); - showToast("Your request has been sent successfully. Please stay in touch!"); + showToast( + "Your request has been sent successfully. Please stay in touch!" + ); setRegristered(true); - setLoading(false) - reset() + setLoading(false); + reset(); } catch (error) { showToast(error.message, "error"); - setLoading(false) + setLoading(false); } }; useEffect(() => { fetchIndustries(); }, []); - useEffect(() => { }, [industries]); + useEffect(() => {}, [industries]); const fetchIndustries = async () => { try { @@ -76,11 +79,20 @@ const RegisterPage = () => { }; return ( <> -

- -

Adventure starts here

+
+ + + +
+ +
+
Adventure starts here

Make your app management easy and fun!

{ className="mb-2" onSubmit={handleSubmit(onSubmit)} > -
-
- - - {errors.organizatioinName && ( -
- {errors.organizatioinName.message} -
- )} -
-
- - - {errors.email && ( -
- {errors.email.message} -
- )} -
+
+ + + {errors.organizatioinName && ( +
+ {errors.organizatioinName.message} +
+ )} +
+
+ + + {errors.email && ( +
+ {errors.email.message} +
+ )} +
- + {errors.contactPerson && (
{ - + {errors.contactNumber && (
{ - + {errors.about && (
{ - + {errors.oragnizationSize && (
{ - + {errors.industryId && (
{ privacy policy & terms -
{errors.terms && (
{ aria-label="Click me " className="btn btn-primary d-grid w-100" > - {Loading ? "Please Wait..." :" Request Demo"} + {Loading ? "Please Wait..." : " Request Demo"} @@ -313,4 +323,4 @@ const RegisterPage = () => { ); }; -export default RegisterPage; \ No newline at end of file +export default RegisterPage;