Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b3c2785a4b | |||
| ff129480a5 |
@@ -5,6 +5,7 @@ import debounce from "../../../hooks/debounce";
|
|||||||
import usersService from "../../../services/UsersService";
|
import usersService from "../../../services/UsersService";
|
||||||
import InputCom from "../../Helpers/Inputs/InputCom";
|
import InputCom from "../../Helpers/Inputs/InputCom";
|
||||||
import AuthLayout from "../AuthLayout2";
|
import AuthLayout from "../AuthLayout2";
|
||||||
|
import LoadingSpinner from '../../../components/Spinners/LoadingSpinner'
|
||||||
|
|
||||||
export default function VerifyLink() {
|
export default function VerifyLink() {
|
||||||
const [email, setEmail] = useState("");
|
const [email, setEmail] = useState("");
|
||||||
@@ -119,7 +120,14 @@ export default function VerifyLink() {
|
|||||||
<>
|
<>
|
||||||
<AuthLayout slogan="Welcome to WrenchBoard">
|
<AuthLayout slogan="Welcome to WrenchBoard">
|
||||||
{pageLoader ? (
|
{pageLoader ? (
|
||||||
<img src={WrenchBoard} alt="wrenchboard" className="h-10 mx-auto" />
|
<div className='flex flex-col justify-center items-center gap-4'>
|
||||||
|
<img src={WrenchBoard} alt="wrenchboard" className="h-10 mx-auto" />
|
||||||
|
<div className='flex flex-col justify-center items-center'>
|
||||||
|
<LoadingSpinner height='h-40' size='8' />
|
||||||
|
<p>Loading...</p>
|
||||||
|
<p>please do not refresh</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<div className="mb-12">
|
<div className="mb-12">
|
||||||
|
|||||||
@@ -16,6 +16,22 @@ export default function MyUploadedFiles({ uploadedFiles }) {
|
|||||||
const handlePagination = (e) => {
|
const handlePagination = (e) => {
|
||||||
handlePagingFunc(e, setCurrentPage);
|
handlePagingFunc(e, setCurrentPage);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//FUNCTION TO OPEN NEW WINDOW
|
||||||
|
const openNewWindow = (e, url, width=1000, height=600) => {
|
||||||
|
e.preventDefault()
|
||||||
|
var leftPosition, topPosition;
|
||||||
|
//Allow for borders.
|
||||||
|
leftPosition = (window.screen.width / 2) - ((width / 2) + 10);
|
||||||
|
//Allow for title and status bars.
|
||||||
|
topPosition = (window.screen.height / 2) - ((height / 2) + 50);
|
||||||
|
//Open the window.
|
||||||
|
window.open(url, "",
|
||||||
|
"status=no,height=" + height + ",width=" + width + ",resizable=yes,left="
|
||||||
|
+ leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY="
|
||||||
|
+ topPosition + ",toolbar=no,menubar=no,scrollbars=yes,location=no,directories=no");
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="mb-4 w-full flex justify-end item-center">
|
<div className="mb-4 w-full flex justify-end item-center">
|
||||||
@@ -106,6 +122,7 @@ export default function MyUploadedFiles({ uploadedFiles }) {
|
|||||||
<a
|
<a
|
||||||
href={downloadLink}
|
href={downloadLink}
|
||||||
title="download"
|
title="download"
|
||||||
|
onClick={(e)=> openNewWindow(e, downloadLink)}
|
||||||
// className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
// className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
|
|||||||
@@ -60,6 +60,21 @@ export default function AttachFile({data='', fontSize='text-sm', showOnData=fals
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FUNCTION TO OPEN NEW WINDOW
|
||||||
|
const openNewWindow = (e, url, width=1000, height=600) => {
|
||||||
|
e.preventDefault()
|
||||||
|
var leftPosition, topPosition;
|
||||||
|
//Allow for borders.
|
||||||
|
leftPosition = (window.screen.width / 2) - ((width / 2) + 10);
|
||||||
|
//Allow for title and status bars.
|
||||||
|
topPosition = (window.screen.height / 2) - ((height / 2) + 50);
|
||||||
|
//Open the window.
|
||||||
|
window.open(url, "",
|
||||||
|
"status=no,height=" + height + ",width=" + width + ",resizable=yes,left="
|
||||||
|
+ leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY="
|
||||||
|
+ topPosition + ",toolbar=no,menubar=no,scrollbars=yes,location=no,directories=no");
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
apiCall.jobManagerFiles({job_uid:data?.job_uid || data?.origin_job_uid}).then(res => {
|
apiCall.jobManagerFiles({job_uid:data?.job_uid || data?.origin_job_uid}).then(res => {
|
||||||
setUploadedList({loading: false, data:res.data})
|
setUploadedList({loading: false, data:res.data})
|
||||||
@@ -105,6 +120,7 @@ export default function AttachFile({data='', fontSize='text-sm', showOnData=fals
|
|||||||
alt='download-link'
|
alt='download-link'
|
||||||
className=''
|
className=''
|
||||||
href={downloadLink}
|
href={downloadLink}
|
||||||
|
onClick={(e)=> openNewWindow(e, downloadLink)}
|
||||||
>
|
>
|
||||||
{(item.originalname).toString().length > 30 ? (item.originalname).toString().slice(0, 26) + '..._.' + fileNameExt : (item.originalname).toString()}
|
{(item.originalname).toString().length > 30 ? (item.originalname).toString().slice(0, 26) + '..._.' + fileNameExt : (item.originalname).toString()}
|
||||||
</a>
|
</a>
|
||||||
@@ -148,6 +164,7 @@ export default function AttachFile({data='', fontSize='text-sm', showOnData=fals
|
|||||||
alt='download-link'
|
alt='download-link'
|
||||||
className=''
|
className=''
|
||||||
href={downloadLink}
|
href={downloadLink}
|
||||||
|
onClick={(e)=> openNewWindow(e, downloadLink)}
|
||||||
>
|
>
|
||||||
{(item.originalname).toString().length > 30 ? (item.originalname).toString().slice(0, 26) + '..._.' + fileNameExt : (item.originalname).toString()}
|
{(item.originalname).toString().length > 30 ? (item.originalname).toString().slice(0, 26) + '..._.' + fileNameExt : (item.originalname).toString()}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user