Merge branch 'feature/amin_plate_city_columns' into 'develop'

add plate and city columns and print excel and sorting based on score column

See merge request witel-front-end/loan-facilities/expert!138
This commit is contained in:
AmirHossein Mahmoodi
2024-01-07 07:44:34 +00:00
17 changed files with 417 additions and 93 deletions

View File

@@ -196,6 +196,8 @@
"NavganProvinceManager": {
"name": "نام",
"id": "کد یکتا",
"city_name": "شهرستان",
"plate_number": "پلاک",
"statement_count": "تعداد صورت وضعیت",
"shenase_meli": "شناسه ملی",
"is_legal_person": "نوع شخص",
@@ -220,9 +222,11 @@
},
"PassengerBoss": {
"name": "نام",
"city_name": "شهرستان",
"plate_number": "پلاک",
"statement_count": "تعداد صورت وضعیت",
"id": "کد یکتا",
"score": "رتبه",
"score": "اولویت",
"navgan_capacity": "ظرفیت",
"manufacture_date": "سال ساخت",
"shenase_meli": "شناسه ملی",
@@ -279,8 +283,11 @@
"NavganLoanManagement": {
"name": "نام",
"id": "کد یکتا",
"excel_report": "گزارش اکسل",
"city_name": "شهرستان",
"plate_number": "پلاک",
"statement_count": "تعداد صورت وضعیت",
"score": "رتبه",
"score": "اولویت",
"navgan_capacity": "ظرفیت",
"manufacture_date": "سال ساخت",
"national_id": "کد ملی",
@@ -324,6 +331,8 @@
},
"TransportationAssistance": {
"name": "نام",
"city_name": "شهرستان",
"plate_number": "پلاک",
"id": "کد یکتا",
"statement_count": "تعداد صورت وضعیت",
"shenase_meli": "شناسه ملی",
@@ -361,9 +370,11 @@
},
"MachinaryOffice": {
"name": "نام",
"city_name": "شهرستان",
"plate_number": "پلاک",
"statement_count": "تعداد صورت وضعیت",
"id": "کد یکتا",
"score": "رتبه",
"score": "اولویت",
"navgan_capacity": "ظرفیت",
"manufacture_date": "سال ساخت",
"shenase_meli": "شناسه ملی",
@@ -614,9 +625,12 @@
},
"LoanHistory": {
"id": "کد یکتا",
"excel_report": "گزارش اکسل",
"city_name": "شهرستان",
"plate_number": "پلاک",
"statement_count": "تعداد صورت وضعیت",
"name": "نام",
"score": "رتبه",
"score": "اولویت",
"navgan_capacity": "ظرفیت",
"manufacture_date": "سال ساخت",
"shenase_meli": "شناسه ملی",

View File

@@ -0,0 +1,67 @@
import {Button, CircularProgress} from "@mui/material";
import {useTranslations} from "next-intl";
import {useMemo, useState} from "react";
import useRequest from "@/lib/app/hooks/useRequest";
import {EXPORT_LOAN_HISTORY} from "@/core/data/apiRoutes";
import moment from "jalali-moment";
import FileSaver from 'file-saver';
import DescriptionIcon from '@mui/icons-material/Description';
const PrintExcel = ({table}) => {
const t = useTranslations();
const [loading, setLoading] = useState(false)
const requestServer = useRequest({auth: true, pending: false, success: {notification: {show: false}}})
const {columnFilters, columnFilterFns, sorting} = table.getState()
const columns = table.getAllColumns()
const filterParams = useMemo(() => {
const params = new URLSearchParams();
const filters = columnFilters.map((filter) => {
let datatype;
for (const i in columns) {
if (columns[i].id == filter.id) {
datatype = columns[i].columnDef.datatype;
}
}
return {
...filter, fn: columnFilterFns[filter.id], datatype: datatype,
};
});
params.set("start", '0');
params.set("filters", JSON.stringify(filters ?? []));
params.set("sorting", JSON.stringify(sorting ?? []));
return params;
}, [columnFilters, columnFilterFns, sorting, columns,]);
const clickHandler = () => {
setLoading(true)
requestServer(`${EXPORT_LOAN_HISTORY}?${filterParams}`, 'get', {
auth: true,
requestOptions: {responseType: 'blob'}
}).then((response) => {
const filename = `گزارش وام ها تاریخ_${moment().format('jYYYY_jMM_jDD')}.xlsx`;
FileSaver.saveAs(response.data, filename);
}).catch(() => {
}).finally(() => {
setLoading(false)
})
}
return (
<Button
color="primary"
variant="contained"
size="small"
disabled={loading}
sx={{textTransform: "unset", alignSelf: "center"}}
startIcon={loading ? <CircularProgress size={18} color="inherit"/> : <DescriptionIcon/>}
onClick={clickHandler}
>
{t("LoanHistory.excel_report")}
</Button>
)
}
export default PrintExcel

View File

@@ -0,0 +1,12 @@
import {Stack} from "@mui/material";
import PrintExcel from "@/components/dashboard/loan-history/Buttons/printExcel";
const TableToolbar = ({table}) => {
return (
<Stack direction={"row"} spacing={2}>
<PrintExcel table={table}/>
</Stack>
)
}
export default TableToolbar

View File

@@ -6,6 +6,7 @@ import TableRowActions from "./TableRowActions";
import moment from "jalali-moment";
import DataTable from "@/core/components/DataTable";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import TableToolbar from "@/components/dashboard/loan-history/TableToolbar";
function DashboardLoanHistoryComponent() {
const t = useTranslations();
@@ -30,6 +31,25 @@ function DashboardLoanHistoryComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.score,
id: "score",
header: t("LoanHistory.score"),
enableColumnFilter: true,
datatype: "numeric",
filterFn: "equals",
columnFilterModeOptions: [
"equals",
"notEquals",
"contains",
"lessThan",
"greaterThan",
"between",
],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.is_legal_person,
id: "is_legal_person",
@@ -124,6 +144,18 @@ function DashboardLoanHistoryComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.city_name,
id: "city_name",
header: t("LoanHistory.city_name"),
enableColumnFilter: true,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) =>
moment(row.created_at).locale("fa").format("HH:mm | yyyy/MM/DD"),
@@ -176,25 +208,6 @@ function DashboardLoanHistoryComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.score,
id: "score",
header: t("LoanHistory.score"),
enableColumnFilter: true,
datatype: "numeric",
filterFn: "equals",
columnFilterModeOptions: [
"equals",
"notEquals",
"contains",
"lessThan",
"greaterThan",
"between",
],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.navgan_capacity,
id: "navgan_capacity",
@@ -245,6 +258,18 @@ function DashboardLoanHistoryComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.plate_number,
id: "plate_number",
header: t("LoanHistory.plate_number"),
enableColumnFilter: false,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.proposed_amount,
id: "proposed_amount",
@@ -330,10 +355,11 @@ function DashboardLoanHistoryComponent() {
tableUrl={GET_LOAN_HISTORY}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableCustomToolbar={true}
CustomToolbar={TableToolbar}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
id: 'score', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}

View File

@@ -38,7 +38,6 @@ const PrintExcel = ({table}) => {
setLoading(true)
requestServer(`${EXPORT_MACHINARY_OFFICE}?${filterParams}`, 'get', {
auth: true,
notification: false,
requestOptions: {responseType: 'blob'}
}).then((response) => {
const filename = `گزارش ماشین آلات تاریخ_${moment().format('jYYYY_jMM_jDD')}.xlsx`;

View File

@@ -31,6 +31,25 @@ function DashboardMachinaryOfficeComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.score,
id: "score",
header: t("MachinaryOffice.score"),
enableColumnFilter: true,
datatype: "numeric",
filterFn: "equals",
columnFilterModeOptions: [
"equals",
"notEquals",
"contains",
"lessThan",
"greaterThan",
"between",
],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.is_legal_person,
id: "is_legal_person",
@@ -125,6 +144,18 @@ function DashboardMachinaryOfficeComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.city_name,
id: "city_name",
header: t("MachinaryOffice.city_name"),
enableColumnFilter: true,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) =>
moment(row.created_at).locale("fa").format("HH:mm | yyyy/MM/DD"),
@@ -177,25 +208,6 @@ function DashboardMachinaryOfficeComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.score,
id: "score",
header: t("MachinaryOffice.score"),
enableColumnFilter: true,
datatype: "numeric",
filterFn: "equals",
columnFilterModeOptions: [
"equals",
"notEquals",
"contains",
"lessThan",
"greaterThan",
"between",
],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.navgan_capacity,
id: "navgan_capacity",
@@ -246,6 +258,18 @@ function DashboardMachinaryOfficeComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.plate_number,
id: "plate_number",
header: t("MachinaryOffice.plate_number"),
enableColumnFilter: false,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.state_name,
id: "state_id",
@@ -269,7 +293,7 @@ function DashboardMachinaryOfficeComponent() {
CustomToolbar={TableToolbar}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
id: 'score', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}

View File

@@ -0,0 +1,67 @@
import {Button, CircularProgress} from "@mui/material";
import {useTranslations} from "next-intl";
import {useMemo, useState} from "react";
import useRequest from "@/lib/app/hooks/useRequest";
import {EXPORT_LOAN_MANAGEMENT_HISTORY} from "@/core/data/apiRoutes";
import moment from "jalali-moment";
import FileSaver from 'file-saver';
import DescriptionIcon from '@mui/icons-material/Description';
const PrintExcel = ({table}) => {
const t = useTranslations();
const [loading, setLoading] = useState(false)
const requestServer = useRequest({auth: true, pending: false, success: {notification: {show: false}}})
const {columnFilters, columnFilterFns, sorting} = table.getState()
const columns = table.getAllColumns()
const filterParams = useMemo(() => {
const params = new URLSearchParams();
const filters = columnFilters.map((filter) => {
let datatype;
for (const i in columns) {
if (columns[i].id == filter.id) {
datatype = columns[i].columnDef.datatype;
}
}
return {
...filter, fn: columnFilterFns[filter.id], datatype: datatype,
};
});
params.set("start", '0');
params.set("filters", JSON.stringify(filters ?? []));
params.set("sorting", JSON.stringify(sorting ?? []));
return params;
}, [columnFilters, columnFilterFns, sorting, columns,]);
const clickHandler = () => {
setLoading(true)
requestServer(`${EXPORT_LOAN_MANAGEMENT_HISTORY}?${filterParams}`, 'get', {
auth: true,
requestOptions: {responseType: 'blob'}
}).then((response) => {
const filename = `گزارش مدیریت وام ها تاریخ_${moment().format('jYYYY_jMM_jDD')}.xlsx`;
FileSaver.saveAs(response.data, filename);
}).catch(() => {
}).finally(() => {
setLoading(false)
})
}
return (
<Button
color="primary"
variant="contained"
size="small"
disabled={loading}
sx={{textTransform: "unset", alignSelf: "center"}}
startIcon={loading ? <CircularProgress size={18} color="inherit"/> : <DescriptionIcon/>}
onClick={clickHandler}
>
{t("NavganLoanManagement.excel_report")}
</Button>
)
}
export default PrintExcel

View File

@@ -0,0 +1,12 @@
import {Stack} from "@mui/material";
import PrintExcel from "@/components/dashboard/navgan-loan-management/Buttons/printExcel";
const TableToolbar = ({table}) => {
return (
<Stack direction={"row"} spacing={2}>
<PrintExcel table={table}/>
</Stack>
)
}
export default TableToolbar

View File

@@ -6,6 +6,7 @@ import TableRowActions from "./TableRowActions";
import DataTable from "@/core/components/DataTable";
import moment from "jalali-moment";
import MuiDatePicker from "@/core/components/MuiDatePicker";
import TableToolbar from "@/components/dashboard/navgan-loan-management/TableToolbar";
function DashboardNavganLoanManagementComponent() {
const t = useTranslations();
@@ -31,6 +32,25 @@ function DashboardNavganLoanManagementComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.score,
id: "score",
header: t("NavganLoanManagement.score"),
enableColumnFilter: true,
datatype: "numeric",
filterFn: "equals",
columnFilterModeOptions: [
"equals",
"notEquals",
"contains",
"lessThan",
"greaterThan",
"between",
],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.is_legal_person,
id: "is_legal_person",
@@ -125,6 +145,18 @@ function DashboardNavganLoanManagementComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.city_name,
id: "city_name",
header: t("NavganLoanManagement.city_name"),
enableColumnFilter: true,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) =>
moment(row.created_at).locale("fa").format("HH:mm | yyyy/MM/DD"),
@@ -177,25 +209,6 @@ function DashboardNavganLoanManagementComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.score,
id: "score",
header: t("NavganLoanManagement.score"),
enableColumnFilter: true,
datatype: "numeric",
filterFn: "equals",
columnFilterModeOptions: [
"equals",
"notEquals",
"contains",
"lessThan",
"greaterThan",
"between",
],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.navgan_capacity,
id: "navgan_capacity",
@@ -246,6 +259,18 @@ function DashboardNavganLoanManagementComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.plate_number,
id: "plate_number",
header: t("NavganLoanManagement.plate_number"),
enableColumnFilter: false,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.proposed_amount,
id: "proposed_amount",
@@ -332,10 +357,11 @@ function DashboardNavganLoanManagementComponent() {
tableUrl={GET_LOAN_MANAGEMENT_NAVGAN}
columns={columns}
selectableRow={false}
enableCustomToolbar={false}
enableCustomToolbar={true}
CustomToolbar={TableToolbar}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
id: 'score', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}

View File

@@ -38,7 +38,6 @@ const PrintExcel = ({table}) => {
setLoading(true)
requestServer(`${EXPORT_NAVGAN_PROVINCE_MANAGER}?${filterParams}`, 'get', {
auth: true,
notification: false,
requestOptions: {responseType: 'blob'}
}).then((response) => {
const filename = `گزارش مدیر کل استانی تاریخ_${moment().format('jYYYY_jMM_jDD')}.xlsx`;

View File

@@ -126,6 +126,18 @@ function DashboardNavganProvinceManagerComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.city_name,
id: "city_name",
header: t("NavganProvinceManager.city_name"),
enableColumnFilter: true,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) =>
moment(row.created_at).locale("fa").format("HH:mm | yyyy/MM/DD"),
@@ -190,6 +202,18 @@ function DashboardNavganProvinceManagerComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.plate_number,
id: "plate_number",
header: t("NavganProvinceManager.plate_number"),
enableColumnFilter: false,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.proposed_amount,
id: "proposed_amount",

View File

@@ -38,7 +38,6 @@ const PrintExcel = ({table}) => {
setLoading(true)
requestServer(`${EXPORT_PASSENGER_BOSS}?${filterParams}`, 'get', {
auth: true,
notification: false,
requestOptions: {responseType: 'blob'}
}).then((response) => {
const filename = `گزارش کارگروه استانی تاریخ_${moment().format('jYYYY_jMM_jDD')}.xlsx`;

View File

@@ -32,6 +32,25 @@ function DashboardPassengerOfficeComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.score,
id: "score",
header: t("PassengerBoss.score"),
enableColumnFilter: true,
datatype: "numeric",
filterFn: "equals",
columnFilterModeOptions: [
"equals",
"notEquals",
"contains",
"lessThan",
"greaterThan",
"between",
],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.is_legal_person,
id: "is_legal_person",
@@ -126,6 +145,18 @@ function DashboardPassengerOfficeComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.city_name,
id: "city_name",
header: t("PassengerBoss.city_name"),
enableColumnFilter: true,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) =>
moment(row.created_at).locale("fa").format("HH:mm | yyyy/MM/DD"),
@@ -178,25 +209,6 @@ function DashboardPassengerOfficeComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.score,
id: "score",
header: t("PassengerBoss.score"),
enableColumnFilter: true,
datatype: "numeric",
filterFn: "equals",
columnFilterModeOptions: [
"equals",
"notEquals",
"contains",
"lessThan",
"greaterThan",
"between",
],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.navgan_capacity,
id: "navgan_capacity",
@@ -247,6 +259,18 @@ function DashboardPassengerOfficeComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.plate_number,
id: "plate_number",
header: t("PassengerBoss.plate_number"),
enableColumnFilter: false,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.proposed_amount,
id: "proposed_amount",
@@ -317,7 +341,7 @@ function DashboardPassengerOfficeComponent() {
CustomToolbar={TableToolbar}
enableLastUpdate={true}
sorting={[{
id: 'id', desc: false
id: 'score', desc: false
}]}
enablePinning={true}
enableDensityToggle={false}

View File

@@ -38,7 +38,6 @@ const PrintExcel = ({table}) => {
setLoading(true)
requestServer(`${EXPORT_TRANSPORTATION_ASSISTANCE}?${filterParams}`, 'get', {
auth: true,
notification: false,
requestOptions: {responseType: 'blob'}
}).then((response) => {
const filename = `گزارش معاونت حمل و نقل تاریخ_${moment().format('jYYYY_jMM_jDD')}.xlsx`;

View File

@@ -126,6 +126,18 @@ function DashboardTransportationAssistanceComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.city_name,
id: "city_name",
header: t("TransportationAssistance.city_name"),
enableColumnFilter: true,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) =>
moment(row.created_at).locale("fa").format("HH:mm | yyyy/MM/DD"),
@@ -190,6 +202,18 @@ function DashboardTransportationAssistanceComponent() {
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.plate_number,
id: "plate_number",
header: t("TransportationAssistance.plate_number"),
enableColumnFilter: false,
datatype: "text",
filterFn: "contains",
columnFilterModeOptions: ["contains", "equals", "notEquals"],
Cell: ({renderedCellValue}) => (
<Typography variant="body2">{renderedCellValue}</Typography>
),
},
{
accessorFn: (row) => row.proposed_amount,
id: "proposed_amount",

View File

@@ -171,6 +171,7 @@ export const UPDATE_LOAN_MANAGEMENT_NAVGAN =
BASE_URL + "/dashboard/navgan_loans/update"
export const GET_LOAN_STATE_NAVGAN =
BASE_URL + "/dashboard/loan_states/navgan"
export const EXPORT_LOAN_MANAGEMENT_HISTORY = BASE_URL + "/dashboard/navgan_loans/export"
//loan management navgan
//expert management
@@ -229,3 +230,4 @@ export const GET_LOAN_DISTRIBUTION = BASE_URL + "/dashboard/reports/navgan/loan_
//loan history
export const GET_LOAN_HISTORY = BASE_URL + "/dashboard/navgan_loans"
export const GET_HISTORY_DETAIL = BASE_URL + "/dashboard/navgan_loans"
export const EXPORT_LOAN_HISTORY = BASE_URL + "/dashboard/navgan_loans/export"

View File

@@ -8,13 +8,19 @@ import Notifications from "@/core/components/notifications";
import useToast from "@/lib/app/hooks/useToast";
const defaultOptions = {
auth: false, data: {}, requestOptions: {
auth: false,
data: {},
requestOptions: {
headers: {}
}, notification: true, pending: true, success: {
},
notification: true,
pending: true,
success: {
notification: {
show: true,
},
}, failed: {
},
failed: {
notification: {
show: true,
},