update auth
This commit is contained in:
@ -124,16 +124,15 @@ export class AuthController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const res_list = repoMenu.createQueryBuilder()
|
const res_list = repoMenu.createQueryBuilder()
|
||||||
.where(whereAttr.join(' or '), whereVal)
|
.where('(' + whereAttr.join(' or ') + ') and id_parent is null', whereVal)
|
||||||
.andWhere('id_parent is null')
|
|
||||||
.orderBy('order_number', 'ASC');
|
.orderBy('order_number', 'ASC');
|
||||||
|
|
||||||
let list_data_final = await res_list.getMany();
|
let list_data_final = await res_list.getMany();
|
||||||
|
|
||||||
if (list_data_final.length > 0) {
|
if (list_data_final.length > 0) {
|
||||||
const res_list_all = await repoMenu.createQueryBuilder()
|
const res_list_all = await repoMenu.createQueryBuilder()
|
||||||
.where(whereAttr.join(' or '), whereVal)
|
.where('(' + whereAttr.join(' or ') + ') and id_parent is not null', whereVal)
|
||||||
.andWhere('id_parent is not null').getMany();
|
.orderBy('order_number', 'ASC').getMany();
|
||||||
|
|
||||||
let list_child: any = {};
|
let list_child: any = {};
|
||||||
for (let p of res_list_all) {
|
for (let p of res_list_all) {
|
||||||
|
|||||||
Reference in New Issue
Block a user