console back url (#40)
This commit is contained in:
commit
aca465dd5c
@ -18,6 +18,7 @@ export default abstract class BaseApiService {
|
||||
}
|
||||
|
||||
protected getBaseUrl() {
|
||||
console.log("BaseApiService.baseUrl", BaseApiService.baseUrl);
|
||||
return BaseApiService.baseUrl;
|
||||
}
|
||||
|
||||
|
@ -79,16 +79,35 @@ export default class Modal extends React.Component<IProps, IState> {
|
||||
willClose: false,
|
||||
});
|
||||
}, this.props.animationDelay);
|
||||
document.body.style.overflow = "auto";
|
||||
}
|
||||
if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen) {
|
||||
this.setState({ isOpen: true });
|
||||
document.body.style.overflow = "hidden";
|
||||
}
|
||||
this.rootRefElement.current?.style.setProperty("--animation-delay", this.props.animationDelay!.toString().concat("ms"));
|
||||
}
|
||||
|
||||
public override componentDidMount(): void {
|
||||
document.addEventListener("keydown", this.handleKeyDown);
|
||||
}
|
||||
|
||||
public override componentWillUnmount(): void {
|
||||
document.body.style.overflow = "auto";
|
||||
document.removeEventListener("keydown", this.handleKeyDown);
|
||||
}
|
||||
|
||||
protected close() {
|
||||
if (this.props.hasContainerClosable === false) return;
|
||||
if (this.state.willClose) return;
|
||||
this.props.onClose();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private handleKeyDown = (e: KeyboardEvent): void => {
|
||||
if (e.key === "Escape" || e.key === "Esc" || e.key === "Backspace") {
|
||||
this.props.onClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,8 @@ export default class UserFolder extends React.Component<IProps, IState> {
|
||||
|
||||
private calculateDocumentsPercentageProgress(): number {
|
||||
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 numberDocumentsAsked: number = this.getDocumentsByStatus(EDocumentStatus.ASKED)?.length || 0;
|
||||
const depositedDocuments: number = totalDocuments - numberDocumentsAsked - numberDocumentsRefused;
|
||||
|
Loading…
x
Reference in New Issue
Block a user