🐛 Fixing customer completion in a folder
This commit is contained in:
parent
d9a05c017a
commit
db7918cf36
@ -138,7 +138,8 @@ export default class UserFolder extends React.Component<IProps, IState> {
|
|||||||
|
|
||||||
private calculateDocumentsPercentageProgress(): number {
|
private calculateDocumentsPercentageProgress(): number {
|
||||||
if (!this.props.customer.documents) return 0;
|
if (!this.props.customer.documents) return 0;
|
||||||
const totalDocuments: number = this.props.customer.documents.length;
|
const documents = this.props.customer.documents.filter((document) => document.folder?.uid === this.props.folder.uid);
|
||||||
|
const totalDocuments: number = documents.length;
|
||||||
const numberDocumentsRefused: number = this.getDocumentsByStatus(EDocumentStatus.REFUSED)?.length || 0;
|
const numberDocumentsRefused: number = this.getDocumentsByStatus(EDocumentStatus.REFUSED)?.length || 0;
|
||||||
const numberDocumentsAsked: number = this.getDocumentsByStatus(EDocumentStatus.ASKED)?.length || 0;
|
const numberDocumentsAsked: number = this.getDocumentsByStatus(EDocumentStatus.ASKED)?.length || 0;
|
||||||
const depositedDocuments: number = totalDocuments - numberDocumentsAsked - numberDocumentsRefused;
|
const depositedDocuments: number = totalDocuments - numberDocumentsAsked - numberDocumentsRefused;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user