Compare commits

..

9 Commits

Author SHA1 Message Date
victorAnumudu 1f5fb8c7c3 upload file bug fixed 2023-11-28 11:50:16 +01:00
victorAnumudu a303b24b53 upload file bug fixed 2023-11-28 11:33:59 +01:00
victorAnumudu 322927045c Merge master into upload_download_link 2023-11-28 03:18:45 +01:00
victorAnumudu 3cf1dc7166 added download link# 2023-11-28 03:17:23 +01:00
ameye 8ed331e909 Merge branch 'wrong-upload-placeholder' of WrenchBoard/Users-Wrench into master 2023-11-28 01:42:14 +00:00
ameye 2428923f73 Merge branch 'file_link_bug' of WrenchBoard/Users-Wrench into master 2023-11-28 01:41:53 +00:00
victorAnumudu 139f87c919 corrected wrong placeholders 2023-11-28 02:16:49 +01:00
ameye 1a817e723e Merge branch 'Server-path-added' of WrenchBoard/Users-Wrench into master 2023-11-27 11:31:03 +00:00
ebube c023911cd4 Fixed prev card issue 2023-11-27 03:19:39 -08:00
6 changed files with 28 additions and 20 deletions
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" id="DownloadArrow"><g fill="#4687ba" class="color9a7baa svgShape"><path d="M30.179 3.525V1.857c0-1.551-1.784-2.415-3.011-1.449L24 2.907 20.824.402c-1.216-.959-3.002-.093-3.002 1.456v1.668a1 1 0 0 0 1 1h10.357c.552-.001 1-.449 1-1.001zM30.179 25.172v-2.524a1 1 0 0 0-1-1H18.822a1 1 0 0 0-1 1v2.524a1 1 0 0 0 1 1h10.357a1 1 0 0 0 1-1zM30.179 10.74V8.217a1 1 0 0 0-1-1H18.822a1 1 0 0 0-1 1v2.524a1 1 0 0 0 1 1h10.357c.552-.001 1-.448 1-1.001zM30.179 17.956v-2.524a1 1 0 0 0-1-1H18.822a1 1 0 0 0-1 1v2.524a1 1 0 0 0 1 1h10.357a1 1 0 0 0 1-1zM25.748 47.029l9.336-15.018c.852-1.371-.133-3.145-1.748-3.145H14.664c-1.614 0-2.6 1.774-1.748 3.145l9.336 15.018a2.058 2.058 0 0 0 3.496 0z" fill="#000000" class="color000000 svgShape"></path></g></svg>

After

Width:  |  Height:  |  Size: 799 B

@@ -224,7 +224,7 @@ function ConfirmAddFund({
// Create request data object with required parameters for making the payment
const reqData = {
amount: amount * 100,
amount: amount,
card_uid,
credit_reference,
currency,
@@ -289,7 +289,7 @@ function ConfirmAddFund({
// Prepare request data
const reqData = {
amount: amount * 100,
amount: amount,
cardnumber: cardNum.replace(/\s/g, ""),
credit_reference,
cvc: cvv,
+1
View File
@@ -63,6 +63,7 @@ export default function Resources(props) {
loading: false,
msg: "success",
data: res?.result_list,
image:res?.session_image_server
}));
} catch (error) {
setUploadedFiles((prev) => ({
@@ -13,7 +13,6 @@ export default function MyUploadedFiles({ uploadedFiles }) {
indexOfFirstItem,
indexOfLastItem
);
const handlePagination = (e) => {
handlePagingFunc(e, setCurrentPage);
};
@@ -45,10 +44,11 @@ export default function MyUploadedFiles({ uploadedFiles }) {
currentFiles.map((value, idx) => {
let addedDate = value?.added?.split(" ")[0];
let formattedSize = formatFileSize(value?.file_size);
let imageLink = `${uploadedFiles?.image}${localStorage.getItem('session_token')}/myfile/${value.file_uid}`
return (
<tr
key={value?.file_uid}
className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50"
className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50"
>
<td className=" py-4">
<div className="flex space-x-2 items-center w-full">
@@ -102,17 +102,17 @@ export default function MyUploadedFiles({ uploadedFiles }) {
</td>
<td className="text-right py-4 px-2">
<div className="flex justify-center items-center">
<button
type="button"
// onClick={() => {
// navigate("/manage-active-job", {
// state: { ...value, pathname },
// });
// }}
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
<a
href={imageLink}
title="download"
// className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
>
View
</button>
<img
src={localImgLoad('images/icons/download-arrow.svg')}
alt='download-link'
className="w-auto h-6 flex justify-center items-center"
/>
</a>
</div>
</td>
</tr>
@@ -157,7 +157,7 @@ export default function ProductUploadField({
fieldClass="px-6"
type="text"
name="name"
placeholder="RaidParty Fighters"
placeholder="Item Name"
inputHandler={inh}
value={datas.itemName}
/>
@@ -186,7 +186,7 @@ export default function ProductUploadField({
<textarea
value={datas.description}
onChange={(e) => dscrphn(e)}
placeholder="provide a detailed description of your item."
placeholder="Enter detail description"
rows="7"
className="w-full h-full px-7 py-4 border border-light-purple dark:border-[#5356fb29] rounded-[20px] text-dark-gray dark:text-white bg-[#FAFAFA] dark:bg-[#11131F] focus:ring-0 focus:outline-none"
/>
+10 -4
View File
@@ -147,7 +147,7 @@ export default function UploadProduct({uploadTypes}) {
file_name: selectedFile.substring(0,21).replace(/ /gi, ""),//selectedFile.replace(/[ -]/gi, ""),
file_size: imgDetails.size,
file_type: imgDetails.type,
file_data: img.file,
file_data: img.file?.split(",")[1],
title: itemName,
description: description,
msg_type: 'FILE',
@@ -602,7 +602,10 @@ export default function UploadProduct({uploadTypes}) {
//FUNCTIONS to check if file upload type is valid
const isValidFile = (file, supportedFile=[]) => {
let fileType = file.type.split("/")[1];
let fileType = file.type.split("/")[1].toLowerCase();
if(fileType=='jpg' || fileType=='jpeg'){ //forcing both JPG and JPEG TO RETURN JPG AS FILE TYPE
fileType = 'jpg'
}
let valid = supportedFile.filter(item => (
item.name.toLowerCase() == fileType.toLowerCase()
))
@@ -615,7 +618,10 @@ const isValidFile = (file, supportedFile=[]) => {
//FUNCTIONS TO CHECK IF FILE SIZE IS VALID
const isValidFileSize = (file, supportedFile=[]) => {
let fileType = file.type.split("/")[1];
let fileType = file.type.split("/")[1].toLowerCase();
if(fileType=='jpg' || fileType=='jpeg'){ //forcing both JPG and JPEG TO RETURN JPG AS FILE TYPE
fileType = 'jpg'
}
let fileSize = file.size;
let valid = supportedFile.filter(item => (
item.name.toLowerCase() == fileType.toLowerCase()
@@ -627,6 +633,6 @@ const isValidFileSize = (file, supportedFile=[]) => {
return {status: false, message: `File must not exceed ${valid[0].max_size_mb}MB`}
}
}else{
return false
return {status: false, message: `Cannot read file size, try again`}
}
}