| @@ -34,8 +34,10 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||||
| const intl = useIntl(); | const intl = useIntl(); | ||||
| const [creditorConfirmPopUp, setCreditorConfirmPopUp] = React.useState(false); | const [creditorConfirmPopUp, setCreditorConfirmPopUp] = React.useState(false); | ||||
| const [nonCreditorConfirmPopUp, setNonCreditorConfirmPopUp] = React.useState(false); | const [nonCreditorConfirmPopUp, setNonCreditorConfirmPopUp] = React.useState(false); | ||||
| const [afterSendPopUp, setAfterSendPopUp] = React.useState(false); | |||||
| const [currentUserData, setCurrentUserData] = useState({}); | const [currentUserData, setCurrentUserData] = useState({}); | ||||
| const [overduePublicNotice, setOverduePublicNotice] = useState(0); | |||||
| const [editMode, setEditMode] = useState(false); | const [editMode, setEditMode] = useState(false); | ||||
| const [createMode, setCreateMode] = useState(false); | const [createMode, setCreateMode] = useState(false); | ||||
| const [onReady, setOnReady] = useState(false); | const [onReady, setOnReady] = useState(false); | ||||
| @@ -230,12 +232,13 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||||
| }); | }); | ||||
| } | } | ||||
| const sendDn_terminationOfCredit = () => { | |||||
| const sendDn_Overdue = () => { | |||||
| setNonCreditorConfirmPopUp(false); | setNonCreditorConfirmPopUp(false); | ||||
| HttpUtils.get({ | HttpUtils.get({ | ||||
| url: UrlUtils.GET_SEND_OVERDUE_CREDITOR_LIST + "/" + id, | url: UrlUtils.GET_SEND_OVERDUE_CREDITOR_LIST + "/" + id, | ||||
| onSuccess: () => { | |||||
| loadDataFun(); | |||||
| onSuccess: (responseData) => { | |||||
| setOverduePublicNotice(responseData.overduePublicNotice); | |||||
| setAfterSendPopUp(true); | |||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| @@ -338,7 +341,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||||
| <Button | <Button | ||||
| variant="contained" | variant="contained" | ||||
| color="primary" | color="primary" | ||||
| onClick={() => sendDn_terminationOfCredit(true)} | |||||
| onClick={() => sendDn_Overdue(true)} | |||||
| > | > | ||||
| Generate O/S DN List | Generate O/S DN List | ||||
| </Button> | </Button> | ||||
| @@ -629,6 +632,27 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||||
| </DialogActions> | </DialogActions> | ||||
| </Dialog> | </Dialog> | ||||
| </div> | </div> | ||||
| <div> | |||||
| <Dialog | |||||
| open={afterSendPopUp} | |||||
| onClose={() => setAfterSendPopUp(false)} | |||||
| PaperProps={{ | |||||
| sx: { | |||||
| minWidth: '40vw', | |||||
| maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, | |||||
| maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } | |||||
| } | |||||
| }} | |||||
| > | |||||
| <DialogTitle><Typography variant="h3">Info</Typography></DialogTitle> | |||||
| <DialogContent style={{ display: 'flex', }}> | |||||
| <Typography variant="h4" style={{ padding: '16px' }}>Overdue Public Notice count: {overduePublicNotice}</Typography> | |||||
| </DialogContent> | |||||
| <DialogActions> | |||||
| <Button onClick={() => setAfterSendPopUp(false)}><Typography variant="h5">OK</Typography></Button> | |||||
| </DialogActions> | |||||
| </Dialog> | |||||
| </div> | |||||
| </MainCard> | </MainCard> | ||||
| ); | ); | ||||
| }; | }; | ||||