Compare commits

...

4 Commits

Author SHA1 Message Date
victorAnumudu 66a2bcacd5 profile image upload added 2026-02-10 18:17:44 +01:00
ameye ec9d84b779 Merge branch 'truncating-text' of MERMS/MermsPanelReactJS into master 2026-02-10 17:00:38 +00:00
victorAnumudu 8ee793d11e text truncated 2026-02-09 19:11:17 +01:00
ameye 46f17cbdfe Merge branch 'template-payload-fix' of MERMS/MermsPanelReactJS into master 2026-01-21 09:45:48 +00:00
3 changed files with 28 additions and 23 deletions
+19 -14
View File
@@ -41,22 +41,27 @@ export default function Products() {
</div> </div>
: :
<div className="row m-b-20"> <div className="row m-b-20">
{products && products.map((product, index) => ( {products && products.map((product, index) =>
<div key={product.uid+index} className={`col-xxs-6 col-xl-4 col-xxl-6 mb-2 mb-xxl-0`}> {
<Link to={productPath(product?.product_id)} > // let productName = product?.name?.length > 14 ? product?.name?.substring(0, 14) + '...' : product?.name
<div className={`d-flex align-items-center extraProductCard ${product?.icon_style}`} style={{borderColor:'black', borderWidth: '2px'}} > return (
<div className="icon-container img-icon m-r-20 bg-light-gray rounded"> <div key={product.uid+index} className={`col-12 col-lg-6 mb-2 mb-xxl-0`}>
<i className={`fa ${product?.product_icon} text-primary`}></i> <Link to={productPath(product?.product_id)} >
<div className={`d-flex align-items-center extraProductCard ${product?.icon_style}`} style={{borderColor:'black', borderWidth: '2px'}} >
<div className="icon-container img-icon m-r-20 bg-light-gray rounded">
<i className={`fa ${product?.product_icon} text-primary`}></i>
</div>
<div className="report-details overflow-hidden">
<p><span style={{fontWeight: 'bolder', color: '#00557A'}}>{product?.status_text}</span></p>
<h4><span className='w-100 d-inline-block text-truncate' style={{paddingLeft: '10px'}}>{product?.name}</span></h4>
</div>
</div> </div>
<div className="report-details"> </Link>
<p><span style={{fontWeight: 'bolder', color: '#00557A'}}>{product?.status_text}</span></p>
<h4><span className='text-truncate' style={{paddingLeft: '10px'}}>{product?.name}</span></h4>
</div>
</div>
</Link>
</div> </div>
))} )
}
)}
</div> </div>
} }
<div className="apexchart-wrapper"> <div className="apexchart-wrapper">
+6 -6
View File
@@ -26,15 +26,15 @@ const ProfileImage = memo(({intialData}) => {
const uploadProfileMutation = useMutation({ const uploadProfileMutation = useMutation({
mutationFn: (fields) => { mutationFn: (fields) => {
if(!fields.img){ if(!fields.file){
throw new Error('Please, select an image') throw new Error('Please, select an image')
} }
return uploadProfileImg(fields) return uploadProfileImg(fields)
}, },
onSuccess: (res) => { onSuccess: (res) => {
if(res.data.resultCode != '0'){ // if(res.data.resultCode != '0'){
throw({message: res?.data?.resultDescription ? res?.data?.resultDescription : 'An error occured'}) // throw({message: res?.data?.resultDescription ? res?.data?.resultDescription : 'An error occured'})
} // }
// const account_name = res?.data?.personal_data?.account_name // const account_name = res?.data?.personal_data?.account_name
// dispatch(updateUserDetails({ account_name })); // dispatch(updateUserDetails({ account_name }));
}, },
@@ -51,8 +51,8 @@ const ProfileImage = memo(({intialData}) => {
const proceedToUpload = () => { const proceedToUpload = () => {
let reqData = { let reqData = {
token: localStorage.getItem('token'), // USER TOKEN token: localStorage.getItem('token'), // USER TOKEN
uid: localStorage.getItem('uid'), // USER UID member_uid: localStorage.getItem('uid'), // USER UID
img: selectedImg file: selectedImg
} }
// console.log('reqData', reqData) // console.log('reqData', reqData)
uploadProfileMutation.mutate(reqData) uploadProfileMutation.mutate(reqData)
+2 -2
View File
@@ -358,8 +358,8 @@ export const uploadProfileImg = (reqData) => {
let postData = { let postData = {
...reqData, ...reqData,
} }
throw new Error('Opps') return postAuxEnd(`/upload/profile-picture`, postData, true)
// return postAuxEnd(`/panel/account/profile-update`, postData, true) // throw new Error('Opps')
} }