Compare commits

...

3 Commits

Author SHA1 Message Date
victorAnumudu f3ad4d576e card list image added 2023-07-14 18:42:28 +01:00
CHIEFSOFT\ameye e01d0106ad cards images 2023-07-14 13:19:41 -04:00
ameye 68472f8c66 Merge branch 'card-list-page' of WrenchBoard/Users-Wrench into master 2023-07-14 17:00:38 +00:00
6 changed files with 36 additions and 41 deletions
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.0 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" id="Visacard"><g fill="#767fad" class="color303c42 svgShape"><path d="M28 4H2C.897 4 0 4.897 0 6v18c0 1.103.897 2 2 2h26c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2zm1 20c0 .551-.449 1-1 1H2c-.551 0-1-.449-1-1V6c0-.551.449-1 1-1h26c.551 0 1 .449 1 1v18z" fill="#5218ed" class="color000000 svgShape"></path><path d="M7.677 14.266a.2.2 0 0 0 .228.053.17.17 0 0 0 .106-.194l-.314-1.368a.121.121 0 0 0-.002-.009c-.113-.39-.47-.449-.729-.459H6.96l-1.768-.002c-.091 0-.17.06-.185.143a.172.172 0 0 0 .121.193c1.078.358 1.96.926 2.55 1.643zM23.535 12.303h-1.15c-.46 0-.724.141-.883.473l-2.383 4.981a.162.162 0 0 0 .014.165c.035.05.094.079.158.079h1.35a.189.189 0 0 0 .176-.112c.165-.404.272-.661.307-.744h.974l1.183.002c.039.151.134.552.173.717.019.08.095.137.184.137h1.177c.057 0 .11-.024.146-.065s.05-.095.038-.146l-1.28-5.351a.185.185 0 0 0-.184-.136zm-1.926 3.675.895-2.138.114.492.39 1.646h-1.4z" fill="#5218ed" class="color000000 svgShape"></path><path d="M11.816 12.38a.193.193 0 0 0-.157-.078h-1.37a.188.188 0 0 0-.175.11L8.511 16.19l-.172-.575a.142.142 0 0 0-.009-.023c-.253-.542-.933-1.39-1.881-2.062-.065-.046-.154-.048-.221-.006s-.097.12-.074.192L7.47 17.87a.187.187 0 0 0 .18.124l1.518-.002a.19.19 0 0 0 .173-.104l2.49-5.344a.162.162 0 0 0-.016-.164zM14.088 12.297h-1.303a.184.184 0 0 0-.186.144l-.989 5.355a.165.165 0 0 0 .042.141c.036.04.088.062.144.062h1.302c.092 0 .17-.061.186-.145l.99-5.354a.164.164 0 0 0-.042-.141.195.195 0 0 0-.144-.062zM17.696 13.452h.05c.51 0 .87.107 1.097.187a.202.202 0 0 0 .16-.011.175.175 0 0 0 .093-.122l.152-.826c.016-.085-.039-.168-.128-.194a4.634 4.634 0 0 0-1.3-.182c-1.607 0-2.735.746-2.744 1.814-.01.79.807 1.231 1.422 1.494.632.269.844.441.841.682-.004.369-.506.536-.97.536a3.676 3.676 0 0 1-1.522-.285.202.202 0 0 0-.163.008.175.175 0 0 0-.095.123l-.161.87a.173.173 0 0 0 .123.193c.444.144 1.064.233 1.66.24h.001c1.705-.001 2.815-.739 2.827-1.88.006-.627-.427-1.1-1.36-1.49-.57-.256-.92-.426-.917-.686 0-.234.32-.47.934-.47z" fill="#5218ed" class="color000000 svgShape"></path></g></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

+32 -26
View File
@@ -1,6 +1,8 @@
import React, {useEffect, useState} from 'react'
import method1 from "../../../assets/images/payment-method-1.png";
import method1 from "../../../assets/images/payment-cards/discover-card.svg";
import LoadingSpinner from '../../Spinners/LoadingSpinner';
import localImgLoad from '../../../lib/localImgLoad';
import usersService from "../../../services/UsersService";
import { handlePagingFunc } from '../../Pagination';
import PaginatedList from '../../Pagination/PaginatedList';
@@ -21,6 +23,7 @@ function CardList() {
useEffect(()=>{
api.payListCard().then(res=>{
console.log('TESTING', res.data?.result_list)
setCardList({loading: false, data:res.data?.result_list})
}).catch(err => {
setCardList({loading: false, data:[]})
@@ -36,34 +39,37 @@ function CardList() {
</div>
:
cardList.data.length ?
currentCardList.map(item =>(
<li key={item.card_uid} className="sm:flex justify-between items-center w-full py-3 border-b border-light-purple dark:border-[#5356fb29] ">
<div className="flex space-x-5 mb-2 sm:mb-0">
<div className="w-[50px] h-[50px] flex items-center justify-center rounded-full sm:bg-light-purple dark:bg-dark-light-purple ">
<img className='rounded-full w-full h-full' src={method1} alt="payment" />
currentCardList.map(item =>{
let image = item.description && localImgLoad(`images/payment-cards/${item.description.toLowerCase()}-card.svg`)
return(
<li key={item.card_uid} className="sm:flex justify-between items-center w-full py-3 border-b border-light-purple dark:border-[#5356fb29] ">
<div className="flex space-x-5 mb-2 sm:mb-0">
<div className="w-[70px] h-[70px] flex items-center justify-center rounded-full sm:bg-light-purple dark:bg-dark-light-purple ">
<img src={image ? image : method1} className='w-[50px] h-[50px]' alt="payment" />
</div>
<div>
<p className="sm:text-xl text-lg tracking-wide text-dark-gray dark:text-white">
Added: {item.added}
</p>
<p className="text-thin-light-gray sm:text-18 text-sm tracking-wide">
{item.description} **********{item.digits}
</p>
{/* <p className="sm:text-18 text-sm tracking-wide text-light-green">
Verified
</p> */}
</div>
</div>
<div>
<p className="sm:text-xl text-lg tracking-wide text-dark-gray dark:text-white">
Added: {item.added}
</p>
<p className="text-thin-light-gray sm:text-18 text-sm tracking-wide">
{item.description} **********{item.digits}
</p>
{/* <p className="sm:text-18 text-sm tracking-wide text-light-green">
Verified
</p> */}
<button
type="button"
className="w-[95px] sm:h-[46px] h-[40px] rounded-full btn-gradient text-white sm:text-18 text-md tracking-wide"
>
Delete
</button>
</div>
</div>
<div>
<button
type="button"
className="w-[95px] sm:h-[46px] h-[40px] rounded-full btn-gradient text-white sm:text-18 text-md tracking-wide"
>
Delete
</button>
</div>
</li>
))
</li>
)}
)
:
<h1 className='font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap'>No Cards Found</h1>
}
@@ -12,20 +12,6 @@ export default function PaymentMathodsTab() {
<div className="payment-method-tab w-full">
<div className="payment-item-wrapper w-full">
<CardList />
<div className="py-7 flex space-x-4">
<button
type="button"
className="btn-shine text-white text-18 bg-pink tracking-wide px-4 py-3 rounded-full"
>
Add Bank
</button>
<button
type="button"
className="text-white text-18 bg-light-green tracking-wide px-4 py-3 rounded-full"
>
Add Card
</button>
</div>
</div>
</div>
</>
+1 -1
View File
@@ -58,7 +58,7 @@ export default function Settings({ faq }) {
{
id: 2,
name: "payment",
title: "Payment Method",
title: "Payment Cards",
iconName: "bank-card",
},
{