Compare commits

...

7 Commits

Author SHA1 Message Date
victorAnumudu 24f915ee55 upload error message bud fixed 2024-04-16 15:46:33 +01:00
ameye 5da67c4c06 Merge branch 'font-increase' of WrenchBoard/Users-Wrench into master 2024-04-15 17:03:21 +00:00
victorAnumudu a21eaa40f2 increased font size 2024-04-15 17:40:09 +01:00
ameye a00e40dbe9 Merge branch 'attached-file-font' of WrenchBoard/Users-Wrench into master 2024-04-15 15:17:10 +00:00
victorAnumudu fa51914987 added margin 2024-04-15 14:47:30 +01:00
victorAnumudu c8d40c1630 increased font size 2024-04-15 14:31:42 +01:00
ameye f673fe99ef Merge branch 'login-logo' of WrenchBoard/Users-Wrench into master 2024-04-15 11:43:03 +00:00
2 changed files with 8 additions and 7 deletions
@@ -544,6 +544,7 @@ function ActiveJobs(props) {
<AttachFile
data={props.details}
showOnData={true}
fontSize={'text-lg'}
/>
</div>
<div className="flex justify-between items-center gap-5">
+7 -7
View File
@@ -4,7 +4,7 @@ import axios from 'axios'
import usersService from '../../services/UsersService'
export default function AttachFile({data='', showOnData=false}) {
export default function AttachFile({data='', fontSize='text-sm', showOnData=false}) {
const apiCall = new usersService()
@@ -37,7 +37,7 @@ export default function AttachFile({data='', showOnData=false}) {
}
axios.post(`${process.env.REACT_APP_MEDIA_LINK}/upload/task`,formData).then(res => {
if(res.data.status < 1){
if(res.data.internal_return < 0){
inputFile.current.value = null
setRequestStatus({loading: false, status:false, message:'upload failed'})
setTimeout(()=>{
@@ -84,10 +84,10 @@ export default function AttachFile({data='', showOnData=false}) {
<span className={`text-[10px] ${requestStatus.status ? 'text-emerald-600' : 'text-red-500'}`}>{requestStatus.message}</span>
}
</div>
<label htmlFor='file' className={`dark:text-white cursor-pointer text-[12px] py-1 px-2 rounded-full border ${ requestStatus.loading && 'pointer-events-none'}`}>+ Add</label>
<label htmlFor='file' className={`text-black bg-[#f8ffd4] cursor-pointer text-[12px] py-1 px-2 rounded-full border ${ requestStatus.loading && 'pointer-events-none'}`}>+ Add Files</label>
</div>
<div className='w-full p-2 rounded-2xl bg-slate-100'>
<div className='text-[12px] w-full h-20 overflow-y-auto flex flex-col gap-1'>
<div className='text-[12px] w-full h-20 overflow-y-auto flex flex-col gap-2'>
{uploadedList.loading ?
<div className='w-full h-full justify-center items-center'>
<LoadingSpinner size='6' height='h-full' />
@@ -98,7 +98,7 @@ export default function AttachFile({data='', showOnData=false}) {
uploadedList.data.result_list.map((item, index) => {
let fileNameExt = item.originalname.split('.')[item.originalname.split('.').length - 1]
return(
<div key={item.file_uid} className='text-sm my-1 flex justify-start gap-2'>
<div key={item.file_uid} className={`my-[6px] flex justify-start gap-2 ${fontSize}`}>
<span>{index + 1}:</span>
<a
target='_blank'
@@ -136,11 +136,11 @@ export default function AttachFile({data='', showOnData=false}) {
</div>
</div>
<div className='w-full p-2 rounded-2xl bg-slate-100'>
<div className='text-[12px] w-full p-2 h-20 overflow-y-auto flex flex-col gap-1'>
<div className='text-[12px] w-full p-2 h-20 overflow-y-auto flex flex-col gap-2'>
{uploadedList.data.result_list.map((item, index) => {
let fileNameExt = item.originalname.split('.')[item.originalname.split('.').length - 1]
return(
<div key={item.file_uid} className='flex justify-start gap-2'>
<div key={item.file_uid} className={`my-[6px] flex justify-start gap-2 ${fontSize}`}>
<span>{index + 1}:</span>
<a
target='_blank'