Update tampilan
This commit is contained in:
10
package-lock.json
generated
10
package-lock.json
generated
@ -45,6 +45,7 @@
|
|||||||
"cmdk": "^1.0.4",
|
"cmdk": "^1.0.4",
|
||||||
"date-fns": "^3.0.0",
|
"date-fns": "^3.0.0",
|
||||||
"formik": "^2.4.6",
|
"formik": "^2.4.6",
|
||||||
|
"helmet": "^8.1.0",
|
||||||
"https": "^1.0.0",
|
"https": "^1.0.0",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"lucide-react": "^0.456.0",
|
"lucide-react": "^0.456.0",
|
||||||
@ -6055,6 +6056,15 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/helmet": {
|
||||||
|
"version": "8.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/helmet/-/helmet-8.1.0.tgz",
|
||||||
|
"integrity": "sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/hoist-non-react-statics": {
|
"node_modules/hoist-non-react-statics": {
|
||||||
"version": "3.3.2",
|
"version": "3.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
|
||||||
|
|||||||
@ -51,6 +51,7 @@
|
|||||||
"cmdk": "^1.0.4",
|
"cmdk": "^1.0.4",
|
||||||
"date-fns": "^3.0.0",
|
"date-fns": "^3.0.0",
|
||||||
"formik": "^2.4.6",
|
"formik": "^2.4.6",
|
||||||
|
"helmet": "^8.1.0",
|
||||||
"https": "^1.0.0",
|
"https": "^1.0.0",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"lucide-react": "^0.456.0",
|
"lucide-react": "^0.456.0",
|
||||||
|
|||||||
@ -15,7 +15,7 @@ const Footer = () => {
|
|||||||
className="text-gray-600 hover:text-primary"
|
className="text-gray-600 hover:text-primary"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
Brillian Dev.
|
TPAY Dev.
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -2,31 +2,35 @@ import { Container, DataGridInner } from '@/components';
|
|||||||
import { ManageCurrencyContextProvider } from './hooks/ManageCurrencyContext';
|
import { ManageCurrencyContextProvider } from './hooks/ManageCurrencyContext';
|
||||||
import AddDialog from './blocks/AddDialog';
|
import AddDialog from './blocks/AddDialog';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const ManageCurrency = () => {
|
const ManageCurrency = () => {
|
||||||
return (
|
return (
|
||||||
<ManageCurrencyContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet><title>TPAY | Manage Currency</title></Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Currency</h1>
|
<ManageCurrencyContextProvider>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
<Container>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Currency</h1>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
</Link>
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Accounts</span>
|
<span className="text-sm">Accounts</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Currency</span>
|
<span className="text-sm">Manage Currency</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageCurrencyContextProvider>
|
</ManageCurrencyContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import { Button } from '@/components/ui/button';
|
|||||||
import { useFetchYear } from './hooks/useFetchYear';
|
import { useFetchYear } from './hooks/useFetchYear';
|
||||||
import { get5LastYear } from '@/utils/Date';
|
import { get5LastYear } from '@/utils/Date';
|
||||||
import { staticChartData } from './staticChart';
|
import { staticChartData } from './staticChart';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
// sum -> nominal, count-> total
|
// sum -> nominal, count-> total
|
||||||
type CountType = 'sum' | 'count';
|
type CountType = 'sum' | 'count';
|
||||||
@ -138,64 +139,69 @@ const DashboardHomePage = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<>
|
||||||
<div className="flex gap-3 items-center mb-6">
|
<Helmet>
|
||||||
<YearPicker selectedYear={selectedYear} setSelectedYear={handleYearChange} />
|
<title>TPAY | Dashboard</title>
|
||||||
<div className="w-auto min-w-[120px]">
|
</Helmet>
|
||||||
<Select value={count} onValueChange={handleCountType}>
|
<Container>
|
||||||
<SelectTrigger size="sm">
|
<div className="flex gap-3 items-center mb-6">
|
||||||
<SelectValue placeholder="Select Count Type" />
|
<YearPicker selectedYear={selectedYear} setSelectedYear={handleYearChange} />
|
||||||
</SelectTrigger>
|
<div className="w-auto min-w-[120px]">
|
||||||
<SelectContent className="w-32">
|
<Select value={count} onValueChange={handleCountType}>
|
||||||
<SelectItem value="sum">Nominal</SelectItem>
|
<SelectTrigger size="sm">
|
||||||
<SelectItem value="count">Status</SelectItem>
|
<SelectValue placeholder="Select Count Type" />
|
||||||
</SelectContent>
|
</SelectTrigger>
|
||||||
</Select>
|
<SelectContent className="w-32">
|
||||||
</div>
|
<SelectItem value="sum">Nominal</SelectItem>
|
||||||
{/* <DefaultTooltip title="Filter" placement="top">
|
<SelectItem value="count">Status</SelectItem>
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
{/* <DefaultTooltip title="Filter" placement="top">
|
||||||
<Button variant="outline" className="h-7.5" onClick={() => handleFilter(dateRange)}>
|
<Button variant="outline" className="h-7.5" onClick={() => handleFilter(dateRange)}>
|
||||||
<KeenIcon icon="filter" />
|
<KeenIcon icon="filter" />
|
||||||
</Button>
|
</Button>
|
||||||
</DefaultTooltip> */}
|
</DefaultTooltip> */}
|
||||||
<DefaultTooltip title="Reset Filter" placement="top">
|
<DefaultTooltip title="Reset Filter" placement="top">
|
||||||
<Button variant="outline" className="h-7.5" onClick={resetFilter}>
|
<Button variant="outline" className="h-7.5" onClick={resetFilter}>
|
||||||
<KeenIcon icon="arrow-circle-left" />
|
<KeenIcon icon="arrow-circle-left" />
|
||||||
</Button>
|
</Button>
|
||||||
</DefaultTooltip>
|
</DefaultTooltip>
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Cards */}
|
|
||||||
<div className="grid gap-5 lg:gap-7.5 mb-5">
|
|
||||||
<div className="grid lg:grid-cols-4 gap-y-5 lg:gap-5 items-stretch">
|
|
||||||
{cardData.map((data: any) => (
|
|
||||||
<div className="lg:col-span-1" key={data.type}>
|
|
||||||
<Card
|
|
||||||
title={data.type.toUpperCase()}
|
|
||||||
total={data.total}
|
|
||||||
type={data.type}
|
|
||||||
count={count}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Chart */}
|
{/* Cards */}
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5 mb-5">
|
||||||
<div className="grid lg:grid-cols-1 gap-y-5 lg:gap-5 items-stretch">
|
<div className="grid lg:grid-cols-4 gap-y-5 lg:gap-5 items-stretch">
|
||||||
<div className="lg:col-span-1">
|
{cardData.map((data: any) => (
|
||||||
<Chart
|
<div className="lg:col-span-1" key={data.type}>
|
||||||
title="Overview"
|
<Card
|
||||||
count={12}
|
title={data.type.toUpperCase()}
|
||||||
toolbar={toolbar}
|
total={data.total}
|
||||||
chartData={staticChartData.series.map((data: any) => data.data)}
|
type={data.type}
|
||||||
chartType={chartType}
|
count={count}
|
||||||
chartLegend={chartLegend}
|
/>
|
||||||
/>
|
</div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</Container>
|
{/* Chart */}
|
||||||
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
|
<div className="grid lg:grid-cols-1 gap-y-5 lg:gap-5 items-stretch">
|
||||||
|
<div className="lg:col-span-1">
|
||||||
|
<Chart
|
||||||
|
title="Overview"
|
||||||
|
count={12}
|
||||||
|
toolbar={toolbar}
|
||||||
|
chartData={staticChartData.series.map((data: any) => data.data)}
|
||||||
|
chartType={chartType}
|
||||||
|
chartLegend={chartLegend}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Container>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import { DataTable } from '@/components/ui/DataTable';
|
|||||||
import { columns, Group } from './Column';
|
import { columns, Group } from './Column';
|
||||||
import { apiConfig } from '@/config/api.config';
|
import { apiConfig } from '@/config/api.config';
|
||||||
import axios, { AxiosResponse } from 'axios';
|
import axios, { AxiosResponse } from 'axios';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
import {
|
import {
|
||||||
DialogContent,
|
DialogContent,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
@ -153,20 +154,23 @@ const ManageGroups = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<div className="container mx-auto">
|
<Helmet>
|
||||||
<ConfirmDialog
|
<title>TPAY | Manage Group</title>
|
||||||
open={dialogOpen}
|
</Helmet>
|
||||||
onClose={() => setDialogOpen(false)}
|
<ConfirmDialog
|
||||||
title="Confirm Action"
|
open={dialogOpen}
|
||||||
content={
|
onClose={() => setDialogOpen(false)}
|
||||||
`Are you sure you want to ` +
|
title="Confirm Action"
|
||||||
(dialogType === 'create' ? 'create?' : dialogType === 'update' ? 'update?' : 'delete?')
|
content={
|
||||||
}
|
`Are you sure you want to ` +
|
||||||
onYes={handleYes}
|
(dialogType === 'create' ? 'create?' : dialogType === 'update' ? 'update?' : 'delete?')
|
||||||
onNo={() => setDialogOpen(false)}
|
}
|
||||||
/>
|
onYes={handleYes}
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Groups</h1>
|
onNo={() => setDialogOpen(false)}
|
||||||
|
/>
|
||||||
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3 grid gap-5 lg:gap-7.5 mx-8 w-auto">Groups</h1>
|
||||||
|
<div className='grid gap-5 lg:gap-7.5 mx-8 w-auto'>
|
||||||
<Breadcrumbs>
|
<Breadcrumbs>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<Link underline="none" color="inherit" href="/">
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
@ -180,6 +184,8 @@ const ManageGroups = () => {
|
|||||||
<span className="text-sm">Manage Groups</span>
|
<span className="text-sm">Manage Groups</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
|
</div>
|
||||||
|
<div className="w-full overflow-x-auto px-4">
|
||||||
<DataTable
|
<DataTable
|
||||||
data={dataGroup}
|
data={dataGroup}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
@ -187,75 +193,76 @@ const ManageGroups = () => {
|
|||||||
onUpdate={handleUpdate}
|
onUpdate={handleUpdate}
|
||||||
onDelete={null}
|
onDelete={null}
|
||||||
/>
|
/>
|
||||||
<Dialog open={isDialogOpen} onClose={closeDialog}>
|
|
||||||
<DialogContent className="w-full">
|
|
||||||
<div className="flex justify-between">
|
|
||||||
<DialogTitle>Create New Group</DialogTitle>
|
|
||||||
<Box display="flex" justifyContent="flex-end">
|
|
||||||
<Button
|
|
||||||
variant="outlined"
|
|
||||||
sx={{ borderColor: 'white', color: 'grey' }}
|
|
||||||
onClick={closeDialog}
|
|
||||||
>
|
|
||||||
<CloseIcon />
|
|
||||||
</Button>
|
|
||||||
</Box>
|
|
||||||
</div>
|
|
||||||
<Divider />
|
|
||||||
<div className="p-5 mt-5">
|
|
||||||
<form onSubmit={handleSubmit} className="flex flex-col gap-4 w-full">
|
|
||||||
<div className="grid grid-cols-4 items-center gap-4 w-full">
|
|
||||||
<label className="form-label text-sm">
|
|
||||||
<span className="text-red-500">*</span>Group Name:
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
name="groupName"
|
|
||||||
className="input w-full col-span-3"
|
|
||||||
value={formData.groupName}
|
|
||||||
onChange={handleChange}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="grid grid-cols-4 items-center gap-4 w-full">
|
|
||||||
<label className="form-label text-sm">
|
|
||||||
<span className="text-red-500">*</span>Active Status:
|
|
||||||
</label>
|
|
||||||
<FormControl>
|
|
||||||
<RadioGroup name="status" row value={formData.status} onChange={handleChange}>
|
|
||||||
<FormControlLabel
|
|
||||||
value="Y"
|
|
||||||
checked={formData.status === 'Y'}
|
|
||||||
control={<Radio />}
|
|
||||||
label="Yes"
|
|
||||||
/>
|
|
||||||
<FormControlLabel
|
|
||||||
value="N"
|
|
||||||
checked={formData.status === 'N'}
|
|
||||||
control={<Radio />}
|
|
||||||
label="No"
|
|
||||||
/>
|
|
||||||
</RadioGroup>
|
|
||||||
</FormControl>
|
|
||||||
</div>
|
|
||||||
<div className="grid grid-cols-4 items-center gap-4 w-full">
|
|
||||||
<label className="form-label text-sm">
|
|
||||||
<span className="text-red-500">*</span>Description:
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
name="description"
|
|
||||||
className="input w-full col-span-3"
|
|
||||||
value={formData.description}
|
|
||||||
onChange={handleChange}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<Button type="submit">Submit</Button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</DialogContent>
|
|
||||||
</Dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<Dialog open={isDialogOpen} onClose={closeDialog}>
|
||||||
|
<DialogContent className="w-full">
|
||||||
|
<div className="flex justify-between">
|
||||||
|
<DialogTitle>Create New Group</DialogTitle>
|
||||||
|
<Box display="flex" justifyContent="flex-end">
|
||||||
|
<Button
|
||||||
|
variant="outlined"
|
||||||
|
sx={{ borderColor: 'white', color: 'grey' }}
|
||||||
|
onClick={closeDialog}
|
||||||
|
>
|
||||||
|
<CloseIcon />
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
|
</div>
|
||||||
|
<Divider />
|
||||||
|
<div className="p-5 mt-5">
|
||||||
|
<form onSubmit={handleSubmit} className="flex flex-col gap-4 w-full">
|
||||||
|
<div className="grid grid-cols-4 items-center gap-4 w-full">
|
||||||
|
<label className="form-label text-sm">
|
||||||
|
<span className="text-red-500">*</span>Group Name:
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="groupName"
|
||||||
|
className="input w-full col-span-3"
|
||||||
|
value={formData.groupName}
|
||||||
|
onChange={handleChange}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="grid grid-cols-4 items-center gap-4 w-full">
|
||||||
|
<label className="form-label text-sm">
|
||||||
|
<span className="text-red-500">*</span>Active Status:
|
||||||
|
</label>
|
||||||
|
<FormControl>
|
||||||
|
<RadioGroup name="status" row value={formData.status} onChange={handleChange}>
|
||||||
|
<FormControlLabel
|
||||||
|
value="Y"
|
||||||
|
checked={formData.status === 'Y'}
|
||||||
|
control={<Radio />}
|
||||||
|
label="Yes"
|
||||||
|
/>
|
||||||
|
<FormControlLabel
|
||||||
|
value="N"
|
||||||
|
checked={formData.status === 'N'}
|
||||||
|
control={<Radio />}
|
||||||
|
label="No"
|
||||||
|
/>
|
||||||
|
</RadioGroup>
|
||||||
|
</FormControl>
|
||||||
|
</div>
|
||||||
|
<div className="grid grid-cols-4 items-center gap-4 w-full">
|
||||||
|
<label className="form-label text-sm">
|
||||||
|
<span className="text-red-500">*</span>Description:
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="description"
|
||||||
|
className="input w-full col-span-3"
|
||||||
|
value={formData.description}
|
||||||
|
onChange={handleChange}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<Button type="submit">Submit</Button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -4,34 +4,39 @@ import AddDialog from './blocks/AddDialog';
|
|||||||
import EditDialog from './blocks/EditDialog';
|
import EditDialog from './blocks/EditDialog';
|
||||||
import DeleteDialog from './blocks/DeleteDialog';
|
import DeleteDialog from './blocks/DeleteDialog';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
const AldeiasMaster = () => {
|
const AldeiasMaster = () => {
|
||||||
return (
|
return (
|
||||||
<ManageAldeiasContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Aldeias</h1>
|
<title>TPAY | Manage Aldeias</title>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
</Helmet>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<ManageAldeiasContextProvider>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Container>
|
||||||
</Link>
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Aldeias</h1>
|
||||||
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Master Data</span>
|
<span className="text-sm">Master Data</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Aldeias</span>
|
<span className="text-sm">Manage Aldeias</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
|
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
<DeleteDialog />
|
<DeleteDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageAldeiasContextProvider>
|
</ManageAldeiasContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -5,37 +5,40 @@ import AddDialog from './blocks/AddDialog';
|
|||||||
import EditDialog from './blocks/EditDialog';
|
import EditDialog from './blocks/EditDialog';
|
||||||
import { Delete } from 'lucide-react';
|
import { Delete } from 'lucide-react';
|
||||||
import DeleteDialog from './blocks/DeleteDialog';
|
import DeleteDialog from './blocks/DeleteDialog';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
// import EditDialog from './blocks/EditDialog';
|
// import EditDialog from './blocks/EditDialog';
|
||||||
|
|
||||||
const ConversionMaster = () => {
|
const ConversionMaster = () => {
|
||||||
return (
|
return (
|
||||||
<ManageConversionContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet><title>TPAY | Manage Conversion</title></Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">Conversion</h1>
|
<ManageConversionContextProvider>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
<Container>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">Conversion</h1>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
</Link>
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Master Data</span>
|
<span className="text-sm">Master Data</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Conversion</span>
|
<span className="text-sm">Manage Conversion</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
|
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<EditDialog/>
|
<EditDialog />
|
||||||
<DeleteDialog/>
|
<DeleteDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageConversionContextProvider>
|
</ManageConversionContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -5,34 +5,40 @@ import SearchDialog from './blocks/SearchDialog';
|
|||||||
import EditDialog from './blocks/EditDialog';
|
import EditDialog from './blocks/EditDialog';
|
||||||
import DeleteDialog from './blocks/DeleteDialog';
|
import DeleteDialog from './blocks/DeleteDialog';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const Municipios = () => {
|
const Municipios = () => {
|
||||||
return (
|
return (
|
||||||
<ManageMunicipiosProvider>
|
<>
|
||||||
<Container className="mb-7">
|
<Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">MUNICIPIOS</h1>
|
<title>TPAY | Municipios</title>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
</Helmet>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<ManageMunicipiosProvider>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Container className="mb-7">
|
||||||
</Link>
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">MUNICIPIOS</h1>
|
||||||
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Master Data</span>
|
<span className="text-sm">Master Data</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Municipios</span>
|
<span className="text-sm">Manage Municipios</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
<DeleteDialog />
|
<DeleteDialog />
|
||||||
<SearchDialog />
|
<SearchDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageMunicipiosProvider>
|
</ManageMunicipiosProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -5,36 +5,42 @@ import SearchDialog from './blocks/SearchDialog';
|
|||||||
import { ManagePostoAdmsContextProvider } from './hooks/ManagePostoAdmsContext';
|
import { ManagePostoAdmsContextProvider } from './hooks/ManagePostoAdmsContext';
|
||||||
import { Container, DataGridInner } from '@/components';
|
import { Container, DataGridInner } from '@/components';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const PostoAdmsMaster = () => {
|
const PostoAdmsMaster = () => {
|
||||||
return (
|
return (
|
||||||
<ManagePostoAdmsContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">
|
<title>TPAY | Manage Postu Administrativo</title>
|
||||||
Postu Administrativo
|
</Helmet>
|
||||||
</h1>
|
<ManagePostoAdmsContextProvider>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
<Container>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
Postu Administrativo
|
||||||
</Link>
|
</h1>
|
||||||
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Master Data</span>
|
<span className="text-sm">Master Data</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Postu Administrativo</span>
|
<span className="text-sm">Manage Postu Administrativo</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
<DeleteDialog />
|
<DeleteDialog />
|
||||||
<SearchDialog />
|
<SearchDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManagePostoAdmsContextProvider>
|
</ManagePostoAdmsContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -4,33 +4,37 @@ import AddDialog from './blocks/AddDialog';
|
|||||||
import EditDialog from './blocks/EditDialog';
|
import EditDialog from './blocks/EditDialog';
|
||||||
import DeleteDialog from './blocks/DeleteDialog';
|
import DeleteDialog from './blocks/DeleteDialog';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const ProductsMaster = () => {
|
const ProductsMaster = () => {
|
||||||
return (
|
return (
|
||||||
<ManageProductsContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet><title>TPAY | Manage Products</title></Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Products</h1>
|
<ManageProductsContextProvider>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
<Container>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Products</h1>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
</Link>
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Master Data</span>
|
<span className="text-sm">Master Data</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Products</span>
|
<span className="text-sm">Manage Products</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
<DeleteDialog />
|
<DeleteDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageProductsContextProvider>
|
</ManageProductsContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -4,33 +4,37 @@ import AddDialog from './blocks/AddDialog';
|
|||||||
import EditDialog from './blocks/EditDialog';
|
import EditDialog from './blocks/EditDialog';
|
||||||
import DeleteDialog from './blocks/DeleteDialog';
|
import DeleteDialog from './blocks/DeleteDialog';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const ProfessionMaster = () => {
|
const ProfessionMaster = () => {
|
||||||
return (
|
return (
|
||||||
<ManageProfessionContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet><title>TPAY | Manage Profession</title></Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Profession</h1>
|
<ManageProfessionContextProvider>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
<Container>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Profession</h1>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
</Link>
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Master Data</span>
|
<span className="text-sm">Master Data</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Profession</span>
|
<span className="text-sm">Manage Profession</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
<DeleteDialog />
|
<DeleteDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageProfessionContextProvider>
|
</ManageProfessionContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -4,33 +4,37 @@ import AddDialog from './blocks/AddDialog';
|
|||||||
import EditDialog from './blocks/EditDialog';
|
import EditDialog from './blocks/EditDialog';
|
||||||
import DeleteDialog from './blocks/DeleteDialog';
|
import DeleteDialog from './blocks/DeleteDialog';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const ProviderMaster = () => {
|
const ProviderMaster = () => {
|
||||||
return (
|
return (
|
||||||
<ManageProviderContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet><title>TPAY | Manage Provider</title></Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Provider</h1>
|
<ManageProviderContextProvider>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
<Container>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Provider</h1>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
</Link>
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Master Data</span>
|
<span className="text-sm">Master Data</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Provider</span>
|
<span className="text-sm">Manage Provider</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
<DeleteDialog />
|
<DeleteDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageProviderContextProvider>
|
</ManageProviderContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -5,36 +5,42 @@ import EditDialog from './blocks/EditDialog';
|
|||||||
import DeleteDialog from './blocks/DeleteDialog';
|
import DeleteDialog from './blocks/DeleteDialog';
|
||||||
import SearchDialog from './blocks/SearchDialog';
|
import SearchDialog from './blocks/SearchDialog';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const SucosMaster = () => {
|
const SucosMaster = () => {
|
||||||
return (
|
return (
|
||||||
<ManageSucosContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Sucos</h1>
|
<title>TPAY | Manage Sucos</title>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
</Helmet>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<ManageSucosContextProvider>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Container>
|
||||||
</Link>
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Sucos</h1>
|
||||||
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Master Data</span>
|
<span className="text-sm">Master Data</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Sucos</span>
|
<span className="text-sm">Manage Sucos</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
|
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
<DeleteDialog />
|
<DeleteDialog />
|
||||||
<SearchDialog />
|
<SearchDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageSucosContextProvider>
|
</ManageSucosContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -3,32 +3,36 @@ import { ManageWalletContextProvider } from './hooks/ManageWalletContext';
|
|||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
import AddDialog from './blocks/AddDialog';
|
import AddDialog from './blocks/AddDialog';
|
||||||
import EditDialog from './blocks/EditDialog';
|
import EditDialog from './blocks/EditDialog';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const WalletMaster = () => {
|
const WalletMaster = () => {
|
||||||
return (
|
return (
|
||||||
<ManageWalletContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet><title>TPAY | Manage Wallet</title></Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Wallet</h1>
|
<ManageWalletContextProvider>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
<Container>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Wallet</h1>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
</Link>
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Master Data</span>
|
<span className="text-sm">Master Data</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Wallet</span>
|
<span className="text-sm">Manage Wallet</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageWalletContextProvider>
|
</ManageWalletContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -4,35 +4,39 @@ import { Breadcrumbs, Link } from '@mui/material';
|
|||||||
import AddDialog from './blocks/AddDialog';
|
import AddDialog from './blocks/AddDialog';
|
||||||
import EditDialog from './blocks/EditDialog';
|
import EditDialog from './blocks/EditDialog';
|
||||||
import DeleteDialog from './blocks/DeleteDialog';
|
import DeleteDialog from './blocks/DeleteDialog';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const WalletRuleMaster = () => {
|
const WalletRuleMaster = () => {
|
||||||
return (
|
return (
|
||||||
<ManageWalletRuleContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet><title>TPAY | Manage Wallet Rule</title></Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">Wallet Rule</h1>
|
<ManageWalletRuleContextProvider>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
<Container>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">Wallet Rule</h1>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
</Link>
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Master Data</span>
|
<span className="text-sm">Master Data</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Wallet Rule</span>
|
<span className="text-sm">Manage Wallet Rule</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
|
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
<DeleteDialog />
|
<DeleteDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageWalletRuleContextProvider>
|
</ManageWalletRuleContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import { toast } from 'sonner';
|
|||||||
const BASE_URL = apiConfig.service_customer;
|
const BASE_URL = apiConfig.service_customer;
|
||||||
import CustomerDialog from '../manage-members/CustomerDetailModal';
|
import CustomerDialog from '../manage-members/CustomerDetailModal';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
export interface IDataGridContextProps<TData extends object> {
|
export interface IDataGridContextProps<TData extends object> {
|
||||||
props: TDataGridProps<TData>;
|
props: TDataGridProps<TData>;
|
||||||
@ -141,42 +142,59 @@ const Kyc = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<div className="container mx-auto w-full">
|
<Helmet>
|
||||||
<ConfirmDialog
|
<title>TPAY | KYC</title>
|
||||||
open={dialogOpen}
|
</Helmet>
|
||||||
onClose={() => setDialogOpen(false)}
|
<div>
|
||||||
title="Confirm Action"
|
<div className="container mx-auto w-full">
|
||||||
content={`Are you sure you want to ${dialogType}?`}
|
<ConfirmDialog
|
||||||
onYes={handleYes}
|
open={dialogOpen}
|
||||||
onNo={() => setDialogOpen(false)}
|
onClose={() => setDialogOpen(false)}
|
||||||
/>
|
title="Confirm Action"
|
||||||
<CustomerDialog
|
content={`Are you sure you want to ${dialogType}?`}
|
||||||
open={isDialogOpen}
|
onYes={handleYes}
|
||||||
handleClose={closeDialog}
|
onNo={() => setDialogOpen(false)}
|
||||||
handleReject={handleReject}
|
/>
|
||||||
handleSubmit={handleSubmit}
|
<CustomerDialog
|
||||||
initialData={member}
|
open={isDialogOpen}
|
||||||
viewStats={true}
|
handleClose={closeDialog}
|
||||||
page={'kyc'}
|
handleReject={handleReject}
|
||||||
/>
|
handleSubmit={handleSubmit}
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Member KYC</h1>
|
initialData={member}
|
||||||
<Breadcrumbs>
|
viewStats={true}
|
||||||
<Link underline="none" color="inherit" href="/">
|
page={'kyc'}
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
/>
|
||||||
</Link>
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3 grid gap-5 lg:gap-7.5 mx-8 w-auto">Manage Member KYC</h1>
|
||||||
|
<div className='grid gap-5 lg:gap-7.5 mx-8 w-auto'>
|
||||||
|
<Breadcrumbs>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Members</span>
|
<span className="text-sm">Members</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Member KYC</span>
|
<span className="text-sm">Manage Member KYC</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<DataTable data={members} columns={columns} onUpdate={handleUpdate} onDelete={null} />
|
</div>
|
||||||
|
<div className="w-full overflow-x-auto px-4">
|
||||||
|
<div className="min-w-[800px]">
|
||||||
|
<DataTable
|
||||||
|
data={members}
|
||||||
|
columns={columns}
|
||||||
|
onUpdate={handleUpdate}
|
||||||
|
onDelete={null}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import { ScreenLoader } from '@/components';
|
|||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
const BASE_URL = apiConfig.service_customer;
|
const BASE_URL = apiConfig.service_customer;
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const ManageMembers = () => {
|
const ManageMembers = () => {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
@ -115,6 +116,7 @@ const ManageMembers = () => {
|
|||||||
if (loading) return <ScreenLoader />;
|
if (loading) return <ScreenLoader />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<<<<<<< Updated upstream
|
||||||
<div>
|
<div>
|
||||||
<div className="container mx-auto w-full">
|
<div className="container mx-auto w-full">
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
@ -137,24 +139,58 @@ const ManageMembers = () => {
|
|||||||
<Link underline="none" color="inherit" href="/">
|
<Link underline="none" color="inherit" href="/">
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
=======
|
||||||
|
<>
|
||||||
|
<Helmet>
|
||||||
|
<title>TPAY | Manage Members</title>
|
||||||
|
</Helmet>
|
||||||
|
<div>
|
||||||
|
<div className="container mx-auto w-full">
|
||||||
|
<ConfirmDialog
|
||||||
|
open={dialogOpen}
|
||||||
|
onClose={() => setDialogOpen(false)}
|
||||||
|
title="Confirm Action"
|
||||||
|
content={`Are you sure you want to ${dialogType}?`}
|
||||||
|
onYes={handleYes}
|
||||||
|
onNo={() => setDialogOpen(false)}
|
||||||
|
/>
|
||||||
|
<CustomerDialog
|
||||||
|
open={isDialogOpen}
|
||||||
|
handleClose={closeDialog}
|
||||||
|
handleSubmit={handleSubmit}
|
||||||
|
initialData={member}
|
||||||
|
/>
|
||||||
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3 grid gap-5 lg:gap-7.5 mx-8 w-auto">Manage Members</h1>
|
||||||
|
<div className='grid gap-5 lg:gap-7.5 mx-8 w-auto'>
|
||||||
|
<Breadcrumbs>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
>>>>>>> Stashed changes
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Members</span>
|
<span className="text-sm">Members</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Members</span>
|
<span className="text-sm">Manage Members</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<DataTable
|
</div>
|
||||||
data={members}
|
<div className="w-full overflow-x-auto px-4">
|
||||||
createData={createMember}
|
<div className="min-w-[800px]">
|
||||||
columns={columns}
|
<DataTable
|
||||||
onUpdate={handleUpdate}
|
data={members}
|
||||||
onDelete={null}
|
createData={createMember}
|
||||||
/>
|
columns={columns}
|
||||||
|
onUpdate={handleUpdate}
|
||||||
|
onDelete={null}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -4,33 +4,37 @@ import AddDialog from './blocks/AddDIalog';
|
|||||||
import EditDialog from './blocks/EditDialog';
|
import EditDialog from './blocks/EditDialog';
|
||||||
import DeleteDialog from './blocks/DeleteDialog';
|
import DeleteDialog from './blocks/DeleteDialog';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const ManageMenu = () => {
|
const ManageMenu = () => {
|
||||||
return (
|
return (
|
||||||
<ManageMenusContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet><title>TPAY | Manage Menu</title></Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Menu</h1>
|
<ManageMenusContextProvider>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
<Container>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Menu</h1>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
</Link>
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Master Data</span>
|
<span className="text-sm">Master Data</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Menu</span>
|
<span className="text-sm">Manage Menu</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
<DeleteDialog />
|
<DeleteDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageMenusContextProvider>
|
</ManageMenusContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,33 +2,39 @@ import { Container, DataGridInner } from '@/components';
|
|||||||
import { ManageNotifContextProvider } from './hooks/ManageNotificationContext';
|
import { ManageNotifContextProvider } from './hooks/ManageNotificationContext';
|
||||||
import AddDialog from './blocks/AddDialog';
|
import AddDialog from './blocks/AddDialog';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const ManageNotification = () => {
|
const ManageNotification = () => {
|
||||||
return (
|
return (
|
||||||
<ManageNotifContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">
|
<title>TPAY | Manage Notification</title>
|
||||||
Manage Notifications
|
</Helmet>
|
||||||
</h1>
|
<ManageNotifContextProvider>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
<Container>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
Manage Notifications
|
||||||
</Link>
|
</h1>
|
||||||
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Notification</span>
|
<span className="text-sm">Notification</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Notification</span>
|
<span className="text-sm">Manage Notification</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManageNotifContextProvider>
|
</ManageNotifContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -4,36 +4,42 @@ import { ManagePositionContextProvider } from './hooks';
|
|||||||
import { AddDialog } from './blocks/AddDialog';
|
import { AddDialog } from './blocks/AddDialog';
|
||||||
import { DeleteDialog } from './blocks/DeleteDialog';
|
import { DeleteDialog } from './blocks/DeleteDialog';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
export default function ManagePositionPage() {
|
export default function ManagePositionPage() {
|
||||||
return (
|
return (
|
||||||
<ManagePositionContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Positions</h1>
|
<title>TPAY | Manage Position</title>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
</Helmet>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<ManagePositionContextProvider>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Container>
|
||||||
</Link>
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Positions</h1>
|
||||||
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Settings</span>
|
<span className="text-sm">Settings</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">User Management</span>
|
<span className="text-sm">User Management</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Position</span>
|
<span className="text-sm">Manage Position</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<DeleteDialog />
|
<DeleteDialog />
|
||||||
</Container>
|
</Container>
|
||||||
</ManagePositionContextProvider>
|
</ManagePositionContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,30 +1,36 @@
|
|||||||
import { Container, DataGridInner } from '@/components';
|
import { Container, DataGridInner } from '@/components';
|
||||||
import { ApprovalTransactionProvider } from './hooks/ApprovalTransactionContext';
|
import { ApprovalTransactionProvider } from './hooks/ApprovalTransactionContext';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const ApprovalTransaction = () => {
|
const ApprovalTransaction = () => {
|
||||||
return (
|
return (
|
||||||
<ApprovalTransactionProvider>
|
<>
|
||||||
<Container className="mb-7">
|
<Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">TRANSACTION</h1>
|
<title>TPAY | Approval Transaction</title>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
</Helmet>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<ApprovalTransactionProvider>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Container className="mb-7">
|
||||||
</Link>
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">TRANSACTION</h1>
|
||||||
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Transaction</span>
|
<span className="text-sm">Transaction</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Approval Transaction</span>
|
<span className="text-sm">Approval Transaction</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
</ApprovalTransactionProvider>
|
</ApprovalTransactionProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,152 @@
|
|||||||
|
import { useTransactionContext } from '../hooks/useApprovalTransactionContext';
|
||||||
|
import { useCallApi } from '@/hooks';
|
||||||
|
import { apiConfig } from '@/config/api.config';
|
||||||
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
|
import {
|
||||||
|
Dialog,
|
||||||
|
DialogBody,
|
||||||
|
DialogContent,
|
||||||
|
DialogDescription,
|
||||||
|
DialogHeader,
|
||||||
|
DialogTitle
|
||||||
|
} from '@/components/ui/dialog';
|
||||||
|
import { Button } from '@/components/ui/button';
|
||||||
|
import {
|
||||||
|
Select,
|
||||||
|
SelectContent,
|
||||||
|
SelectItem,
|
||||||
|
SelectTrigger,
|
||||||
|
SelectValue
|
||||||
|
} from '@/components/ui/select';
|
||||||
|
import { Alert, KeenIcon, useDataGrid } from '@/components';
|
||||||
|
import { doSaveLogActivity } from '@/actions/GlobalActions';
|
||||||
|
import { toast } from 'sonner';
|
||||||
|
import { Input } from '@/components/ui/input';
|
||||||
|
|
||||||
|
const API_URL = apiConfig.transaction;
|
||||||
|
|
||||||
|
const ApprovalDialog = () => {
|
||||||
|
const { GetData, PostData } = useCallApi();
|
||||||
|
// const { reload } = useDataGrid();
|
||||||
|
const {
|
||||||
|
showApprovalDialog,
|
||||||
|
setShowApprovalDialog,
|
||||||
|
selectedTransactionIdForApproval
|
||||||
|
} = useTransactionContext();
|
||||||
|
|
||||||
|
const [transactionDetails, setTransactionDetails] = useState<any>(null);
|
||||||
|
|
||||||
|
const [formField, setFormField] = useState({
|
||||||
|
transaction_code: '',
|
||||||
|
status: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const [alert, setAlert] = useState({
|
||||||
|
show: false,
|
||||||
|
message: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const doApproval = useCallback(
|
||||||
|
async (e: React.FormEvent<HTMLFormElement>) => {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
if (!transactionDetails || !transactionDetails.code) {
|
||||||
|
toast.error('Transaction data not loaded yet.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!formField.status) {
|
||||||
|
toast.error('Please select a status.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const response = await PostData(`${API_URL}/transaction/set-approval`, {
|
||||||
|
transaction_code: transactionDetails.code,
|
||||||
|
status: formField.status,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response?.status) {
|
||||||
|
setAlert((prev) => ({ ...prev, show: false, message: '' }));
|
||||||
|
toast.success('Success Update Position');
|
||||||
|
const createActivity = {
|
||||||
|
module: 'Approval Transaction',
|
||||||
|
description: `Change status approve for transaction => ${transactionDetails.code}`,
|
||||||
|
action: 'U'
|
||||||
|
};
|
||||||
|
doSaveLogActivity(createActivity);
|
||||||
|
setShowApprovalDialog(false); // optionally close dialog
|
||||||
|
} else {
|
||||||
|
setAlert((prev) => ({ ...prev, show: true, message: response?.message }));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[formField, transactionDetails]
|
||||||
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const fetchTransactionDetails = async () => {
|
||||||
|
if (selectedTransactionIdForApproval) {
|
||||||
|
try {
|
||||||
|
const response = await GetData(`${API_URL}/transaction/history/detail/${selectedTransactionIdForApproval}`, {
|
||||||
|
id: selectedTransactionIdForApproval
|
||||||
|
});
|
||||||
|
// console.log(response?.data.code);
|
||||||
|
// console.log(selectedTransactionIdForApproval);
|
||||||
|
setTransactionDetails(response?.data);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error fetching transaction', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (showApprovalDialog && selectedTransactionIdForApproval) {
|
||||||
|
fetchTransactionDetails();
|
||||||
|
}
|
||||||
|
}, [showApprovalDialog, selectedTransactionIdForApproval, GetData]);
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Dialog open={showApprovalDialog} onOpenChange={setShowApprovalDialog}>
|
||||||
|
<DialogContent className="container-fixed max-w-[1024px] flex flex-col p-5 overflow-hidden">
|
||||||
|
<DialogHeader>
|
||||||
|
<DialogTitle>Approval Transaction</DialogTitle>
|
||||||
|
</DialogHeader>
|
||||||
|
<DialogBody>
|
||||||
|
<form action="" onSubmit={doApproval}>
|
||||||
|
<div className="card-body grid gap-5 p-0">
|
||||||
|
<div className="w-full">
|
||||||
|
<div className="flex items-center flex-wrap gap-2.5">
|
||||||
|
<label className="form-label max-w-56">Status</label>
|
||||||
|
|
||||||
|
<div className="grow">
|
||||||
|
<Select
|
||||||
|
value={formField.status}
|
||||||
|
onValueChange={(status) => setFormField((prev) => ({ ...prev, status }))}
|
||||||
|
>
|
||||||
|
<SelectTrigger>
|
||||||
|
<SelectValue placeholder="Select" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
<SelectItem value="Y">APPROVE</SelectItem>
|
||||||
|
<SelectItem value="N">REJECTED</SelectItem>
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<div className="flex justify-end">
|
||||||
|
<Button className="btn btn-primary" type="submit">
|
||||||
|
Save Changes
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</DialogBody>
|
||||||
|
</DialogContent>
|
||||||
|
</Dialog>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ApprovalDialog;
|
||||||
@ -1,14 +1,18 @@
|
|||||||
|
import React, { createContext, useMemo, useState } from 'react';
|
||||||
|
import { useNavigate } from 'react-router-dom'; // FIXED HERE
|
||||||
|
import { ColumnDef } from '@tanstack/react-table';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
import { DataGridColumnHeader, DataGridProvider, KeenIcon } from '@/components';
|
import { DataGridColumnHeader, DataGridProvider, KeenIcon } from '@/components';
|
||||||
import { Toaster } from '@/components/ui/sonner';
|
import { Toaster } from '@/components/ui/sonner';
|
||||||
import { apiConfig } from '@/config/api.config';
|
import { apiConfig } from '@/config/api.config';
|
||||||
import { ColumnDef } from '@tanstack/react-table';
|
|
||||||
import axios from 'axios';
|
|
||||||
import React, { createContext, useCallback, useEffect, useMemo, useState } from 'react';
|
|
||||||
import { useCallApi } from '@/hooks';
|
import { useCallApi } from '@/hooks';
|
||||||
|
|
||||||
import ListToolbar from '../blocks/ListToolbar';
|
import ListToolbar from '../blocks/ListToolbar';
|
||||||
import { Button } from '@/components/ui/button';
|
|
||||||
import { useNavigate } from 'react-router';
|
|
||||||
import DetailApprovalTransaction from '../blocks/DetailApprovalTransaction';
|
import DetailApprovalTransaction from '../blocks/DetailApprovalTransaction';
|
||||||
|
import ApprovalDialog from '../blocks/ApprovalDialog';
|
||||||
|
|
||||||
|
import { Button } from '@/components/ui/button';
|
||||||
|
|
||||||
interface ApprovalTransactionProps {
|
interface ApprovalTransactionProps {
|
||||||
id: number;
|
id: number;
|
||||||
@ -17,25 +21,31 @@ interface ApprovalTransactionProps {
|
|||||||
|
|
||||||
interface ContextProps {
|
interface ContextProps {
|
||||||
getTransactionLists: (
|
getTransactionLists: (
|
||||||
limit: number,
|
|
||||||
page: number,
|
page: number,
|
||||||
with_deleted: boolean,
|
limit: number,
|
||||||
order_field: any,
|
sorting: any,
|
||||||
order_direction: any,
|
|
||||||
filter: any
|
filter: any
|
||||||
) => Promise<{ data: ApprovalTransactionProps[]; totalCount: number } | undefined>;
|
) => Promise<{ data: ApprovalTransactionProps[]; totalCount: number } | undefined>;
|
||||||
showDetailDialog: boolean;
|
showDetailDialog: boolean;
|
||||||
setShowDetailDialog: React.Dispatch<React.SetStateAction<boolean>>;
|
setShowDetailDialog: React.Dispatch<React.SetStateAction<boolean>>;
|
||||||
|
showApprovalDialog: boolean;
|
||||||
|
setShowApprovalDialog: React.Dispatch<React.SetStateAction<boolean>>;
|
||||||
selectedTransactionId: number | null;
|
selectedTransactionId: number | null;
|
||||||
setSelectedTransactionId: React.Dispatch<React.SetStateAction<number | null>>;
|
setSelectedTransactionId: React.Dispatch<React.SetStateAction<number | null>>;
|
||||||
|
selectedTransactionIdForApproval: number | null;
|
||||||
|
setSelectedTransactionIdForApproval: React.Dispatch<React.SetStateAction<number | null>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const initialProps: ContextProps = {
|
const initialProps: ContextProps = {
|
||||||
getTransactionLists: async () => ({ data: [], totalCount: 0 }),
|
getTransactionLists: async () => ({ data: [], totalCount: 0 }),
|
||||||
showDetailDialog: false,
|
showDetailDialog: false,
|
||||||
setShowDetailDialog: () => { },
|
setShowDetailDialog: () => { },
|
||||||
|
showApprovalDialog: false,
|
||||||
|
setShowApprovalDialog: () => { },
|
||||||
selectedTransactionId: null,
|
selectedTransactionId: null,
|
||||||
setSelectedTransactionId: () => { }
|
setSelectedTransactionId: () => { },
|
||||||
|
selectedTransactionIdForApproval: null,
|
||||||
|
setSelectedTransactionIdForApproval: () => { },
|
||||||
};
|
};
|
||||||
|
|
||||||
const ManageApprovalTransactionContext = createContext<ContextProps>(initialProps);
|
const ManageApprovalTransactionContext = createContext<ContextProps>(initialProps);
|
||||||
@ -43,63 +53,54 @@ const API_URL = apiConfig.transaction;
|
|||||||
|
|
||||||
const ApprovalTransactionProvider = ({ children }: { children: React.ReactNode }) => {
|
const ApprovalTransactionProvider = ({ children }: { children: React.ReactNode }) => {
|
||||||
const [showDetailDialog, setShowDetailDialog] = useState(false);
|
const [showDetailDialog, setShowDetailDialog] = useState(false);
|
||||||
|
const [showApprovalDialog, setShowApprovalDialog] = useState(false);
|
||||||
const [selectedTransactionId, setSelectedTransactionId] = useState<number | null>(null);
|
const [selectedTransactionId, setSelectedTransactionId] = useState<number | null>(null);
|
||||||
|
const [selectedTransactionIdForApproval, setSelectedTransactionIdForApproval] = useState<number | null>(null);
|
||||||
const [transaction, setTransaction] = useState<ApprovalTransactionProps[]>([]);
|
const [transaction, setTransaction] = useState<ApprovalTransactionProps[]>([]);
|
||||||
|
|
||||||
const { GetData } = useCallApi();
|
const { GetData } = useCallApi();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const handleNavigate = (path: string) => {
|
|
||||||
const url = navigate(`${API_URL}/transaction/history/${path}`);
|
|
||||||
};
|
|
||||||
|
|
||||||
const columns = useMemo<ColumnDef<any>[]>(
|
const columns = useMemo<ColumnDef<any>[]>(
|
||||||
() => [
|
() => [
|
||||||
// {
|
|
||||||
// accessorKey: 'transaction_date',
|
|
||||||
// header: ({ column }) => <DataGridColumnHeader title="Transaction Date" column={column} />,
|
|
||||||
// enableSorting: false,
|
|
||||||
// enableHiding: false,
|
|
||||||
// meta: {
|
|
||||||
// headerClassName: 'w-[250px]'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
accessorKey: 'transaction_date',
|
accessorKey: 'transaction_date',
|
||||||
header: ({ column }) => <DataGridColumnHeader title="Transaction Date" column={column} />,
|
header: ({ column }) => <DataGridColumnHeader title="Transaction Date" column={column} />,
|
||||||
enableSorting: false,
|
enableSorting: false,
|
||||||
enableHiding: false,
|
enableHiding: false,
|
||||||
meta: {
|
meta: {
|
||||||
headerClassName: 'w-[250px]'
|
headerClassName: 'w-[250px]',
|
||||||
},
|
},
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
// Memformat tanggal dan waktu dari ISO ke format biasa (DD-MM-YYYY HH:MM:SS)
|
|
||||||
const transactionDate = new Date(row.original.transaction_date);
|
const transactionDate = new Date(row.original.transaction_date);
|
||||||
const formattedDateTime = transactionDate.toLocaleString('en-GB', {
|
return transactionDate.toLocaleString('en-GB', {
|
||||||
day: '2-digit',
|
day: '2-digit',
|
||||||
month: '2-digit',
|
month: '2-digit',
|
||||||
year: 'numeric',
|
year: 'numeric',
|
||||||
hour: '2-digit',
|
hour: '2-digit',
|
||||||
minute: '2-digit',
|
minute: '2-digit',
|
||||||
second: '2-digit',
|
second: '2-digit',
|
||||||
hour12: false // Gunakan format 24 jam
|
hour12: false,
|
||||||
});
|
});
|
||||||
return formattedDateTime; // Format DD-MM-YYYY HH:MM:SS (menggunakan waktu yang sudah ada)
|
},
|
||||||
}
|
},
|
||||||
},
|
|
||||||
{
|
{
|
||||||
accessorKey: 'origin_customer.fullname',
|
accessorKey: 'origin_customer.fullname',
|
||||||
header: ({ column }) => <DataGridColumnHeader title="Full Name" column={column} />,
|
header: ({ column }) => <DataGridColumnHeader title="Full Name" column={column} />,
|
||||||
enableSorting: false,
|
enableSorting: false,
|
||||||
enableHiding: false,
|
enableHiding: false,
|
||||||
meta: {
|
meta: {
|
||||||
headerClassName: 'w-[250px]'
|
headerClassName: 'w-[250px]',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorFn: (row) => {
|
accessorFn: (row) => {
|
||||||
const purchaseAmount = row?.purchase?.amount;
|
const purchaseAmount = row?.purchase?.amount;
|
||||||
const transferAmount = row?.transfer?.amount;
|
const transferAmount = row?.transfer?.amount;
|
||||||
|
return new Intl.NumberFormat('en-US', {
|
||||||
return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(purchaseAmount ?? transferAmount ?? 0);
|
style: 'currency',
|
||||||
|
currency: 'USD',
|
||||||
|
}).format(purchaseAmount ?? transferAmount ?? 0);
|
||||||
},
|
},
|
||||||
id: 'amount',
|
id: 'amount',
|
||||||
header: ({ column }) => <DataGridColumnHeader title="Amount" column={column} />,
|
header: ({ column }) => <DataGridColumnHeader title="Amount" column={column} />,
|
||||||
@ -111,10 +112,12 @@ const ApprovalTransactionProvider = ({ children }: { children: React.ReactNode }
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorFn: (row) => {
|
accessorFn: (row) => {
|
||||||
const purchaseAmount = row?.purchase?.fee_amount;
|
const purchaseFee = row?.purchase?.fee_amount;
|
||||||
const transferAmount = row?.transfer?.fee_amount;
|
const transferFee = row?.transfer?.fee_amount;
|
||||||
|
return new Intl.NumberFormat('en-US', {
|
||||||
return new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(purchaseAmount ?? transferAmount ?? 0);
|
style: 'currency',
|
||||||
|
currency: 'USD',
|
||||||
|
}).format(purchaseFee ?? transferFee ?? 0);
|
||||||
},
|
},
|
||||||
id: 'feeamount',
|
id: 'feeamount',
|
||||||
header: ({ column }) => <DataGridColumnHeader title="Fee Amount" column={column} />,
|
header: ({ column }) => <DataGridColumnHeader title="Fee Amount" column={column} />,
|
||||||
@ -126,19 +129,14 @@ const ApprovalTransactionProvider = ({ children }: { children: React.ReactNode }
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorFn: (row) => {
|
accessorFn: (row) => {
|
||||||
let status;
|
switch (row.status) {
|
||||||
if (row.status === 'C') {
|
case 'C': return 'COMPLETE';
|
||||||
status = 'COMPLETE';
|
case 'F': return 'FAILED';
|
||||||
} else if (row.status === 'F') {
|
case 'O': return 'ON PROCESS';
|
||||||
status = 'FAILED';
|
default: return 'PENDING';
|
||||||
} else if (row.status === 'O') {
|
|
||||||
status = 'ON PROCESS';
|
|
||||||
} else {
|
|
||||||
status = 'PENDING';
|
|
||||||
}
|
}
|
||||||
return status;
|
|
||||||
},
|
},
|
||||||
accessorKey: 'status',
|
id: 'status',
|
||||||
header: ({ column }) => <DataGridColumnHeader title="Status" column={column} />,
|
header: ({ column }) => <DataGridColumnHeader title="Status" column={column} />,
|
||||||
enableSorting: false,
|
enableSorting: false,
|
||||||
enableHiding: false,
|
enableHiding: false,
|
||||||
@ -152,8 +150,8 @@ const ApprovalTransactionProvider = ({ children }: { children: React.ReactNode }
|
|||||||
enableSorting: false,
|
enableSorting: false,
|
||||||
enableHiding: false,
|
enableHiding: false,
|
||||||
meta: {
|
meta: {
|
||||||
headerClassName: 'w-[250px]'
|
headerClassName: 'w-[250px]',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: 'type.name',
|
accessorKey: 'type.name',
|
||||||
@ -161,8 +159,25 @@ const ApprovalTransactionProvider = ({ children }: { children: React.ReactNode }
|
|||||||
enableSorting: false,
|
enableSorting: false,
|
||||||
enableHiding: false,
|
enableHiding: false,
|
||||||
meta: {
|
meta: {
|
||||||
headerClassName: 'w-[250px]'
|
headerClassName: 'w-[250px]',
|
||||||
}
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
accessorFn: (row) => {
|
||||||
|
switch (row.status_approve) {
|
||||||
|
case 'W': return 'WAITING APPROVAL';
|
||||||
|
case 'Y': return 'APPROVED';
|
||||||
|
case 'N': return 'REJECTED';
|
||||||
|
default: return 'PENDING';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
id: 'status_approve',
|
||||||
|
header: ({ column }) => <DataGridColumnHeader title="Status" column={column} />,
|
||||||
|
enableSorting: false,
|
||||||
|
enableHiding: false,
|
||||||
|
meta: {
|
||||||
|
headerClassName: 'w-[250px]',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'actions',
|
id: 'actions',
|
||||||
@ -172,7 +187,7 @@ const ApprovalTransactionProvider = ({ children }: { children: React.ReactNode }
|
|||||||
cell: (data) => {
|
cell: (data) => {
|
||||||
const row = data.row.original;
|
const row = data.row.original;
|
||||||
return (
|
return (
|
||||||
<div key={`actions-${row.id}`}>
|
<div key={`actions-${row.id}`} className="flex gap-2 justify-center">
|
||||||
<button
|
<button
|
||||||
className="btn btn-sm btn-icon btn-clear btn-light"
|
className="btn btn-sm btn-icon btn-clear btn-light"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@ -182,40 +197,48 @@ const ApprovalTransactionProvider = ({ children }: { children: React.ReactNode }
|
|||||||
>
|
>
|
||||||
<KeenIcon icon="eye" />
|
<KeenIcon icon="eye" />
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
className="btn btn-sm btn-icon btn-clear btn-light"
|
||||||
|
onClick={() => {
|
||||||
|
setSelectedTransactionIdForApproval(row.id);
|
||||||
|
setShowApprovalDialog(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<KeenIcon icon="notepad-edit" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
meta: {
|
meta: {
|
||||||
headerClassName: 'w-[100px]',
|
headerClassName: 'w-[100px]',
|
||||||
cellClassName: 'text-center'
|
cellClassName: 'text-center',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
[]);
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
const getTransactionLists = async (page: number, limit: number, sorting: any, filter: any) => {
|
const getTransactionLists = async (page: number, limit: number, sorting: any, filter: any) => {
|
||||||
try {
|
try {
|
||||||
let startdate;
|
let startdate, enddate;
|
||||||
let enddate;
|
|
||||||
let formattedFilter;
|
|
||||||
|
|
||||||
if (filter == undefined || filter.length == 0) {
|
if (!filter || filter.length === 0) {
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
const nextWeek = new Date();
|
const nextWeek = new Date();
|
||||||
nextWeek.setDate(today.getDate() + 7);
|
nextWeek.setDate(today.getDate() + 7);
|
||||||
|
|
||||||
startdate = today.toISOString().split('T')[0];
|
startdate = today.toISOString().split('T')[0];
|
||||||
enddate = nextWeek.toISOString().split('T')[0];
|
enddate = nextWeek.toISOString().split('T')[0];
|
||||||
} else if (filter != undefined || filter.length != 0) {
|
} else {
|
||||||
startdate = filter[0].value.from;
|
startdate = filter[0]?.value?.from;
|
||||||
enddate = filter[0].value.to;
|
enddate = filter[0]?.value?.to;
|
||||||
}
|
}
|
||||||
|
|
||||||
formattedFilter = {
|
const formattedFilter = {
|
||||||
"Transactions.transaction_date": {
|
"Transactions.transaction_date": {
|
||||||
from: startdate + " 00:00:00",
|
from: `${startdate} 00:00:00`,
|
||||||
to: enddate + " 23:59:59"
|
to: `${enddate} 23:59:59`,
|
||||||
}
|
},
|
||||||
|
"Transactions.status_approve": { in: ["W", "Y", "N"] },
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await GetData(`${API_URL}/transaction/history`, {
|
const response = await GetData(`${API_URL}/transaction/history`, {
|
||||||
@ -224,11 +247,14 @@ const ApprovalTransactionProvider = ({ children }: { children: React.ReactNode }
|
|||||||
with_deleted: false,
|
with_deleted: false,
|
||||||
order_field: "Transactions.created_at",
|
order_field: "Transactions.created_at",
|
||||||
order_direction: 'DESC',
|
order_direction: 'DESC',
|
||||||
filter: JSON.stringify(formattedFilter)
|
filter: JSON.stringify(formattedFilter),
|
||||||
});
|
});
|
||||||
|
|
||||||
setTransaction(response?.data.list);
|
setTransaction(response?.data?.list || []);
|
||||||
return { data: response?.data.list, totalCount: response?.data.total_count };
|
return {
|
||||||
|
data: response?.data?.list || [],
|
||||||
|
totalCount: response?.data?.total_count || 0,
|
||||||
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching transaction', error);
|
console.error('Error fetching transaction', error);
|
||||||
}
|
}
|
||||||
@ -240,12 +266,17 @@ const ApprovalTransactionProvider = ({ children }: { children: React.ReactNode }
|
|||||||
getTransactionLists,
|
getTransactionLists,
|
||||||
showDetailDialog,
|
showDetailDialog,
|
||||||
setShowDetailDialog,
|
setShowDetailDialog,
|
||||||
|
showApprovalDialog,
|
||||||
|
setShowApprovalDialog,
|
||||||
selectedTransactionId,
|
selectedTransactionId,
|
||||||
setSelectedTransactionId
|
setSelectedTransactionId,
|
||||||
|
selectedTransactionIdForApproval,
|
||||||
|
setSelectedTransactionIdForApproval,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Toaster expand visibleToasts={9} duration={3000} />
|
<Toaster expand visibleToasts={9} duration={3000} />
|
||||||
<DetailApprovalTransaction />
|
<DetailApprovalTransaction />
|
||||||
|
<ApprovalDialog />
|
||||||
|
|
||||||
<DataGridProvider
|
<DataGridProvider
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
@ -1,30 +1,36 @@
|
|||||||
import { Container, DataGridInner } from '@/components';
|
import { Container, DataGridInner } from '@/components';
|
||||||
import { TransactionProvider } from './hooks/TransactionContext';
|
import { TransactionProvider } from './hooks/TransactionContext';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const Transaction = () => {
|
const Transaction = () => {
|
||||||
return (
|
return (
|
||||||
<TransactionProvider>
|
<>
|
||||||
<Container className="mb-7">
|
<Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">TRANSACTION</h1>
|
<title>TPAY | History Transaction</title>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
</Helmet>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<TransactionProvider>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Container className="mb-7">
|
||||||
</Link>
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">TRANSACTION</h1>
|
||||||
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Transaction</span>
|
<span className="text-sm">Transaction</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">History Transaction</span>
|
<span className="text-sm">History Transaction</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
</TransactionProvider>
|
</TransactionProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -227,7 +227,7 @@ const DetailTransaction = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p className="text-sm text-gray-500">Price Point</p>
|
<p className="text-sm text-gray-500">Price Point</p>
|
||||||
{new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(transactionDetails?.purchase.product.price_point)}
|
<p className="font-medium">{transactionDetails?.purchase.product.price_point}</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p className="text-sm text-gray-500">Product Type</p>
|
<p className="text-sm text-gray-500">Product Type</p>
|
||||||
@ -239,7 +239,17 @@ const DetailTransaction = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p className="text-sm text-gray-500">Provider Type</p>
|
<p className="text-sm text-gray-500">Provider Type</p>
|
||||||
<p className="font-medium">{transactionDetails?.purchase.product.provider.type}</p>
|
<p className="font-medium">
|
||||||
|
{(() => {
|
||||||
|
let providertype;
|
||||||
|
if (transactionDetails?.purchase.product.provider.type === 'h2h') {
|
||||||
|
providertype = 'HOST TO HOST';
|
||||||
|
} else if (transactionDetails?.purchase.product.provider.type === 'agent') {
|
||||||
|
providertype = 'AGENT';
|
||||||
|
}
|
||||||
|
return providertype;
|
||||||
|
})()}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -7,35 +7,41 @@ import AddDialog from './blocks/AddDialog';
|
|||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
import { DeleteDialog } from './blocks/DeleteDialog';
|
import { DeleteDialog } from './blocks/DeleteDialog';
|
||||||
import { EditDialog } from './blocks/EditDialog';
|
import { EditDialog } from './blocks/EditDialog';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const TransferType = () => {
|
const TransferType = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ManageTransferTypeContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Transaction Type</h1>
|
<title>TPAY | Manage Transaction Type</title>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
</Helmet>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<ManageTransferTypeContextProvider>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Container>
|
||||||
</Link>
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-3">Manage Transaction Type</h1>
|
||||||
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Transfer Type</span>
|
<span className="text-sm">Transfer Type</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Manage Transfer Type</span>
|
<span className="text-sm">Manage Transfer Type</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<DeleteDialog />
|
<DeleteDialog />
|
||||||
<EditDialog />
|
<EditDialog />
|
||||||
|
|
||||||
</Container>
|
</Container>
|
||||||
</ManageTransferTypeContextProvider>
|
</ManageTransferTypeContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,31 +1,37 @@
|
|||||||
import { Container, DataGridInner } from '@/components';
|
import { Container, DataGridInner } from '@/components';
|
||||||
import { ManageWalletContextProvider } from './hooks/ManageWalletHistoryContext';
|
import { ManageWalletContextProvider } from './hooks/ManageWalletHistoryContext';
|
||||||
import { Breadcrumbs, Link } from '@mui/material';
|
import { Breadcrumbs, Link } from '@mui/material';
|
||||||
|
import { Helmet } from 'react-helmet';
|
||||||
|
|
||||||
const WalletHistory = () => {
|
const WalletHistory = () => {
|
||||||
return (
|
return (
|
||||||
<ManageWalletContextProvider>
|
<>
|
||||||
<Container>
|
<Helmet>
|
||||||
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">Wallet History</h1>
|
<title>TPAY | Wallet History</title>
|
||||||
<Breadcrumbs sx={{ mb: 2 }}>
|
</Helmet>
|
||||||
<Link underline="none" color="inherit" href="/">
|
<ManageWalletContextProvider>
|
||||||
<span className="text-sm hover:underline">Dashboard</span>
|
<Container>
|
||||||
</Link>
|
<h1 className="text-xl font-medium leading-none text-gray-900 mb-5">Wallet History</h1>
|
||||||
|
<Breadcrumbs sx={{ mb: 2 }}>
|
||||||
|
<Link underline="none" color="inherit" href="/">
|
||||||
|
<span className="text-sm hover:underline">Dashboard</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Wallet</span>
|
<span className="text-sm">Wallet</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link underline="none" color="inherit">
|
<Link underline="none" color="inherit">
|
||||||
<span className="text-sm">Wallet History</span>
|
<span className="text-sm">Wallet History</span>
|
||||||
</Link>
|
</Link>
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
|
|
||||||
<div className="grid gap-5 lg:gap-7.5">
|
<div className="grid gap-5 lg:gap-7.5">
|
||||||
<DataGridInner />
|
<DataGridInner />
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
</ManageWalletContextProvider>
|
</ManageWalletContextProvider>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2762,6 +2762,11 @@ hasown@^2.0.0, hasown@^2.0.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
function-bind "^1.1.2"
|
function-bind "^1.1.2"
|
||||||
|
|
||||||
|
helmet@^8.1.0:
|
||||||
|
version "8.1.0"
|
||||||
|
resolved "https://registry.npmjs.org/helmet/-/helmet-8.1.0.tgz"
|
||||||
|
integrity sha512-jOiHyAZsmnr8LqoPGmCjYAaiuWwjAPLgY8ZX2XrmHawt99/u1y6RgrZMTeoPfpUbV96HOalYgz1qzkRbw54Pmg==
|
||||||
|
|
||||||
hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@3:
|
hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@3:
|
||||||
version "3.3.2"
|
version "3.3.2"
|
||||||
resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz"
|
resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz"
|
||||||
|
|||||||
Reference in New Issue
Block a user