Compare commits

...

7 Commits

Author SHA1 Message Date
victorAnumudu b5a5452a0d bg color fix 2025-09-29 11:24:35 +01:00
victorAnumudu 0a66679950 padding fix 2025-09-29 11:11:50 +01:00
victorAnumudu fd9eb08cea fixed profile table data 2025-09-29 11:06:04 +01:00
CHIEFSOFT\ameye 1e28046093 clean up 2025-09-28 22:42:51 -04:00
CHIEFSOFT\ameye 4b39b73931 more data 2025-09-28 15:28:49 -04:00
CHIEFSOFT\ameye 54bfe7affa Fix layout 2025-09-28 14:44:26 -04:00
ameye d7cfb03550 Merge branch 'account-view-section-fix' of MERMS/MermsFirstOffice into master 2025-09-28 17:56:30 +00:00
6 changed files with 200 additions and 165 deletions
@@ -1,50 +1,59 @@
export default function AccountProfileView({profile}) {
export default function AccountProfileView() {
return <> return <>
<div className="row" style={{paddingBottom:'20px'}}> <div className="pb-5">
<div className="col-12 col-lg-12"> <div className="flex flex-col gap-1">
<div className="card card-statistics"> <div className="w-full">
<div className="card-header"> <h4 className="font-semibold text-lg">Account Profile</h4>
<div className="card-heading">
<h4 className="card-title"><b>Account Profile</b></h4>
</div> </div>
</div> <div className="w-full overflow-x-auto">
<div className="card-body"> <>
<div className="table-responsive"> <table className="py-2 w-full text-sm bg-[aliceblue] dark:bg-transparent rounded-[10px]">
<table className="table table-hover mb-0" style={{width:'100%', backgroundColor: 'aliceblue', borderRadius: '10px'}}> <thead className="py-2 text-sm text-slate-500 text-left">
<thead>
<tr> <tr>
<th scope="col">#</th>
<th scope="col">First</th> <th scope="col" className="px-2 py-2">
<th scope="col">Last</th> Member ID
<th scope="col">Handle</th> </th>
<th scope="col" className="px-2">
Practice/specialization
</th>
<th scope="col" className="px-2">
URL Name
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> {(profile && Object.keys(profile).length > 0) ?
<th scope="row">1</th> <tr className="py-2 border-t border-dashed border-slate-300">
<td>Mark</td> <td className="px-2">
<td>Otto</td> <div className="text-left">
<td>@mdo</td> <div className="text-base font-semibold">{profile?.member_id}</div>
</div>
</td>
<td className="px-2">
<div className="text-left">
<div className="text-base font-semibold">Practice: {profile?.practice}</div>
<div className="text-base font-semibold">Specialization: {profile?.specialization}</div>
</div>
</td>
<td className="px-2">
<div className="text-left">
<div className="text-base font-semibold">{profile?.url_name}</div>
</div>
</td>
</tr> </tr>
<tr> :
<th scope="row">2</th> <tr className="py-2 border-t border-dashed border-slate-300">
<td>Jacob</td> <td className="px-3 py-2" colSpan={3}>
<td>Thornton</td> <div className="flex justify-center items-center">
<td>@fat</td> No Record Found
</tr> </div>
<tr> </td>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr> </tr>
}
</tbody> </tbody>
</table> </table>
</div> </>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -57,7 +57,7 @@ export default function AccountViewCom() {
: :
<> <>
<CustomerAccountView accountInfo={account_info} /> <CustomerAccountView accountInfo={account_info} />
<AccountProfileView /> <AccountProfileView profile={account_profile} />
<CustomerSubscriptionsView subscriptions={subscriptions} memberUID={memberUID} /> <CustomerSubscriptionsView subscriptions={subscriptions} memberUID={memberUID} />
<CustomerPaymentsView payments={payments} /> <CustomerPaymentsView payments={payments} />
</> </>
@@ -10,13 +10,11 @@ export default function CustomerAccountView({accountInfo}) {
</div> </div>
<div className="w-full overflow-x-auto"> <div className="w-full overflow-x-auto">
<> <>
<table className="py-2 w-full text-sm" style={{backgroundColor: 'aliceblue', borderRadius: '10px'}}> <table className="py-2 w-full text-sm bg-[aliceblue] dark:bg-transparent rounded-[10px]">
<thead className="py-2 text-sm text-slate-500 text-left"> <thead className="py-2 text-sm text-slate-500 text-left">
<tr> <tr>
<th scope="col" className="px-2 py-2"> <th scope="col" className="px-2 py-2">
#
</th>
<th scope="col" className="px-2">
Firstname Firstname
</th> </th>
<th scope="col" className="px-2"> <th scope="col" className="px-2">
@@ -28,6 +26,7 @@ export default function CustomerAccountView({accountInfo}) {
<th scope="col" className="px-2"> <th scope="col" className="px-2">
Email Email
</th> </th>
<th scope="col" className="px-2 text-right"> <th scope="col" className="px-2 text-right">
Action Action
</th> </th>
@@ -36,11 +35,11 @@ export default function CustomerAccountView({accountInfo}) {
<tbody> <tbody>
{(accountInfo && Object.keys(accountInfo).length > 0) ? {(accountInfo && Object.keys(accountInfo).length > 0) ?
<tr className="py-2 border-t border-dashed border-slate-300"> <tr className="py-2 border-t border-dashed border-slate-300">
<td className="px-2 py-2"> {/*<td className="px-2 py-2">*/}
<div className="text-left"> {/* <div className="text-left">*/}
<div className="text-base font-semibold">{1}</div> {/* <div className="text-base font-semibold">{1}</div>*/}
</div> {/* </div>*/}
</td> {/*</td>*/}
<td className="px-2"> <td className="px-2">
<div className="text-left"> <div className="text-left">
<div className="text-base font-semibold">{accountInfo?.firstname}</div> <div className="text-base font-semibold">{accountInfo?.firstname}</div>
@@ -61,6 +60,7 @@ export default function CustomerAccountView({accountInfo}) {
<div className="text-base font-semibold">{accountInfo?.email}</div> <div className="text-base font-semibold">{accountInfo?.email}</div>
</div> </div>
</td> </td>
<td className="px-2 text-right"> <td className="px-2 text-right">
<div className='flex items-center justify-end gap-3 md:gap-4'> <div className='flex items-center justify-end gap-3 md:gap-4'>
<div <div
@@ -8,20 +8,23 @@ export default function CustomerPaymentsView({payments}) {
</div> </div>
<div className="w-full overflow-x-auto"> <div className="w-full overflow-x-auto">
<> <>
<table className="py-2 w-full text-sm" style={{backgroundColor: 'aliceblue', borderRadius: '10px'}}> <table className="py-2 w-full text-sm bg-[aliceblue] dark:bg-transparent rounded-[10px]">
<thead className="py-2 text-sm text-slate-500 text-left"> <thead className="py-2 text-sm text-slate-500 text-left">
<tr> <tr>
<th scope="col" className="px-2 py-2"> <th scope="col" className="px-2 py-2">
# #
</th> </th>
<th scope="col" className="px-2"> <th scope="col" className="px-2">
First Added
</th> </th>
<th scope="col" className="px-2"> <th scope="col" className="px-2">
Last Option Name
</th> </th>
<th scope="col" className="px-2"> <th scope="col" className="px-2">
Handle Amount
</th>
<th scope="col" className="px-2">
Currency
</th> </th>
</tr> </tr>
</thead> </thead>
@@ -35,17 +38,22 @@ export default function CustomerPaymentsView({payments}) {
</td> </td>
<td className="px-2"> <td className="px-2">
<div className="text-left"> <div className="text-left">
<div className="text-base font-semibold">{item?.first}</div> <div className="text-base font-semibold">{item?.added}</div>
</div> </div>
</td> </td>
<td className="px-2"> <td className="px-2">
<div className="text-left"> <div className="text-left">
<div className="text-base font-semibold">{item?.last}</div> <div className="text-base font-semibold">{item?.option_name}</div>
</div> </div>
</td> </td>
<td className="px-2"> <td className="px-2">
<div className="text-left"> <div className="text-left">
<div className="text-base font-semibold">{item?.handle}</div> <div className="text-base font-semibold">{item?.amount}</div>
</div>
</td>
<td className="px-2">
<div className="text-left">
<div className="text-base font-semibold">Dollars</div>
</div> </div>
</td> </td>
</tr> </tr>
@@ -12,7 +12,7 @@ export default function CustomerSubscriptionsView({subscriptions, memberUID}) {
</div> </div>
<div className="w-full overflow-x-auto"> <div className="w-full overflow-x-auto">
<> <>
<table className="py-2 w-full text-sm" style={{backgroundColor: 'aliceblue', borderRadius: '10px'}}> <table className="py-2 w-full text-sm bg-[aliceblue] dark:bg-transparent rounded-[10px]">
<thead className="py-2 text-sm text-slate-500 text-left"> <thead className="py-2 text-sm text-slate-500 text-left">
<tr> <tr>
<th scope="col" className="px-2 py-2"> <th scope="col" className="px-2 py-2">
@@ -25,7 +25,7 @@ export default function CustomerSubscriptionsView({subscriptions, memberUID}) {
Product Product
</th> </th>
<th scope="col" className="px-2"> <th scope="col" className="px-2">
URL URL / Templates
</th> </th>
<th scope="col" className="px-2"> <th scope="col" className="px-2">
Status Status
@@ -55,7 +55,10 @@ export default function CustomerSubscriptionsView({subscriptions, memberUID}) {
</td> </td>
<td className="px-2"> <td className="px-2">
<div className="text-left"> <div className="text-left">
<div className="text-base font-semibold">{item?.internal_url}</div> <div className="text-base font-semibold">{item?.internal_url}
<br /><span>Template :</span> {item?.product_template}
<br /><span>Custom :</span> {item?.custom_template}
</div>
</div> </div>
</td> </td>
<td className="px-2"> <td className="px-2">
@@ -67,7 +70,7 @@ export default function CustomerSubscriptionsView({subscriptions, memberUID}) {
<div className='flex items-center justify-end gap-3 md:gap-4'> <div className='flex items-center justify-end gap-3 md:gap-4'>
<div <div
className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'> className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
<Link to={`/subscription-view/${memberUID}`} state={{customerID: item?.id, memberUID}}> <Link to={`/subscription-view/${item?.subscription_uid}`} state={{customerID: item?.id, memberUID}}>
<Icons name='eye'/> <Icons name='eye'/>
</Link> </Link>
</div> </div>
@@ -64,33 +64,39 @@ export default function SubscriptionsCom() {
<div className='px-2 py-2 mb-4 flex flex-col sm:flex-row flex-wrap sm:items-center gap-2'> <div className='px-2 py-2 mb-4 flex flex-col sm:flex-row flex-wrap sm:items-center gap-2'>
<Icons name='filter' className='text-3xl'/> <Icons name='filter' className='text-3xl'/>
<div className='w-full sm:max-w-48'> <div className='w-full sm:max-w-48'>
<select name='type' value={filter?.type} className='h-10 w-full p-2 rounded-md' onChange={handleFilter}> <select name='type' value={filter?.type} className='h-10 w-full p-2 rounded-md'
onChange={handleFilter}>
<option value=''>All</option> <option value=''>All</option>
<option value='member_id'>Member ID</option> <option value='member_id'>Member ID</option>
<option value='product_id'>Product ID</option> <option value='product_id'>Product ID</option>
</select> </select>
</div> </div>
<div className='w-full sm:max-w-48'> <div className='w-full sm:max-w-48'>
<input name='id' value={filter?.id} disabled={!filter.type} className={`h-10 w-full p-2 rounded-md outline-none border border-black-aside ${!filter.type && 'opacity-30'}`} onChange={handleFilter} /> <input name='id' value={filter?.id} disabled={!filter.type}
className={`h-10 w-full p-2 rounded-md outline-none border border-black-aside ${!filter.type && 'opacity-30'}`}
onChange={handleFilter}/>
</div> </div>
<button onClick={handleFilterByParams} disabled={filter.type && !filter.id} className={`h-10 bg-primary px-2 py-1 rounded-md text-white font-medium sm:self-end ${(filter.type && !filter.id) && 'opacity-50'}`}>Submit</button> <button onClick={handleFilterByParams} disabled={filter.type && !filter.id}
className={`h-10 bg-primary px-2 py-1 rounded-md text-white font-medium sm:self-end ${(filter.type && !filter.id) && 'opacity-50'}`}>Submit
</button>
</div> </div>
{/* end of filter section */} {/* end of filter section */}
<TablePaginatedWrapper data={subscriptionData} isFetching={isFetching} setPage={setPage} itemsPerPage={pagination?.limit} pagination={pagination}> <TablePaginatedWrapper data={subscriptionData} isFetching={isFetching} setPage={setPage}
itemsPerPage={pagination?.limit} pagination={pagination}>
{({data}) => ( {({data}) => (
<> <>
<table className="py-2 w-full text-sm"> <table className="py-2 w-full text-sm">
<thead className="py-2 text-sm text-slate-500 text-left"> <thead className="py-2 text-sm text-slate-500 text-left">
<tr> <tr>
<th scope="col" className="px-2 py-2"> <th scope="col" className="px-2 py-2">
Added Added/Updated
</th> </th>
<th scope="col" className="px-2"> <th scope="col" className="px-2">
Product Product
</th> </th>
<th scope="col" className="px-2"> <th scope="col" className="px-2">
URL Internal-URL/External-URL/SubscriptionUID
</th> </th>
<th scope="col" className="px-2 text-right"> <th scope="col" className="px-2 text-right">
Status Status
@@ -104,22 +110,30 @@ export default function SubscriptionsCom() {
{(data && data.length > 0) ? data?.map((item, index) => ( {(data && data.length > 0) ? data?.map((item, index) => (
<tr key={index} className="py-2 border-t border-dashed border-slate-300"> <tr key={index} className="py-2 border-t border-dashed border-slate-300">
<td className="px-2 py-2"> <td className="px-2 py-2">
<div className='w-full min-w-48 flex items-center gap-2 whitespace-nowrap'> <div
className='w-full min-w-48 flex items-center gap-2 whitespace-nowrap'>
{/* <img className="w-10 h-10 rounded-md" src={localImgLoader(`loan_icons/${item?.type}.png`)} alt="Icon" /> */} {/* <img className="w-10 h-10 rounded-md" src={localImgLoader(`loan_icons/${item?.type}.png`)} alt="Icon" /> */}
<div className="text-left"> <div className="text-left">
<div className="text-base font-semibold">{getDateTimeFromDateString(item?.added)}</div> <div
className="text-base font-semibold">
{getDateTimeFromDateString(item?.added)}<br />
{getDateTimeFromDateString(item?.updated)}<br />
</div>
</div> </div>
</div> </div>
</td> </td>
<td className="px-2"> <td className="px-2">
<div className="text-left"> <div className="text-left">
<div className="text-base font-semibold">{item?.product_id}</div> <div
className="text-base font-semibold">{item?.product_id}</div>
</div> </div>
</td> </td>
<td className="px-2"> <td className="px-2">
<div className="text-left"> <div className="text-left">
<div className="text-base font-semibold">{item?.internal_url}</div> <div className="text-base font-semibold ">
<div className="font-normal text-gray-500">{item?.external_url}</div> <span>Int :</span> {item?.internal_url}<br/>
<span>Ext :</span> {item?.external_url}<br/>
{item?.subscription_uid}</div>
</div> </div>
</td> </td>
<td className="px-2"> <td className="px-2">
@@ -132,7 +146,8 @@ export default function SubscriptionsCom() {
<div <div
className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'> className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
<Link to={`/subscription-view/${item?.subscription_uid}`} <Link to={`/subscription-view/${item?.subscription_uid}`}
state={{customerID: item?.id, memberUID: item?.member_uid}}> // state={{customerID: item?.id, memberUID: item?.member_uid}}
>
<Icons name='eye'/> <Icons name='eye'/>
</Link> </Link>
</div> </div>