..
This commit is contained in:
@@ -6,8 +6,8 @@ import moment from 'moment';
|
||||
|
||||
export const ListItem = ({
|
||||
transactionCategory,
|
||||
tid, mid, stateDate, stateCode, stateName,
|
||||
installmentMonth, serviceCode, serviceName,
|
||||
tid, mid, statusCode,
|
||||
installmentMonth, serviceCode,
|
||||
serviceDetailName, goodsAmount,
|
||||
id, amount, customerName, issueNumber,
|
||||
issueStatus, paymentMethod, processResult,
|
||||
@@ -18,13 +18,13 @@ export const ListItem = ({
|
||||
const { navigate } = useNavigate();
|
||||
const getItemClass = () => {
|
||||
let rs = '';
|
||||
if(stateCode === '0'){
|
||||
if(statusCode === '0'){
|
||||
rs = '';
|
||||
}
|
||||
else if(stateCode === '1'){
|
||||
else if(statusCode === '1'){
|
||||
rs = 'approved';
|
||||
}
|
||||
else if(stateCode === '2'){
|
||||
else if(statusCode === '2'){
|
||||
rs = 'refund';
|
||||
}
|
||||
return rs;
|
||||
@@ -32,13 +32,13 @@ export const ListItem = ({
|
||||
|
||||
const getDotClass = (str?: string) => {
|
||||
let rs = '';
|
||||
if(stateCode === '0'){
|
||||
if(statusCode === '0'){
|
||||
rs = '';
|
||||
}
|
||||
else if(stateCode === '1'){
|
||||
else if(statusCode === '1'){
|
||||
rs = 'blue';
|
||||
}
|
||||
else if(stateCode === '2'){
|
||||
else if(statusCode === '2'){
|
||||
rs = 'gray';
|
||||
}
|
||||
return rs;
|
||||
@@ -82,7 +82,7 @@ export const ListItem = ({
|
||||
const getTime = () => {
|
||||
let timeStr = '';
|
||||
if(transactionCategory === TransactionCategory.AllTransaction){
|
||||
let time = stateDate?.substring(8, 12);
|
||||
let time = transactionDateTime?.substring(8, 12);
|
||||
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4);
|
||||
}
|
||||
else{
|
||||
@@ -94,7 +94,15 @@ export const ListItem = ({
|
||||
const getTitle = () => {
|
||||
let str = '';
|
||||
if(transactionCategory === TransactionCategory.AllTransaction){
|
||||
str = `${serviceName}(${serviceDetailName})`;
|
||||
let strDetailName = serviceDetailName?.split('|').join(',');
|
||||
if(strDetailName){
|
||||
let last = strDetailName.slice(-1);
|
||||
if(last === ','){
|
||||
strDetailName = strDetailName.substring(0, strDetailName.length - 1);
|
||||
}
|
||||
str = `(${strDetailName})`;
|
||||
}
|
||||
|
||||
}
|
||||
else if(transactionCategory === TransactionCategory.CashReceipt){
|
||||
str = `${customerName}(${issueNumber})`
|
||||
@@ -115,7 +123,7 @@ export const ListItem = ({
|
||||
<div className="transaction-details">
|
||||
<span>{ getTime() }</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ stateName }</span>
|
||||
<span>{ statusCode }</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ mid }</span>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user