no message

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

View file

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