| name={route.name} | name={route.name} | ||||
| render={props => ( | render={props => ( | ||||
| <CFade> | <CFade> | ||||
| {/* <CFade code="br-root"> */} | |||||
| <route.component {...props} /> | <route.component {...props} /> | ||||
| </CFade> | </CFade> | ||||
| )} /> | )} /> |
| const apiCall = () => { | const apiCall = () => { | ||||
| const url = encodeURIComponent("http://localhost:3000/#/DemoComponent2"); | const url = encodeURIComponent("http://localhost:3000/#/DemoComponent2"); | ||||
| const dateNow = new Date(); | |||||
| fetch('https://localhost:7285/api/PDFGenerator/' + url) | fetch('https://localhost:7285/api/PDFGenerator/' + url) | ||||
| .then(async res => ({ | .then(async res => ({ | ||||
| filename: "donwload.pdf", | |||||
| filename: "John Doe - " + dateNow +" - report.pdf", | |||||
| blob: await res.blob() | blob: await res.blob() | ||||
| })) | })) | ||||
| .then(resObj => { | .then(resObj => { |
| const DemoComponent11 = () => { | const DemoComponent11 = () => { | ||||
| const exec = () => | |||||
| { | |||||
| PDFEngine(); | |||||
| window.print(); | |||||
| } | |||||
| return ( | return ( | ||||
| <> | <> | ||||
| <button className="float-right btn btn-primary" onClick={PDFEngine}>Execute</button> | |||||
| <button className="float-right btn btn-primary" onClick={exec}>Execute</button> | |||||
| <br /> | <br /> | ||||
| 11 | 11 | ||||
| <br /> | <br /> | ||||
| <div> | <div> | ||||
| <br /> | <br /> | ||||
| <table className="table table-hover table-outline mb-0 d-sm-table" code="br-removecolumn-3"> | |||||
| <table className="table table-hover table-outline mb-0 d-sm-table" code="br-shownumberrows-2"> | |||||
| <thead className="thead-light"> | <thead className="thead-light"> | ||||
| <tr> | <tr> | ||||
| <th className="text-center"><CIcon name="cil-people" /></th> | <th className="text-center"><CIcon name="cil-people" /></th> |
| const DemoComponent12 = () => { | const DemoComponent12 = () => { | ||||
| const exec = () => | |||||
| { | |||||
| PDFEngine(); | |||||
| window.print(); | |||||
| } | |||||
| return ( | return ( | ||||
| <> | <> | ||||
| <button className="float-right btn btn-primary" onClick={PDFEngine}>Execute</button> | |||||
| <button className="float-right btn btn-primary" onClick={exec}>Execute</button> | |||||
| <br /> | <br /> | ||||
| 12 | 12 | ||||
| <br /> | <br /> |
| const apiCall = () => { | const apiCall = () => { | ||||
| const url = encodeURIComponent("http://localhost:3000/#/DemoComponent2"); | const url = encodeURIComponent("http://localhost:3000/#/DemoComponent2"); | ||||
| const dateNow = new Date(); | |||||
| fetch('https://localhost:7285/api/PDFGenerator/' + url) | fetch('https://localhost:7285/api/PDFGenerator/' + url) | ||||
| .then(async res => ({ | .then(async res => ({ | ||||
| filename: "donwload.pdf", | |||||
| filename: "John Doe - " + dateNow +" - report.pdf", | |||||
| blob: await res.blob() | blob: await res.blob() | ||||
| })) | })) | ||||
| .then(resObj => { | .then(resObj => { |
| const DemoComponent3 = () => { | const DemoComponent3 = () => { | ||||
| const exec = () => | |||||
| { | |||||
| PDFEngine(); | |||||
| window.print(); | |||||
| } | |||||
| return ( | return ( | ||||
| <> | <> | ||||
| <button className="float-right btn btn-primary" onClick={PDFEngine}>Execute</button> | |||||
| <button className="float-right btn btn-primary" onClick={exec}>Execute</button> | |||||
| <br /> | <br /> | ||||
| 3 | 3 | ||||
| <br /> | <br /> |
| const DemoComponent4 = () => { | const DemoComponent4 = () => { | ||||
| const exec = () => | |||||
| { | |||||
| PDFEngine(); | |||||
| window.print(); | |||||
| } | |||||
| return ( | return ( | ||||
| <> | <> | ||||
| <button className="float-right btn btn-primary" onClick={PDFEngine}>Execute</button> | |||||
| <button className="float-right btn btn-primary" onClick={exec}>Execute</button> | |||||
| <br /> | <br /> | ||||
| 4 | 4 | ||||
| <br /> | <br /> |
| const DemoComponent5 = () => { | const DemoComponent5 = () => { | ||||
| const exec = () => | |||||
| { | |||||
| PDFEngine(); | |||||
| window.print(); | |||||
| } | |||||
| return ( | return ( | ||||
| <> | <> | ||||
| <button className="float-right btn btn-primary" onClick={PDFEngine}>Execute</button> | |||||
| <button className="float-right btn btn-primary" onClick={exec}>Execute</button> | |||||
| <br /> | <br /> | ||||
| 5 | 5 | ||||
| <br /> | <br /> |
| const DemoComponent6 = () => { | const DemoComponent6 = () => { | ||||
| const exec = () => | |||||
| { | |||||
| PDFEngine(); | |||||
| window.print(); | |||||
| } | |||||
| return ( | return ( | ||||
| <> | <> | ||||
| <button className="float-right btn btn-primary" onClick={PDFEngine}>Execute</button> | |||||
| <button className="float-right btn btn-primary" onClick={exec}>Execute</button> | |||||
| <br/> | <br/> | ||||
| 6 | 6 | ||||
| <br/> | <br/> |