Merge branch 'job-message-tab' of WrenchBoard/Users-Wrench into master
This commit is contained in:
@@ -19,46 +19,48 @@ export default function ActiveJobMessage({ activeJobMesList }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex flex-col justify-between h-full'>
|
<div className='flex flex-col justify-between'>
|
||||||
<table className="wallet-activity w-full table-auto border-collapse text-left">
|
<div className="w-full min-h-[450px] max-h-[450px] overflow-y-scroll">
|
||||||
<thead className='border-b-2'>
|
<table className="wallet-activity w-full table-auto border-collapse text-left">
|
||||||
<tr className='text-slate-600'>
|
<thead className='border-b-2'>
|
||||||
<th className="p-2"></th>
|
<tr className='text-slate-600'>
|
||||||
</tr>
|
<th className="p-2"></th>
|
||||||
</thead>
|
</tr>
|
||||||
{activeJobMesList.data.length ?
|
</thead>
|
||||||
(
|
{activeJobMesList.data.length ?
|
||||||
<tbody>
|
(
|
||||||
{currentActiveJobMesList.map((item, index) => (
|
<tbody>
|
||||||
<tr key={index} className='text-slate-500'>
|
{currentActiveJobMesList.map((item, index) => (
|
||||||
<td>
|
<tr key={index} className='text-slate-500'>
|
||||||
<div className={`msg_box ${item.who}`}>
|
<td>
|
||||||
<div className="msg_header">{item.msg_date} {item.msg_firstname}</div>
|
<div className={`msg_box ${item.who}`}>
|
||||||
<span className="p-2" dangerouslySetInnerHTML={{__html: item.message}}></span>
|
<div className="msg_header">{item.msg_date} {item.msg_firstname}</div>
|
||||||
</div>
|
<span className="p-2" dangerouslySetInnerHTML={{__html: item.message}}></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
activeJobMesList.error ?
|
activeJobMesList.error ?
|
||||||
(
|
(
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr className='text-slate-500'>
|
<tr className='text-slate-500'>
|
||||||
<td className="p-2" colSpan={4}>Opps! an error occurred. Please try again!</td>
|
<td className="p-2" colSpan={4}>Opps! an error occurred. Please try again!</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr className='text-slate-500'>
|
<tr className='text-slate-500'>
|
||||||
<td className="p-2" colSpan={4}>No Message Found!</td>
|
<td className="p-2" colSpan={4}>No Message Found!</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
}
|
}
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* PAGINATION BUTTON */}
|
{/* PAGINATION BUTTON */}
|
||||||
<PaginatedList onClick={handlePagination} prev={currentPage == 0 ? true : false} next={currentPage+Number(process.env.REACT_APP_ITEM_PER_PAGE) >= activeJobMesList?.data?.length ? true : false} data={activeJobMesList?.data} start={indexOfFirstItem} stop={indexOfLastItem} />
|
<PaginatedList onClick={handlePagination} prev={currentPage == 0 ? true : false} next={currentPage+Number(process.env.REACT_APP_ITEM_PER_PAGE) >= activeJobMesList?.data?.length ? true : false} data={activeJobMesList?.data} start={indexOfFirstItem} stop={indexOfLastItem} />
|
||||||
|
|||||||
@@ -367,23 +367,25 @@ function ActiveJobs(props) {
|
|||||||
{/* TEXTAREA SECTION */}
|
{/* TEXTAREA SECTION */}
|
||||||
<div className="mt-5">
|
<div className="mt-5">
|
||||||
<div className="">
|
<div className="">
|
||||||
{/* <p className="relative py-2 my-2 text-lg font-bold text-slate-600 dark:text-black border-b-2 border-slate-300 tracking-wide after:absolute after:-bottom-0.5 after:content-[''] after:w-[100px] after:h-[2px] after:bg-sky-blue after:left-0">Message(s)</p> */}
|
<div
|
||||||
<div className="my-2 flex items-center border-b border-slate-300">
|
className="pl-7 my-2 flex items-center border-b border-slate-300 gap-3"
|
||||||
|
// className='ml-7 flex justify-start items-center gap-3'
|
||||||
|
>
|
||||||
<button
|
<button
|
||||||
name="message"
|
name="message"
|
||||||
onClick={(e) => setTab(e.target.name)}
|
onClick={(e) => setTab(e.target.name)}
|
||||||
className={`p-2 text-lg font-bold text-slate-600 dark:text-white border ${
|
className={`px-4 py-1 rounded-t-2xl ${
|
||||||
tab == "message" ? "border-sky-blue" : "border-slate-300"
|
tab == "message" ? "bg-[#4687ba] border-[2px] border-[#4687ba] text-white" : "bg-white text-[#000] border-t-[2px]"
|
||||||
} tracking-wide transition duration-200`}
|
}`}
|
||||||
>
|
>
|
||||||
Send Message
|
Send Message
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
name="files"
|
name="files"
|
||||||
onClick={(e) => setTab(e.target.name)}
|
onClick={(e) => setTab(e.target.name)}
|
||||||
className={`p-2 text-lg font-bold text-slate-600 dark:text-white border ${
|
className={`px-4 py-1 rounded-t-2xl ${
|
||||||
tab == "files" ? "border-sky-blue" : "border-slate-300"
|
tab == "files" ? "bg-[#4687ba] border-[2px] border-[#4687ba] text-white" : "bg-white text-[#000] border-t-[2px]"
|
||||||
} tracking-wide transition duration-200`}
|
}`}
|
||||||
>
|
>
|
||||||
Send Files
|
Send Files
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user