File tree Expand file tree Collapse file tree 1 file changed +22
-5
lines changed
microfrontends/SignDocuments/src/Component/LegaDrive Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,15 @@ function PdfFile() {
25
25
} ) ;
26
26
const [ docId , setDocId ] = useState ( ) ;
27
27
const [ handleError , setHandleError ] = useState ( ) ;
28
-
29
28
const [ folderName , setFolderName ] = useState ( [ ] ) ;
29
+ const currentUser =
30
+ localStorage . getItem (
31
+ `Parse/${ localStorage . getItem ( "parseAppId" ) } /currentUser`
32
+ ) &&
33
+ localStorage . getItem (
34
+ `Parse/${ localStorage . getItem ( "parseAppId" ) } /currentUser`
35
+ ) ;
36
+ const jsonCurrentUser = JSON . parse ( currentUser ) ;
30
37
31
38
useEffect ( ( ) => {
32
39
if ( docId ) {
@@ -151,22 +158,32 @@ function PdfFile() {
151
158
setIsFolderLoader ( true ) ;
152
159
153
160
const getParentObjId = folderName [ folderName . length - 1 ] ;
154
- const isParentId = getParentObjId && getParentObjId . objectId ;
161
+ const parentId = getParentObjId && getParentObjId . objectId ;
155
162
let data ;
156
- if ( isParentId ) {
163
+ if ( parentId ) {
157
164
data = {
158
165
Name : newFolderName ,
159
166
Type : "Folder" ,
160
167
Folder : {
161
168
__type : "Pointer" ,
162
169
className : `${ localStorage . getItem ( "_appName" ) } _Document` ,
163
- objectId : isParentId
170
+ objectId : parentId
171
+ } ,
172
+ CreatedBy : {
173
+ __type : "Pointer" ,
174
+ className : "_User" ,
175
+ objectId : jsonCurrentUser . objectId
164
176
}
165
177
} ;
166
178
} else {
167
179
data = {
168
180
Name : newFolderName ,
169
- Type : "Folder"
181
+ Type : "Folder" ,
182
+ CreatedBy : {
183
+ __type : "Pointer" ,
184
+ className : "_User" ,
185
+ objectId : jsonCurrentUser . objectId
186
+ }
170
187
} ;
171
188
}
172
189
You can’t perform that action at this time.
0 commit comments