update entity OrgGroup
This commit is contained in:
parent
bea20bb46b
commit
2dc74fc7d2
7 changed files with 22 additions and 41 deletions
|
|
@ -179,25 +179,4 @@ export class OrgRootController extends Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* รายละเอียดโครงสร้างระดับ Root
|
|
||||||
*
|
|
||||||
* @summary ORG_016 - รายละเอียดโครงสร้างระดับ Root (ADMIN) #16
|
|
||||||
*
|
|
||||||
* @param {string} id Guid, *Id root
|
|
||||||
*/
|
|
||||||
@Get("root/{id}")
|
|
||||||
async detail(@Path() id: string) {
|
|
||||||
try {
|
|
||||||
const orgRoot = await this.orgRootRepository.findOne({ where: { id } });
|
|
||||||
|
|
||||||
if (!orgRoot) {
|
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล");
|
|
||||||
}
|
|
||||||
|
|
||||||
return new HttpSuccess(orgRoot);
|
|
||||||
} catch (error) {
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ import { OrgRoot } from "./OrgRoot";
|
||||||
import { OrgChild2 } from "./OrgChild2";
|
import { OrgChild2 } from "./OrgChild2";
|
||||||
|
|
||||||
enum OrgChild1Rank {
|
enum OrgChild1Rank {
|
||||||
DEPARTMENT = "department",
|
DEPARTMENT = "DEPARTMENT",
|
||||||
OFFICE = "office",
|
OFFICE = "OFFICE",
|
||||||
DIVISION = "division",
|
DIVISION = "DIVISION",
|
||||||
SECTION = "section",
|
SECTION = "SECTION",
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity("orgChild1")
|
@Entity("orgChild1")
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ import { OrgChild4 } from "./OrgChild4";
|
||||||
|
|
||||||
// ENUM orgChild2Rank
|
// ENUM orgChild2Rank
|
||||||
enum OrgChild2Rank {
|
enum OrgChild2Rank {
|
||||||
DEPARTMENT = "department",
|
DEPARTMENT = "DEPARTMENT",
|
||||||
OFFICE = "office",
|
OFFICE = "OFFICE",
|
||||||
DIVISION = "division",
|
DIVISION = "DIVISION",
|
||||||
SECTION = "section",
|
SECTION = "SECTION",
|
||||||
}
|
}
|
||||||
@Entity("orgChild2")
|
@Entity("orgChild2")
|
||||||
export class OrgChild2 extends EntityBase {
|
export class OrgChild2 extends EntityBase {
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ import { OrgChild2 } from "./OrgChild2";
|
||||||
import { OrgChild4 } from "./OrgChild4";
|
import { OrgChild4 } from "./OrgChild4";
|
||||||
|
|
||||||
enum OrgChild3Rank {
|
enum OrgChild3Rank {
|
||||||
DEPARTMENT = "department",
|
DEPARTMENT = "DEPARTMENT",
|
||||||
OFFICE = "office",
|
OFFICE = "OFFICE",
|
||||||
DIVISION = "division",
|
DIVISION = "DIVISION",
|
||||||
SECTION = "section",
|
SECTION = "SECTION",
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity("orgChild3")
|
@Entity("orgChild3")
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@ import { OrgChild2 } from "./OrgChild2";
|
||||||
import { OrgChild3 } from "./OrgChild3";
|
import { OrgChild3 } from "./OrgChild3";
|
||||||
// ENUM orgChild4Rank
|
// ENUM orgChild4Rank
|
||||||
enum OrgChild4Rank {
|
enum OrgChild4Rank {
|
||||||
DEPARTMENT = "department",
|
DEPARTMENT = "DEPARTMENT",
|
||||||
OFFICE = "office",
|
OFFICE = "OFFICE",
|
||||||
DIVISION = "division",
|
DIVISION = "DIVISION",
|
||||||
SECTION = "section",
|
SECTION = "SECTION",
|
||||||
}
|
}
|
||||||
@Entity("orgChild4")
|
@Entity("orgChild4")
|
||||||
export class OrgChild4 extends EntityBase {
|
export class OrgChild4 extends EntityBase {
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ export class OrgRevision extends EntityBase {
|
||||||
default: false
|
default: false
|
||||||
})
|
})
|
||||||
orgRevisionIsDraft: boolean;
|
orgRevisionIsDraft: boolean;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateOrgRevision = Partial<OrgRevision>;
|
export type UpdateOrgRevision = Partial<OrgRevision>;
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ import { OrgChild1 } from "./OrgChild1";
|
||||||
|
|
||||||
// ENUM orgRootRank
|
// ENUM orgRootRank
|
||||||
enum OrgRootRank {
|
enum OrgRootRank {
|
||||||
DEPARTMENT = "department",
|
DEPARTMENT = "DEPARTMENT",
|
||||||
OFFICE = "office",
|
OFFICE = "OFFICE",
|
||||||
DIVISION = "division",
|
DIVISION = "DIVISION",
|
||||||
SECTION = "section",
|
SECTION = "SECTION",
|
||||||
}
|
}
|
||||||
|
|
||||||
@Entity("orgRoot")
|
@Entity("orgRoot")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue