Compare commits

...

16 Commits

Author SHA1 Message Date
victorAnumudu e76b589e4d popout top amended 2023-06-12 04:25:27 +01:00
victorAnumudu f5c3922a02 view all message popup added 2023-06-12 03:31:58 +01:00
CHIEFSOFT\ameye 8255eedb00 offer interst starter 2023-06-11 21:25:17 -04:00
CHIEFSOFT\ameye b4ff0b5eca adjust colors 2023-06-11 18:39:05 -04:00
CHIEFSOFT\ameye 120f2c1866 formatingf actoion section 2023-06-11 17:59:04 -04:00
CHIEFSOFT\ameye 7389cf164c extra style 2023-06-11 14:51:24 -04:00
CHIEFSOFT\ameye 3700fe066f dynamic head style 2023-06-11 14:46:23 -04:00
CHIEFSOFT\ameye 5e85697c82 job action 2023-06-11 09:24:12 -04:00
CHIEFSOFT\ameye 5f87c5f36c wallet format 2023-06-11 09:19:45 -04:00
CHIEFSOFT\ameye 66b7d20e43 wallet buttons 2023-06-11 09:03:24 -04:00
CHIEFSOFT\ameye c389e06ae6 Wallet format 2023-06-11 08:49:48 -04:00
ameye 0b83682da7 Merge branch 'pastdue-common-banner' of WrenchBoard/Users-Wrench into master 2023-06-11 11:30:16 +00:00
victorAnumudu 78b14ec797 past due common head banner fixed 2023-06-11 05:35:50 +01:00
CHIEFSOFT\ameye 8b0954c28c fix text 2023-06-10 17:28:46 -04:00
CHIEFSOFT\ameye 15ef592252 Job actions 2023-06-10 17:25:34 -04:00
ameye 4d74946f0d Merge branch 'bug-link-mismatch' of WrenchBoard/Users-Wrench into master 2023-06-10 21:20:48 +00:00
12 changed files with 286 additions and 54 deletions
+2
View File
@@ -43,6 +43,7 @@ import AuthRedirect from "./views/AuthRedirect";
import MyPastDueJobsPage from "./views/MyPastDueJobsPage";
import BlogPage from "./views/BlogPage";
import MyReviewDueJobsPage from "./views/MyReviewDueJobsPage";
import OffersInterestPage from "./views/OffersInterestPage";
export default function Routers() {
return (
@@ -97,6 +98,7 @@ export default function Routers() {
<Route exact path="/start-job" element={<StartJob />} />
<Route exact path="/manage-active-job" element={<ManageActiveJobs />} />
<Route exact path="/blog-page" element={<BlogPage />} />
<Route exact path="/offer-interest" element={<OffersInterestPage />} />
<Route
+128 -2
View File
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react";
import React, { useEffect, useState, useRef, forwardRef } from "react";
import { useSelector } from "react-redux";
import Layout from "../Partials/Layout";
import { useNavigate } from "react-router-dom";
@@ -6,6 +6,8 @@ import ActiveJobMessage from "./ActiveJobMessage";
import LoadingSpinner from "../Spinners/LoadingSpinner";
import CountDown from "../Helpers/CountDown";
import IndexJobActions from "./JobActions/IndexJobActions";
import ModalCom from "../Helpers/ModalCom";
import { useReactToPrint } from "react-to-print";
import usersService from "../../services/UsersService";
@@ -25,6 +27,18 @@ function ActiveJobs(props) {
let [requestStatus, setRequestStatus] = useState({loading: false, status: false, message: ''})
let [popUp, setPopUp] = useState(false) // STATE FOR POPOUT MODAL
const printRef = useRef();
// to handle printing
const handlePrint = useReactToPrint({
content: () => printRef.current,
});
const popUpHandler = () => { // FUNCTION TO HANDLE POPOUT
setPopUp(prev => !prev)
}
// FUNCTION TO HANDLE MESSAGE CHANGE
const handleMessageChange = ({target:{value}}) => {
setMessageToSend(value)
@@ -395,7 +409,12 @@ function ActiveJobs(props) {
{/* MESSAGE SECTION */}
<div className="w-full lg:w-1/2">
<p className="text-lg font-bold text-dark-gray dark:text-black tracking-wide">Message</p>
<div className="flex justify-between items-center gap-5">
<p className="text-lg font-bold text-dark-gray dark:text-black tracking-wide">Message</p>
<button type="button" onClick={popUpHandler} className="px-2 py-1 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
view all
</button>
</div>
{props.activeJobMesList.loading ?
<LoadingSpinner size='16' color='sky-blue' />
:
@@ -405,6 +424,12 @@ function ActiveJobs(props) {
{/* END OF MESSAGE */}
</div>
{/* POPOUT SECTION */}
{popUp &&
<PopModal popUpHandler={popUpHandler} popUp={popUp} details={props.details} activeJobMesList={props.activeJobMesList} handlePrint={handlePrint} myRef={printRef} />
}
{/* END OF POPOUT SECTION */}
</Layout>
);
}
@@ -429,3 +454,104 @@ function convertFileToBase64(file) {
});
}
//POPOUT COMPONENT FUNCTION
const PopModal = ({popUpHandler, popUp, details, activeJobMesList, handlePrint, myRef}) => {
return (
<ModalCom action={popUpHandler} situation={popUp} className="edit-popup">
<div ref={myRef} className="message-modal-wrapper min-w-[500px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
<div className="message-modal-header w-full flex items-center justify-between lg:px-10 lg:py-8 px-[30px] py-[23px] border-b dark:border-[#5356fb29] border-light-purple">
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide">
{details?.contract}
</h1>
<button
type="button"
className="text-[#374557] dark:text-red-500"
onClick={popUpHandler}
>
<svg
width="36"
height="36"
viewBox="0 0 36 36"
fill="none"
className="fill-current"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M36 16.16C36 17.4399 36 18.7199 36 20.0001C35.7911 20.0709 35.8636 20.2554 35.8385 20.4001C34.5321 27.9453 30.246 32.9248 22.9603 35.2822C21.9006 35.6251 20.7753 35.7657 19.6802 35.9997C18.4003 35.9997 17.1204 35.9997 15.8401 35.9997C15.5896 35.7086 15.2189 35.7732 14.9034 35.7093C7.77231 34.2621 3.08728 30.0725 0.769671 23.187C0.435002 22.1926 0.445997 21.1199 0 20.1599C0 18.7198 0 17.2798 0 15.8398C0.291376 15.6195 0.214408 15.2656 0.270759 14.9808C1.71321 7.69774 6.02611 2.99691 13.0428 0.700951C14.0118 0.383805 15.0509 0.386897 15.9999 0C17.2265 0 18.4532 0 19.6799 0C19.7156 0.124041 19.8125 0.136067 19.9225 0.146719C27.3 0.868973 33.5322 6.21922 35.3801 13.427C35.6121 14.3313 35.7945 15.2484 36 16.16ZM33.011 18.0787C33.0433 9.77105 26.3423 3.00309 18.077 2.9945C9.78479 2.98626 3.00344 9.658 2.98523 17.8426C2.96667 26.1633 9.58859 32.9601 17.7602 33.0079C26.197 33.0577 32.9787 26.4186 33.011 18.0787Z"
fill=""
fillOpacity="0.6"
/>
<path
d="M15.9309 18.023C13.9329 16.037 12.007 14.1207 10.0787 12.2072C9.60071 11.733 9.26398 11.2162 9.51996 10.506C9.945 9.32677 11.1954 9.0811 12.1437 10.0174C13.9067 11.7585 15.6766 13.494 17.385 15.2879C17.9108 15.8401 18.1633 15.7487 18.6375 15.258C20.3586 13.4761 22.1199 11.7327 23.8822 9.99096C24.8175 9.06632 26.1095 9.33639 26.4967 10.517C26.7286 11.2241 26.3919 11.7413 25.9133 12.2178C24.1757 13.9472 22.4477 15.6855 20.7104 17.4148C20.5228 17.6018 20.2964 17.7495 20.0466 17.9485C22.0831 19.974 24.0372 21.8992 25.9689 23.8468C26.9262 24.8119 26.6489 26.1101 25.4336 26.4987C24.712 26.7292 24.2131 26.3441 23.7455 25.8757C21.9945 24.1227 20.2232 22.3892 18.5045 20.6049C18.0698 20.1534 17.8716 20.2269 17.4802 20.6282C15.732 22.4215 13.9493 24.1807 12.1777 25.951C11.7022 26.4262 11.193 26.7471 10.4738 26.4537C9.31345 25.9798 9.06881 24.8398 9.98589 23.8952C11.285 22.5576 12.6138 21.2484 13.9387 19.9355C14.5792 19.3005 15.2399 18.6852 15.9309 18.023Z"
fill="#"
fillOpacity="0.6"
/>
</svg>
</button>
</div>
<div className="job-action-modal-body w-full px-10 py-8 gap-4">
<div className="w-full flex flex-col items-center">
{activeJobMesList.loading ?
<LoadingSpinner size='16' color='sky-blue' />
:
<div className="message-table h-[500px] overflow-y-auto">
<table className="wallet-activity w-full table-auto border-collapse text-left">
<thead className='border-b-2'>
<tr className='text-slate-600'>
<th className="p-2"></th>
</tr>
</thead>
{activeJobMesList?.data?.length ?
(
<tbody>
{activeJobMesList?.data?.map((item, index) => (
<tr key={index} className='text-slate-500'>
<td>
<div className="msg_box">
<div className="msg_header">{item.msg_date} {item.msg_firstname}</div>
<span className="p-2" dangerouslySetInnerHTML={{__html: item.message}}></span>
</div>
</td>
</tr>
))}
</tbody>
)
:
activeJobMesList.error ?
(
<tbody>
<tr className='text-slate-500'>
<td className="p-2" colSpan={4}>Opps! an error occurred. Please try again!</td>
</tr>
</tbody>
)
:
<tbody>
<tr className='text-slate-500'>
<td className="p-2" colSpan={4}>No Message Found!</td>
</tr>
</tbody>
}
</table>
</div>
}
</div>
{/* btn */}
<div className='flex justify-end items-center'>
<div className="py-3 w-full lg:w-1/2 flex justify-between items-center">
<button onClick={handlePrint} type="button" className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
<span className='text-white'>Print</span>
</button>
<button onClick={popUpHandler} type="button" className="w-20 h-11 flex justify-center items-center border-gradient text-base rounded-full text-white">
<span className='text-gradient'>Cancel</span>
</button>
</div>
</div>
</div>
</div>
</ModalCom>
)
}
@@ -6,11 +6,11 @@ function CurrentJobAction() {
<p className="my-3 py-1 text-base active-owner">
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400">
<tbody>
<tr className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50">
<td className=" py-4">
<tr className=" border-b dark:border-[#5356fb29] hover:bg-gray-50">
<td className=" py-1">
<div className="flex space-x-2 items-center w-full">
<div className="flex flex-col flex-[0.9]">
<h1 className="font-bold text-xl text-dark-gray dark:text-white">
<h1 className="text-xl text-dark-gray dark:text-white">
Waiting for the completion message from the client before you can approve.
</h1>
</div>
@@ -34,23 +34,27 @@ function CurrentTaskAction({jobDetails}) {
return (
<div className='job-action'>
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400 active-worker">
<tbody>
<tr className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50">
<tr className=" border-b">
<td>
<div className="flex space-x-2 items-center w-full">
<div className="flex flex-col flex-[0.9]">
<h1 className="font-bold text-xl text-dark-gray dark:text-white">
If you have completed this task and ready for review and acceptance, click "Set Status" button.
</h1>
</div>
<h1 className="text-xl text-dark-gray dark:text-white">
I completed this task and ready for review and acceptance.
</h1>
{/*<div className="flex flex-col flex-[0.9]">*/}
{/*</div>*/}
</div>
</td>
<td className="text-right px-2">
</tr>
<tr>
<td>
<div className="flex justify-center items-center">
<button onClick={popUpHandler} type="button" className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
Set Status
<button onClick={popUpHandler} type="button" className="w-120 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
Send of Review
</button>
</div>
</td>
@@ -3,9 +3,31 @@ import React from 'react'
function PastDueJobAction() {
return (
<div className='job-action'>
<p className="my-3 py-1 text-base">
Waiting for the completion message from the client before you can approve. Owner True & PastDue
</p>
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400 owner-pastdue">
<tbody>
<tr className="border-b dark:border-[#5356fb29] hover:bg-gray-50">
<td>
<div className="flex space-x-2 items-center w-full">
<div className="flex flex-col flex-[0.9]">
<h1 className="text-xl text-dark-gray dark:text-white">
Time allocated has passed
</h1>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div className="flex justify-center items-center">
<button type="button" className="w-120 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
Cancel or Extend Timeline
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
)
}
@@ -3,9 +3,31 @@ import React from 'react'
function PastDueTaskAction() {
return (
<div className='job-action'>
<p className="my-3 py-1 text-base">
Waiting for the completion message from the client before you can approve. Worker True & PastDue
</p>
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400 worker-pastdue">
<tbody>
<tr className=" border-b dark:border-[#5356fb29] hover:bg-gray-50">
<td>
<div className="flex space-x-2 items-center w-full">
<div className="flex flex-col flex-[0.9]">
<h1 className="text-xl text-dark-gray dark:text-white">
You have missed the allocated time
</h1>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div className="flex justify-center items-center">
<button type="button" className="w-120 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
Request Extension
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
)
}
@@ -6,21 +6,22 @@ function ReviewJobAction() {
<p className="my-3 py-1 text-base">
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400 review-owner">
<tbody>
<tr className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50">
<td className=" py-4">
<tr className="border-b dark:border-[#5356fb29]">
<td className=" py-1">
<div className="flex space-x-2 items-center w-full">
<div className="flex flex-col flex-[0.9]">
<h1 className="font-bold text-xl text-dark-gray dark:text-white">
<h1 className="text-xl text-dark-gray dark:text-white">
This Job is Ready for your review
</h1>
</div>
</div>
</td>
<td className="text-right py-4 px-2">
</tr>
<tr>
<td>
<div className="flex justify-center items-center">
<button type="button" className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
Reject/Accepts
<button type="button" className="w-120 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
Reject or Accept
</button>
</div>
</td>
+31 -20
View File
@@ -8,13 +8,24 @@ import LoadingSpinner from '../Spinners/LoadingSpinner'
function Balance({wallet, coupon}) {
return (
<div className="content-wrapper">
{/* heading */}
<div className="sm:flex justify-between items-center mb-6">
<div className="mb-5 sm:mb-0">
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
Wallet
</h1>
</div>
<div className="slider-btns flex space-x-4">
</div>
</div>
<div className='w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin'>
{/* WALLET SECTION */}
<div className="lg:w-3/4 w-full mb-10 lg:mb-0">
<div className="lg:w-4/4 w-full mb-10 lg:mb-0">
<div className="wallet w-full md:p-8 p-4 h-full bg-white dark:bg-dark-white rounded-2xl shadow">
<div className='flex items-baseline justify-between'>
<h2 className='text-slate-900 dark:text-white text-xl lg:text-2xl font-medium'>Wallet</h2>
<p className='text-base text-slate-500 dark:text-white'>Add New Wallet</p>
{/*<h2 className='text-slate-900 dark:text-white text-xl lg:text-2xl font-medium'>Wallet</h2>*/}
{/*<p className='text-base text-slate-500 dark:text-white'>Add New Wallet</p>*/}
</div>
{/* wallet balance */}
{wallet.loading ?
@@ -26,7 +37,7 @@ function Balance({wallet, coupon}) {
<div className='text-slate-900 w-full md:w-1/2 flex space-x-3 items-start justify-start'>
<div className='balance-info'>
<p className='py-2'></p>
<span className='text-base'>{item.description}</span>
<span className='text-xl text-dark-gray dark:text-white'>{item.description}</span>
<p className='text-base text-slate-500'>{item.symbol}</p>
</div>
<div className='balance-info'>
@@ -43,10 +54,10 @@ function Balance({wallet, coupon}) {
{
item.action_type != 'AC_AD_FD_ONLY' ?
<Link to='transfer-fund' className='lg:flex hidden user-balance cursor-pointer lg:w-[152px] w-[150px] h-[48px]
items-center rounded-full relative bg-purple pr-1.5 pl-4'>Transfer</Link>:''
items-center rounded-full relative bg-purple pr-1.5 pl-4 lg:text-xl text-lg font-bold text-white'>Transfer</Link>:''
}
<Link to='add-fund' className='lg:flex hidden user-balance cursor-pointer lg:w-[152px] w-[150px] h-[48px]
items-center rounded-full relative bg-purple pr-1.5 pl-4'>+Add Credit</Link>
items-center rounded-full relative bg-purple pr-1.5 pl-4 lg:text-xl text-lg font-bold text-white'>+Add Credit</Link>
</div>
</div>
))
@@ -73,22 +84,22 @@ function Balance({wallet, coupon}) {
</div>
<div className='w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin'>
{/*<div className='w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin'>*/}
{/* COUPON SECTION */}
<div className="lg:w-3/4 w-full mb-10 lg:mb-0">
<div className="wallet w-full md:p-8 p-4 h-full max-h-[500px] bg-white dark:bg-dark-white overflow-y-auto rounded-2xl shadow">
<h2 className='text-slate-900 dark:text-white text-xl lg:text-2xl font-medium'>Coupons</h2>
{coupon.loading ?
<LoadingSpinner size='16' color='sky-blue' />
:
<CouponTable coupon={coupon} />
}
</div>
</div>
{/* END OF COUPON SECTION */}
{/* /!* COUPON SECTION *!/*/}
{/* <div className="lg:w-3/4 w-full mb-10 lg:mb-0">*/}
{/* <div className="wallet w-full md:p-8 p-4 h-full max-h-[500px] bg-white dark:bg-dark-white overflow-y-auto rounded-2xl shadow">*/}
{/* <h2 className='text-slate-900 dark:text-white text-xl lg:text-2xl font-medium'>Coupons</h2>*/}
{/* {coupon.loading ?*/}
{/* <LoadingSpinner size='16' color='sky-blue' />*/}
{/* :*/}
{/* <CouponTable coupon={coupon} />*/}
{/* }*/}
{/* </div>*/}
{/* </div>*/}
{/* /!* END OF COUPON SECTION *!/*/}
</div>
{/*</div>*/}
</div>
)
}
@@ -102,7 +102,7 @@ export default function RecomendedSliders({ className,bannerData }) {
{bannerData.map((item, index) => (
<Link key={index} to={`/${item.link_path}`}>
<div className="item">
<div className="commonHeaderSliderItem">
<div className={`commonHeaderSliderItem ${item.short_style}`}>
{/* title */}
<div className="flex justify-center">
<p className="text-base font-bold text-dark-gray dark:text-white">
+33
View File
@@ -9,6 +9,9 @@
font-family: "Product Sans";
src: url("./assets/fonts/Product Sans Bold.ttf");
}
.job-action{
background-color: lightgoldenrodyellow;
height: 100px;
@@ -47,6 +50,22 @@
height: 95px;
padding: 5px;
}
.short_style{
background-color: transparent;
}
.lr{
background-color: #e1cace;
}
.lg{
background-color: #a7dca7;
}
.lb{
background-color: #b3ccd7;
}
.ly{
background-color: #eeee67;
}
.offer-slide-item{
background: rgb(2,0,36);
background: radial-gradient(circle, rgba(2,0,36,1) 0%, rgba(3,51,2,0.782125350140056) 0%, rgba(0,212,255,0.07904411764705888) 0%, rgba(153,182,201,1) 99%);
@@ -602,6 +621,20 @@ input[type="text"][dir="rtl"] {
.modal-com {
transition: all 0.1s ease-in-out;
}
@media print {
body .modal-com{
height: 100%;
overflow: hidden;
}
.job-action-modal-body button, .message-modal-header button {
display: none;
}
.message-modal-wrapper .message-table{
height: 100%;
overflow-y: hidden;
}
}
/* TODO: =================================modal end================================= */
/* TODO: =================================login ================================= */
.btn-login {
+3 -5
View File
@@ -3,12 +3,10 @@ import usersService from "../services/UsersService";
//import MyJobs from "../components/MyJobs";
//import MyActiveJobs from "../components/MyActiveJobs";
import MyPastDueJobs from "../components/MyActiveJobs/MyPastDueJobs";
import { useSelector } from "react-redux";
export default function MyPastDueJobsPage() {
const commonHeadData =()=>{
console.log("COMMON HEAD DATA ----------------=====---------------------");
return 0;
}
let {commonHeadBanner} = useSelector(state => state.commonHeadBanner)
const [MyJobList, setMyJobList] = useState([]);
const api = new usersService();
//TARGET ENDPOINT[POST]http://10.204.5.100:9083/en/wrench/api/v1/jobmanageractive
@@ -29,7 +27,7 @@ export default function MyPastDueJobsPage() {
<>
<MyPastDueJobs
MyJobList={MyJobList}
commonHeadData={commonHeadData}
commonHeadData={commonHeadBanner?.result_list}
/>
</>
);
+13
View File
@@ -0,0 +1,13 @@
import React, { useContext, useState, useEffect } from "react";
import BlogItem from "../components/Blogs";
import { useSelector } from "react-redux";
export default function OffersInterestPage() {
let {commonHeadBanner} = useSelector(state => state.commonHeadBanner)
return (
<>
<BlogItem commonHeadData={commonHeadBanner.result_list} />
</>
);
}