fix
This commit is contained in:
parent
b86bdfc34d
commit
6259c983bf
36
package-lock.json
generated
36
package-lock.json
generated
@ -400,9 +400,9 @@
|
|||||||
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA=="
|
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA=="
|
||||||
},
|
},
|
||||||
"node_modules/@mui/base": {
|
"node_modules/@mui/base": {
|
||||||
"version": "5.0.0-alpha.128",
|
"version": "5.0.0-beta.0",
|
||||||
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-alpha.128.tgz",
|
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.0.tgz",
|
||||||
"integrity": "sha512-wub3wxNN+hUp8hzilMlXX3sZrPo75vsy1cXEQpqdTfIFlE9HprP1jlulFiPg5tfPst2OKmygXr2hhmgvAKRrzQ==",
|
"integrity": "sha512-ap+juKvt8R8n3cBqd/pGtZydQ4v2I/hgJKnvJRGjpSh3RvsvnDHO4rXov8MHQlH6VqpOekwgilFLGxMZjNTucA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.21.0",
|
"@babel/runtime": "^7.21.0",
|
||||||
"@emotion/is-prop-valid": "^1.2.0",
|
"@emotion/is-prop-valid": "^1.2.0",
|
||||||
@ -432,26 +432,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@mui/core-downloads-tracker": {
|
"node_modules/@mui/core-downloads-tracker": {
|
||||||
"version": "5.12.3",
|
"version": "5.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.12.3.tgz",
|
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.13.0.tgz",
|
||||||
"integrity": "sha512-yiJZ+knaknPHuRKhRk4L6XiwppwkAahVal3LuYpvBH7GkA2g+D9WLEXOEnNYtVFUggyKf6fWGLGnx0iqzkU5YA==",
|
"integrity": "sha512-5nXz2k8Rv2ZjtQY6kXirJVyn2+ODaQuAJmXSJtLDUQDKWp3PFUj6j3bILqR0JGOs9R5ejgwz3crLKsl6GwjwkQ==",
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
"url": "https://opencollective.com/mui"
|
"url": "https://opencollective.com/mui"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@mui/material": {
|
"node_modules/@mui/material": {
|
||||||
"version": "5.12.3",
|
"version": "5.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/@mui/material/-/material-5.12.3.tgz",
|
"resolved": "https://registry.npmjs.org/@mui/material/-/material-5.13.0.tgz",
|
||||||
"integrity": "sha512-xNmKlrEN4HsTaKFNLZfc7ie7CXx2YqEeO//hsXZx2p3MGtDdeMr2sV3jC4hsFs57RhQlF79weY7uVvC8xSuVbg==",
|
"integrity": "sha512-ckS+9tCpAzpdJdaTF+btF0b6mF9wbXg/EVKtnoAWYi0UKXoXBAVvEUMNpLGA5xdpCdf+A6fPbVUEHs9TsfU+Yw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.21.0",
|
"@babel/runtime": "^7.21.0",
|
||||||
"@mui/base": "5.0.0-alpha.128",
|
"@mui/base": "5.0.0-beta.0",
|
||||||
"@mui/core-downloads-tracker": "^5.12.3",
|
"@mui/core-downloads-tracker": "^5.13.0",
|
||||||
"@mui/system": "^5.12.3",
|
"@mui/system": "^5.12.3",
|
||||||
"@mui/types": "^7.2.4",
|
"@mui/types": "^7.2.4",
|
||||||
"@mui/utils": "^5.12.3",
|
"@mui/utils": "^5.12.3",
|
||||||
"@types/react-transition-group": "^4.4.5",
|
"@types/react-transition-group": "^4.4.6",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"csstype": "^3.1.2",
|
"csstype": "^3.1.2",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
@ -966,9 +966,9 @@
|
|||||||
"integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ=="
|
"integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ=="
|
||||||
},
|
},
|
||||||
"node_modules/@types/validator": {
|
"node_modules/@types/validator": {
|
||||||
"version": "13.7.16",
|
"version": "13.7.17",
|
||||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.16.tgz",
|
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.17.tgz",
|
||||||
"integrity": "sha512-VyKmLktUHYLbrSbsRi241MSUlGYomQgK/tfCNpej3Gt5qDOM10AZ3nU2aR2s5JritClXuOBu4K7MkywVW/Y6Ow=="
|
"integrity": "sha512-aqayTNmeWrZcvnG2MG9eGYI6b7S5fl+yKgPs6bAjOTwPS316R5SxBGKvtSExfyoJU7pIeHJfsHI0Ji41RVMkvQ=="
|
||||||
},
|
},
|
||||||
"node_modules/@typescript-eslint/parser": {
|
"node_modules/@typescript-eslint/parser": {
|
||||||
"version": "5.59.5",
|
"version": "5.59.5",
|
||||||
@ -1707,9 +1707,9 @@
|
|||||||
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
|
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
|
||||||
},
|
},
|
||||||
"node_modules/enhanced-resolve": {
|
"node_modules/enhanced-resolve": {
|
||||||
"version": "5.13.0",
|
"version": "5.14.0",
|
||||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.0.tgz",
|
||||||
"integrity": "sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==",
|
"integrity": "sha512-+DCows0XNwLDcUhbFJPdlQEVnT2zXlCv7hPxemTz86/O+B/hCQ+mb7ydkPKiflpVraqLPCAfu7lDy+hBXueojw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"graceful-fs": "^4.2.4",
|
"graceful-fs": "^4.2.4",
|
||||||
"tapable": "^2.2.0"
|
"tapable": "^2.2.0"
|
||||||
|
@ -70,7 +70,12 @@ class AskDocumentsClass extends BasePage<IPropsClass, IState> {
|
|||||||
<div className={classes["form-container"]}>
|
<div className={classes["form-container"]}>
|
||||||
<div className={classes["checkbox-container"]}>
|
<div className={classes["checkbox-container"]}>
|
||||||
{this.state.documentTypes.map((documentType) => (
|
{this.state.documentTypes.map((documentType) => (
|
||||||
<CheckBox name="document_types" toolTip="Checkbox with tooltip" option={documentType} key={documentType.value as string} />
|
<CheckBox
|
||||||
|
name="document_types"
|
||||||
|
toolTip="Checkbox with tooltip"
|
||||||
|
option={documentType}
|
||||||
|
key={documentType.value as string}
|
||||||
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className={classes["add-document-container"]}>
|
<div className={classes["add-document-container"]}>
|
||||||
@ -133,13 +138,13 @@ class AskDocumentsClass extends BasePage<IPropsClass, IState> {
|
|||||||
include: {
|
include: {
|
||||||
deed_has_document_types: {
|
deed_has_document_types: {
|
||||||
include: {
|
include: {
|
||||||
document_type: true
|
document_type: true,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
},
|
||||||
|
office: true,
|
||||||
},
|
},
|
||||||
office: true
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
if (!folder) return;
|
if (!folder) return;
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -156,11 +161,11 @@ class AskDocumentsClass extends BasePage<IPropsClass, IState> {
|
|||||||
q: {
|
q: {
|
||||||
deed_has_document_types: {
|
deed_has_document_types: {
|
||||||
include: {
|
include: {
|
||||||
document_type: true
|
document_type: true,
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
|
|
||||||
if (!documentTypes) return [];
|
if (!documentTypes) return [];
|
||||||
|
|
||||||
@ -171,8 +176,7 @@ class AskDocumentsClass extends BasePage<IPropsClass, IState> {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
return documentTypesOptions
|
return documentTypesOptions;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private canAddDocument() {
|
private canAddDocument() {
|
||||||
@ -188,19 +192,19 @@ class AskDocumentsClass extends BasePage<IPropsClass, IState> {
|
|||||||
name: this.state.documentName,
|
name: this.state.documentName,
|
||||||
private_description: this.state.visibleDescription,
|
private_description: this.state.visibleDescription,
|
||||||
office: {
|
office: {
|
||||||
uid: this.state.folder?.office!.uid!
|
uid: this.state.folder?.office!.uid!,
|
||||||
},
|
},
|
||||||
public_description: this.state.visibleDescription
|
public_description: this.state.visibleDescription,
|
||||||
})
|
});
|
||||||
|
|
||||||
const oldDocumentsType = this.state.folder?.deed?.deed_has_document_types!;
|
const oldDocumentsType = this.state.folder?.deed?.deed_has_document_types!;
|
||||||
const deed = await Deeds.getInstance().put(this.state.folder?.deed?.uid!,{
|
await Deeds.getInstance().put(this.state.folder?.deed?.uid!, {
|
||||||
deed_has_document_types: [
|
deed_has_document_types: [
|
||||||
...oldDocumentsType,
|
...oldDocumentsType,
|
||||||
{
|
{
|
||||||
document_type: documentType,
|
document_type: documentType,
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.loadData();
|
await this.loadData();
|
||||||
@ -253,25 +257,29 @@ class AskDocumentsClass extends BasePage<IPropsClass, IState> {
|
|||||||
e: React.FormEvent<HTMLFormElement> | null,
|
e: React.FormEvent<HTMLFormElement> | null,
|
||||||
values: {
|
values: {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
},
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const documentAsked: [] = values["document_types"] as [];
|
const documentAsked: [] = values["document_types"] as [];
|
||||||
await documentAsked.forEach(async (document) => {
|
await documentAsked.forEach(async (document) => {
|
||||||
await Documents.getInstance().post({
|
await Documents.getInstance().post({
|
||||||
folder: {
|
folder: {
|
||||||
uid: this.props.folderUid
|
uid: this.props.folderUid,
|
||||||
},
|
},
|
||||||
depositor: {
|
depositor: {
|
||||||
uid: this.props.customerUid
|
uid: this.props.customerUid,
|
||||||
},
|
},
|
||||||
document_type: {
|
document_type: {
|
||||||
uid: document
|
uid: document,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.props.router.push(Module.getInstance().get().modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", this.props.folderUid));
|
this.props.router.push(
|
||||||
|
Module.getInstance()
|
||||||
|
.get()
|
||||||
|
.modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", this.props.folderUid),
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user