updat trx kind
This commit is contained in:
114
package-lock.json
generated
114
package-lock.json
generated
@ -116,6 +116,118 @@
|
||||
"vite": "^5.4.11"
|
||||
}
|
||||
},
|
||||
"../dashboard-tpay/": {
|
||||
"name": "metronic-tailwind-react",
|
||||
"version": "9.1.2",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@auth0/auth0-spa-js": "^2.1.3",
|
||||
"@emotion/cache": "^11.13.1",
|
||||
"@emotion/react": "^11.13.3",
|
||||
"@emotion/styled": "^11.13.0",
|
||||
"@faker-js/faker": "^9.1.0",
|
||||
"@firebase/app": "^0.10.15",
|
||||
"@firebase/auth": "^1.8.0",
|
||||
"@firebase/firestore": "^4.7.4",
|
||||
"@formatjs/intl-pluralrules": "^5.3.4",
|
||||
"@formatjs/intl-relativetimeformat": "^11.4.4",
|
||||
"@mui/base": "5.0.0-beta.40",
|
||||
"@mui/icons-material": "^6.4.6",
|
||||
"@mui/material": "^6.1.6",
|
||||
"@mui/utils": "^6.1.6",
|
||||
"@radix-ui/react-avatar": "^1.1.1",
|
||||
"@radix-ui/react-checkbox": "^1.1.2",
|
||||
"@radix-ui/react-collapsible": "^1.1.1",
|
||||
"@radix-ui/react-dialog": "^1.1.2",
|
||||
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
||||
"@radix-ui/react-popover": "^1.1.2",
|
||||
"@radix-ui/react-scroll-area": "^1.2.0",
|
||||
"@radix-ui/react-select": "^2.1.2",
|
||||
"@radix-ui/react-separator": "^1.1.0",
|
||||
"@radix-ui/react-slider": "^1.2.1",
|
||||
"@radix-ui/react-slot": "^1.1.0",
|
||||
"@radix-ui/react-switch": "^1.1.1",
|
||||
"@radix-ui/react-tooltip": "^1.1.3",
|
||||
"@tanstack/react-query": "^5.59.20",
|
||||
"@tanstack/react-table": "^8.20.5",
|
||||
"apexcharts": "3.52.0",
|
||||
"axios": "^1.7.7",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.1.1",
|
||||
"cmdk": "^1.0.4",
|
||||
"date-fns": "^3.0.0",
|
||||
"exceljs": "^4.4.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"formik": "^2.4.6",
|
||||
"helmet": "^8.1.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
"https": "^1.0.0",
|
||||
"jspdf": "^3.0.1",
|
||||
"jspdf-autotable": "^5.0.2",
|
||||
"leaflet": "^1.9.4",
|
||||
"lucide-react": "^0.456.0",
|
||||
"metronic-tailwind-react": "file:",
|
||||
"mini-svg-data-uri": "^1.4.4",
|
||||
"moment": "^2.30.1",
|
||||
"next-themes": "^0.4.3",
|
||||
"notistack": "^3.0.1",
|
||||
"papaparse": "^5.5.3",
|
||||
"postcss-preset-env": "^10.1.0",
|
||||
"qs": "^6.13.0",
|
||||
"react": "^18.3.1",
|
||||
"react-apexcharts": "1.4.1",
|
||||
"react-day-picker": "^8.10.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-helmet": "^6.1.0",
|
||||
"react-helmet-async": "^2.0.5",
|
||||
"react-inlinesvg": "^4.1.4",
|
||||
"react-intl": "^6.8.7",
|
||||
"react-leaflet": "^4.2.1",
|
||||
"react-number-format": "^5.4.3",
|
||||
"react-query": "^3.39.3",
|
||||
"react-router": "^6.28.0",
|
||||
"react-router-dom": "^6.28.0",
|
||||
"recharts": "^2.15.3",
|
||||
"sonner": "^1.7.0",
|
||||
"styled-components": "^6.1.13",
|
||||
"stylis": "^4.3.4",
|
||||
"stylis-plugin-rtl": "^2.1.1",
|
||||
"sweetalert2": "^11.21.0",
|
||||
"tabs": "^0.2.0",
|
||||
"tailwind-merge": "^2.5.4",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"vite-plugin-windicss": "^1.9.3",
|
||||
"xlsx": "^0.18.5",
|
||||
"yup": "^1.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.14.0",
|
||||
"@types/file-saver": "^2.0.7",
|
||||
"@types/leaflet": "^1.9.14",
|
||||
"@types/node": "^22.9.0",
|
||||
"@types/papaparse": "^5.3.16",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@types/react-helmet": "^6.1.11",
|
||||
"@types/styled-components": "^5.1.34",
|
||||
"@types/stylis": "^4.2.6",
|
||||
"@typescript-eslint/eslint-plugin": "^8.14.0",
|
||||
"@typescript-eslint/parser": "^8.14.0",
|
||||
"@vitejs/plugin-react": "^4.3.3",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint": "^9.13.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.2.1",
|
||||
"eslint-plugin-react-hooks": "^5.1.0-rc-fb9a90fa48-20240614",
|
||||
"eslint-plugin-react-refresh": "^0.4.14",
|
||||
"postcss": "^8.4.49",
|
||||
"prettier": "^3.3.3",
|
||||
"tailwindcss": "^3.4.14",
|
||||
"typescript": "^5.6.3",
|
||||
"typescript-eslint": "^8.14.0",
|
||||
"vite": "^5.4.11"
|
||||
}
|
||||
},
|
||||
"node_modules/@alloc/quick-lru": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
|
||||
@ -7419,7 +7531,7 @@
|
||||
}
|
||||
},
|
||||
"node_modules/metronic-tailwind-react": {
|
||||
"resolved": "",
|
||||
"resolved": "../dashboard-tpay/",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/micromatch": {
|
||||
|
||||
@ -134,7 +134,7 @@ const DetailTransaction = () => {
|
||||
return null;
|
||||
};
|
||||
|
||||
const formatTokenDec = (token:any) => {
|
||||
const formatTokenDec = (token: any) => {
|
||||
if (token != null && token !== "") {
|
||||
return token.match(/.{1,4}/g)?.join(" ");
|
||||
} else {
|
||||
@ -468,44 +468,46 @@ const DetailTransaction = () => {
|
||||
<p className="font-medium">
|
||||
{(() => {
|
||||
let kind;
|
||||
if (transactionDetails?.kind === 'T') {
|
||||
kind = 'TRANSFER';
|
||||
if (transactionDetails?.kind === 'R') {
|
||||
kind = 'Return';
|
||||
} else if (transactionDetails?.kind === 'T') {
|
||||
kind = 'Transfer';
|
||||
} else if (transactionDetails?.kind === 'P') {
|
||||
kind = 'PURCHASE';
|
||||
} else if (transactionDetails?.kind === 'W') {
|
||||
kind = 'WITHDRAW';
|
||||
} else if (transactionDetails?.kind === 'U') {
|
||||
kind = 'TOP UP';
|
||||
} else if (transactionDetails?.kind === 'R') {
|
||||
kind = 'RETURN';
|
||||
} else if (transactionDetails?.kind === 'E') {
|
||||
kind = 'REWARD';
|
||||
kind = 'Purchase';
|
||||
} else if (transactionDetails?.kind === 'L') {
|
||||
kind = 'PURCHASE LOJA';
|
||||
kind = 'Purchase Loja';
|
||||
} else if (transactionDetails?.kind === 'W') {
|
||||
kind = 'Withdraw';
|
||||
} else if (transactionDetails?.kind === 'U') {
|
||||
kind = 'Topup';
|
||||
} else if (transactionDetails?.kind === 'B') {
|
||||
kind = 'TOP UP P24';
|
||||
kind = 'Topup P24';
|
||||
} else if (transactionDetails?.kind === 'N') {
|
||||
kind = 'Topup Partner';
|
||||
} else if (transactionDetails?.kind === 'E') {
|
||||
kind = 'Reward';
|
||||
} else if (transactionDetails?.kind === 'A') {
|
||||
kind = 'TRANSFER AGENT';
|
||||
kind = 'Transfer Agent';
|
||||
} else if (transactionDetails?.kind === 'M') {
|
||||
kind = 'WITHDRAWAL AGENT';
|
||||
kind = 'Withdraw Agent';
|
||||
} else if (transactionDetails?.kind === 'O') {
|
||||
kind = 'TOPUP AGENT';
|
||||
kind = 'Topup Agent';
|
||||
} else if (transactionDetails?.kind === 'S') {
|
||||
kind = 'TOPUP P24';
|
||||
kind = 'Transfer P24';
|
||||
} else if (transactionDetails?.kind === 'I') {
|
||||
kind = 'WITHDRAW MERCHANT';
|
||||
kind = 'Withdraw Merchant';
|
||||
} else if (transactionDetails?.kind === 'D') {
|
||||
kind = 'DONATION';
|
||||
kind = 'Donation';
|
||||
} else if (transactionDetails?.kind === 'F') {
|
||||
kind = 'FEE';
|
||||
kind = 'Fee';
|
||||
} else if (transactionDetails?.kind === 'V') {
|
||||
kind = 'REVERSAL';
|
||||
kind = 'Raversal';
|
||||
} else if (transactionDetails?.kind === 'C') {
|
||||
kind = 'CASHBACK CASH';
|
||||
kind = 'Cashback Cash';
|
||||
} else if (transactionDetails?.kind === 'H') {
|
||||
kind = 'CASHBACK POINT';
|
||||
kind = 'Cashback Point';
|
||||
} else if (transactionDetails?.kind === 'J') {
|
||||
kind = 'WITHDRAW ADMIN';
|
||||
kind = 'Withdraw Admin';
|
||||
}
|
||||
|
||||
return kind;
|
||||
|
||||
@ -36,11 +36,11 @@ interface ContextProps {
|
||||
const initialProps: ContextProps = {
|
||||
getTransactionLists: async () => ({ data: [], totalCount: 0 }),
|
||||
showDetailDialog: false,
|
||||
setShowDetailDialog: () => {},
|
||||
setShowDetailDialog: () => { },
|
||||
showRollbackDialog: false,
|
||||
setShowRollbackDialog: () => {},
|
||||
setShowRollbackDialog: () => { },
|
||||
selectedTransactionId: null,
|
||||
setSelectedTransactionId: () => {}
|
||||
setSelectedTransactionId: () => { }
|
||||
};
|
||||
|
||||
const ManageTransactionContext = createContext<ContextProps>(initialProps);
|
||||
@ -83,46 +83,46 @@ const TransactionProvider = ({ children }: { children: React.ReactNode }) => {
|
||||
{
|
||||
accessorFn: (row) => {
|
||||
switch (row.kind) {
|
||||
case 'T':
|
||||
return 'TRANSFER';
|
||||
case 'P':
|
||||
return 'PURCHASE';
|
||||
case 'W':
|
||||
return 'WITHDRAW';
|
||||
case 'U':
|
||||
return 'TOP UP';
|
||||
case 'R':
|
||||
return 'RETURN';
|
||||
case 'N':
|
||||
return 'TOP UP PARTNER';
|
||||
case 'E':
|
||||
return 'REWARD';
|
||||
return 'Return';
|
||||
case 'T':
|
||||
return 'Transfer';
|
||||
case 'P':
|
||||
return 'Purchase';
|
||||
case 'L':
|
||||
return 'PURCHASE LOJA';
|
||||
return 'Purchase Loja';
|
||||
case 'W':
|
||||
return 'Withdraw';
|
||||
case 'U':
|
||||
return 'Topup';
|
||||
case 'B':
|
||||
return 'TOP UP P24';
|
||||
return 'Topup P24';
|
||||
case 'N':
|
||||
return 'Topup Partner';
|
||||
case 'E':
|
||||
return 'Reward';
|
||||
case 'A':
|
||||
return 'TRANSFER AGENT';
|
||||
return 'Transfer Agent';
|
||||
case 'M':
|
||||
return 'WITHDRAWAL AGENT';
|
||||
return 'Withdraw Agent';
|
||||
case 'O':
|
||||
return 'TOP UP AGENT';
|
||||
return 'Topup Agent';
|
||||
case 'S':
|
||||
return 'TRANSFER P24';
|
||||
return 'Transfer P24';
|
||||
case 'I':
|
||||
return 'WIJTDRAW MERCHANT';
|
||||
return 'Withdraw Merchant';
|
||||
case 'D':
|
||||
return 'DONATION';
|
||||
return 'Donation';
|
||||
case 'F':
|
||||
return 'FEE';
|
||||
return 'Fee';
|
||||
case 'V':
|
||||
return 'REVERSAL';
|
||||
return 'Raversal';
|
||||
case 'C':
|
||||
return 'CASHBACK CASH';
|
||||
return 'Cashback Cash';
|
||||
case 'H':
|
||||
return 'CASHBACK POINT';
|
||||
return 'Cashback Point';
|
||||
case 'J':
|
||||
return 'WITHDRAW ADMIN';
|
||||
return 'Withdraw Admin';
|
||||
default:
|
||||
return '_';
|
||||
}
|
||||
|
||||
14
yarn.lock
14
yarn.lock
@ -629,10 +629,10 @@
|
||||
resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz"
|
||||
integrity sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==
|
||||
|
||||
"@esbuild/darwin-x64@0.21.5":
|
||||
"@esbuild/darwin-arm64@0.21.5":
|
||||
version "0.21.5"
|
||||
resolved "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz"
|
||||
integrity sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==
|
||||
resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz"
|
||||
integrity sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==
|
||||
|
||||
"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
|
||||
version "4.4.1"
|
||||
@ -1603,10 +1603,10 @@
|
||||
resolved "https://registry.npmjs.org/@remix-run/router/-/router-1.21.0.tgz"
|
||||
integrity sha512-xfSkCAchbdG5PnbrKqFWwia4Bi61nH+wm8wLEqfHDyp7Y3dZzgqS2itV8i4gAq9pC2HsTpwyBC6Ds8VHZ96JlA==
|
||||
|
||||
"@rollup/rollup-darwin-x64@4.24.2":
|
||||
"@rollup/rollup-darwin-arm64@4.24.2":
|
||||
version "4.24.2"
|
||||
resolved "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.2.tgz"
|
||||
integrity sha512-1F/jrfhxJtWILusgx63WeTvGTwE4vmsT9+e/z7cZLKU8sBMddwqw3UV5ERfOV+H1FuRK3YREZ46J4Gy0aP3qDA==
|
||||
resolved "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.2.tgz"
|
||||
integrity sha512-/UhrIxobHYCBfhi5paTkUDQ0w+jckjRZDZ1kcBL132WeHZQ6+S5v9jQPVGLVrLbNUebdIRpIt00lQ+4Z7ys4Rg==
|
||||
|
||||
"@tanstack/query-core@5.59.20":
|
||||
version "5.59.20"
|
||||
@ -3672,7 +3672,7 @@ merge2@^1.3.0:
|
||||
|
||||
"metronic-tailwind-react@file:":
|
||||
version "9.1.2"
|
||||
resolved "file:"
|
||||
resolved "file:../dashboard-tpay/"
|
||||
dependencies:
|
||||
"@auth0/auth0-spa-js" "^2.1.3"
|
||||
"@emotion/cache" "^11.13.1"
|
||||
|
||||
Reference in New Issue
Block a user