no message

This commit is contained in:
kittapath 2024-08-20 15:49:59 +07:00
parent d38b7e6d90
commit 0d3e502513

View file

@ -595,9 +595,9 @@ export class OrganizationController extends Controller {
child2: null, child2: null,
child3: null, child3: null,
child4: null, child4: null,
} };
if (!request.user.role.includes('SUPER_ADMIN')) { if (!request.user.role.includes("SUPER_ADMIN")) {
_data = await new permission().PermissionOrgList(request, "SYS_ORG"); _data = await new permission().PermissionOrgList(request, "SYS_ORG");
} }
const orgRevision = await this.orgRevisionRepository.findOne({ where: { id } }); const orgRevision = await this.orgRevisionRepository.findOne({ where: { id } });
@ -1870,7 +1870,10 @@ export class OrganizationController extends Controller {
.map((x0: PosMaster) => ({ .map((x0: PosMaster) => ({
personID: x0.current_holder.id, personID: x0.current_holder.id,
name: x0.current_holder.firstName, name: x0.current_holder.firstName,
avatar: x0.current_holder && x0.current_holder.avatar != null && x0.current_holder.avatarName != null avatar:
x0.current_holder &&
x0.current_holder.avatar != null &&
x0.current_holder.avatarName != null
? `${x0.current_holder.avatar}/${x0.current_holder.avatarName}` ? `${x0.current_holder.avatar}/${x0.current_holder.avatarName}`
: null, : null,
positionName: x0.current_holder.position, positionName: x0.current_holder.position,
@ -1883,7 +1886,10 @@ export class OrganizationController extends Controller {
.map((x1: PosMaster) => ({ .map((x1: PosMaster) => ({
personID: x1.current_holder.id, personID: x1.current_holder.id,
name: x1.current_holder.firstName, name: x1.current_holder.firstName,
avatar: x1.current_holder && x1.current_holder.avatar != null && x1.current_holder.avatarName != null avatar:
x1.current_holder &&
x1.current_holder.avatar != null &&
x1.current_holder.avatarName != null
? `${x1.current_holder.avatar}/${x1.current_holder.avatarName}` ? `${x1.current_holder.avatar}/${x1.current_holder.avatarName}`
: null, : null,
positionName: x1.current_holder.position, positionName: x1.current_holder.position,
@ -1896,7 +1902,10 @@ export class OrganizationController extends Controller {
.map((x2: PosMaster) => ({ .map((x2: PosMaster) => ({
personID: x2.current_holder.id, personID: x2.current_holder.id,
name: x2.current_holder.firstName, name: x2.current_holder.firstName,
avatar: x2.current_holder && x2.current_holder.avatar != null && x2.current_holder.avatarName != null avatar:
x2.current_holder &&
x2.current_holder.avatar != null &&
x2.current_holder.avatarName != null
? `${x2.current_holder.avatar}/${x2.current_holder.avatarName}` ? `${x2.current_holder.avatar}/${x2.current_holder.avatarName}`
: null, : null,
positionName: x2.current_holder.position, positionName: x2.current_holder.position,
@ -1909,7 +1918,10 @@ export class OrganizationController extends Controller {
.map((x3: PosMaster) => ({ .map((x3: PosMaster) => ({
personID: x3.current_holder.id, personID: x3.current_holder.id,
name: x3.current_holder.firstName, name: x3.current_holder.firstName,
avatar: x3.current_holder && x3.current_holder.avatar != null && x3.current_holder.avatarName != null avatar:
x3.current_holder &&
x3.current_holder.avatar != null &&
x3.current_holder.avatarName != null
? `${x3.current_holder.avatar}/${x3.current_holder.avatarName}` ? `${x3.current_holder.avatar}/${x3.current_holder.avatarName}`
: null, : null,
positionName: x3.current_holder.position, positionName: x3.current_holder.position,
@ -1924,7 +1936,10 @@ export class OrganizationController extends Controller {
.map((x4: PosMaster) => ({ .map((x4: PosMaster) => ({
personID: x4.current_holder.id, personID: x4.current_holder.id,
name: x4.current_holder.firstName, name: x4.current_holder.firstName,
avatar: x4.current_holder && x4.current_holder.avatar != null && x4.current_holder.avatarName != null avatar:
x4.current_holder &&
x4.current_holder.avatar != null &&
x4.current_holder.avatarName != null
? `${x4.current_holder.avatar}/${x4.current_holder.avatarName}` ? `${x4.current_holder.avatar}/${x4.current_holder.avatarName}`
: null, : null,
positionName: x4.current_holder.position, positionName: x4.current_holder.position,
@ -2000,7 +2015,8 @@ export class OrganizationController extends Controller {
.map((x0: PosMaster) => ({ .map((x0: PosMaster) => ({
personID: x0.next_holder.id, personID: x0.next_holder.id,
name: x0.next_holder.firstName, name: x0.next_holder.firstName,
avatar: x0.next_holder && x0.next_holder.avatar != null && x0.next_holder.avatarName != null avatar:
x0.next_holder && x0.next_holder.avatar != null && x0.next_holder.avatarName != null
? `${x0.next_holder.avatar}/${x0.next_holder.avatarName}` ? `${x0.next_holder.avatar}/${x0.next_holder.avatarName}`
: null, : null,
positionName: x0.next_holder.position, positionName: x0.next_holder.position,
@ -2013,7 +2029,8 @@ export class OrganizationController extends Controller {
.map((x1: PosMaster) => ({ .map((x1: PosMaster) => ({
personID: x1.next_holder.id, personID: x1.next_holder.id,
name: x1.next_holder.firstName, name: x1.next_holder.firstName,
avatar: x1.next_holder && x1.next_holder.avatar != null && x1.next_holder.avatarName != null avatar:
x1.next_holder && x1.next_holder.avatar != null && x1.next_holder.avatarName != null
? `${x1.next_holder.avatar}/${x1.next_holder.avatarName}` ? `${x1.next_holder.avatar}/${x1.next_holder.avatarName}`
: null, : null,
positionName: x1.next_holder.position, positionName: x1.next_holder.position,
@ -2026,7 +2043,10 @@ export class OrganizationController extends Controller {
.map((x2: PosMaster) => ({ .map((x2: PosMaster) => ({
personID: x2.next_holder.id, personID: x2.next_holder.id,
name: x2.next_holder.firstName, name: x2.next_holder.firstName,
avatar: x2.next_holder && x2.next_holder.avatar != null && x2.next_holder.avatarName != null avatar:
x2.next_holder &&
x2.next_holder.avatar != null &&
x2.next_holder.avatarName != null
? `${x2.next_holder.avatar}/${x2.next_holder.avatarName}` ? `${x2.next_holder.avatar}/${x2.next_holder.avatarName}`
: null, : null,
positionName: x2.next_holder.position, positionName: x2.next_holder.position,
@ -2039,7 +2059,10 @@ export class OrganizationController extends Controller {
.map((x3: PosMaster) => ({ .map((x3: PosMaster) => ({
personID: x3.next_holder.id, personID: x3.next_holder.id,
name: x3.next_holder.firstName, name: x3.next_holder.firstName,
avatar: x3.next_holder && x3.next_holder.avatar != null && x3.next_holder.avatarName != null avatar:
x3.next_holder &&
x3.next_holder.avatar != null &&
x3.next_holder.avatarName != null
? `${x3.next_holder.avatar}/${x3.next_holder.avatarName}` ? `${x3.next_holder.avatar}/${x3.next_holder.avatarName}`
: null, : null,
positionName: x3.next_holder.position, positionName: x3.next_holder.position,
@ -2052,7 +2075,10 @@ export class OrganizationController extends Controller {
.map((x4: PosMaster) => ({ .map((x4: PosMaster) => ({
personID: x4.next_holder.id, personID: x4.next_holder.id,
name: x4.next_holder.firstName, name: x4.next_holder.firstName,
avatar: x4.next_holder && x4.next_holder.avatar != null && x4.next_holder.avatarName != null avatar:
x4.next_holder &&
x4.next_holder.avatar != null &&
x4.next_holder.avatarName != null
? `${x4.next_holder.avatar}/${x4.next_holder.avatarName}` ? `${x4.next_holder.avatar}/${x4.next_holder.avatarName}`
: null, : null,
positionName: x4.next_holder.position, positionName: x4.next_holder.position,
@ -3806,7 +3832,7 @@ export class OrganizationController extends Controller {
* @summary ORG_023 - (ADMIN) #25 * @summary ORG_023 - (ADMIN) #25
* *
*/ */
@Get("{id}/{system}") @Get("system/{id}/{system}")
async detailBySystem( async detailBySystem(
@Path() id: string, @Path() id: string,
@Path() system: string, @Path() system: string,