Fixed rounding bug on invoice total calculation BOD-120. Added documents viewing to edit invoice BOD-75 BOD-63.
This commit is contained in:
@@ -4,9 +4,15 @@ import DocumentsUploadContainer from "../documents-upload/documents-upload.conta
|
||||
import JobsDocumentsDownloadButton from "./jobs-document-gallery.download.component";
|
||||
import JobsDocumentsDeleteButton from "./jobs-documents-gallery.delete.component";
|
||||
|
||||
function JobsDocumentsComponent({ data, jobId, refetch }) {
|
||||
function JobsDocumentsComponent({
|
||||
data,
|
||||
jobId,
|
||||
refetch,
|
||||
invoiceId,
|
||||
invoicesCallback,
|
||||
}) {
|
||||
const [galleryImages, setgalleryImages] = useState([]);
|
||||
|
||||
console.log("Gallery Data", data);
|
||||
useEffect(() => {
|
||||
setgalleryImages(
|
||||
data.reduce((acc, value) => {
|
||||
@@ -28,17 +34,18 @@ function JobsDocumentsComponent({ data, jobId, refetch }) {
|
||||
}, [data, setgalleryImages]);
|
||||
|
||||
return (
|
||||
<div className='clearfix'>
|
||||
<div className="clearfix">
|
||||
<DocumentsUploadContainer
|
||||
jobId={jobId}
|
||||
callbackAfterUpload={refetch}
|
||||
invoiceId={invoiceId}
|
||||
callbackAfterUpload={invoicesCallback || refetch}
|
||||
tagsArray={["test"]}
|
||||
/>
|
||||
|
||||
<JobsDocumentsDownloadButton galleryImages={galleryImages} />
|
||||
<JobsDocumentsDeleteButton
|
||||
galleryImages={galleryImages}
|
||||
deletionCallback={refetch}
|
||||
deletionCallback={invoicesCallback || refetch}
|
||||
/>
|
||||
|
||||
<Gallery
|
||||
|
||||
Reference in New Issue
Block a user