fix: dokumen divisi

Deskripsi:
- update order by
- loading rename
- loading create
- loading hapus
- loading move
- loading copy
- realtime move di asal itemnya

No Issues
This commit is contained in:
amel
2024-11-05 10:55:19 +08:00
parent 9f8cf53dd8
commit 29d1e1f9c9
5 changed files with 65 additions and 31 deletions

View File

@@ -125,6 +125,11 @@ export async function GET(request: Request) {
updatedAt: true
}
}
},
orderBy: {
DivisionDocumentFolderFile: {
createdAt: 'desc'
}
}
})
@@ -169,7 +174,7 @@ export async function GET(request: Request) {
updatedAt: true
},
orderBy: {
name: 'asc'
createdAt: 'desc'
}
})
@@ -185,7 +190,7 @@ export async function GET(request: Request) {
allData.push(...formatDataShare)
}
const formatData = _.orderBy(allData, ['category', 'name'], ['desc', 'asc']);
const formatData = _.orderBy(allData, ['category', 'createdAt'], ['desc', 'asc']);
let pathNow = path
let jalur = []