🐛 Forgot console logs
This commit is contained in:
parent
7e3849a2e4
commit
d12b4a33c7
@ -18,7 +18,6 @@ export default function CollaboratorInformations(props: IProps) {
|
||||
const [userSelected, setUserSelected] = useState<User | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("Getting user with uid ", collaboratorUid);
|
||||
async function getUser() {
|
||||
if (!collaboratorUid) return;
|
||||
const user = await Users.getInstance().getByUid(collaboratorUid as string, {
|
||||
|
@ -234,8 +234,7 @@ class CreateFolderClass extends BasePage<IPropsClass, IState> {
|
||||
[key: string]: any;
|
||||
},
|
||||
) {
|
||||
const officeId = (JwtService.getInstance().decodeJwt())?.office_Id;
|
||||
console.log('form initializdd');
|
||||
const officeId = JwtService.getInstance().decodeJwt()?.office_Id;
|
||||
const selectedDeedTypeUid: DeedType | undefined = this.state.deedTypes.find(
|
||||
(deedType) => deedType.uid === this.state.formValues.act_typ?.value,
|
||||
);
|
||||
@ -261,28 +260,24 @@ class CreateFolderClass extends BasePage<IPropsClass, IState> {
|
||||
uid: officeId,
|
||||
}),
|
||||
customers: [],
|
||||
stakeholders
|
||||
stakeholders,
|
||||
});
|
||||
|
||||
console.log('form');
|
||||
|
||||
try {
|
||||
await officeFolderForm.validateOrReject?.({ groups: ["createFolder"], forbidUnknownValues: false });
|
||||
} catch (validationErrors) {
|
||||
this.setState({
|
||||
validationError: validationErrors as ValidationError[],
|
||||
});
|
||||
console.log('validation errros');
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const newOfficeFolder = await Folders.getInstance().post(officeFolderForm);
|
||||
console.log('new office folder: ',newOfficeFolder)
|
||||
if (!newOfficeFolder) return;
|
||||
this.props.router.push(`/folders/${newOfficeFolder.uid}`);
|
||||
} catch (backError: any) {
|
||||
if(!Array.isArray(backError)) return;
|
||||
if (!Array.isArray(backError)) return;
|
||||
this.setState({
|
||||
validationError: backError as ValidationError[],
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user