Small fixes front

This commit is contained in:
Maxime Lalo 2023-10-09 10:46:14 +02:00
parent 8773e5f25b
commit 150ff1c2c3
5 changed files with 28 additions and 21 deletions

26
package-lock.json generated
View File

@ -2518,11 +2518,11 @@
} }
}, },
"node_modules/flat-cache": { "node_modules/flat-cache": {
"version": "3.1.0", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz",
"integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==",
"dependencies": { "dependencies": {
"flatted": "^3.2.7", "flatted": "^3.2.9",
"keyv": "^4.5.3", "keyv": "^4.5.3",
"rimraf": "^3.0.2" "rimraf": "^3.0.2"
}, },
@ -3337,9 +3337,9 @@
"integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A=="
}, },
"node_modules/keyv": { "node_modules/keyv": {
"version": "4.5.3", "version": "4.5.4",
"resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
"integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
"dependencies": { "dependencies": {
"json-buffer": "3.0.1" "json-buffer": "3.0.1"
} }
@ -3379,9 +3379,9 @@
} }
}, },
"node_modules/libphonenumber-js": { "node_modules/libphonenumber-js": {
"version": "1.10.46", "version": "1.10.47",
"resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.46.tgz", "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.47.tgz",
"integrity": "sha512-xJqWqMV5hM/6vWj68yqUejkzM9KkYjWFfqimVL4QG4dS5Rij2EXWus/s248x4zUpXeX2gwbLBzQW+aPqUitxIg==" "integrity": "sha512-b4t7VQDV29xx/ni+58yl9KWPGjnDLDXCeCTLrD4V8vDpObXZRZBrg7uX/HWZ7YXiJKqdBDGgc+barUUTNB6Slw=="
}, },
"node_modules/lines-and-columns": { "node_modules/lines-and-columns": {
"version": "1.2.4", "version": "1.2.4",
@ -4294,9 +4294,9 @@
} }
}, },
"node_modules/sass": { "node_modules/sass": {
"version": "1.68.0", "version": "1.69.0",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.68.0.tgz", "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.0.tgz",
"integrity": "sha512-Lmj9lM/fef0nQswm1J2HJcEsBUba4wgNx2fea6yJHODREoMFnwRpZydBnX/RjyXw2REIwdkbqE4hrTo4qfDBUA==", "integrity": "sha512-l3bbFpfTOGgQZCLU/gvm1lbsQ5mC/WnLz3djL2v4WCJBDrWm58PO+jgngcGRNnKUh6wSsdm50YaovTqskZ0xDQ==",
"dependencies": { "dependencies": {
"chokidar": ">=3.0.0 <4.0.0", "chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0", "immutable": "^4.0.0",

View File

@ -71,6 +71,18 @@ export default class Documents extends BaseNotary {
} }
} }
public async refuse(uid: string, refused_reason: string): Promise<Document> {
const url = new URL(this.baseURl.concat(`/${uid}/refuse`));
try {
return await this.putRequest<Document>(url, {
refused_reason,
});
} catch (err) {
this.onError(err);
return Promise.reject(err);
}
}
public async put(uid: string, body: IPutDocumentsParams): Promise<Document> { public async put(uid: string, body: IPutDocumentsParams): Promise<Document> {
const url = new URL(this.baseURl.concat(`/${uid}`)); const url = new URL(this.baseURl.concat(`/${uid}`));
try { try {

View File

@ -95,6 +95,7 @@
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
color: var(--color-neutral-500); color: var(--color-neutral-500);
word-break: break-word;
} }
a { a {

View File

@ -132,7 +132,7 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
<> <>
{this.props.isAnchored === AnchorStatus.NOT_ANCHORED && ( {this.props.isAnchored === AnchorStatus.NOT_ANCHORED && (
<Button variant={EButtonVariant.PRIMARY} onClick={this.openValidateModal}> <Button variant={EButtonVariant.PRIMARY} onClick={this.openValidateModal}>
Ancrer le dossier Valider et ancrer
</Button> </Button>
)} )}
{this.props.isAnchored === AnchorStatus.ANCHORING && ( {this.props.isAnchored === AnchorStatus.ANCHORING && (
@ -250,9 +250,6 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
rédaction d'acte. rédaction d'acte.
</Typography> </Typography>
<Image src={ValidateAnchoringGif} alt="Anchoring animation" className={classes["validate-gif"]} /> <Image src={ValidateAnchoringGif} alt="Anchoring animation" className={classes["validate-gif"]} />
<div className={classes["dont-show-again"]}>
<CheckBox option={{ label: "Ne plus afficher ce message", value: false }} />
</div>
</div> </div>
)} )}
</div> </div>

View File

@ -275,10 +275,7 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
private async refuseDocument() { private async refuseDocument() {
try { try {
await Documents.getInstance().put(this.props.documentUid, { await Documents.getInstance().refuse(this.props.documentUid, this.state.refuseText);
document_status: EDocumentStatus.REFUSED,
refused_reason: this.state.refuseText,
});
this.props.router.push( this.props.router.push(
Module.getInstance() Module.getInstance()