update auth

This commit is contained in:
2024-12-01 13:40:45 +07:00
parent 9b8ac2ceaf
commit 24d45c9134

View File

@ -124,16 +124,15 @@ export class AuthController {
}
const res_list = repoMenu.createQueryBuilder()
.where(whereAttr.join(' or '), whereVal)
.andWhere('id_parent is null')
.where('(' + whereAttr.join(' or ') + ') and id_parent is null', whereVal)
.orderBy('order_number', 'ASC');
let list_data_final = await res_list.getMany();
if (list_data_final.length > 0) {
const res_list_all = await repoMenu.createQueryBuilder()
.where(whereAttr.join(' or '), whereVal)
.andWhere('id_parent is not null').getMany();
.where('(' + whereAttr.join(' or ') + ') and id_parent is not null', whereVal)
.orderBy('order_number', 'ASC').getMany();
let list_child: any = {};
for (let p of res_list_all) {