Browse Source

TODO: export excel

master
Anna Ho 1 year ago
parent
commit
f3b9a47ade
3 changed files with 26 additions and 2 deletions
  1. +23
    -1
      src/pages/Organization/SearchPage/OrganizationSearchForm.js
  2. +2
    -1
      src/pages/Organization/SearchPage/index.js
  3. +1
    -0
      src/utils/ApiPathConst.js

+ 23
- 1
src/pages/Organization/SearchPage/OrganizationSearchForm.js View File

@@ -11,6 +11,9 @@ import { useForm } from "react-hook-form";


import { useState } from "react"; import { useState } from "react";
import * as React from "react"; import * as React from "react";

import * as UrlUtils from "../../../utils/ApiPathConst";
import * as HttpUtils from "../../../utils/HttpUtils";
// ==============================|| DASHBOARD - DEFAULT ||============================== // // ==============================|| DASHBOARD - DEFAULT ||============================== //




@@ -41,6 +44,12 @@ const OrganizationSearchForm = ({ applySearch }) => {
reset(); reset();
} }


const doExport=()=>{
HttpUtils.get({
url: UrlUtils.GET_ORG_EXPORT
});
}

return ( return (
<MainCard xs={12} md={12} lg={12} <MainCard xs={12} md={12} lg={12}
border={false} border={false}
@@ -97,7 +106,7 @@ const OrganizationSearchForm = ({ applySearch }) => {
{...register("searchCreditor")} {...register("searchCreditor")}
control={<Checkbox/>} control={<Checkbox/>}
label="Search Creditor Only" label="Search Creditor Only"
id=" "
id="searchCreditor"
/> />
</Grid> </Grid>


@@ -107,6 +116,19 @@ const OrganizationSearchForm = ({ applySearch }) => {
{/*last row*/} {/*last row*/}
<Grid container maxWidth justifyContent="flex-end"> <Grid container maxWidth justifyContent="flex-end">


<Grid item sx={{ ml: 3, mr: 3, mb: 3, mt: 3 }}>
<Button
size="large"
variant="contained"
onClick={doExport}
sx={{
textTransform: 'capitalize',
alignItems: 'end'
}}>
<Typography variant="h5">Export</Typography>
</Button>
</Grid>

<Grid item sx={{ ml: 3, mr: 3, mb: 3, mt: 3 }}> <Grid item sx={{ ml: 3, mr: 3, mb: 3, mt: 3 }}>
<Button <Button
size="large" size="large"


+ 2
- 1
src/pages/Organization/SearchPage/index.js View File

@@ -6,8 +6,9 @@ import MainCard from "../../../components/MainCard";


import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import * as UrlUtils from "../../../utils/ApiPathConst"; import * as UrlUtils from "../../../utils/ApiPathConst";
import * as React from "react";
import * as HttpUtils from "../../../utils/HttpUtils"; import * as HttpUtils from "../../../utils/HttpUtils";
import * as React from "react";



// import LoadingComponent from "../extra-pages/LoadingComponent"; // import LoadingComponent from "../extra-pages/LoadingComponent";
// import SearchForm from "./OrganizationSearchForm"; // import SearchForm from "./OrganizationSearchForm";


+ 1
- 0
src/utils/ApiPathConst.js View File

@@ -29,6 +29,7 @@ export const GET_ORG_COMBO = apiPath+'/org/combo';
export const GET_ORG_CHECK_CREDITOR = apiPath+'/org/check-creditor'; export const GET_ORG_CHECK_CREDITOR = apiPath+'/org/check-creditor';
export const GET_ORG_MARK_AS_CREDITOR = apiPath+'/org/mark-as-creditor'; export const GET_ORG_MARK_AS_CREDITOR = apiPath+'/org/mark-as-creditor';
export const GET_ORG_MARK_AS_NON_CREDITOR = apiPath+'/org/mark-as-non-creditor'; export const GET_ORG_MARK_AS_NON_CREDITOR = apiPath+'/org/mark-as-non-creditor';
export const GET_ORG_EXPORT = apiPath+'/org/export';








Loading…
Cancel
Save