Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b3c2785a4b | |||
| ff129480a5 | |||
| 8cf0c8da89 | |||
| 6aaf682d38 | |||
| 9f77a01bb2 | |||
| 78ac5d5b24 |
@@ -4,7 +4,7 @@ import linkedInLogo from "../../../assets/images/Linkedin.png";
|
|||||||
import appleLogo from "../../../assets/images/apple-black.svg";
|
import appleLogo from "../../../assets/images/apple-black.svg";
|
||||||
import facebookLogo from "../../../assets/images/facebook.svg";
|
import facebookLogo from "../../../assets/images/facebook.svg";
|
||||||
import googleLogo from "../../../assets/images/google-logo.svg";
|
import googleLogo from "../../../assets/images/google-logo.svg";
|
||||||
import WrenchBoard from "../../../assets/images/wrenchboard-logo-text_new.png";
|
import WrenchBoard from "../../../assets/images/wrenchboard-logo-text.png";
|
||||||
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";
|
||||||
|
|||||||
@@ -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">
|
||||||
@@ -44,7 +60,8 @@ export default function MyUploadedFiles({ uploadedFiles }) {
|
|||||||
currentFiles.map((value, idx) => {
|
currentFiles.map((value, idx) => {
|
||||||
let addedDate = value?.added?.split(" ")[0];
|
let addedDate = value?.added?.split(" ")[0];
|
||||||
let formattedSize = formatFileSize(value?.file_size);
|
let formattedSize = formatFileSize(value?.file_size);
|
||||||
let imageLink = `${uploadedFiles?.image}${localStorage.getItem('session_token')}/myfile/${value.file_uid}`
|
let downloadLink = value.file_type == 'video/mp4' ? `${process.env.REACT_APP_MEDIA_LINK}/myfile/${value.file_uid}` : `${uploadedFiles?.image}${localStorage.getItem('session_token')}/myfile/${value.file_uid}`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr
|
<tr
|
||||||
key={value?.file_uid}
|
key={value?.file_uid}
|
||||||
@@ -103,8 +120,9 @@ export default function MyUploadedFiles({ uploadedFiles }) {
|
|||||||
<td className="text-right py-4 px-2">
|
<td className="text-right py-4 px-2">
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
<a
|
<a
|
||||||
href={imageLink}
|
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
|
||||||
|
|||||||
@@ -443,6 +443,7 @@ export default function UploadProduct({uploadTypes}) {
|
|||||||
// to="/"
|
// to="/"
|
||||||
onClick={uploadItem}
|
onClick={uploadItem}
|
||||||
className="sm:w-[126px] h-[46px] w-[100px] flex justify-center items-center btn-gradient sm:text-18 text-sm rounded-full text-white"
|
className="sm:w-[126px] h-[46px] w-[100px] flex justify-center items-center btn-gradient sm:text-18 text-sm rounded-full text-white"
|
||||||
|
disabled={uploadTypes.loading || requestStatus.loading}
|
||||||
>
|
>
|
||||||
Upload
|
Upload
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -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