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";
|
||||
|
||||
enum OrgChild1Rank {
|
||||
DEPARTMENT = "department",
|
||||
OFFICE = "office",
|
||||
DIVISION = "division",
|
||||
SECTION = "section",
|
||||
DEPARTMENT = "DEPARTMENT",
|
||||
OFFICE = "OFFICE",
|
||||
DIVISION = "DIVISION",
|
||||
SECTION = "SECTION",
|
||||
}
|
||||
|
||||
@Entity("orgChild1")
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import { OrgChild4 } from "./OrgChild4";
|
|||
|
||||
// ENUM orgChild2Rank
|
||||
enum OrgChild2Rank {
|
||||
DEPARTMENT = "department",
|
||||
OFFICE = "office",
|
||||
DIVISION = "division",
|
||||
SECTION = "section",
|
||||
DEPARTMENT = "DEPARTMENT",
|
||||
OFFICE = "OFFICE",
|
||||
DIVISION = "DIVISION",
|
||||
SECTION = "SECTION",
|
||||
}
|
||||
@Entity("orgChild2")
|
||||
export class OrgChild2 extends EntityBase {
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ import { OrgChild2 } from "./OrgChild2";
|
|||
import { OrgChild4 } from "./OrgChild4";
|
||||
|
||||
enum OrgChild3Rank {
|
||||
DEPARTMENT = "department",
|
||||
OFFICE = "office",
|
||||
DIVISION = "division",
|
||||
SECTION = "section",
|
||||
DEPARTMENT = "DEPARTMENT",
|
||||
OFFICE = "OFFICE",
|
||||
DIVISION = "DIVISION",
|
||||
SECTION = "SECTION",
|
||||
}
|
||||
|
||||
@Entity("orgChild3")
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import { OrgChild2 } from "./OrgChild2";
|
|||
import { OrgChild3 } from "./OrgChild3";
|
||||
// ENUM orgChild4Rank
|
||||
enum OrgChild4Rank {
|
||||
DEPARTMENT = "department",
|
||||
OFFICE = "office",
|
||||
DIVISION = "division",
|
||||
SECTION = "section",
|
||||
DEPARTMENT = "DEPARTMENT",
|
||||
OFFICE = "OFFICE",
|
||||
DIVISION = "DIVISION",
|
||||
SECTION = "SECTION",
|
||||
}
|
||||
@Entity("orgChild4")
|
||||
export class OrgChild4 extends EntityBase {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ export class OrgRevision extends EntityBase {
|
|||
default: false
|
||||
})
|
||||
orgRevisionIsDraft: boolean;
|
||||
|
||||
|
||||
}
|
||||
|
||||
export type UpdateOrgRevision = Partial<OrgRevision>;
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ import { OrgChild1 } from "./OrgChild1";
|
|||
|
||||
// ENUM orgRootRank
|
||||
enum OrgRootRank {
|
||||
DEPARTMENT = "department",
|
||||
OFFICE = "office",
|
||||
DIVISION = "division",
|
||||
SECTION = "section",
|
||||
DEPARTMENT = "DEPARTMENT",
|
||||
OFFICE = "OFFICE",
|
||||
DIVISION = "DIVISION",
|
||||
SECTION = "SECTION",
|
||||
}
|
||||
|
||||
@Entity("orgRoot")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue