🐛 Forgot console logs

This commit is contained in:
Maxime Lalo 2023-07-11 17:14:14 +02:00
parent 7e3849a2e4
commit d12b4a33c7
2 changed files with 3 additions and 9 deletions

View File

@ -18,7 +18,6 @@ export default function CollaboratorInformations(props: IProps) {
const [userSelected, setUserSelected] = useState<User | null>(null); const [userSelected, setUserSelected] = useState<User | null>(null);
useEffect(() => { useEffect(() => {
console.log("Getting user with uid ", collaboratorUid);
async function getUser() { async function getUser() {
if (!collaboratorUid) return; if (!collaboratorUid) return;
const user = await Users.getInstance().getByUid(collaboratorUid as string, { const user = await Users.getInstance().getByUid(collaboratorUid as string, {

View File

@ -234,8 +234,7 @@ class CreateFolderClass extends BasePage<IPropsClass, IState> {
[key: string]: any; [key: string]: any;
}, },
) { ) {
const officeId = (JwtService.getInstance().decodeJwt())?.office_Id; const officeId = JwtService.getInstance().decodeJwt()?.office_Id;
console.log('form initializdd');
const selectedDeedTypeUid: DeedType | undefined = this.state.deedTypes.find( const selectedDeedTypeUid: DeedType | undefined = this.state.deedTypes.find(
(deedType) => deedType.uid === this.state.formValues.act_typ?.value, (deedType) => deedType.uid === this.state.formValues.act_typ?.value,
); );
@ -261,24 +260,20 @@ class CreateFolderClass extends BasePage<IPropsClass, IState> {
uid: officeId, uid: officeId,
}), }),
customers: [], customers: [],
stakeholders stakeholders,
}); });
console.log('form');
try { try {
await officeFolderForm.validateOrReject?.({ groups: ["createFolder"], forbidUnknownValues: false }); await officeFolderForm.validateOrReject?.({ groups: ["createFolder"], forbidUnknownValues: false });
} catch (validationErrors) { } catch (validationErrors) {
this.setState({ this.setState({
validationError: validationErrors as ValidationError[], validationError: validationErrors as ValidationError[],
}); });
console.log('validation errros');
return; return;
} }
try { try {
const newOfficeFolder = await Folders.getInstance().post(officeFolderForm); const newOfficeFolder = await Folders.getInstance().post(officeFolderForm);
console.log('new office folder: ',newOfficeFolder)
if (!newOfficeFolder) return; if (!newOfficeFolder) return;
this.props.router.push(`/folders/${newOfficeFolder.uid}`); this.props.router.push(`/folders/${newOfficeFolder.uid}`);
} catch (backError: any) { } catch (backError: any) {